GNOME Bugzilla – Bug 644905
glib-compile-schemas: unistd.h include error
Last modified: 2011-06-01 00:14:10 UTC
unistd.h is included unconditionally in gio/glib-compile-schemas.c" and "io/gvdb/gvdb-builder.c". So we can not build "glib-compile-schemas.exe" by using Microsoft Visual C++. "#include <unistd.h>" should be surrounded by "#ifdef HAVE_UNISTD_H" and "#endif". For example, #ifdef HAVE_UNISTD #include <unistd.h> #endif /* HAVE_UNISTD */
Created attachment 183507 [details] [review] Patch for glib-compile-schemas.c and gvdb-builder.c
Looks ok, but please leave out the /* HAVE_UNISTD */ comments. Not really needed for an ifdef thats 2 lines up...
Hi Kazuki, The fix for gio/gvdb/gvdb-builder.c has already been committed on 4/15 by Ryan (see https://bugzilla.gnome.org/show_bug.cgi?id=647341)-though it seems that the fix for glib-compile-schemas.c has not yet been committed on glib-2-28 FYI, I have also added VS2008/2010 project files to compile glib-compile-schemas and gettings(-tool) so that they will be compiled too... Hi Matthias, Can I copy the #ifdef HAVE_UNISTD_H from your 4/11 commit on master for glib-compile-schemas.c over to the glib-2-28 branch to fix and close this? Thank you!
Created attachment 188550 [details] [review] patch to glib-compile-schemas.c (Sorry Kazuki, I need to obsolete you patch...) Hi, I think this patch should look better here... Thank you!
Created attachment 188551 [details] [review] patch to gio/glib-compile-schemas.c regarding unistd.h (Sorry Kazuki, I need to obsolete your patch here...)
Cherry picking the include over to the glib-2-28 branch would be fine.
Cherry-picked from commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a in master, and committed.