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 644905 - glib-compile-schemas: unistd.h include error
glib-compile-schemas: unistd.h include error
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.28.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-03-16 10:32 UTC by Kazuki Iwamoto
Modified: 2011-06-01 00:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for glib-compile-schemas.c and gvdb-builder.c (660 bytes, patch)
2011-03-16 10:46 UTC, Kazuki Iwamoto
none Details | Review
patch to glib-compile-schemas.c (766 bytes, patch)
2011-05-25 04:21 UTC, Fan, Chun-wei
none Details | Review
patch to gio/glib-compile-schemas.c regarding unistd.h (766 bytes, patch)
2011-05-25 04:32 UTC, Fan, Chun-wei
none Details | Review

Description Kazuki Iwamoto 2011-03-16 10:32:08 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 */
Comment 1 Kazuki Iwamoto 2011-03-16 10:46:35 UTC
Created attachment 183507 [details] [review]
Patch for glib-compile-schemas.c and gvdb-builder.c
Comment 2 Matthias Clasen 2011-03-16 12:27:57 UTC
Looks ok, but please leave out the /* HAVE_UNISTD */ comments. Not really needed for an ifdef thats 2 lines up...
Comment 3 Fan, Chun-wei 2011-04-30 03:23:05 UTC
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!
Comment 4 Fan, Chun-wei 2011-05-25 04:21:03 UTC
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!
Comment 5 Fan, Chun-wei 2011-05-25 04:32:07 UTC
Created attachment 188551 [details] [review]
patch to gio/glib-compile-schemas.c regarding unistd.h

(Sorry Kazuki, I need to obsolete your patch here...)
Comment 6 Matthias Clasen 2011-05-31 20:54:12 UTC
Cherry picking the include over to the glib-2-28 branch would be fine.
Comment 7 Fan, Chun-wei 2011-06-01 00:14:10 UTC
Cherry-picked from commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a in master,
and committed.