changeset 763:9a9f403ab399

D2 changes! Removed druntime from the repository again.. Sorry :/ Updated the druntime port a bit, now requires druntime from trunk. Added info in runtime/README on how to get druntime from trunk. Added patch to add LDC support to druntime. Removed some debug logging from D2 builds. Fixed broken typeinfo for const/invariant in D2.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 12 Nov 2008 07:22:05 +0100
parents d7aae6f09754
children 8e7d4ddab66d
files dmd2/mtype.c druntime/doc/.empty druntime/import/core/bitmanip.di druntime/import/core/exception.di druntime/import/core/memory.di druntime/import/core/memory_.di druntime/import/core/runtime.di druntime/import/core/thread.di druntime/import/ldc/bitmanip.di druntime/import/ldc/cstdarg.di druntime/import/ldc/intrinsics.di druntime/import/ldc/vararg.di druntime/import/object.di druntime/import/std/c/stdarg.di druntime/import/std/intrinsic.di druntime/import/std/stdarg.di druntime/import/stdc/complex.d druntime/import/stdc/config.d druntime/import/stdc/ctype.d druntime/import/stdc/errno.d druntime/import/stdc/fenv.d druntime/import/stdc/inttypes.d druntime/import/stdc/limits.d druntime/import/stdc/locale.d druntime/import/stdc/math.d druntime/import/stdc/posix/arpa/inet.d druntime/import/stdc/posix/config.d druntime/import/stdc/posix/dirent.d druntime/import/stdc/posix/dlfcn.d druntime/import/stdc/posix/fcntl.d druntime/import/stdc/posix/inttypes.d druntime/import/stdc/posix/net/if_.d druntime/import/stdc/posix/netinet/in_.d druntime/import/stdc/posix/netinet/tcp.d druntime/import/stdc/posix/poll.d druntime/import/stdc/posix/pthread.d druntime/import/stdc/posix/pwd.d druntime/import/stdc/posix/sched.d druntime/import/stdc/posix/semaphore.d druntime/import/stdc/posix/setjmp.d druntime/import/stdc/posix/signal.d druntime/import/stdc/posix/stdio.d druntime/import/stdc/posix/stdlib.d druntime/import/stdc/posix/sys/ipc.d druntime/import/stdc/posix/sys/mman.d druntime/import/stdc/posix/sys/select.d druntime/import/stdc/posix/sys/shm.d druntime/import/stdc/posix/sys/socket.d druntime/import/stdc/posix/sys/stat.d druntime/import/stdc/posix/sys/time.d druntime/import/stdc/posix/sys/types.d druntime/import/stdc/posix/sys/uio.d druntime/import/stdc/posix/sys/wait.d druntime/import/stdc/posix/termios.d druntime/import/stdc/posix/time.d druntime/import/stdc/posix/ucontext.d druntime/import/stdc/posix/unistd.d druntime/import/stdc/posix/utime.d druntime/import/stdc/signal.d druntime/import/stdc/stdarg.d druntime/import/stdc/stddef.d druntime/import/stdc/stdint.d druntime/import/stdc/stdio.d druntime/import/stdc/stdlib.d druntime/import/stdc/string.d druntime/import/stdc/tgmath.d druntime/import/stdc/time.d druntime/import/stdc/wctype.d druntime/lib/.empty druntime/license.txt druntime/readme.txt druntime/src/build-dmd.bat druntime/src/build-dmd.sh druntime/src/build-ldc.sh druntime/src/common/core/bitmanip.d druntime/src/common/core/exception.d druntime/src/common/core/memory.d druntime/src/common/core/runtime.d druntime/src/common/core/thread.d druntime/src/common/ldc.mak druntime/src/common/posix.mak druntime/src/common/stdc/errno.c druntime/src/common/win32.mak druntime/src/compiler/dmd/aApply.d druntime/src/compiler/dmd/aApplyR.d druntime/src/compiler/dmd/aaA.d druntime/src/compiler/dmd/adi.d druntime/src/compiler/dmd/alloca.d druntime/src/compiler/dmd/arrayassign.d druntime/src/compiler/dmd/arraybyte.d druntime/src/compiler/dmd/arraycast.d druntime/src/compiler/dmd/arraycat.d druntime/src/compiler/dmd/arraydouble.d druntime/src/compiler/dmd/arrayfloat.d druntime/src/compiler/dmd/arrayint.d druntime/src/compiler/dmd/arrayreal.d druntime/src/compiler/dmd/arrayshort.d druntime/src/compiler/dmd/cast_.d druntime/src/compiler/dmd/cmath2.d druntime/src/compiler/dmd/compiler.d druntime/src/compiler/dmd/complex.c druntime/src/compiler/dmd/cover.d druntime/src/compiler/dmd/critical.c druntime/src/compiler/dmd/deh.c druntime/src/compiler/dmd/deh2.d druntime/src/compiler/dmd/dmain2.d druntime/src/compiler/dmd/invariant.d druntime/src/compiler/dmd/invariant_.d druntime/src/compiler/dmd/lifetime.d druntime/src/compiler/dmd/llmath.d druntime/src/compiler/dmd/mars.h druntime/src/compiler/dmd/memory.d druntime/src/compiler/dmd/memset.d druntime/src/compiler/dmd/minit.asm druntime/src/compiler/dmd/minit.obj druntime/src/compiler/dmd/monitor.c druntime/src/compiler/dmd/obj.d druntime/src/compiler/dmd/object_.d druntime/src/compiler/dmd/posix.mak druntime/src/compiler/dmd/qsort.d druntime/src/compiler/dmd/qsort2.d druntime/src/compiler/dmd/switch_.d druntime/src/compiler/dmd/trace.d druntime/src/compiler/dmd/typeinfo/ti_AC.d druntime/src/compiler/dmd/typeinfo/ti_Acdouble.d druntime/src/compiler/dmd/typeinfo/ti_Acfloat.d druntime/src/compiler/dmd/typeinfo/ti_Acreal.d druntime/src/compiler/dmd/typeinfo/ti_Adouble.d druntime/src/compiler/dmd/typeinfo/ti_Afloat.d druntime/src/compiler/dmd/typeinfo/ti_Ag.d druntime/src/compiler/dmd/typeinfo/ti_Aint.d druntime/src/compiler/dmd/typeinfo/ti_Along.d druntime/src/compiler/dmd/typeinfo/ti_Areal.d druntime/src/compiler/dmd/typeinfo/ti_Ashort.d druntime/src/compiler/dmd/typeinfo/ti_C.d druntime/src/compiler/dmd/typeinfo/ti_byte.d druntime/src/compiler/dmd/typeinfo/ti_cdouble.d druntime/src/compiler/dmd/typeinfo/ti_cfloat.d druntime/src/compiler/dmd/typeinfo/ti_char.d druntime/src/compiler/dmd/typeinfo/ti_creal.d druntime/src/compiler/dmd/typeinfo/ti_dchar.d druntime/src/compiler/dmd/typeinfo/ti_delegate.d druntime/src/compiler/dmd/typeinfo/ti_double.d druntime/src/compiler/dmd/typeinfo/ti_float.d druntime/src/compiler/dmd/typeinfo/ti_idouble.d druntime/src/compiler/dmd/typeinfo/ti_ifloat.d druntime/src/compiler/dmd/typeinfo/ti_int.d druntime/src/compiler/dmd/typeinfo/ti_ireal.d druntime/src/compiler/dmd/typeinfo/ti_long.d druntime/src/compiler/dmd/typeinfo/ti_ptr.d druntime/src/compiler/dmd/typeinfo/ti_real.d druntime/src/compiler/dmd/typeinfo/ti_short.d druntime/src/compiler/dmd/typeinfo/ti_ubyte.d druntime/src/compiler/dmd/typeinfo/ti_uint.d druntime/src/compiler/dmd/typeinfo/ti_ulong.d druntime/src/compiler/dmd/typeinfo/ti_ushort.d druntime/src/compiler/dmd/typeinfo/ti_void.d druntime/src/compiler/dmd/typeinfo/ti_wchar.d druntime/src/compiler/dmd/util/console.d druntime/src/compiler/dmd/util/cpuid.d druntime/src/compiler/dmd/util/ctype.d druntime/src/compiler/dmd/util/string.d druntime/src/compiler/dmd/util/utf.d druntime/src/compiler/dmd/win32.mak druntime/src/compiler/ldc/aApply.d druntime/src/compiler/ldc/aApplyR.d druntime/src/compiler/ldc/aaA.d druntime/src/compiler/ldc/adi.d druntime/src/compiler/ldc/arrayInit.d druntime/src/compiler/ldc/cast.d druntime/src/compiler/ldc/critical.c druntime/src/compiler/ldc/dmain2.d druntime/src/compiler/ldc/eh.d druntime/src/compiler/ldc/genobj.d druntime/src/compiler/ldc/invariant.d druntime/src/compiler/ldc/ldc.mak druntime/src/compiler/ldc/ldc/bitmanip.d druntime/src/compiler/ldc/ldc/vararg.d druntime/src/compiler/ldc/lifetime.d druntime/src/compiler/ldc/mars.h druntime/src/compiler/ldc/memory.d druntime/src/compiler/ldc/monitor.c druntime/src/compiler/ldc/qsort2.d druntime/src/compiler/ldc/switch.d druntime/src/compiler/ldc/typeinfo/ti_AC.d druntime/src/compiler/ldc/typeinfo/ti_Acdouble.d druntime/src/compiler/ldc/typeinfo/ti_Acfloat.d druntime/src/compiler/ldc/typeinfo/ti_Acreal.d druntime/src/compiler/ldc/typeinfo/ti_Adouble.d druntime/src/compiler/ldc/typeinfo/ti_Afloat.d druntime/src/compiler/ldc/typeinfo/ti_Ag.d druntime/src/compiler/ldc/typeinfo/ti_Aint.d druntime/src/compiler/ldc/typeinfo/ti_Along.d druntime/src/compiler/ldc/typeinfo/ti_Areal.d druntime/src/compiler/ldc/typeinfo/ti_Ashort.d druntime/src/compiler/ldc/typeinfo/ti_C.d druntime/src/compiler/ldc/typeinfo/ti_byte.d druntime/src/compiler/ldc/typeinfo/ti_cdouble.d druntime/src/compiler/ldc/typeinfo/ti_cfloat.d druntime/src/compiler/ldc/typeinfo/ti_char.d druntime/src/compiler/ldc/typeinfo/ti_creal.d druntime/src/compiler/ldc/typeinfo/ti_dchar.d druntime/src/compiler/ldc/typeinfo/ti_delegate.d druntime/src/compiler/ldc/typeinfo/ti_double.d druntime/src/compiler/ldc/typeinfo/ti_float.d druntime/src/compiler/ldc/typeinfo/ti_idouble.d druntime/src/compiler/ldc/typeinfo/ti_ifloat.d druntime/src/compiler/ldc/typeinfo/ti_int.d druntime/src/compiler/ldc/typeinfo/ti_ireal.d druntime/src/compiler/ldc/typeinfo/ti_long.d druntime/src/compiler/ldc/typeinfo/ti_ptr.d druntime/src/compiler/ldc/typeinfo/ti_real.d druntime/src/compiler/ldc/typeinfo/ti_short.d druntime/src/compiler/ldc/typeinfo/ti_ubyte.d druntime/src/compiler/ldc/typeinfo/ti_uint.d druntime/src/compiler/ldc/typeinfo/ti_ulong.d druntime/src/compiler/ldc/typeinfo/ti_ushort.d druntime/src/compiler/ldc/typeinfo/ti_void.d druntime/src/compiler/ldc/typeinfo/ti_wchar.d druntime/src/compiler/ldc/util/console.d druntime/src/compiler/ldc/util/ctype.d druntime/src/compiler/ldc/util/string.d druntime/src/compiler/ldc/util/utf.d druntime/src/dmd-posix.mak druntime/src/dmd-win32.mak druntime/src/dmd.conf druntime/src/gc/basic/gc.d druntime/src/gc/basic/gcalloc.d druntime/src/gc/basic/gcbits.d druntime/src/gc/basic/gcstats.d druntime/src/gc/basic/gcx.d druntime/src/gc/basic/ldc.mak druntime/src/gc/basic/posix.mak druntime/src/gc/basic/win32.mak druntime/src/gc/stub/gc.d druntime/src/gc/stub/ldc.mak druntime/src/gc/stub/posix.mak druntime/src/gc/stub/win32.mak druntime/src/ldc-gcc.mak druntime/src/ldc2.conf druntime/src/sc.ini gen/toir.cpp gen/toobj.cpp gen/typinf.cpp runtime/README runtime/ldc2.diff runtime/patch-druntime.sh
diffstat 245 files changed, 13186 insertions(+), 61805 deletions(-) [+]
line wrap: on
line diff
--- a/dmd2/mtype.c	Tue Nov 11 22:57:19 2008 +0100
+++ b/dmd2/mtype.c	Wed Nov 12 07:22:05 2008 +0100
@@ -2759,8 +2759,7 @@
 	ec = new VarExp(0, aaRehash_fd);
 	arguments = new Expressions();
 	arguments->push(e->addressOf(sc));
-    arguments->push(index->getTypeInfo(sc));   // LDC, we don't support the getInternalTypeInfo
-                                               // optimization arbitrarily, not yet at least...   
+    arguments->push(index->getInternalTypeInfo(sc));
 	e = new CallExp(e->loc, ec, arguments);
 	e->type = this;
     }
--- a/druntime/import/core/bitmanip.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/**
- * This module contains a collection of bit-level operations.
- *
- * Copyright: Copyright (c) 2005-2008, The D Runtime Project
- * License:   BSD Style, see LICENSE
- * Authors:   Walter Bright, Don Clugston, Sean Kelly
- */
-module bitmanip;
-
-
-version( DDoc )
-{
-    /**
-     * Scans the bits in v starting with bit 0, looking
-     * for the first set bit.
-     * Returns:
-     *  The bit number of the first bit set.
-     *  The return value is undefined if v is zero.
-     */
-    int bsf( uint v );
-
-
-    /**
-     * Scans the bits in v from the most significant bit
-     * to the least significant bit, looking
-     * for the first set bit.
-     * Returns:
-     *  The bit number of the first bit set.
-     *  The return value is undefined if v is zero.
-     * Example:
-     * ---
-     * import bitmanip;
-     *
-     * int main()
-     * {
-     *     uint v;
-     *     int x;
-     *
-     *     v = 0x21;
-     *     x = bsf(v);
-     *     printf("bsf(x%x) = %d\n", v, x);
-     *     x = bsr(v);
-     *     printf("bsr(x%x) = %d\n", v, x);
-     *     return 0;
-     * }
-     * ---
-     * Output:
-     *  bsf(x21) = 0<br>
-     *  bsr(x21) = 5
-     */
-    int bsr( uint v );
-
-
-    /**
-     * Tests the bit.
-     */
-    int bt( uint* p, uint bitnum );
-
-
-    /**
-     * Tests and complements the bit.
-     */
-    int btc( uint* p, uint bitnum );
-
-
-    /**
-     * Tests and resets (sets to 0) the bit.
-     */
-    int btr( uint* p, uint bitnum );
-
-
-    /**
-     * Tests and sets the bit.
-     * Params:
-     * p = a non-NULL pointer to an array of uints.
-     * index = a bit number, starting with bit 0 of p[0],
-     * and progressing. It addresses bits like the expression:
-    ---
-    p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))
-    ---
-     * Returns:
-     *  A non-zero value if the bit was set, and a zero
-     *  if it was clear.
-     *
-     * Example:
-     * ---
-    import bitmanip;
-
-    int main()
-    {
-        uint array[2];
-
-        array[0] = 2;
-        array[1] = 0x100;
-
-        printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
-        printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-        printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
-        printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-        printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));
-        printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-        printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));
-        printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-        printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));
-        printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-        return 0;
-    }
-     * ---
-     * Output:
-    <pre>
-    btc(array, 35) = 0
-    array = [0]:x2, [1]:x108
-    btc(array, 35) = -1
-    array = [0]:x2, [1]:x100
-    bts(array, 35) = 0
-    array = [0]:x2, [1]:x108
-    btr(array, 35) = -1
-    array = [0]:x2, [1]:x100
-    bt(array, 1) = -1
-    array = [0]:x2, [1]:x100
-    </pre>
-     */
-    int bts( uint* p, uint bitnum );
-
-
-    /**
-     * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes
-     * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3
-     * becomes byte 0.
-     */
-    uint bswap( uint v );
-
-
-    /**
-     * Reads I/O port at port_address.
-     */
-    ubyte inp( uint port_address );
-
-
-    /**
-     * ditto
-     */
-    ushort inpw( uint port_address );
-
-
-    /**
-     * ditto
-     */
-    uint inpl( uint port_address );
-
-
-    /**
-     * Writes and returns value to I/O port at port_address.
-     */
-    ubyte outp( uint port_address, ubyte value );
-
-
-    /**
-     * ditto
-     */
-    ushort outpw( uint port_address, ushort value );
-
-
-    /**
-     * ditto
-     */
-    uint outpl( uint port_address, uint value );
-}
-else
-{
-    public import std.intrinsic;
-}
-
-
-/**
- *  Calculates the number of set bits in a 32-bit integer.
- */
-int popcnt( uint x )
-{
-    // Avoid branches, and the potential for cache misses which
-    // could be incurred with a table lookup.
-
-    // We need to mask alternate bits to prevent the
-    // sum from overflowing.
-    // add neighbouring bits. Each bit is 0 or 1.
-    x = x - ((x>>1) & 0x5555_5555);
-    // now each two bits of x is a number 00,01 or 10.
-    // now add neighbouring pairs
-    x = ((x&0xCCCC_CCCC)>>2) + (x&0x3333_3333);
-    // now each nibble holds 0000-0100. Adding them won't
-    // overflow any more, so we don't need to mask any more
-
-    // Now add the nibbles, then the bytes, then the words
-    // We still need to mask to prevent double-counting.
-    // Note that if we used a rotate instead of a shift, we
-    // wouldn't need the masks, and could just divide the sum
-    // by 8 to account for the double-counting.
-    // On some CPUs, it may be faster to perform a multiply.
-
-    x += (x>>4);
-    x &= 0x0F0F_0F0F;
-    x += (x>>8);
-    x &= 0x00FF_00FF;
-    x += (x>>16);
-    x &= 0xFFFF;
-    return x;
-}
-
-
-/**
- * Reverses the order of bits in a 32-bit integer.
- */
-uint bitswap( uint x )
-{
-
-    version( D_InlineAsm_X86 )
-    {
-        asm
-        {
-            // Author: Tiago Gasiba.
-            mov EDX, EAX;
-            shr EAX, 1;
-            and EDX, 0x5555_5555;
-            and EAX, 0x5555_5555;
-            shl EDX, 1;
-            or  EAX, EDX;
-            mov EDX, EAX;
-            shr EAX, 2;
-            and EDX, 0x3333_3333;
-            and EAX, 0x3333_3333;
-            shl EDX, 2;
-            or  EAX, EDX;
-            mov EDX, EAX;
-            shr EAX, 4;
-            and EDX, 0x0f0f_0f0f;
-            and EAX, 0x0f0f_0f0f;
-            shl EDX, 4;
-            or  EAX, EDX;
-            bswap EAX;
-        }
-    }
-    else
-    {
-        // swap odd and even bits
-        x = ((x >> 1) & 0x5555_5555) | ((x & 0x5555_5555) << 1);
-        // swap consecutive pairs
-        x = ((x >> 2) & 0x3333_3333) | ((x & 0x3333_3333) << 2);
-        // swap nibbles
-        x = ((x >> 4) & 0x0F0F_0F0F) | ((x & 0x0F0F_0F0F) << 4);
-        // swap bytes
-        x = ((x >> 8) & 0x00FF_00FF) | ((x & 0x00FF_00FF) << 8);
-        // swap 2-byte long pairs
-        x = ( x >> 16              ) | ( x               << 16);
-        return x;
-
-    }
-}
--- a/druntime/import/core/exception.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-// D import file generated from 'core/exception.d'
-module core.exception;
-private
-{
-    alias void function(string file, size_t line, string msg = null) assertHandlerType;
-    assertHandlerType assertHandler = null;
-}
-class ArrayBoundsException : Exception
-{
-    this(string file, size_t line)
-{
-super("Array index out of bounds",file,line);
-}
-}
-class AssertException : Exception
-{
-    this(string file, size_t line)
-{
-super("Assertion failure",file,line);
-}
-    this(string msg, string file, size_t line)
-{
-super(msg,file,line);
-}
-}
-class FinalizeException : Exception
-{
-    ClassInfo info;
-    this(ClassInfo c, Exception e = null)
-{
-super("Finalization error",e);
-info = c;
-}
-    override
-{
-    string toString()
-{
-return "An exception was thrown while finalizing an instance of class " ~ info.name;
-}
-}
-}
-class HiddenFuncException : Exception
-{
-    this(ClassInfo ci)
-{
-super("Hidden method called for " ~ ci.name);
-}
-}
-class OutOfMemoryException : Exception
-{
-    this(string file, size_t line)
-{
-super("Memory allocation failed",file,line);
-}
-    override
-{
-    string toString()
-{
-return msg ? super.toString() : "Memory allocation failed";
-}
-}
-}
-class SwitchException : Exception
-{
-    this(string file, size_t line)
-{
-super("No appropriate switch clause found",file,line);
-}
-}
-class UnicodeException : Exception
-{
-    size_t idx;
-    this(string msg, size_t idx)
-{
-super(msg);
-this.idx = idx;
-}
-}
-void setAssertHandler(assertHandlerType h)
-{
-assertHandler = h;
-}
-extern (C) 
-{
-    void onAssertError(string file, size_t line);
-}
-extern (C) 
-{
-    void onAssertErrorMsg(string file, size_t line, string msg);
-}
-extern (C) 
-{
-    void onArrayBoundsError(string file, size_t line);
-}
-extern (C) 
-{
-    void onFinalizeError(ClassInfo info, Exception ex);
-}
-extern (C) 
-{
-    void onHiddenFuncError(Object o);
-}
-extern (C) 
-{
-    void onOutOfMemoryError();
-}
-extern (C) 
-{
-    void onSwitchError(string file, size_t line);
-}
-extern (C) 
-{
-    void onUnicodeError(string msg, size_t idx);
-}
--- a/druntime/import/core/memory.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-// D import file generated from 'core\memory.d'
-module core.memory;
-private
-{
-    extern (C) 
-{
-    void gc_init();
-}
-    extern (C) 
-{
-    void gc_term();
-}
-    extern (C) 
-{
-    void gc_enable();
-}
-    extern (C) 
-{
-    void gc_disable();
-}
-    extern (C) 
-{
-    void gc_collect();
-}
-    extern (C) 
-{
-    void gc_minimize();
-}
-    extern (C) 
-{
-    uint gc_getAttr(void* p);
-}
-    extern (C) 
-{
-    uint gc_setAttr(void* p, uint a);
-}
-    extern (C) 
-{
-    uint gc_clrAttr(void* p, uint a);
-}
-    extern (C) 
-{
-    void* gc_malloc(size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    void* gc_calloc(size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    void* gc_realloc(void* p, size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    size_t gc_extend(void* p, size_t mx, size_t sz);
-}
-    extern (C) 
-{
-    size_t gc_reserve(size_t sz);
-}
-    extern (C) 
-{
-    void gc_free(void* p);
-}
-    extern (C) 
-{
-    void* gc_addrOf(void* p);
-}
-    extern (C) 
-{
-    size_t gc_sizeOf(void* p);
-}
-    struct BlkInfo_
-{
-    void* base;
-    size_t size;
-    uint attr;
-}
-    extern (C) 
-{
-    BlkInfo_ gc_query(void* p);
-}
-    extern (C) 
-{
-    void gc_addRoot(void* p);
-}
-    extern (C) 
-{
-    void gc_addRange(void* p, size_t sz);
-}
-    extern (C) 
-{
-    void gc_removeRoot(void* p);
-}
-    extern (C) 
-{
-    void gc_removeRange(void* p);
-}
-    extern (C) 
-{
-    void* gc_getHandle();
-}
-    extern (C) 
-{
-    void gc_setHandle(void* p);
-}
-    extern (C) 
-{
-    void gc_endHandle();
-}
-}
-struct GC
-{
-    static
-{
-    void enable()
-{
-gc_enable();
-}
-}
-    static
-{
-    void disable()
-{
-gc_disable();
-}
-}
-    static
-{
-    void collect()
-{
-gc_collect();
-}
-}
-    static
-{
-    void minimize()
-{
-gc_minimize();
-}
-}
-    enum BlkAttr : uint
-{
-FINALIZE = 1,
-NO_SCAN = 2,
-NO_MOVE = 4,
-}
-    alias BlkInfo_ BlkInfo;
-    static
-{
-    uint getAttr(void* p)
-{
-return gc_getAttr(p);
-}
-}
-    static
-{
-    uint setAttr(void* p, uint a)
-{
-return gc_setAttr(p,a);
-}
-}
-    static
-{
-    uint clrAttr(void* p, uint a)
-{
-return gc_clrAttr(p,a);
-}
-}
-    static
-{
-    void* malloc(size_t sz, uint ba = 0)
-{
-return gc_malloc(sz,ba);
-}
-}
-    static
-{
-    void* calloc(size_t sz, uint ba = 0)
-{
-return gc_calloc(sz,ba);
-}
-}
-    static
-{
-    void* realloc(void* p, size_t sz, uint ba = 0)
-{
-return gc_realloc(p,sz,ba);
-}
-}
-    static
-{
-    size_t extend(void* p, size_t mx, size_t sz)
-{
-return gc_extend(p,mx,sz);
-}
-}
-    static
-{
-    size_t reserve(size_t sz)
-{
-return gc_reserve(sz);
-}
-}
-    static
-{
-    void free(void* p)
-{
-gc_free(p);
-}
-}
-    static
-{
-    void* addrOf(void* p)
-{
-return gc_addrOf(p);
-}
-}
-    static
-{
-    size_t sizeOf(void* p)
-{
-return gc_sizeOf(p);
-}
-}
-    static
-{
-    BlkInfo query(void* p)
-{
-return gc_query(p);
-}
-}
-    static
-{
-    void addRoot(void* p)
-{
-gc_addRoot(p);
-}
-}
-    static
-{
-    void addRange(void* p, size_t sz)
-{
-gc_addRange(p,sz);
-}
-}
-    static
-{
-    void removeRoot(void* p)
-{
-gc_removeRoot(p);
-}
-}
-    static
-{
-    void removeRange(void* p)
-{
-gc_removeRange(p);
-}
-}
-    static
-{
-    void* getHandle()
-{
-return gc_getHandle();
-}
-}
-    static
-{
-    void setHandle(void* p)
-{
-gc_setHandle(p);
-}
-}
-    static
-{
-    void endHandle()
-{
-gc_endHandle();
-}
-}
-}
--- a/druntime/import/core/memory_.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-// D import file generated from 'core/memory.d'
-module core.memory;
-private
-{
-    extern (C) 
-{
-    void gc_init();
-}
-    extern (C) 
-{
-    void gc_term();
-}
-    extern (C) 
-{
-    void gc_enable();
-}
-    extern (C) 
-{
-    void gc_disable();
-}
-    extern (C) 
-{
-    void gc_collect();
-}
-    extern (C) 
-{
-    void gc_minimize();
-}
-    extern (C) 
-{
-    uint gc_getAttr(void* p);
-}
-    extern (C) 
-{
-    uint gc_setAttr(void* p, uint a);
-}
-    extern (C) 
-{
-    uint gc_clrAttr(void* p, uint a);
-}
-    extern (C) 
-{
-    void* gc_malloc(size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    void* gc_calloc(size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    void* gc_realloc(void* p, size_t sz, uint ba = 0);
-}
-    extern (C) 
-{
-    size_t gc_extend(void* p, size_t mx, size_t sz);
-}
-    extern (C) 
-{
-    size_t gc_reserve(size_t sz);
-}
-    extern (C) 
-{
-    void gc_free(void* p);
-}
-    extern (C) 
-{
-    void* gc_addrOf(void* p);
-}
-    extern (C) 
-{
-    size_t gc_sizeOf(void* p);
-}
-    struct BlkInfo_
-{
-    void* base;
-    size_t size;
-    uint attr;
-}
-    extern (C) 
-{
-    BlkInfo_ gc_query(void* p);
-}
-    extern (C) 
-{
-    void gc_addRoot(void* p);
-}
-    extern (C) 
-{
-    void gc_addRange(void* p, size_t sz);
-}
-    extern (C) 
-{
-    void gc_removeRoot(void* p);
-}
-    extern (C) 
-{
-    void gc_removeRange(void* p);
-}
-    extern (C) 
-{
-    void* gc_getHandle();
-}
-    extern (C) 
-{
-    void gc_setHandle(void* p);
-}
-    extern (C) 
-{
-    void gc_endHandle();
-}
-}
-struct GC
-{
-    static
-{
-    void enable()
-{
-gc_enable();
-}
-}
-    static
-{
-    void disable()
-{
-gc_disable();
-}
-}
-    static
-{
-    void collect()
-{
-gc_collect();
-}
-}
-    static
-{
-    void minimize()
-{
-gc_minimize();
-}
-}
-    enum BlkAttr : uint
-{
-FINALIZE = 1,
-NO_SCAN = 2,
-NO_MOVE = 4,
-}
-    alias BlkInfo_ BlkInfo;
-    static
-{
-    uint getAttr(void* p)
-{
-return gc_getAttr(p);
-}
-}
-    static
-{
-    uint setAttr(void* p, uint a)
-{
-return gc_setAttr(p,a);
-}
-}
-    static
-{
-    uint clrAttr(void* p, uint a)
-{
-return gc_clrAttr(p,a);
-}
-}
-    static
-{
-    void* malloc(size_t sz, uint ba = 0)
-{
-return gc_malloc(sz,ba);
-}
-}
-    static
-{
-    void* calloc(size_t sz, uint ba = 0)
-{
-return gc_calloc(sz,ba);
-}
-}
-    static
-{
-    void* realloc(void* p, size_t sz, uint ba = 0)
-{
-return gc_realloc(p,sz,ba);
-}
-}
-    static
-{
-    size_t extend(void* p, size_t mx, size_t sz)
-{
-return gc_extend(p,mx,sz);
-}
-}
-    static
-{
-    size_t reserve(size_t sz)
-{
-return gc_reserve(sz);
-}
-}
-    static
-{
-    void free(void* p)
-{
-gc_free(p);
-}
-}
-    static
-{
-    void* addrOf(void* p)
-{
-return gc_addrOf(p);
-}
-}
-    static
-{
-    size_t sizeOf(void* p)
-{
-return gc_sizeOf(p);
-}
-}
-    static
-{
-    BlkInfo query(void* p)
-{
-return gc_query(p);
-}
-}
-    static
-{
-    void addRoot(void* p)
-{
-gc_addRoot(p);
-}
-}
-    static
-{
-    void addRange(void* p, size_t sz)
-{
-gc_addRange(p,sz);
-}
-}
-    static
-{
-    void removeRoot(void* p)
-{
-gc_removeRoot(p);
-}
-}
-    static
-{
-    void removeRange(void* p)
-{
-gc_removeRange(p);
-}
-}
-    static
-{
-    void* getHandle()
-{
-return gc_getHandle();
-}
-}
-    static
-{
-    void setHandle(void* p)
-{
-gc_setHandle(p);
-}
-}
-    static
-{
-    void endHandle()
-{
-gc_endHandle();
-}
-}
-}
--- a/druntime/import/core/runtime.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-// D import file generated from 'core/runtime.d'
-module core.runtime;
-private
-{
-    extern (C) 
-{
-    bool rt_isHalting();
-}
-    alias bool function() ModuleUnitTester;
-    alias bool function(Object) CollectHandler;
-    alias Exception.TraceInfo function(void* ptr = null) TraceHandler;
-    extern (C) 
-{
-    void rt_setCollectHandler(CollectHandler h);
-}
-    extern (C) 
-{
-    void rt_setTraceHandler(TraceHandler h);
-}
-    alias void delegate(Exception) ExceptionHandler;
-    extern (C) 
-{
-    bool rt_init(ExceptionHandler dg = null);
-}
-    extern (C) 
-{
-    bool rt_term(ExceptionHandler dg = null);
-}
-}
-struct Runtime
-{
-    static
-{
-    bool initialize(void delegate(Exception) dg = null)
-{
-return rt_init(dg);
-}
-}
-    static
-{
-    bool terminate(void delegate(Exception) dg = null)
-{
-return rt_term(dg);
-}
-}
-    static
-{
-    bool isHalting()
-{
-return rt_isHalting();
-}
-}
-    static
-{
-    void traceHandler(TraceHandler h)
-{
-rt_setTraceHandler(h);
-}
-}
-    static
-{
-    void collectHandler(CollectHandler h)
-{
-rt_setCollectHandler(h);
-}
-}
-    static
-{
-    void moduleUnitTester(ModuleUnitTester h)
-{
-sm_moduleUnitTester = h;
-}
-}
-    private
-{
-    static
-{
-    ModuleUnitTester sm_moduleUnitTester = null;
-}
-}
-}
-extern (C) 
-{
-    bool runModuleUnitTests();
-}
--- a/druntime/import/core/thread.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,792 +0,0 @@
-// D import file generated from 'core/thread.d'
-module core.thread;
-version = StackGrowsDown;
-class ThreadException : Exception
-{
-    this(string msg)
-{
-super(msg);
-}
-}
-class FiberException : Exception
-{
-    this(string msg)
-{
-super(msg);
-}
-}
-private
-{
-    extern (C) 
-{
-    void* rt_stackBottom();
-}
-    extern (C) 
-{
-    void* rt_stackTop();
-}
-    void* getStackBottom()
-{
-return rt_stackBottom();
-}
-    void* getStackTop();
-}
-version (Windows)
-{
-    private
-{
-    import stdc.stdint;
-    import sys.windows.windows;
-    const
-{
-    DWORD TLS_OUT_OF_INDEXES = -1u;
-}
-    extern (Windows) 
-{
-    alias uint function(void*) btex_fptr;
-}
-    extern (C) 
-{
-    uintptr_t _beginthreadex(void*, uint, btex_fptr, void*, uint, uint*);
-}
-    extern (Windows) 
-{
-    uint thread_entryPoint(void* arg);
-}
-    HANDLE GetCurrentThreadHandle()
-{
-const uint DUPLICATE_SAME_ACCESS = 2;
-HANDLE curr = GetCurrentThread();
-HANDLE proc = GetCurrentProcess();
-HANDLE hndl;
-DuplicateHandle(proc,curr,proc,&hndl,0,TRUE,DUPLICATE_SAME_ACCESS);
-return hndl;
-}
-}
-}
-else
-{
-    version (Posix)
-{
-    private
-{
-    import stdc.posix.semaphore;
-    import stdc.posix.pthread;
-    import stdc.posix.signal;
-    import stdc.posix.time;
-    import stdc.errno;
-    extern (C) 
-{
-    int getErrno();
-}
-    version (GNU)
-{
-    import gcc.builtins;
-}
-    extern (C) 
-{
-    void* thread_entryPoint(void* arg);
-}
-    sem_t suspendCount;
-    extern (C) 
-{
-    void thread_suspendHandler(int sig);
-}
-    extern (C) 
-{
-    void thread_resumeHandler(int sig)
-in
-{
-assert(sig == SIGUSR2);
-}
-body
-{
-}
-}
-}
-}
-else
-{
-    static assert(false,"Unknown threading implementation.");
-}
-}
-class Thread
-{
-    this(void function() fn, size_t sz = 0)
-in
-{
-assert(fn);
-}
-body
-{
-m_fn = fn;
-m_sz = sz;
-m_call = Call.FN;
-m_curr = &m_main;
-}
-    this(void delegate() dg, size_t sz = 0)
-in
-{
-assert(dg);
-}
-body
-{
-m_dg = dg;
-m_sz = sz;
-m_call = Call.DG;
-m_curr = &m_main;
-}
-        final
-{
-    void start();
-}
-    final
-{
-    Object join(bool rethrow = true);
-}
-    final
-{
-    char[] name();
-}
-    final
-{
-    void name(char[] val);
-}
-    final
-{
-    bool isDaemon();
-}
-    final
-{
-    void isDaemon(bool val);
-}
-    final
-{
-    bool isRunning();
-}
-    static const
-{
-    int PRIORITY_MIN;
-}
-    static const
-{
-    int PRIORITY_MAX;
-}
-    final
-{
-    int priority();
-}
-    final
-{
-    void priority(int val);
-}
-    static
-{
-    void sleep(long period);
-}
-    static
-{
-    void yield();
-}
-    static
-{
-    Thread getThis();
-}
-    static
-{
-    Thread[] getAll();
-}
-    static
-{
-    int opApply(int delegate(ref Thread) dg);
-}
-    static const
-{
-    uint LOCAL_MAX = 64;
-}
-    static
-{
-    uint createLocal();
-}
-    static
-{
-    void deleteLocal(uint key);
-}
-    static
-{
-    void* getLocal(uint key)
-{
-return getThis().m_local[key];
-}
-}
-    static
-{
-    void* setLocal(uint key, void* val)
-{
-return getThis().m_local[key] = val;
-}
-}
-    static this();
-    private
-{
-    this()
-{
-m_call = Call.NO;
-m_curr = &m_main;
-}
-    final
-{
-    void run();
-}
-    private
-{
-    enum Call 
-{
-NO,
-FN,
-DG,
-}
-    version (Win32)
-{
-    alias uint TLSKey;
-    alias uint ThreadAddr;
-}
-else
-{
-    version (Posix)
-{
-    alias pthread_key_t TLSKey;
-    alias pthread_t ThreadAddr;
-}
-}
-    static
-{
-    bool[LOCAL_MAX] sm_local;
-}
-    static
-{
-    TLSKey sm_this;
-}
-    void*[LOCAL_MAX] m_local;
-    version (Win32)
-{
-    HANDLE m_hndl;
-}
-    ThreadAddr m_addr;
-    Call m_call;
-    char[] m_name;
-    union
-{
-void function() m_fn;
-void delegate() m_dg;
-}
-    size_t m_sz;
-    version (Posix)
-{
-    bool m_isRunning;
-}
-    bool m_isDaemon;
-    Object m_unhandled;
-    private
-{
-    static
-{
-    void setThis(Thread t);
-}
-    private
-{
-    final
-{
-    void pushContext(Context* c)
-in
-{
-assert(!c.within);
-}
-body
-{
-c.within = m_curr;
-m_curr = c;
-}
-}
-    final
-{
-    void popContext()
-in
-{
-assert(m_curr && m_curr.within);
-}
-body
-{
-Context* c = m_curr;
-m_curr = c.within;
-c.within = null;
-}
-}
-    final
-{
-    Context* topContext()
-in
-{
-assert(m_curr);
-}
-body
-{
-return m_curr;
-}
-}
-    static
-{
-    struct Context
-{
-    void* bstack;
-    void* tstack;
-    Context* within;
-    Context* next;
-    Context* prev;
-}
-}
-    Context m_main;
-    Context* m_curr;
-    bool m_lock;
-    version (Win32)
-{
-    uint[8] m_reg;
-}
-    private
-{
-    static
-{
-    Object slock()
-{
-return Thread.classinfo;
-}
-}
-    static
-{
-    Context* sm_cbeg;
-}
-    static
-{
-    size_t sm_clen;
-}
-    static
-{
-    Thread sm_tbeg;
-}
-    static
-{
-    size_t sm_tlen;
-}
-    Thread prev;
-    Thread next;
-    static
-{
-    void add(Context* c);
-}
-    static
-{
-    void remove(Context* c);
-}
-    static
-{
-    void add(Thread t);
-}
-    static
-{
-    void remove(Thread t);
-}
-}
-}
-}
-}
-}
-}
-extern (C) 
-{
-    void thread_init();
-}
-extern (C) 
-{
-    void thread_attachThis();
-}
-extern (C) 
-{
-    void thread_detachThis()
-{
-Thread.remove(Thread.getThis());
-}
-}
-extern (C) 
-{
-    void thread_joinAll();
-}
-private
-{
-    bool multiThreadedFlag = false;
-}
-extern (C) 
-{
-    bool thread_needLock()
-{
-return multiThreadedFlag;
-}
-}
-private
-{
-    uint suspendDepth = 0;
-}
-extern (C) 
-{
-    void thread_suspendAll();
-}
-extern (C) 
-{
-    void thread_resumeAll();
-}
-private
-{
-    alias void delegate(void*, void*) scanAllThreadsFn;
-}
-extern (C) 
-{
-    void thread_scanAll(scanAllThreadsFn scan, void* curStackTop = null);
-}
-template ThreadLocal(T)
-{
-class ThreadLocal
-{
-    this(T def = T.init)
-{
-m_def = def;
-m_key = Thread.createLocal();
-}
-        T val()
-{
-Wrap* wrap = cast(Wrap*)Thread.getLocal(m_key);
-return wrap ? wrap.val : m_def;
-}
-    T val(T newval)
-{
-Wrap* wrap = cast(Wrap*)Thread.getLocal(m_key);
-if (wrap is null)
-{
-wrap = new Wrap;
-Thread.setLocal(m_key,wrap);
-}
-wrap.val = newval;
-return newval;
-}
-    private
-{
-    struct Wrap
-{
-    T val;
-}
-    T m_def;
-    uint m_key;
-}
-}
-}
-class ThreadGroup
-{
-    final
-{
-    Thread create(void function() fn);
-}
-    final
-{
-    Thread create(void delegate() dg);
-}
-    final
-{
-    void add(Thread t);
-}
-    final
-{
-    void remove(Thread t);
-}
-    final
-{
-    int opApply(int delegate(ref Thread) dg);
-}
-    final
-{
-    void joinAll(bool rethrow = true);
-}
-    private
-{
-    Thread[Thread] m_all;
-}
-}
-private
-{
-    version (D_InlineAsm_X86)
-{
-    version (X86_64)
-{
-}
-else
-{
-    version (Win32)
-{
-    version = AsmX86_Win32;
-}
-else
-{
-    version (Posix)
-{
-    version = AsmX86_Posix;
-}
-}
-}
-}
-else
-{
-    version (PPC)
-{
-    version (Posix)
-{
-    version = AsmPPC_Posix;
-}
-}
-}
-    version (LLVM_InlineAsm_X86)
-{
-    version (Win32)
-{
-    version = LLVM_AsmX86_Win32;
-}
-else
-{
-    version (Posix)
-{
-    version = LLVM_AsmX86_Posix;
-}
-}
-}
-else
-{
-    version (LLVM_InlineAsm_X86_64)
-{
-    version (Posix)
-{
-    version = LLVM_AsmX86_64_Posix;
-}
-}
-}
-    version (Posix)
-{
-    import stdc.posix.unistd;
-    import stdc.posix.sys.mman;
-    import stdc.posix.stdlib;
-    version (AsmX86_Win32)
-{
-}
-else
-{
-    version (AsmX86_Posix)
-{
-}
-else
-{
-    version (AsmPPC_Posix)
-{
-}
-else
-{
-    version (LLVM_AsmX86_Win32)
-{
-}
-else
-{
-    version (LLVM_AsmX86_Posix)
-{
-}
-else
-{
-    import stdc.posix.ucontext;
-}
-}
-}
-}
-}
-}
-    const
-{
-    size_t PAGESIZE;
-}
-}
-static this();
-private
-{
-    extern (C) 
-{
-    void fiber_entryPoint();
-}
-    version (AsmPPC_Posix)
-{
-    extern (C) 
-{
-    void fiber_switchContext(void** oldp, void* newp);
-}
-}
-else
-{
-    extern (C) 
-{
-    void fiber_switchContext(void** oldp, void* newp);
-}
-}
-}
-class Fiber
-{
-    this(void function() fn, size_t sz = PAGESIZE)
-in
-{
-assert(fn);
-}
-body
-{
-m_fn = fn;
-m_call = Call.FN;
-m_state = State.HOLD;
-allocStack(sz);
-initStack();
-}
-    this(void delegate() dg, size_t sz = PAGESIZE)
-in
-{
-assert(dg);
-}
-body
-{
-m_dg = dg;
-m_call = Call.DG;
-m_state = State.HOLD;
-allocStack(sz);
-initStack();
-}
-        final
-{
-    Object call(bool rethrow = true);
-}
-    final
-{
-    void reset()
-in
-{
-assert(m_state == State.TERM);
-assert(m_ctxt.tstack == m_ctxt.bstack);
-}
-body
-{
-m_state = State.HOLD;
-initStack();
-m_unhandled = null;
-}
-}
-    enum State 
-{
-HOLD,
-EXEC,
-TERM,
-}
-    final
-{
-    State state()
-{
-return m_state;
-}
-}
-    static
-{
-    void yield();
-}
-    static
-{
-    void yieldAndThrow(Object obj);
-}
-    static
-{
-    Fiber getThis();
-}
-    static this();
-    private
-{
-    this()
-{
-m_call = Call.NO;
-}
-    final
-{
-    void run();
-}
-    private
-{
-    enum Call 
-{
-NO,
-FN,
-DG,
-}
-    Call m_call;
-    union
-{
-void function() m_fn;
-void delegate() m_dg;
-}
-    bool m_isRunning;
-    Object m_unhandled;
-    State m_state;
-    private
-{
-    final
-{
-    void allocStack(size_t sz);
-}
-    final
-{
-    void freeStack();
-}
-    final
-{
-    void initStack();
-}
-    Thread.Context* m_ctxt;
-    size_t m_size;
-    void* m_pmem;
-    static if(is(ucontext_t))
-{
-    static
-{
-    ucontext_t sm_utxt = void;
-}
-    ucontext_t m_utxt = void;
-    ucontext_t* m_ucur = null;
-}
-    private
-{
-    static
-{
-    void setThis(Fiber f);
-}
-    static
-{
-    Thread.TLSKey sm_this;
-}
-    private
-{
-    final
-{
-    void switchIn();
-}
-    final
-{
-    void switchOut();
-}
-}
-}
-}
-}
-}
-}
--- a/druntime/import/ldc/bitmanip.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-// D import file generated from 'bitmanip.d'
-module ldc.bitmanip;
-version (LDC)
-{
-}
-else
-{
-    static assert(false,"This module is only valid for LDC");
-}
-int bsf(uint v);
-int bsr(uint v);
-int bt(uint* p, uint bitnum)
-{
-return p[bitnum / ((uint).sizeof * 8)] & 1 << (bitnum & (uint).sizeof * 8 - 1) ? -1 : 0;
-}
-int btc(uint* p, uint bitnum)
-{
-uint* q = p + bitnum / ((uint).sizeof * 8);
-uint mask = 1 << (bitnum & (uint).sizeof * 8 - 1);
-int result = *q & mask;
-*q ^= mask;
-return result ? -1 : 0;
-}
-int btr(uint* p, uint bitnum)
-{
-uint* q = p + bitnum / ((uint).sizeof * 8);
-uint mask = 1 << (bitnum & (uint).sizeof * 8 - 1);
-int result = *q & mask;
-*q &= ~mask;
-return result ? -1 : 0;
-}
-int bts(uint* p, uint bitnum)
-{
-uint* q = p + bitnum / ((uint).sizeof * 8);
-uint mask = 1 << (bitnum & (uint).sizeof * 8 - 1);
-int result = *q & mask;
-*q |= mask;
-return result ? -1 : 0;
-}
-pragma (intrinsic, "llvm.bswap.i32")
-{
-    uint bswap(uint val);
-}
-ubyte inp(uint p);
-ushort inpw(uint p);
-uint inpl(uint p);
-ubyte outp(uint p, ubyte v);
-ushort outpw(uint p, ushort v);
-uint outpl(uint p, uint v);
--- a/druntime/import/ldc/cstdarg.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * vararg support for extern(C) functions
- */
-
-module ldc.cstdarg;
-
-// Check for the right compiler
-version(LDC)
-{
-    // OK
-}
-else
-{
-    static assert(false, "This module is only valid for LDC");
-}
-
-alias void* va_list;
-
-pragma(va_start)
-    void va_start(T)(va_list ap, ref T);
-
-pragma(va_arg)
-    T va_arg(T)(va_list ap);
-
-pragma(va_end)
-    void va_end(va_list args);
-
-pragma(va_copy)
-    void va_copy(va_list dst, va_list src);
--- a/druntime/import/ldc/intrinsics.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
- * This module holds declarations to LLVM intrinsics.
- *
- * See the LLVM language reference for more information:
- *
- * - http://llvm.org/docs/LangRef.html#intrinsics
- *
- */
-
-module ldc.intrinsics;
-
-// Check for the right compiler
-version(LDC)
-{
-    // OK
-}
-else
-{
-    static assert(false, "This module is only valid for LDC");
-}
-
-//
-// CODE GENERATOR INTRINSICS
-//
-
-
-// The 'llvm.returnaddress' intrinsic attempts to compute a target-specific value indicating the return address of the current function or one of its callers. 
-
-pragma(intrinsic, "llvm.returnaddress")
-    void* llvm_returnaddress(uint level);
-
-
-// The 'llvm.frameaddress' intrinsic attempts to return the target-specific frame pointer value for the specified stack frame. 
-
-pragma(intrinsic, "llvm.frameaddress")
-    void* llvm_frameaddress(uint level);
-
-
-// The 'llvm.stacksave' intrinsic is used to remember the current state of the function stack, for use with llvm.stackrestore. This is useful for implementing language features like scoped automatic variable sized arrays in C99. 
-
-pragma(intrinsic, "llvm.stacksave")
-    void* llvm_stacksave();
-
-
-// The 'llvm.stackrestore' intrinsic is used to restore the state of the function stack to the state it was in when the corresponding llvm.stacksave intrinsic executed. This is useful for implementing language features like scoped automatic variable sized arrays in C99. 
-
-pragma(intrinsic, "llvm.stackrestore")
-    void llvm_stackrestore(void* ptr);
-
-
-// The 'llvm.prefetch' intrinsic is a hint to the code generator to insert a prefetch instruction if supported; otherwise, it is a noop. Prefetches have no effect on the behavior of the program but can change its performance characteristics.
-
-pragma(intrinsic, "llvm.prefetch")
-    void llvm_prefetch(void* ptr, uint rw, uint locality);
-
-
-// The 'llvm.pcmarker' intrinsic is a method to export a Program Counter (PC) in a region of code to simulators and other tools. The method is target specific, but it is expected that the marker will use exported symbols to transmit the PC of the marker. The marker makes no guarantees that it will remain with any specific instruction after optimizations. It is possible that the presence of a marker will inhibit optimizations. The intended use is to be inserted after optimizations to allow correlations of simulation runs. 
-
-pragma(intrinsic, "llvm.pcmarker")
-    void llvm_pcmarker(uint id);
-
-
-// The 'llvm.readcyclecounter' intrinsic provides access to the cycle counter register (or similar low latency, high accuracy clocks) on those targets that support it. On X86, it should map to RDTSC. On Alpha, it should map to RPCC. As the backing counters overflow quickly (on the order of 9 seconds on alpha), this should only be used for small timings. 
-
-pragma(intrinsic, "llvm.readcyclecounter")
-    ulong readcyclecounter();
-
-
-
-
-//
-// STANDARD C LIBRARY INTRINSICS
-//
-
-
-// The 'llvm.memcpy.*' intrinsics copy a block of memory from the source location to the destination location.
-// Note that, unlike the standard libc function, the llvm.memcpy.* intrinsics do not return a value, and takes an extra alignment argument.
-
-pragma(intrinsic, "llvm.memcpy.i32")
-    void llvm_memcpy_i32(void* dst, void* src, uint len, uint alignment);
-pragma(intrinsic, "llvm.memcpy.i64")
-    void llvm_memcpy_i64(void* dst, void* src, ulong len, uint alignment);
-
-
-// The 'llvm.memmove.*' intrinsics move a block of memory from the source location to the destination location. It is similar to the 'llvm.memcpy' intrinsic but allows the two memory locations to overlap.
-// Note that, unlike the standard libc function, the llvm.memmove.* intrinsics do not return a value, and takes an extra alignment argument.
-
-pragma(intrinsic, "llvm.memmove.i32")
-    void llvm_memmove_i32(void* dst, void* src, uint len, uint alignment);
-pragma(intrinsic, "llvm.memmove.i64")
-    void llvm_memmove_i64(void* dst, void* src, ulong len, int alignment);
-
-
-// The 'llvm.memset.*' intrinsics fill a block of memory with a particular byte value.
-// Note that, unlike the standard libc function, the llvm.memset intrinsic does not return a value, and takes an extra alignment argument.
-
-pragma(intrinsic, "llvm.memset.i32")
-    void llvm_memset_i32(void* dst, ubyte val, uint len, uint alignment);
-pragma(intrinsic, "llvm.memset.i64")
-    void llvm_memset_i64(void* dst, ubyte val, ulong len, uint alignment);
-
-
-// The 'llvm.sqrt' intrinsics return the sqrt of the specified operand, returning the same value as the libm 'sqrt' functions would. Unlike sqrt in libm, however, llvm.sqrt has undefined behavior for negative numbers other than -0.0 (which allows for better optimization, because there is no need to worry about errno being set). llvm.sqrt(-0.0) is defined to return -0.0 like IEEE sqrt. 
-
-pragma(intrinsic, "llvm.sqrt.f32")
-    float llvm_sqrt_f32(float val);
-pragma(intrinsic, "llvm.sqrt.f64")
-    double llvm_sqrt_f64(double val);
-version(X86)
-{
-pragma(intrinsic, "llvm.sqrt.f80")
-    real llvm_sqrt_f80(real val);
-}
-
-version(X86_64)
-{
-pragma(intrinsic, "llvm.sqrt.f80")
-    real llvm_sqrt_f80(real val);
-}
-
-
-// The 'llvm.sin.*' intrinsics return the sine of the operand. 
-
-pragma(intrinsic, "llvm.sin.f32")
-    float llvm_sin_f32(float val);
-pragma(intrinsic, "llvm.sin.f64")
-    double llvm_sin_f64(double val);
-version(X86)
-{
-pragma(intrinsic, "llvm.sin.f80")
-    real llvm_sin_f80(real val);
-}
-
-version(X86_64)
-{
-pragma(intrinsic, "llvm.sin.f80")
-    real llvm_sin_f80(real val);
-}
-
-
-// The 'llvm.cos.*' intrinsics return the cosine of the operand. 
-
-pragma(intrinsic, "llvm.cos.f32")
-    float llvm_cos_f32(float val);
-pragma(intrinsic, "llvm.cos.f64")
-    double llvm_cos_f64(double val);
-version(X86)
-{
-pragma(intrinsic, "llvm.cos.f80")
-    real llvm_cos_f80(real val);
-}
-
-version(X86_64)
-{
-pragma(intrinsic, "llvm.cos.f80")
-    real llvm_cos_f80(real val);
-}
-
-
-// The 'llvm.powi.*' intrinsics return the first operand raised to the specified (positive or negative) power. The order of evaluation of multiplications is not defined. When a vector of floating point type is used, the second argument remains a scalar integer value. 
-
-pragma(intrinsic, "llvm.powi.f32")
-    float llvm_powi_f32(float val, int power);
-
-pragma(intrinsic, "llvm.powi.f64")
-    double llvm_powi_f64(double val, int power);
-version(X86)
-{
-pragma(intrinsic, "llvm.powi.f80")
-    real llvm_powi_f80(real val, int power);
-}
-
-version(X86_64)
-{
-pragma(intrinsic, "llvm.powi.f80")
-    real llvm_powi_f80(real val, int power);
-}
-
-// The 'llvm.pow.*' intrinsics return the first operand raised to the specified (positive or negative) power. 
-
-pragma(intrinsic, "llvm.pow.f32")
-    float llvm_pow_f32(float val, float power);
-
-pragma(intrinsic, "llvm.pow.f64")
-    double llvm_pow_f64(double val, double power);
-version(X86)
-{
-pragma(intrinsic, "llvm.pow.f80")
-    real llvm_pow_f80(real val, real power);
-}
-
-version(X86_64)
-{
-pragma(intrinsic, "llvm.pow.f80")
-    real llvm_pow_f80(real val, real power);
-}
-
-
-//
-// BIT MANIPULATION INTRINSICS
-//
-
-// The 'llvm.bswap' family of intrinsics is used to byte swap integer values with an even number of bytes (positive multiple of 16 bits). These are useful for performing operations on data that is not in the target's native byte order. 
-
-pragma(intrinsic, "llvm.bswap.i16.i16")
-    ushort llvm_bswap_i16(ushort val);
-
-pragma(intrinsic, "llvm.bswap.i32.i32")
-    uint llvm_bswap_i32(uint val);
-
-pragma(intrinsic, "llvm.bswap.i64.i64")
-    ulong llvm_bswap_i64(ulong val);
-
-
-// The 'llvm.ctpop' family of intrinsics counts the number of bits set in a value. 
-
-pragma(intrinsic, "llvm.ctpop.i8")
-    ubyte llvm_ctpop_i8(ubyte src);
-
-pragma(intrinsic, "llvm.ctpop.i16")
-    ushort llvm_ctpop_i16(ushort src);
-
-pragma(intrinsic, "llvm.ctpop.i32")
-    uint llvm_ctpop_i32(uint src);
-
-pragma(intrinsic, "llvm.ctpop.i64")
-    ulong llvm_ctpop_i64(ulong src);
-
-
-// The 'llvm.ctlz' family of intrinsic functions counts the number of leading zeros in a variable. 
-
-pragma(intrinsic, "llvm.ctlz.i8")
-    ubyte llvm_ctlz_i8(ubyte src);
-
-pragma(intrinsic, "llvm.ctlz.i16")
-    ushort llvm_ctlz_i16(ushort src);
-
-pragma(intrinsic, "llvm.ctlz.i32")
-    uint llvm_ctlz_i32(uint src);
-
-pragma(intrinsic, "llvm.ctlz.i64")
-    ulong llvm_ctlz_i64(ulong src);
-
-
-// The 'llvm.cttz' family of intrinsic functions counts the number of trailing zeros. 
-
-pragma(intrinsic, "llvm.cttz.i8")
-    ubyte llvm_cttz_i8(ubyte src);
-
-pragma(intrinsic, "llvm.cttz.i16")
-    ushort llvm_cttz_i16(ushort src);
-
-pragma(intrinsic, "llvm.cttz.i32")
-    uint llvm_cttz_i32(uint src);
-
-pragma(intrinsic, "llvm.cttz.i64")
-    ulong llvm_cttz_i64(ulong src);
-
-
-// The 'llvm.part.select' family of intrinsic functions selects a range of bits from an integer value and returns them in the same bit width as the original value.
-
-pragma(intrinsic, "llvm.part.select.i8")
-    ubyte llvm_part_select_i(ubyte val, uint loBit, uint hiBit);
-
-pragma(intrinsic, "llvm.part.select.i16")
-    ushort llvm_part_select_i(ushort val, uint loBit, uint hiBit);
-
-pragma(intrinsic, "llvm.part.select.i32")
-    uint llvm_part_select_i(uint val, uint loBit, uint hiBit);
-
-pragma(intrinsic, "llvm.part.select.i64")
-    ulong llvm_part_select_i(ulong val, uint loBit, uint hiBit);
-
-
-// The 'llvm.part.set' family of intrinsic functions replaces a range of bits in an integer value with another integer value. It returns the integer with the replaced bits.
-
-// TODO
-// declare i17 @llvm.part.set.i17.i9 (i17 %val, i9 %repl, i32 %lo, i32 %hi)
-// declare i29 @llvm.part.set.i29.i9 (i29 %val, i9 %repl, i32 %lo, i32 %hi)
-
-
-
-
-//
-// ATOMIC OPERATIONS AND SYNCHRONIZATION INTRINSICS
-//
-
-// The llvm.memory.barrier intrinsic guarantees ordering between specific pairs of memory access types.
-
-pragma(intrinsic, "llvm.memory.barrier")
-    void llvm_memory_barrier(bool ll, bool ls, bool sl, bool ss, bool device);
-
-// This loads a value in memory and compares it to a given value. If they are equal, it stores a new value into the memory.
-
-pragma(intrinsic, "llvm.atomic.cmp.swap.i#.p0i#")
-    T llvm_atomic_cmp_swap(T)(T* ptr, T cmp, T val);
-
-// This intrinsic loads the value stored in memory at ptr and yields the value from memory. It then stores the value in val in the memory at ptr.
-
-pragma(intrinsic, "llvm.atomic.swap.i#.p0i#")
-    T llvm_atomic_swap(T)(T* ptr, T val);
-
-// This intrinsic adds delta to the value stored in memory at ptr. It yields the original value at ptr.
-
-pragma(intrinsic, "llvm.atomic.load.add.i#.p0i#")
-    T llvm_atomic_load_add(T)(T* ptr, T val);
-
-// This intrinsic subtracts delta to the value stored in memory at ptr. It yields the original value at ptr.
-
-pragma(intrinsic, "llvm.atomic.load.sub.i#.p0i#")
-    T llvm_atomic_load_sub(T)(T* ptr, T val);
-
-// These intrinsics bitwise the operation (and, nand, or, xor) delta to the value stored in memory at ptr. It yields the original value at ptr.
-
-pragma(intrinsic, "llvm.atomic.load.and.i#.p0i#")
-    T llvm_atomic_load_and(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.nand.i#.p0i#")
-    T llvm_atomic_load_nand(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.or.i#.p0i#")
-    T llvm_atomic_load_or(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.xor.i#.p0i#")
-    T llvm_atomic_load_xor(T)(T* ptr, T val);
-
-// These intrinsics takes the signed or unsigned minimum or maximum of delta and the value stored in memory at ptr. It yields the original value at ptr. 
-
-pragma(intrinsic, "llvm.atomic.load.max.i#.p0i#")
-    T llvm_atomic_load_max(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.min.i#.p0i#")
-    T llvm_atomic_load_min(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.umax.i#.p0i#")
-    T llvm_atomic_load_umax(T)(T* ptr, T val);
-pragma(intrinsic, "llvm.atomic.load.umin.i#.p0i#")
-    T llvm_atomic_load_umin(T)(T* ptr, T val);
-
-//
-// GENERAL INTRINSICS
-//
-
-
-// This intrinsics is lowered to the target dependent trap instruction. If the target does not have a trap instruction, this intrinsic will be lowered to the call of the abort() function. 
-
-pragma(intrinsic, "llvm.trap")
-    void llvm_trap();
--- a/druntime/import/ldc/vararg.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// D import file generated from 'vararg.d'
-module ldc.Vararg;
-version (LDC)
-{
-}
-else
-{
-    static assert(false,"This module is only valid for LDC");
-}
-alias void* va_list;
-template va_start(T)
-{
-void va_start(out va_list ap, ref T parmn)
-{
-}
-}
-template va_arg(T)
-{
-T va_arg(ref va_list vp)
-{
-T* arg = cast(T*)vp;
-vp = cast(va_list)(cast(void*)vp + (T.sizeof + size_t.sizeof - 1 & ~(size_t.sizeof - 1)));
-return *arg;
-}
-}
-void va_end(va_list ap)
-{
-}
-void va_copy(out va_list dst, va_list src)
-{
-dst = src;
-}
--- a/druntime/import/object.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-module object;
-
-alias typeof(int.sizeof)                    size_t;
-alias typeof(cast(void*)0 - cast(void*)0)   ptrdiff_t;
-
-alias size_t hash_t;
-alias bool equals_t;
-
-alias invariant(char)[]  string;
-alias invariant(wchar)[] wstring;
-alias invariant(dchar)[] dstring;
-
-class Object
-{
-    string   toString();
-    hash_t   toHash();
-    int      opCmp(Object o);
-    equals_t opEquals(Object o);
-
-    interface Monitor
-    {
-        void lock();
-        void unlock();
-    }
-
-    static Object factory(string classname);
-}
-
-struct Interface
-{
-    ClassInfo   classinfo;
-    void*[]     vtbl;
-    ptrdiff_t   offset;   // offset to Interface 'this' from Object 'this'
-}
-
-class ClassInfo : Object
-{
-    byte[]      init;   // class static initializer
-    string      name;   // class name
-    void*[]     vtbl;   // virtual function pointer table
-    Interface[] interfaces;
-    ClassInfo   base;
-    void*       destructor;
-    void(*classInvariant)(Object);
-    uint        flags;
-    //  1:      // is IUnknown or is derived from IUnknown
-    //  2:      // has no possible pointers into GC memory
-    //  4:      // has offTi[] member
-    //  8:      // has constructors
-    // 16:      // has xgetMembers member
-    void*       deallocator;
-    OffsetTypeInfo[] offTi;
-    void*       defaultConstructor;
-    const(MemberInfo[]) function(string) xgetMembers;
-
-    static ClassInfo find(in char[] classname);
-    Object create();
-    const(MemberInfo[]) getMembers(in char[] classname);
-}
-
-struct OffsetTypeInfo
-{
-    size_t   offset;
-    TypeInfo ti;
-}
-
-class TypeInfo
-{
-    hash_t   getHash(in void* p);
-    equals_t equals(in void* p1, in void* p2);
-    int      compare(in void* p1, in void* p2);
-    size_t   tsize();
-    void     swap(void* p1, void* p2);
-    TypeInfo next();
-    void[]   init();
-    uint     flags();
-    // 1:    // has possible pointers into GC memory
-    OffsetTypeInfo[] offTi();
-    void destroy(void* p);
-    void postblit(void* p);
-}
-
-class TypeInfo_Typedef : TypeInfo
-{
-    TypeInfo base;
-    string   name;
-    void[]   m_init;
-}
-
-class TypeInfo_Enum : TypeInfo_Typedef
-{
-
-}
-
-class TypeInfo_Pointer : TypeInfo
-{
-    TypeInfo m_next;
-}
-
-class TypeInfo_Array : TypeInfo
-{
-    TypeInfo value;
-}
-
-class TypeInfo_StaticArray : TypeInfo
-{
-    TypeInfo value;
-    size_t   len;
-}
-
-class TypeInfo_AssociativeArray : TypeInfo
-{
-    TypeInfo value;
-    TypeInfo key;
-}
-
-class TypeInfo_Function : TypeInfo
-{
-    TypeInfo next;
-}
-
-class TypeInfo_Delegate : TypeInfo
-{
-    TypeInfo next;
-}
-
-class TypeInfo_Class : TypeInfo
-{
-    ClassInfo info;
-}
-
-class TypeInfo_Interface : TypeInfo
-{
-    ClassInfo info;
-}
-
-class TypeInfo_Struct : TypeInfo
-{
-    string name;
-    void[] m_init;
-
-    uint function(in void*)               xtoHash;
-    equals_t function(in void*, in void*) xopEquals;
-    int function(in void*, in void*)      xopCmp;
-    string function(in void*)             xtoString;
-
-    uint m_flags;
-
-    const(MemberInfo[]) function(in char[]) xgetMembers;
-    void function(void*)                    xdtor;
-    void function(void*)                    xpostblit;
-}
-
-class TypeInfo_Tuple : TypeInfo
-{
-    TypeInfo[]  elements;
-}
-
-class TypeInfo_Const : TypeInfo
-{
-    TypeInfo next;
-}
-
-class TypeInfo_Invariant : TypeInfo_Const
-{
-
-}
-
-abstract class MemberInfo
-{
-    string name();
-}
-
-class MemberInfo_field : MemberInfo
-{
-    this(string name, TypeInfo ti, size_t offset);
-
-    override string name();
-    TypeInfo typeInfo();
-    size_t offset();
-}
-
-class MemberInfo_function : MemberInfo
-{
-    enum
-    {
-        Virtual = 1,
-        Member  = 2,
-        Static  = 4,
-    }
-
-    this(string name, TypeInfo ti, void* fp, uint flags);
-
-    override string name();
-    TypeInfo typeInfo();
-    void* fp();
-    uint flags();
-}
-
-class ModuleInfo
-{
-    string          name;
-    ModuleInfo[]    importedModules;
-    ClassInfo[]     localClasses;
-    uint            flags;
-
-    void function() ctor;
-    void function() dtor;
-    void function() unitTest;
-
-    void* xgetMembers;          // module getMembers() function
-    void function() ictor;      // module static constructor (order independent)
-
-    static int opApply(int delegate(inout ModuleInfo));
-}
-
-class Throwable : Object
-{
-    interface TraceInfo
-    {
-        int opApply(int delegate(inout char[]));
-        string toString();
-    }
-
-    string      msg;
-    string      file;
-    size_t      line;
-    TraceInfo   info;
-    Throwable   next;
-
-    this(string msg, Throwable next = null);
-    this(string msg, string file, size_t line, Throwable next = null);
-    override string toString();
-}
-
-
-class Exception : Throwable
-{
-    this(string msg, Throwable next = null);
-    this(string msg, string file, size_t line, Throwable next = null);
-}
-
-
-class Error : Throwable
-{
-    this(string msg, Throwable next = null);
-    this(string msg, string file, size_t line, Throwable next = null);
-}
--- a/druntime/import/std/c/stdarg.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/**
- * These functions are built-in intrinsics to the compiler.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   David Friedman
- */
-module std.c.stdarg;
-
-version( GNU )
-{
-    private import gcc.builtins;
-    alias __builtin_va_list va_list;
-    alias __builtin_va_end  va_end;
-    alias __builtin_va_copy va_copy;
-}
-
-template va_start(T)
-{
-    void va_start( out va_list ap, inout T parmn )
-    {
-
-    }
-}
-
-template va_arg(T)
-{
-    T va_arg( inout va_list ap )
-    {
-        return T.init;
-    }
-}
--- a/druntime/import/std/intrinsic.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/**
- * These functions are built-in intrinsics to the compiler.
- *
- * Intrinsic functions are functions built in to the compiler, usually to take
- * advantage of specific CPU features that are inefficient to handle via
- * external functions.  The compiler's optimizer and code generator are fully
- * integrated in with intrinsic functions, bringing to bear their full power on
- * them. This can result in some surprising speedups.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Walter Bright
- */
-module std.intrinsic;
-
-
-/**
- * Scans the bits in v starting with bit 0, looking
- * for the first set bit.
- * Returns:
- *      The bit number of the first bit set.
- *      The return value is undefined if v is zero.
- */
-int bsf( uint v );
-
-
-/**
- * Scans the bits in v from the most significant bit
- * to the least significant bit, looking
- * for the first set bit.
- * Returns:
- *      The bit number of the first bit set.
- *      The return value is undefined if v is zero.
- * Example:
- * ---
- * import std.intrinsic;
- *
- * int main()
- * {
- *     uint v;
- *     int x;
- *
- *     v = 0x21;
- *     x = bsf(v);
- *     printf("bsf(x%x) = %d\n", v, x);
- *     x = bsr(v);
- *     printf("bsr(x%x) = %d\n", v, x);
- *     return 0;
- * }
- * ---
- * Output:
- *  bsf(x21) = 0<br>
- *  bsr(x21) = 5
- */
-int bsr( uint v );
-
-
-/**
- * Tests the bit.
- */
-int bt( const uint* p, uint bitnum );
-
-
-/**
- * Tests and complements the bit.
- */
-int btc( uint* p, uint bitnum );
-
-
-/**
- * Tests and resets (sets to 0) the bit.
- */
-int btr( uint* p, uint bitnum );
-
-
-/**
- * Tests and sets the bit.
- * Params:
- * p = a non-NULL pointer to an array of uints.
- * index = a bit number, starting with bit 0 of p[0],
- * and progressing. It addresses bits like the expression:
----
-p[index / (uint.sizeof*8)] & (1 << (index & ((uint.sizeof*8) - 1)))
----
- * Returns:
- *      A non-zero value if the bit was set, and a zero
- *      if it was clear.
- *
- * Example:
- * ---
-import std.intrinsic;
-
-int main()
-{
-    uint array[2];
-
-    array[0] = 2;
-    array[1] = 0x100;
-
-    printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
-    printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-    printf("btc(array, 35) = %d\n", <b>btc</b>(array, 35));
-    printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-    printf("bts(array, 35) = %d\n", <b>bts</b>(array, 35));
-    printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-    printf("btr(array, 35) = %d\n", <b>btr</b>(array, 35));
-    printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-    printf("bt(array, 1) = %d\n", <b>bt</b>(array, 1));
-    printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
-
-    return 0;
-}
- * ---
- * Output:
-<pre>
-btc(array, 35) = 0
-array = [0]:x2, [1]:x108
-btc(array, 35) = -1
-array = [0]:x2, [1]:x100
-bts(array, 35) = 0
-array = [0]:x2, [1]:x108
-btr(array, 35) = -1
-array = [0]:x2, [1]:x100
-bt(array, 1) = -1
-array = [0]:x2, [1]:x100
-</pre>
- */
-int bts( uint* p, uint bitnum );
-
-
-/**
- * Swaps bytes in a 4 byte uint end-to-end, i.e. byte 0 becomes
- * byte 3, byte 1 becomes byte 2, byte 2 becomes byte 1, byte 3
- * becomes byte 0.
- */
-uint bswap( uint v );
-
-
-/**
- * Reads I/O port at port_address.
- */
-ubyte inp( uint port_address );
-
-
-/**
- * ditto
- */
-ushort inpw( uint port_address );
-
-
-/**
- * ditto
- */
-uint inpl( uint port_address );
-
-
-/**
- * Writes and returns value to I/O port at port_address.
- */
-ubyte outp( uint port_address, ubyte value );
-
-
-/**
- * ditto
- */
-ushort outpw( uint port_address, ushort value );
-
-
-/**
- * ditto
- */
-uint outpl( uint port_address, uint value );
--- a/druntime/import/std/stdarg.di	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/**
- * These functions are built-in intrinsics to the compiler.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   David Friedman
- */
-module std.stdarg;
-
-version( GNU )
-{
-    private import gcc.builtins;
-    alias __builtin_va_list va_list;
-    alias __builtin_va_end  va_end;
-    alias __builtin_va_copy va_copy;
-}
-
-template va_start(T)
-{
-    void va_start( out va_list ap, inout T parmn )
-    {
-
-    }
-}
-
-template va_arg(T)
-{
-    T va_arg( inout va_list ap )
-    {
-        return T.init;
-    }
-}
--- a/druntime/import/stdc/complex.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.complex;
-
-extern (C):
-
-cdouble cacos(cdouble z);
-cfloat  cacosf(cfloat z);
-creal   cacosl(creal z);
-
-cdouble casin(cdouble z);
-cfloat  casinf(cfloat z);
-creal   casinl(creal z);
-
-cdouble catan(cdouble z);
-cfloat  catanf(cfloat z);
-creal   catanl(creal z);
-
-cdouble ccos(cdouble z);
-cfloat  ccosf(cfloat z);
-creal   ccosl(creal z);
-
-cdouble csin(cdouble z);
-cfloat  csinf(cfloat z);
-creal   csinl(creal z);
-
-cdouble ctan(cdouble z);
-cfloat  ctanf(cfloat z);
-creal   ctanl(creal z);
-
-cdouble cacosh(cdouble z);
-cfloat  cacoshf(cfloat z);
-creal   cacoshl(creal z);
-
-cdouble casinh(cdouble z);
-cfloat  casinhf(cfloat z);
-creal   casinhl(creal z);
-
-cdouble catanh(cdouble z);
-cfloat  catanhf(cfloat z);
-creal   catanhl(creal z);
-
-cdouble ccosh(cdouble z);
-cfloat  ccoshf(cfloat z);
-creal   ccoshl(creal z);
-
-cdouble csinh(cdouble z);
-cfloat  csinhf(cfloat z);
-creal   csinhl(creal z);
-
-cdouble ctanh(cdouble z);
-cfloat  ctanhf(cfloat z);
-creal   ctanhl(creal z);
-
-cdouble cexp(cdouble z);
-cfloat  cexpf(cfloat z);
-creal   cexpl(creal z);
-
-cdouble clog(cdouble z);
-cfloat  clogf(cfloat z);
-creal   clogl(creal z);
-
- double cabs(cdouble z);
- float  cabsf(cfloat z);
- real   cabsl(creal z);
-
-cdouble cpow(cdouble x, cdouble y);
-cfloat  cpowf(cfloat x, cfloat y);
-creal   cpowl(creal x, creal y);
-
-cdouble csqrt(cdouble z);
-cfloat  csqrtf(cfloat z);
-creal   csqrtl(creal z);
-
- double  carg(cdouble z);
- float   cargf(cfloat z);
- real    cargl(creal z);
-
- double cimag(cdouble z);
- float  cimagf(cfloat z);
- real   cimagl(creal z);
-
-cdouble conj(cdouble z);
-cfloat  conjf(cfloat z);
-creal   conjl(creal z);
-
-cdouble cproj(cdouble z);
-cfloat  cprojf(cfloat z);
-creal   cprojl(creal z);
-
-// double creal(cdouble z);
- float  crealf(cfloat z);
- real   creall(creal z);
--- a/druntime/import/stdc/config.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.config;
-
-extern (C):
-
-version( Windows )
-{
-    alias int   c_long;
-    alias uint  c_ulong;
-}
-else
-{
-  static if( (void*).sizeof > int.sizeof )
-  {
-    alias long  c_long;
-    alias ulong c_ulong;
-  }
-  else
-  {
-    alias int   c_long;
-    alias uint  c_ulong;
-  }
-}
--- a/druntime/import/stdc/ctype.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.ctype;
-
-extern (C):
-
-int isalnum(int c);
-int isalpha(int c);
-int isblank(int c);
-int iscntrl(int c);
-int isdigit(int c);
-int isgraph(int c);
-int islower(int c);
-int isprint(int c);
-int ispunct(int c);
-int isspace(int c);
-int isupper(int c);
-int isxdigit(int c);
-int tolower(int c);
-int toupper(int c);
--- a/druntime/import/stdc/errno.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,375 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.errno;
-
-private
-{
-    extern (C) int getErrno();
-    extern (C) int setErrno(int);
-}
-
-int errno()          { return getErrno();      }
-int errno( int val ) { return setErrno( val ); }
-
-extern (C):
-
-version( Windows )
-{
-    const EPERM             = 1;        // Operation not permitted
-    const ENOENT            = 2;        // No such file or directory
-    const ESRCH             = 3;        // No such process
-    const EINTR             = 4;        // Interrupted system call
-    const EIO               = 5;        // I/O error
-    const ENXIO             = 6;        // No such device or address
-    const E2BIG             = 7;        // Argument list too long
-    const ENOEXEC           = 8;        // Exec format error
-    const EBADF             = 9;        // Bad file number
-    const ECHILD            = 10;       // No child processes
-    const EAGAIN            = 11;       // Try again
-    const ENOMEM            = 12;       // Out of memory
-    const EACCES            = 13;       // Permission denied
-    const EFAULT            = 14;       // Bad address
-    const EBUSY             = 16;       // Device or resource busy
-    const EEXIST            = 17;       // File exists
-    const EXDEV             = 18;       // Cross-device link
-    const ENODEV            = 19;       // No such device
-    const ENOTDIR           = 20;       // Not a directory
-    const EISDIR            = 21;       // Is a directory
-    const EINVAL            = 22;       // Invalid argument
-    const ENFILE            = 23;       // File table overflow
-    const EMFILE            = 24;       // Too many open files
-    const ENOTTY            = 25;       // Not a typewriter
-    const EFBIG             = 27;       // File too large
-    const ENOSPC            = 28;       // No space left on device
-    const ESPIPE            = 29;       // Illegal seek
-    const EROFS             = 30;       // Read-only file system
-    const EMLINK            = 31;       // Too many links
-    const EPIPE             = 32;       // Broken pipe
-    const EDOM              = 33;       // Math argument out of domain of func
-    const ERANGE            = 34;       // Math result not representable
-    const EDEADLK           = 36;       // Resource deadlock would occur
-    const ENAMETOOLONG      = 38;       // File name too long
-    const ENOLCK            = 39;       // No record locks available
-    const ENOSYS            = 40;       // Function not implemented
-    const ENOTEMPTY         = 41;       // Directory not empty
-    const EILSEQ            = 42;       // Illegal byte sequence
-    const EDEADLOCK         = EDEADLK;
-}
-else version( linux )
-{
-    const EPERM             = 1;        // Operation not permitted
-    const ENOENT            = 2;        // No such file or directory
-    const ESRCH             = 3;        // No such process
-    const EINTR             = 4;        // Interrupted system call
-    const EIO               = 5;        // I/O error
-    const ENXIO             = 6;        // No such device or address
-    const E2BIG             = 7;        // Argument list too long
-    const ENOEXEC           = 8;        // Exec format error
-    const EBADF             = 9;        // Bad file number
-    const ECHILD            = 10;       // No child processes
-    const EAGAIN            = 11;       // Try again
-    const ENOMEM            = 12;       // Out of memory
-    const EACCES            = 13;       // Permission denied
-    const EFAULT            = 14;       // Bad address
-    const ENOTBLK           = 15;       // Block device required
-    const EBUSY             = 16;       // Device or resource busy
-    const EEXIST            = 17;       // File exists
-    const EXDEV             = 18;       // Cross-device link
-    const ENODEV            = 19;       // No such device
-    const ENOTDIR           = 20;       // Not a directory
-    const EISDIR            = 21;       // Is a directory
-    const EINVAL            = 22;       // Invalid argument
-    const ENFILE            = 23;       // File table overflow
-    const EMFILE            = 24;       // Too many open files
-    const ENOTTY            = 25;       // Not a typewriter
-    const ETXTBSY           = 26;       // Text file busy
-    const EFBIG             = 27;       // File too large
-    const ENOSPC            = 28;       // No space left on device
-    const ESPIPE            = 29;       // Illegal seek
-    const EROFS             = 30;       // Read-only file system
-    const EMLINK            = 31;       // Too many links
-    const EPIPE             = 32;       // Broken pipe
-    const EDOM              = 33;       // Math argument out of domain of func
-    const ERANGE            = 34;       // Math result not representable
-    const EDEADLK           = 35;       // Resource deadlock would occur
-    const ENAMETOOLONG      = 36;       // File name too long
-    const ENOLCK            = 37;       // No record locks available
-    const ENOSYS            = 38;       // Function not implemented
-    const ENOTEMPTY         = 39;       // Directory not empty
-    const ELOOP             = 40;       // Too many symbolic links encountered
-    const EWOULDBLOCK       = EAGAIN;   // Operation would block
-    const ENOMSG            = 42;       // No message of desired type
-    const EIDRM             = 43;       // Identifier removed
-    const ECHRNG            = 44;       // Channel number out of range
-    const EL2NSYNC          = 45;       // Level 2 not synchronized
-    const EL3HLT            = 46;       // Level 3 halted
-    const EL3RST            = 47;       // Level 3 reset
-    const ELNRNG            = 48;       // Link number out of range
-    const EUNATCH           = 49;       // Protocol driver not attached
-    const ENOCSI            = 50;       // No CSI structure available
-    const EL2HLT            = 51;       // Level 2 halted
-    const EBADE             = 52;       // Invalid exchange
-    const EBADR             = 53;       // Invalid request descriptor
-    const EXFULL            = 54;       // Exchange full
-    const ENOANO            = 55;       // No anode
-    const EBADRQC           = 56;       // Invalid request code
-    const EBADSLT           = 57;       // Invalid slot
-    const EDEADLOCK         = EDEADLK;
-    const EBFONT            = 59;       // Bad font file format
-    const ENOSTR            = 60;       // Device not a stream
-    const ENODATA           = 61;       // No data available
-    const ETIME             = 62;       // Timer expired
-    const ENOSR             = 63;       // Out of streams resources
-    const ENONET            = 64;       // Machine is not on the network
-    const ENOPKG            = 65;       // Package not installed
-    const EREMOTE           = 66;       // Object is remote
-    const ENOLINK           = 67;       // Link has been severed
-    const EADV              = 68;       // Advertise error
-    const ESRMNT            = 69;       // Srmount error
-    const ECOMM             = 70;       // Communication error on send
-    const EPROTO            = 71;       // Protocol error
-    const EMULTIHOP         = 72;       // Multihop attempted
-    const EDOTDOT           = 73;       // RFS specific error
-    const EBADMSG           = 74;       // Not a data message
-    const EOVERFLOW         = 75;       // Value too large for defined data type
-    const ENOTUNIQ          = 76;       // Name not unique on network
-    const EBADFD            = 77;       // File descriptor in bad state
-    const EREMCHG           = 78;       // Remote address changed
-    const ELIBACC           = 79;       // Can not access a needed shared library
-    const ELIBBAD           = 80;       // Accessing a corrupted shared library
-    const ELIBSCN           = 81;       // .lib section in a.out corrupted
-    const ELIBMAX           = 82;       // Attempting to link in too many shared libraries
-    const ELIBEXEC          = 83;       // Cannot exec a shared library directly
-    const EILSEQ            = 84;       // Illegal byte sequence
-    const ERESTART          = 85;       // Interrupted system call should be restarted
-    const ESTRPIPE          = 86;       // Streams pipe error
-    const EUSERS            = 87;       // Too many users
-    const ENOTSOCK          = 88;       // Socket operation on non-socket
-    const EDESTADDRREQ      = 89;       // Destination address required
-    const EMSGSIZE          = 90;       // Message too long
-    const EPROTOTYPE        = 91;       // Protocol wrong type for socket
-    const ENOPROTOOPT       = 92;       // Protocol not available
-    const EPROTONOSUPPORT   = 93;       // Protocol not supported
-    const ESOCKTNOSUPPORT   = 94;       // Socket type not supported
-    const EOPNOTSUPP        = 95;       // Operation not supported on transport endpoint
-    const EPFNOSUPPORT      = 96;       // Protocol family not supported
-    const EAFNOSUPPORT      = 97;       // Address family not supported by protocol
-    const EADDRINUSE        = 98;       // Address already in use
-    const EADDRNOTAVAIL     = 99;       // Cannot assign requested address
-    const ENETDOWN          = 100;      // Network is down
-    const ENETUNREACH       = 101;      // Network is unreachable
-    const ENETRESET         = 102;      // Network dropped connection because of reset
-    const ECONNABORTED      = 103;      // Software caused connection abort
-    const ECONNRESET        = 104;      // Connection reset by peer
-    const ENOBUFS           = 105;      // No buffer space available
-    const EISCONN           = 106;      // Transport endpoint is already connected
-    const ENOTCONN          = 107;      // Transport endpoint is not connected
-    const ESHUTDOWN         = 108;      // Cannot send after transport endpoint shutdown
-    const ETOOMANYREFS      = 109;      // Too many references: cannot splice
-    const ETIMEDOUT         = 110;      // Connection timed out
-    const ECONNREFUSED      = 111;      // Connection refused
-    const EHOSTDOWN         = 112;      // Host is down
-    const EHOSTUNREACH      = 113;      // No route to host
-    const EALREADY          = 114;      // Operation already in progress
-    const EINPROGRESS       = 115;      // Operation now in progress
-    const ESTALE            = 116;      // Stale NFS file handle
-    const EUCLEAN           = 117;      // Structure needs cleaning
-    const ENOTNAM           = 118;      // Not a XENIX named type file
-    const ENAVAIL           = 119;      // No XENIX semaphores available
-    const EISNAM            = 120;      // Is a named type file
-    const EREMOTEIO         = 121;      // Remote I/O error
-    const EDQUOT            = 122;      // Quota exceeded
-    const ENOMEDIUM         = 123;      // No medium found
-    const EMEDIUMTYPE       = 124;      // Wrong medium type
-    const ECANCELED         = 125;      // Operation Canceled
-    const ENOKEY            = 126;      // Required key not available
-    const EKEYEXPIRED       = 127;      // Key has expired
-    const EKEYREVOKED       = 128;      // Key has been revoked
-    const EKEYREJECTED      = 129;      // Key was rejected by service
-    const EOWNERDEAD        = 130;      // Owner died
-    const ENOTRECOVERABLE   = 131;      // State not recoverable
-}
-else version( darwin )
-{
-    const EPERM             = 1;        // Operation not permitted
-    const ENOENT            = 2;        // No such file or directory
-    const ESRCH             = 3;        // No such process
-    const EINTR             = 4;        // Interrupted system call
-    const EIO               = 5;        // Input/output error
-    const ENXIO             = 6;        // Device not configured
-    const E2BIG             = 7;        // Argument list too long
-    const ENOEXEC           = 8;        // Exec format error
-    const EBADF             = 9;        // Bad file descriptor
-    const ECHILD            = 10;       // No child processes
-    const EDEADLK           = 11;       // Resource deadlock avoided
-    const ENOMEM            = 12;       // Cannot allocate memory
-    const EACCES            = 13;       // Permission denied
-    const EFAULT            = 14;       // Bad address
-    const EBUSY             = 16;       // Device busy
-    const EEXIST            = 17;       // File exists
-    const EXDEV             = 18;       // Cross-device link
-    const ENODEV            = 19;       // Operation not supported by device
-    const ENOTDIR           = 20;       // Not a directory
-    const EISDIR            = 21;       // Is a directory
-    const EINVAL            = 22;       // Invalid argument
-    const ENFILE            = 23;       // Too many open files in system
-    const EMFILE            = 24;       // Too many open files
-    const ENOTTY            = 25;       // Inappropriate ioctl for device
-    const ETXTBSY           = 26;       // Text file busy
-    const EFBIG             = 27;       // File too large
-    const ENOSPC            = 28;       // No space left on device
-    const ESPIPE            = 29;       // Illegal seek
-    const EROFS             = 30;       // Read-only file system
-    const EMLINK            = 31;       // Too many links
-    const EPIPE             = 32;       // Broken pipe
-    const EDOM              = 33;       // Numerical argument out of domain
-    const ERANGE            = 34;       // Result too large
-    const EAGAIN            = 35;       // Resource temporarily unavailable
-    const EWOULDBLOCK       = EAGAIN;   // Operation would block
-    const EINPROGRESS       = 36;       // Operation now in progress
-    const EALREADY          = 37;       // Operation already in progress
-    const ENOTSOCK          = 38;       // Socket operation on non-socket
-    const EDESTADDRREQ      = 39;       // Destination address required
-    const EMSGSIZE          = 40;       // Message too long
-    const EPROTOTYPE        = 41;       // Protocol wrong type for socket
-    const ENOPROTOOPT       = 42;       // Protocol not available
-    const EPROTONOSUPPORT   = 43;       // Protocol not supported
-    const ENOTSUP           = 45;       // Operation not supported
-    const EOPNOTSUPP        = ENOTSUP;  // Operation not supported on socket
-    const EAFNOSUPPORT      = 47;       // Address family not supported by protocol family
-    const EADDRINUSE        = 48;       // Address already in use
-    const EADDRNOTAVAIL     = 49;       // Can't assign requested address
-    const ENETDOWN          = 50;       // Network is down
-    const ENETUNREACH       = 51;       // Network is unreachable
-    const ENETRESET         = 52;       // Network dropped connection on reset
-    const ECONNABORTED      = 53;       // Software caused connection abort
-    const ECONNRESET        = 54;       // Connection reset by peer
-    const ENOBUFS           = 55;       // No buffer space available
-    const EISCONN           = 56;       // Socket is already connected
-    const ENOTCONN          = 57;       // Socket is not connected
-    const ETIMEDOUT         = 60;       // Operation timed out
-    const ECONNREFUSED      = 61;       // Connection refused
-    const ELOOP             = 62;       // Too many levels of symbolic links
-    const ENAMETOOLONG      = 63;       // File name too long
-    const EHOSTUNREACH      = 65;       // No route to host
-    const ENOTEMPTY         = 66;       // Directory not empty
-    const EDQUOT            = 69;       // Disc quota exceeded
-    const ESTALE            = 70;       // Stale NFS file handle
-    const ENOLCK            = 77;       // No locks available
-    const ENOSYS            = 78;       // Function not implemented
-    const EOVERFLOW         = 84;       // Value too large to be stored in data type
-    const ECANCELED         = 89;       // Operation canceled
-    const EIDRM             = 90;       // Identifier removed
-    const ENOMSG            = 91;       // No message of desired type
-    const EILSEQ            = 92;       // Illegal byte sequence
-    const EBADMSG           = 94;       // Bad message
-    const EMULTIHOP         = 95;       // Reserved
-    const ENODATA           = 96;       // No message available on STREAM
-    const ENOLINK           = 97;       // Reserved
-    const ENOSR             = 98;       // No STREAM resources
-    const ENOSTR            = 99;       // Not a STREAM
-    const EPROTO            = 100;      // Protocol error
-    const ETIME             = 101;      // STREAM ioctl timeout
-    const ELAST             = 101;      // Must be equal largest errno
-}
-else version( freebsd )
-{
-    const EPERM             = 1;        // Operation not permitted
-    const ENOENT            = 2;        // No such file or directory
-    const ESRCH             = 3;        // No such process
-    const EINTR             = 4;        // Interrupted system call
-    const EIO               = 5;        // Input/output error
-    const ENXIO             = 6;        // Device not configured
-    const E2BIG             = 7;        // Argument list too long
-    const ENOEXEC           = 8;        // Exec format error
-    const EBADF             = 9;        // Bad file descriptor
-    const ECHILD            = 10;       // No child processes
-    const EDEADLK           = 11;       // Resource deadlock avoided
-    const ENOMEM            = 12;       // Cannot allocate memory
-    const EACCES            = 13;       // Permission denied
-    const EFAULT            = 14;       // Bad address
-    const ENOTBLK           = 15;       // Block device required
-    const EBUSY             = 16;       // Device busy
-    const EEXIST            = 17;       // File exists
-    const EXDEV             = 18;       // Cross-device link
-    const ENODEV            = 19;       // Operation not supported by device
-    const ENOTDIR           = 20;       // Not a directory
-    const EISDIR            = 21;       // Is a directory
-    const EINVAL            = 22;       // Invalid argument
-    const ENFILE            = 23;       // Too many open files in system
-    const EMFILE            = 24;       // Too many open files
-    const ENOTTY            = 25;       // Inappropriate ioctl for device
-    const ETXTBSY           = 26;       // Text file busy
-    const EFBIG             = 27;       // File too large
-    const ENOSPC            = 28;       // No space left on device
-    const ESPIPE            = 29;       // Illegal seek
-    const EROFS             = 30;       // Read-only file system
-    const EMLINK            = 31;       // Too many links
-    const EPIPE             = 32;       // Broken pipe
-    const EDOM              = 33;       // Numerical argument out of domain
-    const ERANGE            = 34;       // Result too large
-    const EAGAIN            = 35;       // Resource temporarily unavailable
-    const EWOULDBLOCK       = EAGAIN;   // Operation would block
-    const EINPROGRESS       = 36;       // Operation now in progress
-    const EALREADY          = 37;       // Operation already in progress
-    const ENOTSOCK          = 38;       // Socket operation on non-socket
-    const EDESTADDRREQ      = 39;       // Destination address required
-    const EMSGSIZE          = 40;       // Message too long
-    const EPROTOTYPE        = 41;       // Protocol wrong type for socket
-    const ENOPROTOOPT       = 42;       // Protocol not available
-    const EPROTONOSUPPORT   = 43;       // Protocol not supported
-    const ENOTSUP           = 45;       // Operation not supported
-    const EOPNOTSUPP        = ENOTSUP;  // Operation not supported on socket
-    const EAFNOSUPPORT      = 47;       // Address family not supported by protocol family
-    const EADDRINUSE        = 48;       // Address already in use
-    const EADDRNOTAVAIL     = 49;       // Can't assign requested address
-    const ENETDOWN          = 50;       // Network is down
-    const ENETUNREACH       = 51;       // Network is unreachable
-    const ENETRESET         = 52;       // Network dropped connection on reset
-    const ECONNABORTED      = 53;       // Software caused connection abort
-    const ECONNRESET        = 54;       // Connection reset by peer
-    const ENOBUFS           = 55;       // No buffer space available
-    const EISCONN           = 56;       // Socket is already connected
-    const ENOTCONN          = 57;       // Socket is not connected
-    const ESHUTDOWN         = 58;       // Can't send after socket shutdown
-    const ETOOMANYREFS      = 59;       // Too many refrences; can't splice
-    const ETIMEDOUT         = 60;       // Operation timed out
-    const ECONNREFUSED      = 61;       // Connection refused
-    const ELOOP             = 62;       // Too many levels of symbolic links
-    const ENAMETOOLONG      = 63;       // File name too long
-    const EHOSTUNREACH      = 65;       // No route to host
-    const ENOTEMPTY         = 66;       // Directory not empty
-    const EPROCLIM          = 67;       // Too many processes
-    const EUSERS            = 68;       // Too many users
-    const EDQUOT            = 69;       // Disc quota exceeded
-    const ESTALE            = 70;       // Stale NFS file handle
-    const EREMOTE           = 71;       // Too many levels of remote in path
-    const EBADRPC           = 72;       // RPC struct is bad
-    const ERPCMISMATCH      = 73;       // RPC version wrong
-    const EPROGUNAVAIL      = 74;       // RPC prog. not avail
-    const EPROGMISMATCH     = 75;       // Program version wrong
-    const EPROCUNAVAIL      = 76;       // Bad procedure for program
-    const ENOLCK            = 77;       // No locks available
-    const ENOSYS            = 78;       // Function not implemented
-    const EFTYPE            = 79;       // Inappropriate file type or format
-    const EAUTH             = 80;       // Authentication error
-    const ENEEDAUTH         = 81;       // Need authenticator
-    const EIDRM             = 82;       // Itendifier removed
-    const ENOMSG            = 83;       // No message of desired type
-    const EOVERFLOW         = 84;       // Value too large to be stored in data type
-    const ECANCELED         = 85;       // Operation canceled
-    const EILSEQ            = 86;       // Illegal byte sequence
-    const ENOATTR           = 87;       // Attribute not found
-    const EDOOFUS           = 88;       // Programming error
-    const EBADMSG           = 89;       // Bad message
-    const EMULTIHOP         = 90;       // Multihop attempted
-    const ENOLINK           = 91;       // Link has been severed
-    const EPROTO            = 92;       // Protocol error
-    const ELAST             = 92;       // Must be equal largest errno
-}
--- a/druntime/import/stdc/fenv.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly, Walter Bright
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.fenv;
-
-extern (C):
-
-version( Windows )
-{
-    struct fenv_t
-    {
-        ushort    status;
-        ushort    control;
-        ushort    round;
-        ushort[2] reserved;
-    }
-
-    alias int fexcept_t;
-}
-else version( linux )
-{
-    struct fenv_t
-    {
-        ushort __control_word;
-        ushort __unused1;
-        ushort __status_word;
-        ushort __unused2;
-        ushort __tags;
-        ushort __unused3;
-        uint   __eip;
-        ushort __cs_selector;
-        ushort __opcode;
-        uint   __data_offset;
-        ushort __data_selector;
-        ushort __unused5;
-    }
-
-    alias int fexcept_t;
-}
-else version ( darwin )
-{
-    version ( BigEndian )
-    {
-        alias uint fenv_t;
-        alias uint fexcept_t;
-    }
-    version ( LittleEndian )
-    {
-        struct fenv_t
-        {
-            ushort  __control;
-            ushort  __status;
-            uint    __mxcsr;
-            byte[8] __reserved;
-        }
-
-        alias ushort fexcept_t;
-    }
-}
-else version ( freebsd )
-{
-    struct fenv_t
-    {
-        ushort __control;
-        ushort __mxcsr_hi;
-        ushort __status;
-        ushort __mxcsr_lo;
-        uint __tag;
-        byte[16] __other;
-    }
-
-    alias ushort fexcept_t;
-}
-else
-{
-    static assert( false );
-}
-
-enum
-{
-    FE_INVALID      = 1,
-    FE_DENORMAL     = 2, // non-standard
-    FE_DIVBYZERO    = 4,
-    FE_OVERFLOW     = 8,
-    FE_UNDERFLOW    = 0x10,
-    FE_INEXACT      = 0x20,
-    FE_ALL_EXCEPT   = 0x3F,
-    FE_TONEAREST    = 0,
-    FE_UPWARD       = 0x800,
-    FE_DOWNWARD     = 0x400,
-    FE_TOWARDZERO   = 0xC00,
-}
-
-version( Windows )
-{
-    private extern fenv_t _FE_DFL_ENV;
-    fenv_t* FE_DFL_ENV = &_FE_DFL_ENV;
-}
-else version( linux )
-{
-    fenv_t* FE_DFL_ENV = cast(fenv_t*)(-1);
-}
-else version( darwin )
-{
-    private extern fenv_t _FE_DFL_ENV;
-    fenv_t* FE_DFL_ENV = &_FE_DFL_ENV;
-}
-else version( freebsd )
-{
-    private extern fenv_t __fe_dfl_env;
-    fenv_t* FE_DFL_ENV = &__fe_dfl_env;
-}
-else
-{
-    static assert( false );
-}
-
-void feraiseexcept(int excepts);
-void feclearexcept(int excepts);
-
-int fetestexcept(int excepts);
-int feholdexcept(fenv_t* envp);
-
-void fegetexceptflag(fexcept_t* flagp, int excepts);
-void fesetexceptflag(in fexcept_t* flagp, int excepts);
-
-int fegetround();
-int fesetround(int round);
-
-void fegetenv(fenv_t* envp);
-void fesetenv(in fenv_t* envp);
-void feupdateenv(in fenv_t* envp);
--- a/druntime/import/stdc/inttypes.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.inttypes;
-
-public import stdc.stddef;
-public import stdc.stdint;
-
-extern (C):
-
-struct imaxdiv_t
-{
-    intmax_t    quot,
-                rem;
-}
-
-version( VerboseC )
-{
-    const char* PRId8           = "hhd";
-    const char* PRId16          = "hd";
-    const char* PRId32          = "ld";
-    const char* PRId64          = "lld";
-
-    const char* PRIdLEAST8      = "hhd";
-    const char* PRIdLEAST16     = "hd";
-    const char* PRIdLEAST32     = "ld";
-    const char* PRIdLEAST64     = "lld";
-
-    const char* PRIdFAST8       = "hhd";
-    const char* PRIdFAST16      = "d";
-    const char* PRIdFAST32      = "ld";
-    const char* PRIdFAST64      = "lld";
-
-    const char* PRIi8           = "hhi";
-    const char* PRIi16          = "hi";
-    const char* PRIi32          = "li";
-    const char* PRIi64          = "lli";
-
-    const char* PRIiLEAST8      = "hhi";
-    const char* PRIiLEAST16     = "hi";
-    const char* PRIiLEAST32     = "li";
-    const char* PRIiLEAST64     = "lli";
-
-    const char* PRIiFAST8       = "hhi";
-    const char* PRIiFAST16      = "i";
-    const char* PRIiFAST32      = "li";
-    const char* PRIiFAST64      = "lli";
-
-    const char* PRIo8           = "hho";
-    const char* PRIo16          = "ho";
-    const char* PRIo32          = "lo";
-    const char* PRIo64          = "llo";
-
-    const char* PRIoLEAST8      = "hho";
-    const char* PRIoLEAST16     = "ho";
-    const char* PRIoLEAST32     = "lo";
-    const char* PRIoLEAST64     = "llo";
-
-    const char* PRIoFAST8       = "hho";
-    const char* PRIoFAST16      = "o";
-    const char* PRIoFAST32      = "lo";
-    const char* PRIoFAST64      = "llo";
-
-    const char* PRIu8           = "hhu";
-    const char* PRIu16          = "hu";
-    const char* PRIu32          = "lu";
-    const char* PRIu64          = "llu";
-
-    const char* PRIuLEAST8      = "hhu";
-    const char* PRIuLEAST16     = "hu";
-    const char* PRIuLEAST32     = "lu";
-    const char* PRIuLEAST64     = "llu";
-
-    const char* PRIuFAST8       = "hhu";
-    const char* PRIuFAST16      = "u";
-    const char* PRIuFAST32      = "lu";
-    const char* PRIuFAST64      = "llu";
-
-    const char* PRIx8           = "hhx";
-    const char* PRIx16          = "hx";
-    const char* PRIx32          = "lx";
-    const char* PRIx64          = "llx";
-
-    const char* PRIxLEAST8      = "hhx";
-    const char* PRIxLEAST16     = "hx";
-    const char* PRIxLEAST32     = "lx";
-    const char* PRIxLEAST64     = "llx";
-
-    const char* PRIxFAST8       = "hhx";
-    const char* PRIxFAST16      = "x";
-    const char* PRIxFAST32      = "lx";
-    const char* PRIxFAST64      = "llx";
-
-    const char* PRIX8           = "hhX";
-    const char* PRIX16          = "hX";
-    const char* PRIX32          = "lX";
-    const char* PRIX64          = "llX";
-
-    const char* PRIXLEAST8      = "hhX";
-    const char* PRIXLEAST16     = "hX";
-    const char* PRIXLEAST32     = "lX";
-    const char* PRIXLEAST64     = "llX";
-
-    const char* PRIXFAST8       = "hhX";
-    const char* PRIXFAST16      = "X";
-    const char* PRIXFAST32      = "lX";
-    const char* PRIXFAST64      = "llX";
-
-    const char* SCNd8           = "hhd";
-    const char* SCNd16          = "hd";
-    const char* SCNd32          = "ld";
-    const char* SCNd64          = "lld";
-
-    const char* SCNdLEAST8      = "hhd";
-    const char* SCNdLEAST16     = "hd";
-    const char* SCNdLEAST32     = "ld";
-    const char* SCNdLEAST64     = "lld";
-
-    const char* SCNdFAST8       = "hhd";
-    const char* SCNdFAST16      = "d";
-    const char* SCNdFAST32      = "ld";
-    const char* SCNdFAST64      = "lld";
-
-    const char* SCNi8           = "hhd";
-    const char* SCNi16          = "hi";
-    const char* SCNi32          = "li";
-    const char* SCNi64          = "lli";
-
-    const char* SCNiLEAST8      = "hhd";
-    const char* SCNiLEAST16     = "hi";
-    const char* SCNiLEAST32     = "li";
-    const char* SCNiLEAST64     = "lli";
-
-    const char* SCNiFAST8       = "hhd";
-    const char* SCNiFAST16      = "i";
-    const char* SCNiFAST32      = "li";
-    const char* SCNiFAST64      = "lli";
-
-    const char* SCNo8           = "hhd";
-    const char* SCNo16          = "ho";
-    const char* SCNo32          = "lo";
-    const char* SCNo64          = "llo";
-
-    const char* SCNoLEAST8      = "hhd";
-    const char* SCNoLEAST16     = "ho";
-    const char* SCNoLEAST32     = "lo";
-    const char* SCNoLEAST64     = "llo";
-
-    const char* SCNoFAST8       = "hhd";
-    const char* SCNoFAST16      = "o";
-    const char* SCNoFAST32      = "lo";
-    const char* SCNoFAST64      = "llo";
-
-    const char* SCNu8           = "hhd";
-    const char* SCNu16          = "hu";
-    const char* SCNu32          = "lu";
-    const char* SCNu64          = "llu";
-
-    const char* SCNuLEAST8      = "hhd";
-    const char* SCNuLEAST16     = "hu";
-    const char* SCNuLEAST32     = "lu";
-    const char* SCNuLEAST64     = "llu";
-
-    const char* SCNuFAST8       = "hhd";
-    const char* SCNuFAST16      = "u";
-    const char* SCNuFAST32      = "lu";
-    const char* SCNuFAST64      = "llu";
-
-    const char* SCNx8           = "hhd";
-    const char* SCNx16          = "hx";
-    const char* SCNx32          = "lx";
-    const char* SCNx64          = "llx";
-
-    const char* SCNxLEAST8      = "hhd";
-    const char* SCNxLEAST16     = "hx";
-    const char* SCNxLEAST32     = "lx";
-    const char* SCNxLEAST64     = "llx";
-
-    const char* SCNxFAST8       = "hhd";
-    const char* SCNxFAST16      = "x";
-    const char* SCNxFAST32      = "lx";
-    const char* SCNxFAST64      = "llx";
-
-  version( X86_64 )
-  {
-    const char* PRIdMAX         = PRId64;
-    const char* PRIiMAX         = PRIi64;
-    const char* PRIoMAX         = PRIo64;
-    const char* PRIuMAX         = PRIu64;
-    const char* PRIxMAX         = PRIx64;
-    const char* PRIXMAX         = PRIX64;
-
-    const char* SCNdMAX         = SCNd64;
-    const char* SCNiMAX         = SCNi64;
-    const char* SCNoMAX         = SCNo64;
-    const char* SCNuMAX         = SCNu64;
-    const char* SCNxMAX         = SCNx64;
-
-    const char* PRIdPTR         = PRId64;
-    const char* PRIiPTR         = PRIi64;
-    const char* PRIoPTR         = PRIo64;
-    const char* PRIuPTR         = PRIu64;
-    const char* PRIxPTR         = PRIx64;
-    const char* PRIXPTR         = PRIX64;
-
-    const char* SCNdPTR         = SCNd64;
-    const char* SCNiPTR         = SCNi64;
-    const char* SCNoPTR         = SCNo64;
-    const char* SCNuPTR         = SCNu64;
-    const char* SCNxPTR         = SCNx64;
-  }
-  else
-  {
-    const char* PRIdMAX         = PRId32;
-    const char* PRIiMAX         = PRIi32;
-    const char* PRIoMAX         = PRIo32;
-    const char* PRIuMAX         = PRIu32;
-    const char* PRIxMAX         = PRIx32;
-    const char* PRIXMAX         = PRIX32;
-
-    const char* SCNdMAX         = SCNd32;
-    const char* SCNiMAX         = SCNi32;
-    const char* SCNoMAX         = SCNo32;
-    const char* SCNuMAX         = SCNu32;
-    const char* SCNxMAX         = SCNx32;
-
-    const char* PRIdPTR         = PRId32;
-    const char* PRIiPTR         = PRIi32;
-    const char* PRIoPTR         = PRIo32;
-    const char* PRIuPTR         = PRIu32;
-    const char* PRIxPTR         = PRIx32;
-    const char* PRIXPTR         = PRIX32;
-
-    const char* SCNdPTR         = SCNd32;
-    const char* SCNiPTR         = SCNi32;
-    const char* SCNoPTR         = SCNo32;
-    const char* SCNuPTR         = SCNu32;
-    const char* SCNxPTR         = SCNx32;
-  }
-}
-
-intmax_t  imaxabs(intmax_t j);
-imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
-intmax_t  strtoimax(in char* nptr, char** endptr, int base);
-uintmax_t strtoumax(in char* nptr, char** endptr, int base);
-intmax_t  wcstoimax(in wchar_t* nptr, wchar_t** endptr, int base);
-uintmax_t wcstoumax(in wchar_t* nptr, wchar_t** endptr, int base);
--- a/druntime/import/stdc/limits.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.limits;
-
-private import stdc.config;
-
-extern (C):
-
-const CHAR_BIT      = 8;
-const SCHAR_MIN     = byte.min;
-const SCHAR_MAX     = byte.max;
-const UCHAR_MAX     = ubyte.min;
-const CHAR_MIN      = char.max;
-const CHAR_MAX      = char.max;
-const MB_LEN_MAX    = 2;
-const SHRT_MIN      = short.min;
-const SHRT_MAX      = short.max;
-const USHRT_MAX     = ushort.max;
-const INT_MIN       = int.min;
-const INT_MAX       = int.max;
-const UINT_MAX      = uint.max;
-const LONG_MIN      = c_long.min;
-const LONG_MAX      = c_long.max;
-const ULONG_MAX     = c_ulong.max;
-const LLONG_MIN     = long.min;
-const LLONG_MAX     = long.max;
-const ULLONG_MAX    = ulong.max;
--- a/druntime/import/stdc/locale.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.locale;
-
-extern (C):
-
-struct lconv
-{
-    char* decimal_point;
-    char* thousands_sep;
-    char* grouping;
-    char* int_curr_symbol;
-    char* currency_symbol;
-    char* mon_decimal_point;
-    char* mon_thousands_sep;
-    char* mon_grouping;
-    char* positive_sign;
-    char* negative_sign;
-    byte  int_frac_digits;
-    byte  frac_digits;
-    byte  p_cs_precedes;
-    byte  p_sep_by_space;
-    byte  n_cs_precedes;
-    byte  n_sep_by_space;
-    byte  p_sign_posn;
-    byte  n_sign_posn;
-    byte  int_p_cs_precedes;
-    byte  int_p_sep_by_space;
-    byte  int_n_cs_precedes;
-    byte  int_n_sep_by_space;
-    byte  int_p_sign_posn;
-    byte  int_n_sign_posn;
-}
-
-const LC_CTYPE          = 0;
-const LC_NUMERIC        = 1;
-const LC_TIME           = 2;
-const LC_COLLATE        = 3;
-const LC_MONETARY       = 4;
-const LC_ALL            = 6;
-const LC_PAPER          = 7;
-const LC_NAME           = 8;
-const LC_ADDRESS        = 9;
-const LC_TELEPHONE      = 10;
-const LC_MEASUREMENT    = 11;
-const LC_IDENTIFICATION = 12;
-
-char*  setlocale(int category, in char* locale);
-lconv* localeconv();
--- a/druntime/import/stdc/math.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,928 +0,0 @@
-/**
- * D header file for C99.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly, Walter Bright
- * Standards: ISO/IEC 9899:1999 (E)
- */
-module stdc.math;
-
-private import stdc.config;
-
-extern (C):
-
-alias float  float_t;
-alias double double_t;
-
-const double HUGE_VAL      = double.infinity;
-const double HUGE_VALF     = float.infinity;
-const double HUGE_VALL     = real.infinity;
-
-const float INFINITY       = float.infinity;
-const float NAN            = float.nan;
-
-const int FP_ILOGB0        = int.min;
-const int FP_ILOGBNAN      = int.min;
-
-const int MATH_ERRNO       = 1;
-const int MATH_ERREXCEPT   = 2;
-const int math_errhandling = MATH_ERRNO | MATH_ERREXCEPT;
-
-version( none )
-{
-    //
-    // these functions are all macros in C
-    //
-
-    //int fpclassify(real-floating x);
-    int fpclassify(float x);
-    int fpclassify(double x);
-    int fpclassify(real x);
-
-    //int isfinite(real-floating x);
-    int isfinite(float x);
-    int isfinite(double x);
-    int isfinite(real x);
-
-    //int isinf(real-floating x);
-    int isinf(float x);
-    int isinf(double x);
-    int isinf(real x);
-
-    //int isnan(real-floating x);
-    int isnan(float x);
-    int isnan(double x);
-    int isnan(real x);
-
-    //int isnormal(real-floating x);
-    int isnormal(float x);
-    int isnormal(double x);
-    int isnormal(real x);
-
-    //int signbit(real-floating x);
-    int signbit(float x);
-    int signbit(double x);
-    int signbit(real x);
-
-    //int isgreater(real-floating x, real-floating y);
-    int isgreater(float x, float y);
-    int isgreater(double x, double y);
-    int isgreater(real x, real y);
-
-    //int isgreaterequal(real-floating x, real-floating y);
-    int isgreaterequal(float x, float y);
-    int isgreaterequal(double x, double y);
-    int isgreaterequal(real x, real y);
-
-    //int isless(real-floating x, real-floating y);
-    int isless(float x, float y);
-    int isless(double x, double y);
-    int isless(real x, real y);
-
-    //int islessequal(real-floating x, real-floating y);
-    int islessequal(float x, float y);
-    int islessequal(double x, double y);
-    int islessequal(real x, real y);
-
-    //int islessgreater(real-floating x, real-floating y);
-    int islessgreater(float x, float y);
-    int islessgreater(double x, double y);
-    int islessgreater(real x, real y);
-
-    //int isunordered(real-floating x, real-floating y);
-    int isunordered(float x, float y);
-    int isunordered(double x, double y);
-    int isunordered(real x, real y);
-}
-
-version( DigitalMars ) version( Windows )
-    version = DigitalMarsWin32;
-
-version( DigitalMarsWin32 )
-{
-    enum
-    {
-        FP_NANS        = 0,
-        FP_NANQ        = 1,
-        FP_INFINITE    = 2,
-        FP_NORMAL      = 3,
-        FP_SUBNORMAL   = 4,
-        FP_ZERO        = 5,
-        FP_NAN         = FP_NANQ,
-        FP_EMPTY       = 6,
-        FP_UNSUPPORTED = 7,
-    }
-
-    enum
-    {
-        FP_FAST_FMA  = 0,
-        FP_FAST_FMAF = 0,
-        FP_FAST_FMAL = 0,
-    }
-
-    uint __fpclassify_f(float x);
-    uint __fpclassify_d(double x);
-    uint __fpclassify_ld(real x);
-
-  extern (D)
-  {
-    //int fpclassify(real-floating x);
-    int fpclassify(float x)     { return __fpclassify_f(x); }
-    int fpclassify(double x)    { return __fpclassify_d(x); }
-    int fpclassify(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __fpclassify_d(x)
-            : __fpclassify_ld(x);
-    }
-
-    //int isfinite(real-floating x);
-    int isfinite(float x)       { return fpclassify(x) >= FP_NORMAL; }
-    int isfinite(double x)      { return fpclassify(x) >= FP_NORMAL; }
-    int isfinite(real x)        { return fpclassify(x) >= FP_NORMAL; }
-
-    //int isinf(real-floating x);
-    int isinf(float x)          { return fpclassify(x) == FP_INFINITE; }
-    int isinf(double x)         { return fpclassify(x) == FP_INFINITE; }
-    int isinf(real x)           { return fpclassify(x) == FP_INFINITE; }
-
-    //int isnan(real-floating x);
-    int isnan(float x)          { return fpclassify(x) <= FP_NANQ;   }
-    int isnan(double x)         { return fpclassify(x) <= FP_NANQ;   }
-    int isnan(real x)           { return fpclassify(x) <= FP_NANQ;   }
-
-    //int isnormal(real-floating x);
-    int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
-
-    //int signbit(real-floating x);
-    int signbit(float x)     { return (cast(short*)&(x))[1] & 0x8000; }
-    int signbit(double x)    { return (cast(short*)&(x))[3] & 0x8000; }
-    int signbit(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? (cast(short*)&(x))[3] & 0x8000
-            : (cast(short*)&(x))[4] & 0x8000;
-    }
-  }
-}
-else version( linux )
-{
-    enum
-    {
-        FP_NAN,
-        FP_INFINITE,
-        FP_ZERO,
-        FP_SUBNORMAL,
-        FP_NORMAL,
-    }
-
-    enum
-    {
-        FP_FAST_FMA  = 0,
-        FP_FAST_FMAF = 0,
-        FP_FAST_FMAL = 0,
-    }
-
-    int __fpclassifyf(float x);
-    int __fpclassify(double x);
-    int __fpclassifyl(real x);
-
-    int __finitef(float x);
-    int __finite(double x);
-    int __finitel(real x);
-
-    int __isinff(float x);
-    int __isinf(double x);
-    int __isinfl(real x);
-
-    int __isnanf(float x);
-    int __isnan(double x);
-    int __isnanl(real x);
-
-    int __signbitf(float x);
-    int __signbit(double x);
-    int __signbitl(real x);
-
-  extern (D)
-  {
-    //int fpclassify(real-floating x);
-    int fpclassify(float x)     { return __fpclassifyf(x); }
-    int fpclassify(double x)    { return __fpclassify(x);  }
-    int fpclassify(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __fpclassify(x)
-            : __fpclassifyl(x);
-    }
-
-    //int isfinite(real-floating x);
-    int isfinite(float x)       { return __finitef(x); }
-    int isfinite(double x)      { return __finite(x);  }
-    int isfinite(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __finite(x)
-            : __finitel(x);
-    }
-
-    //int isinf(real-floating x);
-    int isinf(float x)          { return __isinff(x);  }
-    int isinf(double x)         { return __isinf(x);   }
-    int isinf(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __isinf(x)
-            : __isinfl(x);
-    }
-
-    //int isnan(real-floating x);
-    int isnan(float x)          { return __isnanf(x);  }
-    int isnan(double x)         { return __isnan(x);   }
-    int isnan(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __isnan(x)
-            : __isnanl(x);
-    }
-
-    //int isnormal(real-floating x);
-    int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
-
-    //int signbit(real-floating x);
-    int signbit(float x)     { return __signbitf(x); }
-    int signbit(double x)    { return __signbit(x);  }
-    int signbit(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __signbit(x)
-            : __signbitl(x);
-    }
-  }
-}
-else version( darwin )
-{
-    enum
-    {
-        FP_NAN         = 1,
-        FP_INFINITE    = 2,
-        FP_ZERO        = 3,
-        FP_NORMAL      = 4,
-        FP_SUBNORMAL   = 5,
-        FP_SUPERNORMAL = 6
-    }
-
-    enum
-    {
-        FP_FAST_FMA  = 0,
-        FP_FAST_FMAF = 0,
-        FP_FAST_FMAL = 0,
-    }
-
-    int __fpclassifyf(float x);
-    int __fpclassifyd(double x);
-    int __fpclassify(real x);
-
-    int __isfinitef(float x);
-    int __isfinited(double x);
-    int __isfinite(real x);
-
-    int __isinff(float x);
-    int __isinfd(double x);
-    int __isinf(real x);
-
-    int __isnanf(float x);
-    int __isnand(double x);
-    int __isnan(real x);
-
-    int __signbitf(float x);
-    int __signbitd(double x);
-    int __signbitl(real x);
-
-  extern (D)
-  {
-    //int fpclassify(real-floating x);
-    int fpclassify(float x)     { return __fpclassifyf(x); }
-    int fpclassify(double x)    { return __fpclassifyd(x); }
-    int fpclassify(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __fpclassifyd(x)
-            : __fpclassify(x);
-    }
-
-    //int isfinite(real-floating x);
-    int isfinite(float x)       { return __isfinitef(x); }
-    int isfinite(double x)      { return __isfinited(x); }
-    int isfinite(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __isfinited(x)
-            : __isfinite(x);
-    }
-
-    //int isinf(real-floating x);
-    int isinf(float x)          { return __isinff(x); }
-    int isinf(double x)         { return __isinfd(x); }
-    int isinf(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __isinfd(x)
-            : __isinf(x);
-    }
-
-    //int isnan(real-floating x);
-    int isnan(float x)          { return __isnanf(x); }
-    int isnan(double x)         { return __isnand(x); }
-    int isnan(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __isnand(x)
-            : __isnan(x);
-    }
-
-    //int isnormal(real-floating x);
-    int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
-    int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
-
-    //int signbit(real-floating x);
-    int signbit(float x)     { return __signbitf(x); }
-    int signbit(double x)    { return __signbitd(x); }
-    int signbit(real x)
-    {
-        return (real.sizeof == double.sizeof)
-            ? __signbitd(x)
-            : __signbitl(x);
-    }
-  }
-}
-else version( freebsd )
-{
-    enum
-    {
-        FP_INFINITE = 0x01,
-        FP_NAN = 0x02,
-        FP_NORMAL = 0x04,
-        FP_SUBNORMAL = 0x08,
-        FP_ZERO = 0x10
-    }
-
-    enum
-    {
-        FP_FAST_FMA  = 0,
-        FP_FAST_FMAF = 0,
-        FP_FAST_FMAL = 0,
-    }
-
-    int __fpclassifyd(double);
-    int __fpclassifyf(float);
-    int __fpclassifyl(real);
-    int __isfinitef(float);
-    int __isfinite(double);
-    int __isfinitel(real);
-    int __isinff(float);
-    int __isinfl(real);
-    int __isnanl(real);
-    int __isnormalf(float);
-    int __isnormal(double);
-    int __isnormall(real);
-    int __signbit(double);
-    int __signbitf(float);
-    int __signbitl(real);
-
-  extern (D)
-  {
-    //int fpclassify(real-floating x);
-    int fpclassify(float x)     { return __fpclassifyf(x); }
-    int fpclassify(double x)    { return __fpclassifyd(x); }
-    int fpclassify(real x)    { return __fpclassifyl(x); }
-
-    //int isfinite(real-floating x);
-    int isfinite(float x)       { return __isfinitef(x); }
-    int isfinite(double x)      { return __isfinite(x); }
-    int isfinite(real x)      { return __isfinitel(x); }
-
-    //int isinf(real-floating x);
-    int isinf(float x)          { return __isinff(x); }
-    int isinf(double x)         { return __isinfl(x); }
-    int isinf(real x)         { return __isinfl(x); }
-
-    //int isnan(real-floating x);
-    int isnan(float x)          { return __isnanl(x); }
-    int isnan(double x)         { return __isnanl(x); }
-    int isnan(real x)         { return __isnanl(x); }
-
-    //int isnormal(real-floating x);
-    int isnormal(float x)       { return __isnormalf(x); }
-    int isnormal(double x)      { return __isnormal(x); }
-    int isnormal(real x)        { return __isnormall(x); }
-
-    //int signbit(real-floating x);
-    int signbit(float x)     { return __signbitf(x); }
-    int signbit(double x)    { return __signbit(x); }
-    int signbit(real x)    { return __signbit(x); }
-    }
-}
-
-extern (D)
-{
-    //int isgreater(real-floating x, real-floating y);
-    int isgreater(float x, float y)        { return !(x !>  y); }
-    int isgreater(double x, double y)      { return !(x !>  y); }
-    int isgreater(real x, real y)          { return !(x !>  y); }
-
-    //int isgreaterequal(real-floating x, real-floating y);
-    int isgreaterequal(float x, float y)   { return !(x !>= y); }
-    int isgreaterequal(double x, double y) { return !(x !>= y); }
-    int isgreaterequal(real x, real y)     { return !(x !>= y); }
-
-    //int isless(real-floating x, real-floating y);
-    int isless(float x, float y)           { return !(x !<  y); }
-    int isless(double x, double y)         { return !(x !<  y); }
-    int isless(real x, real y)             { return !(x !<  y); }
-
-    //int islessequal(real-floating x, real-floating y);
-    int islessequal(float x, float y)      { return !(x !<= y); }
-    int islessequal(double x, double y)    { return !(x !<= y); }
-    int islessequal(real x, real y)        { return !(x !<= y); }
-
-    //int islessgreater(real-floating x, real-floating y);
-    int islessgreater(float x, float y)    { return !(x !<> y); }
-    int islessgreater(double x, double y)  { return !(x !<> y); }
-    int islessgreater(real x, real y)      { return !(x !<> y); }
-
-    //int isunordered(real-floating x, real-floating y);
-    int isunordered(float x, float y)      { return (x !<>= y); }
-    int isunordered(double x, double y)    { return (x !<>= y); }
-    int isunordered(real x, real y)        { return (x !<>= y); }
-}
-
-// NOTE: freebsd < 8-CURRENT doesn't appear to support *l, but we can
-//       approximate.
-version( freebsd )
-{
-    double  acos(double x);
-    float   acosf(float x);
-    real    acosl(real x) { return acos(x); }
-
-    double  asin(double x);
-    float   asinf(float x);
-    real    asinl(real x) { return asin(x); }
-
-    double  atan(double x);
-    float   atanf(float x);
-    real    atanl(real x) { return atan(x); }
-
-    double  atan2(double y, double x);
-    float   atan2f(float y, float x);
-    real    atan2l(real y, real x) { return atan2(y, x); }
-
-    double  cos(double x);
-    float   cosf(float x);
-    real    cosl(real x) { return cos(x); }
-
-    double  sin(double x);
-    float   sinf(float x);
-    real    sinl(real x) { return sin(x); }
-
-    double  tan(double x);
-    float   tanf(float x);
-    real    tanl(real x) { return tan(x); }
-
-    double  acosh(double x);
-    float   acoshf(float x);
-    real    acoshl(real x) { return acosh(x); }
-
-    double  asinh(double x);
-    float   asinhf(float x);
-    real    asinhl(real x) { return asinh(x); }
-
-    double  atanh(double x);
-    float   atanhf(float x);
-    real    atanhl(real x) { return atanh(x); }
-
-    double  cosh(double x);
-    float   coshf(float x);
-    real    coshl(real x) { return cosh(x); }
-
-    double  sinh(double x);
-    float   sinhf(float x);
-    real    sinhl(real x) { return sinh(x); }
-
-    double  tanh(double x);
-    float   tanhf(float x);
-    real    tanhl(real x) { return tanh(x); }
-
-    double  exp(double x);
-    float   expf(float x);
-    real    expl(real x) { return exp(x); }
-
-    double  exp2(double x);
-    float   exp2f(float x);
-    real    exp2l(real x) { return exp2(x); }
-
-    double  expm1(double x);
-    float   expm1f(float x);
-    real    expm1l(real x) { return expm1(x); }
-
-    double  frexp(double value, int* exp);
-    float   frexpf(float value, int* exp);
-    real    frexpl(real value, int* exp) { return frexp(value, exp); }
-
-    int     ilogb(double x);
-    int     ilogbf(float x);
-    int     ilogbl(real x) { return ilogb(x); }
-
-    double  ldexp(double x, int exp);
-    float   ldexpf(float x, int exp);
-    real    ldexpl(real x, int exp) { return ldexp(x, exp); }
-
-    double  log(double x);
-    float   logf(float x);
-    real    logl(real x) { return log(x); }
-
-    double  log10(double x);
-    float   log10f(float x);
-    real    log10l(real x) { return log10(x); }
-
-    double  log1p(double x);
-    float   log1pf(float x);
-    real    log1pl(real x) { return log1p(x); }
-
-    private const real ONE_LN2 = 1 / 0x1.62e42fefa39ef358p-1L;
-    double  log2(double x) { return log(x) * ONE_LN2; }
-    float   log2f(float x) { return logf(x) * ONE_LN2; }
-    real    log2l(real x) { return logl(x) * ONE_LN2; }
-
-    double  logb(double x);
-    float   logbf(float x);
-    real    logbl(real x) { return logb(x); }
-
-    double  modf(double value, double* iptr);
-    float   modff(float value, float* iptr);
-    //real    modfl(real value, real *iptr); // nontrivial conversion
-
-    double  scalbn(double x, int n);
-    float   scalbnf(float x, int n);
-    real    scalbnl(real x, int n) { return scalbn(x, n); }
-
-    double  scalbln(double x, c_long n);
-    float   scalblnf(float x, c_long n);
-    real    scalblnl(real x, c_long n) { return scalbln(x, n); }
-
-
-    double  cbrt(double x);
-    float   cbrtf(float x);
-    real    cbrtl(real x) { return cbrt(x); }
-
-    double  fabs(double x);
-    float   fabsf(float x);
-    real    fabsl(real x) { return fabs(x); }
-
-    double  hypot(double x, double y);
-    float   hypotf(float x, float y);
-    real    hypotl(real x, real y) { return hypot(x, y); }
-
-    double  pow(double x, double y);
-    float   powf(float x, float y);
-    real    powl(real x, real y) { return pow(x, y); }
-
-    double  sqrt(double x);
-    float   sqrtf(float x);
-    real    sqrtl(real x) { return sqrt(x); }
-
-    double  erf(double x);
-    float   erff(float x);
-    real    erfl(real x) { return erf(x); }
-
-    double  erfc(double x);
-    float   erfcf(float x);
-    real    erfcl(real x) { return erfc(x); }
-
-    double  lgamma(double x);
-    float   lgammaf(float x);
-    real    lgammal(real x) { return lgamma(x); }
-
-    double  tgamma(double x);
-    float   tgammaf(float x);
-    real    tgammal(real x) { return tgamma(x); }
-
-    double  ceil(double x);
-    float   ceilf(float x);
-    real    ceill(real x) { return ceil(x); }
-
-    double  floor(double x);
-    float   floorf(float x);
-    real    floorl(real x) { return floor(x); }
-
-    double  nearbyint(double x);
-    float   nearbyintf(float x);
-    real    nearbyintl(real x) { return nearbyint(x); }
-
-    double  rint(double x);
-    float   rintf(float x);
-    real    rintl(real x) { return rint(x); }
-
-    c_long  lrint(double x);
-    c_long  lrintf(float x);
-    c_long  lrintl(real x) { return lrint(x); }
-
-    long    llrint(double x);
-    long    llrintf(float x);
-    long    llrintl(real x) { return llrint(x); }
-
-    double  round(double x);
-    float   roundf(float x);
-    real    roundl(real x) { return round(x); }
-
-    c_long  lround(double x);
-    c_long  lroundf(float x);
-    c_long  lroundl(real x) { return lround(x); }
-
-    long    llround(double x);
-    long    llroundf(float x);
-    long    llroundl(real x) { return llround(x); }
-
-    double  trunc(double x);
-    float   truncf(float x);
-    real    truncl(real x) { return trunc(x); }
-
-    double  fmod(double x, double y);
-    float   fmodf(float x, float y);
-    real    fmodl(real x, real y) { return fmod(x, y); }
-
-    double  remainder(double x, double y);
-    float   remainderf(float x, float y);
-    real    remainderl(real x, real y) { return remainder(x, y); }
-
-    double  remquo(double x, double y, int* quo);
-    float   remquof(float x, float y, int* quo);
-    real    remquol(real x, real y, int* quo) { return remquo(x, y, quo); }
-
-    double  copysign(double x, double y);
-    float   copysignf(float x, float y);
-    real    copysignl(real x, real y) { return copysign(x, y); }
-
-//  double  nan(char* tagp);
-//  float   nanf(char* tagp);
-//  real    nanl(char* tagp);
-
-    double  nextafter(double x, double y);
-    float   nextafterf(float x, float y);
-    real    nextafterl(real x, real y) { return nextafter(x, y); }
-
-    double  nexttoward(double x, real y);
-    float   nexttowardf(float x, real y);
-    real    nexttowardl(real x, real y) { return nexttoward(x, y); }
-
-    double  fdim(double x, double y);
-    float   fdimf(float x, float y);
-    real    fdiml(real x, real y) { return fdim(x, y); }
-
-    double  fmax(double x, double y);
-    float   fmaxf(float x, float y);
-    real    fmaxl(real x, real y) { return fmax(x, y); }
-
-    double  fmin(double x, double y);
-    float   fminf(float x, float y);
-    real    fminl(real x, real y) { return fmin(x, y); }
-
-    double  fma(double x, double y, double z);
-    float   fmaf(float x, float y, float z);
-    real    fmal(real x, real y, real z) { return fma(x, y, z); }
-}
-else
-{
-    double  acos(double x);
-    float   acosf(float x);
-    real    acosl(real x);
-
-    double  asin(double x);
-    float   asinf(float x);
-    real    asinl(real x);
-
-    double  atan(double x);
-    float   atanf(float x);
-    real    atanl(real x);
-
-    double  atan2(double y, double x);
-    float   atan2f(float y, float x);
-    real    atan2l(real y, real x);
-
-    double  cos(double x);
-    float   cosf(float x);
-    real    cosl(real x);
-
-    double  sin(double x);
-    float   sinf(float x);
-    real    sinl(real x);
-
-    double  tan(double x);
-    float   tanf(float x);
-    real    tanl(real x);
-
-    double  acosh(double x);
-    float   acoshf(float x);
-    real    acoshl(real x);
-
-    double  asinh(double x);
-    float   asinhf(float x);
-    real    asinhl(real x);
-
-    double  atanh(double x);
-    float   atanhf(float x);
-    real    atanhl(real x);
-
-    double  cosh(double x);
-    float   coshf(float x);
-    real    coshl(real x);
-
-    double  sinh(double x);
-    float   sinhf(float x);
-    real    sinhl(real x);
-
-    double  tanh(double x);
-    float   tanhf(float x);
-    real    tanhl(real x);
-
-    double  exp(double x);
-    float   expf(float x);
-    real    expl(real x);
-
-    double  exp2(double x);
-    float   exp2f(float x);
-    real    exp2l(real x);
-
-    double  expm1(double x);
-    float   expm1f(float x);
-    real    expm1l(real x);
-
-    double  frexp(double value, int* exp);
-    float   frexpf(float value, int* exp);
-    real    frexpl(real value, int* exp);
-
-    int     ilogb(double x);
-    int     ilogbf(float x);
-    int     ilogbl(real x);
-
-    double  ldexp(double x, int exp);
-    float   ldexpf(float x, int exp);
-    real    ldexpl(real x, int exp);
-
-    double  log(double x);
-    float   logf(float x);
-    real    logl(real x);
-
-    double  log10(double x);
-    float   log10f(float x);
-    real    log10l(real x);
-
-    double  log1p(double x);
-    float   log1pf(float x);
-    real    log1pl(real x);
-
-    double  log2(double x);
-    float   log2f(float x);
-    real    log2l(real x);
-
-    double  logb(double x);
-    float   logbf(float x);
-    real    logbl(real x);
-
-    double  modf(double value, double* iptr);
-    float   modff(float value, float* iptr);
-    real    modfl(real value, real *iptr);
-
-    double  scalbn(double x, int n);
-    float   scalbnf(float x, int n);
-    real    scalbnl(real x, int n);
-
-    double  scalbln(double x, c_long n);
-    float   scalblnf(float x, c_long n);
-    real    scalblnl(real x, c_long n);
-
-    double  cbrt(double x);
-    float   cbrtf(float x);
-    real    cbrtl(real x);
-
-    double  fabs(double x);
-    float   fabsf(float x);
-    real    fabsl(real x);
-
-    double  hypot(double x, double y);
-    float   hypotf(float x, float y);
-    real    hypotl(real x, real y);
-
-    double  pow(double x, double y);
-    float   powf(float x, float y);
-    real    powl(real x, real y);
-
-    double  sqrt(double x);
-    float   sqrtf(float x);
-    real    sqrtl(real x);
-
-    double  erf(double x);
-    float   erff(float x);
-    real    erfl(real x);
-
-    double  erfc(double x);
-    float   erfcf(float x);
-    real    erfcl(real x);
-
-    double  lgamma(double x);
-    float   lgammaf(float x);
-    real    lgammal(real x);
-
-    double  tgamma(double x);
-    float   tgammaf(float x);
-    real    tgammal(real x);
-
-    double  ceil(double x);
-    float   ceilf(float x);
-    real    ceill(real x);
-
-    double  floor(double x);
-    float   floorf(float x);
-    real    floorl(real x);
-
-    double  nearbyint(double x);
-    float   nearbyintf(float x);
-    real    nearbyintl(real x);
-
-    double  rint(double x);
-    float   rintf(float x);
-    real    rintl(real x);
-
-    c_long  lrint(double x);
-    c_long  lrintf(float x);
-    c_long  lrintl(real x);
-
-    long    llrint(double x);
-    long    llrintf(float x);
-    long    llrintl(real x);
-
-    double  round(double x);
-    float   roundf(float x);
-    real    roundl(real x);
-
-    c_long  lround(double x);
-    c_long  lroundf(float x);
-    c_long  lroundl(real x);
-
-    long    llround(double x);
-    long    llroundf(float x);
-    long    llroundl(real x);
-
-    double  trunc(double x);
-    float   truncf(float x);
-    real    truncl(real x);
-
-    double  fmod(double x, double y);
-    float   fmodf(float x, float y);
-    real    fmodl(real x, real y);
-
-    double  remainder(double x, double y);
-    float   remainderf(float x, float y);
-    real    remainderl(real x, real y);
-
-    double  remquo(double x, double y, int* quo);
-    float   remquof(float x, float y, int* quo);
-    real    remquol(real x, real y, int* quo);
-
-    double  copysign(double x, double y);
-    float   copysignf(float x, float y);
-    real    copysignl(real x, real y);
-
-    double  nan(char* tagp);
-    float   nanf(char* tagp);
-    real    nanl(char* tagp);
-
-    double  nextafter(double x, double y);
-    float   nextafterf(float x, float y);
-    real    nextafterl(real x, real y);
-
-    double  nexttoward(double x, real y);
-    float   nexttowardf(float x, real y);
-    real    nexttowardl(real x, real y);
-
-    double  fdim(double x, double y);
-    float   fdimf(float x, float y);
-    real    fdiml(real x, real y);
-
-    double  fmax(double x, double y);
-    float   fmaxf(float x, float y);
-    real    fmaxl(real x, real y);
-
-    double  fmin(double x, double y);
-    float   fminf(float x, float y);
-    real    fminl(real x, real y);
-
-    double  fma(double x, double y, double z);
-    float   fmaf(float x, float y, float z);
-    real    fmal(real x, real y, real z);
-}
\ No newline at end of file
--- a/druntime/import/stdc/posix/arpa/inet.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.arpa.inet;
-
-private import stdc.posix.config;
-public import stdc.inttypes : uint32_t, uint16_t;
-public import stdc.posix.sys.socket : socklen_t;
-
-extern (C):
-
-//
-// Required
-//
-/*
-in_port_t // from stdc.posix.netinet.in_
-in_addr_t // from stdc.posix.netinet.in_
-
-struct in_addr  // from stdc.posix.netinet.in_
-INET_ADDRSTRLEN // from stdc.posix.netinet.in_
-
-uint32_t // from stdc.inttypes
-uint16_t // from stdc.inttypes
-
-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);
-// per spec: const char* inet_ntop(int, const void*, char*, socklen_t);
-char*     inet_ntop(int, in void*, char*, socklen_t);
-int       inet_pton(int, in char*, void*);
-*/
-
-version( linux )
-{
-    alias uint16_t in_port_t;
-    alias uint32_t in_addr_t;
-
-    struct in_addr
-    {
-        in_addr_t s_addr;
-    }
-
-    const 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*);
-}
-else version( darwin )
-{
-    alias uint16_t in_port_t; // TODO: verify
-    alias uint32_t in_addr_t; // TODO: verify
-
-    struct in_addr
-    {
-        in_addr_t s_addr;
-    }
-
-    const 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*);
-}
-else version( freebsd )
-{
-    alias uint16_t in_port_t; // TODO: verify
-    alias uint32_t in_addr_t; // TODO: verify
-
-    struct in_addr
-    {
-        in_addr_t s_addr;
-    }
-
-    const 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)
-//
-/*
-INET6_ADDRSTRLEN // from stdc.posix.netinet.in_
-*/
-
-version( linux )
-{
-    const INET6_ADDRSTRLEN = 46;
-}
-else version( darwin )
-{
-    const INET6_ADDRSTRLEN = 46;
-}
-else version( freebsd )
-{
-    const INET6_ADDRSTRLEN = 46;
-}
--- a/druntime/import/stdc/posix/config.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.config;
-
-public import stdc.config;
-
-extern (C):
-
-version( linux )
-{
-  version( none /* X86_64 */ )
-  {
-    const bool  __USE_LARGEFILE64   = true;
-  }
-  else
-  {
-    const bool  __USE_LARGEFILE64   = false;
-  }
-    const bool  __USE_FILE_OFFSET64 = __USE_LARGEFILE64;
-    const bool  __REDIRECT          = false;
-}
--- a/druntime/import/stdc/posix/dirent.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.dirent;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types; // for ino_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-DIR
-
-struct dirent
-{
-    char[] d_name;
-}
-
-int     closedir(DIR*);
-DIR*    opendir(in char*);
-dirent* readdir(DIR*);
-void    rewinddir(DIR*);
-*/
-
-version( linux )
-{
-    // 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( darwin )
-{
-    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
-    }
-
-    align(4)
-    struct dirent
-    {
-        ino_t       d_ino;
-        ushort      d_reclen;
-        ubyte       d_type;
-        ubyte       d_namlen;
-        char[256]   d_name;
-    }
-
-    struct DIR
-    {
-        // Managed by OS
-    }
-
-    dirent* readdir(DIR*);
-}
-else version( freebsd )
-{
-    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
-    }
-
-    align(4)
-    struct dirent
-    {
-        uint      d_fileno;
-        ushort    d_reclen;
-        ubyte     d_type;
-        ubyte     d_namelen;
-        char[256] d_name;
-    }
-
-    struct _telldir;
-    struct DIR
-    {
-        int       dd_fd;
-        c_long    dd_loc;
-        c_long    dd_size;
-        char*     dd_buf;
-        int       dd_len;
-        c_long    dd_seek;
-        c_long    dd_rewind;
-        int       dd_flags;
-        void*     dd_lock;
-        _telldir* dd_td;
-    }
-
-    dirent* readdir(DIR*);
-}
-else
-{
-    dirent* readdir(DIR*);
-}
-
-int     closedir(DIR*);
-DIR*    opendir(in char*);
-//dirent* readdir(DIR*);
-void    rewinddir(DIR*);
-
-//
-// Thread-Safe Functions (TSF)
-//
-/*
-int readdir_r(DIR*, dirent*, dirent**);
-*/
-
-version( linux )
-{
-  static if( __USE_LARGEFILE64 )
-  {
-    int   readdir_r64(DIR*, dirent*, dirent**);
-    alias readdir_r64 readdir_r;
-  }
-  else
-  {
-    int readdir_r(DIR*, dirent*, dirent**);
-  }
-}
-else version( darwin )
-{
-    int readdir_r(DIR*, dirent*, dirent**);
-}
-else version( freebsd )
-{
-    int readdir_r(DIR*, dirent*, dirent**);
-}
-
-//
-// XOpen (XSI)
-//
-/*
-void   seekdir(DIR*, c_long);
-c_long telldir(DIR*);
-*/
-
-version( linux )
-{
-    void   seekdir(DIR*, c_long);
-    c_long telldir(DIR*);
-}
--- a/druntime/import/stdc/posix/dlfcn.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.dlfcn;
-
-private import stdc.posix.config;
-
-extern (C):
-
-//
-// XOpen (XSI)
-//
-/*
-RTLD_LAZY
-RTLD_NOW
-RTLD_GLOBAL
-RTLD_LOCAL
-
-int   dlclose(void*);
-char* dlerror();
-void* dlopen(in char*, int);
-void* dlsym(void*, in char*);
-*/
-
-version( linux )
-{
-    const RTLD_LAZY     = 0x00001;
-    const RTLD_NOW      = 0x00002;
-    const RTLD_GLOBAL   = 0x00100;
-    const RTLD_LOCAL    = 0x00000;
-
-    int   dlclose(void*);
-    char* dlerror();
-    void* dlopen(in char*, int);
-    void* dlsym(void*, in char*);
-}
-else version( darwin )
-{
-    const RTLD_LAZY     = 0x00001;
-    const RTLD_NOW      = 0x00002;
-    const RTLD_GLOBAL   = 0x00100;
-    const RTLD_LOCAL    = 0x00000;
-
-    int   dlclose(void*);
-    char* dlerror();
-    void* dlopen(in char*, int);
-    void* dlsym(void*, in char*);
-}
-else version( freebsd )
-{
-    const RTLD_LAZY     = 1;
-    const RTLD_NOW      = 2;
-    const RTLD_GLOBAL   = 0x100;
-    const RTLD_LOCAL    = 0;
-
-    int   dlclose(void*);
-    char* dlerror();
-    void* dlopen(in char*, int);
-    void* dlsym(void*, in char*);
-}
--- a/druntime/import/stdc/posix/fcntl.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.fcntl;
-
-private import stdc.posix.config;
-private import stdc.stdint;
-public import stdc.stddef;          // for size_t
-public import stdc.posix.sys.types; // for off_t, mode_t
-public import stdc.posix.sys.stat;  // for S_IFMT, etc.
-
-extern (C):
-
-//
-// Required
-//
-/*
-F_DUPFD
-F_GETFD
-F_SETFD
-F_GETFL
-F_SETFL
-F_GETLK
-F_SETLK
-F_SETLKW
-F_GETOWN
-F_SETOWN
-
-FD_CLOEXEC
-
-F_RDLCK
-F_UNLCK
-F_WRLCK
-
-O_CREAT
-O_EXCL
-O_NOCTTY
-O_TRUNC
-
-O_APPEND
-O_DSYNC
-O_NONBLOCK
-O_RSYNC
-O_SYNC
-
-O_ACCMODE
-O_RDONLY
-O_RDWR
-O_WRONLY
-
-struct flock
-{
-    short   l_type;
-    short   l_whence;
-    off_t   l_start;
-    off_t   l_len;
-    pid_t   l_pid;
-}
-
-int creat(in char*, mode_t);
-int fcntl(int, int, ...);
-int open(in char*, int, ...);
-*/
-version( linux )
-{
-    const F_DUPFD       = 0;
-    const F_GETFD       = 1;
-    const F_SETFD       = 2;
-    const F_GETFL       = 3;
-    const F_SETFL       = 4;
-  static if( __USE_FILE_OFFSET64 )
-  {
-    const F_GETLK       = 12;
-    const F_SETLK       = 13;
-    const F_SETLKW      = 14;
-  }
-  else
-  {
-    const F_GETLK       = 5;
-    const F_SETLK       = 6;
-    const F_SETLKW      = 7;
-  }
-    const F_GETOWN      = 9;
-    const F_SETOWN      = 8;
-
-    const FD_CLOEXEC    = 1;
-
-    const F_RDLCK       = 0;
-    const F_UNLCK       = 2;
-    const F_WRLCK       = 1;
-
-    const O_CREAT       = 0100;
-    const O_EXCL        = 0200;
-    const O_NOCTTY      = 0400;
-    const O_TRUNC       = 01000;
-
-    const O_APPEND      = 02000;
-    const O_NONBLOCK    = 04000;
-    const O_SYNC        = 010000;
-    const O_DSYNC       = O_SYNC;
-    const O_RSYNC       = O_SYNC;
-
-    const O_ACCMODE     = 0003;
-    const O_RDONLY      = 00;
-    const O_WRONLY      = 01;
-    const 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, ...);
-    }
-}
-else version( darwin )
-{
-    const F_DUPFD       = 0;
-    const F_GETFD       = 1;
-    const F_SETFD       = 2;
-    const F_GETFL       = 3;
-    const F_SETFL       = 4;
-    const F_GETOWN      = 5;
-    const F_SETOWN      = 6;
-    const F_GETLK       = 7;
-    const F_SETLK       = 8;
-    const F_SETLKW      = 9;
-
-    const FD_CLOEXEC    = 1;
-
-    const F_RDLCK       = 1;
-    const F_UNLCK       = 2;
-    const F_WRLCK       = 3;
-
-    const O_CREAT       = 0x0200;
-    const O_EXCL        = 0x0800;
-    const O_NOCTTY      = 0;
-    const O_TRUNC       = 0x0400;
-
-    const O_RDONLY      = 0x0000;
-    const O_WRONLY      = 0x0001;
-    const O_RDWR        = 0x0002;
-    const O_ACCMODE     = 0x0003;
-
-    const O_NONBLOCK    = 0x0004;
-    const O_APPEND      = 0x0008;
-    const O_SYNC        = 0x0080;
-    //const O_DSYNC
-    //const O_RSYNC
-
-    struct flock
-    {
-        off_t   l_start;
-        off_t   l_len;
-        pid_t   l_pid;
-        short   l_type;
-        short   l_whence;
-    }
-
-    int creat(in char*, mode_t);
-    int open(in char*, int, ...);
-}
-else version( freebsd )
-{
-    const F_DUPFD       = 0;
-    const F_GETFD       = 1;
-    const F_SETFD       = 2;
-    const F_GETFL       = 3;
-    const F_SETFL       = 4;
-    const F_GETOWN      = 5;
-    const F_SETOWN      = 6;
-    const F_GETLK       = 7;
-    const F_SETLK       = 8;
-    const F_SETLKW      = 9;
-
-    const FD_CLOEXEC    = 1;
-
-    const F_RDLCK       = 1;
-    const F_UNLCK       = 2;
-    const F_WRLCK       = 3;
-
-    const O_CREAT       = 0x0200;
-    const O_EXCL        = 0x0800;
-    const O_NOCTTY      = 0;
-    const O_TRUNC       = 0x0400;
-
-    const O_RDONLY      = 0x0000;
-    const O_WRONLY      = 0x0001;
-    const O_RDWR        = 0x0002;
-    const O_ACCMODE     = 0x0003;
-
-    const O_NONBLOCK    = 0x0004;
-    const O_APPEND      = 0x0008;
-    const O_SYNC        = 0x0080;
-    //const O_DSYNC
-    //const O_RSYNC
-
-    struct flock
-    {
-        off_t   l_start;
-        off_t   l_len;
-        pid_t   l_pid;
-        short   l_type;
-        short   l_whence;
-    }
-
-    int creat(in char*, mode_t);
-    int open(in char*, int, ...);
-}
-
-//int creat(in char*, mode_t);
-int fcntl(int, int, ...);
-//int open(in char*, int, ...);
-
-//
-// Advisory Information (ADV)
-//
-/*
-POSIX_FADV_NORMAL
-POSIX_FADV_SEQUENTIAL
-POSIX_FADV_RANDOM
-POSIX_FADV_WILLNEED
-POSIX_FADV_DONTNEED
-POSIX_FADV_NOREUSE
-
-int posix_fadvise(int, off_t, off_t, int);
-int posix_fallocate(int, off_t, off_t);
-*/
--- a/druntime/import/stdc/posix/inttypes.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.inttypes;
-
-private import stdc.posix.config;
-public import stdc.inttypes;
-
-//
-// Required
-//
-/*
-intmax_t  imaxabs(intmax_t);
-imaxdiv_t imaxdiv(intmax_t, intmax_t);
-intmax_t  strtoimax(in char*, char**, int);
-uintmax_t strtoumax(in char *, char**, int);
-intmax_t  wcstoimax(in wchar_t*, wchar_t**, int);
-uintmax_t wcstoumax(in wchar_t*, wchar_t**, int);
-*/
-intmax_t  imaxabs(intmax_t);
-imaxdiv_t imaxdiv(intmax_t, intmax_t);
-intmax_t  strtoimax(in char*, char**, int);
-uintmax_t strtoumax(in char *, char**, int);
-intmax_t  wcstoimax(in wchar_t*, wchar_t**, int);
-uintmax_t wcstoumax(in wchar_t*, wchar_t**, int);
--- a/druntime/import/stdc/posix/net/if_.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.net.if_;
-
-private import stdc.posix.config;
-
-extern (C):
-
-//
-// Required
-//
-/*
-struct if_nameindex // renamed to if_nameindex_t
-{
-    uint    if_index;
-    char*   if_name;
-}
-
-IF_NAMESIZE
-
-uint            if_nametoindex(in char*);
-char*           if_indextoname(uint, char*);
-if_nameindex_t* if_nameindex();
-void            if_freenameindex(if_nameindex_t*);
-*/
-
-version( linux )
-{
-    struct if_nameindex_t
-    {
-        uint    if_index;
-        char*   if_name;
-    }
-
-    const IF_NAMESIZE = 16;
-
-    uint            if_nametoindex(in char*);
-    char*           if_indextoname(uint, char*);
-    if_nameindex_t* if_nameindex();
-    void            if_freenameindex(if_nameindex_t*);
-}
-else version( darwin )
-{
-    struct if_nameindex_t
-    {
-        uint    if_index;
-        char*   if_name;
-    }
-
-    const IF_NAMESIZE = 16;
-
-    uint            if_nametoindex(in char*);
-    char*           if_indextoname(uint, char*);
-    if_nameindex_t* if_nameindex();
-    void            if_freenameindex(if_nameindex_t*);
-}
-else version( freebsd )
-{
-    struct if_nameindex_t
-    {
-        uint    if_index;
-        char*   if_name;
-    }
-
-    const IF_NAMESIZE = 16;
-
-    uint            if_nametoindex(in char*);
-    char*           if_indextoname(uint, char*);
-    if_nameindex_t* if_nameindex();
-    void            if_freenameindex(if_nameindex_t*);
-}
--- a/druntime/import/stdc/posix/netinet/in_.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,327 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.netinet.in_;
-
-private import stdc.posix.config;
-public import stdc.inttypes : uint32_t, uint16_t, uint8_t;
-public import stdc.posix.arpa.inet;
-public import stdc.posix.sys.socket; // for sa_family_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-NOTE: The following must must be defined in stdc.posix.arpa.inet to break
-      a circular import: in_port_t, in_addr_t, struct in_addr, INET_ADDRSTRLEN.
-
-in_port_t
-in_addr_t
-
-sa_family_t // from stdc.posix.sys.socket
-uint8_t     // from stdc.inttypes
-uint32_t    // from stdc.inttypes
-
-struct in_addr
-{
-    in_addr_t   s_addr;
-}
-
-struct sockaddr_in
-{
-    sa_family_t sin_family;
-    in_port_t   sin_port;
-    in_addr     sin_addr;
-}
-
-IPPROTO_IP
-IPPROTO_ICMP
-IPPROTO_TCP
-IPPROTO_UDP
-
-INADDR_ANY
-INADDR_BROADCAST
-
-INET_ADDRSTRLEN
-
-htonl() // from stdc.posix.arpa.inet
-htons() // from stdc.posix.arpa.inet
-ntohl() // from stdc.posix.arpa.inet
-ntohs() // from stdc.posix.arpa.inet
-*/
-
-version( linux )
-{
-    private const __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
-    }
-
-    const uint INADDR_ANY       = 0x00000000;
-    const uint INADDR_BROADCAST = 0xffffffff;
-}
-else version( darwin )
-{
-    private const __SOCK_SIZE__ = 16;
-
-    struct sockaddr_in
-    {
-        ubyte       sin_len;
-        sa_family_t sin_family;
-        in_port_t   sin_port;
-        in_addr     sin_addr;
-        ubyte[8]    sin_zero;
-    }
-
-    enum
-    {
-        IPPROTO_IP   = 0,
-        IPPROTO_ICMP = 1,
-        IPPROTO_TCP  = 6,
-        IPPROTO_UDP  = 17
-    }
-
-    const uint INADDR_ANY       = 0x00000000;
-    const uint INADDR_BROADCAST = 0xffffffff;
-}
-else version( freebsd )
-{
-    private const __SOCK_SIZE__ = 16;
-
-    struct sockaddr_in
-    {
-        ubyte       sin_len;
-        sa_family_t sin_family;
-        in_port_t   sin_port;
-        in_addr     sin_addr;
-        ubyte[8]    sin_zero;
-    }
-
-    enum
-    {
-        IPPROTO_IP   = 0,
-        IPPROTO_ICMP = 1,
-        IPPROTO_TCP  = 6,
-        IPPROTO_UDP  = 17
-    }
-
-    const uint INADDR_ANY       = 0x00000000;
-    const uint INADDR_BROADCAST = 0xffffffff;
-}
-
-
-//
-// IPV6 (IP6)
-//
-/*
-NOTE: The following must must be defined in stdc.posix.arpa.inet to break
-      a circular import: INET6_ADDRSTRLEN.
-
-struct in6_addr
-{
-    uint8_t[16] s6_addr;
-}
-
-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 in6_addr in6addr_any;
-extern in6_addr in6addr_loopback;
-
-struct ipv6_mreq
-{
-    in6_addr    ipv6mr_multiaddr;
-    uint        ipv6mr_interface;
-}
-
-IPPROTO_IPV6
-
-INET6_ADDRSTRLEN
-
-IPV6_JOIN_GROUP
-IPV6_LEAVE_GROUP
-IPV6_MULTICAST_HOPS
-IPV6_MULTICAST_IF
-IPV6_MULTICAST_LOOP
-IPV6_UNICAST_HOPS
-IPV6_V6ONLY
-
-// macros
-int IN6_IS_ADDR_UNSPECIFIED(in6_addr*)
-int IN6_IS_ADDR_LOOPBACK(in6_addr*)
-int IN6_IS_ADDR_MULTICAST(in6_addr*)
-int IN6_IS_ADDR_LINKLOCAL(in6_addr*)
-int IN6_IS_ADDR_SITELOCAL(in6_addr*)
-int IN6_IS_ADDR_V4MAPPED(in6_addr*)
-int IN6_IS_ADDR_V4COMPAT(in6_addr*)
-int IN6_IS_ADDR_MC_NODELOCAL(in6_addr*)
-int IN6_IS_ADDR_MC_LINKLOCAL(in6_addr*)
-int IN6_IS_ADDR_MC_SITELOCAL(in6_addr*)
-int IN6_IS_ADDR_MC_ORGLOCAL(in6_addr*)
-int IN6_IS_ADDR_MC_GLOBAL(in6_addr*)
-*/
-
-version ( linux )
-{
-    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 in6_addr in6addr_any;
-    extern 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)
-//
-/*
-IPPROTO_RAW
-*/
-
-version (linux )
-{
-    const uint IPPROTO_RAW = 255;
-}
--- a/druntime/import/stdc/posix/netinet/tcp.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.netinet.tcp;
-
-private import stdc.posix.config;
-
-extern (C):
-
-//
-// Required
-//
-/*
-TCP_NODELAY
-*/
-
-version( linux )
-{
-    const TCP_NODELAY = 1;
-}
-else version( darwin )
-{
-    const TCP_NODELAY = 1;
-}
-else version( freebsd )
-{
-    const TCP_NODELAY = 1;
-}
--- a/druntime/import/stdc/posix/poll.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.poll;
-
-private import stdc.posix.config;
-
-extern (C):
-
-//
-// XOpen (XSI)
-//
-/*
-struct pollfd
-{
-    int     fd;
-    short   events;
-    short   revents;
-}
-
-nfds_t
-
-POLLIN
-POLLRDNORM
-POLLRDBAND
-POLLPRI
-POLLOUT
-POLLWRNORM
-POLLWRBAND
-POLLERR
-POLLHUP
-POLLNVAL
-
-int poll(pollfd[], nfds_t, int);
-*/
-
-version( linux )
-{
-    struct pollfd
-    {
-        int     fd;
-        short   events;
-        short   revents;
-    }
-
-    alias c_ulong nfds_t;
-
-    const POLLIN        = 0x001;
-    const POLLRDNORM    = 0x040;
-    const POLLRDBAND    = 0x080;
-    const POLLPRI       = 0x002;
-    const POLLOUT       = 0x004;
-    const POLLWRNORM    = 0x100;
-    const POLLWRBAND    = 0x200;
-    const POLLERR       = 0x008;
-    const POLLHUP       = 0x010;
-    const POLLNVAL      = 0x020;
-
-    int poll(pollfd*, nfds_t, int);
-}
-else version( darwin )
-{
-    struct pollfd
-    {
-        int     fd;
-        short   events;
-        short   revents;
-    };
-
-    alias uint nfds_t;
-
-    enum
-    {
-        POLLIN      = 0x0001,
-        POLLPRI     = 0x0002,
-        POLLOUT     = 0x0004,
-        POLLRDNORM  = 0x0040,
-        POLLWRNORM  = POLLOUT,
-        POLLRDBAND  = 0x0080,
-        POLLWRBAND  = 0x0100,
-        POLLEXTEND  = 0x0200,
-        POLLATTRIB  = 0x0400,
-        POLLNLINK   = 0x0800,
-        POLLWRITE   = 0x1000,
-        POLLERR     = 0x0008,
-        POLLHUP     = 0x0010,
-        POLLNVAL    = 0x0020,
-
-        POLLSTANDARD = (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|
-                        POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
-    }
-
-    int poll(pollfd*, nfds_t, int);
-}
-else version( freebsd )
-{
-    struct pollfd
-    {
-        int     fd;
-        short   events;
-        short   revents;
-    };
-
-    alias uint nfds_t;
-
-    enum
-    {
-        POLLIN      = 0x0001,
-        POLLPRI     = 0x0002,
-        POLLOUT     = 0x0004,
-        POLLRDNORM  = 0x0040,
-        POLLWRNORM  = POLLOUT,
-        POLLRDBAND  = 0x0080,
-        POLLWRBAND  = 0x0100,
-        //POLLEXTEND  = 0x0200,
-        //POLLATTRIB  = 0x0400,
-        //POLLNLINK   = 0x0800,
-        //POLLWRITE   = 0x1000,
-        POLLERR     = 0x0008,
-        POLLHUP     = 0x0010,
-        POLLNVAL    = 0x0020,
-
-        POLLSTANDARD = (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|
-        POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
-    }
-
-    int poll(pollfd*, nfds_t, int);
-}
--- a/druntime/import/stdc/posix/pthread.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,580 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.pthread;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types;
-public import stdc.posix.sched;
-public import stdc.posix.time;
-
-extern (C):
-
-//
-// Required
-//
-/*
-PTHREAD_CANCEL_ASYNCHRONOUS
-PTHREAD_CANCEL_ENABLE
-PTHREAD_CANCEL_DEFERRED
-PTHREAD_CANCEL_DISABLE
-PTHREAD_CANCELED
-PTHREAD_COND_INITIALIZER
-PTHREAD_CREATE_DETACHED
-PTHREAD_CREATE_JOINABLE
-PTHREAD_EXPLICIT_SCHED
-PTHREAD_INHERIT_SCHED
-PTHREAD_MUTEX_INITIALIZER
-PTHREAD_ONCE_INIT
-PTHREAD_PROCESS_SHARED
-PTHREAD_PROCESS_PRIVATE
-
-int pthread_atfork(void function(), void function(), void function());
-int pthread_attr_destroy(pthread_attr_t*);
-int pthread_attr_getdetachstate(in pthread_attr_t*, int*);
-int pthread_attr_getschedparam(in pthread_attr_t*, sched_param*);
-int pthread_attr_init(pthread_attr_t*);
-int pthread_attr_setdetachstate(pthread_attr_t*, int);
-int pthread_attr_setschedparam(in pthread_attr_t*, sched_param*);
-int pthread_cancel(pthread_t);
-void pthread_cleanup_push(void function(void*), void*);
-void pthread_cleanup_pop(int);
-int pthread_cond_broadcast(pthread_cond_t*);
-int pthread_cond_destroy(pthread_cond_t*);
-int pthread_cond_init(in pthread_cond_t*, pthread_condattr_t*);
-int pthread_cond_signal(pthread_cond_t*);
-int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, in timespec*);
-int pthread_cond_wait(pthread_cond_t*, pthread_mutex_t*);
-int pthread_condattr_destroy(pthread_condattr_t*);
-int pthread_condattr_init(pthread_condattr_t*);
-int pthread_create(pthread_t*, in pthread_attr_t*, void* function(void*), void*);
-int pthread_detach(pthread_t);
-int pthread_equal(pthread_t, pthread_t);
-void pthread_exit(void*);
-void* pthread_getspecific(pthread_key_t);
-int pthread_join(pthread_t, void**);
-int pthread_key_create(pthread_key_t*, void function(void*));
-int pthread_key_delete(pthread_key_t);
-int pthread_mutex_destroy(pthread_mutex_t*);
-int pthread_mutex_init(pthread_mutex_t*, pthread_mutexattr_t*);
-int pthread_mutex_lock(pthread_mutex_t*);
-int pthread_mutex_trylock(pthread_mutex_t*);
-int pthread_mutex_unlock(pthread_mutex_t*);
-int pthread_mutexattr_destroy(pthread_mutexattr_t*);
-int pthread_mutexattr_init(pthread_mutexattr_t*);
-int pthread_once(pthread_once_t*, void function());
-int pthread_rwlock_destroy(pthread_rwlock_t*);
-int pthread_rwlock_init(in pthread_rwlock_t*, pthread_rwlockattr_t*);
-int pthread_rwlock_rdlock(pthread_rwlock_t*);
-int pthread_rwlock_tryrdlock(pthread_rwlock_t*);
-int pthread_rwlock_trywrlock(pthread_rwlock_t*);
-int pthread_rwlock_unlock(pthread_rwlock_t*);
-int pthread_rwlock_wrlock(pthread_rwlock_t*);
-int pthread_rwlockattr_destroy(pthread_rwlockattr_t*);
-int pthread_rwlockattr_init(pthread_rwlockattr_t*);
-pthread_t pthread_self();
-int pthread_setcancelstate(int, int*);
-int pthread_setcanceltype(int, int*);
-int pthread_setspecific(pthread_key_t, in void*);
-void pthread_testcancel();
-*/
-version( linux )
-{
-    enum
-    {
-        PTHREAD_CANCEL_ENABLE,
-        PTHREAD_CANCEL_DISABLE
-    }
-
-    enum
-    {
-        PTHREAD_CANCEL_DEFERRED,
-        PTHREAD_CANCEL_ASYNCHRONOUS
-    }
-
-    const PTHREAD_CANCELED = cast(void*) -1;
-
-    //const 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
-    }
-
-    //const pthread_mutex_t PTHREAD_MUTEX_INITIALIZER = { 0, 0, null, PTHREAD_MUTEX_NORMAL, { 0, 0 } };
-
-    const PTHREAD_ONCE_INIT = 0;
-
-    enum
-    {
-        PTHREAD_PROCESS_PRIVATE,
-        PTHREAD_PROCESS_SHARED
-    }
-}
-else version( darwin )
-{
-    enum
-    {
-        PTHREAD_CANCEL_ENABLE   = 1,
-        PTHREAD_CANCEL_DISABLE  = 0
-    }
-
-    enum
-    {
-        PTHREAD_CANCEL_DEFERRED     = 2,
-        PTHREAD_CANCEL_ASYNCHRONOUS = 0
-    }
-
-    const PTHREAD_CANCELED = cast(void*) -1;
-
-    //const pthread_mutex_t PTHREAD_COND_INITIALIZER = { __LOCK_ALT_INITIALIZER, 0, "", 0 };
-
-    enum
-    {
-        PTHREAD_CREATE_JOINABLE = 1,
-        PTHREAD_CREATE_DETACHED = 2
-    }
-
-    enum
-    {
-        PTHREAD_INHERIT_SCHED   = 1,
-        PTHREAD_EXPLICIT_SCHED  = 2
-    }
-
-    //const pthread_mutex_t PTHREAD_MUTEX_INITIALIZER = { 0, 0, null, PTHREAD_MUTEX_NORMAL, { 0, 0 } };
-
-    const PTHREAD_ONCE_INIT = 0;
-
-    enum
-    {
-        PTHREAD_PROCESS_PRIVATE = 2,
-        PTHREAD_PROCESS_SHARED  = 1
-    }
-}
-
-int pthread_atfork(void function(), void function(), void function());
-int pthread_attr_destroy(pthread_attr_t*);
-int pthread_attr_getdetachstate(in pthread_attr_t*, int*);
-int pthread_attr_getschedparam(in pthread_attr_t*, sched_param*);
-int pthread_attr_init(pthread_attr_t*);
-int pthread_attr_setdetachstate(pthread_attr_t*, int);
-int pthread_attr_setschedparam(in pthread_attr_t*, sched_param*);
-int pthread_cancel(pthread_t);
-
-version( linux )
-{
-    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( darwin )
-{
-    alias void function(void*) _pthread_cleanup_routine;
-
-    struct _pthread_cleanup_buffer
-    {
-        _pthread_cleanup_routine    __routine;
-        void*                       __arg;
-        _pthread_cleanup_buffer*    __next;
-    }
-
-    struct pthread_cleanup
-    {
-        _pthread_cleanup_buffer buffer = void;
-
-        void push()( _pthread_cleanup_routine routine, void* arg )
-        {
-            pthread_t self       = pthread_self();
-            buffer.__routine     = routine;
-            buffer.__arg         = arg;
-            buffer.__next        = cast(_pthread_cleanup_buffer*) self.__cleanup_stack;
-            self.__cleanup_stack = cast(pthread_handler_rec*) &buffer;
-        }
-
-        void pop()( int execute )
-        {
-            pthread_t self       = pthread_self();
-            self.__cleanup_stack = cast(pthread_handler_rec*) buffer.__next;
-            if( execute )
-            {
-                buffer.__routine( buffer.__arg );
-            }
-        }
-    }
-}
-else
-{
-    void pthread_cleanup_push(void function(void*), void*);
-    void pthread_cleanup_pop(int);
-}
-
-int pthread_cond_broadcast(pthread_cond_t*);
-int pthread_cond_destroy(pthread_cond_t*);
-int pthread_cond_init(in pthread_cond_t*, pthread_condattr_t*);
-int pthread_cond_signal(pthread_cond_t*);
-int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, in timespec*);
-int pthread_cond_wait(pthread_cond_t*, pthread_mutex_t*);
-int pthread_condattr_destroy(pthread_condattr_t*);
-int pthread_condattr_init(pthread_condattr_t*);
-int pthread_create(pthread_t*, in pthread_attr_t*, void* function(void*), void*);
-int pthread_detach(pthread_t);
-int pthread_equal(pthread_t, pthread_t);
-void pthread_exit(void*);
-void* pthread_getspecific(pthread_key_t);
-int pthread_join(pthread_t, void**);
-int pthread_key_create(pthread_key_t*, void function(void*));
-int pthread_key_delete(pthread_key_t);
-int pthread_mutex_destroy(pthread_mutex_t*);
-int pthread_mutex_init(pthread_mutex_t*, pthread_mutexattr_t*);
-int pthread_mutex_lock(pthread_mutex_t*);
-int pthread_mutex_trylock(pthread_mutex_t*);
-int pthread_mutex_unlock(pthread_mutex_t*);
-int pthread_mutexattr_destroy(pthread_mutexattr_t*);
-int pthread_mutexattr_init(pthread_mutexattr_t*);
-int pthread_once(pthread_once_t*, void function());
-int pthread_rwlock_destroy(pthread_rwlock_t*);
-int pthread_rwlock_init(in pthread_rwlock_t*, pthread_rwlockattr_t*);
-int pthread_rwlock_rdlock(pthread_rwlock_t*);
-int pthread_rwlock_tryrdlock(pthread_rwlock_t*);
-int pthread_rwlock_trywrlock(pthread_rwlock_t*);
-int pthread_rwlock_unlock(pthread_rwlock_t*);
-int pthread_rwlock_wrlock(pthread_rwlock_t*);
-int pthread_rwlockattr_destroy(pthread_rwlockattr_t*);
-int pthread_rwlockattr_init(pthread_rwlockattr_t*);
-pthread_t pthread_self();
-int pthread_setcancelstate(int, int*);
-int pthread_setcanceltype(int, int*);
-int pthread_setspecific(pthread_key_t, in void*);
-void pthread_testcancel();
-
-//
-// Barrier (BAR)
-//
-/*
-PTHREAD_BARRIER_SERIAL_THREAD
-
-int pthread_barrier_destroy(pthread_barrier_t*);
-int pthread_barrier_init(pthread_barrier_t*, in pthread_barrierattr_t*, uint);
-int pthread_barrier_wait(pthread_barrier_t*);
-int pthread_barrierattr_destroy(pthread_barrierattr_t*);
-int pthread_barrierattr_getpshared(in pthread_barrierattr_t*, int*); (BAR|TSH)
-int pthread_barrierattr_init(pthread_barrierattr_t*);
-int pthread_barrierattr_setpshared(pthread_barrierattr_t*, int); (BAR|TSH)
-*/
-
-version( linux )
-{
-    const PTHREAD_BARRIER_SERIAL_THREAD = -1;
-
-    int pthread_barrier_destroy(pthread_barrier_t*);
-    int pthread_barrier_init(pthread_barrier_t*, in pthread_barrierattr_t*, uint);
-    int pthread_barrier_wait(pthread_barrier_t*);
-    int pthread_barrierattr_destroy(pthread_barrierattr_t*);
-    int pthread_barrierattr_getpshared(in pthread_barrierattr_t*, int*);
-    int pthread_barrierattr_init(pthread_barrierattr_t*);
-    int pthread_barrierattr_setpshared(pthread_barrierattr_t*, int);
-}
-
-//
-// Clock (CS)
-//
-/*
-int pthread_condattr_getclock(in pthread_condattr_t*, clockid_t*);
-int pthread_condattr_setclock(pthread_condattr_t*, clockid_t);
-*/
-
-//
-// Spinlock (SPI)
-//
-/*
-int pthread_spin_destroy(pthread_spinlock_t*);
-int pthread_spin_init(pthread_spinlock_t*, int);
-int pthread_spin_lock(pthread_spinlock_t*);
-int pthread_spin_trylock(pthread_spinlock_t*);
-int pthread_spin_unlock(pthread_spinlock_t*);
-*/
-
-version( linux )
-{
-    int pthread_spin_destroy(pthread_spinlock_t*);
-    int pthread_spin_init(pthread_spinlock_t*, int);
-    int pthread_spin_lock(pthread_spinlock_t*);
-    int pthread_spin_trylock(pthread_spinlock_t*);
-    int pthread_spin_unlock(pthread_spinlock_t*);
-}
-
-//
-// XOpen (XSI)
-//
-/*
-PTHREAD_MUTEX_DEFAULT
-PTHREAD_MUTEX_ERRORCHECK
-PTHREAD_MUTEX_NORMAL
-PTHREAD_MUTEX_RECURSIVE
-
-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);
-*/
-
-version( linux )
-{
-    const PTHREAD_MUTEX_NORMAL      = 0;
-    const PTHREAD_MUTEX_RECURSIVE   = 1;
-    const PTHREAD_MUTEX_ERRORCHECK  = 2;
-    const 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);
-}
-else version( darwin )
-{
-    const PTHREAD_MUTEX_NORMAL      = 0;
-    const PTHREAD_MUTEX_ERRORCHECK  = 1;
-    const PTHREAD_MUTEX_RECURSIVE   = 2;
-    const 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);
-}
-else version( freebsd )
-{
-    enum
-    {
-        PTHREAD_MUTEX_ERRORCHECK    = 1,
-        PTHREAD_MUTEX_RECURSIVE     = 2,
-        PTHREAD_MUTEX_NORMAL        = 3,
-        PTHREAD_MUTEX_ADAPTIVE_NP   = 4,
-        PTHREAD_MUTEX_TYPE_MAX
-    }
-    const PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_ERRORCHECK;
-
-    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(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*);
-*/
-
-version( linux )
-{
-    int pthread_getcpuclockid(pthread_t, clockid_t*);
-}
-
-//
-// Timeouts (TMO)
-//
-/*
-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*);
-*/
-
-version( linux )
-{
-    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*);
-}
-else version( darwin )
-{
-    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)
-//
-/*
-PTHREAD_PRIO_INHERIT (TPI)
-PTHREAD_PRIO_NONE (TPP|TPI)
-PTHREAD_PRIO_PROTECT (TPI)
-
-int pthread_mutex_getprioceiling(in pthread_mutex_t*, int*); (TPP)
-int pthread_mutex_setprioceiling(pthread_mutex_t*, int, int*); (TPP)
-int pthread_mutexattr_getprioceiling(pthread_mutexattr_t*, int*); (TPP)
-int pthread_mutexattr_getprotocol(in pthread_mutexattr_t*, int*); (TPI|TPP)
-int pthread_mutexattr_setprioceiling(pthread_mutexattr_t*, int); (TPP)
-int pthread_mutexattr_setprotocol(pthread_mutexattr_t*, int); (TPI|TPP)
-*/
-
-//
-// Scheduling (TPS)
-//
-/*
-PTHREAD_SCOPE_PROCESS
-PTHREAD_SCOPE_SYSTEM
-
-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);
-*/
-
-version( linux )
-{
-    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);
-}
-else version( darwin )
-{
-    enum
-    {
-        PTHREAD_SCOPE_SYSTEM    = 1,
-        PTHREAD_SCOPE_PROCESS   = 2
-    }
-
-    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);
-}
-else version( freebsd )
-{
-    enum
-    {
-        PTHREAD_SCOPE_PROCESS   = 0,
-        PTHREAD_SCOPE_SYSTEM    = 0x2
-    }
-
-    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(in pthread_attr_t*, int);
-    int pthread_getschedparam(pthread_t, int*, sched_param*);
-    int pthread_setschedparam(pthread_t, int, sched_param*);
-    //int pthread_setschedprio(pthread_t, int);
-}
-
-//
-// Stack (TSA|TSS)
-//
-/*
-int pthread_attr_getstack(in pthread_attr_t*, void**, size_t*); (TSA|TSS)
-int pthread_attr_getstackaddr(in pthread_attr_t*, void**); (TSA)
-int pthread_attr_getstacksize(in pthread_attr_t*, size_t*); (TSS)
-int pthread_attr_setstack(pthread_attr_t*, void*, size_t); (TSA|TSS)
-int pthread_attr_setstackaddr(pthread_attr_t*, void*); (TSA)
-int pthread_attr_setstacksize(pthread_attr_t*, size_t); (TSS)
-*/
-
-version( linux )
-{
-    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);
-}
-else version( darwin )
-{
-    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);
-}
-else version( freebsd )
-{
-    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)
-//
-/*
-int pthread_condattr_getpshared(in pthread_condattr_t*, int*);
-int pthread_condattr_setpshared(pthread_condattr_t*, int);
-int pthread_mutexattr_getpshared(in pthread_mutexattr_t*, int*);
-int pthread_mutexattr_setpshared(pthread_mutexattr_t*, int);
-int pthread_rwlockattr_getpshared(in pthread_rwlockattr_t*, int*);
-int pthread_rwlockattr_setpshared(pthread_rwlockattr_t*, int);
-*/
--- a/druntime/import/stdc/posix/pwd.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.pwd;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types; // for gid_t, uid_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-struct passwd
-{
-    char*   pw_name;
-    uid_t   pw_uid;
-    gid_t   pw_gid;
-    char*   pw_dir;
-    char*   pw_shell;
-}
-
-passwd* getpwnam(in char*);
-passwd* getpwuid(uid_t);
-*/
-
-version( linux )
-{
-    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;
-    }
-}
-else version( darwin )
-{
-    struct passwd
-    {
-        char*   pw_name;
-        char*   pw_passwd;
-        uid_t   pw_uid;
-        gid_t   pw_gid;
-        time_t  pw_change;
-        char*   pw_class;
-        char*   pw_gecos;
-        char*   pw_dir;
-        char*   pw_shell;
-        time_t  pw_expire;
-    }
-}
-else version( freebsd )
-{
-    struct passwd
-    {
-        char*   pw_name;        /* user name */
-        char*   pw_passwd;      /* encrypted password */
-        uid_t   pw_uid;         /* user uid */
-        gid_t   pw_gid;         /* user gid */
-        time_t  pw_change;      /* password change time */
-        char*   pw_class;       /* user access class */
-        char*   pw_gecos;       /* Honeywell login info */
-        char*   pw_dir;     /* home directory */
-        char*   pw_shell;       /* default shell */
-        time_t  pw_expire;      /* account expiration */
-        int pw_fields;      /* internal: fields filled in */
-    }
-}
-
-passwd* getpwnam(in char*);
-passwd* getpwuid(uid_t);
-
-//
-// Thread-Safe Functions (TSF)
-//
-/*
-int getpwnam_r(in char*, passwd*, char*, size_t, passwd**);
-int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**);
-*/
-
-version( linux )
-{
-    int getpwnam_r(in char*, passwd*, char*, size_t, passwd**);
-    int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**);
-}
-else version( darwin )
-{
-    int getpwnam_r(in char*, passwd*, char*, size_t, passwd**);
-    int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**);
-}
-else version( freebsd )
-{
-    int getpwnam_r(in char*, passwd*, char*, size_t, passwd**);
-    int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**);
-}
-//
-// XOpen (XSI)
-//
-/*
-void    endpwent();
-passwd* getpwent();
-void    setpwent();
-*/
-
-version( linux )
-{
-    void    endpwent();
-    passwd* getpwent();
-    void    setpwent();
-}
-else version ( darwin )
-{
-    void    endpwent();
-    passwd* getpwent();
-    void    setpwent();
-}
-else version ( freebsd )
-{
-    void    endpwent();
-    passwd* getpwent();
-    void    setpwent();
-}
--- a/druntime/import/stdc/posix/sched.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sched;
-
-private import stdc.posix.config;
-public import stdc.posix.time;
-public import stdc.posix.sys.types;
-
-extern (C):
-
-//
-// Required
-//
-/*
-struct sched_param
-{
-    int sched_priority (THR)
-    int sched_ss_low_priority (SS|TSP)
-    struct timespec sched_ss_repl_period (SS|TSP)
-    struct timespec sched_ss_init_budget (SS|TSP)
-    int sched_ss_max_repl (SS|TSP)
-}
-
-SCHED_FIFO
-SCHED_RR
-SCHED_SPORADIC (SS|TSP)
-SCHED_OTHER
-
-int sched_getparam(pid_t, sched_param*);
-int sched_getscheduler(pid_t);
-int sched_setparam(pid_t, in sched_param*);
-int sched_setscheduler(pid_t, int, in sched_param*);
-*/
-
-version( linux )
-{
-    struct sched_param
-    {
-        int sched_priority;
-    }
-
-    const SCHED_OTHER   = 0;
-    const SCHED_FIFO    = 1;
-    const SCHED_RR      = 2;
-    //SCHED_SPORADIC (SS|TSP)
-}
-else version( darwin )
-{
-    const SCHED_OTHER   = 1;
-    const SCHED_FIFO    = 4;
-    const SCHED_RR      = 2;
-    // SCHED_SPORADIC seems to be unavailable
-
-    private const __SCHED_PARAM_SIZE__ = 4;
-
-    struct sched_param
-    {
-        int                         sched_priority;
-        byte[__SCHED_PARAM_SIZE__]  opaque;
-    }
-}
-else version( freebsd )
-{
-    struct sched_param
-    {
-        int sched_priority;
-    }
-
-    const SCHED_FIFO    = 1;
-    const SCHED_OTHER   = 2;
-    const SCHED_RR      = 3;
-    //SCHED_SPORADIC (SS|TSP)
-}
-
-int sched_getparam(pid_t, sched_param*);
-int sched_getscheduler(pid_t);
-int sched_setparam(pid_t, in sched_param*);
-int sched_setscheduler(pid_t, int, in sched_param*);
-
-//
-// Thread (THR)
-//
-/*
-int sched_yield();
-*/
-
-version( linux )
-{
-    int sched_yield();
-}
-else version( darwin )
-{
-    int sched_yield();
-}
-else version( freebsd )
-{
-    int sched_yield();
-}
-
-//
-// Scheduling (TPS)
-//
-/*
-int sched_get_priority_max(int);
-int sched_get_priority_min(int);
-int sched_rr_get_interval(pid_t, timespec*);
-*/
-
-version( linux )
-{
-    int sched_get_priority_max(int);
-    int sched_get_priority_min(int);
-    int sched_rr_get_interval(pid_t, timespec*);
-}
-else version( darwin )
-{
-    int sched_get_priority_min(int);
-    int sched_get_priority_max(int);
-    //int sched_rr_get_interval(pid_t, timespec*); // FIXME: unavailable?
-}
-else version( freebsd )
-{
-    int sched_get_priority_min(int);
-    int sched_get_priority_max(int);
-    int sched_rr_get_interval(pid_t, timespec*);
-}
--- a/druntime/import/stdc/posix/semaphore.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.semaphore;
-
-private import stdc.posix.config;
-private import stdc.posix.time;
-
-extern (C):
-
-//
-// Required
-//
-/*
-sem_t
-SEM_FAILED
-
-int sem_close(sem_t*);
-int sem_destroy(sem_t*);
-int sem_getvalue(sem_t*, int*);
-int sem_init(sem_t*, int, uint);
-sem_t* sem_open(in char*, int, ...);
-int sem_post(sem_t*);
-int sem_trywait(sem_t*);
-int sem_unlink(in char*);
-int sem_wait(sem_t*);
-*/
-
-version( linux )
-{
-    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;
-    }
-
-    const SEM_FAILED    = cast(sem_t*) null;
-}
-else version( darwin )
-{
-    alias int sem_t;
-
-    const SEM_FAILED    = cast(sem_t*) null;
-}
-else version( freebsd )
-{
-    const uint SEM_MAGIC = 0x09fa4012;
-    const SEM_USER = 0;
-
-    alias void* sem_t;
-
-    const SEM_FAILED = cast(sem_t*) null;
-}
-
-int sem_close(sem_t*);
-int sem_destroy(sem_t*);
-int sem_getvalue(sem_t*, int*);
-int sem_init(sem_t*, int, uint);
-sem_t* sem_open(in char*, int, ...);
-int sem_post(sem_t*);
-int sem_trywait(sem_t*);
-int sem_unlink(in char*);
-int sem_wait(sem_t*);
-
-//
-// Timeouts (TMO)
-//
-/*
-int sem_timedwait(sem_t*, in timespec*);
-*/
-
-version( linux )
-{
-    int sem_timedwait(sem_t*, in timespec*);
-}
-else version( darwin )
-{
-    int sem_timedwait(sem_t*, in timespec*);
-}
-else version( freebsd )
-{
-    int sem_timedwait(sem_t*, in timespec*);
-}
--- a/druntime/import/stdc/posix/setjmp.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.setjmp;
-
-private import stdc.posix.config;
-private import stdc.posix.signal; // for sigset_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-jmp_buf
-
-int  setjmp(jmp_buf);
-void longjmp(jmp_buf, int);
-*/
-
-version( linux )
-{
-    version( X86_64 )
-    {
-        //const JB_BX     = 0;
-        //const JB_BP     = 1;
-        //const JB_12     = 2;
-        //const JB_13     = 3;
-        //const JB_14     = 4;
-        //const JB_15     = 5;
-        //const JB_SP     = 6;
-        //const JB_PC     = 7;
-        //const JB_SIZE   = 64;
-
-        alias long[8] __jmp_buf;
-    }
-    else version( X86 )
-    {
-        //const JB_BX     = 0;
-        //const JB_SI     = 1;
-        //const JB_DI     = 2;
-        //const JB_BP     = 3;
-        //const JB_SP     = 4;
-        //const JB_PC     = 5;
-        //const JB_SIZE   = 24;
-
-        alias int[6] __jmp_buf;
-    }
-    else version ( SPARC )
-    {
-        alias int[3] __jmp_buf;
-    }
-
-    struct __jmp_buf_tag
-    {
-        __jmp_buf   __jmpbuf;
-        int         __mask_was_saved;
-        sigset_t    __saved_mask;
-    }
-
-    alias __jmp_buf_tag[1] jmp_buf;
-
-    alias _setjmp setjmp; // see XOpen block
-    void longjmp(jmp_buf, int);
-}
-
-//
-// C Extension (CX)
-//
-/*
-sigjmp_buf
-
-int  sigsetjmp(sigjmp_buf, int);
-void siglongjmp(sigjmp_buf, int);
-*/
-
-version( linux )
-{
-    alias jmp_buf sigjmp_buf;
-
-    int __sigsetjmp(sigjmp_buf, int);
-    alias __sigsetjmp sigsetjmp;
-    void siglongjmp(sigjmp_buf, int);
-}
-
-//
-// XOpen (XSI)
-//
-/*
-int  _setjmp(jmp_buf);
-void _longjmp(jmp_buf, int);
-*/
-
-version( linux )
-{
-    int  _setjmp(jmp_buf);
-    void _longjmp(jmp_buf, int);
-}
--- a/druntime/import/stdc/posix/signal.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,837 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.signal;
-
-private import stdc.posix.config;
-public import stdc.signal;
-public import stdc.stddef;          // for size_t
-public import stdc.posix.sys.types; // for pid_t
-//public import stdc.posix.time;      // for timespec, now defined here
-
-extern (C):
-
-private alias void function(int) sigfn_t;
-private alias void function(int, siginfo_t*, void*) sigactfn_t;
-
-//
-// Required
-//
-/*
-SIG_DFL (defined in stdc.signal)
-SIG_ERR (defined in stdc.signal)
-SIG_IGN (defined in stdc.signal)
-
-sig_atomic_t (defined in stdc.signal)
-
-SIGEV_NONE
-SIGEV_SIGNAL
-SIGEV_THREAD
-
-union sigval
-{
-    int   sival_int;
-    void* sival_ptr;
-}
-
-SIGRTMIN
-SIGRTMAX
-
-SIGABRT (defined in stdc.signal)
-SIGALRM
-SIGBUS
-SIGCHLD
-SIGCONT
-SIGFPE (defined in stdc.signal)
-SIGHUP
-SIGILL (defined in stdc.signal)
-SIGINT (defined in stdc.signal)
-SIGKILL
-SIGPIPE
-SIGQUIT
-SIGSEGV (defined in stdc.signal)
-SIGSTOP
-SIGTERM (defined in stdc.signal)
-SIGTSTP
-SIGTTIN
-SIGTTOU
-SIGUSR1
-SIGUSR2
-SIGURG
-
-struct sigaction_t
-{
-    sigfn_t     sa_handler;
-    sigset_t    sa_mask;
-    sigactfn_t  sa_sigaction;
-}
-
-sigfn_t signal(int sig, sigfn_t func); (defined in stdc.signal)
-int raise(int sig);                    (defined in stdc.signal)
-*/
-
-//SIG_DFL (defined in stdc.signal)
-//SIG_ERR (defined in stdc.signal)
-//SIG_IGN (defined in stdc.signal)
-
-//sig_atomic_t (defined in stdc.signal)
-
-enum
-{
-  SIGEV_SIGNAL,
-  SIGEV_NONE,
-  SIGEV_THREAD
-}
-
-union sigval
-{
-    int     sival_int;
-    void*   sival_ptr;
-}
-
-private extern (C) int __libc_current_sigrtmin();
-private extern (C) int __libc_current_sigrtmax();
-
-alias __libc_current_sigrtmin SIGRTMIN;
-alias __libc_current_sigrtmax SIGRTMAX;
-
-version( linux )
-{
-    //SIGABRT (defined in stdc.signal)
-    const SIGALRM   = 14;
-    const SIGBUS    = 7;
-    const SIGCHLD   = 17;
-    const SIGCONT   = 18;
-    //SIGFPE (defined in stdc.signal)
-    const SIGHUP    = 1;
-    //SIGILL (defined in stdc.signal)
-    //SIGINT (defined in stdc.signal)
-    const SIGKILL   = 9;
-    const SIGPIPE   = 13;
-    const SIGQUIT   = 3;
-    //SIGSEGV (defined in stdc.signal)
-    const SIGSTOP   = 19;
-    //SIGTERM (defined in stdc.signal)
-    const SIGTSTP   = 20;
-    const SIGTTIN   = 21;
-    const SIGTTOU   = 22;
-    const SIGUSR1   = 10;
-    const SIGUSR2   = 12;
-    const SIGURG    = 23;
-}
-else version( darwin )
-{
-    //SIGABRT (defined in stdc.signal)
-    const SIGALRM   = 14;
-    const SIGBUS    = 10;
-    const SIGCHLD   = 20;
-    const SIGCONT   = 19;
-    //SIGFPE (defined in stdc.signal)
-    const SIGHUP    = 1;
-    //SIGILL (defined in stdc.signal)
-    //SIGINT (defined in stdc.signal)
-    const SIGKILL   = 9;
-    const SIGPIPE   = 13;
-    const SIGQUIT   = 3;
-    //SIGSEGV (defined in stdc.signal)
-    const SIGSTOP   = 17;
-    //SIGTERM (defined in stdc.signal)
-    const SIGTSTP   = 18;
-    const SIGTTIN   = 21;
-    const SIGTTOU   = 22;
-    const SIGUSR1   = 30;
-    const SIGUSR2   = 31;
-    const SIGURG    = 16;
-}
-else version( freebsd )
-{
-    //SIGABRT (defined in stdc.signal)
-    const SIGALRM   = 14;
-    const SIGBUS    = 10;
-    const SIGCHLD   = 20;
-    const SIGCONT   = 19;
-    //SIGFPE (defined in stdc.signal)
-    const SIGHUP    = 1;
-    //SIGILL (defined in stdc.signal)
-    //SIGINT (defined in stdc.signal)
-    const SIGKILL   = 9;
-    const SIGPIPE   = 13;
-    const SIGQUIT   = 3;
-    //SIGSEGV (defined in stdc.signal)
-    const SIGSTOP   = 17;
-    //SIGTERM (defined in stdc.signal)
-    const SIGTSTP   = 18;
-    const SIGTTIN   = 21;
-    const SIGTTOU   = 22;
-    const SIGUSR1   = 30;
-    const SIGUSR2   = 31;
-    const SIGURG    = 16;
-}
-
-struct sigaction_t
-{
-    static if( true /* __USE_POSIX199309 */ )
-    {
-        union
-        {
-            sigfn_t     sa_handler;
-            sigactfn_t  sa_sigaction;
-        }
-    }
-    else
-    {
-        sigfn_t     sa_handler;
-    }
-    sigset_t        sa_mask;
-    int             sa_flags;
-
-    version( darwin ) {} else {
-    void function() sa_restorer;
-    }
-}
-
-//
-// C Extension (CX)
-//
-/*
-SIG_HOLD
-
-sigset_t
-pid_t   (defined in sys.types)
-
-SIGABRT (defined in stdc.signal)
-SIGFPE  (defined in stdc.signal)
-SIGILL  (defined in stdc.signal)
-SIGINT  (defined in stdc.signal)
-SIGSEGV (defined in stdc.signal)
-SIGTERM (defined in stdc.signal)
-
-SA_NOCLDSTOP (CX|XSI)
-SIG_BLOCK
-SIG_UNBLOCK
-SIG_SETMASK
-
-struct siginfo_t
-{
-    int     si_signo;
-    int     si_code;
-
-    version( XSI )
-    {
-        int     si_errno;
-        pid_t   si_pid;
-        uid_t   si_uid;
-        void*   si_addr;
-        int     si_status;
-        c_long  si_band;
-    }
-    version( RTS )
-    {
-        sigval  si_value;
-    }
-}
-
-SI_USER
-SI_QUEUE
-SI_TIMER
-SI_ASYNCIO
-SI_MESGQ
-
-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*);
-*/
-
-version( linux )
-{
-    const SIG_HOLD = cast(sigfn_t) 1;
-
-    private const _SIGSET_NWORDS = 1024 / (8 * c_ulong.sizeof);
-
-    struct sigset_t
-    {
-        c_ulong[_SIGSET_NWORDS] __val;
-    }
-
-    // pid_t  (defined in sys.types)
-
-    //SIGABRT (defined in stdc.signal)
-    //SIGFPE  (defined in stdc.signal)
-    //SIGILL  (defined in stdc.signal)
-    //SIGINT  (defined in stdc.signal)
-    //SIGSEGV (defined in stdc.signal)
-    //SIGTERM (defined in stdc.signal)
-
-    const SA_NOCLDSTOP  = 1; // (CX|XSI)
-
-    const SIG_BLOCK     = 0;
-    const SIG_UNBLOCK   = 1;
-    const SIG_SETMASK   = 2;
-
-    private const __SI_MAX_SIZE = 128;
-
-    static if( false /* __WORDSIZE == 64 */ )
-    {
-        private const __SI_PAD_SIZE = ((__SI_MAX_SIZE / int.sizeof) - 4);
-    }
-    else
-    {
-        private const __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*);
-}
-else version( darwin )
-{
-    //SIG_HOLD
-
-    alias uint sigset_t;
-    // pid_t  (defined in sys.types)
-
-    //SIGABRT (defined in stdc.signal)
-    //SIGFPE  (defined in stdc.signal)
-    //SIGILL  (defined in stdc.signal)
-    //SIGINT  (defined in stdc.signal)
-    //SIGSEGV (defined in stdc.signal)
-    //SIGTERM (defined in stdc.signal)
-
-    //SA_NOCLDSTOP (CX|XSI)
-
-    //SIG_BLOCK
-    //SIG_UNBLOCK
-    //SIG_SETMASK
-
-    struct siginfo_t
-    {
-        int     si_signo;
-        int     si_errno;
-        int     si_code;
-        pid_t   si_pid;
-        uid_t   si_uid;
-        int     si_status;
-        void*   si_addr;
-        sigval  si_value;
-        int     si_band;
-        uint    pad[7];
-    }
-
-    //SI_USER
-    //SI_QUEUE
-    //SI_TIMER
-    //SI_ASYNCIO
-    //SI_MESGQ
-
-    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*);
-}
-else version( freebsd )
-{
-    struct sigset_t
-    {
-        uint __bits[4];
-    }
-
-    struct siginfo_t
-    {
-        int si_signo;
-        int si_errno;
-        int si_code;
-        pid_t si_pid;
-        uid_t si_uid;
-        int si_status;
-        void* si_addr;
-        sigval si_value;
-        union __reason
-        {
-            struct __fault
-            {
-                int _trapno;
-            }
-            __fault _fault;
-            struct __timer
-            {
-                int _timerid;
-                int _overrun;
-            }
-            __timer _timer;
-            struct __mesgq
-            {
-                int _mqd;
-            }
-            __mesgq _mesgq;
-            struct __poll
-            {
-                c_long _band;
-            }
-            __poll _poll;
-            struct ___spare___
-            {
-                c_long __spare1__;
-                int[7] __spare2__;
-            }
-            ___spare___ __spare__;
-        }
-        __reason _reason;
-    }
-
-    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)
-//
-/*
-SIGPOLL
-SIGPROF
-SIGSYS
-SIGTRAP
-SIGVTALRM
-SIGXCPU
-SIGXFSZ
-
-SA_ONSTACK
-SA_RESETHAND
-SA_RESTART
-SA_SIGINFO
-SA_NOCLDWAIT
-SA_NODEFER
-SS_ONSTACK
-SS_DISABLE
-MINSIGSTKSZ
-SIGSTKSZ
-
-ucontext_t // from ucontext
-mcontext_t // from ucontext
-
-struct stack_t
-{
-    void*   ss_sp;
-    size_t  ss_size;
-    int     ss_flags;
-}
-
-struct sigstack
-{
-    int   ss_onstack;
-    void* ss_sp;
-}
-
-ILL_ILLOPC
-ILL_ILLOPN
-ILL_ILLADR
-ILL_ILLTRP
-ILL_PRVOPC
-ILL_PRVREG
-ILL_COPROC
-ILL_BADSTK
-
-FPE_INTDIV
-FPE_INTOVF
-FPE_FLTDIV
-FPE_FLTOVF
-FPE_FLTUND
-FPE_FLTRES
-FPE_FLTINV
-FPE_FLTSUB
-
-SEGV_MAPERR
-SEGV_ACCERR
-
-BUS_ADRALN
-BUS_ADRERR
-BUS_OBJERR
-
-TRAP_BRKPT
-TRAP_TRACE
-
-CLD_EXITED
-CLD_KILLED
-CLD_DUMPED
-CLD_TRAPPED
-CLD_STOPPED
-CLD_CONTINUED
-
-POLL_IN
-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);
-*/
-
-version( linux )
-{
-    const SIGPOLL       = 29;
-    const SIGPROF       = 27;
-    const SIGSYS        = 31;
-    const SIGTRAP       = 5;
-    const SIGVTALRM     = 26;
-    const SIGXCPU       = 24;
-    const SIGXFSZ       = 25;
-
-    const SA_ONSTACK    = 0x08000000;
-    const SA_RESETHAND  = 0x80000000;
-    const SA_RESTART    = 0x10000000;
-    const SA_SIGINFO    = 4;
-    const SA_NOCLDWAIT  = 2;
-    const SA_NODEFER    = 0x40000000;
-    const SS_ONSTACK    = 1;
-    const SS_DISABLE    = 2;
-    const MINSIGSTKSZ   = 2048;
-    const SIGSTKSZ      = 8192;
-
-    //ucontext_t (defined in stdc.posix.ucontext)
-    //mcontext_t (defined in stdc.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)
-//
-/*
-NOTE: This should actually be defined in stdc.posix.time.
-      It is defined here instead to break a circular import.
-
-struct timespec
-{
-    time_t  tv_sec;
-    int     tv_nsec;
-}
-*/
-
-version( linux )
-{
-    struct timespec
-    {
-        time_t  tv_sec;
-        c_long  tv_nsec;
-    }
-}
-else version( darwin )
-{
-    struct timespec
-    {
-        time_t  tv_sec;
-        c_long  tv_nsec;
-    }
-}
-else version( freebsd )
-{
-    struct timespec
-    {
-        time_t  tv_sec;
-        c_long  tv_nsec;
-    }
-}
-
-//
-// Realtime Signals (RTS)
-//
-/*
-struct sigevent
-{
-    int             sigev_notify;
-    int             sigev_signo;
-    sigval          sigev_value;
-    void(*)(sigval) sigev_notify_function;
-    pthread_attr_t* sigev_notify_attributes;
-}
-
-int sigqueue(pid_t, int, in sigval);
-int sigtimedwait(in sigset_t*, siginfo_t*, in timespec*);
-int sigwaitinfo(in sigset_t*, siginfo_t*);
-*/
-
-version( linux )
-{
-    private const __SIGEV_MAX_SIZE = 64;
-
-    static if( false /* __WORDSIZE == 64 */ )
-    {
-        private const __SIGEV_PAD_SIZE = ((__SIGEV_MAX_SIZE / int.sizeof) - 4);
-    }
-    else
-    {
-        private const __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*);
-}
-else version( freebsd )
-{
-    struct sigevent
-    {
-        int             sigev_notify;
-        int             sigev_signo;
-        sigval          sigev_value;
-        union  _sigev_un
-        {
-            lwpid_t _threadid;
-            struct _sigev_thread {
-                void function(sigval) _function;
-                void* _attribute;
-            }
-            c_long[8] __spare__;
-        }
-    }
-
-    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*);
-*/
-
-version( linux )
-{
-    int pthread_kill(pthread_t, int);
-    int pthread_sigmask(int, in sigset_t*, sigset_t*);
-}
-else version( darwin )
-{
-    int pthread_kill(pthread_t, int);
-    int pthread_sigmask(int, in sigset_t*, sigset_t*);
-}
-else version( freebsd )
-{
-    int pthread_kill(pthread_t, int);
-    int pthread_sigmask(int, in sigset_t*, sigset_t*);
-}
--- a/druntime/import/stdc/posix/stdio.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.stdio;
-
-private import stdc.posix.config;
-public import stdc.stdio;
-public import stdc.posix.sys.types; // for off_t
-
-extern (C):
-
-//
-// Required (defined in stdc.stdio)
-//
-/*
-BUFSIZ
-_IOFBF
-_IOLBF
-_IONBF
-L_tmpnam
-SEEK_CUR
-SEEK_END
-SEEK_SET
-FILENAME_MAX
-FOPEN_MAX
-TMP_MAX
-EOF
-NULL
-stderr
-stdin
-stdout
-FILE
-fpos_t
-size_t
-
-void   clearerr(FILE*);
-int    fclose(FILE*);
-int    feof(FILE*);
-int    ferror(FILE*);
-int    fflush(FILE*);
-int    fgetc(FILE*);
-int    fgetpos(FILE*, fpos_t *);
-char*  fgets(char*, int, FILE*);
-FILE*  fopen(in char*, in char*);
-int    fprintf(FILE*, in char*, ...);
-int    fputc(int, FILE*);
-int    fputs(in char*, FILE*);
-size_t fread(void *, size_t, size_t, FILE*);
-FILE*  freopen(in char*, in char*, FILE*);
-int    fscanf(FILE*, in char*, ...);
-int    fseek(FILE*, c_long, int);
-int    fsetpos(FILE*, in fpos_t*);
-c_long ftell(FILE*);
-size_t fwrite(in void *, size_t, size_t, FILE*);
-int    getc(FILE*);
-int    getchar();
-char*  gets(char*);
-void   perror(in char*);
-int    printf(in char*, ...);
-int    putc(int, FILE*);
-int    putchar(int);
-int    puts(in char*);
-int    remove(in char*);
-int    rename(in char*, in char*);
-void   rewind(FILE*);
-int    scanf(in char*, ...);
-void   setbuf(FILE*, char*);
-int    setvbuf(FILE*, char*, int, size_t);
-int    snprintf(char*, size_t, in char*, ...);
-int    sprintf(char*, in char*, ...);
-int    sscanf(in char*, in char*, int ...);
-FILE*  tmpfile();
-char*  tmpnam(char*);
-int    ungetc(int, FILE*);
-int    vfprintf(FILE*, in char*, va_list);
-int    vfscanf(FILE*, in char*, va_list);
-int    vprintf(in char*, va_list);
-int    vscanf(in char*, va_list);
-int    vsnprintf(char*, size_t, in char*, va_list);
-int    vsprintf(char*, in char*, va_list);
-int    vsscanf(in char*, in char*, va_list arg);
-*/
-
-version( linux )
-{
-    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)
-//
-/*
-L_ctermid
-
-char*  ctermid(char*);
-FILE*  fdopen(int, in char*);
-int    fileno(FILE*);
-int    fseeko(FILE*, off_t, int);
-off_t  ftello(FILE*);
-char*  gets(char*);
-FILE*  popen(in char*, in char*);
-*/
-
-version( linux )
-{
-    const L_ctermid = 9;
-
-  static if( __USE_FILE_OFFSET64 )
-  {
-    int   fseeko64(FILE*, off_t, int);
-    alias fseeko64 fseeko;
-  }
-  else
-  {
-    int   fseeko(FILE*, off_t, int);
-  }
-
-  static if( __USE_LARGEFILE64 )
-  {
-    off_t ftello64(FILE*);
-    alias ftello64 ftello;
-  }
-  else
-  {
-    off_t ftello(FILE*);
-  }
-}
-else
-{
-    int   fseeko(FILE*, off_t, int);
-    off_t ftello(FILE*);
-}
-
-char*  ctermid(char*);
-FILE*  fdopen(int, in char*);
-int    fileno(FILE*);
-//int    fseeko(FILE*, off_t, int);
-//off_t  ftello(FILE*);
-char*  gets(char*);
-FILE*  popen(in char*, in char*);
-
-//
-// Thread-Safe Functions (TSF)
-//
-/*
-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);
-*/
-
-version( linux )
-{
-    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)
-//
-/*
-P_tmpdir
-va_list (defined in stdc.stdarg)
-
-char*  tempnam(in char*, in char*);
-*/
-
-version( linux )
-{
-    const P_tmpdir  = "/tmp";
-
-    char*  tempnam(in char*, in char*);
-}
--- a/druntime/import/stdc/posix/stdlib.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.stdlib;
-
-private import stdc.posix.config;
-public import stdc.stdlib;
-public import stdc.posix.sys.wait;
-
-extern (C):
-
-//
-// Required (defined in stdc.stdlib)
-//
-/*
-EXIT_FAILURE
-EXIT_SUCCESS
-NULL
-RAND_MAX
-MB_CUR_MAX
-div_t
-ldiv_t
-lldiv_t
-size_t
-wchar_t
-
-void    _Exit(int);
-void    abort();
-int     abs(int);
-int     atexit(void function());
-double  atof(in char*);
-int     atoi(in char*);
-c_long  atol(in char*);
-long    atoll(in char*);
-void*   bsearch(in void*, in void*, size_t, size_t, int function(in void*, in void*));
-void*   calloc(size_t, size_t);
-div_t   div(int, int);
-void    exit(int);
-void    free(void*);
-char*   getenv(in char*);
-c_long  labs(c_long);
-ldiv_t  ldiv(c_long, c_long);
-long    llabs(long);
-lldiv_t lldiv(long, long);
-void*   malloc(size_t);
-int     mblen(in char*, size_t);
-size_t  mbstowcs(wchar_t*, in char*, size_t);
-int     mbtowc(wchar_t*, in char*, size_t);
-void    qsort(void*, size_t, size_t, int function(in void*, in void*));
-int     rand();
-void*   realloc(void*, size_t);
-void    srand(uint);
-double  strtod(in char*, char**);
-float   strtof(in char*, char**);
-c_long  strtol(in char*, char**, int);
-real    strtold(in char*, char**);
-long    strtoll(in char*, char**, int);
-c_ulong strtoul(in char*, char**, int);
-ulong   strtoull(in char*, char**, int);
-int     system(in char*);
-size_t  wcstombs(char*, in wchar_t*, size_t);
-int     wctomb(char*, wchar_t);
-*/
-
-//
-// Advisory Information (ADV)
-//
-/*
-int posix_memalign(void**, size_t, size_t);
-*/
-
-version( linux )
-{
-    int posix_memalign(void**, size_t, size_t);
-}
-
-//
-// C Extension (CX)
-//
-/*
-int setenv(in char*, in char*, int);
-int unsetenv(in char*);
-*/
-
-version( linux )
-{
-    int setenv(in char*, in char*, int);
-    int unsetenv(in char*);
-
-    void* valloc(size_t); // LEGACY non-standard
-}
-else version( darwin )
-{
-    int setenv(in char*, in char*, int);
-    int unsetenv(in char*);
-
-    void* valloc(size_t); // LEGACY non-standard
-}
-else version( freebsd )
-{
-    int setenv(in char*, in char*, int);
-    int unsetenv(in char*);
-
-    void* valloc(size_t); // LEGACY non-standard
-}
-
-//
-// Thread-Safe Functions (TSF)
-//
-/*
-int rand_r(uint*);
-*/
-
-version( linux )
-{
-    int rand_r(uint*);
-}
-else version( darwin )
-{
-    int rand_r(uint*);
-}
-else version( freebsd )
-{
-    int rand_r(uint*);
-}
-
-//
-// XOpen (XSI)
-//
-/*
-WNOHANG     (defined in stdc.posix.sys.wait)
-WUNTRACED   (defined in stdc.posix.sys.wait)
-WEXITSTATUS (defined in stdc.posix.sys.wait)
-WIFEXITED   (defined in stdc.posix.sys.wait)
-WIFSIGNALED (defined in stdc.posix.sys.wait)
-WIFSTOPPED  (defined in stdc.posix.sys.wait)
-WSTOPSIG    (defined in stdc.posix.sys.wait)
-WTERMSIG    (defined in stdc.posix.sys.wait)
-
-c_long a64l(in char*);
-double drand48();
-char*  ecvt(double, int, int *, int *); // LEGACY
-double erand48(ushort[3]);
-char*  fcvt(double, int, int *, int *); // LEGACY
-char*  gcvt(double, int, char*); // LEGACY
-// per spec: int getsubopt(char** char* const*, char**);
-int    getsubopt(char**, in char**, char**);
-int    grantpt(int);
-char*  initstate(uint, char*, size_t);
-c_long jrand48(ushort[3]);
-char*  l64a(c_long);
-void   lcong48(ushort[7]);
-c_long lrand48();
-char*  mktemp(char*); // LEGACY
-int    mkstemp(char*);
-c_long mrand48();
-c_long nrand48(ushort[3]);
-int    posix_openpt(int);
-char*  ptsname(int);
-int    putenv(char*);
-c_long random();
-char*  realpath(in char*, char*);
-ushort seed48(ushort[3]);
-void   setkey(in char*);
-char*  setstate(in char*);
-void   srand48(c_long);
-void   srandom(uint);
-int    unlockpt(int);
-*/
-
-version( linux )
-{
-    //WNOHANG     (defined in stdc.posix.sys.wait)
-    //WUNTRACED   (defined in stdc.posix.sys.wait)
-    //WEXITSTATUS (defined in stdc.posix.sys.wait)
-    //WIFEXITED   (defined in stdc.posix.sys.wait)
-    //WIFSIGNALED (defined in stdc.posix.sys.wait)
-    //WIFSTOPPED  (defined in stdc.posix.sys.wait)
-    //WSTOPSIG    (defined in stdc.posix.sys.wait)
-    //WTERMSIG    (defined in stdc.posix.sys.wait)
-
-    c_long a64l(in char*);
-    double drand48();
-    char*  ecvt(double, int, int *, int *); // LEGACY
-    double erand48(ushort[3]);
-    char*  fcvt(double, int, int *, int *); // LEGACY
-    char*  gcvt(double, int, char*); // LEGACY
-    int    getsubopt(char**, in char**, char**);
-    int    grantpt(int);
-    char*  initstate(uint, char*, size_t);
-    c_long jrand48(ushort[3]);
-    char*  l64a(c_long);
-    void   lcong48(ushort[7]);
-    c_long lrand48();
-    char*  mktemp(char*); // LEGACY
-    //int    mkstemp(char*);
-    c_long mrand48();
-    c_long nrand48(ushort[3]);
-    int    posix_openpt(int);
-    char*  ptsname(int);
-    int    putenv(char*);
-    c_long random();
-    char*  realpath(in char*, char*);
-    ushort seed48(ushort[3]);
-    void   setkey(in char*);
-    char*  setstate(in char*);
-    void   srand48(c_long);
-    void   srandom(uint);
-    int    unlockpt(int);
-
-  static if( __USE_LARGEFILE64 )
-  {
-    int    mkstemp64(char*);
-    alias  mkstemp64 mkstemp;
-  }
-  else
-  {
-    int    mkstemp(char*);
-  }
-}
-else version( darwin )
-{
-    //WNOHANG     (defined in stdc.posix.sys.wait)
-    //WUNTRACED   (defined in stdc.posix.sys.wait)
-    //WEXITSTATUS (defined in stdc.posix.sys.wait)
-    //WIFEXITED   (defined in stdc.posix.sys.wait)
-    //WIFSIGNALED (defined in stdc.posix.sys.wait)
-    //WIFSTOPPED  (defined in stdc.posix.sys.wait)
-    //WSTOPSIG    (defined in stdc.posix.sys.wait)
-    //WTERMSIG    (defined in stdc.posix.sys.wait)
-
-    c_long a64l(in char*);
-    double drand48();
-    char*  ecvt(double, int, int *, int *); // LEGACY
-    double erand48(ushort[3]);
-    char*  fcvt(double, int, int *, int *); // LEGACY
-    char*  gcvt(double, int, char*); // LEGACY
-    int    getsubopt(char**, in char**, char**);
-    int    grantpt(int);
-    char*  initstate(uint, char*, size_t);
-    c_long jrand48(ushort[3]);
-    char*  l64a(c_long);
-    void   lcong48(ushort[7]);
-    c_long lrand48();
-    char*  mktemp(char*); // LEGACY
-    int    mkstemp(char*);
-    c_long mrand48();
-    c_long nrand48(ushort[3]);
-    int    posix_openpt(int);
-    char*  ptsname(int);
-    int    putenv(char*);
-    c_long random();
-    char*  realpath(in char*, char*);
-    ushort seed48(ushort[3]);
-    void   setkey(in char*);
-    char*  setstate(in char*);
-    void   srand48(c_long);
-    void   srandom(uint);
-    int    unlockpt(int);
-}
-else version( freebsd )
-{
-    //WNOHANG     (defined in stdc.posix.sys.wait)
-    //WUNTRACED   (defined in stdc.posix.sys.wait)
-    //WEXITSTATUS (defined in stdc.posix.sys.wait)
-    //WIFEXITED   (defined in stdc.posix.sys.wait)
-    //WIFSIGNALED (defined in stdc.posix.sys.wait)
-    //WIFSTOPPED  (defined in stdc.posix.sys.wait)
-    //WSTOPSIG    (defined in stdc.posix.sys.wait)
-    //WTERMSIG    (defined in stdc.posix.sys.wait)
-
-    c_long a64l(in char*);
-    double drand48();
-    //char*  ecvt(double, int, int *, int *); // LEGACY
-    double erand48(ushort[3]);
-    //char*  fcvt(double, int, int *, int *); // LEGACY
-    //char*  gcvt(double, int, char*); // LEGACY
-    int    getsubopt(char**, in char**, char**);
-    int    grantpt(int);
-    char*  initstate(uint, char*, size_t);
-    c_long jrand48(ushort[3]);
-    char*  l64a(c_long);
-    void   lcong48(ushort[7]);
-    c_long lrand48();
-    char*  mktemp(char*); // LEGACY
-    int    mkstemp(char*);
-    c_long mrand48();
-    c_long nrand48(ushort[3]);
-    int    posix_openpt(int);
-    char*  ptsname(int);
-    int    putenv(char*);
-    c_long random();
-    char*  realpath(in char*, char*);
-    ushort seed48(ushort[3]);
-    void   setkey(in char*);
-    char*  setstate(in char*);
-    void   srand48(c_long);
-    void   srandom(uint);
-    int    unlockpt(int);
-}
--- a/druntime/import/stdc/posix/sys/ipc.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.ipc;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types; // for uid_t, gid_t, mode_t, key_t
-
-extern (C):
-
-//
-// XOpen (XSI)
-//
-/*
-struct ipc_perm
-{
-    uid_t    uid;
-    gid_t    gid;
-    uid_t    cuid;
-    gid_t    cgid;
-    mode_t   mode;
-}
-
-IPC_CREAT
-IPC_EXCL
-IPC_NOWAIT
-
-IPC_PRIVATE
-
-IPC_RMID
-IPC_SET
-IPC_STAT
-
-key_t ftok(in char*, int);
-*/
-
-version( linux )
-{
-    struct ipc_perm
-    {
-        key_t   __key;
-        uid_t   uid;
-        gid_t   gid;
-        uid_t   cuid;
-        gid_t   cgid;
-        ushort  mode;
-        ushort  __pad1;
-        ushort  __seq;
-        ushort  __pad2;
-        c_ulong __unused1;
-        c_ulong __unused2;
-    }
-
-    const IPC_CREAT     = 01000;
-    const IPC_EXCL      = 02000;
-    const IPC_NOWAIT    = 04000;
-
-    const key_t IPC_PRIVATE = 0;
-
-    const IPC_RMID      = 0;
-    const IPC_SET       = 1;
-    const IPC_STAT      = 2;
-
-    key_t ftok(in char*, int);
-}
-else version( darwin )
-{
-
-}
-else version( freebsd )
-{
-    struct ipc_perm
-    {
-        ushort cuid;
-        ushort cguid;
-        ushort uid;
-        ushort gid;
-        ushort mode;
-        ushort seq;
-        key_t key;
-    }
-
-    const IPC_CREAT     = 01000;
-    const IPC_EXCL      = 02000;
-    const IPC_NOWAIT    = 04000;
-
-    const key_t IPC_PRIVATE = 0;
-
-    const IPC_RMID      = 0;
-    const IPC_SET       = 1;
-    const IPC_STAT      = 2;
-
-    key_t ftok(in char*, int);
-}
--- a/druntime/import/stdc/posix/sys/mman.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.mman;
-
-private import stdc.posix.config;
-public import stdc.stddef;          // for size_t
-public import stdc.posix.sys.types; // for off_t, mode_t
-
-extern (C):
-
-//
-// Advisory Information (ADV)
-//
-/*
-int posix_madvise(void*, size_t, int);
-*/
-
-//
-// Advisory Information and either Memory Mapped Files or Shared Memory Objects (MC1)
-//
-/*
-POSIX_MADV_NORMAL
-POSIX_MADV_SEQUENTIAL
-POSIX_MADV_RANDOM
-POSIX_MADV_WILLNEED
-POSIX_MADV_DONTNEED
-*/
-
-version( linux )
-{
-    const POSIX_MADV_NORMAL     = 0;
-    const POSIX_MADV_RANDOM     = 1;
-    const POSIX_MADV_SEQUENTIAL = 2;
-    const POSIX_MADV_WILLNEED   = 3;
-    const POSIX_MADV_DONTNEED   = 4;
-}
-else version( darwin )
-{
-    const POSIX_MADV_NORMAL     = 0;
-    const POSIX_MADV_RANDOM     = 1;
-    const POSIX_MADV_SEQUENTIAL = 2;
-    const POSIX_MADV_WILLNEED   = 3;
-    const POSIX_MADV_DONTNEED   = 4;
-}
-else version( freebsd )
-{
-    const POSIX_MADV_NORMAL     = 0;
-    const POSIX_MADV_RANDOM     = 1;
-    const POSIX_MADV_SEQUENTIAL = 2;
-    const POSIX_MADV_WILLNEED   = 3;
-    const POSIX_MADV_DONTNEED   = 4;
-}
-
-//
-// Memory Mapped Files, Shared Memory Objects, or Memory Protection (MC2)
-//
-/*
-PROT_READ
-PROT_WRITE
-PROT_EXEC
-PROT_NONE
-*/
-
-version( linux )
-{
-    const PROT_NONE     = 0x0;
-    const PROT_READ     = 0x1;
-    const PROT_WRITE    = 0x2;
-    const PROT_EXEC     = 0x4;
-}
-else version( darwin )
-{
-    const PROT_NONE     = 0x00;
-    const PROT_READ     = 0x01;
-    const PROT_WRITE    = 0x02;
-    const PROT_EXEC     = 0x04;
-}
-else version( freebsd )
-{
-    const PROT_NONE     = 0x00;
-    const PROT_READ     = 0x01;
-    const PROT_WRITE    = 0x02;
-    const PROT_EXEC     = 0x04;
-}
-
-//
-// Memory Mapped Files, Shared Memory Objects, or Typed Memory Objects (MC3)
-//
-/*
-void* mmap(void*, size_t, int, int, int, off_t);
-int munmap(void*, size_t);
-*/
-
-version( linux )
-{
-    //void* mmap(void*, size_t, int, int, int, off_t);
-    int   munmap(void*, size_t);
-
-  static if( __USE_LARGEFILE64 )
-  {
-    void* mmap64(void*, size_t, int, int, int, off_t);
-    alias mmap64 mmap;
-  }
-  else
-  {
-    void* mmap(void*, size_t, int, int, int, off_t);
-  }
-}
-else version( darwin )
-{
-    void* mmap(void*, size_t, int, int, int, off_t);
-    int   munmap(void*, size_t);
-}
-else version( freebsd )
-{
-    void* mmap(void*, size_t, int, int, int, off_t);
-    int   munmap(void*, size_t);
-}
-
-//
-// Memory Mapped Files (MF)
-//
-/*
-MAP_SHARED (MF|SHM)
-MAP_PRIVATE (MF|SHM)
-MAP_FIXED  (MF|SHM)
-MAP_FAILED (MF|SHM)
-
-MS_ASYNC (MF|SIO)
-MS_SYNC (MF|SIO)
-MS_INVALIDATE (MF|SIO)
-
-int msync(void*, size_t, int); (MF|SIO)
-*/
-
-version( linux )
-{
-    const MAP_SHARED    = 0x01;
-    const MAP_PRIVATE   = 0x02;
-    const MAP_FIXED     = 0x10;
-    const MAP_ANON      = 0x20; // non-standard
-
-    const MAP_FAILED    = cast(void*) -1;
-
-    enum
-    {
-        MS_ASYNC        = 1,
-        MS_SYNC         = 4,
-        MS_INVALIDATE   = 2
-    }
-
-    int msync(void*, size_t, int);
-}
-else version( darwin )
-{
-    const MAP_SHARED    = 0x0001;
-    const MAP_PRIVATE   = 0x0002;
-    const MAP_FIXED     = 0x0010;
-    const MAP_ANON      = 0x1000; // non-standard
-
-    const MAP_FAILED    = cast(void*)-1;
-
-    const MS_ASYNC      = 0x0001;
-    const MS_INVALIDATE = 0x0002;
-    const MS_SYNC       = 0x0010;
-
-    int msync(void*, size_t, int);
-}
-else version( freebsd )
-{
-    const MAP_SHARED    = 0x0001;
-    const MAP_PRIVATE   = 0x0002;
-    const MAP_FIXED     = 0x0010;
-    const MAP_ANON      = 0x1000; // non-standard
-
-    const MAP_FAILED    = cast(void*)-1;
-
-    const MS_SYNC       = 0x0000;
-    const MS_ASYNC      = 0x0001;
-    const MS_INVALIDATE = 0x0002;
-
-    int msync(void*, size_t, int);
-}
-
-//
-// Process Memory Locking (ML)
-//
-/*
-MCL_CURRENT
-MCL_FUTURE
-
-int mlockall(int);
-int munlockall();
-*/
-
-version( linux )
-{
-    const MCL_CURRENT   = 1;
-    const MCL_FUTURE    = 2;
-
-    int mlockall(int);
-    int munlockall();
-
-}
-else version( darwin )
-{
-    const MCL_CURRENT   = 0x0001;
-    const MCL_FUTURE    = 0x0002;
-
-    int mlockall(int);
-    int munlockall();
-}
-else version( freebsd )
-{
-    const MCL_CURRENT   = 0x0001;
-    const MCL_FUTURE    = 0x0002;
-
-    int mlockall(int);
-    int munlockall();
-}
-
-//
-// Range Memory Locking (MLR)
-//
-/*
-int mlock(in void*, size_t);
-int munlock(in void*, size_t);
-*/
-
-version( linux )
-{
-    int mlock(in void*, size_t);
-    int munlock(in void*, size_t);
-}
-else version( darwin )
-{
-    int mlock(in void*, size_t);
-    int munlock(in void*, size_t);
-}
-else version( freebsd )
-{
-    int mlock(in void*, size_t);
-    int munlock(in void*, size_t);
-}
-
-//
-// Memory Protection (MPR)
-//
-/*
-int mprotect(void*, size_t, int);
-*/
-
-version( darwin )
-{
-    int mprotect(void*, size_t, int);
-}
-else version( freebsd )
-{
-    int mprotect(void*, size_t, int);
-}
-
-//
-// Shared Memory Objects (SHM)
-//
-/*
-int shm_open(in char*, int, mode_t);
-int shm_unlink(in char*);
-*/
-
-version( linux )
-{
-    int shm_open(in char*, int, mode_t);
-    int shm_unlink(in char*);
-}
-else version( darwin )
-{
-    int shm_open(in char*, int, mode_t);
-    int shm_unlink(in char*);
-}
-else version( freebsd )
-{
-    int shm_open(in char*, int, mode_t);
-    int shm_unlink(in char*);
-}
-
-//
-// Typed Memory Objects (TYM)
-//
-/*
-POSIX_TYPED_MEM_ALLOCATE
-POSIX_TYPED_MEM_ALLOCATE_CONTIG
-POSIX_TYPED_MEM_MAP_ALLOCATABLE
-
-struct posix_typed_mem_info
-{
-    size_t posix_tmi_length;
-}
-
-int posix_mem_offset(in void*, size_t, off_t *, size_t *, int *);
-int posix_typed_mem_get_info(int, struct posix_typed_mem_info *);
-int posix_typed_mem_open(in char*, int, int);
-*/
--- a/druntime/import/stdc/posix/sys/select.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.select;
-
-private import stdc.posix.config;
-public import stdc.time;            // for timespec
-public import stdc.posix.sys.time;  // for timeval
-public import stdc.posix.sys.types; // for time_t
-public import stdc.posix.signal;    // for sigset_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-NOTE: This module requires timeval from stdc.posix.sys.time, but timeval
-      is supposedly an XOpen extension.  As a result, this header will not
-      compile on platforms that are not XSI-compliant.  This must be resolved
-      on a per-platform basis.
-
-fd_set
-
-void FD_CLR(int fd, fd_set* fdset);
-int FD_ISSET(int fd, fd_set* fdset);
-void FD_SET(int fd, fd_set* fdset);
-void FD_ZERO(fd_set* fdset);
-
-FD_SETSIZE
-
-int  pselect(int, fd_set*, fd_set*, fd_set*, in timespec*, in sigset_t*);
-int  select(int, fd_set*, fd_set*, fd_set*, timeval*);
-*/
-
-version( linux )
-{
-    private
-    {
-        alias c_long __fd_mask;
-        const __NFDBITS = 8 * __fd_mask.sizeof;
-
-        extern (D) int __FDELT( int d )
-        {
-            return d / __NFDBITS;
-        }
-
-        extern (D) int __FDMASK( int d )
-        {
-            return cast(__fd_mask) 1 << ( d % __NFDBITS );
-        }
-    }
-
-    const 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) int  FD_ISSET( int fd, fd_set* fdset )
-    {
-        return fdset.fds_bits[__FDELT( fd )] & __FDMASK( fd );
-    }
-
-    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*);
-}
-else version( darwin )
-{
-    private
-    {
-        const uint __DARWIN_NBBY = 8;                               /* bits in a byte */
-        const uint __DARWIN_NFDBITS = (int.sizeof * __DARWIN_NBBY); /* bits per mask */
-    }
-
-    const FD_SETSIZE = 1024;
-
-    struct fd_set
-    {
-        int fds_bits[(((FD_SETSIZE) + ((__DARWIN_NFDBITS) - 1)) / (__DARWIN_NFDBITS))];
-    }
-}
-else version( freebsd )
-{
-    private
-    {
-        const uint FD_SETSIZE = 1024;
-        const uint _NFDBITS = c_ulong.sizeof * 8;
-    }
-    struct fd_set
-    {
-        c_ulong fds_bits[((FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS)];
-    }
-}
--- a/druntime/import/stdc/posix/sys/shm.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.shm;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types; // for pid_t, time_t, key_t, size_t
-public import stdc.posix.sys.ipc;
-
-extern (C):
-
-//
-// XOpen (XSI)
-//
-/*
-SHM_RDONLY
-SHM_RND
-
-SHMLBA
-
-shmatt_t
-
-struct shmid_ds
-{
-    ipc_perm    shm_perm;
-    size_t      shm_segsz;
-    pid_t       shm_lpid;
-    pid_t       shm_cpid;
-    shmatt_t    shm_nattch;
-    time_t      shm_atime;
-    time_t      shm_dtime;
-    time_t      shm_ctime;
-}
-
-void* shmat(int, in void*, int);
-int   shmctl(int, int, shmid_ds*);
-int   shmdt(in void*);
-int   shmget(key_t, size_t, int);
-*/
-
-version( linux )
-{
-    const SHM_RDONLY    = 010000;
-    const SHM_RND       = 020000;
-
-    int   __getpagesize();
-    alias __getpagesize SHMLBA;
-
-    alias c_ulong   shmatt_t;
-
-    struct shmid_ds
-    {
-        ipc_perm    shm_perm;
-        size_t      shm_segsz;
-        time_t      shm_atime;
-        c_ulong     __unused1;
-        time_t      shm_dtime;
-        c_ulong     __unused2;
-        time_t      shm_ctime;
-        c_ulong     __unused3;
-        pid_t       shm_cpid;
-        pid_t       shm_lpid;
-        shmatt_t    shm_nattch;
-        c_ulong     __unused4;
-        c_ulong     __unused5;
-    }
-
-    void* shmat(int, in void*, int);
-    int   shmctl(int, int, shmid_ds*);
-    int   shmdt(in void*);
-    int   shmget(key_t, size_t, int);
-}
-else version( freebsd )
-{
-    const SHM_RDONLY    = 010000;
-    const SHM_RND       = 020000;
-    const SHMLBA        = 1 << 12; // PAGE_SIZE = (1<<PAGE_SHIFT)
-
-    alias c_ulong   shmatt_t;
-
-    struct shmid_ds
-    {
-        ipc_perm    shm_perm;
-        size_t      shm_segsz;
-        time_t      shm_atime;
-        c_ulong     __unused1;
-        time_t      shm_dtime;
-        c_ulong     __unused2;
-        time_t      shm_ctime;
-        c_ulong     __unused3;
-        pid_t       shm_cpid;
-        pid_t       shm_lpid;
-        shmatt_t    shm_nattch;
-        c_ulong     __unused4;
-        c_ulong     __unused5;
-    }
-
-    void* shmat(int, in void*, int);
-    int   shmctl(int, int, shmid_ds*);
-    int   shmdt(in void*);
-    int   shmget(key_t, size_t, int);
-}
-else version( darwin )
-{
-
-}
--- a/druntime/import/stdc/posix/sys/socket.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,642 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.socket;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types; // for ssize_t, size_t
-public import stdc.posix.sys.uio;   // for iovec
-
-extern (C):
-
-//
-// Required
-//
-/*
-socklen_t
-sa_family_t
-
-struct sockaddr
-{
-    sa_family_t sa_family;
-    char        sa_data[];
-}
-
-struct sockaddr_storage
-{
-    sa_family_t ss_family;
-}
-
-struct msghdr
-{
-    void*         msg_name;
-    socklen_t     msg_namelen;
-    struct iovec* msg_iov;
-    int           msg_iovlen;
-    void*         msg_control;
-    socklen_t     msg_controllen;
-    int           msg_flags;
-}
-
-struct iovec {} // from stdc.posix.sys.uio
-
-struct cmsghdr
-{
-    socklen_t cmsg_len;
-    int       cmsg_level;
-    int       cmsg_type;
-}
-
-SCM_RIGHTS
-
-CMSG_DATA(cmsg)
-CMSG_NXTHDR(mhdr,cmsg)
-CMSG_FIRSTHDR(mhdr)
-
-struct linger
-{
-    int l_onoff;
-    int l_linger;
-}
-
-SOCK_DGRAM
-SOCK_SEQPACKET
-SOCK_STREAM
-
-SOL_SOCKET
-
-SO_ACCEPTCONN
-SO_BROADCAST
-SO_DEBUG
-SO_DONTROUTE
-SO_ERROR
-SO_KEEPALIVE
-SO_LINGER
-SO_OOBINLINE
-SO_RCVBUF
-SO_RCVLOWAT
-SO_RCVTIMEO
-SO_REUSEADDR
-SO_SNDBUF
-SO_SNDLOWAT
-SO_SNDTIMEO
-SO_TYPE
-
-SOMAXCONN
-
-MSG_CTRUNC
-MSG_DONTROUTE
-MSG_EOR
-MSG_OOB
-MSG_PEEK
-MSG_TRUNC
-MSG_WAITALL
-
-AF_INET
-AF_UNIX
-AF_UNSPEC
-
-SHUT_RD
-SHUT_RDWR
-SHUT_WR
-
-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, int[2]);
-*/
-
-version( linux )
-{
-    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, int[2]);
-}
-else version( darwin )
-{
-    alias uint   socklen_t;
-    alias ubyte  sa_family_t;
-
-    struct sockaddr
-    {
-        ubyte       sa_len;
-        sa_family_t sa_family;
-        byte[14]    sa_data;
-    }
-
-    private enum : size_t
-    {
-        _SS_PAD1    = long.sizeof - ubyte.sizeof - sa_family_t.sizeof,
-        _SS_PAD2    = 128 - ubyte.sizeof - sa_family_t.sizeof - _SS_PAD1 - long.sizeof
-    }
-
-    struct sockaddr_storage
-    {
-         ubyte          ss_len;
-         sa_family_t    ss_family;
-         byte[_SS_PAD1] __ss_pad1;
-         long           __ss_align;
-         byte[_SS_PAD2] __ss_pad2;
-    }
-
-    struct msghdr
-    {
-        void*     msg_name;
-        socklen_t msg_namelen;
-        iovec*    msg_iov;
-        int       msg_iovlen;
-        void*     msg_control;
-        socklen_t msg_controllen;
-        int       msg_flags;
-    }
-
-    struct cmsghdr
-    {
-         socklen_t cmsg_len;
-         int       cmsg_level;
-         int       cmsg_type;
-    }
-
-    enum : uint
-    {
-        SCM_RIGHTS = 0x01
-    }
-
-    /+
-    CMSG_DATA(cmsg)     ((unsigned char *)(cmsg) + \
-                         ALIGN(sizeof(struct cmsghdr)))
-    CMSG_NXTHDR(mhdr, cmsg) \
-                        (((unsigned char *)(cmsg) + ALIGN((cmsg)->cmsg_len) + \
-                         ALIGN(sizeof(struct cmsghdr)) > \
-                         (unsigned char *)(mhdr)->msg_control +(mhdr)->msg_controllen) ? \
-                         (struct cmsghdr *)0 /* NULL */ : \
-                         (struct cmsghdr *)((unsigned char *)(cmsg) + ALIGN((cmsg)->cmsg_len)))
-    CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
-    +/
-
-    struct linger
-    {
-        int l_onoff;
-        int l_linger;
-    }
-
-    enum
-    {
-        SOCK_DGRAM      = 2,
-        SOCK_SEQPACKET  = 5,
-        SOCK_STREAM     = 1
-    }
-
-    enum : uint
-    {
-        SOL_SOCKET      = 0xffff
-    }
-
-    enum : uint
-    {
-        SO_ACCEPTCONN   = 0x0002,
-        SO_BROADCAST    = 0x0020,
-        SO_DEBUG        = 0x0001,
-        SO_DONTROUTE    = 0x0010,
-        SO_ERROR        = 0x1007,
-        SO_KEEPALIVE    = 0x0008,
-        SO_LINGER       = 0x1080,
-        SO_OOBINLINE    = 0x0100,
-        SO_RCVBUF       = 0x1002,
-        SO_RCVLOWAT     = 0x1004,
-        SO_RCVTIMEO     = 0x1006,
-        SO_REUSEADDR    = 0x1006,
-        SO_SNDBUF       = 0x1001,
-        SO_SNDLOWAT     = 0x1003,
-        SO_SNDTIMEO     = 0x1005,
-        SO_TYPE         = 0x1008
-    }
-
-    enum
-    {
-        SOMAXCONN       = 128
-    }
-
-    enum : uint
-    {
-        MSG_CTRUNC      = 0x20,
-        MSG_DONTROUTE   = 0x4,
-        MSG_EOR         = 0x8,
-        MSG_OOB         = 0x1,
-        MSG_PEEK        = 0x2,
-        MSG_TRUNC       = 0x10,
-        MSG_WAITALL     = 0x40
-    }
-
-    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, int[2]);
-}
-else version( freebsd )
-{
-    alias uint   socklen_t;
-    alias ubyte  sa_family_t;
-
-    struct sockaddr
-    {
-        ubyte       sa_len;
-        sa_family_t sa_family;
-        byte[14]    sa_data;
-    }
-
-    private
-    {
-        const _SS_ALIGNSIZE = long.sizeof;
-        const uint _SS_MAXSIZE = 128;
-        const _SS_PAD1SIZE = _SS_ALIGNSIZE - ubyte.sizeof - sa_family_t.sizeof;
-        const _SS_PAD2SIZE = _SS_MAXSIZE - ubyte.sizeof - sa_family_t.sizeof - _SS_PAD1SIZE - _SS_ALIGNSIZE;
-    }
-
-    struct sockaddr_storage
-    {
-         ubyte          ss_len;
-         sa_family_t    ss_family;
-         byte[_SS_PAD1SIZE] __ss_pad1;
-         long           __ss_align;
-         byte[_SS_PAD2SIZE] __ss_pad2;
-    }
-
-    struct msghdr
-    {
-        void*     msg_name;
-        socklen_t msg_namelen;
-        iovec*    msg_iov;
-        int       msg_iovlen;
-        void*     msg_control;
-        socklen_t msg_controllen;
-        int       msg_flags;
-    }
-
-    struct cmsghdr
-    {
-         socklen_t cmsg_len;
-         int       cmsg_level;
-         int       cmsg_type;
-    }
-
-    enum : uint
-    {
-        SCM_RIGHTS = 0x01
-    }
-
-    /+
-    CMSG_DATA(cmsg)     ((unsigned char *)(cmsg) + \
-                         ALIGN(sizeof(struct cmsghdr)))
-    CMSG_NXTHDR(mhdr, cmsg) \
-                        (((unsigned char *)(cmsg) + ALIGN((cmsg)->cmsg_len) + \
-                         ALIGN(sizeof(struct cmsghdr)) > \
-                         (unsigned char *)(mhdr)->msg_control +(mhdr)->msg_controllen) ? \
-                         (struct cmsghdr *)0 /* NULL */ : \
-                         (struct cmsghdr *)((unsigned char *)(cmsg) + ALIGN((cmsg)->cmsg_len)))
-    CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
-    +/
-
-    struct linger
-    {
-        int l_onoff;
-        int l_linger;
-    }
-
-    enum
-    {
-        SOCK_DGRAM      = 2,
-        SOCK_SEQPACKET  = 5,
-        SOCK_STREAM     = 1
-    }
-
-    enum : uint
-    {
-        SOL_SOCKET      = 0xffff
-    }
-
-    enum : uint
-    {
-        SO_ACCEPTCONN   = 0x0002,
-        SO_BROADCAST    = 0x0020,
-        SO_DEBUG        = 0x0001,
-        SO_DONTROUTE    = 0x0010,
-        SO_ERROR        = 0x1007,
-        SO_KEEPALIVE    = 0x0008,
-        SO_LINGER       = 0x1080,
-        SO_OOBINLINE    = 0x0100,
-        SO_RCVBUF       = 0x1002,
-        SO_RCVLOWAT     = 0x1004,
-        SO_RCVTIMEO     = 0x1006,
-        SO_REUSEADDR    = 0x1006,
-        SO_SNDBUF       = 0x1001,
-        SO_SNDLOWAT     = 0x1003,
-        SO_SNDTIMEO     = 0x1005,
-        SO_TYPE         = 0x1008
-    }
-
-    enum
-    {
-        SOMAXCONN       = 128
-    }
-
-    enum : uint
-    {
-        MSG_CTRUNC      = 0x20,
-        MSG_DONTROUTE   = 0x4,
-        MSG_EOR         = 0x8,
-        MSG_OOB         = 0x1,
-        MSG_PEEK        = 0x2,
-        MSG_TRUNC       = 0x10,
-        MSG_WAITALL     = 0x40
-    }
-
-    enum
-    {
-        AF_INET         = 2,
-        AF_UNIX         = 1,
-        AF_UNSPEC       = 0
-    }
-
-    enum
-    {
-        SHUT_RD = 0,
-        SHUT_WR = 1,
-        SHUT_RDWR = 2
-    }
-
-    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, int[2]);
-}
-
-//
-// IPV6 (IP6)
-//
-/*
-AF_INET6
-*/
-
-version( linux )
-{
-    enum
-    {
-        AF_INET6    = 10
-    }
-}
-else version( darwin )
-{
-    enum
-    {
-        AF_INET6    = 30
-    }
-}
-else version( freebsd )
-{
-    enum
-    {
-        AF_INET6    = 28
-    }
-}
-
-//
-// Raw Sockets (RS)
-//
-/*
-SOCK_RAW
-*/
-
-version( linux )
-{
-    enum
-    {
-        SOCK_RAW    = 3
-    }
-}
-else version( darwin )
-{
-    enum
-    {
-        SOCK_RAW    = 3
-    }
-}
-else version( freebsd )
-{
-    enum
-    {
-        SOCK_RAW    = 3
-    }
-}
--- a/druntime/import/stdc/posix/sys/stat.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,411 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.stat;
-
-private import stdc.posix.config;
-private import stdc.stdint;
-private import stdc.posix.time;     // for timespec
-public import stdc.stddef;          // for size_t
-public import stdc.posix.sys.types; // for off_t, mode_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-struct stat
-{
-    dev_t   st_dev;
-    ino_t   st_ino;
-    mode_t  st_mode;
-    nlink_t st_nlink;
-    uid_t   st_uid;
-    gid_t   st_gid;
-    off_t   st_size;
-    time_t  st_atime;
-    time_t  st_mtime;
-    time_t  st_ctime;
-}
-
-S_IRWXU
-    S_IRUSR
-    S_IWUSR
-    S_IXUSR
-S_IRWXG
-    S_IRGRP
-    S_IWGRP
-    S_IXGRP
-S_IRWXO
-    S_IROTH
-    S_IWOTH
-    S_IXOTH
-S_ISUID
-S_ISGID
-S_ISVTX
-
-S_ISBLK(m)
-S_ISCHR(m)
-S_ISDIR(m)
-S_ISFIFO(m)
-S_ISREG(m)
-S_ISLNK(m)
-S_ISSOCK(m)
-
-S_TYPEISMQ(buf)
-S_TYPEISSEM(buf)
-S_TYPEISSHM(buf)
-
-int    chmod(in char*, mode_t);
-int    fchmod(int, mode_t);
-int    fstat(int, stat*);
-int    lstat(in char*, stat*);
-int    mkdir(in char*, mode_t);
-int    mkfifo(in char*, mode_t);
-int    stat(in char*, stat*);
-mode_t umask(mode_t);
-*/
-
-version( linux )
-{
-    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;
-      }
-    }
-
-    const S_IRUSR   = 0400;
-    const S_IWUSR   = 0200;
-    const S_IXUSR   = 0100;
-    const S_IRWXU   = S_IRUSR | S_IWUSR | S_IXUSR;
-
-    const S_IRGRP   = S_IRUSR >> 3;
-    const S_IWGRP   = S_IWUSR >> 3;
-    const S_IXGRP   = S_IXUSR >> 3;
-    const S_IRWXG   = S_IRWXU >> 3;
-
-    const S_IROTH   = S_IRGRP >> 3;
-    const S_IWOTH   = S_IWGRP >> 3;
-    const S_IXOTH   = S_IXGRP >> 3;
-    const S_IRWXO   = S_IRWXG >> 3;
-
-    const S_ISUID   = 04000;
-    const S_ISGID   = 02000;
-    const 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; }
-    }
-}
-else version( darwin )
-{
-    struct stat_t
-    {
-        dev_t       st_dev;
-        ino_t       st_ino;
-        mode_t      st_mode;
-        nlink_t     st_nlink;
-        uid_t       st_uid;
-        gid_t       st_gid;
-        dev_t       st_rdev;
-        time_t      st_atime;
-        c_ulong     st_atimensec;
-        time_t      st_mtime;
-        c_ulong     st_mtimensec;
-        time_t      st_ctime;
-        c_ulong     st_ctimensec;
-        off_t       st_size;
-        blkcnt_t    st_blocks;
-        blksize_t   st_blksize;
-        uint        st_flags;
-        uint        st_gen;
-        int         st_lspare;
-        long        st_qspare[2];
-    }
-
-    const S_IRUSR   = 0400;
-    const S_IWUSR   = 0200;
-    const S_IXUSR   = 0100;
-    const S_IRWXU   = S_IRUSR | S_IWUSR | S_IXUSR;
-
-    const S_IRGRP   = S_IRUSR >> 3;
-    const S_IWGRP   = S_IWUSR >> 3;
-    const S_IXGRP   = S_IXUSR >> 3;
-    const S_IRWXG   = S_IRWXU >> 3;
-
-    const S_IROTH   = S_IRGRP >> 3;
-    const S_IWOTH   = S_IWGRP >> 3;
-    const S_IXOTH   = S_IXGRP >> 3;
-    const S_IRWXO   = S_IRWXG >> 3;
-
-    const S_ISUID   = 04000;
-    const S_ISGID   = 02000;
-    const 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 ); }
-}
-else version( freebsd )
-{
-    struct stat_t
-    {
-        dev_t   st_dev;
-        ino_t   st_ino;
-        mode_t  st_mode;
-        nlink_t st_nlink;
-        uid_t   st_uid;
-        gid_t   st_gid;
-        dev_t   st_rdev;
-
-        timespec st_atimespec;
-        timespec st_mtimespec;
-        timespec st_ctimespec;
-        time_t st_atime()
-        {
-            return st_atimespec.tv_sec;
-        }
-        time_t st_mtime()
-        {
-            return st_mtimespec.tv_sec;
-        }
-        time_t st_ctime()
-        {
-            return st_ctimespec.tv_sec;
-        }
-
-        off_t       st_size;
-        blkcnt_t    st_blocks;
-        blksize_t   st_blksize;
-        fflags_t    st_flags;
-        uint        st_gen;
-        int         st_lspare;
-        timespec    st_birthtimespec;
-
-        byte[16 - timespec.sizeof] padding;
-    }
-
-    const S_IRUSR   = 0000400;
-    const S_IWUSR   = 0000200;
-    const S_IXUSR   = 0000100;
-    const S_IRWXU   = 0000700;
-
-    const S_IRGRP   = 0000040;
-    const S_IWGRP   = 0000020;
-    const S_IXGRP   = 0000010;
-    const S_IRWXG   = 0000070;
-
-    const S_IROTH   = 0000004;
-    const S_IWOTH   = 0000002;
-    const S_IXOTH   = 0000001;
-    const S_IRWXO   = 0000007;
-
-    const S_ISUID   = 0004000;
-    const S_ISGID   = 0002000;
-    const S_ISVTX   = 0001000;
-
-    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 ); }
-}
-
-int    chmod(in char*, mode_t);
-int    fchmod(int, mode_t);
-//int    fstat(int, stat_t*);
-//int    lstat(in char*, stat_t*);
-int    mkdir(in char*, mode_t);
-int    mkfifo(in char*, mode_t);
-//int    stat(in char*, stat_t*);
-mode_t umask(mode_t);
-
-version( linux )
-{
-  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
-{
-    int   fstat(int, stat_t*);
-    int   lstat(in char*, stat_t*);
-    int   stat(in char*, stat_t*);
-}
-
-//
-// Typed Memory Objects (TYM)
-//
-/*
-S_TYPEISTMO(buf)
-*/
-
-//
-// XOpen (XSI)
-//
-/*
-S_IFMT
-S_IFBLK
-S_IFCHR
-S_IFIFO
-S_IFREG
-S_IFDIR
-S_IFLNK
-S_IFSOCK
-
-int mknod(in 3char*, mode_t, dev_t);
-*/
-
-version( linux )
-{
-    const S_IFMT    = 0170000;
-    const S_IFBLK   = 0060000;
-    const S_IFCHR   = 0020000;
-    const S_IFIFO   = 0010000;
-    const S_IFREG   = 0100000;
-    const S_IFDIR   = 0040000;
-    const S_IFLNK   = 0120000;
-    const S_IFSOCK  = 0140000;
-
-    int mknod(in char*, mode_t, dev_t);
-}
-else version( darwin )
-{
-    const S_IFMT    = 0170000;
-    const S_IFBLK   = 0060000;
-    const S_IFCHR   = 0020000;
-    const S_IFIFO   = 0010000;
-    const S_IFREG   = 0100000;
-    const S_IFDIR   = 0040000;
-    const S_IFLNK   = 0120000;
-    const S_IFSOCK  = 0140000;
-
-    int mknod(in char*, mode_t, dev_t);
-}
-else version( freebsd )
-{
-    const S_IFMT    = 0170000;
-    const S_IFBLK   = 0060000;
-    const S_IFCHR   = 0020000;
-    const S_IFIFO   = 0010000;
-    const S_IFREG   = 0100000;
-    const S_IFDIR   = 0040000;
-    const S_IFLNK   = 0120000;
-    const S_IFSOCK  = 0140000;
-
-    int mknod(in char*, mode_t, dev_t);
-}
--- a/druntime/import/stdc/posix/sys/time.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.time;
-
-private import stdc.posix.config;
-public import stdc.posix.sys.types;  // for time_t, suseconds_t
-public import stdc.posix.sys.select; // for fd_set, FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE
-
-extern (C):
-
-//
-// XOpen (XSI)
-//
-/*
-struct timeval
-{
-    time_t      tv_sec;
-    suseconds_t tv_usec;
-}
-
-struct itimerval
-{
-    timeval it_interval;
-    timeval it_value;
-}
-
-ITIMER_REAL
-ITIMER_VIRTUAL
-ITIMER_PROF
-
-int getitimer(int, itimerval*);
-int gettimeofday(timeval*, void*);
-int select(int, fd_set*, fd_set*, fd_set*, timeval*);
-int setitimer(int, in itimerval*, itimerval*);
-int utimes(in char*, in timeval[2]); // LEGACY
-*/
-
-version( linux )
-{
-    struct timeval
-    {
-        time_t      tv_sec;
-        suseconds_t tv_usec;
-    }
-
-    struct itimerval
-    {
-        timeval it_interval;
-        timeval it_value;
-    }
-
-    const ITIMER_REAL       = 0;
-    const ITIMER_VIRTUAL    = 1;
-    const ITIMER_PROF       = 2;
-
-    int getitimer(int, itimerval*);
-    int gettimeofday(timeval*, void*);
-    int select(int, fd_set*, fd_set*, fd_set*, timeval*);
-    int setitimer(int, in itimerval*, itimerval*);
-    int utimes(in char*, in timeval[2]); // LEGACY
-}
-else version( darwin )
-{
-    struct timeval
-    {
-        time_t      tv_sec;
-        suseconds_t tv_usec;
-    }
-
-    struct itimerval
-    {
-        timeval it_interval;
-        timeval it_value;
-    }
-
-    // non-standard
-    struct timezone_t
-    {
-        int tz_minuteswest;
-        int tz_dsttime;
-    }
-
-    int getitimer(int, itimerval*);
-    int gettimeofday(timeval*, timezone_t*); // timezone_t* is normally void*
-    int select(int, fd_set*, fd_set*, fd_set*, timeval*);
-    int setitimer(int, in itimerval*, itimerval*);
-    int utimes(in char*, in timeval[2]);
-}
-else version( freebsd )
-{
-    struct timeval
-    {
-        time_t      tv_sec;
-        suseconds_t tv_usec;
-    }
-
-    struct itimerval
-    {
-        timeval it_interval;
-        timeval it_value;
-    }
-
-    // non-standard
-    struct timezone_t
-    {
-        int tz_minuteswest;
-        int tz_dsttime;
-    }
-
-    int getitimer(int, itimerval*);
-    int gettimeofday(timeval*, timezone_t*); // timezone_t* is normally void*
-    int select(int, fd_set*, fd_set*, fd_set*, timeval*);
-    int setitimer(int, in itimerval*, itimerval*);
-    int utimes(in char*, in timeval[2]);
-}
--- a/druntime/import/stdc/posix/sys/types.d	Tue Nov 11 22:57:19 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,429 +0,0 @@
-/**
- * D header file for POSIX.
- *
- * Copyright: Public Domain
- * License:   Public Domain
- * Authors:   Sean Kelly
- * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
- */
-module stdc.posix.sys.types;
-
-private import stdc.posix.config;
-private import stdc.stdint;
-public import stdc.stddef; // for size_t
-public import stdc.time;   // for clock_t, time_t
-
-extern (C):
-
-//
-// Required
-//
-/*
-blkcnt_t
-blksize_t
-dev_t
-gid_t
-ino_t
-mode_t
-nlink_t
-off_t
-pid_t
-size_t
-ssize_t
-time_t
-uid_t
-*/
-
-version( linux )
-{
-  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 stdc.stddef)
-    alias c_long    ssize_t;
-    //time_t (defined in stdc.time)
-    alias uint      uid_t;
-}
-else version( darwin )
-{
-    alias long      blkcnt_t;
-    alias int       blksize_t;
-    alias int       dev_t;
-    alias uint      gid_t;
-    alias uint      ino_t;
-    alias ushort    mode_t;
-    alias ushort    nlink_t;
-    alias long      off_t;
-    alias int       pid_t;
-    //size_t (defined in stdc.stddef)
-    alias size_t    ssize_t;
-    //time_t (defined in stdc.time)
-    alias uint      uid_t;
-}
-else version( freebsd )
-{
-    alias long      blkcnt_t;
-    alias uint      blksize_t;
-    alias uint      dev_t;
-    alias uint      gid_t;
-    alias uint      ino_t;
-    alias ushort    mode_t;
-    alias ushort    nlink_t;
-    alias long      off_t;
-    alias int       pid_t;
-    //size_t (defined in stdc.stddef)
-    alias size_t    ssize_t;
-    //time_t (defined in stdc.time)
-    alias uint      uid_t;
-    alias uint      fflags_t;
-}
-
-//
-// XOpen (XSI)
-//