mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
Fixes to get stuff to work after autoconf changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13578 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9824bb0bbc
commit
79f3f57034
24 changed files with 135 additions and 106 deletions
28
ChangeLog
28
ChangeLog
|
@ -1,3 +1,31 @@
|
|||
2002-05-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SSL/GSUnixSSLHandle.m: Change '#if HAVE...' to '#ifdef HAVE_...'
|
||||
* Source/GSFormat.m: ditto
|
||||
* Source/GSHTTPURLHandle.m: ditto
|
||||
* Source/GSTcpPort.m: ditto
|
||||
* Source/NSBundle.m: ditto
|
||||
* Source/NSData.m: ditto
|
||||
* Source/NSDate.m: ditto
|
||||
* Source/NSFileManager.m: ditto
|
||||
* Source/NSHost.m: ditto
|
||||
* Source/NSLock.m: ditto
|
||||
* Source/NSLog.m: ditto
|
||||
* Source/NSPage.m: ditto
|
||||
* Source/NSPipe.m: ditto
|
||||
* Source/NSProcessInfo.m: ditto
|
||||
* Source/NSRunLoop.m: ditto
|
||||
* Source/NSString.m: ditto
|
||||
* Source/NSTask.m: ditto
|
||||
* Source/NSThread.m: ditto
|
||||
* Source/NSUser.m: ditto
|
||||
* Source/UnixFileHandle.m: ditto
|
||||
* Source/WindowsFileHandle.m: ditto
|
||||
* Tools/gsdoc.m: ditto
|
||||
* Tools/autogsdoc.m: ditto
|
||||
Fixes to handle configuration changes where AC_DEFINE is setting
|
||||
preprocessor constants to be empty (but defined) rather than to be 1
|
||||
|
||||
2002-05-02 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Updated to autoconf 2.53 from configure.in
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
#endif
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include <limits.h>
|
||||
#include <string.h> // for strstr()
|
||||
#include <sys/stat.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/GSMime.h>
|
||||
#include <string.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/file.h>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> /* for gethostname() */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
|
|
@ -79,11 +79,11 @@
|
|||
#include <Foundation/NSZone.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h> /* for memset() */
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> /* SEEK_* on SunOS 4 */
|
||||
#endif
|
||||
|
||||
#if HAVE_MMAP
|
||||
#ifdef HAVE_MMAP
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -97,7 +97,7 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
|
@ -351,12 +351,12 @@ failure:
|
|||
- (void) _grow: (unsigned int)minimum;
|
||||
@end
|
||||
|
||||
#if HAVE_MMAP
|
||||
#ifdef HAVE_MMAP
|
||||
@interface NSDataMappedFile : NSDataMalloc
|
||||
@end
|
||||
#endif
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
@interface NSDataShared : NSDataMalloc
|
||||
{
|
||||
int shmid;
|
||||
|
@ -443,7 +443,7 @@ failure:
|
|||
{
|
||||
NSData *d;
|
||||
|
||||
#if HAVE_MMAP
|
||||
#ifdef HAVE_MMAP
|
||||
d = [NSDataMappedFile allocWithZone: NSDefaultMallocZone()];
|
||||
d = [d initWithContentsOfMappedFile: path];
|
||||
#else
|
||||
|
@ -529,7 +529,7 @@ failure:
|
|||
|
||||
- (id) initWithContentsOfMappedFile: (NSString *)path
|
||||
{
|
||||
#if HAVE_MMAP
|
||||
#ifdef HAVE_MMAP
|
||||
RELEASE(self);
|
||||
self = [NSDataMappedFile allocWithZone: GSObjCZone(self)];
|
||||
return [self initWithContentsOfMappedFile: path];
|
||||
|
@ -1306,7 +1306,7 @@ failure:
|
|||
@implementation NSData (GNUstepExtensions)
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int)length
|
||||
{
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
NSDataShared *d;
|
||||
|
||||
d = [NSDataShared allocWithZone: NSDefaultMallocZone()];
|
||||
|
@ -1322,7 +1322,7 @@ failure:
|
|||
{
|
||||
NSData *d;
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
d = [NSDataShared allocWithZone: NSDefaultMallocZone()];
|
||||
d = [d initWithBytes: bytes length: length];
|
||||
#else
|
||||
|
@ -1870,7 +1870,7 @@ failure:
|
|||
@implementation NSMutableData (GNUstepExtensions)
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int)length
|
||||
{
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
NSDataShared *d;
|
||||
|
||||
d = [NSMutableDataShared allocWithZone: NSDefaultMallocZone()];
|
||||
|
@ -1886,7 +1886,7 @@ failure:
|
|||
{
|
||||
NSData *d;
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
d = [NSMutableDataShared allocWithZone: NSDefaultMallocZone()];
|
||||
d = [d initWithBytes: bytes length: length];
|
||||
#else
|
||||
|
@ -2429,7 +2429,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
|
||||
@end
|
||||
|
||||
#if HAVE_MMAP
|
||||
#ifdef HAVE_MMAP
|
||||
@implementation NSDataMappedFile
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
|
@ -2497,7 +2497,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
@end
|
||||
#endif /* HAVE_MMAP */
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
@implementation NSDataShared
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
|
@ -3156,7 +3156,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
@end
|
||||
|
||||
|
||||
#if HAVE_SHMCTL
|
||||
#ifdef HAVE_SHMCTL
|
||||
@implementation NSMutableDataShared
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <base/preface.h>
|
||||
#include <base/behavior.h>
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
|
|
@ -56,10 +56,10 @@
|
|||
# include <ndir.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if HAVE_WINDOWS_H
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
|||
# include <utime.h>
|
||||
# endif
|
||||
#else
|
||||
# if HAVE_SYS_PARAM_H
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h> /* for MAXPATHLEN */
|
||||
# endif
|
||||
#endif
|
||||
|
@ -107,11 +107,11 @@
|
|||
# include <sys/statfs.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_FILE_H
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_MOUNT_H
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
|
@ -122,13 +122,13 @@
|
|||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#if HAVE_PWD_H
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h> /* For struct passwd */
|
||||
#endif
|
||||
#if HAVE_GRP_H
|
||||
#ifdef HAVE_GRP_H
|
||||
#include <grp.h> /* For struct group */
|
||||
#endif
|
||||
#if HAVE_UTIME_H
|
||||
#ifdef HAVE_UTIME_H
|
||||
# include <utime.h>
|
||||
#endif
|
||||
|
||||
|
@ -1017,9 +1017,10 @@ static NSFileManager* defaultManager = nil;
|
|||
return [NSDictionary dictionaryWithObjects: values forKeys: keys count: 5];
|
||||
|
||||
#else
|
||||
#if HAVE_SYS_VFS_H || HAVE_SYS_STATFS_H || HAVE_SYS_MOUNT_H
|
||||
#if defined(HAVE_SYS_VFS_H) || defined(HAVE_SYS_STATFS_H) \
|
||||
|| defined(HAVE_SYS_MOUNT_H)
|
||||
struct stat statbuf;
|
||||
#if HAVE_STATVFS
|
||||
#ifdef HAVE_STATVFS
|
||||
struct statvfs statfsbuf;
|
||||
#else
|
||||
struct statfs statfsbuf;
|
||||
|
@ -1039,7 +1040,7 @@ static NSFileManager* defaultManager = nil;
|
|||
if (stat(cpath, &statbuf) != 0)
|
||||
return nil;
|
||||
|
||||
#if HAVE_STATVFS
|
||||
#ifdef HAVE_STATVFS
|
||||
if (statvfs(cpath, &statfsbuf) != 0)
|
||||
return nil;
|
||||
#else
|
||||
|
@ -1090,7 +1091,7 @@ static NSFileManager* defaultManager = nil;
|
|||
if ((str = [attributes objectForKey: NSFileOwnerAccountName]) != nil)
|
||||
{
|
||||
BOOL ok = NO;
|
||||
#if HAVE_PWD_H
|
||||
#ifdef HAVE_PWD_H
|
||||
struct passwd *pw = getpwnam([str cString]);
|
||||
|
||||
if (pw)
|
||||
|
@ -1123,7 +1124,7 @@ static NSFileManager* defaultManager = nil;
|
|||
else if ((str=[attributes objectForKey: NSFileGroupOwnerAccountName]) != nil)
|
||||
{
|
||||
BOOL ok = NO;
|
||||
#if HAVE_GRP_H
|
||||
#ifdef HAVE_GRP_H
|
||||
struct group *gp = getgrnam([str cString]);
|
||||
|
||||
if (gp)
|
||||
|
@ -1280,7 +1281,7 @@ static NSFileManager* defaultManager = nil;
|
|||
- (BOOL) createSymbolicLinkAtPath: (NSString*)path
|
||||
pathContent: (NSString*)otherPath
|
||||
{
|
||||
#if HAVE_SYMLINK
|
||||
#ifdef HAVE_SYMLINK
|
||||
const char* newpath = [self fileSystemRepresentationWithPath: path];
|
||||
const char* oldpath = [self fileSystemRepresentationWithPath: otherPath];
|
||||
|
||||
|
@ -1292,7 +1293,7 @@ static NSFileManager* defaultManager = nil;
|
|||
|
||||
- (NSString*) pathContentOfSymbolicLinkAtPath: (NSString*)path
|
||||
{
|
||||
#if HAVE_READLINK
|
||||
#ifdef HAVE_READLINK
|
||||
char lpath[PATH_MAX];
|
||||
const char* cpath = [self fileSystemRepresentationWithPath: path];
|
||||
int llen = readlink(cpath, lpath, PATH_MAX-1);
|
||||
|
@ -2206,7 +2207,7 @@ static int sparc_warn = 0;
|
|||
|
||||
if (copy == NO)
|
||||
{
|
||||
#if HAVE_PWD_H
|
||||
#ifdef HAVE_PWD_H
|
||||
{
|
||||
struct passwd *pw;
|
||||
|
||||
|
@ -2271,7 +2272,7 @@ static int sparc_warn = 0;
|
|||
* If we are running setuid to root - we need to specify the user
|
||||
* to be the owner of copied files.
|
||||
*/
|
||||
#if HAVE_GETEUID
|
||||
#ifdef HAVE_GETEUID
|
||||
if (geteuid() == 0 && [@"root" isEqualToString: u] == NO)
|
||||
{
|
||||
values[count++] = u;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <winsock2.h>
|
||||
#else
|
||||
#include <netdb.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <base/preface.h>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#ifdef __WIN32__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
@ -143,7 +143,7 @@ NSAllocateMemoryPages (unsigned bytes)
|
|||
return NULL;
|
||||
return where;
|
||||
#else
|
||||
#if HAVE_VALLOC
|
||||
#ifdef HAVE_VALLOC
|
||||
where = valloc (bytes);
|
||||
#else
|
||||
where = malloc (bytes);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSFileHandle.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <base/preface.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@
|
|||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_POLL_H
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
@ -62,7 +62,7 @@ static NSDate *theFuture = nil;
|
|||
|
||||
extern BOOL GSCheckTasks();
|
||||
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
typedef struct {
|
||||
int limit;
|
||||
short *index;
|
||||
|
@ -396,7 +396,7 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
NSMapTable *_wfdMap;
|
||||
int fairStart; // For trying to ensure fair handling.
|
||||
BOOL completed; // To mark operation as completed.
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
int pollfds_capacity;
|
||||
int pollfds_count;
|
||||
struct pollfd *pollfds;
|
||||
|
@ -431,7 +431,7 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
{
|
||||
NSFreeMapTable(_wfdMap);
|
||||
}
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
if (pollfds != 0)
|
||||
{
|
||||
objc_free(pollfds);
|
||||
|
@ -515,7 +515,7 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
return self;
|
||||
}
|
||||
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
|
||||
static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
||||
{
|
||||
|
@ -1619,7 +1619,7 @@ if (0) {
|
|||
_contextMap = NSCreateMapTable (NSNonRetainedObjectMapKeyCallBacks,
|
||||
NSObjectMapValueCallBacks, 0);
|
||||
_timedPerformers = [[NSMutableArray alloc] initWithCapacity: 8];
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
_extra = objc_malloc(sizeof(pollextra));
|
||||
memset(_extra, '\0', sizeof(pollextra));
|
||||
#endif
|
||||
|
@ -1635,7 +1635,7 @@ if (0) {
|
|||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
if (_extra != 0)
|
||||
{
|
||||
pollextra *e = (pollextra*)_extra;
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#include <base/GSFormat.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
@ -262,7 +262,7 @@ static NSRange highSurrogateRange = {0xD800, 1024};
|
|||
static NSRange lowSurrogateRange = {0xDC00, 1024};
|
||||
|
||||
|
||||
#if HAVE_REGISTER_PRINTF_FUNCTION
|
||||
#ifdef HAVE_REGISTER_PRINTF_FUNCTION
|
||||
#include <stdio.h>
|
||||
#include <printf.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -359,7 +359,7 @@ handle_printf_atsign (FILE *stream,
|
|||
NSNonRetainedObjectMapValueCallBacks, 0);
|
||||
placeholderLock = [NSLock new];
|
||||
|
||||
#if HAVE_REGISTER_PRINTF_FUNCTION
|
||||
#ifdef HAVE_REGISTER_PRINTF_FUNCTION
|
||||
if (register_printf_function ('@',
|
||||
handle_printf_atsign,
|
||||
#if PRINTF_ATSIGN_VA_LIST
|
||||
|
@ -792,7 +792,7 @@ handle_printf_atsign (FILE *stream,
|
|||
#if defined(HAVE_VSPRINTF) || defined(HAVE_VASPRINTF)
|
||||
const char *format_cp = [format lossyCString];
|
||||
int format_len = strlen (format_cp);
|
||||
#if HAVE_VASPRINTF
|
||||
#ifdef HAVE_VASPRINTF
|
||||
char *buf;
|
||||
int printed_len = 0;
|
||||
NSString *ret;
|
||||
|
@ -2848,7 +2848,7 @@ handle_printf_atsign (FILE *stream,
|
|||
#define MAX_PATH 1024
|
||||
#endif
|
||||
char new_buf[MAX_PATH];
|
||||
#if HAVE_REALPATH
|
||||
#ifdef HAVE_REALPATH
|
||||
|
||||
if (realpath([self cString], new_buf) == 0)
|
||||
return self;
|
||||
|
@ -4048,7 +4048,7 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
|
||||
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
#include <Foundation/GSXML.h>
|
||||
|
||||
static int XML_ELEMENT_NODE;
|
||||
|
@ -4597,7 +4597,7 @@ static id parsePlItem(pldata* pld)
|
|||
return result;
|
||||
}
|
||||
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
static GSXMLNode*
|
||||
elementNode(GSXMLNode* node)
|
||||
{
|
||||
|
@ -4827,7 +4827,7 @@ nodeToObject(GSXMLNode* node)
|
|||
static void
|
||||
setupPl()
|
||||
{
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
/*
|
||||
* Cache XML node information.
|
||||
*/
|
||||
|
@ -4859,7 +4859,7 @@ GSPropertyList(NSString *string)
|
|||
unsigned length = [string length];
|
||||
NSData *d;
|
||||
id pl;
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
unsigned index = 0;
|
||||
#endif
|
||||
|
||||
|
@ -4876,7 +4876,7 @@ GSPropertyList(NSString *string)
|
|||
setupPl();
|
||||
}
|
||||
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
if (whitespaceBitmapRep == NULL)
|
||||
{
|
||||
setupWhitespace();
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
|
||||
#include <string.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
@ -53,29 +53,29 @@
|
|||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_WINDOWS_H
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_SIGNAL_H
|
||||
#ifdef HAVE_SYS_SIGNAL_H
|
||||
#include <sys/signal.h>
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_SYS_FILE_H
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
#if HAVE_SYS_FCNTL_H
|
||||
#ifdef HAVE_SYS_FCNTL_H
|
||||
#include <sys/fcntl.h>
|
||||
#endif
|
||||
#if HAVE_SYS_IOCTL_H
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
* If we are on a streams based system, we need to include stropts.h
|
||||
* for definitions needed to set up slave pseudo-terminal stream.
|
||||
*/
|
||||
#if HAVE_SYS_STROPTS_H
|
||||
#ifdef HAVE_SYS_STROPTS_H
|
||||
#include <sys/stropts.h>
|
||||
#endif
|
||||
|
||||
|
@ -139,7 +139,7 @@ pty_master(char* name, int len)
|
|||
* If we have grantpt(), assume we are using sysv-style pseudo-terminals,
|
||||
* otherwise assume bsd style.
|
||||
*/
|
||||
#if HAVE_GRANTPT
|
||||
#ifdef HAVE_GRANTPT
|
||||
master = open("/dev/ptmx", O_RDWR);
|
||||
if (master >= 0)
|
||||
{
|
||||
|
@ -194,8 +194,8 @@ pty_slave(const char* name)
|
|||
int slave;
|
||||
|
||||
slave = open(name, O_RDWR);
|
||||
#if HAVE_SYS_STROPTS_H
|
||||
#if HAVE_PTS_STREAM_MODULES
|
||||
#ifdef HAVE_SYS_STROPTS_H
|
||||
#ifdef HAVE_PTS_STREAM_MODULES
|
||||
if (slave >= 0 && isastream(slave))
|
||||
{
|
||||
if (ioctl(slave, I_PUSH, "ptem") < 0)
|
||||
|
@ -1249,7 +1249,7 @@ GSCheckTasks()
|
|||
/*
|
||||
* Make sure task is run in it's own process group.
|
||||
*/
|
||||
#if HAVE_SETPGRP
|
||||
#ifdef HAVE_SETPGRP
|
||||
#ifdef SETPGRP_VOID
|
||||
setpgrp();
|
||||
#else
|
||||
|
@ -1261,7 +1261,7 @@ GSCheckTasks()
|
|||
#else
|
||||
pid = (int)getpid();
|
||||
#endif
|
||||
#if HAVE_SETPGID
|
||||
#ifdef HAVE_SETPGID
|
||||
setpgid(pid, pid);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1276,7 +1276,7 @@ GSCheckTasks()
|
|||
exit(1); /* Failed to open slave! */
|
||||
}
|
||||
|
||||
#if HAVE_SETSID
|
||||
#ifdef HAVE_SETSID
|
||||
i = setsid();
|
||||
#endif
|
||||
#ifdef TIOCNOTTY
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <base/preface.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <Foundation/NSThread.h>
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
#include "GSPrivate.h"
|
||||
|
||||
#include <stdlib.h> // for getenv()
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> // for getlogin()
|
||||
#endif
|
||||
#if HAVE_PWD_H
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h> // for getpwnam()
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
@ -150,7 +150,7 @@ NSUserName(void)
|
|||
loginName = buf;
|
||||
#else
|
||||
loginName = getenv("LOGNAME");
|
||||
#if HAVE_GETPWNAM
|
||||
#ifdef HAVE_GETPWNAM
|
||||
/*
|
||||
* Check that LOGNAME contained legal name.
|
||||
*/
|
||||
|
@ -159,7 +159,7 @@ NSUserName(void)
|
|||
loginName = 0;
|
||||
}
|
||||
#endif /* HAVE_GETPWNAM */
|
||||
#if HAVE_GETLOGIN
|
||||
#ifdef HAVE_GETLOGIN
|
||||
/*
|
||||
* Try getlogin() if LOGNAME environmentm variable didn't work.
|
||||
*/
|
||||
|
@ -168,13 +168,13 @@ NSUserName(void)
|
|||
loginName = getlogin();
|
||||
}
|
||||
#endif /* HAVE_GETLOGIN */
|
||||
#if HAVE_GETPWUID
|
||||
#ifdef HAVE_GETPWUID
|
||||
/*
|
||||
* Try getting the name of the effective user as a last resort.
|
||||
*/
|
||||
if (loginName == 0)
|
||||
{
|
||||
#if HAVE_GETEUID
|
||||
#ifdef HAVE_GETEUID
|
||||
int uid = geteuid();
|
||||
#else
|
||||
int uid = getuid();
|
||||
|
@ -280,7 +280,7 @@ NSHomeDirectoryForUser(NSString *loginName)
|
|||
NSString *
|
||||
NSFullUserName(void)
|
||||
{
|
||||
#if HAVE_PWD_H
|
||||
#ifdef HAVE_PWD_H
|
||||
struct passwd *pw;
|
||||
|
||||
pw = getpwnam([NSUserName() cString]);
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#endif
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
@ -222,7 +222,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
[self ignoreReadDescriptor];
|
||||
[self ignoreWriteDescriptor];
|
||||
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
/*
|
||||
* The gzDescriptor should always be closed when we have done with it.
|
||||
*/
|
||||
|
@ -750,7 +750,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
d = [NSMutableData dataWithCapacity: 0];
|
||||
if (isStandardFile)
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
while ((len = gzread(gzDescriptor, buf, sizeof(buf))) > 0)
|
||||
|
@ -767,7 +767,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
if ((len = gzread(gzDescriptor, buf, sizeof(buf))) > 0)
|
||||
|
@ -801,7 +801,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
if (isNonBlocking == YES)
|
||||
[self setNonBlocking: NO];
|
||||
d = [NSMutableData dataWithCapacity: 0];
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
while ((len = gzread(gzDescriptor, buf, sizeof(buf))) > 0)
|
||||
|
@ -838,7 +838,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
|
||||
buf = NSZoneMalloc(NSDefaultMallocZone(), len);
|
||||
d = [NSMutableData dataWithBytesNoCopy: buf length: len];
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
got = gzread(gzDescriptor, [d mutableBytes], len);
|
||||
|
@ -863,7 +863,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
{
|
||||
int chunk = len > sizeof(buf) ? sizeof(buf) : len;
|
||||
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
got = gzread(gzDescriptor, buf, chunk);
|
||||
|
@ -908,7 +908,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
{
|
||||
toWrite = NETBUF_SIZE;
|
||||
}
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
rval = gzwrite(gzDescriptor, (char*)ptr+pos, toWrite);
|
||||
|
@ -1018,7 +1018,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
|
||||
if (isStandardFile && descriptor >= 0)
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
result = gzseek(gzDescriptor, 0, SEEK_CUR);
|
||||
|
@ -1042,7 +1042,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
|
||||
if (isStandardFile && descriptor >= 0)
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
result = gzseek(gzDescriptor, 0, SEEK_END);
|
||||
|
@ -1066,7 +1066,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
|
||||
if (isStandardFile && descriptor >= 0)
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
result = gzseek(gzDescriptor, (off_t)pos, SEEK_SET);
|
||||
|
@ -1096,7 +1096,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
[self ignoreWriteDescriptor];
|
||||
|
||||
[self setNonBlocking: wasNonBlocking];
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
gzclose(gzDescriptor);
|
||||
|
@ -1435,7 +1435,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
item = [readInfo objectForKey: NSFileHandleNotificationDataItem];
|
||||
length = [item length];
|
||||
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
received = gzread(gzDescriptor, buf, sizeof(buf));
|
||||
|
@ -1489,7 +1489,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
{
|
||||
int written;
|
||||
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
written = gzwrite(gzDescriptor, (char*)ptr+writePos,
|
||||
|
@ -1608,7 +1608,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
|
||||
- (BOOL) useCompression
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
int d;
|
||||
|
||||
if (gzDescriptor != 0)
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <io.h>
|
||||
|
|
|
@ -381,7 +381,7 @@ main(int argc, char **argv, char **env)
|
|||
[NSProcessInfo initializeWithArguments: argv count: argc environment: env];
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBXML == 0
|
||||
#ifdef HAVE_LIBXML == 0
|
||||
NSLog(@"ERROR: The GNUstep Base Library was built\n"
|
||||
@" without an available libxml library. Autogsdoc needs the libxml\n"
|
||||
@" library to function. Aborting");
|
||||
|
|
|
@ -84,7 +84,7 @@ Parameters:
|
|||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
#if HAVE_LIBXML
|
||||
#ifdef HAVE_LIBXML
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Reference in a new issue