After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 494360 - Enumerators conflict with windows-specific defines
Enumerators conflict with windows-specific defines
Status: RESOLVED FIXED
Product: gnome-vfsmm
Classification: Deprecated
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2007-11-06 23:14 UTC by Armin Burgmeier
Modified: 2011-01-16 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (9.56 KB, patch)
2007-11-11 18:13 UTC, Armin Burgmeier
none Details | Review

Description Armin Burgmeier 2007-11-06 23:14:30 UTC
The following enumerators from libgnomevfsmm/enums.h conflict with defines from winerror.h, pulled in by winsock2.h, by libgnomevfs-address.h:

ERROR_NOT_FOUND
ERROR_NOT_SUPPORTED
ERROR_ACCESS_DENIED
ERROR_TOO_MANY_OPEN_FILES
ERROR_FILE_EXISTS
ERROR_CANCELLED
ERROR_TOO_MANY_LINKS
ERROR_TIMEOUT
FILE_TYPE_UNKNOWN (this is from winbase.h)

This prevents gnome-vfsmm from compiling on Windows. I'm not sure how to fix this. We can just undef them, but it may still happen that someone needs these windows-specific defines in gnome-vfsmm-using code. Perhaps we should rename the affected enumerations (using another prefix), keeping the old ones on non-Windows platforms.
Comment 1 Murray Cumming 2007-11-07 10:29:06 UTC
Damned shitty windows code.

Yes, please try to rename them for Windows, without breaking the API for existing platforms. Or just try not to use gnome-vfsmm on Windows if that's easier. That could even be a simple patch that isn't in svn, for the short-term, if it's difficult.

We'll have to check if the new giomm has this problem too.
Comment 2 Armin Burgmeier 2007-11-11 18:13:51 UTC
Created attachment 98925 [details] [review]
Proposed patch

This patch renames the problematic enums, and keeps the old names on non-Win32 platforms. It also disables a few methods that gnome-vfs does not implement on Win32.

The patch does break neither ABI nor API on Linux, I was able to use and rebuild bakery and glom with this patch applied.
Comment 3 Murray Cumming 2007-12-06 18:19:13 UTC
Applied to trunk, so it will be in the gnome-vfsmm 2.21.1 that I am just about to release.