Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectOrganizer, Workbench: Use GStatBuf for "g_stat()" calls #1353

Merged
merged 1 commit into from
May 31, 2024

Conversation

eht16
Copy link
Member

@eht16 eht16 commented May 26, 2024

For some reason, since the latest MSYS2 update on my Windows system, I got compiler errors that g_stat() requires a GStatBuf type as second argument.

According to the docs, https://docs.gtk.org/glib/func.stat.html, this is correct and in Geany we also use GStatBuf in all places.

@elextr
Copy link
Member

elextr commented May 26, 2024

For some reason, since the latest MSYS2 update on my Windows system, I got compiler errors that g_stat() requires a GStatBuf type as second argument.

On windows there are many MS stat calls and struct stat is a structure that changes depending on platform, compiler, target os, wind direction etc and in some cases may not match g_stat which calls only one of the many MS stat calls. Perhaps they could have made g_stat() call the right function for the definition of struct stat but probably it was easier to define GStatBuf to match the MS call made by g_stat(). Maybe which MS call g_stat() uses changed, it was 32 bit times IIRC and maybe they finally switched to 64 bit ones, so its good the compiler now enforces it.

LGBI

Copy link
Member

@techee techee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@eht16 eht16 merged commit cae6861 into geany:master May 31, 2024
2 checks passed
@eht16 eht16 deleted the use_gstatbuf_for_g_stat branch May 31, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants