diff --git a/ChangeLog b/ChangeLog index 9b1885c6c..6c003f25f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2011-10-14 Richard Frith-Macdonald + + * Source/NSBundle.m: + * Source/NSPathUtilities.m: + * Source/NSProcessInfo.m: + * Source/NSSocketPort.m: + * Source/NSRunLoop.m: + * Source/NSMessagePortNameServer.m: + * Source/unix/GSRunLoopCtxt.m: + * Source/unix/NSStream.m: + * Source/GSHTTPURLHandle.m: + * Source/NSPage.m: + * Source/NSMessagePort.m: + * Source/win32/GSFileHandle.m: + * Source/NSInvocation.m: + * Source/NSFileManager.m: + * Source/common.h: + * Source/NSString.m: + * Source/NSThread.m: + * Source/NSData.m: + * Source/NSHost.m: + * Source/GSNetwork.h: + * Source/NSPipe.m: + * Source/NSLog.m: + * Source/GSFormat.m: + * Source/GSFileHandle.m: + * Source/NSTask.m: + * SSL/GSSSLHandle.m: + * Tools/gdnc.m: + Move/wrap include of unistd.h to work around clang problem. + 2011-10-14 Richard Frith-Macdonald * Source/Additions/Unicode.m: diff --git a/SSL/GSSSLHandle.m b/SSL/GSSSLHandle.m index 8bd1c07ff..e278e57e0 100644 --- a/SSL/GSSSLHandle.m +++ b/SSL/GSSSLHandle.m @@ -84,9 +84,6 @@ #endif #include #include -#ifdef HAVE_UNISTD_H -#include -#endif static NSString* sslError(int err) diff --git a/Source/GSFileHandle.m b/Source/GSFileHandle.m index caf3e9754..0a17e5542 100644 --- a/Source/GSFileHandle.m +++ b/Source/GSFileHandle.m @@ -61,9 +61,6 @@ #include #include -#ifdef HAVE_UNISTD_H -#include -#endif /* * Stuff for setting the sockets into non-blocking mode. diff --git a/Source/GSFormat.m b/Source/GSFormat.m index 2b97888a0..2e1e2d221 100644 --- a/Source/GSFormat.m +++ b/Source/GSFormat.m @@ -83,9 +83,6 @@ #include // for strstr() #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #include #include diff --git a/Source/GSHTTPURLHandle.m b/Source/GSHTTPURLHandle.m index 5916c7533..08f6c70a6 100644 --- a/Source/GSHTTPURLHandle.m +++ b/Source/GSHTTPURLHandle.m @@ -50,9 +50,6 @@ #import "GSPrivate.h" #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #ifdef HAVE_SYS_FCNTL_H diff --git a/Source/GSNetwork.h b/Source/GSNetwork.h index 6a33e5948..579381dbd 100644 --- a/Source/GSNetwork.h +++ b/Source/GSNetwork.h @@ -28,10 +28,6 @@ Boston, MA 02111 USA. */ -#ifdef HAVE_UNISTD_H -#include -#endif - #include #include #include diff --git a/Source/NSBundle.m b/Source/NSBundle.m index 6c6f66f8c..7fc5529f6 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -60,9 +60,6 @@ NSString * const NSBundleDidLoadNotification = @"NSBundleDidLoadNotification"; NSString * const NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings"; NSString * const NSLoadedClasses = @"NSLoadedClasses"; -#ifdef HAVE_UNISTD_H -#include -#endif #include static NSFileManager * diff --git a/Source/NSData.m b/Source/NSData.m index db23b0b00..a511713ee 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -86,14 +86,10 @@ #import "GSPrivate.h" #import "GNUstepBase/NSObject+GNUstepBase.h" #include -#ifdef HAVE_UNISTD_H -#include /* SEEK_* on SunOS 4 */ -#endif #ifdef HAVE_MMAP -#include -#include -#include +#include +#include #ifndef MAP_FAILED #define MAP_FAILED ((void*)-1) /* Failure address. */ #endif diff --git a/Source/NSFileManager.m b/Source/NSFileManager.m index 21057312f..fbb73d3c0 100644 --- a/Source/NSFileManager.m +++ b/Source/NSFileManager.m @@ -77,9 +77,6 @@ # include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_WINDOWS_H # include #endif diff --git a/Source/NSHost.m b/Source/NSHost.m index 7d3828b3e..c7e9656cd 100644 --- a/Source/NSHost.m +++ b/Source/NSHost.m @@ -42,9 +42,6 @@ #include #else #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #include #include diff --git a/Source/NSInvocation.m b/Source/NSInvocation.m index 15bd51ddb..3312d3650 100644 --- a/Source/NSInvocation.m +++ b/Source/NSInvocation.m @@ -47,10 +47,6 @@ #include #endif -#if defined(HAVE_UNISTD_H) -#import -#endif - #if defined(HAVE_MMAP) # if !defined(MAP_ANONYMOUS) # if defined(MAP_ANON) diff --git a/Source/NSLog.m b/Source/NSLog.m index 504858ce0..68e04039d 100644 --- a/Source/NSLog.m +++ b/Source/NSLog.m @@ -62,11 +62,6 @@ # endif #endif // HAVE_SYSLOG - -#ifdef HAVE_UNISTD_H -#include -#endif - #import "GSPrivate.h" extern NSThread *GSCurrentThread(); diff --git a/Source/NSMessagePort.m b/Source/NSMessagePort.m index 8de239cb0..30229a904 100644 --- a/Source/NSMessagePort.m +++ b/Source/NSMessagePort.m @@ -50,10 +50,6 @@ #include -#ifdef HAVE_UNISTD_H -#include -#endif - #include /* for MAXHOSTNAMELEN */ #include #include diff --git a/Source/NSMessagePortNameServer.m b/Source/NSMessagePortNameServer.m index 054b4f2d2..e6c09fec2 100644 --- a/Source/NSMessagePortNameServer.m +++ b/Source/NSMessagePortNameServer.m @@ -40,7 +40,6 @@ #import "GSPortPrivate.h" #include -#include #include #include #include diff --git a/Source/NSPage.m b/Source/NSPage.m index 5b91acb96..011029868 100644 --- a/Source/NSPage.m +++ b/Source/NSPage.m @@ -27,9 +27,6 @@ #import "common.h" #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #if __mach__ #include diff --git a/Source/NSPathUtilities.m b/Source/NSPathUtilities.m index 7165e2572..2e62d63bb 100644 --- a/Source/NSPathUtilities.m +++ b/Source/NSPathUtilities.m @@ -73,9 +73,6 @@ #import "GSPrivate.h" -#ifdef HAVE_UNISTD_H -#include // for getuid() -#endif #ifdef HAVE_PWD_H #include // for getpwnam_r() and getpwuid_r() #endif diff --git a/Source/NSPipe.m b/Source/NSPipe.m index 59703b161..8bc3034a4 100644 --- a/Source/NSPipe.m +++ b/Source/NSPipe.m @@ -30,9 +30,6 @@ #import "Foundation/NSFileHandle.h" #import "GSPrivate.h" -#ifdef HAVE_UNISTD_H -#include -#endif /** *

The NSPipe provides an encapsulation of the UNIX concept of pipe.
diff --git a/Source/NSProcessInfo.m b/Source/NSProcessInfo.m index fe1c600dc..401df77df 100644 --- a/Source/NSProcessInfo.m +++ b/Source/NSProcessInfo.m @@ -55,9 +55,6 @@ *************************************************************************/ #import "common.h" -#ifdef HAVE_UNISTD_H -#include -#endif #include #include diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index 3487a4cc5..57242533c 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -59,9 +59,6 @@ #ifdef HAVE_POLL_F #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #include #include #include /* for memset() */ diff --git a/Source/NSSocketPort.m b/Source/NSSocketPort.m index 851f44301..6eb37a5ba 100644 --- a/Source/NSSocketPort.m +++ b/Source/NSSocketPort.m @@ -48,9 +48,6 @@ #import "GSNetwork.h" #include -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef __MINGW__ #define close closesocket diff --git a/Source/NSString.m b/Source/NSString.m index 26e676ee2..e6ede0442 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -76,9 +76,6 @@ #import "GNUstepBase/NSObject+GNUstepBase.h" #import "GSPrivate.h" #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #include #include diff --git a/Source/NSTask.m b/Source/NSTask.m index 7d97ab1b8..2a4c70cbb 100644 --- a/Source/NSTask.m +++ b/Source/NSTask.m @@ -49,9 +49,6 @@ #import "GSPrivate.h" #include -#ifdef HAVE_UNISTD_H -#include -#endif #include #if defined(__FreeBSD__) || defined(__OpenBSD__) #include diff --git a/Source/NSThread.m b/Source/NSThread.m index 47b5be34d..dfec66005 100644 --- a/Source/NSThread.m +++ b/Source/NSThread.m @@ -33,9 +33,6 @@ #import "common.h" #define EXPOSE_NSThread_IVARS 1 -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NANOSLEEP #include #endif diff --git a/Source/common.h b/Source/common.h index 344974fdb..7e436baa6 100644 --- a/Source/common.h +++ b/Source/common.h @@ -47,3 +47,9 @@ #import "Foundation/NSBundle.h" #import "GNUstepBase/NSBundle+GNUstepBase.h" +#ifdef HAVE_UNISTD_H +#define __block __gs_unistd_block +#include +#undef __block +#endif + diff --git a/Source/unix/GSRunLoopCtxt.m b/Source/unix/GSRunLoopCtxt.m index 1fd130b2c..939613e3b 100644 --- a/Source/unix/GSRunLoopCtxt.m +++ b/Source/unix/GSRunLoopCtxt.m @@ -26,9 +26,6 @@ #ifdef HAVE_POLL_F #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #define FDCOUNT 128 diff --git a/Source/unix/NSStream.m b/Source/unix/NSStream.m index 5fd74f973..386096461 100644 --- a/Source/unix/NSStream.m +++ b/Source/unix/NSStream.m @@ -24,8 +24,6 @@ #import "common.h" -#include - #import "Foundation/NSData.h" #import "Foundation/NSArray.h" #import "Foundation/NSDictionary.h" diff --git a/Source/win32/GSFileHandle.m b/Source/win32/GSFileHandle.m index 4f7cbd14a..cacc80de6 100644 --- a/Source/win32/GSFileHandle.m +++ b/Source/win32/GSFileHandle.m @@ -54,9 +54,6 @@ #include #include -#ifdef HAVE_UNISTD_H -#include -#endif #ifndef O_BINARY #ifdef _O_BINARY diff --git a/Tools/gdnc.m b/Tools/gdnc.m index 73847a05e..cd8d0eaa5 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -20,7 +20,6 @@ #import "common.h" #include -#include #import "Foundation/NSArray.h" #import "Foundation/NSAutoreleasePool.h"