FrameWorks/OmniBase.framework/Versions/Current/Headers/system.h

00001 // Copyright 1997-2005 Omni Development, Inc.  All rights reserved.
00002 //
00003 // This software may only be used and reproduced according to the
00004 // terms in the file OmniSourceLicense.html, which should be
00005 // distributed with this project and can also be found at
00006 // <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>.
00007 //
00008 // $Header: svn+ssh://source.omnigroup.com/Source/svn/Omni/tags/SourceRelease_2005-11-18/OmniGroup/Frameworks/OmniBase/system.h 68913 2005-10-03 19:36:19Z kc $
00009 //
00010 // This file contains stuff that isn't necessarily portable between operating systems.
00011 
00012 #import <OmniBase/SystemType.h> // For OBOperatingSystemMajorVersion
00013 
00014 #if defined(__APPLE__) && defined(__MACH__)
00015 //
00016 // Mac OS X
00017 //
00018 
00019 #import <libc.h>
00020 #import <stddef.h>
00021 #import <arpa/nameser.h>
00022 #import <resolv.h>
00023 #import <netdb.h>
00024 #import <sys/types.h>
00025 #import <sys/time.h>
00026 #import <sys/dir.h>
00027 #import <sys/errno.h>
00028 #import <sys/stat.h>
00029 #import <sys/uio.h>
00030 #import <sys/file.h>
00031 #import <fcntl.h>
00032 #if (OBOperatingSystemMajorVersion == 10) && !defined(MAC_OS_X_VERSION_MAX_ALLOWED)
00033 // On pre-Jaguar systems (identified using the above #if condition), <c.h> defines true and false, but so does <CarbonCore/MacTypes.h>.  We'd like <c.h>'s definition, since it actually typedefs the enum as 'bool', but unfortunately that would break the Foundation precompiled header (which prebuilds <CarbonCore/ConditionalMacros.h>), so we'll use Carbon's version instead.  Unfortunately, this means the 'bool' type won't actually be declared, since Carbon's true/false enum isn't named.  C'est la vie!
00034 #import <Carbon/Carbon.h> // defines true and false
00035 #define bool bool // So <c.h> won't try to define the 'bool' type (with true and false)
00036 // OK, now it's safe to #import <c.h>.
00037 #endif
00038 #import <c.h> // For MIN(), etc.
00039 #import <unistd.h>
00040 #import <math.h> // For floor(), etc.
00041 
00042 #import <pthread.h>
00043 
00044 #else
00045 
00046 //
00047 // Unknown system
00048 //
00049 
00050 #error Unknown system!
00051 
00052 #endif
00053 
00054 // Default to using BSD socket API.
00055 
00056 #ifndef OBSocketRead
00057 #define OBSocketRead(socketFD, buffer, byteCount) read(socketFD, buffer, byteCount)
00058 #endif
00059 #ifndef OBSocketWrite
00060 #define OBSocketWrite(socketFD, buffer, byteCount) write(socketFD, buffer, byteCount)
00061 #endif
00062 #ifndef OBSocketWriteVectors
00063 #define OBSocketWriteVectors(socketFD, buffers, bufferCount) writev(socketFD, buffers, bufferCount)
00064 #endif
00065 #ifndef OBSocketClose
00066 #define OBSocketClose(socketFD) close(socketFD)
00067 #endif

Generated on Sat Aug 26 21:14:12 2006 for MacTrek by  doxygen 1.4.7