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 336382 - errno declarations break the build
errno declarations break the build
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Build
2.14.x
Other other
: Urgent normal
: 2.14
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-28 18:12 UTC by Julio Merino
Modified: 2006-04-25 09:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Sample patch. (1.61 KB, patch)
2006-03-28 18:12 UTC, Julio Merino
none Details | Review

Description Julio Merino 2006-03-28 18:12:11 UTC
The libgnomevfs/xdgmimemagic.c and modules/fstype.c files in gnome-vfs include errno.h to get the declaration of the errno variable.  This is correct.

However, they also hardcode an extern declaration, 'extern int errno', which is against the ISO C standard and makes the build of those files break, at least, under Dragonfly BSD (because that line conflicts with the one in errno.h).  (ISO C90 said that errno is a macro while C99 says that it is an lvalue.)

The solution is trivial: get rid of the extern int errno lines from the code.  Note that this does not introduce regressions because many other source files in gnome-vfs are already using the errno variable based solely on the errno.h header.
Comment 1 Julio Merino 2006-03-28 18:12:36 UTC
Created attachment 62232 [details] [review]
Sample patch.
Comment 2 Christian Neumair 2006-04-06 20:41:10 UTC
Thanks for your bug report! Maybe you could submit your patch to the gnome-vfs mailing list [1] for review?

[1] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
Comment 3 Alexander Larsson 2006-04-25 09:46:13 UTC
Commiting, thanks!