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 647341 - Fix unconditional unistd.h inclusion
Fix unconditional unistd.h inclusion
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.28.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-04-10 05:48 UTC by Kean Johnston
Modified: 2011-04-25 01:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix unconditional unistd.h inclusion (653 bytes, text/plain)
2011-04-10 05:48 UTC, Kean Johnston
Details

Description Kean Johnston 2011-04-10 05:48:31 UTC
Created attachment 185626 [details]
Fix unconditional unistd.h inclusion

A few files unconditionally include unistd.h, which does not exist on all platforms. Attached is a patch to fix that. Please note that the patch to gvdb-builder.c intentionally does not use #ifdef HAVE_UNISTD_H as none of the files in that directory use config.h and I do not want to create a new dependency on autoconf to the code. It is a problem for Win32 when using MSVC (MinGW does have a unistd.h) which is why the conditional is so specific. Without this, Glib does not compile on Win32 with MSVC.
Comment 1 Allison Karlitskaya (desrt) 2011-04-25 01:55:50 UTC
commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a
Author: Matthias Clasen <mclasen@redhat.com>
Date:   Mon Apr 11 12:57:19 2011 -0400

    Don't include unistd.h unconditionally
    
    It doesn't exist on all platforms. Partial fix for bug 647341.

and


Merge: 2553511 a5dd6fc
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Fri Apr 15 09:29:47 2011 -0400

    Merge remote-tracking branch 'gvdb/master'

commit a5dd6fcc4f46a322cc547a5fcfa1b52cbc5ec6d6
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Fri Apr 15 09:27:38 2011 -0400

    builder: do not include <unistd.h> on win32
    
    Spotted by Kean Johnston <kean.johnston@gmail.com>.
    
    https://mail.gnome.org/archives/gtk-devel-list/2011-April/msg00010.html