Bug 9329

Summary: unistd.h not available on every platform
Product: dbus Reporter: Christian Ehrlicher <ch.ehrlicher>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: trivial    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: add configure test for unistd.h

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.