Bug 9329 - unistd.h not available on every platform
Summary: unistd.h not available on every platform
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: high trivial
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-13 06:07 UTC by Christian Ehrlicher
Modified: 2007-10-09 05:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
add configure test for unistd.h (583 bytes, patch)
2006-12-13 23:58 UTC, Ralf Habacker
Details | Splinter Review

Description Christian Ehrlicher 2006-12-13 06:07:56 UTC
We need a check for unistd.h as it is not available on windows. As this is a
change to automake stuff, I can't provide a patch, but it should be trivial to add.
Comment 1 Ralf Habacker 2006-12-13 23:58:44 UTC
Created attachment 8101 [details] [review]
add configure test for unistd.h
Comment 2 Havoc Pennington 2006-12-14 06:32:50 UTC
Shouldn't the patch also add some #ifdef HAVE_UNISTD_H ?

This seems like a file that would be wrong to use outside of a -unix.c file 
perhaps
Comment 3 Ralf Habacker 2006-12-31 04:03:42 UTC
Appended is a patch for the related case 

Index: test/name-test/test-names.c
===================================================================
--- test/name-test/test-names.c	(Revision 543)
+++ test/name-test/test-names.c	(Arbeitskopie)
@@ -1,9 +1,11 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <dbus/dbus.h>
 #include <dbus/dbus-connection-internal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #define REMOVE_CONNECTION 0
 #define ADD_CONNECTION 1
Comment 4 Havoc Pennington 2006-12-31 10:34:43 UTC
does test-names.c really need unistd.h? if the file builds without it maybe 
it's just a bogus include
Comment 5 Simon McVittie 2007-10-09 05:06:52 UTC
The patch appears to have gone in back in March; closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.