Commits

fearog committed 6760a1b

Backpedaling: nacl is clearly a whole new platform.

Comments (0)

Files changed (23)

d/druntime/core/sys/posix/arpa/inet.d

     const(char)*    inet_ntop(int, in void*, char*, socklen_t);
     int             inet_pton(int, in char*, void*);
 }
-else version( nacl )
-{
-	// TWTODO
-    alias uint16_t in_port_t;
-    alias uint32_t in_addr_t;
-
-    struct in_addr
-    {
-        in_addr_t s_addr;
-    }
-
-    enum INET_ADDRSTRLEN = 16;
-
-    uint32_t htonl(uint32_t);
-    uint16_t htons(uint16_t);
-    uint32_t ntohl(uint32_t);
-    uint16_t ntohs(uint16_t);
-
-    in_addr_t inet_addr(in char*);
-    char*     inet_ntoa(in_addr);
-    char*     inet_ntop(int, in void*, char*, socklen_t);
-    int       inet_pton(int, in char*, void*);
-}
 
 //
 // IPV6 (IP6)
 {
     enum INET6_ADDRSTRLEN = 46;
 }
-else version( nacl )
-{
-	// TWTODO
-    enum INET6_ADDRSTRLEN = 46;
-}

d/druntime/core/sys/posix/config.d

     enum bool  __USE_FILE_OFFSET64  = __USE_LARGEFILE64;
     enum bool  __REDIRECT           = false;
 }
-else version( nacl )
-{
-    enum bool  __USE_LARGEFILE64    = true;
-    enum bool  __USE_FILE_OFFSET64  = __USE_LARGEFILE64;
-    enum bool  __REDIRECT           = false;
-}
 
 /// %% FIXME: Probably not consistent for all architectures.
 static if( size_t.sizeof == 8 )

d/druntime/core/sys/posix/dirent.d

 
     dirent* readdir(DIR*);
 }
-version( nacl )
-{
-	// TWTODO
-
-    // NOTE: The following constants are non-standard Linux definitions
-    //       for dirent.d_type.
-    enum
-    {
-        DT_UNKNOWN  = 0,
-        DT_FIFO     = 1,
-        DT_CHR      = 2,
-        DT_DIR      = 4,
-        DT_BLK      = 6,
-        DT_REG      = 8,
-        DT_LNK      = 10,
-        DT_SOCK     = 12,
-        DT_WHT      = 14
-    }
-
-    struct dirent
-    {
-        ino_t       d_ino;
-        off_t       d_off;
-        ushort      d_reclen;
-        ubyte       d_type;
-        char[256]   d_name;
-    }
-
-    struct DIR
-    {
-        // Managed by OS
-    }
-
-    static if( __USE_LARGEFILE64 )
-    {
-        dirent* readdir64(DIR*);
-        alias   readdir64 readdir;
-    }
-    else
-    {
-        dirent* readdir(DIR*);
-    }
-}
 else version( Posix )
 {
     dirent* readdir(DIR*);
 {
     int readdir_r(DIR*, dirent*, dirent**);
 }
-else version( nacl )
-{
-	// TWTODO
-	static if( __USE_LARGEFILE64 )
-	{
-		int   readdir64_r(DIR*, dirent*, dirent**);
-		alias readdir64_r readdir_r;
-	}
-	else
-	{
-		int readdir_r(DIR*, dirent*, dirent**);
-	}
-}
 
 //
 // XOpen (XSI)

d/druntime/core/sys/posix/dlfcn.d

     void* dlopen(in char*, int);
     void* dlsym(void*, in char*);
 }
-else version( nacl )
-{
-	// TWTODO
-    enum RTLD_LAZY      = 0x00001;
-    enum RTLD_NOW       = 0x00002;
-    enum RTLD_GLOBAL    = 0x00100;
-    enum RTLD_LOCAL     = 0x00000;
-
-    int   dlclose(void*);
-    char* dlerror();
-    void* dlopen(in char*, int);
-    void* dlsym(void*, in char*);
-}

d/druntime/core/sys/posix/fcntl.d

     int creat(in char*, mode_t);
     int open(in char*, int, ...);
 }
-else version( nacl )
-{
-	// TWTODO
-    enum F_DUPFD        = 0;
-    enum F_GETFD        = 1;
-    enum F_SETFD        = 2;
-    enum F_GETFL        = 3;
-    enum F_SETFL        = 4;
-  static if( __USE_FILE_OFFSET64 )
-  {
-    enum F_GETLK        = 12;
-    enum F_SETLK        = 13;
-    enum F_SETLKW       = 14;
-  }
-  else
-  {
-    enum F_GETLK        = 5;
-    enum F_SETLK        = 6;
-    enum F_SETLKW       = 7;
-  }
-    enum F_GETOWN       = 9;
-    enum F_SETOWN       = 8;
-
-    enum FD_CLOEXEC     = 1;
-
-    enum F_RDLCK        = 0;
-    enum F_UNLCK        = 2;
-    enum F_WRLCK        = 1;
-
-    enum O_CREAT        = 0100;
-    enum O_EXCL         = 0200;
-    enum O_NOCTTY       = 0400;
-    enum O_TRUNC        = 01000;
-
-    enum O_APPEND       = 02000;
-    enum O_NONBLOCK     = 04000;
-    enum O_SYNC         = 010000;
-    enum O_DSYNC        = O_SYNC;
-    enum O_RSYNC        = O_SYNC;
-
-    enum O_ACCMODE      = 0003;
-    enum O_RDONLY       = 00;
-    enum O_WRONLY       = 01;
-    enum O_RDWR         = 02;
-
-    struct flock
-    {
-        short   l_type;
-        short   l_whence;
-        off_t   l_start;
-        off_t   l_len;
-        pid_t   l_pid;
-    }
-
-    static if( __USE_LARGEFILE64 )
-    {
-        int   creat64(in char*, mode_t);
-        alias creat64 creat;
-
-        int   open64(in char*, int, ...);
-        alias open64 open;
-    }
-    else
-    {
-        int   creat(in char*, mode_t);
-        int   open(in char*, int, ...);
-    }
-}
 
 version( Posix )
 {

d/druntime/core/sys/posix/netdb.d

     enum EAI_SYSTEM         = 11;
     enum EAI_OVERFLOW       = 14;
 }
-version( nacl )
-{
-	// TWTODO 
-    struct hostent
-    {
-        char*   h_name;
-        char**  h_aliases;
-        int     h_addrtype;
-        int     h_length;
-        char**  h_addr_list;
-        char*   h_addr() { return h_addr_list[0]; } // non-standard
-    }
-
-    struct netent
-    {
-        char*   n_name;
-        char**  n_aliase;
-        int     n_addrtype;
-        uint32_t n_net;
-    }
-
-    struct protoent
-    {
-        char*   p_name;
-        char**  p_aliases;
-        int     p_proto;
-    }
-
-    struct servent
-    {
-        char*   s_name;
-        char**  s_aliases;
-        int     s_port;
-        char*   s_proto;
-    }
-
-    enum IPPORT_RESERVED = 1024;
-
-    //h_errno
-
-    enum HOST_NOT_FOUND = 1;
-    enum NO_DATA        = 4;
-    enum NO_RECOVERY    = 3;
-    enum TRY_AGAIN      = 2;
-
-    struct addrinfo
-    {
-        int         ai_flags;
-        int         ai_family;
-        int         ai_socktype;
-        int         ai_protocol;
-        socklen_t   ai_addrlen;
-        sockaddr*   ai_addr;
-        char*       ai_canonname; 
-        addrinfo*   ai_next;
-    }
-
-    enum AI_PASSIVE         = 0x1;
-    enum AI_CANONNAME       = 0x2;
-    enum AI_NUMERICHOST     = 0x4;
-    enum AI_NUMERICSERV     = 0x400;
-    enum AI_V4MAPPED        = 0x8;
-    enum AI_ALL             = 0x10;
-    enum AI_ADDRCONFIG      = 0x20;
-
-    enum NI_NOFQDN          = 4;
-    enum NI_NUMERICHOST     = 1;
-    enum NI_NAMEREQD        = 8;
-    enum NI_NUMERICSERV     = 2;
-    //enum NI_NUMERICSCOPE    = ?;
-    enum NI_DGRAM           = 16;
-    enum NI_MAXHOST         = 1025; // non-standard
-    enum NI_MAXSERV         = 32;   // non-standard
-
-    enum EAI_AGAIN          = -3;
-    enum EAI_BADFLAGS       = -1;
-    enum EAI_FAIL           = -4;
-    enum EAI_FAMILY         = -6;
-    enum EAI_MEMORY         = -10;
-    enum EAI_NONAME         = -2;
-    enum EAI_SERVICE        = -8;
-    enum EAI_SOCKTYPE       = -7;
-    enum EAI_SYSTEM         = -11;
-    enum EAI_OVERFLOW       = -12;
-}
 
 version( Posix )
 {

d/druntime/core/sys/posix/netinet/in_.d

     
     //enum INET_ADDRSTRLEN       = 16;
 }
-else version( nacl )
-{
-	// TWTODO
 
-    //alias uint16_t in_port_t;
-    //alias uint32_t in_addr_t;
-
-    //struct in_addr
-    //{
-    //    in_addr_t s_addr;
-    //}
-    
-    private enum __SOCK_SIZE__ = 16;
-
-    struct sockaddr_in
-    {
-        sa_family_t sin_family;
-        in_port_t   sin_port;
-        in_addr     sin_addr;
-
-        /* Pad to size of `struct sockaddr'. */
-        ubyte[__SOCK_SIZE__ - sa_family_t.sizeof -
-              in_port_t.sizeof - in_addr.sizeof] __pad;
-    }
-
-    enum
-    {
-        IPPROTO_IP   = 0,
-        IPPROTO_ICMP = 1,
-        IPPROTO_TCP  = 6,
-        IPPROTO_UDP  = 17
-    }
-
-    enum uint INADDR_ANY       = 0x00000000;
-    enum uint INADDR_BROADCAST = 0xffffffff;
-
-    //enum INET_ADDRSTRLEN       = 16;
-}
 
 //
 // IPV6 (IP6)
                __IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL;
     }
 }
-else version ( nacl )
-{
-	//TWTODO
 
-    struct in6_addr
-    {
-        union
-        {
-            uint8_t[16] s6_addr;
-            uint16_t[8] s6_addr16;
-            uint32_t[4] s6_addr32;
-        }
-    }
-
-    struct sockaddr_in6
-    {
-        sa_family_t sin6_family;
-        in_port_t   sin6_port;
-        uint32_t    sin6_flowinfo;
-        in6_addr    sin6_addr;
-        uint32_t    sin6_scope_id;
-    }
-
-    extern __gshared immutable in6_addr in6addr_any;
-    extern __gshared immutable in6_addr in6addr_loopback;
-
-    struct ipv6_mreq
-    {
-        in6_addr    ipv6mr_multiaddr;
-        uint        ipv6mr_interface;
-    }
-
-    enum : uint
-    {
-        IPPROTO_IPV6        = 41,
-
-        //INET6_ADDRSTRLEN    = 46,
-
-        IPV6_JOIN_GROUP     = 20,
-        IPV6_LEAVE_GROUP    = 21,
-        IPV6_MULTICAST_HOPS = 18,
-        IPV6_MULTICAST_IF   = 17,
-        IPV6_MULTICAST_LOOP = 19,
-        IPV6_UNICAST_HOPS   = 16,
-        IPV6_V6ONLY         = 26
-    }
-
-    // macros
-    extern (D) int IN6_IS_ADDR_UNSPECIFIED( in6_addr* addr )
-    {
-        return (cast(uint32_t*) addr)[0] == 0 &&
-               (cast(uint32_t*) addr)[1] == 0 &&
-               (cast(uint32_t*) addr)[2] == 0 &&
-               (cast(uint32_t*) addr)[3] == 0;
-    }
-
-    extern (D) int IN6_IS_ADDR_LOOPBACK( in6_addr* addr )
-    {
-        return (cast(uint32_t*) addr)[0] == 0  &&
-               (cast(uint32_t*) addr)[1] == 0  &&
-               (cast(uint32_t*) addr)[2] == 0  &&
-               (cast(uint32_t*) addr)[3] == htonl( 1 );
-    }
-
-    extern (D) int IN6_IS_ADDR_MULTICAST( in6_addr* addr )
-    {
-        return (cast(uint8_t*) addr)[0] == 0xff;
-    }
-
-    extern (D) int IN6_IS_ADDR_LINKLOCAL( in6_addr* addr )
-    {
-        return ((cast(uint32_t*) addr)[0] & htonl( 0xffc00000 )) == htonl( 0xfe800000 );
-    }
-
-    extern (D) int IN6_IS_ADDR_SITELOCAL( in6_addr* addr )
-    {
-        return ((cast(uint32_t*) addr)[0] & htonl( 0xffc00000 )) == htonl( 0xfec00000 );
-    }
-
-    extern (D) int IN6_IS_ADDR_V4MAPPED( in6_addr* addr )
-    {
-        return (cast(uint32_t*) addr)[0] == 0 &&
-               (cast(uint32_t*) addr)[1] == 0 &&
-               (cast(uint32_t*) addr)[2] == htonl( 0xffff );
-    }
-
-    extern (D) int IN6_IS_ADDR_V4COMPAT( in6_addr* addr )
-    {
-        return (cast(uint32_t*) addr)[0] == 0 &&
-               (cast(uint32_t*) addr)[1] == 0 &&
-               (cast(uint32_t*) addr)[2] == 0 &&
-               ntohl( (cast(uint32_t*) addr)[3] ) > 1;
-    }
-
-    extern (D) int IN6_IS_ADDR_MC_NODELOCAL( in6_addr* addr )
-    {
-        return IN6_IS_ADDR_MULTICAST( addr ) &&
-               ((cast(uint8_t*) addr)[1] & 0xf) == 0x1;
-    }
-
-    extern (D) int IN6_IS_ADDR_MC_LINKLOCAL( in6_addr* addr )
-    {
-        return IN6_IS_ADDR_MULTICAST( addr ) &&
-               ((cast(uint8_t*) addr)[1] & 0xf) == 0x2;
-    }
-
-    extern (D) int IN6_IS_ADDR_MC_SITELOCAL( in6_addr* addr )
-    {
-        return IN6_IS_ADDR_MULTICAST(addr) &&
-               ((cast(uint8_t*) addr)[1] & 0xf) == 0x5;
-    }
-
-    extern (D) int IN6_IS_ADDR_MC_ORGLOCAL( in6_addr* addr )
-    {
-        return IN6_IS_ADDR_MULTICAST( addr) &&
-               ((cast(uint8_t*) addr)[1] & 0xf) == 0x8;
-    }
-
-    extern (D) int IN6_IS_ADDR_MC_GLOBAL( in6_addr* addr )
-    {
-        return IN6_IS_ADDR_MULTICAST( addr ) &&
-               ((cast(uint8_t*) addr)[1] & 0xf) == 0xe;
-    }
-}
 
 //
 // Raw Sockets (RS)
 {
     enum uint IPPROTO_RAW = 255;
 }
-else version( nacl )
-{
-    enum uint IPPROTO_RAW = 255;
-}
+

d/druntime/core/sys/posix/netinet/tcp.d

 {
     enum TCP_NODELAY = 1;
 }
-else version( nacl )
-{
-	//TWTODO
-    enum TCP_NODELAY = 1;
-}

d/druntime/core/sys/posix/pthread.d

     enum PTHREAD_COND_INITIALIZER               = null;
     enum PTHREAD_RWLOCK_INITIALIZER             = null;
 }
-else version( nacl )
-{
-	// TWTODO 
-    enum
-    {
-        PTHREAD_CANCEL_ENABLE,
-        PTHREAD_CANCEL_DISABLE
-    }
-
-    enum
-    {
-        PTHREAD_CANCEL_DEFERRED,
-        PTHREAD_CANCEL_ASYNCHRONOUS
-    }
-
-    enum PTHREAD_CANCELED = cast(void*) -1;
-
-    //enum pthread_mutex_t PTHREAD_COND_INITIALIZER = { __LOCK_ALT_INITIALIZER, 0, "", 0 };
-
-    enum
-    {
-        PTHREAD_CREATE_JOINABLE,
-        PTHREAD_CREATE_DETACHED
-    }
-
-    enum
-    {
-        PTHREAD_INHERIT_SCHED,
-        PTHREAD_EXPLICIT_SCHED
-    }
-
-    //enum pthread_mutex_t PTHREAD_MUTEX_INITIALIZER = { 0, 0, null, PTHREAD_MUTEX_NORMAL, { 0, 0 } };
-
-    enum PTHREAD_ONCE_INIT = pthread_once_t.init;
-
-    enum
-    {
-        PTHREAD_PROCESS_PRIVATE,
-        PTHREAD_PROCESS_SHARED
-    }
-}
 
 version( Posix )
 {
     void __pthread_cleanup_push_imp(_pthread_cleanup_routine, void*, _pthread_cleanup_info*);
     void __pthread_cleanup_pop_imp(int);
 }
-else version( nacl )
-{
-	// TWTODO
-    alias void function(void*) _pthread_cleanup_routine;
-
-    struct _pthread_cleanup_buffer
-    {
-        _pthread_cleanup_routine    __routine;
-        void*                       __arg;
-        int                         __canceltype;
-        _pthread_cleanup_buffer*    __prev;
-    }
-
-    void _pthread_cleanup_push(_pthread_cleanup_buffer*, _pthread_cleanup_routine, void*);
-    void _pthread_cleanup_pop(_pthread_cleanup_buffer*, int);
-
-    struct pthread_cleanup
-    {
-        _pthread_cleanup_buffer buffer = void;
-
-        void push()( _pthread_cleanup_routine routine, void* arg )
-        {
-            _pthread_cleanup_push( &buffer, routine, arg );
-        }
-
-        void pop()( int execute )
-        {
-            _pthread_cleanup_pop( &buffer, execute );
-        }
-    }
-}
 else version( Posix )
 {
     void pthread_cleanup_push(void function(void*), void*);
     int pthread_mutexattr_settype(pthread_mutexattr_t*, int);
     int pthread_setconcurrency(int);
 }
-else version( nacl )
-{
-	// TWTODO
-    enum PTHREAD_MUTEX_NORMAL       = 0;
-    enum PTHREAD_MUTEX_RECURSIVE    = 1;
-    enum PTHREAD_MUTEX_ERRORCHECK   = 2;
-    enum PTHREAD_MUTEX_DEFAULT      = PTHREAD_MUTEX_NORMAL;
-
-    int pthread_attr_getguardsize(in pthread_attr_t*, size_t*);
-    int pthread_attr_setguardsize(pthread_attr_t*, size_t);
-    int pthread_getconcurrency();
-    int pthread_mutexattr_gettype(in pthread_mutexattr_t*, int*);
-    int pthread_mutexattr_settype(pthread_mutexattr_t*, int);
-    int pthread_setconcurrency(int);
-}
 
 //
 // CPU Time (TCT)
 {
     int pthread_getcpuclockid(pthread_t, clockid_t*);
 }
-else version( nacl )
-{
-	// TWTODO
-    int pthread_getcpuclockid(pthread_t, clockid_t*);
-}
 
 //
 // Timeouts (TMO)
     int pthread_rwlock_timedrdlock(pthread_rwlock_t*, in timespec*);
     int pthread_rwlock_timedwrlock(pthread_rwlock_t*, in timespec*);
 }
-else version( nacl )
-{
-	// TWTODO
-    int pthread_mutex_timedlock(pthread_mutex_t*, timespec*);
-    int pthread_rwlock_timedrdlock(pthread_rwlock_t*, in timespec*);
-    int pthread_rwlock_timedwrlock(pthread_rwlock_t*, in timespec*);
-}
 
 //
 // Priority (TPI|TPP)
     int pthread_setschedparam(pthread_t, int, sched_param*);
     //int pthread_setschedprio(pthread_t, int);
 }
-else version( nacl )
-{
-	// TWTODO
-
-    enum
-    {
-        PTHREAD_SCOPE_SYSTEM,
-        PTHREAD_SCOPE_PROCESS
-    }
-
-    int pthread_attr_getinheritsched(in pthread_attr_t*, int*);
-    int pthread_attr_getschedpolicy(in pthread_attr_t*, int*);
-    int pthread_attr_getscope(in pthread_attr_t*, int*);
-    int pthread_attr_setinheritsched(pthread_attr_t*, int);
-    int pthread_attr_setschedpolicy(pthread_attr_t*, int);
-    int pthread_attr_setscope(pthread_attr_t*, int);
-    int pthread_getschedparam(pthread_t, int*, sched_param*);
-    int pthread_setschedparam(pthread_t, int, in sched_param*);
-    //int pthread_setschedprio(pthread_t, int);
-}
 
 //
 // Stack (TSA|TSS)
     int pthread_attr_setstackaddr(pthread_attr_t*, void*);
     int pthread_attr_setstacksize(pthread_attr_t*, size_t);
 }
-else version( nacl )
-{
-    int pthread_attr_getstack(in pthread_attr_t*, void**, size_t*);
-    int pthread_attr_getstackaddr(in pthread_attr_t*, void**);
-    int pthread_attr_getstacksize(in pthread_attr_t*, size_t*);
-    int pthread_attr_setstack(pthread_attr_t*, void*, size_t);
-    int pthread_attr_setstackaddr(pthread_attr_t*, void*);
-    int pthread_attr_setstacksize(pthread_attr_t*, size_t);
-}
 
 //
 // Shared Synchronization (TSH)

d/druntime/core/sys/posix/pwd.d

         int pw_fields;      /* internal: fields filled in */
     }
 }
-else version( nacl )
-{
-    struct passwd
-    {
-        char*   pw_name;
-        char*   pw_passwd;
-        uid_t   pw_uid;
-        gid_t   pw_gid;
-        char*   pw_gecos;
-        char*   pw_dir;
-        char*   pw_shell;
-    }
-}
 
 version( Posix )
 {

d/druntime/core/sys/posix/sched.d

     enum SCHED_OTHER    = 2;
     enum SCHED_RR       = 3;
 }
-else version( nacl )
-{
-	// TWTODO
-    struct sched_param
-    {
-        int sched_priority;
-    }
-
-    enum SCHED_OTHER    = 0;
-    enum SCHED_FIFO     = 1;
-    enum SCHED_RR       = 2;
-    //SCHED_SPORADIC (SS|TSP)
-}
 
 version( Posix )
 {
 {
     int sched_yield();
 }
-else version( nacl )
-{
-    int sched_yield();
-}
 
 //
 // Scheduling (TPS)
     int sched_get_priority_max(int);
     int sched_rr_get_interval(pid_t, timespec*);
 }
-else version( nacl )
-{
-    int sched_get_priority_max(int);
-    int sched_get_priority_min(int);
-    int sched_rr_get_interval(pid_t, timespec*);
-}
-

d/druntime/core/sys/posix/semaphore.d

 
     enum SEM_FAILED = cast(sem_t*) null;
 }
-else version( nacl )
-{
-	// TWTODO
-    private alias int __atomic_lock_t;
-
-    private struct _pthread_fastlock
-    {
-      c_long            __status;
-      __atomic_lock_t   __spinlock;
-    }
-
-    struct sem_t
-    {
-      _pthread_fastlock __sem_lock;
-      int               __sem_value;
-      void*             __sem_waiting;
-    }
-
-    enum SEM_FAILED = cast(sem_t*) null;
-}
 
 version( Posix )
 {
 {
     int sem_timedwait(sem_t*, in timespec*);
 }
-else version( nacl )
-{
-	// TWTODO
-    int sem_timedwait(sem_t*, in timespec*);
-}
-

d/druntime/core/sys/posix/signal.d

     enum SIGUSR2    = 31;
     enum SIGURG     = 16;
 }
-else version( nacl )
-{
-	// TWTODO: Update this for reals
-
-    //SIGABRT (defined in core.stdc.signal)
-    enum SIGALRM    = 14;
-    enum SIGBUS     = 7;
-    enum SIGCHLD    = 17;
-    enum SIGCONT    = 18;
-    //SIGFPE (defined in core.stdc.signal)
-    enum SIGHUP     = 1;
-    //SIGILL (defined in core.stdc.signal)
-    //SIGINT (defined in core.stdc.signal)
-    enum SIGKILL    = 9;
-    enum SIGPIPE    = 13;
-    enum SIGQUIT    = 3;
-    //SIGSEGV (defined in core.stdc.signal)
-    enum SIGSTOP    = 19;
-    //SIGTERM (defined in core.stdc.signal)
-    enum SIGTSTP    = 20;
-    enum SIGTTIN    = 21;
-    enum SIGTTOU    = 22;
-    enum SIGUSR1    = 10;
-    enum SIGUSR2    = 12;
-    enum SIGURG     = 23;
-}
 
 version( FreeBSD )
 {
     int sigsuspend(in sigset_t *);
     int sigwait(in sigset_t*, int*);
 }
-else version( nacl )
-{
-	// TWTODO: Update this for reals
-    enum SIG_HOLD = cast(sigfn_t) 1;
 
-    private enum _SIGSET_NWORDS = 1024 / (8 * c_ulong.sizeof);
-
-    struct sigset_t
-    {
-        c_ulong[_SIGSET_NWORDS] __val;
-    }
-
-    // pid_t  (defined in core.sys.types)
-
-    //SIGABRT (defined in core.stdc.signal)
-    //SIGFPE  (defined in core.stdc.signal)
-    //SIGILL  (defined in core.stdc.signal)
-    //SIGINT  (defined in core.stdc.signal)
-    //SIGSEGV (defined in core.stdc.signal)
-    //SIGTERM (defined in core.stdc.signal)
-
-    enum SA_NOCLDSTOP   = 1; // (CX|XSI)
-
-    enum SIG_BLOCK      = 0;
-    enum SIG_UNBLOCK    = 1;
-    enum SIG_SETMASK    = 2;
-
-    private enum __SI_MAX_SIZE = 128;
-
-    static if( __WORDSIZE == 64 )
-    {
-        private enum __SI_PAD_SIZE = ((__SI_MAX_SIZE / int.sizeof) - 4);
-    }
-    else
-    {
-        private enum __SI_PAD_SIZE = ((__SI_MAX_SIZE / int.sizeof) - 3);
-    }
-
-    struct siginfo_t
-    {
-        int si_signo;       // Signal number
-        int si_errno;       // If non-zero, an errno value associated with
-                            // this signal, as defined in <errno.h>
-        int si_code;        // Signal code
-
-        union _sifields_t
-        {
-            int _pad[__SI_PAD_SIZE];
-
-            // kill()
-            struct _kill_t
-            {
-                pid_t si_pid; // Sending process ID
-                uid_t si_uid; // Real user ID of sending process
-            } _kill_t _kill;
-
-            // POSIX.1b timers.
-            struct _timer_t
-            {
-                int    si_tid;     // Timer ID
-                int    si_overrun; // Overrun count
-                sigval si_sigval;  // Signal value
-            } _timer_t _timer;
-
-            // POSIX.1b signals
-            struct _rt_t
-            {
-                pid_t  si_pid;    // Sending process ID
-                uid_t  si_uid;    // Real user ID of sending process
-                sigval si_sigval; // Signal value
-            } _rt_t _rt;
-
-            // SIGCHLD
-            struct _sigchild_t
-            {
-                pid_t   si_pid;    // Which child
-                uid_t   si_uid;    // Real user ID of sending process
-                int     si_status; // Exit value or signal
-                clock_t si_utime;
-                clock_t si_stime;
-            } _sigchild_t _sigchld;
-
-            // SIGILL, SIGFPE, SIGSEGV, SIGBUS
-            struct _sigfault_t
-            {
-                void*     si_addr;  // Faulting insn/memory ref
-            } _sigfault_t _sigfault;
-
-            // SIGPOLL
-            struct _sigpoll_t
-            {
-                c_long   si_band;   // Band event for SIGPOLL
-                int      si_fd;
-            } _sigpoll_t _sigpoll;
-        } _sifields_t _sifields;
-    }
-
-    enum
-    {
-        SI_ASYNCNL = -60,
-        SI_TKILL   = -6,
-        SI_SIGIO,
-        SI_ASYNCIO,
-        SI_MESGQ,
-        SI_TIMER,
-        SI_QUEUE,
-        SI_USER,
-        SI_KERNEL  = 0x80
-    }
-
-    int kill(pid_t, int);
-    int sigaction(int, in sigaction_t*, sigaction_t*);
-    int sigaddset(sigset_t*, int);
-    int sigdelset(sigset_t*, int);
-    int sigemptyset(sigset_t*);
-    int sigfillset(sigset_t*);
-    int sigismember(in sigset_t*, int);
-    int sigpending(sigset_t*);
-    int sigprocmask(int, in sigset_t*, sigset_t*);
-    int sigsuspend(in sigset_t*);
-    int sigwait(in sigset_t*, int*);
-}
 
 //
 // XOpen (XSI)
     int sigpause(int);
     int sigrelse(int);
 }
-else version( nacl )
-{
-	// TWTODO: Update this for reals
-    enum SIGPOLL        = 29;
-    enum SIGPROF        = 27;
-    enum SIGSYS         = 31;
-    enum SIGTRAP        = 5;
-    enum SIGVTALRM      = 26;
-    enum SIGXCPU        = 24;
-    enum SIGXFSZ        = 25;
-
-    enum SA_ONSTACK     = 0x08000000;
-    enum SA_RESETHAND   = 0x80000000;
-    enum SA_RESTART     = 0x10000000;
-    enum SA_SIGINFO     = 4;
-    enum SA_NOCLDWAIT   = 2;
-    enum SA_NODEFER     = 0x40000000;
-    enum SS_ONSTACK     = 1;
-    enum SS_DISABLE     = 2;
-    enum MINSIGSTKSZ    = 2048;
-    enum SIGSTKSZ       = 8192;
-
-    //ucontext_t (defined in core.sys.posix.ucontext)
-    //mcontext_t (defined in core.sys.posix.ucontext)
-
-    struct stack_t
-    {
-        void*   ss_sp;
-        int     ss_flags;
-        size_t  ss_size;
-    }
-
-    struct sigstack
-    {
-        void*   ss_sp;
-        int     ss_onstack;
-    }
-
-    enum
-    {
-        ILL_ILLOPC = 1,
-        ILL_ILLOPN,
-        ILL_ILLADR,
-        ILL_ILLTRP,
-        ILL_PRVOPC,
-        ILL_PRVREG,
-        ILL_COPROC,
-        ILL_BADSTK
-    }
-
-    enum
-    {
-        FPE_INTDIV = 1,
-        FPE_INTOVF,
-        FPE_FLTDIV,
-        FPE_FLTOVF,
-        FPE_FLTUND,
-        FPE_FLTRES,
-        FPE_FLTINV,
-        FPE_FLTSUB
-    }
-
-    enum
-    {
-        SEGV_MAPERR = 1,
-        SEGV_ACCERR
-    }
-
-    enum
-    {
-        BUS_ADRALN = 1,
-        BUS_ADRERR,
-        BUS_OBJERR
-    }
-
-    enum
-    {
-        TRAP_BRKPT = 1,
-        TRAP_TRACE
-    }
-
-    enum
-    {
-        CLD_EXITED = 1,
-        CLD_KILLED,
-        CLD_DUMPED,
-        CLD_TRAPPED,
-        CLD_STOPPED,
-        CLD_CONTINUED
-    }
-
-    enum
-    {
-        POLL_IN = 1,
-        POLL_OUT,
-        POLL_MSG,
-        POLL_ERR,
-        POLL_PRI,
-        POLL_HUP
-    }
-
-    sigfn_t bsd_signal(int sig, sigfn_t func);
-    sigfn_t sigset(int sig, sigfn_t func);
-
-    int killpg(pid_t, int);
-    int sigaltstack(in stack_t*, stack_t*);
-    int sighold(int);
-    int sigignore(int);
-    int siginterrupt(int, int);
-    int sigpause(int);
-    int sigrelse(int);
-}
 
 //
 // Timer (TMR)
         c_long  tv_nsec;
     }
 }
-else version( nacl )
-{
-	// TWTODO
-    struct timespec
-    {
-        time_t  tv_sec;
-        c_long  tv_nsec;
-    }
-}
 
 //
 // Realtime Signals (RTS)
     int sigtimedwait(in sigset_t*, siginfo_t*, in timespec*);
     int sigwaitinfo(in sigset_t*, siginfo_t*);
 }
-else version( nacl )
-{
-	// TWTODO
-
-    private enum __SIGEV_MAX_SIZE = 64;
-
-    static if( __WORDSIZE == 64 )
-    {
-        private enum __SIGEV_PAD_SIZE = ((__SIGEV_MAX_SIZE / int.sizeof) - 4);
-    }
-    else
-    {
-        private enum __SIGEV_PAD_SIZE = ((__SIGEV_MAX_SIZE / int.sizeof) - 3);
-    }
-
-    struct sigevent
-    {
-        sigval      sigev_value;
-        int         sigev_signo;
-        int         sigev_notify;
-
-        union _sigev_un_t
-        {
-            int[__SIGEV_PAD_SIZE] _pad;
-            pid_t                 _tid;
-
-            struct _sigev_thread_t
-            {
-                void function(sigval)   _function;
-                void*                   _attribute;
-            } _sigev_thread_t _sigev_thread;
-        } _sigev_un_t _sigev_un;
-    }
-
-    int sigqueue(pid_t, int, in sigval);
-    int sigtimedwait(in sigset_t*, siginfo_t*, in timespec*);
-    int sigwaitinfo(in sigset_t*, siginfo_t*);
-}
-
 //
 // Threads (THR)
 //
     int pthread_kill(pthread_t, int);
     int pthread_sigmask(int, in sigset_t*, sigset_t*);
 }
-else version( nacl )
-{
-    int pthread_kill(pthread_t, int);
-    int pthread_sigmask(int, in sigset_t*, sigset_t*);
-}
-

d/druntime/core/sys/posix/stdio.d

         FILE* tmpfile();
     }
 }
-else version( nacl )
-{
-	// TWTODO
-    static if( __USE_LARGEFILE64 )
-    {
-        int   fgetpos64(FILE*, fpos_t *);
-        alias fgetpos64 fgetpos;
-
-        FILE* fopen64(in char*, in char*);
-        alias fopen64 fopen;
-
-        FILE* freopen64(in char*, in char*, FILE*);
-        alias freopen64 freopen;
-
-        int   fseek64(FILE*, c_long, int);
-        alias fseek64 fseek;
-
-        int   fsetpos64(FILE*, in fpos_t*);
-        alias fsetpos64 fsetpos;
-
-        FILE* tmpfile64();
-        alias tmpfile64 tmpfile;
-    }
-    else
-    {
-        int   fgetpos(FILE*, fpos_t *);
-        FILE* fopen(in char*, in char*);
-        FILE* freopen(in char*, in char*, FILE*);
-        int   fseek(FILE*, c_long, int);
-        int   fsetpos(FILE*, in fpos_t*);
-        FILE* tmpfile();
-    }
-}
 
 //
 // C Extension (CX)
     int    putc_unlocked(int, FILE*);
     int    putchar_unlocked(int);
 }
-else version( nacl )
-{
-	// TWTODO
-    void   flockfile(FILE*);
-    int    ftrylockfile(FILE*);
-    void   funlockfile(FILE*);
-    int    getc_unlocked(FILE*);
-    int    getchar_unlocked();
-    int    putc_unlocked(int, FILE*);
-    int    putchar_unlocked(int);
-}
 
 //
 // XOpen (XSI)

d/druntime/core/sys/posix/stdlib.d

 
     void* valloc(size_t); // LEGACY non-standard
 }
-else version( nacl )
-{
-	// TWTODO
-    int setenv(in char*, in char*, int);
-    int unsetenv(in char*);
-
-    void* valloc(size_t); // LEGACY non-standard
-}
 
 //
 // Thread-Safe Functions (TSF)

d/druntime/core/sys/posix/sys/select.d

     int pselect(int, fd_set*, fd_set*, fd_set*, in timespec*, in sigset_t*);
     int select(int, fd_set*, fd_set*, fd_set*, timeval*);
 }
-else version( nacl )
-{
-	// TWTODO
-    private
-    {
-        alias c_long __fd_mask;
-        enum uint __NFDBITS = 8 * __fd_mask.sizeof;
-
-        extern (D) auto __FDELT( int d )
-        {
-            return d / __NFDBITS;
-        }
-
-        extern (D) auto __FDMASK( int d )
-        {
-            return cast(__fd_mask) 1 << ( d % __NFDBITS );
-        }
-    }
-
-    enum FD_SETSIZE = 1024;
-
-    struct fd_set
-    {
-        __fd_mask[FD_SETSIZE / __NFDBITS] fds_bits;
-    }
-
-    extern (D) void FD_CLR( int fd, fd_set* fdset )
-    {
-        fdset.fds_bits[__FDELT( fd )] &= ~__FDMASK( fd );
-    }
-
-    extern (D) bool FD_ISSET( int fd, const(fd_set)* fdset )
-    {
-        return (fdset.fds_bits[__FDELT( fd )] & __FDMASK( fd )) != 0;
-    }
-
-    extern (D) void FD_SET( int fd, fd_set* fdset )
-    {
-        fdset.fds_bits[__FDELT( fd )] |= __FDMASK( fd );
-    }
-
-    extern (D) void FD_ZERO( fd_set* fdset )
-    {
-        fdset.fds_bits[0 .. $] = 0;
-    }
-
-    /+
-     + GNU ASM Implementation
-     +
-    # define __FD_ZERO(fdsp)                                \
-      do {                                                  \
-        int __d0, __d1;                                     \
-        __asm__ __volatile__ ("cld; rep; stosl"             \
-                  : "=c" (__d0), "=D" (__d1)                \
-                  : "a" (0), "0" (sizeof (fd_set)           \
-                          / sizeof (__fd_mask)),            \
-                    "1" (&__FDS_BITS (fdsp)[0])             \
-                  : "memory");                              \
-      } while (0)
-
-    # define __FD_SET(fd, fdsp)                             \
-      __asm__ __volatile__ ("btsl %1,%0"                    \
-                : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])    \
-                : "r" (((int) (fd)) % __NFDBITS)            \
-                : "cc","memory")
-    # define __FD_CLR(fd, fdsp)                             \
-      __asm__ __volatile__ ("btrl %1,%0"                    \
-                : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])    \
-                : "r" (((int) (fd)) % __NFDBITS)            \
-                : "cc","memory")
-    # define __FD_ISSET(fd, fdsp)                           \
-      (__extension__                                        \
-       ({register char __result;                            \
-         __asm__ __volatile__ ("btl %1,%2 ; setcb %b0"      \
-                   : "=q" (__result)                        \
-                   : "r" (((int) (fd)) % __NFDBITS),        \
-                     "m" (__FDS_BITS (fdsp)[__FDELT (fd)])  \
-                   : "cc");                                 \
-         __result; }))
-     +/
-
-    int pselect(int, fd_set*, fd_set*, fd_set*, in timespec*, in sigset_t*);
-    int select(int, fd_set*, fd_set*, fd_set*, timeval*);
-}
 
 unittest
 {

d/druntime/core/sys/posix/sys/socket.d

     int     sockatmark(int);
     int     socketpair(int, int, int, ref int[2]);
 }
-else version( nacl )
-{
-	// TWTODO
-    alias uint   socklen_t;
-    alias ushort sa_family_t;
-
-    struct sockaddr
-    {
-        sa_family_t sa_family;
-        byte[14]    sa_data;
-    }
-
-    private enum : size_t
-    {
-        _SS_SIZE    = 128,
-        _SS_PADSIZE = _SS_SIZE - (c_ulong.sizeof * 2)
-    }
-
-    struct sockaddr_storage
-    {
-        sa_family_t ss_family;
-        c_ulong     __ss_align;
-        byte[_SS_PADSIZE] __ss_padding;
-    }
-
-    struct msghdr
-    {
-        void*     msg_name;
-        socklen_t msg_namelen;
-        iovec*    msg_iov;
-        size_t    msg_iovlen;
-        void*     msg_control;
-        size_t    msg_controllen;
-        int       msg_flags;
-    }
-
-    struct cmsghdr
-    {
-        size_t cmsg_len;
-        int    cmsg_level;
-        int    cmsg_type;
-        static if( false /* (!is( __STRICT_ANSI__ ) && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L */ )
-        {
-            ubyte[1] __cmsg_data;
-        }
-    }
-
-    enum : uint
-    {
-        SCM_RIGHTS = 0x01
-    }
-
-    static if( false /* (!is( __STRICT_ANSI__ ) && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L */ )
-    {
-        extern (D) ubyte[1] CMSG_DATA( cmsghdr* cmsg ) { return cmsg.__cmsg_data; }
-    }
-    else
-    {
-        extern (D) ubyte*   CMSG_DATA( cmsghdr* cmsg ) { return cast(ubyte*)( cmsg + 1 ); }
-    }
-
-    private cmsghdr* __cmsg_nxthdr(msghdr*, cmsghdr*);
-    alias            __cmsg_nxthdr CMSG_NXTHDR;
-
-    extern (D) size_t CMSG_FIRSTHDR( msghdr* mhdr )
-    {
-        return cast(size_t)( mhdr.msg_controllen >= cmsghdr.sizeof
-                             ? cast(cmsghdr*) mhdr.msg_control
-                             : cast(cmsghdr*) null );
-    }
-
-    struct linger
-    {
-        int l_onoff;
-        int l_linger;
-    }
-
-    enum
-    {
-        SOCK_DGRAM      = 2,
-        SOCK_SEQPACKET  = 5,
-        SOCK_STREAM     = 1
-    }
-
-    enum
-    {
-        SOL_SOCKET      = 1
-    }
-
-    enum
-    {
-        SO_ACCEPTCONN   = 30,
-        SO_BROADCAST    = 6,
-        SO_DEBUG        = 1,
-        SO_DONTROUTE    = 5,
-        SO_ERROR        = 4,
-        SO_KEEPALIVE    = 9,
-        SO_LINGER       = 13,
-        SO_OOBINLINE    = 10,
-        SO_RCVBUF       = 8,
-        SO_RCVLOWAT     = 18,
-        SO_RCVTIMEO     = 20,
-        SO_REUSEADDR    = 2,
-        SO_SNDBUF       = 7,
-        SO_SNDLOWAT     = 19,
-        SO_SNDTIMEO     = 21,
-        SO_TYPE         = 3
-    }
-
-    enum
-    {
-        SOMAXCONN       = 128
-    }
-
-    enum : uint
-    {
-        MSG_CTRUNC      = 0x08,
-        MSG_DONTROUTE   = 0x04,
-        MSG_EOR         = 0x80,
-        MSG_OOB         = 0x01,
-        MSG_PEEK        = 0x02,
-        MSG_TRUNC       = 0x20,
-        MSG_WAITALL     = 0x100
-    }
-
-    enum
-    {
-        AF_INET         = 2,
-        AF_UNIX         = 1,
-        AF_UNSPEC       = 0
-    }
-
-    enum
-    {
-        SHUT_RD,
-        SHUT_WR,
-        SHUT_RDWR
-    }
-
-    int     accept(int, sockaddr*, socklen_t*);
-    int     bind(int, in sockaddr*, socklen_t);
-    int     connect(int, in sockaddr*, socklen_t);
-    int     getpeername(int, sockaddr*, socklen_t*);
-    int     getsockname(int, sockaddr*, socklen_t*);
-    int     getsockopt(int, int, int, void*, socklen_t*);
-    int     listen(int, int);
-    ssize_t recv(int, void*, size_t, int);
-    ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*);
-    ssize_t recvmsg(int, msghdr*, int);
-    ssize_t send(int, in void*, size_t, int);
-    ssize_t sendmsg(int, in msghdr*, int);
-    ssize_t sendto(int, in void*, size_t, int, in sockaddr*, socklen_t);
-    int     setsockopt(int, int, int, in void*, socklen_t);
-    int     shutdown(int, int);
-    int     socket(int, int, int);
-    int     sockatmark(int);
-    int     socketpair(int, int, int, ref int[2]);
-}
 
 //
 // IPV6 (IP6)
         AF_INET6    = 28
     }
 }
-else version( nacl )
-{
-	// TWTODO
-    enum
-    {
-        AF_INET6    = 10
-    }
-}
 
 //
 // Raw Sockets (RS)
         SOCK_RAW    = 3
     }
 }
-else version( nacl )
-{
-    enum
-    {
-        SOCK_RAW    = 3
-    }
-}
-

d/druntime/core/sys/posix/sys/stat.d

     extern (D) bool S_ISLNK( mode_t mode )  { return S_ISTYPE( mode, S_IFLNK );  }
     extern (D) bool S_ISSOCK( mode_t mode ) { return S_ISTYPE( mode, S_IFSOCK ); }
 }
-else version( nacl )
-{
-	// TWTODO
-    static if( __USE_LARGEFILE64 )
-    {
-        private alias uint _pad_t;
-    }
-    else
-    {
-        private alias ushort _pad_t;
-    }
-
-    struct stat_t
-    {
-        dev_t       st_dev;
-        _pad_t      __pad1;
-      static if( __USE_FILE_OFFSET64 )
-      {
-        ino_t       __st_ino;
-      }
-      else
-      {
-        ino_t       st_ino;
-      }
-        mode_t      st_mode;
-        nlink_t     st_nlink;
-        uid_t       st_uid;
-        gid_t       st_gid;
-        dev_t       st_rdev;
-        _pad_t      __pad2;
-        off_t       st_size;
-        blksize_t   st_blksize;
-        blkcnt_t    st_blocks;
-      static if( false /*__USE_MISC*/ ) // true if _BSD_SOURCE || _SVID_SOURCE
-      {
-        timespec    st_atim;
-        timespec    st_mtim;
-        timespec    st_ctim;
-        alias st_atim.tv_sec st_atime;
-        alias st_mtim.tv_sec st_mtime;
-        alias st_ctim.tv_sec st_ctime;
-      }
-      else
-      {
-        time_t      st_atime;
-        c_ulong     st_atimensec;
-        time_t      st_mtime;
-        c_ulong     st_mtimensec;
-        time_t      st_ctime;
-        c_ulong     st_ctimensec;
-      }
-      static if( __USE_FILE_OFFSET64 )
-      {
-        ino_t       st_ino;
-      }
-      else
-      {
-        c_ulong     __unused4;
-        c_ulong     __unused5;
-      }
-    }
-
-    enum S_IRUSR    = 0400;
-    enum S_IWUSR    = 0200;
-    enum S_IXUSR    = 0100;
-    enum S_IRWXU    = S_IRUSR | S_IWUSR | S_IXUSR;
-
-    enum S_IRGRP    = S_IRUSR >> 3;
-    enum S_IWGRP    = S_IWUSR >> 3;
-    enum S_IXGRP    = S_IXUSR >> 3;
-    enum S_IRWXG    = S_IRWXU >> 3;
-
-    enum S_IROTH    = S_IRGRP >> 3;
-    enum S_IWOTH    = S_IWGRP >> 3;
-    enum S_IXOTH    = S_IXGRP >> 3;
-    enum S_IRWXO    = S_IRWXG >> 3;
-
-    enum S_ISUID    = 04000;
-    enum S_ISGID    = 02000;
-    enum S_ISVTX    = 01000;
-
-    private
-    {
-        extern (D) bool S_ISTYPE( mode_t mode, uint mask )
-        {
-            return ( mode & S_IFMT ) == mask;
-        }
-    }
-
-    extern (D) bool S_ISBLK( mode_t mode )  { return S_ISTYPE( mode, S_IFBLK );  }
-    extern (D) bool S_ISCHR( mode_t mode )  { return S_ISTYPE( mode, S_IFCHR );  }
-    extern (D) bool S_ISDIR( mode_t mode )  { return S_ISTYPE( mode, S_IFDIR );  }
-    extern (D) bool S_ISFIFO( mode_t mode ) { return S_ISTYPE( mode, S_IFIFO );  }
-    extern (D) bool S_ISREG( mode_t mode )  { return S_ISTYPE( mode, S_IFREG );  }
-    extern (D) bool S_ISLNK( mode_t mode )  { return S_ISTYPE( mode, S_IFLNK );  }
-    extern (D) bool S_ISSOCK( mode_t mode ) { return S_ISTYPE( mode, S_IFSOCK ); }
-
-    static if( true /*__USE_POSIX199309*/ )
-    {
-        extern bool S_TYPEISMQ( stat_t* buf )  { return false; }
-        extern bool S_TYPEISSEM( stat_t* buf ) { return false; }
-        extern bool S_TYPEISSHM( stat_t* buf ) { return false; }
-    }
-}
 
 version( Posix )
 {
     int   stat(in char*, stat_t*);
   }
 }
-else version( nacl )
-{
-	// TWTODO
-	static if( __USE_LARGEFILE64 )
-	{
-		int   fstat64(int, stat_t*);
-		alias fstat64 fstat;
-
-		int   lstat64(in char*, stat_t*);
-		alias lstat64 lstat;
-
-		int   stat64(in char*, stat_t*);
-		alias stat64 stat;
-	}
-	else
-	{
-		int   fstat(int, stat_t*);
-		int   lstat(in char*, stat_t*);
-		int   stat(in char*, stat_t*);
-	}
-}
 else version( Posix )
 {
     int   fstat(int, stat_t*);
 
     int mknod(in char*, mode_t, dev_t);
 }
-else version( nacl )
-{
-	// TWTODO 
-    enum S_IFMT     = 0170000;
-    enum S_IFBLK    = 0060000;
-    enum S_IFCHR    = 0020000;
-    enum S_IFIFO    = 0010000;
-    enum S_IFREG    = 0100000;
-    enum S_IFDIR    = 0040000;
-    enum S_IFLNK    = 0120000;
-    enum S_IFSOCK   = 0140000;
-
-    int mknod(in char*, mode_t, dev_t);
-}
-

d/druntime/core/sys/posix/sys/time.d

     int setitimer(int, in itimerval*, itimerval*);
     int utimes(in char*, ref const(timeval)[2]);
 }
-else version( nacl )
-{
-    struct timeval
-    {
-        time_t      tv_sec;
-        suseconds_t tv_usec;
-    }
-
-    struct itimerval
-    {
-        timeval it_interval;
-        timeval it_value;
-    }
-
-    enum ITIMER_REAL    = 0;
-    enum ITIMER_VIRTUAL = 1;
-    enum ITIMER_PROF    = 2;
-
-    int getitimer(int, itimerval*);
-    int gettimeofday(timeval*, void*);
-    int setitimer(int, in itimerval*, itimerval*);
-    int utimes(in char*, ref const(timeval)[2]); // LEGACY
-}
-

d/druntime/core/sys/posix/sys/types.d

     alias uint      uid_t;
     alias uint      fflags_t;
 }
-else version( nacl )
-{
-  static if( __USE_FILE_OFFSET64 )
-  {
-    alias long      blkcnt_t;
-    alias ulong     ino_t;
-    alias long      off_t;
-  }
-  else
-  {
-    alias c_long    blkcnt_t;
-    alias c_ulong   ino_t;
-    alias c_long    off_t;
-  }
-    alias c_long    blksize_t;
-    alias ulong     dev_t;
-    alias uint      gid_t;
-    alias uint      mode_t;
-    alias c_ulong   nlink_t;
-    alias int       pid_t;
-    //size_t (defined in core.stdc.stddef)
-    alias c_long    ssize_t;
-    //time_t (defined in core.stdc.time)
-    alias uint      uid_t;
-}
 
 //
 // XOpen (XSI)
     alias c_long    suseconds_t;
     alias uint      useconds_t;
 }
-else version( nacl )
-{
-  static if( __USE_FILE_OFFSET64 )
-  {
-    alias ulong     fsblkcnt_t;
-    alias ulong     fsfilcnt_t;
-  }
-  else
-  {
-    alias c_ulong   fsblkcnt_t;
-    alias c_ulong   fsfilcnt_t;
-  }
-    // clock_t (defined in core.stdc.time)
-    alias uint      id_t;
-    alias int       key_t;
-    alias c_long    suseconds_t;
-    alias uint      useconds_t;
-}
 
 //
 // Thread (THR)
     alias void* pthread_rwlockattr_t;
     alias void* pthread_t;
 }
-else version( nacl )
-{
-    version(D_LP64)
-    {
-        enum __SIZEOF_PTHREAD_ATTR_T = 56;
-        enum __SIZEOF_PTHREAD_MUTEX_T = 40;
-        enum __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
-        enum __SIZEOF_PTHREAD_COND_T = 48;
-        enum __SIZEOF_PTHREAD_CONDATTR_T = 4;
-        enum __SIZEOF_PTHREAD_RWLOCK_T = 56;
-        enum __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
-        enum __SIZEOF_PTHREAD_BARRIER_T = 32;
-        enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
-    }
-    else
-    {
-        enum __SIZEOF_PTHREAD_ATTR_T = 36;
-        enum __SIZEOF_PTHREAD_MUTEX_T = 24;
-        enum __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
-        enum __SIZEOF_PTHREAD_COND_T = 48;
-        enum __SIZEOF_PTHREAD_CONDATTR_T = 4;
-        enum __SIZEOF_PTHREAD_RWLOCK_T = 32;
-        enum __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
-        enum __SIZEOF_PTHREAD_BARRIER_T = 20;
-        enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
-    }
-
-    union pthread_attr_t
-    {
-        byte __size[__SIZEOF_PTHREAD_ATTR_T];
-        c_long __align;
-    }
-
-    private alias int __atomic_lock_t;
-
-    private struct _pthread_fastlock
-    {
-        c_long          __status;
-        __atomic_lock_t __spinlock;
-    }
-
-    private alias void* _pthread_descr;
-
-    union pthread_cond_t
-    {
-        byte __size[__SIZEOF_PTHREAD_COND_T];
-        long  __align;
-    }
-
-    union pthread_condattr_t
-    {
-        byte __size[__SIZEOF_PTHREAD_CONDATTR_T];
-        int __align;
-    }
-
-    alias uint pthread_key_t;
-
-    union pthread_mutex_t
-    {
-        byte __size[__SIZEOF_PTHREAD_MUTEX_T];
-        c_long __align;
-    }
-
-    union pthread_mutexattr_t
-    {
-        byte __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
-        int __align;
-    }
-
-    alias int pthread_once_t;
-
-    struct pthread_rwlock_t
-    {
-        byte __size[__SIZEOF_PTHREAD_RWLOCK_T];
-        c_long __align;
-    }
-
-    struct pthread_rwlockattr_t
-    {
-        byte __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
-        c_long __align;
-    }
-
-    alias c_ulong pthread_t;
-}
 
 //
 // Barrier (BAR)
     alias void* pthread_barrier_t;
     alias void* pthread_barrierattr_t;
 }
-else version( linux )
-{
-    struct pthread_barrier_t
-    {
-        byte __size[__SIZEOF_PTHREAD_BARRIER_T];
-        c_long __align;
-    }
-
-    struct pthread_barrierattr_t
-    {
-        byte __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
-        int __align;
-    }
-}
 
 //
 // Spin (SPN)
 {
     alias void* pthread_spinlock_t;
 }
-else version( linux )
-{
-    alias int pthread_spinlock_t; // volatile
-}
 
 //
 // Timer (TMR)

d/druntime/core/sys/posix/sys/uio.d

     ssize_t readv(int, in iovec*, int);
     ssize_t writev(int, in iovec*, int);
 }
-else version( nacl )
-{
-	// TWTODO
-
-    struct iovec
-    {
-        void*  iov_base;
-        size_t iov_len;
-    }
-
-    ssize_t readv(int, in iovec*, int);
-    ssize_t writev(int, in iovec*, int);
-}
-

d/druntime/core/sys/posix/time.d

 {
     pragma(msg, "no Windows support for CLOCK_MONOTONIC");
 }
-version( nacl )
-{
-	// TWTODO
-    enum CLOCK_MONOTONIC        = 1;
-    enum CLOCK_MONOTONIC_RAW    = 4; // non-standard
-    enum CLOCK_MONOTONIC_COARSE = 6; // non-standard
-}
 else
 {
     static assert(0);
     int timer_getoverrun(timer_t);
     int timer_settime(timer_t, int, in itimerspec*, itimerspec*);
 }
-else version( nacl )
-{
-	// TWTODO
-    enum CLOCK_PROCESS_CPUTIME_ID = 2;
-    enum CLOCK_THREAD_CPUTIME_ID  = 3;
 
-    // NOTE: See above for why this is commented out.
-    //
-    //struct timespec
-    //{
-    //    time_t  tv_sec;
-    //    c_long  tv_nsec;
-    //}
-
-    struct itimerspec
-    {
-        timespec it_interval;
-        timespec it_value;
-    }
-
-    enum CLOCK_REALTIME         = 0;
-    enum CLOCK_REALTIME_COARSE  = 5; // non-standard
-    enum TIMER_ABSTIME          = 0x01;
-
-    alias int clockid_t;
-    alias int timer_t;
-
-    int clock_getres(clockid_t, timespec*) { return 1; }
-    int clock_gettime(clockid_t, timespec*) { return 0; }
-    int clock_settime(clockid_t, in timespec*);
-    int nanosleep(in timespec*, timespec*);
-    int timer_create(clockid_t, sigevent*, timer_t*);
-    int timer_delete(timer_t);
-    int timer_gettime(timer_t, itimerspec*);
-    int timer_getoverrun(timer_t);
-    int timer_settime(timer_t, int, in itimerspec*, itimerspec*);
-}
 
 //
 // Thread-Safe Functions (TSF)
     //tm*   getdate(in char*);
     char* strptime(in char*, in char*, tm*);
 }
-else version( nacl )
-{
-    extern __gshared int    daylight;
-    extern __gshared c_long timezone;
 
-    tm*   getdate(in char*);
-    char* strptime(in char*, in char*, tm*);
-}
-

d/druntime/core/sys/posix/unistd.d

     enum F_TLOCK    = 2;
     enum F_TEST     = 3;
 }
-else version( nacl )
-{
-	// TWTODO
-    enum F_OK       = 0;
-    enum R_OK       = 4;
-    enum W_OK       = 2;
-    enum X_OK       = 1;
-
-    enum F_ULOCK    = 0;
-    enum F_LOCK     = 1;
-    enum F_TLOCK    = 2;
-    enum F_TEST     = 3;
-
-    enum
-    {
-        _CS_PATH,
-
-        _CS_V6_WIDTH_RESTRICTED_ENVS,
-
-        _CS_GNU_LIBC_VERSION,
-        _CS_GNU_LIBPTHREAD_VERSION,
-
-        _CS_LFS_CFLAGS = 1000,
-        _CS_LFS_LDFLAGS,
-        _CS_LFS_LIBS,
-        _CS_LFS_LINTFLAGS,
-        _CS_LFS64_CFLAGS,
-        _CS_LFS64_LDFLAGS,
-        _CS_LFS64_LIBS,
-        _CS_LFS64_LINTFLAGS,
-
-        _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
-        _CS_XBS5_ILP32_OFF32_LDFLAGS,
-        _CS_XBS5_ILP32_OFF32_LIBS,
-        _CS_XBS5_ILP32_OFF32_LINTFLAGS,
-        _CS_XBS5_ILP32_OFFBIG_CFLAGS,
-        _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
-        _CS_XBS5_ILP32_OFFBIG_LIBS,
-        _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
-        _CS_XBS5_LP64_OFF64_CFLAGS,
-        _CS_XBS5_LP64_OFF64_LDFLAGS,
-        _CS_XBS5_LP64_OFF64_LIBS,
-        _CS_XBS5_LP64_OFF64_LINTFLAGS,
-        _CS_XBS5_LPBIG_OFFBIG_CFLAGS,