From 24f79eca36d0f4294eb276ac777b2a27dfb060dd Mon Sep 17 00:00:00 2001 From: sean Date: Sat, 25 Oct 2008 00:15:55 +0000 Subject: [PATCH] * Moved sys into core.sys * Moved stdc.posix into core.sys.posix * Moved stdc into core.stdc * Added initial support for Runtime.loadLibrary() and Runtime.unloadLibrary() in D2. The same functions are exposed in D1, but they are stubbed out for the moment. The basic library loading and unloading should theoretically work, but the GC handle swapping code still needs a look, etc. I left the D1 version stubbed out to make finding GC diffs easier for when I look at the handle swapping code (which is in D2 but not D1). Still not sure about the function naming either... may just switch to load() and unload(). git-svn-id: http://svn.dsource.org/projects/druntime/trunk@36 4a9d5153-6564-4b3f-b5e1-7e8e9dac548f --- import/{ => core}/stdc/complex.d | 2 +- import/{ => core}/stdc/config.d | 2 +- import/{ => core}/stdc/ctype.d | 2 +- import/{ => core}/stdc/errno.d | 2 +- import/{ => core}/stdc/fenv.d | 2 +- import/{ => core}/stdc/inttypes.d | 6 +- import/{ => core}/stdc/limits.d | 4 +- import/{ => core}/stdc/locale.d | 2 +- import/{ => core}/stdc/math.d | 30 +- import/{ => core}/stdc/signal.d | 2 +- import/{ => core}/stdc/stdarg.d | 2 +- import/{ => core}/stdc/stddef.d | 2 +- import/{ => core}/stdc/stdint.d | 6 +- import/{ => core}/stdc/stdio.d | 8 +- import/{ => core}/stdc/stdlib.d | 6 +- import/{ => core}/stdc/string.d | 4 +- import/core/stdc/tgmath.d | 652 ++++++++++++++++++ import/{ => core}/stdc/time.d | 6 +- import/{ => core}/stdc/wctype.d | 4 +- import/{stdc => core/sys}/posix/arpa/inet.d | 22 +- import/{stdc => core/sys}/posix/config.d | 4 +- import/{stdc => core/sys}/posix/dirent.d | 6 +- import/{stdc => core/sys}/posix/dlfcn.d | 4 +- import/{stdc => core/sys}/posix/fcntl.d | 12 +- import/{stdc => core/sys}/posix/inttypes.d | 6 +- import/{stdc => core/sys}/posix/net/if_.d | 4 +- import/{stdc => core/sys}/posix/netinet/in_.d | 28 +- import/{stdc => core/sys}/posix/netinet/tcp.d | 4 +- import/{stdc => core/sys}/posix/poll.d | 4 +- import/{stdc => core/sys}/posix/pthread.d | 10 +- import/{stdc => core/sys}/posix/pwd.d | 6 +- import/{stdc => core/sys}/posix/sched.d | 8 +- import/{stdc => core/sys}/posix/semaphore.d | 6 +- import/{stdc => core/sys}/posix/setjmp.d | 6 +- import/{stdc => core/sys}/posix/signal.d | 131 ++-- import/{stdc => core/sys}/posix/stdio.d | 12 +- import/{stdc => core/sys}/posix/stdlib.d | 74 +- import/{stdc => core/sys}/posix/sys/ipc.d | 6 +- import/{stdc => core/sys}/posix/sys/mman.d | 8 +- import/{stdc => core/sys}/posix/sys/select.d | 14 +- import/{stdc => core/sys}/posix/sys/shm.d | 8 +- import/{stdc => core/sys}/posix/sys/socket.d | 10 +- import/{stdc => core/sys}/posix/sys/stat.d | 12 +- import/{stdc => core/sys}/posix/sys/time.d | 8 +- import/{stdc => core/sys}/posix/sys/types.d | 24 +- import/{stdc => core/sys}/posix/sys/uio.d | 10 +- import/{stdc => core/sys}/posix/sys/wait.d | 10 +- import/{stdc => core/sys}/posix/termios.d | 6 +- import/{stdc => core/sys}/posix/time.d | 16 +- import/{stdc => core/sys}/posix/ucontext.d | 6 +- import/{stdc => core/sys}/posix/unistd.d | 10 +- import/{stdc => core/sys}/posix/utime.d | 6 +- import/{ => core}/sys/windows/windows.d | 2 +- import/stdc/tgmath.d | 652 ------------------ src/common/core/memory.d | 40 -- src/common/core/runtime.d | 34 + src/common/core/stdc/errno.c | 21 + src/common/core/thread.d | 23 +- src/common/posix.mak | 2 +- src/common/win32.mak | 2 +- src/compiler/dmd/aaA.d | 4 +- src/compiler/dmd/adi.d | 6 +- src/compiler/dmd/arrayassign.d | 6 +- src/compiler/dmd/arraycat.d | 4 +- src/compiler/dmd/cmath2.d | 2 +- src/compiler/dmd/cover.d | 8 +- src/compiler/dmd/dmain2.d | 76 +- src/compiler/dmd/lifetime.d | 8 +- src/compiler/dmd/memory.d | 2 - src/compiler/dmd/object_.d | 6 +- src/compiler/dmd/qsort2.d | 2 +- src/compiler/dmd/switch_.d | 2 +- src/compiler/dmd/trace.d | 8 +- src/compiler/dmd/typeinfo/ti_Ag.d | 2 +- src/compiler/dmd/typeinfo/ti_Aint.d | 2 +- src/compiler/dmd/typeinfo/ti_Along.d | 2 +- src/compiler/dmd/typeinfo/ti_Ashort.d | 2 +- src/compiler/dmd/util/console.d | 4 +- src/compiler/dmd/util/cpuid.d | 2 +- src/compiler/dmd/util/string.d | 2 +- src/gc/basic/gc.d | 2 +- src/gc/basic/gcalloc.d | 8 +- src/gc/basic/gcbits.d | 4 +- src/gc/basic/gcx.d | 6 +- src/gc/stub/gc.d | 2 +- src/gc/stub/posix.mak | 19 +- src/gc/stub/win32.mak | 9 +- 87 files changed, 1150 insertions(+), 1071 deletions(-) rename import/{ => core}/stdc/complex.d (98%) rename import/{ => core}/stdc/config.d (94%) rename import/{ => core}/stdc/ctype.d (94%) rename import/{ => core}/stdc/errno.d (99%) rename import/{ => core}/stdc/fenv.d (99%) rename import/{ => core}/stdc/inttypes.d (98%) rename import/{ => core}/stdc/limits.d (93%) rename import/{ => core}/stdc/locale.d (98%) rename import/{ => core}/stdc/math.d (97%) rename import/{ => core}/stdc/signal.d (98%) rename import/{ => core}/stdc/stdarg.d (97%) rename import/{ => core}/stdc/stddef.d (95%) rename import/{ => core}/stdc/stdint.d (97%) rename import/{ => core}/stdc/stdio.d (98%) rename import/{ => core}/stdc/stdlib.d (96%) rename import/{ => core}/stdc/string.d (97%) create mode 100644 import/core/stdc/tgmath.d rename import/{ => core}/stdc/time.d (96%) rename import/{ => core}/stdc/wctype.d (87%) rename import/{stdc => core/sys}/posix/arpa/inet.d (82%) rename import/{stdc => core/sys}/posix/config.d (88%) rename import/{stdc => core/sys}/posix/dirent.d (96%) rename import/{stdc => core/sys}/posix/dlfcn.d (94%) rename import/{stdc => core/sys}/posix/fcntl.d (94%) rename import/{stdc => core/sys}/posix/inttypes.d (87%) rename import/{stdc => core/sys}/posix/net/if_.d (95%) rename import/{stdc => core/sys}/posix/netinet/in_.d (90%) rename import/{stdc => core/sys}/posix/netinet/tcp.d (85%) rename import/{stdc => core/sys}/posix/poll.d (97%) rename import/{stdc => core/sys}/posix/pthread.d (99%) rename import/{stdc => core/sys}/posix/pwd.d (95%) rename import/{stdc => core/sys}/posix/sched.d (94%) rename import/{stdc => core/sys}/posix/semaphore.d (93%) rename import/{stdc => core/sys}/posix/setjmp.d (93%) rename import/{stdc => core/sys}/posix/signal.d (83%) rename import/{stdc => core/sys}/posix/stdio.d (94%) rename import/{stdc => core/sys}/posix/stdlib.d (76%) rename import/{stdc => core/sys}/posix/sys/ipc.d (91%) rename import/{stdc => core/sys}/posix/sys/mman.d (96%) rename import/{stdc => core/sys}/posix/sys/select.d (91%) rename import/{stdc => core/sys}/posix/sys/shm.d (92%) rename import/{stdc => core/sys}/posix/sys/socket.d (98%) rename import/{stdc => core/sys}/posix/sys/stat.d (97%) rename import/{stdc => core/sys}/posix/sys/time.d (90%) rename import/{stdc => core/sys}/posix/sys/types.d (94%) rename import/{stdc => core/sys}/posix/sys/uio.d (81%) rename import/{stdc => core/sys}/posix/sys/wait.d (93%) rename import/{stdc => core/sys}/posix/termios.d (98%) rename import/{stdc => core/sys}/posix/time.d (93%) rename import/{stdc => core/sys}/posix/ucontext.d (96%) rename import/{stdc => core/sys}/posix/unistd.d (98%) rename import/{stdc => core/sys}/posix/utime.d (86%) rename import/{ => core}/sys/windows/windows.d (99%) delete mode 100644 import/stdc/tgmath.d create mode 100644 src/common/core/stdc/errno.c diff --git a/import/stdc/complex.d b/import/core/stdc/complex.d similarity index 98% rename from import/stdc/complex.d rename to import/core/stdc/complex.d index 5211c8d..5980786 100644 --- a/import/stdc/complex.d +++ b/import/core/stdc/complex.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.complex; +module core.stdc.complex; extern (C): diff --git a/import/stdc/config.d b/import/core/stdc/config.d similarity index 94% rename from import/stdc/config.d rename to import/core/stdc/config.d index 09859cd..20de379 100644 --- a/import/stdc/config.d +++ b/import/core/stdc/config.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.config; +module core.stdc.config; extern (C): diff --git a/import/stdc/ctype.d b/import/core/stdc/ctype.d similarity index 94% rename from import/stdc/ctype.d rename to import/core/stdc/ctype.d index 1b9c07b..45da077 100644 --- a/import/stdc/ctype.d +++ b/import/core/stdc/ctype.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.ctype; +module core.stdc.ctype; extern (C): diff --git a/import/stdc/errno.d b/import/core/stdc/errno.d similarity index 99% rename from import/stdc/errno.d rename to import/core/stdc/errno.d index 0d78d1d..ca5b92c 100644 --- a/import/stdc/errno.d +++ b/import/core/stdc/errno.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.errno; +module core.stdc.errno; private { diff --git a/import/stdc/fenv.d b/import/core/stdc/fenv.d similarity index 99% rename from import/stdc/fenv.d rename to import/core/stdc/fenv.d index cdeb2da..62591fd 100644 --- a/import/stdc/fenv.d +++ b/import/core/stdc/fenv.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly, Walter Bright * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.fenv; +module core.stdc.fenv; extern (C): diff --git a/import/stdc/inttypes.d b/import/core/stdc/inttypes.d similarity index 98% rename from import/stdc/inttypes.d rename to import/core/stdc/inttypes.d index 7acaa74..d57f038 100644 --- a/import/stdc/inttypes.d +++ b/import/core/stdc/inttypes.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.inttypes; +module core.stdc.inttypes; -public import stdc.stddef; -public import stdc.stdint; +public import core.stdc.stddef; +public import core.stdc.stdint; extern (C): diff --git a/import/stdc/limits.d b/import/core/stdc/limits.d similarity index 93% rename from import/stdc/limits.d rename to import/core/stdc/limits.d index 106d1c7..30342a8 100644 --- a/import/stdc/limits.d +++ b/import/core/stdc/limits.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.limits; +module core.stdc.limits; -private import stdc.config; +private import core.stdc.config; extern (C): diff --git a/import/stdc/locale.d b/import/core/stdc/locale.d similarity index 98% rename from import/stdc/locale.d rename to import/core/stdc/locale.d index c81092b..a6ebe6a 100644 --- a/import/stdc/locale.d +++ b/import/core/stdc/locale.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.locale; +module core.stdc.locale; extern (C): diff --git a/import/stdc/math.d b/import/core/stdc/math.d similarity index 97% rename from import/stdc/math.d rename to import/core/stdc/math.d index 3c1881a..515394d 100644 --- a/import/stdc/math.d +++ b/import/core/stdc/math.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly, Walter Bright * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.math; +module core.stdc.math; -private import stdc.config; +private import core.stdc.config; extern (C): @@ -365,11 +365,11 @@ else version( freebsd ) { enum { - FP_INFINITE = 0x01, - FP_NAN = 0x02, - FP_NORMAL = 0x04, + FP_INFINITE = 0x01, + FP_NAN = 0x02, + FP_NORMAL = 0x04, FP_SUBNORMAL = 0x08, - FP_ZERO = 0x10 + FP_ZERO = 0x10 } enum @@ -400,22 +400,22 @@ else version( freebsd ) //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 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 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 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 isnan(real x) { return __isnanl(x); } //int isnormal(real-floating x); int isnormal(float x) { return __isnormalf(x); } @@ -423,10 +423,10 @@ else version( freebsd ) 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); } - } + int signbit(float x) { return __signbitf(x); } + int signbit(double x) { return __signbit(x); } + int signbit(real x) { return __signbit(x); } + } } extern (D) @@ -557,7 +557,7 @@ version( freebsd ) 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; } + real log2l(real x) { return logl(x) * ONE_LN2; } double logb(double x); float logbf(float x); diff --git a/import/stdc/signal.d b/import/core/stdc/signal.d similarity index 98% rename from import/stdc/signal.d rename to import/core/stdc/signal.d index b7ce585..ed828bf 100644 --- a/import/stdc/signal.d +++ b/import/core/stdc/signal.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.signal; +module core.stdc.signal; extern (C): diff --git a/import/stdc/stdarg.d b/import/core/stdc/stdarg.d similarity index 97% rename from import/stdc/stdarg.d rename to import/core/stdc/stdarg.d index afdbceb..ffe325a 100644 --- a/import/stdc/stdarg.d +++ b/import/core/stdc/stdarg.d @@ -6,7 +6,7 @@ * Authors: Hauke Duden, Walter Bright * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.stdarg; +module core.stdc.stdarg; version( GNU ) diff --git a/import/stdc/stddef.d b/import/core/stdc/stddef.d similarity index 95% rename from import/stdc/stddef.d rename to import/core/stdc/stddef.d index e6a5bf7..dbe5130 100644 --- a/import/stdc/stddef.d +++ b/import/core/stdc/stddef.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.stddef; +module core.stdc.stddef; extern (C): diff --git a/import/stdc/stdint.d b/import/core/stdc/stdint.d similarity index 97% rename from import/stdc/stdint.d rename to import/core/stdc/stdint.d index 5db5c6a..dbd4fbd 100644 --- a/import/stdc/stdint.d +++ b/import/core/stdc/stdint.d @@ -6,7 +6,7 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.stdint; +module core.stdc.stdint; private { @@ -66,8 +66,8 @@ alias ulong uintmax_t; version( VerboseC ) { - private import stdc.stddef; - private import stdc.signal; // for sig_atomic_t + private import core.stdc.stddef; + private import core.stdc.signal; // for sig_atomic_t const int8_t INT8_MIN = int8_t.min; const int8_t INT8_MAX = int8_t.max; diff --git a/import/stdc/stdio.d b/import/core/stdc/stdio.d similarity index 98% rename from import/stdc/stdio.d rename to import/core/stdc/stdio.d index bb6441d..2d548a4 100644 --- a/import/stdc/stdio.d +++ b/import/core/stdc/stdio.d @@ -6,13 +6,13 @@ * Authors: Sean Kelly, Walter Bright * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.stdio; +module core.stdc.stdio; private { - import stdc.stdarg; - import stdc.stddef; - import stdc.config; + import core.stdc.stdarg; + import core.stdc.stddef; + import core.stdc.config; } extern (C): diff --git a/import/stdc/stdlib.d b/import/core/stdc/stdlib.d similarity index 96% rename from import/stdc/stdlib.d rename to import/core/stdc/stdlib.d index 2ed0b4d..99a8ec1 100644 --- a/import/stdc/stdlib.d +++ b/import/core/stdc/stdlib.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.stdlib; +module core.stdc.stdlib; -private import stdc.stddef; -private import stdc.config; +private import core.stdc.stddef; +private import core.stdc.config; extern (C): diff --git a/import/stdc/string.d b/import/core/stdc/string.d similarity index 97% rename from import/stdc/string.d rename to import/core/stdc/string.d index 880ce38..099d2b0 100644 --- a/import/stdc/string.d +++ b/import/core/stdc/string.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.string; +module core.stdc.string; -private import stdc.stddef; +private import core.stdc.stddef; extern (C): diff --git a/import/core/stdc/tgmath.d b/import/core/stdc/tgmath.d new file mode 100644 index 0000000..24bcf61 --- /dev/null +++ b/import/core/stdc/tgmath.d @@ -0,0 +1,652 @@ +/** + * D header file for C99. + * + * Copyright: Public Domain + * License: Public Domain + * Authors: Sean Kelly, Walter Bright + * Standards: ISO/IEC 9899:1999 (E) + */ +module core.stdc.tgmath; + +private import core.stdc.config; +private static import core.stdc.math; +private static import core.stdc.complex; + +extern (C): + +version( freebsd ) +{ + alias core.stdc.math.acos acos; + alias core.stdc.math.acosf acos; + alias core.stdc.math.acosl acos; + + alias core.stdc.complex.cacos acos; + alias core.stdc.complex.cacosf acos; + alias core.stdc.complex.cacosl acos; + + alias core.stdc.math.asin asin; + alias core.stdc.math.asinf asin; + alias core.stdc.math.asinl asin; + + alias core.stdc.complex.casin asin; + alias core.stdc.complex.casinf asin; + alias core.stdc.complex.casinl asin; + + alias core.stdc.math.atan atan; + alias core.stdc.math.atanf atan; + alias core.stdc.math.atanl atan; + + alias core.stdc.complex.catan atan; + alias core.stdc.complex.catanf atan; + alias core.stdc.complex.catanl atan; + + alias core.stdc.math.atan2 atan2; + alias core.stdc.math.atan2f atan2; + alias core.stdc.math.atan2l atan2; + + alias core.stdc.math.cos cos; + alias core.stdc.math.cosf cos; + alias core.stdc.math.cosl cos; + + alias core.stdc.complex.ccos cos; + alias core.stdc.complex.ccosf cos; + alias core.stdc.complex.ccosl cos; + + alias core.stdc.math.sin sin; + alias core.stdc.math.sinf sin; + alias core.stdc.math.sinl sin; + + alias core.stdc.complex.csin csin; + alias core.stdc.complex.csinf csin; + alias core.stdc.complex.csinl csin; + + alias core.stdc.math.tan tan; + alias core.stdc.math.tanf tan; + alias core.stdc.math.tanl tan; + + alias core.stdc.complex.ctan tan; + alias core.stdc.complex.ctanf tan; + alias core.stdc.complex.ctanl tan; + + alias core.stdc.math.acosh acosh; + alias core.stdc.math.acoshf acosh; + alias core.stdc.math.acoshl acosh; + + alias core.stdc.complex.cacosh acosh; + alias core.stdc.complex.cacoshf acosh; + alias core.stdc.complex.cacoshl acosh; + + alias core.stdc.math.asinh asinh; + alias core.stdc.math.asinhf asinh; + alias core.stdc.math.asinhl asinh; + + alias core.stdc.complex.casinh asinh; + alias core.stdc.complex.casinhf asinh; + alias core.stdc.complex.casinhl asinh; + + alias core.stdc.math.atanh atanh; + alias core.stdc.math.atanhf atanh; + alias core.stdc.math.atanhl atanh; + + alias core.stdc.complex.catanh atanh; + alias core.stdc.complex.catanhf atanh; + alias core.stdc.complex.catanhl atanh; + + alias core.stdc.math.cosh cosh; + alias core.stdc.math.coshf cosh; + alias core.stdc.math.coshl cosh; + + alias core.stdc.complex.ccosh cosh; + alias core.stdc.complex.ccoshf cosh; + alias core.stdc.complex.ccoshl cosh; + + alias core.stdc.math.sinh sinh; + alias core.stdc.math.sinhf sinh; + alias core.stdc.math.sinhl sinh; + + alias core.stdc.complex.csinh sinh; + alias core.stdc.complex.csinhf sinh; + alias core.stdc.complex.csinhl sinh; + + alias core.stdc.math.tanh tanh; + alias core.stdc.math.tanhf tanh; + alias core.stdc.math.tanhl tanh; + + alias core.stdc.complex.ctanh tanh; + alias core.stdc.complex.ctanhf tanh; + alias core.stdc.complex.ctanhl tanh; + + alias core.stdc.math.exp exp; + alias core.stdc.math.expf exp; + alias core.stdc.math.expl exp; + + alias core.stdc.complex.cexp exp; + alias core.stdc.complex.cexpf exp; + alias core.stdc.complex.cexpl exp; + + alias core.stdc.math.exp2 exp2; + alias core.stdc.math.exp2f exp2; + alias core.stdc.math.exp2l exp2; + + alias core.stdc.math.expm1 expm1; + alias core.stdc.math.expm1f expm1; + alias core.stdc.math.expm1l expm1; + + alias core.stdc.math.frexp frexp; + alias core.stdc.math.frexpf frexp; + alias core.stdc.math.frexpl frexp; + + alias core.stdc.math.ilogb ilogb; + alias core.stdc.math.ilogbf ilogb; + alias core.stdc.math.ilogbl ilogb; + + alias core.stdc.math.ldexp ldexp; + alias core.stdc.math.ldexpf ldexp; + alias core.stdc.math.ldexpl ldexp; + + alias core.stdc.math.log log; + alias core.stdc.math.logf log; + alias core.stdc.math.logl log; + + alias core.stdc.complex.clog log; + alias core.stdc.complex.clogf log; + alias core.stdc.complex.clogl log; + + alias core.stdc.math.log10 log10; + alias core.stdc.math.log10f log10; + alias core.stdc.math.log10l log10; + + alias core.stdc.math.log1p log1p; + alias core.stdc.math.log1pf log1p; + alias core.stdc.math.log1pl log1p; + + alias core.stdc.math.log2 log1p; + alias core.stdc.math.log2f log1p; + alias core.stdc.math.log2l log1p; + + alias core.stdc.math.logb log1p; + alias core.stdc.math.logbf log1p; + alias core.stdc.math.logbl log1p; + + alias core.stdc.math.modf modf; + alias core.stdc.math.modff modf; +// alias core.stdc.math.modfl modf; + + alias core.stdc.math.scalbn scalbn; + alias core.stdc.math.scalbnf scalbn; + alias core.stdc.math.scalbnl scalbn; + + alias core.stdc.math.scalbln scalbln; + alias core.stdc.math.scalblnf scalbln; + alias core.stdc.math.scalblnl scalbln; + + alias core.stdc.math.cbrt cbrt; + alias core.stdc.math.cbrtf cbrt; + alias core.stdc.math.cbrtl cbrt; + + alias core.stdc.math.fabs fabs; + alias core.stdc.math.fabsf fabs; + alias core.stdc.math.fabsl fabs; + + alias core.stdc.complex.cabs fabs; + alias core.stdc.complex.cabsf fabs; + alias core.stdc.complex.cabsl fabs; + + alias core.stdc.math.hypot hypot; + alias core.stdc.math.hypotf hypot; + alias core.stdc.math.hypotl hypot; + + alias core.stdc.math.pow pow; + alias core.stdc.math.powf pow; + alias core.stdc.math.powl pow; + + alias core.stdc.complex.cpow pow; + alias core.stdc.complex.cpowf pow; + alias core.stdc.complex.cpowl pow; + + alias core.stdc.math.sqrt sqrt; + alias core.stdc.math.sqrtf sqrt; + alias core.stdc.math.sqrtl sqrt; + + alias core.stdc.complex.csqrt sqrt; + alias core.stdc.complex.csqrtf sqrt; + alias core.stdc.complex.csqrtl sqrt; + + alias core.stdc.math.erf erf; + alias core.stdc.math.erff erf; + alias core.stdc.math.erfl erf; + + alias core.stdc.math.erfc erfc; + alias core.stdc.math.erfcf erfc; + alias core.stdc.math.erfcl erfc; + + alias core.stdc.math.lgamma lgamma; + alias core.stdc.math.lgammaf lgamma; + alias core.stdc.math.lgammal lgamma; + + alias core.stdc.math.tgamma tgamma; + alias core.stdc.math.tgammaf tgamma; + alias core.stdc.math.tgammal tgamma; + + alias core.stdc.math.ceil ceil; + alias core.stdc.math.ceilf ceil; + alias core.stdc.math.ceill ceil; + + alias core.stdc.math.floor floor; + alias core.stdc.math.floorf floor; + alias core.stdc.math.floorl floor; + + alias core.stdc.math.nearbyint nearbyint; + alias core.stdc.math.nearbyintf nearbyint; + alias core.stdc.math.nearbyintl nearbyint; + + alias core.stdc.math.rint rint; + alias core.stdc.math.rintf rint; + alias core.stdc.math.rintl rint; + + alias core.stdc.math.lrint lrint; + alias core.stdc.math.lrintf lrint; + alias core.stdc.math.lrintl lrint; + + alias core.stdc.math.llrint llrint; + alias core.stdc.math.llrintf llrint; + alias core.stdc.math.llrintl llrint; + + alias core.stdc.math.round round; + alias core.stdc.math.roundf round; + alias core.stdc.math.roundl round; + + alias core.stdc.math.lround lround; + alias core.stdc.math.lroundf lround; + alias core.stdc.math.lroundl lround; + + alias core.stdc.math.llround llround; + alias core.stdc.math.llroundf llround; + alias core.stdc.math.llroundl llround; + + alias core.stdc.math.trunc trunc; + alias core.stdc.math.truncf trunc; + alias core.stdc.math.truncl trunc; + + alias core.stdc.math.fmod fmod; + alias core.stdc.math.fmodf fmod; + alias core.stdc.math.fmodl fmod; + + alias core.stdc.math.remainder remainder; + alias core.stdc.math.remainderf remainder; + alias core.stdc.math.remainderl remainder; + + alias core.stdc.math.remquo remquo; + alias core.stdc.math.remquof remquo; + alias core.stdc.math.remquol remquo; + + alias core.stdc.math.copysign copysign; + alias core.stdc.math.copysignf copysign; + alias core.stdc.math.copysignl copysign; + +// alias core.stdc.math.nan nan; +// alias core.stdc.math.nanf nan; +// alias core.stdc.math.nanl nan; + + alias core.stdc.math.nextafter nextafter; + alias core.stdc.math.nextafterf nextafter; + alias core.stdc.math.nextafterl nextafter; + + alias core.stdc.math.nexttoward nexttoward; + alias core.stdc.math.nexttowardf nexttoward; + alias core.stdc.math.nexttowardl nexttoward; + + alias core.stdc.math.fdim fdim; + alias core.stdc.math.fdimf fdim; + alias core.stdc.math.fdiml fdim; + + alias core.stdc.math.fmax fmax; + alias core.stdc.math.fmaxf fmax; + alias core.stdc.math.fmaxl fmax; + + alias core.stdc.math.fmin fmin; + alias core.stdc.math.fmin fmin; + alias core.stdc.math.fminl fmin; + + alias core.stdc.math.fma fma; + alias core.stdc.math.fmaf fma; + alias core.stdc.math.fmal fma; + + alias core.stdc.complex.carg carg; + alias core.stdc.complex.cargf carg; + alias core.stdc.complex.cargl carg; + + alias core.stdc.complex.cimag cimag; + alias core.stdc.complex.cimagf cimag; + alias core.stdc.complex.cimagl cimag; + + alias core.stdc.complex.conj conj; + alias core.stdc.complex.conjf conj; + alias core.stdc.complex.conjl conj; + + alias core.stdc.complex.cproj cproj; + alias core.stdc.complex.cprojf cproj; + alias core.stdc.complex.cprojl cproj; + +// alias core.stdc.complex.creal creal; +// alias core.stdc.complex.crealf creal; +// alias core.stdc.complex.creall creal; +} +else +{ + alias core.stdc.math.acos acos; + alias core.stdc.math.acosf acos; + alias core.stdc.math.acosl acos; + + alias core.stdc.complex.cacos acos; + alias core.stdc.complex.cacosf acos; + alias core.stdc.complex.cacosl acos; + + alias core.stdc.math.asin asin; + alias core.stdc.math.asinf asin; + alias core.stdc.math.asinl asin; + + alias core.stdc.complex.casin asin; + alias core.stdc.complex.casinf asin; + alias core.stdc.complex.casinl asin; + + alias core.stdc.math.atan atan; + alias core.stdc.math.atanf atan; + alias core.stdc.math.atanl atan; + + alias core.stdc.complex.catan atan; + alias core.stdc.complex.catanf atan; + alias core.stdc.complex.catanl atan; + + alias core.stdc.math.atan2 atan2; + alias core.stdc.math.atan2f atan2; + alias core.stdc.math.atan2l atan2; + + alias core.stdc.math.cos cos; + alias core.stdc.math.cosf cos; + alias core.stdc.math.cosl cos; + + alias core.stdc.complex.ccos cos; + alias core.stdc.complex.ccosf cos; + alias core.stdc.complex.ccosl cos; + + alias core.stdc.math.sin sin; + alias core.stdc.math.sinf sin; + alias core.stdc.math.sinl sin; + + alias core.stdc.complex.csin csin; + alias core.stdc.complex.csinf csin; + alias core.stdc.complex.csinl csin; + + alias core.stdc.math.tan tan; + alias core.stdc.math.tanf tan; + alias core.stdc.math.tanl tan; + + alias core.stdc.complex.ctan tan; + alias core.stdc.complex.ctanf tan; + alias core.stdc.complex.ctanl tan; + + alias core.stdc.math.acosh acosh; + alias core.stdc.math.acoshf acosh; + alias core.stdc.math.acoshl acosh; + + alias core.stdc.complex.cacosh acosh; + alias core.stdc.complex.cacoshf acosh; + alias core.stdc.complex.cacoshl acosh; + + alias core.stdc.math.asinh asinh; + alias core.stdc.math.asinhf asinh; + alias core.stdc.math.asinhl asinh; + + alias core.stdc.complex.casinh asinh; + alias core.stdc.complex.casinhf asinh; + alias core.stdc.complex.casinhl asinh; + + alias core.stdc.math.atanh atanh; + alias core.stdc.math.atanhf atanh; + alias core.stdc.math.atanhl atanh; + + alias core.stdc.complex.catanh atanh; + alias core.stdc.complex.catanhf atanh; + alias core.stdc.complex.catanhl atanh; + + alias core.stdc.math.cosh cosh; + alias core.stdc.math.coshf cosh; + alias core.stdc.math.coshl cosh; + + alias core.stdc.complex.ccosh cosh; + alias core.stdc.complex.ccoshf cosh; + alias core.stdc.complex.ccoshl cosh; + + alias core.stdc.math.sinh sinh; + alias core.stdc.math.sinhf sinh; + alias core.stdc.math.sinhl sinh; + + alias core.stdc.complex.csinh sinh; + alias core.stdc.complex.csinhf sinh; + alias core.stdc.complex.csinhl sinh; + + alias core.stdc.math.tanh tanh; + alias core.stdc.math.tanhf tanh; + alias core.stdc.math.tanhl tanh; + + alias core.stdc.complex.ctanh tanh; + alias core.stdc.complex.ctanhf tanh; + alias core.stdc.complex.ctanhl tanh; + + alias core.stdc.math.exp exp; + alias core.stdc.math.expf exp; + alias core.stdc.math.expl exp; + + alias core.stdc.complex.cexp exp; + alias core.stdc.complex.cexpf exp; + alias core.stdc.complex.cexpl exp; + + alias core.stdc.math.exp2 exp2; + alias core.stdc.math.exp2f exp2; + alias core.stdc.math.exp2l exp2; + + alias core.stdc.math.expm1 expm1; + alias core.stdc.math.expm1f expm1; + alias core.stdc.math.expm1l expm1; + + alias core.stdc.math.frexp frexp; + alias core.stdc.math.frexpf frexp; + alias core.stdc.math.frexpl frexp; + + alias core.stdc.math.ilogb ilogb; + alias core.stdc.math.ilogbf ilogb; + alias core.stdc.math.ilogbl ilogb; + + alias core.stdc.math.ldexp ldexp; + alias core.stdc.math.ldexpf ldexp; + alias core.stdc.math.ldexpl ldexp; + + alias core.stdc.math.log log; + alias core.stdc.math.logf log; + alias core.stdc.math.logl log; + + alias core.stdc.complex.clog log; + alias core.stdc.complex.clogf log; + alias core.stdc.complex.clogl log; + + alias core.stdc.math.log10 log10; + alias core.stdc.math.log10f log10; + alias core.stdc.math.log10l log10; + + alias core.stdc.math.log1p log1p; + alias core.stdc.math.log1pf log1p; + alias core.stdc.math.log1pl log1p; + + alias core.stdc.math.log2 log1p; + alias core.stdc.math.log2f log1p; + alias core.stdc.math.log2l log1p; + + alias core.stdc.math.logb log1p; + alias core.stdc.math.logbf log1p; + alias core.stdc.math.logbl log1p; + + alias core.stdc.math.modf modf; + alias core.stdc.math.modff modf; + alias core.stdc.math.modfl modf; + + alias core.stdc.math.scalbn scalbn; + alias core.stdc.math.scalbnf scalbn; + alias core.stdc.math.scalbnl scalbn; + + alias core.stdc.math.scalbln scalbln; + alias core.stdc.math.scalblnf scalbln; + alias core.stdc.math.scalblnl scalbln; + + alias core.stdc.math.cbrt cbrt; + alias core.stdc.math.cbrtf cbrt; + alias core.stdc.math.cbrtl cbrt; + + alias core.stdc.math.fabs fabs; + alias core.stdc.math.fabsf fabs; + alias core.stdc.math.fabsl fabs; + + alias core.stdc.complex.cabs fabs; + alias core.stdc.complex.cabsf fabs; + alias core.stdc.complex.cabsl fabs; + + alias core.stdc.math.hypot hypot; + alias core.stdc.math.hypotf hypot; + alias core.stdc.math.hypotl hypot; + + alias core.stdc.math.pow pow; + alias core.stdc.math.powf pow; + alias core.stdc.math.powl pow; + + alias core.stdc.complex.cpow pow; + alias core.stdc.complex.cpowf pow; + alias core.stdc.complex.cpowl pow; + + alias core.stdc.math.sqrt sqrt; + alias core.stdc.math.sqrtf sqrt; + alias core.stdc.math.sqrtl sqrt; + + alias core.stdc.complex.csqrt sqrt; + alias core.stdc.complex.csqrtf sqrt; + alias core.stdc.complex.csqrtl sqrt; + + alias core.stdc.math.erf erf; + alias core.stdc.math.erff erf; + alias core.stdc.math.erfl erf; + + alias core.stdc.math.erfc erfc; + alias core.stdc.math.erfcf erfc; + alias core.stdc.math.erfcl erfc; + + alias core.stdc.math.lgamma lgamma; + alias core.stdc.math.lgammaf lgamma; + alias core.stdc.math.lgammal lgamma; + + alias core.stdc.math.tgamma tgamma; + alias core.stdc.math.tgammaf tgamma; + alias core.stdc.math.tgammal tgamma; + + alias core.stdc.math.ceil ceil; + alias core.stdc.math.ceilf ceil; + alias core.stdc.math.ceill ceil; + + alias core.stdc.math.floor floor; + alias core.stdc.math.floorf floor; + alias core.stdc.math.floorl floor; + + alias core.stdc.math.nearbyint nearbyint; + alias core.stdc.math.nearbyintf nearbyint; + alias core.stdc.math.nearbyintl nearbyint; + + alias core.stdc.math.rint rint; + alias core.stdc.math.rintf rint; + alias core.stdc.math.rintl rint; + + alias core.stdc.math.lrint lrint; + alias core.stdc.math.lrintf lrint; + alias core.stdc.math.lrintl lrint; + + alias core.stdc.math.llrint llrint; + alias core.stdc.math.llrintf llrint; + alias core.stdc.math.llrintl llrint; + + alias core.stdc.math.round round; + alias core.stdc.math.roundf round; + alias core.stdc.math.roundl round; + + alias core.stdc.math.lround lround; + alias core.stdc.math.lroundf lround; + alias core.stdc.math.lroundl lround; + + alias core.stdc.math.llround llround; + alias core.stdc.math.llroundf llround; + alias core.stdc.math.llroundl llround; + + alias core.stdc.math.trunc trunc; + alias core.stdc.math.truncf trunc; + alias core.stdc.math.truncl trunc; + + alias core.stdc.math.fmod fmod; + alias core.stdc.math.fmodf fmod; + alias core.stdc.math.fmodl fmod; + + alias core.stdc.math.remainder remainder; + alias core.stdc.math.remainderf remainder; + alias core.stdc.math.remainderl remainder; + + alias core.stdc.math.remquo remquo; + alias core.stdc.math.remquof remquo; + alias core.stdc.math.remquol remquo; + + alias core.stdc.math.copysign copysign; + alias core.stdc.math.copysignf copysign; + alias core.stdc.math.copysignl copysign; + + alias core.stdc.math.nan nan; + alias core.stdc.math.nanf nan; + alias core.stdc.math.nanl nan; + + alias core.stdc.math.nextafter nextafter; + alias core.stdc.math.nextafterf nextafter; + alias core.stdc.math.nextafterl nextafter; + + alias core.stdc.math.nexttoward nexttoward; + alias core.stdc.math.nexttowardf nexttoward; + alias core.stdc.math.nexttowardl nexttoward; + + alias core.stdc.math.fdim fdim; + alias core.stdc.math.fdimf fdim; + alias core.stdc.math.fdiml fdim; + + alias core.stdc.math.fmax fmax; + alias core.stdc.math.fmaxf fmax; + alias core.stdc.math.fmaxl fmax; + + alias core.stdc.math.fmin fmin; + alias core.stdc.math.fmin fmin; + alias core.stdc.math.fminl fmin; + + alias core.stdc.math.fma fma; + alias core.stdc.math.fmaf fma; + alias core.stdc.math.fmal fma; + + alias core.stdc.complex.carg carg; + alias core.stdc.complex.cargf carg; + alias core.stdc.complex.cargl carg; + + alias core.stdc.complex.cimag cimag; + alias core.stdc.complex.cimagf cimag; + alias core.stdc.complex.cimagl cimag; + + alias core.stdc.complex.conj conj; + alias core.stdc.complex.conjf conj; + alias core.stdc.complex.conjl conj; + + alias core.stdc.complex.cproj cproj; + alias core.stdc.complex.cprojf cproj; + alias core.stdc.complex.cprojl cproj; + +// alias core.stdc.complex.creal creal; +// alias core.stdc.complex.crealf creal; +// alias core.stdc.complex.creall creal; +} diff --git a/import/stdc/time.d b/import/core/stdc/time.d similarity index 96% rename from import/stdc/time.d rename to import/core/stdc/time.d index 7422c83..9e46fd8 100644 --- a/import/stdc/time.d +++ b/import/core/stdc/time.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.time; +module core.stdc.time; -private import stdc.config; -private import stdc.stddef; +private import core.stdc.config; +private import core.stdc.stddef; extern (C): diff --git a/import/stdc/wctype.d b/import/core/stdc/wctype.d similarity index 87% rename from import/stdc/wctype.d rename to import/core/stdc/wctype.d index 125da7d..72881c8 100644 --- a/import/stdc/wctype.d +++ b/import/core/stdc/wctype.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: ISO/IEC 9899:1999 (E) */ -module stdc.wctype; +module core.stdc.wctype; -private import stdc.stddef; +private import core.stdc.stddef; extern (C): diff --git a/import/stdc/posix/arpa/inet.d b/import/core/sys/posix/arpa/inet.d similarity index 82% rename from import/stdc/posix/arpa/inet.d rename to import/core/sys/posix/arpa/inet.d index f4ab250..05c7ffc 100644 --- a/import/stdc/posix/arpa/inet.d +++ b/import/core/sys/posix/arpa/inet.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.arpa.inet; +module core.sys.posix.arpa.inet; -private import stdc.posix.config; -public import stdc.inttypes : uint32_t, uint16_t; -public import stdc.posix.sys.socket : socklen_t; +private import core.sys.posix.config; +public import core.stdc.inttypes : uint32_t, uint16_t; +public import core.sys.posix.sys.socket : socklen_t; extern (C): @@ -18,14 +18,14 @@ extern (C): // Required // /* -in_port_t // from stdc.posix.netinet.in_ -in_addr_t // from stdc.posix.netinet.in_ +in_port_t // from core.sys.posix.netinet.in_ +in_addr_t // from core.sys.posix.netinet.in_ -struct in_addr // from stdc.posix.netinet.in_ -INET_ADDRSTRLEN // from stdc.posix.netinet.in_ +struct in_addr // from core.sys.posix.netinet.in_ +INET_ADDRSTRLEN // from core.sys.posix.netinet.in_ -uint32_t // from stdc.inttypes -uint16_t // from stdc.inttypes +uint32_t // from core.stdc.inttypes +uint16_t // from core.stdc.inttypes uint32_t htonl(uint32_t); uint16_t htons(uint16_t); @@ -110,7 +110,7 @@ else version( freebsd ) // IPV6 (IP6) // /* -INET6_ADDRSTRLEN // from stdc.posix.netinet.in_ +INET6_ADDRSTRLEN // from core.sys.posix.netinet.in_ */ version( linux ) diff --git a/import/stdc/posix/config.d b/import/core/sys/posix/config.d similarity index 88% rename from import/stdc/posix/config.d rename to import/core/sys/posix/config.d index c3a4485..a2e92cd 100644 --- a/import/stdc/posix/config.d +++ b/import/core/sys/posix/config.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.config; +module core.sys.posix.config; -public import stdc.config; +public import core.stdc.config; extern (C): diff --git a/import/stdc/posix/dirent.d b/import/core/sys/posix/dirent.d similarity index 96% rename from import/stdc/posix/dirent.d rename to import/core/sys/posix/dirent.d index c15aaf2..c474923 100644 --- a/import/stdc/posix/dirent.d +++ b/import/core/sys/posix/dirent.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.dirent; +module core.sys.posix.dirent; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for ino_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for ino_t extern (C): diff --git a/import/stdc/posix/dlfcn.d b/import/core/sys/posix/dlfcn.d similarity index 94% rename from import/stdc/posix/dlfcn.d rename to import/core/sys/posix/dlfcn.d index 2858413..2cf9142 100644 --- a/import/stdc/posix/dlfcn.d +++ b/import/core/sys/posix/dlfcn.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.dlfcn; +module core.sys.posix.dlfcn; -private import stdc.posix.config; +private import core.sys.posix.config; extern (C): diff --git a/import/stdc/posix/fcntl.d b/import/core/sys/posix/fcntl.d similarity index 94% rename from import/stdc/posix/fcntl.d rename to import/core/sys/posix/fcntl.d index f66d1a1..cc5641f 100644 --- a/import/stdc/posix/fcntl.d +++ b/import/core/sys/posix/fcntl.d @@ -6,13 +6,13 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.fcntl; +module core.sys.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. +private import core.sys.posix.config; +private import core.stdc.stdint; +public import core.stdc.stddef; // for size_t +public import core.sys.posix.sys.types; // for off_t, mode_t +public import core.sys.posix.sys.stat; // for S_IFMT, etc. extern (C): diff --git a/import/stdc/posix/inttypes.d b/import/core/sys/posix/inttypes.d similarity index 87% rename from import/stdc/posix/inttypes.d rename to import/core/sys/posix/inttypes.d index 7925e7f..9621e55 100644 --- a/import/stdc/posix/inttypes.d +++ b/import/core/sys/posix/inttypes.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.inttypes; +module core.sys.posix.inttypes; -private import stdc.posix.config; -public import stdc.inttypes; +private import core.sys.posix.config; +public import core.stdc.inttypes; // // Required diff --git a/import/stdc/posix/net/if_.d b/import/core/sys/posix/net/if_.d similarity index 95% rename from import/stdc/posix/net/if_.d rename to import/core/sys/posix/net/if_.d index 2724c14..e321e0e 100644 --- a/import/stdc/posix/net/if_.d +++ b/import/core/sys/posix/net/if_.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.net.if_; +module core.sys.posix.net.if_; -private import stdc.posix.config; +private import core.sys.posix.config; extern (C): diff --git a/import/stdc/posix/netinet/in_.d b/import/core/sys/posix/netinet/in_.d similarity index 90% rename from import/stdc/posix/netinet/in_.d rename to import/core/sys/posix/netinet/in_.d index 237ead4..e4bca08 100644 --- a/import/stdc/posix/netinet/in_.d +++ b/import/core/sys/posix/netinet/in_.d @@ -6,12 +6,12 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.netinet.in_; +module core.sys.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 +private import core.sys.posix.config; +public import core.stdc.inttypes : uint32_t, uint16_t, uint8_t; +public import core.sys.posix.arpa.inet; +public import core.sys.posix.sys.socket; // for sa_family_t extern (C): @@ -19,15 +19,15 @@ extern (C): // Required // /* -NOTE: The following must must be defined in stdc.posix.arpa.inet to break +NOTE: The following must must be defined in core.sys.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 +sa_family_t // from core.sys.posix.sys.socket +uint8_t // from core.stdc.inttypes +uint32_t // from core.stdc.inttypes struct in_addr { @@ -51,10 +51,10 @@ 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 +htonl() // from core.sys.posix.arpa.inet +htons() // from core.sys.posix.arpa.inet +ntohl() // from core.sys.posix.arpa.inet +ntohs() // from core.sys.posix.arpa.inet */ version( linux ) @@ -137,7 +137,7 @@ else version( freebsd ) // IPV6 (IP6) // /* -NOTE: The following must must be defined in stdc.posix.arpa.inet to break +NOTE: The following must must be defined in core.sys.posix.arpa.inet to break a circular import: INET6_ADDRSTRLEN. struct in6_addr diff --git a/import/stdc/posix/netinet/tcp.d b/import/core/sys/posix/netinet/tcp.d similarity index 85% rename from import/stdc/posix/netinet/tcp.d rename to import/core/sys/posix/netinet/tcp.d index 4c21625..5d6611e 100644 --- a/import/stdc/posix/netinet/tcp.d +++ b/import/core/sys/posix/netinet/tcp.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.netinet.tcp; +module core.sys.posix.netinet.tcp; -private import stdc.posix.config; +private import core.sys.posix.config; extern (C): diff --git a/import/stdc/posix/poll.d b/import/core/sys/posix/poll.d similarity index 97% rename from import/stdc/posix/poll.d rename to import/core/sys/posix/poll.d index 382d182..4737cf2 100644 --- a/import/stdc/posix/poll.d +++ b/import/core/sys/posix/poll.d @@ -6,9 +6,9 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.poll; +module core.sys.posix.poll; -private import stdc.posix.config; +private import core.sys.posix.config; extern (C): diff --git a/import/stdc/posix/pthread.d b/import/core/sys/posix/pthread.d similarity index 99% rename from import/stdc/posix/pthread.d rename to import/core/sys/posix/pthread.d index 3b83ea0..49fdcd9 100644 --- a/import/stdc/posix/pthread.d +++ b/import/core/sys/posix/pthread.d @@ -6,12 +6,12 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.pthread; +module core.sys.posix.pthread; -private import stdc.posix.config; -public import stdc.posix.sys.types; -public import stdc.posix.sched; -public import stdc.posix.time; +private import core.sys.posix.config; +public import core.sys.posix.sys.types; +public import core.sys.posix.sched; +public import core.sys.posix.time; extern (C): diff --git a/import/stdc/posix/pwd.d b/import/core/sys/posix/pwd.d similarity index 95% rename from import/stdc/posix/pwd.d rename to import/core/sys/posix/pwd.d index 900380a..09dfc48 100644 --- a/import/stdc/posix/pwd.d +++ b/import/core/sys/posix/pwd.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.pwd; +module core.sys.posix.pwd; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for gid_t, uid_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for gid_t, uid_t extern (C): diff --git a/import/stdc/posix/sched.d b/import/core/sys/posix/sched.d similarity index 94% rename from import/stdc/posix/sched.d rename to import/core/sys/posix/sched.d index b78475f..4392b40 100644 --- a/import/stdc/posix/sched.d +++ b/import/core/sys/posix/sched.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sched; +module core.sys.posix.sched; -private import stdc.posix.config; -public import stdc.posix.time; -public import stdc.posix.sys.types; +private import core.sys.posix.config; +public import core.sys.posix.time; +public import core.sys.posix.sys.types; extern (C): diff --git a/import/stdc/posix/semaphore.d b/import/core/sys/posix/semaphore.d similarity index 93% rename from import/stdc/posix/semaphore.d rename to import/core/sys/posix/semaphore.d index 392a004..3392b63 100644 --- a/import/stdc/posix/semaphore.d +++ b/import/core/sys/posix/semaphore.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.semaphore; +module core.sys.posix.semaphore; -private import stdc.posix.config; -private import stdc.posix.time; +private import core.sys.posix.config; +private import core.sys.posix.time; extern (C): diff --git a/import/stdc/posix/setjmp.d b/import/core/sys/posix/setjmp.d similarity index 93% rename from import/stdc/posix/setjmp.d rename to import/core/sys/posix/setjmp.d index 93c6c2e..35fbbd9 100644 --- a/import/stdc/posix/setjmp.d +++ b/import/core/sys/posix/setjmp.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.setjmp; +module core.sys.posix.setjmp; -private import stdc.posix.config; -private import stdc.posix.signal; // for sigset_t +private import core.sys.posix.config; +private import core.sys.posix.signal; // for sigset_t extern (C): diff --git a/import/stdc/posix/signal.d b/import/core/sys/posix/signal.d similarity index 83% rename from import/stdc/posix/signal.d rename to import/core/sys/posix/signal.d index 06cc469..cdba65f 100644 --- a/import/stdc/posix/signal.d +++ b/import/core/sys/posix/signal.d @@ -6,13 +6,13 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.signal; +module core.sys.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 +private import core.sys.posix.config; +public import core.stdc.signal; +public import core.stdc.stddef; // for size_t +public import core.sys.posix.sys.types; // for pid_t +//public import core.sys.posix.time; // for timespec, now defined here extern (C): @@ -23,11 +23,11 @@ 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_DFL (defined in core.stdc.signal) +SIG_ERR (defined in core.stdc.signal) +SIG_IGN (defined in core.stdc.signal) -sig_atomic_t (defined in stdc.signal) +sig_atomic_t (defined in core.stdc.signal) SIGEV_NONE SIGEV_SIGNAL @@ -42,21 +42,21 @@ union sigval SIGRTMIN SIGRTMAX -SIGABRT (defined in stdc.signal) +SIGABRT (defined in core.stdc.signal) SIGALRM SIGBUS SIGCHLD SIGCONT -SIGFPE (defined in stdc.signal) +SIGFPE (defined in core.stdc.signal) SIGHUP -SIGILL (defined in stdc.signal) -SIGINT (defined in stdc.signal) +SIGILL (defined in core.stdc.signal) +SIGINT (defined in core.stdc.signal) SIGKILL SIGPIPE SIGQUIT -SIGSEGV (defined in stdc.signal) +SIGSEGV (defined in core.stdc.signal) SIGSTOP -SIGTERM (defined in stdc.signal) +SIGTERM (defined in core.stdc.signal) SIGTSTP SIGTTIN SIGTTOU @@ -71,15 +71,15 @@ struct sigaction_t sigactfn_t sa_sigaction; } -sigfn_t signal(int sig, sigfn_t func); (defined in stdc.signal) -int raise(int sig); (defined in stdc.signal) +sigfn_t signal(int sig, sigfn_t func); (defined in core.stdc.signal) +int raise(int sig); (defined in core.stdc.signal) */ -//SIG_DFL (defined in stdc.signal) -//SIG_ERR (defined in stdc.signal) -//SIG_IGN (defined in stdc.signal) +//SIG_DFL (defined in core.stdc.signal) +//SIG_ERR (defined in core.stdc.signal) +//SIG_IGN (defined in core.stdc.signal) -//sig_atomic_t (defined in stdc.signal) +//sig_atomic_t (defined in core.stdc.signal) enum { @@ -102,21 +102,21 @@ alias __libc_current_sigrtmax SIGRTMAX; version( linux ) { - //SIGABRT (defined in stdc.signal) + //SIGABRT (defined in core.stdc.signal) const SIGALRM = 14; const SIGBUS = 7; const SIGCHLD = 17; const SIGCONT = 18; - //SIGFPE (defined in stdc.signal) + //SIGFPE (defined in core.stdc.signal) const SIGHUP = 1; - //SIGILL (defined in stdc.signal) - //SIGINT (defined in stdc.signal) + //SIGILL (defined in core.stdc.signal) + //SIGINT (defined in core.stdc.signal) const SIGKILL = 9; const SIGPIPE = 13; const SIGQUIT = 3; - //SIGSEGV (defined in stdc.signal) + //SIGSEGV (defined in core.stdc.signal) const SIGSTOP = 19; - //SIGTERM (defined in stdc.signal) + //SIGTERM (defined in core.stdc.signal) const SIGTSTP = 20; const SIGTTIN = 21; const SIGTTOU = 22; @@ -126,21 +126,21 @@ version( linux ) } else version( darwin ) { - //SIGABRT (defined in stdc.signal) + //SIGABRT (defined in core.stdc.signal) const SIGALRM = 14; const SIGBUS = 10; const SIGCHLD = 20; const SIGCONT = 19; - //SIGFPE (defined in stdc.signal) + //SIGFPE (defined in core.stdc.signal) const SIGHUP = 1; - //SIGILL (defined in stdc.signal) - //SIGINT (defined in stdc.signal) + //SIGILL (defined in core.stdc.signal) + //SIGINT (defined in core.stdc.signal) const SIGKILL = 9; const SIGPIPE = 13; const SIGQUIT = 3; - //SIGSEGV (defined in stdc.signal) + //SIGSEGV (defined in core.stdc.signal) const SIGSTOP = 17; - //SIGTERM (defined in stdc.signal) + //SIGTERM (defined in core.stdc.signal) const SIGTSTP = 18; const SIGTTIN = 21; const SIGTTOU = 22; @@ -150,21 +150,21 @@ else version( darwin ) } else version( freebsd ) { - //SIGABRT (defined in stdc.signal) + //SIGABRT (defined in core.stdc.signal) const SIGALRM = 14; const SIGBUS = 10; const SIGCHLD = 20; const SIGCONT = 19; - //SIGFPE (defined in stdc.signal) + //SIGFPE (defined in core.stdc.signal) const SIGHUP = 1; - //SIGILL (defined in stdc.signal) - //SIGINT (defined in stdc.signal) + //SIGILL (defined in core.stdc.signal) + //SIGINT (defined in core.stdc.signal) const SIGKILL = 9; const SIGPIPE = 13; const SIGQUIT = 3; - //SIGSEGV (defined in stdc.signal) + //SIGSEGV (defined in core.stdc.signal) const SIGSTOP = 17; - //SIGTERM (defined in stdc.signal) + //SIGTERM (defined in core.stdc.signal) const SIGTSTP = 18; const SIGTTIN = 21; const SIGTTOU = 22; @@ -202,14 +202,14 @@ struct sigaction_t SIG_HOLD sigset_t -pid_t (defined in sys.types) +pid_t (defined in core.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) +SIGABRT (defined in core.stdc.signal) +SIGFPE (defined in core.stdc.signal) +SIGILL (defined in core.stdc.signal) +SIGINT (defined in core.stdc.signal) +SIGSEGV (defined in core.stdc.signal) +SIGTERM (defined in core.stdc.signal) SA_NOCLDSTOP (CX|XSI) SIG_BLOCK @@ -266,14 +266,14 @@ version( linux ) c_ulong[_SIGSET_NWORDS] __val; } - // pid_t (defined in sys.types) + // pid_t (defined in core.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) + //SIGABRT (defined in core.stdc.signal) + //SIGFPE (defined in core.stdc.signal) + //SIGILL (defined in core.stdc.signal) + //SIGINT (defined in core.stdc.signal) + //SIGSEGV (defined in core.stdc.signal) + //SIGTERM (defined in core.stdc.signal) const SA_NOCLDSTOP = 1; // (CX|XSI) @@ -381,14 +381,14 @@ else version( darwin ) //SIG_HOLD alias uint sigset_t; - // pid_t (defined in sys.types) + // pid_t (defined in core.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) + //SIGABRT (defined in core.stdc.signal) + //SIGFPE (defined in core.stdc.signal) + //SIGILL (defined in core.stdc.signal) + //SIGINT (defined in core.stdc.signal) + //SIGSEGV (defined in core.stdc.signal) + //SIGTERM (defined in core.stdc.signal) //SA_NOCLDSTOP (CX|XSI) @@ -606,8 +606,8 @@ version( linux ) const MINSIGSTKSZ = 2048; const SIGSTKSZ = 8192; - //ucontext_t (defined in stdc.posix.ucontext) - //mcontext_t (defined in stdc.posix.ucontext) + //ucontext_t (defined in core.sys.posix.ucontext) + //mcontext_t (defined in core.sys.posix.ucontext) struct stack_t { @@ -701,7 +701,7 @@ version( linux ) // Timer (TMR) // /* -NOTE: This should actually be defined in stdc.posix.time. +NOTE: This should actually be defined in core.sys.posix.time. It is defined here instead to break a circular import. struct timespec @@ -800,7 +800,8 @@ else version( freebsd ) union _sigev_un { lwpid_t _threadid; - struct _sigev_thread { + struct _sigev_thread + { void function(sigval) _function; void* _attribute; } diff --git a/import/stdc/posix/stdio.d b/import/core/sys/posix/stdio.d similarity index 94% rename from import/stdc/posix/stdio.d rename to import/core/sys/posix/stdio.d index aa55ccf..32e1605 100644 --- a/import/stdc/posix/stdio.d +++ b/import/core/sys/posix/stdio.d @@ -6,16 +6,16 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.stdio; +module core.sys.posix.stdio; -private import stdc.posix.config; -public import stdc.stdio; -public import stdc.posix.sys.types; // for off_t +private import core.sys.posix.config; +public import core.stdc.stdio; +public import core.sys.posix.sys.types; // for off_t extern (C): // -// Required (defined in stdc.stdio) +// Required (defined in core.stdc.stdio) // /* BUFSIZ @@ -201,7 +201,7 @@ version( linux ) // /* P_tmpdir -va_list (defined in stdc.stdarg) +va_list (defined in core.stdc.stdarg) char* tempnam(in char*, in char*); */ diff --git a/import/stdc/posix/stdlib.d b/import/core/sys/posix/stdlib.d similarity index 76% rename from import/stdc/posix/stdlib.d rename to import/core/sys/posix/stdlib.d index e9b0ba2..2e21cc7 100644 --- a/import/stdc/posix/stdlib.d +++ b/import/core/sys/posix/stdlib.d @@ -6,16 +6,16 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.stdlib; +module core.sys.posix.stdlib; -private import stdc.posix.config; -public import stdc.stdlib; -public import stdc.posix.sys.wait; +private import core.sys.posix.config; +public import core.stdc.stdlib; +public import core.sys.posix.sys.wait; extern (C): // -// Required (defined in stdc.stdlib) +// Required (defined in core.stdc.stdlib) // /* EXIT_FAILURE @@ -133,14 +133,14 @@ else version( freebsd ) // 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) +WNOHANG (defined in core.sys.posix.sys.wait) +WUNTRACED (defined in core.sys.posix.sys.wait) +WEXITSTATUS (defined in core.sys.posix.sys.wait) +WIFEXITED (defined in core.sys.posix.sys.wait) +WIFSIGNALED (defined in core.sys.posix.sys.wait) +WIFSTOPPED (defined in core.sys.posix.sys.wait) +WSTOPSIG (defined in core.sys.posix.sys.wait) +WTERMSIG (defined in core.sys.posix.sys.wait) c_long a64l(in char*); double drand48(); @@ -175,14 +175,14 @@ 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) + //WNOHANG (defined in core.sys.posix.sys.wait) + //WUNTRACED (defined in core.sys.posix.sys.wait) + //WEXITSTATUS (defined in core.sys.posix.sys.wait) + //WIFEXITED (defined in core.sys.posix.sys.wait) + //WIFSIGNALED (defined in core.sys.posix.sys.wait) + //WIFSTOPPED (defined in core.sys.posix.sys.wait) + //WSTOPSIG (defined in core.sys.posix.sys.wait) + //WTERMSIG (defined in core.sys.posix.sys.wait) c_long a64l(in char*); double drand48(); @@ -225,14 +225,14 @@ version( linux ) } 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) + //WNOHANG (defined in core.sys.posix.sys.wait) + //WUNTRACED (defined in core.sys.posix.sys.wait) + //WEXITSTATUS (defined in core.sys.posix.sys.wait) + //WIFEXITED (defined in core.sys.posix.sys.wait) + //WIFSIGNALED (defined in core.sys.posix.sys.wait) + //WIFSTOPPED (defined in core.sys.posix.sys.wait) + //WSTOPSIG (defined in core.sys.posix.sys.wait) + //WTERMSIG (defined in core.sys.posix.sys.wait) c_long a64l(in char*); double drand48(); @@ -265,14 +265,14 @@ else version( darwin ) } 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) + //WNOHANG (defined in core.sys.posix.sys.wait) + //WUNTRACED (defined in core.sys.posix.sys.wait) + //WEXITSTATUS (defined in core.sys.posix.sys.wait) + //WIFEXITED (defined in core.sys.posix.sys.wait) + //WIFSIGNALED (defined in core.sys.posix.sys.wait) + //WIFSTOPPED (defined in core.sys.posix.sys.wait) + //WSTOPSIG (defined in core.sys.posix.sys.wait) + //WTERMSIG (defined in core.sys.posix.sys.wait) c_long a64l(in char*); double drand48(); diff --git a/import/stdc/posix/sys/ipc.d b/import/core/sys/posix/sys/ipc.d similarity index 91% rename from import/stdc/posix/sys/ipc.d rename to import/core/sys/posix/sys/ipc.d index 7bb1f96..90419b9 100644 --- a/import/stdc/posix/sys/ipc.d +++ b/import/core/sys/posix/sys/ipc.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.ipc; +module core.sys.posix.sys.ipc; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for uid_t, gid_t, mode_t, key_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for uid_t, gid_t, mode_t, key_t extern (C): diff --git a/import/stdc/posix/sys/mman.d b/import/core/sys/posix/sys/mman.d similarity index 96% rename from import/stdc/posix/sys/mman.d rename to import/core/sys/posix/sys/mman.d index 9c37e75..5bfeaa7 100644 --- a/import/stdc/posix/sys/mman.d +++ b/import/core/sys/posix/sys/mman.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.mman; +module core.sys.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 +private import core.sys.posix.config; +public import core.stdc.stddef; // for size_t +public import core.sys.posix.sys.types; // for off_t, mode_t extern (C): diff --git a/import/stdc/posix/sys/select.d b/import/core/sys/posix/sys/select.d similarity index 91% rename from import/stdc/posix/sys/select.d rename to import/core/sys/posix/sys/select.d index b3ed541..3655371 100644 --- a/import/stdc/posix/sys/select.d +++ b/import/core/sys/posix/sys/select.d @@ -6,13 +6,13 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.select; +module core.sys.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 +private import core.sys.posix.config; +public import core.stdc.time; // for timespec +public import core.sys.posix.sys.time; // for timeval +public import core.sys.posix.sys.types; // for time_t +public import core.sys.posix.signal; // for sigset_t extern (C): @@ -20,7 +20,7 @@ extern (C): // Required // /* -NOTE: This module requires timeval from stdc.posix.sys.time, but timeval +NOTE: This module requires timeval from core.sys.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. diff --git a/import/stdc/posix/sys/shm.d b/import/core/sys/posix/sys/shm.d similarity index 92% rename from import/stdc/posix/sys/shm.d rename to import/core/sys/posix/sys/shm.d index 212c11e..477c8b0 100644 --- a/import/stdc/posix/sys/shm.d +++ b/import/core/sys/posix/sys/shm.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.shm; +module core.sys.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; +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for pid_t, time_t, key_t, size_t +public import core.sys.posix.sys.ipc; extern (C): diff --git a/import/stdc/posix/sys/socket.d b/import/core/sys/posix/sys/socket.d similarity index 98% rename from import/stdc/posix/sys/socket.d rename to import/core/sys/posix/sys/socket.d index 8d72bbd..a93fff9 100644 --- a/import/stdc/posix/sys/socket.d +++ b/import/core/sys/posix/sys/socket.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.socket; +module core.sys.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 +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for ssize_t, size_t +public import core.sys.posix.sys.uio; // for iovec extern (C): @@ -43,7 +43,7 @@ struct msghdr int msg_flags; } -struct iovec {} // from stdc.posix.sys.uio +struct iovec {} // from core.sys.posix.sys.uio struct cmsghdr { diff --git a/import/stdc/posix/sys/stat.d b/import/core/sys/posix/sys/stat.d similarity index 97% rename from import/stdc/posix/sys/stat.d rename to import/core/sys/posix/sys/stat.d index 875a6b4..37404b6 100644 --- a/import/stdc/posix/sys/stat.d +++ b/import/core/sys/posix/sys/stat.d @@ -6,13 +6,13 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.stat; +module core.sys.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 +private import core.sys.posix.config; +private import core.stdc.stdint; +private import core.sys.posix.time; // for timespec +public import core.stdc.stddef; // for size_t +public import core.sys.posix.sys.types; // for off_t, mode_t extern (C): diff --git a/import/stdc/posix/sys/time.d b/import/core/sys/posix/sys/time.d similarity index 90% rename from import/stdc/posix/sys/time.d rename to import/core/sys/posix/sys/time.d index dadd5da..4cf5d15 100644 --- a/import/stdc/posix/sys/time.d +++ b/import/core/sys/posix/sys/time.d @@ -6,11 +6,11 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.time; +module core.sys.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 +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for time_t, suseconds_t +public import core.sys.posix.sys.select; // for fd_set, FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE extern (C): diff --git a/import/stdc/posix/sys/types.d b/import/core/sys/posix/sys/types.d similarity index 94% rename from import/stdc/posix/sys/types.d rename to import/core/sys/posix/sys/types.d index bd4dbd5..7cd6823 100644 --- a/import/stdc/posix/sys/types.d +++ b/import/core/sys/posix/sys/types.d @@ -6,12 +6,12 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.types; +module core.sys.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 +private import core.sys.posix.config; +private import core.stdc.stdint; +public import core.stdc.stddef; // for size_t +public import core.stdc.time; // for clock_t, time_t extern (C): @@ -54,9 +54,9 @@ version( linux ) alias uint mode_t; alias c_ulong nlink_t; alias int pid_t; - //size_t (defined in stdc.stddef) + //size_t (defined in core.stdc.stddef) alias c_long ssize_t; - //time_t (defined in stdc.time) + //time_t (defined in core.stdc.time) alias uint uid_t; } else version( darwin ) @@ -70,9 +70,9 @@ else version( darwin ) alias ushort nlink_t; alias long off_t; alias int pid_t; - //size_t (defined in stdc.stddef) + //size_t (defined in core.stdc.stddef) alias size_t ssize_t; - //time_t (defined in stdc.time) + //time_t (defined in core.stdc.time) alias uint uid_t; } else version( freebsd ) @@ -86,9 +86,9 @@ else version( freebsd ) alias ushort nlink_t; alias long off_t; alias int pid_t; - //size_t (defined in stdc.stddef) + //size_t (defined in core.stdc.stddef) alias size_t ssize_t; - //time_t (defined in stdc.time) + //time_t (defined in core.stdc.time) alias uint uid_t; alias uint fflags_t; } @@ -118,7 +118,7 @@ version( linux ) alias c_ulong fsblkcnt_t; alias c_ulong fsfilcnt_t; } - // clock_t (defined in stdc.time) + // clock_t (defined in core.stdc.time) alias uint id_t; alias int key_t; alias c_long suseconds_t; diff --git a/import/stdc/posix/sys/uio.d b/import/core/sys/posix/sys/uio.d similarity index 81% rename from import/stdc/posix/sys/uio.d rename to import/core/sys/posix/sys/uio.d index 181f073..7f924a5 100644 --- a/import/stdc/posix/sys/uio.d +++ b/import/core/sys/posix/sys/uio.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.uio; +module core.sys.posix.sys.uio; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for ssize_t, size_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for ssize_t, size_t extern (C): @@ -23,8 +23,8 @@ struct iovec size_t iov_len; } -ssize_t // from stdc.posix.sys.types -size_t // from stdc.posix.sys.types +ssize_t // from core.sys.posix.sys.types +size_t // from core.sys.posix.sys.types ssize_t readv(int, in iovec*, int); ssize_t writev(int, in iovec*, int); diff --git a/import/stdc/posix/sys/wait.d b/import/core/sys/posix/sys/wait.d similarity index 93% rename from import/stdc/posix/sys/wait.d rename to import/core/sys/posix/sys/wait.d index b0f8404..7f533cf 100644 --- a/import/stdc/posix/sys/wait.d +++ b/import/core/sys/posix/sys/wait.d @@ -6,12 +6,12 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.sys.wait; +module core.sys.posix.sys.wait; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for id_t, pid_t -public import stdc.posix.signal; // for siginfo_t (XSI) -//public import stdc.posix.resource; // for rusage (XSI) +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for id_t, pid_t +public import core.sys.posix.signal; // for siginfo_t (XSI) +//public import core.sys.posix.resource; // for rusage (XSI) extern (C): diff --git a/import/stdc/posix/termios.d b/import/core/sys/posix/termios.d similarity index 98% rename from import/stdc/posix/termios.d rename to import/core/sys/posix/termios.d index 9d96c06..1c6f2e8 100644 --- a/import/stdc/posix/termios.d +++ b/import/core/sys/posix/termios.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.termios; +module core.sys.posix.termios; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for pid_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for pid_t extern (C): diff --git a/import/stdc/posix/time.d b/import/core/sys/posix/time.d similarity index 93% rename from import/stdc/posix/time.d rename to import/core/sys/posix/time.d index 7d52f1d..4134b05 100644 --- a/import/stdc/posix/time.d +++ b/import/core/sys/posix/time.d @@ -6,17 +6,17 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.time; +module core.sys.posix.time; -private import stdc.posix.config; -public import stdc.time; -public import stdc.posix.sys.types; -public import stdc.posix.signal; // for sigevent +private import core.sys.posix.config; +public import core.stdc.time; +public import core.sys.posix.sys.types; +public import core.sys.posix.signal; // for sigevent extern (C): // -// Required (defined in stdc.time) +// Required (defined in core.stdc.time) // /* char* asctime(in tm*); @@ -45,7 +45,7 @@ else version( freebsd ) // // C Extension (CX) -// (defined in stdc.time) +// (defined in core.stdc.time) // /* char* tzname[]; @@ -80,7 +80,7 @@ CLOCK_MONOTONIC CLOCK_PROCESS_CPUTIME_ID (TMR|CPT) CLOCK_THREAD_CPUTIME_ID (TMR|TCT) -NOTE: timespec must be defined in stdc.posix.signal to break +NOTE: timespec must be defined in core.sys.posix.signal to break a circular import. struct timespec diff --git a/import/stdc/posix/ucontext.d b/import/core/sys/posix/ucontext.d similarity index 96% rename from import/stdc/posix/ucontext.d rename to import/core/sys/posix/ucontext.d index 21e6a6a..82f8725 100644 --- a/import/stdc/posix/ucontext.d +++ b/import/core/sys/posix/ucontext.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.ucontext; +module core.sys.posix.ucontext; -private import stdc.posix.config; -public import stdc.posix.signal; // for sigset_t, stack_t +private import core.sys.posix.config; +public import core.sys.posix.signal; // for sigset_t, stack_t extern (C): diff --git a/import/stdc/posix/unistd.d b/import/core/sys/posix/unistd.d similarity index 98% rename from import/stdc/posix/unistd.d rename to import/core/sys/posix/unistd.d index 107f0d4..a99804e 100644 --- a/import/stdc/posix/unistd.d +++ b/import/core/sys/posix/unistd.d @@ -6,12 +6,12 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.unistd; +module core.sys.posix.unistd; -private import stdc.posix.config; -private import stdc.stddef; -public import stdc.posix.inttypes; // for intptr_t -public import stdc.posix.sys.types; // for size_t, ssize_t, uid_t, gid_t, off_t, pid_t, useconds_t +private import core.sys.posix.config; +private import core.stdc.stddef; +public import core.sys.posix.inttypes; // for intptr_t +public import core.sys.posix.sys.types; // for size_t, ssize_t, uid_t, gid_t, off_t, pid_t, useconds_t extern (C): diff --git a/import/stdc/posix/utime.d b/import/core/sys/posix/utime.d similarity index 86% rename from import/stdc/posix/utime.d rename to import/core/sys/posix/utime.d index 947e0f6..1f60367 100644 --- a/import/stdc/posix/utime.d +++ b/import/core/sys/posix/utime.d @@ -6,10 +6,10 @@ * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ -module stdc.posix.utime; +module core.sys.posix.utime; -private import stdc.posix.config; -public import stdc.posix.sys.types; // for time_t +private import core.sys.posix.config; +public import core.sys.posix.sys.types; // for time_t extern (C): diff --git a/import/sys/windows/windows.d b/import/core/sys/windows/windows.d similarity index 99% rename from import/sys/windows/windows.d rename to import/core/sys/windows/windows.d index 3863064..3d4a847 100644 --- a/import/sys/windows/windows.d +++ b/import/core/sys/windows/windows.d @@ -2,7 +2,7 @@ /* Windows is a registered trademark of Microsoft Corporation in the United States and other countries. */ -module sys.windows.windows; +module core.sys.windows.windows; version (Windows) { diff --git a/import/stdc/tgmath.d b/import/stdc/tgmath.d deleted file mode 100644 index c6a3dc3..0000000 --- a/import/stdc/tgmath.d +++ /dev/null @@ -1,652 +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.tgmath; - -private import stdc.config; -private static import stdc.math; -private static import stdc.complex; - -extern (C): - -version( freebsd ) -{ - alias stdc.math.acos acos; - alias stdc.math.acosf acos; - alias stdc.math.acosl acos; - - alias stdc.complex.cacos acos; - alias stdc.complex.cacosf acos; - alias stdc.complex.cacosl acos; - - alias stdc.math.asin asin; - alias stdc.math.asinf asin; - alias stdc.math.asinl asin; - - alias stdc.complex.casin asin; - alias stdc.complex.casinf asin; - alias stdc.complex.casinl asin; - - alias stdc.math.atan atan; - alias stdc.math.atanf atan; - alias stdc.math.atanl atan; - - alias stdc.complex.catan atan; - alias stdc.complex.catanf atan; - alias stdc.complex.catanl atan; - - alias stdc.math.atan2 atan2; - alias stdc.math.atan2f atan2; - alias stdc.math.atan2l atan2; - - alias stdc.math.cos cos; - alias stdc.math.cosf cos; - alias stdc.math.cosl cos; - - alias stdc.complex.ccos cos; - alias stdc.complex.ccosf cos; - alias stdc.complex.ccosl cos; - - alias stdc.math.sin sin; - alias stdc.math.sinf sin; - alias stdc.math.sinl sin; - - alias stdc.complex.csin csin; - alias stdc.complex.csinf csin; - alias stdc.complex.csinl csin; - - alias stdc.math.tan tan; - alias stdc.math.tanf tan; - alias stdc.math.tanl tan; - - alias stdc.complex.ctan tan; - alias stdc.complex.ctanf tan; - alias stdc.complex.ctanl tan; - - alias stdc.math.acosh acosh; - alias stdc.math.acoshf acosh; - alias stdc.math.acoshl acosh; - - alias stdc.complex.cacosh acosh; - alias stdc.complex.cacoshf acosh; - alias stdc.complex.cacoshl acosh; - - alias stdc.math.asinh asinh; - alias stdc.math.asinhf asinh; - alias stdc.math.asinhl asinh; - - alias stdc.complex.casinh asinh; - alias stdc.complex.casinhf asinh; - alias stdc.complex.casinhl asinh; - - alias stdc.math.atanh atanh; - alias stdc.math.atanhf atanh; - alias stdc.math.atanhl atanh; - - alias stdc.complex.catanh atanh; - alias stdc.complex.catanhf atanh; - alias stdc.complex.catanhl atanh; - - alias stdc.math.cosh cosh; - alias stdc.math.coshf cosh; - alias stdc.math.coshl cosh; - - alias stdc.complex.ccosh cosh; - alias stdc.complex.ccoshf cosh; - alias stdc.complex.ccoshl cosh; - - alias stdc.math.sinh sinh; - alias stdc.math.sinhf sinh; - alias stdc.math.sinhl sinh; - - alias stdc.complex.csinh sinh; - alias stdc.complex.csinhf sinh; - alias stdc.complex.csinhl sinh; - - alias stdc.math.tanh tanh; - alias stdc.math.tanhf tanh; - alias stdc.math.tanhl tanh; - - alias stdc.complex.ctanh tanh; - alias stdc.complex.ctanhf tanh; - alias stdc.complex.ctanhl tanh; - - alias stdc.math.exp exp; - alias stdc.math.expf exp; - alias stdc.math.expl exp; - - alias stdc.complex.cexp exp; - alias stdc.complex.cexpf exp; - alias stdc.complex.cexpl exp; - - alias stdc.math.exp2 exp2; - alias stdc.math.exp2f exp2; - alias stdc.math.exp2l exp2; - - alias stdc.math.expm1 expm1; - alias stdc.math.expm1f expm1; - alias stdc.math.expm1l expm1; - - alias stdc.math.frexp frexp; - alias stdc.math.frexpf frexp; - alias stdc.math.frexpl frexp; - - alias stdc.math.ilogb ilogb; - alias stdc.math.ilogbf ilogb; - alias stdc.math.ilogbl ilogb; - - alias stdc.math.ldexp ldexp; - alias stdc.math.ldexpf ldexp; - alias stdc.math.ldexpl ldexp; - - alias stdc.math.log log; - alias stdc.math.logf log; - alias stdc.math.logl log; - - alias stdc.complex.clog log; - alias stdc.complex.clogf log; - alias stdc.complex.clogl log; - - alias stdc.math.log10 log10; - alias stdc.math.log10f log10; - alias stdc.math.log10l log10; - - alias stdc.math.log1p log1p; - alias stdc.math.log1pf log1p; - alias stdc.math.log1pl log1p; - - alias stdc.math.log2 log1p; - alias stdc.math.log2f log1p; - alias stdc.math.log2l log1p; - - alias stdc.math.logb log1p; - alias stdc.math.logbf log1p; - alias stdc.math.logbl log1p; - - alias stdc.math.modf modf; - alias stdc.math.modff modf; -// alias stdc.math.modfl modf; - - alias stdc.math.scalbn scalbn; - alias stdc.math.scalbnf scalbn; - alias stdc.math.scalbnl scalbn; - - alias stdc.math.scalbln scalbln; - alias stdc.math.scalblnf scalbln; - alias stdc.math.scalblnl scalbln; - - alias stdc.math.cbrt cbrt; - alias stdc.math.cbrtf cbrt; - alias stdc.math.cbrtl cbrt; - - alias stdc.math.fabs fabs; - alias stdc.math.fabsf fabs; - alias stdc.math.fabsl fabs; - - alias stdc.complex.cabs fabs; - alias stdc.complex.cabsf fabs; - alias stdc.complex.cabsl fabs; - - alias stdc.math.hypot hypot; - alias stdc.math.hypotf hypot; - alias stdc.math.hypotl hypot; - - alias stdc.math.pow pow; - alias stdc.math.powf pow; - alias stdc.math.powl pow; - - alias stdc.complex.cpow pow; - alias stdc.complex.cpowf pow; - alias stdc.complex.cpowl pow; - - alias stdc.math.sqrt sqrt; - alias stdc.math.sqrtf sqrt; - alias stdc.math.sqrtl sqrt; - - alias stdc.complex.csqrt sqrt; - alias stdc.complex.csqrtf sqrt; - alias stdc.complex.csqrtl sqrt; - - alias stdc.math.erf erf; - alias stdc.math.erff erf; - alias stdc.math.erfl erf; - - alias stdc.math.erfc erfc; - alias stdc.math.erfcf erfc; - alias stdc.math.erfcl erfc; - - alias stdc.math.lgamma lgamma; - alias stdc.math.lgammaf lgamma; - alias stdc.math.lgammal lgamma; - - alias stdc.math.tgamma tgamma; - alias stdc.math.tgammaf tgamma; - alias stdc.math.tgammal tgamma; - - alias stdc.math.ceil ceil; - alias stdc.math.ceilf ceil; - alias stdc.math.ceill ceil; - - alias stdc.math.floor floor; - alias stdc.math.floorf floor; - alias stdc.math.floorl floor; - - alias stdc.math.nearbyint nearbyint; - alias stdc.math.nearbyintf nearbyint; - alias stdc.math.nearbyintl nearbyint; - - alias stdc.math.rint rint; - alias stdc.math.rintf rint; - alias stdc.math.rintl rint; - - alias stdc.math.lrint lrint; - alias stdc.math.lrintf lrint; - alias stdc.math.lrintl lrint; - - alias stdc.math.llrint llrint; - alias stdc.math.llrintf llrint; - alias stdc.math.llrintl llrint; - - alias stdc.math.round round; - alias stdc.math.roundf round; - alias stdc.math.roundl round; - - alias stdc.math.lround lround; - alias stdc.math.lroundf lround; - alias stdc.math.lroundl lround; - - alias stdc.math.llround llround; - alias stdc.math.llroundf llround; - alias stdc.math.llroundl llround; - - alias stdc.math.trunc trunc; - alias stdc.math.truncf trunc; - alias stdc.math.truncl trunc; - - alias stdc.math.fmod fmod; - alias stdc.math.fmodf fmod; - alias stdc.math.fmodl fmod; - - alias stdc.math.remainder remainder; - alias stdc.math.remainderf remainder; - alias stdc.math.remainderl remainder; - - alias stdc.math.remquo remquo; - alias stdc.math.remquof remquo; - alias stdc.math.remquol remquo; - - alias stdc.math.copysign copysign; - alias stdc.math.copysignf copysign; - alias stdc.math.copysignl copysign; - -// alias stdc.math.nan nan; -// alias stdc.math.nanf nan; -// alias stdc.math.nanl nan; - - alias stdc.math.nextafter nextafter; - alias stdc.math.nextafterf nextafter; - alias stdc.math.nextafterl nextafter; - - alias stdc.math.nexttoward nexttoward; - alias stdc.math.nexttowardf nexttoward; - alias stdc.math.nexttowardl nexttoward; - - alias stdc.math.fdim fdim; - alias stdc.math.fdimf fdim; - alias stdc.math.fdiml fdim; - - alias stdc.math.fmax fmax; - alias stdc.math.fmaxf fmax; - alias stdc.math.fmaxl fmax; - - alias stdc.math.fmin fmin; - alias stdc.math.fmin fmin; - alias stdc.math.fminl fmin; - - alias stdc.math.fma fma; - alias stdc.math.fmaf fma; - alias stdc.math.fmal fma; - - alias stdc.complex.carg carg; - alias stdc.complex.cargf carg; - alias stdc.complex.cargl carg; - - alias stdc.complex.cimag cimag; - alias stdc.complex.cimagf cimag; - alias stdc.complex.cimagl cimag; - - alias stdc.complex.conj conj; - alias stdc.complex.conjf conj; - alias stdc.complex.conjl conj; - - alias stdc.complex.cproj cproj; - alias stdc.complex.cprojf cproj; - alias stdc.complex.cprojl cproj; - -// alias stdc.complex.creal creal; -// alias stdc.complex.crealf creal; -// alias stdc.complex.creall creal; -} -else -{ - alias stdc.math.acos acos; - alias stdc.math.acosf acos; - alias stdc.math.acosl acos; - - alias stdc.complex.cacos acos; - alias stdc.complex.cacosf acos; - alias stdc.complex.cacosl acos; - - alias stdc.math.asin asin; - alias stdc.math.asinf asin; - alias stdc.math.asinl asin; - - alias stdc.complex.casin asin; - alias stdc.complex.casinf asin; - alias stdc.complex.casinl asin; - - alias stdc.math.atan atan; - alias stdc.math.atanf atan; - alias stdc.math.atanl atan; - - alias stdc.complex.catan atan; - alias stdc.complex.catanf atan; - alias stdc.complex.catanl atan; - - alias stdc.math.atan2 atan2; - alias stdc.math.atan2f atan2; - alias stdc.math.atan2l atan2; - - alias stdc.math.cos cos; - alias stdc.math.cosf cos; - alias stdc.math.cosl cos; - - alias stdc.complex.ccos cos; - alias stdc.complex.ccosf cos; - alias stdc.complex.ccosl cos; - - alias stdc.math.sin sin; - alias stdc.math.sinf sin; - alias stdc.math.sinl sin; - - alias stdc.complex.csin csin; - alias stdc.complex.csinf csin; - alias stdc.complex.csinl csin; - - alias stdc.math.tan tan; - alias stdc.math.tanf tan; - alias stdc.math.tanl tan; - - alias stdc.complex.ctan tan; - alias stdc.complex.ctanf tan; - alias stdc.complex.ctanl tan; - - alias stdc.math.acosh acosh; - alias stdc.math.acoshf acosh; - alias stdc.math.acoshl acosh; - - alias stdc.complex.cacosh acosh; - alias stdc.complex.cacoshf acosh; - alias stdc.complex.cacoshl acosh; - - alias stdc.math.asinh asinh; - alias stdc.math.asinhf asinh; - alias stdc.math.asinhl asinh; - - alias stdc.complex.casinh asinh; - alias stdc.complex.casinhf asinh; - alias stdc.complex.casinhl asinh; - - alias stdc.math.atanh atanh; - alias stdc.math.atanhf atanh; - alias stdc.math.atanhl atanh; - - alias stdc.complex.catanh atanh; - alias stdc.complex.catanhf atanh; - alias stdc.complex.catanhl atanh; - - alias stdc.math.cosh cosh; - alias stdc.math.coshf cosh; - alias stdc.math.coshl cosh; - - alias stdc.complex.ccosh cosh; - alias stdc.complex.ccoshf cosh; - alias stdc.complex.ccoshl cosh; - - alias stdc.math.sinh sinh; - alias stdc.math.sinhf sinh; - alias stdc.math.sinhl sinh; - - alias stdc.complex.csinh sinh; - alias stdc.complex.csinhf sinh; - alias stdc.complex.csinhl sinh; - - alias stdc.math.tanh tanh; - alias stdc.math.tanhf tanh; - alias stdc.math.tanhl tanh; - - alias stdc.complex.ctanh tanh; - alias stdc.complex.ctanhf tanh; - alias stdc.complex.ctanhl tanh; - - alias stdc.math.exp exp; - alias stdc.math.expf exp; - alias stdc.math.expl exp; - - alias stdc.complex.cexp exp; - alias stdc.complex.cexpf exp; - alias stdc.complex.cexpl exp; - - alias stdc.math.exp2 exp2; - alias stdc.math.exp2f exp2; - alias stdc.math.exp2l exp2; - - alias stdc.math.expm1 expm1; - alias stdc.math.expm1f expm1; - alias stdc.math.expm1l expm1; - - alias stdc.math.frexp frexp; - alias stdc.math.frexpf frexp; - alias stdc.math.frexpl frexp; - - alias stdc.math.ilogb ilogb; - alias stdc.math.ilogbf ilogb; - alias stdc.math.ilogbl ilogb; - - alias stdc.math.ldexp ldexp; - alias stdc.math.ldexpf ldexp; - alias stdc.math.ldexpl ldexp; - - alias stdc.math.log log; - alias stdc.math.logf log; - alias stdc.math.logl log; - - alias stdc.complex.clog log; - alias stdc.complex.clogf log; - alias stdc.complex.clogl log; - - alias stdc.math.log10 log10; - alias stdc.math.log10f log10; - alias stdc.math.log10l log10; - - alias stdc.math.log1p log1p; - alias stdc.math.log1pf log1p; - alias stdc.math.log1pl log1p; - - alias stdc.math.log2 log1p; - alias stdc.math.log2f log1p; - alias stdc.math.log2l log1p; - - alias stdc.math.logb log1p; - alias stdc.math.logbf log1p; - alias stdc.math.logbl log1p; - - alias stdc.math.modf modf; - alias stdc.math.modff modf; - alias stdc.math.modfl modf; - - alias stdc.math.scalbn scalbn; - alias stdc.math.scalbnf scalbn; - alias stdc.math.scalbnl scalbn; - - alias stdc.math.scalbln scalbln; - alias stdc.math.scalblnf scalbln; - alias stdc.math.scalblnl scalbln; - - alias stdc.math.cbrt cbrt; - alias stdc.math.cbrtf cbrt; - alias stdc.math.cbrtl cbrt; - - alias stdc.math.fabs fabs; - alias stdc.math.fabsf fabs; - alias stdc.math.fabsl fabs; - - alias stdc.complex.cabs fabs; - alias stdc.complex.cabsf fabs; - alias stdc.complex.cabsl fabs; - - alias stdc.math.hypot hypot; - alias stdc.math.hypotf hypot; - alias stdc.math.hypotl hypot; - - alias stdc.math.pow pow; - alias stdc.math.powf pow; - alias stdc.math.powl pow; - - alias stdc.complex.cpow pow; - alias stdc.complex.cpowf pow; - alias stdc.complex.cpowl pow; - - alias stdc.math.sqrt sqrt; - alias stdc.math.sqrtf sqrt; - alias stdc.math.sqrtl sqrt; - - alias stdc.complex.csqrt sqrt; - alias stdc.complex.csqrtf sqrt; - alias stdc.complex.csqrtl sqrt; - - alias stdc.math.erf erf; - alias stdc.math.erff erf; - alias stdc.math.erfl erf; - - alias stdc.math.erfc erfc; - alias stdc.math.erfcf erfc; - alias stdc.math.erfcl erfc; - - alias stdc.math.lgamma lgamma; - alias stdc.math.lgammaf lgamma; - alias stdc.math.lgammal lgamma; - - alias stdc.math.tgamma tgamma; - alias stdc.math.tgammaf tgamma; - alias stdc.math.tgammal tgamma; - - alias stdc.math.ceil ceil; - alias stdc.math.ceilf ceil; - alias stdc.math.ceill ceil; - - alias stdc.math.floor floor; - alias stdc.math.floorf floor; - alias stdc.math.floorl floor; - - alias stdc.math.nearbyint nearbyint; - alias stdc.math.nearbyintf nearbyint; - alias stdc.math.nearbyintl nearbyint; - - alias stdc.math.rint rint; - alias stdc.math.rintf rint; - alias stdc.math.rintl rint; - - alias stdc.math.lrint lrint; - alias stdc.math.lrintf lrint; - alias stdc.math.lrintl lrint; - - alias stdc.math.llrint llrint; - alias stdc.math.llrintf llrint; - alias stdc.math.llrintl llrint; - - alias stdc.math.round round; - alias stdc.math.roundf round; - alias stdc.math.roundl round; - - alias stdc.math.lround lround; - alias stdc.math.lroundf lround; - alias stdc.math.lroundl lround; - - alias stdc.math.llround llround; - alias stdc.math.llroundf llround; - alias stdc.math.llroundl llround; - - alias stdc.math.trunc trunc; - alias stdc.math.truncf trunc; - alias stdc.math.truncl trunc; - - alias stdc.math.fmod fmod; - alias stdc.math.fmodf fmod; - alias stdc.math.fmodl fmod; - - alias stdc.math.remainder remainder; - alias stdc.math.remainderf remainder; - alias stdc.math.remainderl remainder; - - alias stdc.math.remquo remquo; - alias stdc.math.remquof remquo; - alias stdc.math.remquol remquo; - - alias stdc.math.copysign copysign; - alias stdc.math.copysignf copysign; - alias stdc.math.copysignl copysign; - - alias stdc.math.nan nan; - alias stdc.math.nanf nan; - alias stdc.math.nanl nan; - - alias stdc.math.nextafter nextafter; - alias stdc.math.nextafterf nextafter; - alias stdc.math.nextafterl nextafter; - - alias stdc.math.nexttoward nexttoward; - alias stdc.math.nexttowardf nexttoward; - alias stdc.math.nexttowardl nexttoward; - - alias stdc.math.fdim fdim; - alias stdc.math.fdimf fdim; - alias stdc.math.fdiml fdim; - - alias stdc.math.fmax fmax; - alias stdc.math.fmaxf fmax; - alias stdc.math.fmaxl fmax; - - alias stdc.math.fmin fmin; - alias stdc.math.fmin fmin; - alias stdc.math.fminl fmin; - - alias stdc.math.fma fma; - alias stdc.math.fmaf fma; - alias stdc.math.fmal fma; - - alias stdc.complex.carg carg; - alias stdc.complex.cargf carg; - alias stdc.complex.cargl carg; - - alias stdc.complex.cimag cimag; - alias stdc.complex.cimagf cimag; - alias stdc.complex.cimagl cimag; - - alias stdc.complex.conj conj; - alias stdc.complex.conjf conj; - alias stdc.complex.conjl conj; - - alias stdc.complex.cproj cproj; - alias stdc.complex.cprojf cproj; - alias stdc.complex.cprojl cproj; - -// alias stdc.complex.creal creal; -// alias stdc.complex.crealf creal; -// alias stdc.complex.creall creal; -} diff --git a/src/common/core/memory.d b/src/common/core/memory.d index 1770dfb..65c35c8 100644 --- a/src/common/core/memory.d +++ b/src/common/core/memory.d @@ -47,10 +47,6 @@ private 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(); } @@ -445,40 +441,4 @@ struct GC { gc_removeRange( p ); } - - /** - * Get handle to the collector. - * The only thing that can be done with this handle is pass it to - * setHandle(). getHandle/setHandle/endHandle work together so that - * if there are multiple instances of the gc running, only one instance - * can be set to run. - * The most common case of this is under Windows where a D application - * calls functions in a DLL that is implemented in D. - */ - - static void* getHandle() - { - return gc_getHandle(); - } - - /** - * Set handle to the collector. - * The handle p is an opaque handle, acquired by a call to - * getHandle(). - */ - - static void setHandle(void* p) - { - gc_setHandle(p); - } - - /** - * Call when done using the collector specified by the - * call to setHandle(). - */ - - static void endHandle() - { - gc_endHandle(); - } } diff --git a/src/common/core/runtime.d b/src/common/core/runtime.d index 76a9438..36607be 100644 --- a/src/common/core/runtime.d +++ b/src/common/core/runtime.d @@ -22,6 +22,9 @@ private alias void delegate( Exception ) ExceptionHandler; extern (C) bool rt_init( ExceptionHandler dg = null ); extern (C) bool rt_term( ExceptionHandler dg = null ); + + extern (C) void* rt_loadLibrary( in char[] name ); + extern (C) void rt_unloadLibrary( void* ptr ); } @@ -88,6 +91,37 @@ struct Runtime } + /** + * Locates a dynamic library with the supplied library name and dynamically + * loads it into the caller's address space. If the library contains a D + * runtime it will be integrated with the current runtime. + * + * Params: + * name = The name of the dynamic library to load. + * + * Returns: + * A reference to the library or null on error. + */ + static void* loadLibrary( in char[] name ) + { + return rt_loadLibrary( name ); + } + + + /** + * Unloads the dynamic library referenced by p. If this library contains a + * D runtime then any necessary finalization or cleanup of that runtime + * will be performed. + * + * Params: + * p = A reference to the library to unload. + */ + static void unloadLibrary( void* p ) + { + rt_unloadLibrary( p ); + } + + /** * Overrides the default trace mechanism with s user-supplied version. A * trace represents the context from which an exception was thrown, and the diff --git a/src/common/core/stdc/errno.c b/src/common/core/stdc/errno.c new file mode 100644 index 0000000..10ca015 --- /dev/null +++ b/src/common/core/stdc/errno.c @@ -0,0 +1,21 @@ +/** + * This file contains wrapper functions for macro-defined C rouines. + * + * Copyright: Copyright (c) 2005-2008, The D Runtime Project + * License: BSD Style, see LICENSE + * Authors: Sean Kelly + */ +#include + + +int getErrno() +{ + return errno; +} + + +int setErrno( int val ) +{ + errno = val; + return val; +} diff --git a/src/common/core/thread.d b/src/common/core/thread.d index 65b8df9..ef8984b 100644 --- a/src/common/core/thread.d +++ b/src/common/core/thread.d @@ -84,8 +84,8 @@ version( Windows ) { private { - import stdc.stdint : uintptr_t; // for _beginthreadex decl below - import sys.windows.windows; + import core.stdc.stdint : uintptr_t; // for _beginthreadex decl below + import core.sys.windows.windows; const DWORD TLS_OUT_OF_INDEXES = 0xFFFFFFFF; @@ -151,13 +151,14 @@ else version( Posix ) { private { - import stdc.posix.semaphore; - import stdc.posix.pthread; - import stdc.posix.signal; - import stdc.posix.time; - import stdc.errno; + import core.sys.posix.semaphore; + import core.sys.posix.pthread; + import core.sys.posix.signal; + import core.sys.posix.time; + import core.stdc.errno; extern (C) int getErrno(); + version( GNU ) { import gcc.builtins; @@ -2256,9 +2257,9 @@ private version( Posix ) { - import stdc.posix.unistd; // for sysconf - import stdc.posix.sys.mman; // for mmap - import stdc.posix.stdlib; // for malloc, valloc, free + import core.sys.posix.unistd; // for sysconf + import core.sys.posix.sys.mman; // for mmap + import core.sys.posix.stdlib; // for malloc, valloc, free version( AsmX86_Win32 ) {} else version( AsmX86_Posix ) {} else @@ -2270,7 +2271,7 @@ private // a version identifier. Please note that this is considered // an obsolescent feature according to the POSIX spec, so a // custom solution is still preferred. - import stdc.posix.ucontext; + import core.sys.posix.ucontext; } } diff --git a/src/common/posix.mak b/src/common/posix.mak index c630d4d..edc5c99 100644 --- a/src/common/posix.mak +++ b/src/common/posix.mak @@ -76,7 +76,7 @@ OBJ_CORE= \ core/thread.o OBJ_STDC= \ - stdc/errno.o + core/stdc/errno.o ALL_OBJS= \ $(OBJ_CORE) \ diff --git a/src/common/win32.mak b/src/common/win32.mak index fefcb93..7e23e7a 100644 --- a/src/common/win32.mak +++ b/src/common/win32.mak @@ -73,7 +73,7 @@ OBJ_CORE= \ core\thread.obj OBJ_STDC= \ - stdc\errno.obj + core\stdc\errno.obj ALL_OBJS= \ $(OBJ_CORE) \ diff --git a/src/compiler/dmd/aaA.d b/src/compiler/dmd/aaA.d index 6d7ecf9..d5f84e7 100644 --- a/src/compiler/dmd/aaA.d +++ b/src/compiler/dmd/aaA.d @@ -35,8 +35,8 @@ module rt.aaA; private { - import stdc.stdarg; - import stdc.string; + import core.stdc.stdarg; + import core.stdc.string; enum BlkAttr : uint { diff --git a/src/compiler/dmd/adi.d b/src/compiler/dmd/adi.d index 11d3ab4..0253bc0 100644 --- a/src/compiler/dmd/adi.d +++ b/src/compiler/dmd/adi.d @@ -38,9 +38,9 @@ module rt.adi; private { - debug(adi) import stdc.stdio; - import stdc.string; - import stdc.stdlib; + debug(adi) import core.stdc.stdio; + import core.stdc.string; + import core.stdc.stdlib; import util.utf; enum BlkAttr : uint diff --git a/src/compiler/dmd/arrayassign.d b/src/compiler/dmd/arrayassign.d index d85af7e..4d9214c 100644 --- a/src/compiler/dmd/arrayassign.d +++ b/src/compiler/dmd/arrayassign.d @@ -9,9 +9,9 @@ module rt.arrayassign; private { import util.string; - import stdc.string; - import stdc.stdlib; - debug(PRINTF) import stdc.stdio; + import core.stdc.string; + import core.stdc.stdlib; + debug(PRINTF) import core.stdc.stdio; } /** diff --git a/src/compiler/dmd/arraycat.d b/src/compiler/dmd/arraycat.d index f68c72b..acf9f86 100644 --- a/src/compiler/dmd/arraycat.d +++ b/src/compiler/dmd/arraycat.d @@ -33,8 +33,8 @@ module rt.arraycat; private { - import stdc.string; - debug import stdc.stdio; + import core.stdc.string; + debug import core.stdc.stdio; } extern (C): diff --git a/src/compiler/dmd/cmath2.d b/src/compiler/dmd/cmath2.d index 5028fe9..3475a17 100644 --- a/src/compiler/dmd/cmath2.d +++ b/src/compiler/dmd/cmath2.d @@ -12,7 +12,7 @@ module rt.cmath2; -private import stdc.math; +private import core.stdc.math; extern (C): diff --git a/src/compiler/dmd/cover.d b/src/compiler/dmd/cover.d index 111f3bf..2fc1cab 100644 --- a/src/compiler/dmd/cover.d +++ b/src/compiler/dmd/cover.d @@ -17,14 +17,14 @@ module rt.cover; private { version( Windows ) - import sys.windows.windows; + import core.sys.windows.windows; else version( Posix ) { - import stdc.posix.fcntl; - import stdc.posix.unistd; + import core.sys.posix.fcntl; + import core.sys.posix.unistd; } import core.bitmanip; - import stdc.stdio; + import core.stdc.stdio; import util.utf; struct BitArray diff --git a/src/compiler/dmd/dmain2.d b/src/compiler/dmd/dmain2.d index 14b6950..1991bd9 100644 --- a/src/compiler/dmd/dmain2.d +++ b/src/compiler/dmd/dmain2.d @@ -13,18 +13,22 @@ module rt.dmain2; private { import util.console; - import stdc.stddef; - import stdc.stdlib; - import stdc.string; + import core.stdc.stddef; + import core.stdc.stdlib; + import core.stdc.string; } -version(Windows) +version (Windows) { + extern (Windows) alias int function() FARPROC; + extern (Windows) FARPROC GetProcAddress(void*, in char*); + extern (Windows) void* LoadLibraryA(in char*); + extern (Windows) int FreeLibrary(void*); extern (Windows) void* LocalFree(void*); extern (Windows) wchar_t* GetCommandLineW(); extern (Windows) wchar_t** CommandLineToArgvW(wchar_t*, int*); extern (Windows) export int WideCharToMultiByte(uint, uint, wchar_t*, int, char*, int, char*, int); - pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW + pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW } extern (C) void _STI_monitor_staticctor(); @@ -38,6 +42,68 @@ extern (C) void _moduleCtor(); extern (C) void _moduleDtor(); extern (C) void thread_joinAll(); +/*********************************** + * These are a temporary means of providing a GC hook for DLL use. They may be + * replaced with some other similar functionality later. + */ +extern (C) +{ + void* gc_getHandle(); + void gc_setHandle(void* p); + void gc_clrHandle(); + + alias void* function() gcGetFn; + alias void function(void*) gcSetFn; + alias void function() gcClrFn; + alias bool function(ExceptionHandler dg = null) rtInitFn; + alias bool function(ExceptionHandler dg = null) rtTermFn; +} + +extern (C) void* rt_loadLibrary(in char[] name) +{ + version (Windows) + { + char[260] temp = void; + temp[0 .. name.length] = name[]; + temp[name.length] = cast(char) 0; + void* ptr = LoadLibraryA(temp.ptr); + if (ptr is null) + return ptr; + gcSetFn gcSet = cast(gcSetFn) GetProcAddress(ptr, "_gc_setHandle"); + rtInitFn rtInit = cast(rtInitFn) GetProcAddress(ptr, "_rt_init"); + if (gcSet is null || rtInit is null) + return ptr; + gcSet(gc_getHandle()); + rtInit(); + return ptr; + + } + else version (linux) + { + throw new Exception("rt_loadLibrary not yet implemented on linux."); + } +} + +extern (C) void rt_unloadLibrary(void* ptr) +{ + version (Windows) + { + gcClrFn gcClr = cast(gcClrFn) GetProcAddress(ptr, "_gc_clrHandle"); + rtTermFn rtTerm = cast(rtTermFn) GetProcAddress(ptr, "_rt_term"); + + if (gcClr !is null && rtTerm !is null) + { + rtTerm(); + gcClr(); + } + return FreeLibrary(ptr) != 0; + } + else version (linux) + { + throw new Exception("rt_unloadLibrary not yet implemented on linux."); + } +} + /*********************************** * These functions must be defined for any D program linked * against this library. diff --git a/src/compiler/dmd/lifetime.d b/src/compiler/dmd/lifetime.d index adb9f2a..2b77809 100644 --- a/src/compiler/dmd/lifetime.d +++ b/src/compiler/dmd/lifetime.d @@ -29,10 +29,10 @@ module rt.lifetime; private { - import stdc.stdlib; - import stdc.string; - import stdc.stdarg; - debug(PRINTF) import stdc.stdio; + import core.stdc.stdlib; + import core.stdc.string; + import core.stdc.stdarg; + debug(PRINTF) import core.stdc.stdio; } diff --git a/src/compiler/dmd/memory.d b/src/compiler/dmd/memory.d index 4f7188b..5f09d7e 100644 --- a/src/compiler/dmd/memory.d +++ b/src/compiler/dmd/memory.d @@ -180,5 +180,3 @@ extern (C) void* rt_staticDataTop() static assert( false, "Operating system not supported." ); } } - - diff --git a/src/compiler/dmd/object_.d b/src/compiler/dmd/object_.d index 352e995..7341118 100644 --- a/src/compiler/dmd/object_.d +++ b/src/compiler/dmd/object_.d @@ -39,10 +39,10 @@ module object; private { - import stdc.string; - import stdc.stdlib; + import core.stdc.string; + import core.stdc.stdlib; import util.string; - debug(PRINTF) import stdc.stdio; + debug(PRINTF) import core.stdc.stdio; extern (C) void onOutOfMemoryError(); extern (C) Object _d_newclass(ClassInfo ci); diff --git a/src/compiler/dmd/qsort2.d b/src/compiler/dmd/qsort2.d index 562e1fa..e76885a 100644 --- a/src/compiler/dmd/qsort2.d +++ b/src/compiler/dmd/qsort2.d @@ -17,7 +17,7 @@ module rt.qsort2; //debug=qsort; -private import stdc.stdlib; +private import core.stdc.stdlib; struct Array { diff --git a/src/compiler/dmd/switch_.d b/src/compiler/dmd/switch_.d index ebb7373..ae69d91 100644 --- a/src/compiler/dmd/switch_.d +++ b/src/compiler/dmd/switch_.d @@ -27,7 +27,7 @@ module rt.switch_; -private import stdc.string; +private import core.stdc.string; /****************************************************** * Support for switch statements switching on strings. diff --git a/src/compiler/dmd/trace.d b/src/compiler/dmd/trace.d index e399d3f..55fb5b9 100644 --- a/src/compiler/dmd/trace.d +++ b/src/compiler/dmd/trace.d @@ -16,10 +16,10 @@ module rt.trace; private { import util.string; - import stdc.ctype; - import stdc.stdio; - import stdc.string; - import stdc.stdlib; + import core.stdc.ctype; + import core.stdc.stdio; + import core.stdc.string; + import core.stdc.stdlib; } extern (C): diff --git a/src/compiler/dmd/typeinfo/ti_Ag.d b/src/compiler/dmd/typeinfo/ti_Ag.d index 9b935d3..c7f3cba 100644 --- a/src/compiler/dmd/typeinfo/ti_Ag.d +++ b/src/compiler/dmd/typeinfo/ti_Ag.d @@ -2,7 +2,7 @@ module rt.typeinfo.ti_Ag; private import util.string; -private import stdc.string; +private import core.stdc.string; // byte[] diff --git a/src/compiler/dmd/typeinfo/ti_Aint.d b/src/compiler/dmd/typeinfo/ti_Aint.d index 9eecc17..67c1f6b 100644 --- a/src/compiler/dmd/typeinfo/ti_Aint.d +++ b/src/compiler/dmd/typeinfo/ti_Aint.d @@ -1,7 +1,7 @@ module rt.typeinfo.ti_Aint; -private import stdc.string; +private import core.stdc.string; // int[] diff --git a/src/compiler/dmd/typeinfo/ti_Along.d b/src/compiler/dmd/typeinfo/ti_Along.d index 2263e92..7415df9 100644 --- a/src/compiler/dmd/typeinfo/ti_Along.d +++ b/src/compiler/dmd/typeinfo/ti_Along.d @@ -1,7 +1,7 @@ module rt.typeinfo.ti_Along; -private import stdc.string; +private import core.stdc.string; // long[] diff --git a/src/compiler/dmd/typeinfo/ti_Ashort.d b/src/compiler/dmd/typeinfo/ti_Ashort.d index 12c9f56..00b377c 100644 --- a/src/compiler/dmd/typeinfo/ti_Ashort.d +++ b/src/compiler/dmd/typeinfo/ti_Ashort.d @@ -1,7 +1,7 @@ module rt.typeinfo.ti_Ashort; -private import stdc.string; +private import core.stdc.string; // short[] diff --git a/src/compiler/dmd/util/console.d b/src/compiler/dmd/util/console.d index 93d7fdf..62991bd 100644 --- a/src/compiler/dmd/util/console.d +++ b/src/compiler/dmd/util/console.d @@ -12,11 +12,11 @@ private { version (Windows) { - import sys.windows.windows; + import core.sys.windows.windows; } else version( Posix ) { - import stdc.posix.unistd; + import core.sys.posix.unistd; } import util.string; } diff --git a/src/compiler/dmd/util/cpuid.d b/src/compiler/dmd/util/cpuid.d index cbc5a3e..da11f9e 100644 --- a/src/compiler/dmd/util/cpuid.d +++ b/src/compiler/dmd/util/cpuid.d @@ -40,7 +40,7 @@ COPYRIGHT: Public Domain module rt.util.cpuid; -private import stdc.string; +private import core.stdc.string; version(D_InlineAsm_X86) { diff --git a/src/compiler/dmd/util/string.d b/src/compiler/dmd/util/string.d index 5f49fe6..3496bdd 100644 --- a/src/compiler/dmd/util/string.d +++ b/src/compiler/dmd/util/string.d @@ -8,7 +8,7 @@ */ module rt.util.string; -private import stdc.string; +private import core.stdc.string; char[] intToString( char[] buf, uint val ) { diff --git a/src/gc/basic/gc.d b/src/gc/basic/gc.d index a6a4611..3f8a642 100644 --- a/src/gc/basic/gc.d +++ b/src/gc/basic/gc.d @@ -28,7 +28,7 @@ module gc.gc; private import gcx; private import gcstats; -private import stdc.stdlib; +private import core.stdc.stdlib; version=GCCLASS; diff --git a/src/gc/basic/gcalloc.d b/src/gc/basic/gcalloc.d index 62d5d47..fd93c66 100644 --- a/src/gc/basic/gcalloc.d +++ b/src/gc/basic/gcalloc.d @@ -29,7 +29,7 @@ module gc.gcalloc; version (Windows) { - private import sys.windows.windows; + private import core.sys.windows.windows; alias int pthread_t; @@ -42,14 +42,14 @@ version (Windows) } else version (Posix) { - private import stdc.posix.sys.mman; - private import stdc.stdlib; + private import core.sys.posix.sys.mman; + private import core.stdc.stdlib; //version = GC_Use_Alloc_MMap; } else { - private import stdc.stdlib; + private import core.stdc.stdlib; //version = GC_Use_Alloc_Malloc; } diff --git a/src/gc/basic/gcbits.d b/src/gc/basic/gcbits.d index b6cc1fb..a84dc9c 100644 --- a/src/gc/basic/gcbits.d +++ b/src/gc/basic/gcbits.d @@ -30,8 +30,8 @@ module gc.gcbits; private { import core.bitmanip; - import stdc.string; - import stdc.stdlib; + import core.stdc.string; + import core.stdc.stdlib; extern (C) void onOutOfMemoryError(); } diff --git a/src/gc/basic/gcx.d b/src/gc/basic/gcx.d index c4a46c9..0b6d1d0 100644 --- a/src/gc/basic/gcx.d +++ b/src/gc/basic/gcx.d @@ -52,10 +52,10 @@ private import gcbits; private import gcstats; private import gcalloc; -private import cstdlib = stdc.stdlib : calloc, free, malloc, realloc; -private import stdc.string; +private import cstdlib = core.stdc.stdlib : calloc, free, malloc, realloc; +private import core.stdc.string; -debug private import stdc.stdio; +debug private import core.stdc.stdio; version (GNU) { diff --git a/src/gc/stub/gc.d b/src/gc/stub/gc.d index db95b09..dd805ef 100644 --- a/src/gc/stub/gc.d +++ b/src/gc/stub/gc.d @@ -20,7 +20,7 @@ module gc.gc; -private import stdc.stdlib; +private import core.stdc.stdlib; private { diff --git a/src/gc/stub/posix.mak b/src/gc/stub/posix.mak index cb51e98..58d35f7 100644 --- a/src/gc/stub/posix.mak +++ b/src/gc/stub/posix.mak @@ -10,8 +10,8 @@ # make clean # Delete unneeded files created by build process -LIB_TARGET=druntime-gc-stub.a -LIB_MASK=druntime-gc-stub*.a +LIB_TARGET=libdruntime-gc-stub.a +LIB_MASK=libdruntime-gc-stub*.a CP=cp -f RM=rm -f @@ -20,16 +20,15 @@ MD=mkdir -p ADD_CFLAGS= ADD_DFLAGS= -CFLAGS=-O -m32 $(ADD_CFLAGS) -#CFLAGS=-g -m32 $(ADD_CFLAGS) +CFLAGS=-O $(ADD_CFLAGS) +#CFLAGS=-g $(ADD_CFLAGS) -### warnings disabled because gcx has issues ### +DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) +#DFLAGS=-g -w -nofloat $(ADD_DFLAGS) -DFLAGS=-release -O -inline $(ADD_DFLAGS) -#DFLAGS=-g $(ADD_DFLAGS) -TFLAGS=-O -inline $(ADD_DFLAGS) -#TFLAGS=-g $(ADD_DFLAGS) +TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) +#TFLAGS=-g -w -nofloat $(ADD_DFLAGS) DOCFLAGS=-version=DDoc @@ -37,7 +36,7 @@ CC=gcc LC=$(AR) -qsv DC=dmd -LIB_DEST=.. +LIB_DEST=../../../lib .SUFFIXES: .s .S .c .cpp .d .html .o diff --git a/src/gc/stub/win32.mak b/src/gc/stub/win32.mak index e315287..9b3158e 100644 --- a/src/gc/stub/win32.mak +++ b/src/gc/stub/win32.mak @@ -23,13 +23,12 @@ ADD_DFLAGS= CFLAGS=-mn -6 -r $(ADD_CFLAGS) #CFLAGS=-g -mn -6 -r $(ADD_CFLAGS) -### warnings disabled because gcx has issues ### +DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) +#DFLAGS=-g -w -nofloat $(ADD_DFLAGS) -DFLAGS=-release -O -inline $(ADD_DFLAGS) -#DFLAGS=-g -release $(ADD_DFLAGS) -TFLAGS=-O -inline $(ADD_DFLAGS) -#TFLAGS=-g $(ADD_DFLAGS) +TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) +#TFLAGS=-g -w -nofloat $(ADD_DFLAGS) DOCFLAGS=-version=DDoc -- 2.43.0