Changeset 112 for branches/D1.0/import
- Timestamp:
- 03/09/09 18:46:55 (3 years ago)
- Files:
-
- branches/D1.0/import/core/stdc/errno.d (modified) (1 diff)
- branches/D1.0/import/core/stdc/fenv.d (modified) (2 diffs)
- branches/D1.0/import/core/stdc/math.d (modified) (1 diff)
- branches/D1.0/import/core/stdc/stdarg.d (modified) (1 diff)
- branches/D1.0/import/core/stdc/stdio.d (modified) (8 diffs)
- branches/D1.0/import/core/stdc/stdlib.d (modified) (1 diff)
- branches/D1.0/import/core/stdc/time.d (modified) (1 diff)
- branches/D1.0/import/core/sys/osx (added)
- branches/D1.0/import/core/sys/osx/mach (added)
- branches/D1.0/import/core/sys/osx/mach/kern_return.d (added)
- branches/D1.0/import/core/sys/osx/mach/thread_act.d (added)
- branches/D1.0/import/core/sys/posix/arpa/inet.d (modified) (2 diffs)
- branches/D1.0/import/core/sys/posix/dirent.d (modified) (2 diffs)
- branches/D1.0/import/core/sys/posix/dlfcn.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/fcntl.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/net/if_.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/netinet/in_.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/netinet/tcp.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/poll.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/pthread.d (modified) (6 diffs)
- branches/D1.0/import/core/sys/posix/pwd.d (modified) (3 diffs)
- branches/D1.0/import/core/sys/posix/sched.d (modified) (4 diffs)
- branches/D1.0/import/core/sys/posix/semaphore.d (modified) (2 diffs)
- branches/D1.0/import/core/sys/posix/signal.d (modified) (5 diffs)
- branches/D1.0/import/core/sys/posix/stdlib.d (modified) (3 diffs)
- branches/D1.0/import/core/sys/posix/sys/ipc.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/sys/mman.d (modified) (8 diffs)
- branches/D1.0/import/core/sys/posix/sys/select.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/sys/shm.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/sys/socket.d (modified) (5 diffs)
- branches/D1.0/import/core/sys/posix/sys/stat.d (modified) (2 diffs)
- branches/D1.0/import/core/sys/posix/sys/time.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/sys/types.d (modified) (5 diffs)
- branches/D1.0/import/core/sys/posix/sys/uio.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/sys/wait.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/termios.d (modified) (1 diff)
- branches/D1.0/import/core/sys/posix/time.d (modified) (5 diffs)
- branches/D1.0/import/core/sys/posix/unistd.d (modified) (2 diffs)
- branches/D1.0/import/core/sys/posix/utime.d (modified) (1 diff)
- branches/D1.0/import/core/sys/windows/windows.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/D1.0/import/core/stdc/errno.d
r36 r112 196 196 const ENOTRECOVERABLE = 131; // State not recoverable 197 197 } 198 else version( darwin)198 else version( OSX ) 199 199 { 200 200 const EPERM = 1; // Operation not permitted branches/D1.0/import/core/stdc/fenv.d
r36 r112 43 43 alias int fexcept_t; 44 44 } 45 else version ( darwin)45 else version ( OSX ) 46 46 { 47 47 version ( BigEndian ) … … 106 106 fenv_t* FE_DFL_ENV = cast(fenv_t*)(-1); 107 107 } 108 else version( darwin)108 else version( OSX ) 109 109 { 110 110 private extern fenv_t _FE_DFL_ENV; branches/D1.0/import/core/stdc/math.d
r36 r112 265 265 } 266 266 } 267 else version( darwin)267 else version( OSX ) 268 268 { 269 269 enum branches/D1.0/import/core/stdc/stdarg.d
r36 r112 10 10 11 11 12 version( GNU ) 12 alias void* va_list; 13 14 template va_start( T ) 13 15 { 14 public import std.c.stdarg; 15 } 16 else 17 { 18 alias void* va_list; 19 20 template va_start( T ) 16 void va_start( out va_list ap, inout T parmn ) 21 17 { 22 void va_start( out va_list ap, inout T parmn ) 23 { 24 ap = cast(va_list) ( cast(void*) &parmn + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 25 } 26 } 27 28 template va_arg( T ) 29 { 30 T va_arg( inout va_list ap ) 31 { 32 T arg = *cast(T*) ap; 33 ap = cast(va_list) ( cast(void*) ap + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 34 return arg; 35 } 36 } 37 38 void va_end( va_list ap ) 39 { 40 41 } 42 43 void va_copy( out va_list dest, va_list src ) 44 { 45 dest = src; 18 ap = cast(va_list) ( cast(void*) &parmn + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 46 19 } 47 20 } 21 22 template va_arg( T ) 23 { 24 T va_arg( inout va_list ap ) 25 { 26 T arg = *cast(T*) ap; 27 ap = cast(va_list) ( cast(void*) ap + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 28 return arg; 29 } 30 } 31 32 void va_end( va_list ap ) 33 { 34 35 } 36 37 void va_copy( out va_list dest, va_list src ) 38 { 39 dest = src; 40 } branches/D1.0/import/core/stdc/stdio.d
r36 r112 20 20 version( Windows ) 21 21 { 22 const int BUFSIZ = 0x4000; 23 const int EOF = -1; 24 const int FOPEN_MAX = 20; 25 const int FILENAME_MAX = 256; // 255 plus NULL 26 const int TMP_MAX = 32767; 27 const int _SYS_OPEN = 20; 28 const int SYS_OPEN = _SYS_OPEN; 22 enum 23 { 24 BUFSIZ = 0x4000, 25 EOF = -1, 26 FOPEN_MAX = 20, 27 FILENAME_MAX = 256, // 255 plus NULL 28 TMP_MAX = 32767, 29 _SYS_OPEN = 20, 30 SYS_OPEN = _SYS_OPEN 31 } 29 32 30 33 const int _NFILE = 60; … … 35 38 else version( linux ) 36 39 { 37 //const int BUFSIZ = 0x4000; 38 const int EOF = -1; 39 const int FOPEN_MAX = 16; 40 const int FILENAME_MAX = 4095; 41 const int TMP_MAX = 238328; 42 const int L_tmpnam = 20; 43 } 44 else version( darwin ) 45 { 46 const int EOF = -1; 47 const int FOPEN_MAX = 20; 48 const int FILENAME_MAX = 1024; 49 const int TMP_MAX = 308915776; 50 const int L_tmpnam = 1024; 40 enum 41 { 42 //BUFSIZ = 0x4000, 43 EOF = -1, 44 FOPEN_MAX = 16, 45 FILENAME_MAX = 4095, 46 TMP_MAX = 238328, 47 L_tmpnam = 20 48 } 49 } 50 else version( OSX ) 51 { 52 enum 53 { 54 EOF = -1, 55 FOPEN_MAX = 20, 56 FILENAME_MAX = 1024, 57 TMP_MAX = 308915776, 58 L_tmpnam = 1024, 59 } 51 60 52 61 private … … 66 75 else version ( freebsd ) 67 76 { 68 const int EOF = -1; 69 const int FOPEN_MAX = 20; 70 const int FILENAME_MAX = 1024; 71 const int TMP_MAX = 308915776; 72 const int L_tmpnam = 1024; 77 enum 78 { 79 EOF = -1, 80 FOPEN_MAX = 20, 81 FILENAME_MAX = 1024, 82 TMP_MAX = 308915776, 83 L_tmpnam = 1024 84 } 73 85 74 86 private … … 133 145 void* _lock; 134 146 } 135 else version( darwin)147 else version( OSX ) 136 148 { 137 149 ubyte* _p; … … 231 243 extern void function() _fcloseallp; 232 244 233 version (GNU) 234 { 235 extern FILE[_NFILE]* _imp___iob; 236 237 auto FILE* stdin; 238 auto FILE* stdout; 239 auto FILE* stderr; 240 auto FILE* stdaux; 241 auto FILE* stdprn; 242 243 static this() 244 { 245 stdin = &(*_imp___iob)[0]; 246 stdout = &(*_imp___iob)[1]; 247 stderr = &(*_imp___iob)[2]; 248 stdaux = &(*_imp___iob)[3]; 249 stdprn = &(*_imp___iob)[4]; 250 } 251 } 252 else 253 { 254 extern FILE[_NFILE] _iob; 255 256 auto FILE* stdin = &_iob[0]; 257 auto FILE* stdout = &_iob[1]; 258 auto FILE* stderr = &_iob[2]; 259 auto FILE* stdaux = &_iob[3]; 260 auto FILE* stdprn = &_iob[4]; 261 } 245 extern FILE[_NFILE] _iob; 246 247 auto FILE* stdin = &_iob[0]; 248 auto FILE* stdout = &_iob[1]; 249 auto FILE* stderr = &_iob[2]; 250 auto FILE* stdaux = &_iob[3]; 251 auto FILE* stdprn = &_iob[4]; 262 252 } 263 253 else version( linux ) … … 274 264 extern FILE* stderr; 275 265 } 276 else version( darwin)266 else version( OSX ) 277 267 { 278 268 extern FILE* __stdinp; … … 280 270 extern FILE* __stderrp; 281 271 282 auto FILE* stdin; 283 auto FILE* stdout; 284 auto FILE* stderr; 285 286 static this() 287 { 288 stdin = __stdinp; 289 stdout = __stdoutp; 290 stderr = __stderrp; 291 } 272 alias __stdinp stdin; 273 alias __stdoutp stdout; 274 alias __stderrp stderr; 292 275 } 293 276 else version( freebsd ) … … 386 369 int vsnprintf(char* s, size_t n, in char* format, va_list arg); 387 370 } 388 else version( darwin)371 else version( OSX ) 389 372 { 390 373 void rewind(FILE*); branches/D1.0/import/core/stdc/stdlib.d
r36 r112 95 95 void* alloca(size_t size); 96 96 } 97 else version( GNU )98 {99 private import gcc.builtins;100 alias gcc.builtins.__builtin_alloca alloca;101 }branches/D1.0/import/core/stdc/time.d
r36 r112 54 54 clock_t CLOCKS_PER_SEC = 1000; 55 55 } 56 else version( darwin)56 else version( OSX ) 57 57 { 58 58 clock_t CLOCKS_PER_SEC = 100; branches/D1.0/import/core/sys/posix/arpa/inet.d
r36 r112 62 62 int inet_pton(int, in char*, void*); 63 63 } 64 else version( darwin)64 else version( OSX ) 65 65 { 66 66 alias uint16_t in_port_t; // TODO: verify … … 118 118 const INET6_ADDRSTRLEN = 46; 119 119 } 120 else version( darwin)120 else version( OSX ) 121 121 { 122 122 const INET6_ADDRSTRLEN = 46; branches/D1.0/import/core/sys/posix/dirent.d
r40 r112 72 72 } 73 73 } 74 else version( darwin)74 else version( OSX ) 75 75 { 76 76 enum … … 175 175 } 176 176 } 177 else version( darwin)177 else version( OSX ) 178 178 { 179 179 int readdir_r(DIR*, dirent*, dirent**); branches/D1.0/import/core/sys/posix/dlfcn.d
r36 r112 40 40 void* dlsym(void*, in char*); 41 41 } 42 else version( darwin)42 else version( OSX ) 43 43 { 44 44 const RTLD_LAZY = 0x00001; branches/D1.0/import/core/sys/posix/fcntl.d
r36 r112 134 134 } 135 135 } 136 else version( darwin)136 else version( OSX ) 137 137 { 138 138 const F_DUPFD = 0; branches/D1.0/import/core/sys/posix/net/if_.d
r36 r112 46 46 void if_freenameindex(if_nameindex_t*); 47 47 } 48 else version( darwin)48 else version( OSX ) 49 49 { 50 50 struct if_nameindex_t branches/D1.0/import/core/sys/posix/netinet/in_.d
r36 r112 84 84 const uint INADDR_BROADCAST = 0xffffffff; 85 85 } 86 else version( darwin)86 else version( OSX ) 87 87 { 88 88 private const __SOCK_SIZE__ = 16; branches/D1.0/import/core/sys/posix/netinet/tcp.d
r36 r112 24 24 const TCP_NODELAY = 1; 25 25 } 26 else version( darwin)26 else version( OSX ) 27 27 { 28 28 const TCP_NODELAY = 1; branches/D1.0/import/core/sys/posix/poll.d
r36 r112 64 64 int poll(pollfd*, nfds_t, int); 65 65 } 66 else version( darwin)66 else version( OSX ) 67 67 { 68 68 struct pollfd branches/D1.0/import/core/sys/posix/pthread.d
r36 r112 124 124 } 125 125 } 126 else version( darwin)126 else version( OSX ) 127 127 { 128 128 enum … … 204 204 } 205 205 } 206 else version( darwin)206 else version( OSX ) 207 207 { 208 208 alias void function(void*) _pthread_cleanup_routine; … … 371 371 int pthread_setconcurrency(int); 372 372 } 373 else version( darwin)373 else version( OSX ) 374 374 { 375 375 const PTHREAD_MUTEX_NORMAL = 0; … … 432 432 int pthread_rwlock_timedwrlock(pthread_rwlock_t*, in timespec*); 433 433 } 434 else version( darwin)434 else version( OSX ) 435 435 { 436 436 int pthread_mutex_timedlock(pthread_mutex_t*, timespec*); … … 491 491 //int pthread_setschedprio(pthread_t, int); 492 492 } 493 else version( darwin)493 else version( OSX ) 494 494 { 495 495 enum … … 549 549 int pthread_attr_setstacksize(pthread_attr_t*, size_t); 550 550 } 551 else version( darwin)551 else version( OSX ) 552 552 { 553 553 int pthread_attr_getstack(in pthread_attr_t*, void**, size_t*); branches/D1.0/import/core/sys/posix/pwd.d
r36 r112 44 44 } 45 45 } 46 else version( darwin)46 else version( OSX ) 47 47 { 48 48 struct passwd … … 94 94 int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**); 95 95 } 96 else version( darwin)96 else version( OSX ) 97 97 { 98 98 int getpwnam_r(in char*, passwd*, char*, size_t, passwd**); … … 119 119 void setpwent(); 120 120 } 121 else version ( darwin)121 else version ( OSX ) 122 122 { 123 123 void endpwent(); branches/D1.0/import/core/sys/posix/sched.d
r36 r112 51 51 //SCHED_SPORADIC (SS|TSP) 52 52 } 53 else version( darwin)53 else version( OSX ) 54 54 { 55 55 const SCHED_OTHER = 1; 56 56 const SCHED_FIFO = 4; 57 57 const SCHED_RR = 2; 58 // SCHED_SPORADIC seems to be unavailable58 //SCHED_SPORADIC (SS|TSP) 59 59 60 60 private const __SCHED_PARAM_SIZE__ = 4; … … 62 62 struct sched_param 63 63 { 64 int sched_priority;65 byte[__ SCHED_PARAM_SIZE__]opaque;64 int sched_priority; 65 byte[__PTHREAD_MUTEX_SIZE__] __opaque; 66 66 } 67 67 } … … 95 95 int sched_yield(); 96 96 } 97 else version( darwin)97 else version( OSX ) 98 98 { 99 99 int sched_yield(); … … 119 119 int sched_rr_get_interval(pid_t, timespec*); 120 120 } 121 else version( darwin)121 else version( OSX ) 122 122 { 123 123 int sched_get_priority_min(int); branches/D1.0/import/core/sys/posix/semaphore.d
r36 r112 51 51 const SEM_FAILED = cast(sem_t*) null; 52 52 } 53 else version( darwin)53 else version( OSX ) 54 54 { 55 55 alias int sem_t; … … 88 88 int sem_timedwait(sem_t*, in timespec*); 89 89 } 90 else version( darwin)90 else version( OSX ) 91 91 { 92 92 int sem_timedwait(sem_t*, in timespec*); branches/D1.0/import/core/sys/posix/signal.d
r36 r112 125 125 const SIGURG = 23; 126 126 } 127 else version( darwin)127 else version( OSX ) 128 128 { 129 129 //SIGABRT (defined in core.stdc.signal) … … 191 191 int sa_flags; 192 192 193 version( darwin) {} else {193 version( OSX ) {} else { 194 194 void function() sa_restorer; 195 195 } … … 377 377 int sigwait(in sigset_t*, int*); 378 378 } 379 else version( darwin)379 else version( OSX ) 380 380 { 381 381 //SIG_HOLD … … 720 720 } 721 721 } 722 else version( darwin)722 else version( OSX ) 723 723 { 724 724 struct timespec … … 827 827 int pthread_sigmask(int, in sigset_t*, sigset_t*); 828 828 } 829 else version( darwin)829 else version( OSX ) 830 830 { 831 831 int pthread_kill(pthread_t, int); branches/D1.0/import/core/sys/posix/stdlib.d
r36 r112 95 95 void* valloc(size_t); // LEGACY non-standard 96 96 } 97 else version( darwin)97 else version( OSX ) 98 98 { 99 99 int setenv(in char*, in char*, int); … … 121 121 int rand_r(uint*); 122 122 } 123 else version( darwin)123 else version( OSX ) 124 124 { 125 125 int rand_r(uint*); … … 224 224 } 225 225 } 226 else version( darwin)226 else version( OSX ) 227 227 { 228 228 //WNOHANG (defined in core.sys.posix.sys.wait) branches/D1.0/import/core/sys/posix/sys/ipc.d
r36 r112 69 69 key_t ftok(in char*, int); 70 70 } 71 else version( darwin)71 else version( OSX ) 72 72 { 73 73 branches/D1.0/import/core/sys/posix/sys/mman.d
r36 r112 41 41 const POSIX_MADV_DONTNEED = 4; 42 42 } 43 else version( darwin)43 else version( OSX ) 44 44 { 45 45 const POSIX_MADV_NORMAL = 0; … … 75 75 const PROT_EXEC = 0x4; 76 76 } 77 else version( darwin)77 else version( OSX ) 78 78 { 79 79 const PROT_NONE = 0x00; … … 113 113 } 114 114 } 115 else version( darwin)115 else version( OSX ) 116 116 { 117 117 void* mmap(void*, size_t, int, int, int, off_t); … … 158 158 int msync(void*, size_t, int); 159 159 } 160 else version( darwin)160 else version( OSX ) 161 161 { 162 162 const MAP_SHARED = 0x0001; … … 209 209 210 210 } 211 else version( darwin)211 else version( OSX ) 212 212 { 213 213 const MCL_CURRENT = 0x0001; … … 239 239 int munlock(in void*, size_t); 240 240 } 241 else version( darwin)241 else version( OSX ) 242 242 { 243 243 int mlock(in void*, size_t); … … 257 257 */ 258 258 259 version( darwin)259 version( OSX ) 260 260 { 261 261 int mprotect(void*, size_t, int); … … 279 279 int shm_unlink(in char*); 280 280 } 281 else version( darwin)281 else version( OSX ) 282 282 { 283 283 int shm_open(in char*, int, mode_t); branches/D1.0/import/core/sys/posix/sys/select.d
r36 r112 122 122 int select(int, fd_set*, fd_set*, fd_set*, timeval*); 123 123 } 124 else version( darwin)124 else version( OSX ) 125 125 { 126 126 private branches/D1.0/import/core/sys/posix/sys/shm.d
r36 r112 106 106 int shmget(key_t, size_t, int); 107 107 } 108 else version( darwin)108 else version( OSX ) 109 109 { 110 110 branches/D1.0/import/core/sys/posix/sys/socket.d
r36 r112 283 283 int socketpair(int, int, int, int[2]); 284 284 } 285 else version( darwin)285 else version( OSX ) 286 286 { 287 287 alias uint socklen_t; … … 376 376 SO_RCVLOWAT = 0x1004, 377 377 SO_RCVTIMEO = 0x1006, 378 SO_REUSEADDR = 0x 1006,378 SO_REUSEADDR = 0x0004, 379 379 SO_SNDBUF = 0x1001, 380 380 SO_SNDLOWAT = 0x1003, … … 527 527 SO_RCVLOWAT = 0x1004, 528 528 SO_RCVTIMEO = 0x1006, 529 SO_REUSEADDR = 0x 1006,529 SO_REUSEADDR = 0x0004, 530 530 SO_SNDBUF = 0x1001, 531 531 SO_SNDLOWAT = 0x1003, … … 598 598 } 599 599 } 600 else version( darwin)600 else version( OSX ) 601 601 { 602 602 enum … … 627 627 } 628 628 } 629 else version( darwin)629 else version( OSX ) 630 630 { 631 631 enum branches/D1.0/import/core/sys/posix/sys/stat.d
r36 r112 176 176 } 177 177 } 178 else version( darwin)178 else version( OSX ) 179 179 { 180 180 struct stat_t … … 384 384 int mknod(in char*, mode_t, dev_t); 385 385 } 386 else version( darwin)386 else version( OSX ) 387 387 { 388 388 const S_IFMT = 0170000; branches/D1.0/import/core/sys/posix/sys/time.d
r36 r112 66 66 int utimes(in char*, in timeval[2]); // LEGACY 67 67 } 68 else version( darwin)68 else version( OSX ) 69 69 { 70 70 struct timeval branches/D1.0/import/core/sys/posix/sys/types.d
r36 r112 60 60 alias uint uid_t; 61 61 } 62 else version( darwin)62 else version( OSX ) 63 63 { 64 64 alias long blkcnt_t; … … 125 125 alias uint useconds_t; 126 126 } 127 else version( darwin)127 else version( OSX ) 128 128 { 129 129 //clock_t … … 248 248 alias c_ulong pthread_t; 249 249 } 250 else version( darwin ) 251 { 252 private 253 { 254 // #if defined(__LP64__) 255 // FIXME: what is LP64, is it important enough to be included? 256 version( LP64 ) 257 { 258 const __PTHREAD_SIZE__ = 1168; 259 const __PTHREAD_ATTR_SIZE__ = 56; 260 const __PTHREAD_MUTEXATTR_SIZE__ = 8; 261 const __PTHREAD_MUTEX_SIZE__ = 56; 262 const __PTHREAD_CONDATTR_SIZE__ = 8; 263 const __PTHREAD_COND_SIZE__ = 40; 264 const __PTHREAD_ONCE_SIZE__ = 8; 265 const __PTHREAD_RWLOCK_SIZE__ = 192; 266 const __PTHREAD_RWLOCKATTR_SIZE__ = 16; 267 } 268 else 269 { 270 const __PTHREAD_SIZE__ = 596; 271 const __PTHREAD_ATTR_SIZE__ = 36; 272 const __PTHREAD_MUTEXATTR_SIZE__ = 8; 273 const __PTHREAD_MUTEX_SIZE__ = 40; 274 const __PTHREAD_CONDATTR_SIZE__ = 4; 275 const __PTHREAD_COND_SIZE__ = 24; 276 const __PTHREAD_ONCE_SIZE__ = 4; 277 const __PTHREAD_RWLOCK_SIZE__ = 124; 278 const __PTHREAD_RWLOCKATTR_SIZE__ = 12; 279 } 250 else version( OSX ) 251 { 252 version( X86_64 ) 253 { 254 const __PTHREAD_SIZE__ = 1168; 255 const __PTHREAD_ATTR_SIZE__ = 56; 256 const __PTHREAD_MUTEXATTR_SIZE__ = 8; 257 const __PTHREAD_MUTEX_SIZE__ = 56; 258 const __PTHREAD_CONDATTR_SIZE__ = 8; 259 const __PTHREAD_COND_SIZE__ = 40; 260 const __PTHREAD_ONCE_SIZE__ = 8; 261 const __PTHREAD_RWLOCK_SIZE__ = 192; 262 const __PTHREAD_RWLOCKATTR_SIZE__ = 16; 263 } 264 else version( X86 ) 265 { 266 const __PTHREAD_SIZE__ = 596; 267 const __PTHREAD_ATTR_SIZE__ = 36; 268 const __PTHREAD_MUTEXATTR_SIZE__ = 8; 269 const __PTHREAD_MUTEX_SIZE__ = 40; 270 const __PTHREAD_CONDATTR_SIZE__ = 4; 271 const __PTHREAD_COND_SIZE__ = 24; 272 const __PTHREAD_ONCE_SIZE__ = 4; 273 const __PTHREAD_RWLOCK_SIZE__ = 124; 274 const __PTHREAD_RWLOCKATTR_SIZE__ = 12; 280 275 } 281 276 … … 333 328 struct pthread_rwlockattr_t 334 329 { 335 c_long __sig;330 c_long __sig; 336 331 byte[__PTHREAD_RWLOCKATTR_SIZE__] __opaque; 337 332 } … … 402 397 alias int pthread_spinlock_t; // volatile 403 398 } 404 else version( darwin)405 { 406 struct pthread_spinlock_t;399 else version( OSX ) 400 { 401 //struct pthread_spinlock_t; 407 402 } 408 403 else version( freebsd ) branches/D1.0/import/core/sys/posix/sys/uio.d
r36 r112 42 42 ssize_t writev(int, in iovec*, int); 43 43 } 44 else version( darwin)44 else version( OSX ) 45 45 { 46 46 struct iovec branches/D1.0/import/core/sys/posix/sys/wait.d
r36 r112 63 63 extern (D) int WTERMSIG( int status ) { return status & 0x7F; } 64 64 } 65 else version( darwin)65 else version( OSX ) 66 66 { 67 67 const WNOHANG = 1; branches/D1.0/import/core/sys/posix/termios.d
r36 r112 123 123 */ 124 124 125 version( darwin)125 version( OSX ) 126 126 { 127 127 alias ubyte cc_t; branches/D1.0/import/core/sys/posix/time.d
r36 r112 35 35 time_t timegm(tm*); // non-standard 36 36 } 37 else version( darwin)37 else version( OSX ) 38 38 { 39 39 time_t timegm(tm*); // non-standard … … 148 148 int timer_settime(timer_t, int, in itimerspec*, itimerspec*); 149 149 } 150 else version( darwin)150 else version( OSX ) 151 151 { 152 152 int nanosleep(in timespec*, timespec*); … … 174 174 const TIMER_ABSTIME = 0x01; 175 175 176 alias int clockid_t;176 //alias int clockid_t; 177 177 alias int timer_t; 178 178 … … 206 206 tm* localtime_r(in time_t*, tm*); 207 207 } 208 else version( darwin)208 else version( OSX ) 209 209 { 210 210 char* asctime_r(in tm*, char*); … … 236 236 version( linux ) 237 237 { 238 extern int daylight;239 extern c_long timezone;238 extern int daylight; 239 extern c_long timezone; 240 240 241 241 tm* getdate(in char*); 242 242 char* strptime(in char*, in char*, tm*); 243 243 } 244 else version( darwin)244 else version( OSX ) 245 245 { 246 246 extern c_long timezone; branches/D1.0/import/core/sys/posix/unistd.d
r36 r112 429 429 } 430 430 } 431 else version( darwin)431 else version( OSX ) 432 432 { 433 433 const F_OK = 0; … … 543 543 } 544 544 } 545 else version (darwin)545 else version( OSX ) 546 546 { 547 547 char* crypt(in char*, in char*); branches/D1.0/import/core/sys/posix/utime.d
r36 r112 37 37 int utime(in char*, in utimbuf*); 38 38 } 39 else version( darwin)39 else version( OSX ) 40 40 { 41 41 struct utimbuf branches/D1.0/import/core/sys/windows/windows.d
r36 r112 2887 2887 enum : uint 2888 2888 { 2889 INFINITE = uint.max, 2890 WAIT_OBJECT_0 = 0, 2889 INFINITE = uint.max, 2890 WAIT_OBJECT_0 = 0, 2891 WAIT_ABANDONED_0 = 0x80, 2892 WAIT_TIMEOUT = 0x102, 2893 WAIT_IO_COMPLETION = 0xc0, 2894 WAIT_ABANDONED = 0x80, 2895 WAIT_FAILED = uint.max, 2891 2896 } 2892 2897
