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 323052 - gslice.c: unistd.h error and C99ism
gslice.c: unistd.h error and C99ism
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.9.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-02 20:04 UTC by Kazuki Iwamoto
Modified: 2005-12-02 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for glib/gslice.c (4.51 KB, patch)
2005-12-02 20:06 UTC, Kazuki Iwamoto
none Details | Review

Description Kazuki Iwamoto 2005-12-02 20:04:52 UTC
Please describe the problem:
unistd.h is included unconditionally and sysconf is not on Windows.
Because of C99ism in the file gslice.c, glib does not compile.

Steps to reproduce:
1. compile by Visual C++


Actual results:
following message is displayed.
glib\gslice.c(22) : fatal error C1083: Cannot open include file: 'unistd.h' : No
such file or directory

Expected results:
"#include <unistd.h>" should be surrounded by "#ifdef HAVE_UNISTD_H" and "#endif".
GetSystemInfo API is useful on Windows as sysconf API.
And the declaration have to be moved to top of block.

Does this happen every time?
every time

Other information:
Comment 1 Kazuki Iwamoto 2005-12-02 20:06:19 UTC
Created attachment 55550 [details] [review]
patch for glib/gslice.c
Comment 2 Matthias Clasen 2005-12-02 20:11:45 UTC
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

        * glib/gslice.c: Win32 portability fixes and C99ism removal,
        pointed out by Kazuki Iwamoto.  (#323052)