Changeset 36
- Timestamp:
- 10/24/08 20:15:55 (4 years ago)
- Files:
-
- branches/D1.0/import/core/stdc (added)
- branches/D1.0/import/core/stdc/complex.d (added)
- branches/D1.0/import/core/stdc/config.d (added)
- branches/D1.0/import/core/stdc/ctype.d (added)
- branches/D1.0/import/core/stdc/errno.d (added)
- branches/D1.0/import/core/stdc/fenv.d (added)
- branches/D1.0/import/core/stdc/inttypes.d (added)
- branches/D1.0/import/core/stdc/limits.d (added)
- branches/D1.0/import/core/stdc/locale.d (added)
- branches/D1.0/import/core/stdc/math.d (added)
- branches/D1.0/import/core/stdc/signal.d (added)
- branches/D1.0/import/core/stdc/stdarg.d (added)
- branches/D1.0/import/core/stdc/stddef.d (added)
- branches/D1.0/import/core/stdc/stdint.d (added)
- branches/D1.0/import/core/stdc/stdio.d (added)
- branches/D1.0/import/core/stdc/stdlib.d (added)
- branches/D1.0/import/core/stdc/string.d (added)
- branches/D1.0/import/core/stdc/tgmath.d (added)
- branches/D1.0/import/core/stdc/time.d (added)
- branches/D1.0/import/core/stdc/wctype.d (added)
- branches/D1.0/import/core/sys (added)
- branches/D1.0/import/core/sys/posix (added)
- branches/D1.0/import/core/sys/posix/arpa (added)
- branches/D1.0/import/core/sys/posix/arpa/inet.d (added)
- branches/D1.0/import/core/sys/posix/config.d (added)
- branches/D1.0/import/core/sys/posix/dirent.d (added)
- branches/D1.0/import/core/sys/posix/dlfcn.d (added)
- branches/D1.0/import/core/sys/posix/fcntl.d (added)
- branches/D1.0/import/core/sys/posix/inttypes.d (added)
- branches/D1.0/import/core/sys/posix/net (added)
- branches/D1.0/import/core/sys/posix/net/if_.d (added)
- branches/D1.0/import/core/sys/posix/netinet (added)
- branches/D1.0/import/core/sys/posix/netinet/in_.d (added)
- branches/D1.0/import/core/sys/posix/netinet/tcp.d (added)
- branches/D1.0/import/core/sys/posix/poll.d (added)
- branches/D1.0/import/core/sys/posix/pthread.d (added)
- branches/D1.0/import/core/sys/posix/pwd.d (added)
- branches/D1.0/import/core/sys/posix/sched.d (added)
- branches/D1.0/import/core/sys/posix/semaphore.d (added)
- branches/D1.0/import/core/sys/posix/setjmp.d (added)
- branches/D1.0/import/core/sys/posix/signal.d (added)
- branches/D1.0/import/core/sys/posix/stdio.d (added)
- branches/D1.0/import/core/sys/posix/stdlib.d (added)
- branches/D1.0/import/core/sys/posix/sys (added)
- branches/D1.0/import/core/sys/posix/sys/ipc.d (added)
- branches/D1.0/import/core/sys/posix/sys/mman.d (added)
- branches/D1.0/import/core/sys/posix/sys/select.d (added)
- branches/D1.0/import/core/sys/posix/sys/shm.d (added)
- branches/D1.0/import/core/sys/posix/sys/socket.d (added)
- branches/D1.0/import/core/sys/posix/sys/stat.d (added)
- branches/D1.0/import/core/sys/posix/sys/time.d (added)
- branches/D1.0/import/core/sys/posix/sys/types.d (added)
- branches/D1.0/import/core/sys/posix/sys/uio.d (added)
- branches/D1.0/import/core/sys/posix/sys/wait.d (added)
- branches/D1.0/import/core/sys/posix/termios.d (added)
- branches/D1.0/import/core/sys/posix/time.d (added)
- branches/D1.0/import/core/sys/posix/ucontext.d (added)
- branches/D1.0/import/core/sys/posix/unistd.d (added)
- branches/D1.0/import/core/sys/posix/utime.d (added)
- branches/D1.0/import/core/sys/windows (added)
- branches/D1.0/import/core/sys/windows/windows.d (added)
- branches/D1.0/import/stdc (deleted)
- branches/D1.0/import/sys (deleted)
- branches/D1.0/readme.txt (added)
- branches/D1.0/src/common/core/runtime.d (modified) (2 diffs)
- branches/D1.0/src/common/core/stdc (added)
- branches/D1.0/src/common/core/stdc/errno.c (added)
- branches/D1.0/src/common/core/thread.d (modified) (6 diffs)
- branches/D1.0/src/common/posix.mak (modified) (3 diffs)
- branches/D1.0/src/common/stdc (deleted)
- branches/D1.0/src/common/win32.mak (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/aaA.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/adi.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/arraycat.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/cmath2.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/cover.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/dmain2.d (modified) (2 diffs)
- branches/D1.0/src/compiler/dmd/lifetime.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/memory.d (modified) (2 diffs)
- branches/D1.0/src/compiler/dmd/object_.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/posix.mak (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/qsort2.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/switch_.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/trace.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/typeinfo/ti_Ag.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/typeinfo/ti_Aint.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/typeinfo/ti_Along.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/typeinfo/ti_Ashort.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/util/console.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/util/cpuid.d (modified) (1 diff)
- branches/D1.0/src/compiler/dmd/util/string.d (modified) (1 diff)
- branches/D1.0/src/dmd-win32.mak (modified) (5 diffs)
- branches/D1.0/src/gc/basic/gc.d (modified) (1 diff)
- branches/D1.0/src/gc/basic/gcalloc.d (modified) (3 diffs)
- branches/D1.0/src/gc/basic/gcbits.d (modified) (1 diff)
- branches/D1.0/src/gc/basic/gcx.d (modified) (1 diff)
- branches/D1.0/src/gc/basic/posix.mak (modified) (1 diff)
- branches/D1.0/src/gc/stub/gc.d (modified) (1 diff)
- branches/D1.0/src/gc/stub/posix.mak (modified) (3 diffs)
- branches/D1.0/src/gc/stub/win32.mak (modified) (4 diffs)
- trunk/import/core/stdc (added)
- trunk/import/core/stdc/complex.d (added)
- trunk/import/core/stdc/config.d (added)
- trunk/import/core/stdc/ctype.d (added)
- trunk/import/core/stdc/errno.d (added)
- trunk/import/core/stdc/fenv.d (added)
- trunk/import/core/stdc/inttypes.d (added)
- trunk/import/core/stdc/limits.d (added)
- trunk/import/core/stdc/locale.d (added)
- trunk/import/core/stdc/math.d (added)
- trunk/import/core/stdc/signal.d (added)
- trunk/import/core/stdc/stdarg.d (added)
- trunk/import/core/stdc/stddef.d (added)
- trunk/import/core/stdc/stdint.d (added)
- trunk/import/core/stdc/stdio.d (added)
- trunk/import/core/stdc/stdlib.d (added)
- trunk/import/core/stdc/string.d (added)
- trunk/import/core/stdc/tgmath.d (added)
- trunk/import/core/stdc/time.d (added)
- trunk/import/core/stdc/wctype.d (added)
- trunk/import/core/sys (added)
- trunk/import/core/sys/posix (added)
- trunk/import/core/sys/posix/arpa (added)
- trunk/import/core/sys/posix/arpa/inet.d (added)
- trunk/import/core/sys/posix/config.d (added)
- trunk/import/core/sys/posix/dirent.d (added)
- trunk/import/core/sys/posix/dlfcn.d (added)
- trunk/import/core/sys/posix/fcntl.d (added)
- trunk/import/core/sys/posix/inttypes.d (added)
- trunk/import/core/sys/posix/net (added)
- trunk/import/core/sys/posix/net/if_.d (added)
- trunk/import/core/sys/posix/netinet (added)
- trunk/import/core/sys/posix/netinet/in_.d (added)
- trunk/import/core/sys/posix/netinet/tcp.d (added)
- trunk/import/core/sys/posix/poll.d (added)
- trunk/import/core/sys/posix/pthread.d (added)
- trunk/import/core/sys/posix/pwd.d (added)
- trunk/import/core/sys/posix/sched.d (added)
- trunk/import/core/sys/posix/semaphore.d (added)
- trunk/import/core/sys/posix/setjmp.d (added)
- trunk/import/core/sys/posix/signal.d (added)
- trunk/import/core/sys/posix/stdio.d (added)
- trunk/import/core/sys/posix/stdlib.d (added)
- trunk/import/core/sys/posix/sys (added)
- trunk/import/core/sys/posix/sys/ipc.d (added)
- trunk/import/core/sys/posix/sys/mman.d (added)
- trunk/import/core/sys/posix/sys/select.d (added)
- trunk/import/core/sys/posix/sys/shm.d (added)
- trunk/import/core/sys/posix/sys/socket.d (added)
- trunk/import/core/sys/posix/sys/stat.d (added)
- trunk/import/core/sys/posix/sys/time.d (added)
- trunk/import/core/sys/posix/sys/types.d (added)
- trunk/import/core/sys/posix/sys/uio.d (added)
- trunk/import/core/sys/posix/sys/wait.d (added)
- trunk/import/core/sys/posix/termios.d (added)
- trunk/import/core/sys/posix/time.d (added)
- trunk/import/core/sys/posix/ucontext.d (added)
- trunk/import/core/sys/posix/unistd.d (added)
- trunk/import/core/sys/posix/utime.d (added)
- trunk/import/core/sys/windows (added)
- trunk/import/core/sys/windows/windows.d (added)
- trunk/import/stdc (deleted)
- trunk/import/sys (deleted)
- trunk/src/common/core/memory.d (modified) (2 diffs)
- trunk/src/common/core/runtime.d (modified) (2 diffs)
- trunk/src/common/core/stdc (added)
- trunk/src/common/core/stdc/errno.c (added)
- trunk/src/common/core/thread.d (modified) (4 diffs)
- trunk/src/common/posix.mak (modified) (1 diff)
- trunk/src/common/win32.mak (modified) (1 diff)
- trunk/src/compiler/dmd/aaA.d (modified) (1 diff)
- trunk/src/compiler/dmd/adi.d (modified) (1 diff)
- trunk/src/compiler/dmd/arrayassign.d (modified) (1 diff)
- trunk/src/compiler/dmd/arraycat.d (modified) (1 diff)
- trunk/src/compiler/dmd/cmath2.d (modified) (1 diff)
- trunk/src/compiler/dmd/cover.d (modified) (1 diff)
- trunk/src/compiler/dmd/dmain2.d (modified) (2 diffs)
- trunk/src/compiler/dmd/lifetime.d (modified) (1 diff)
- trunk/src/compiler/dmd/memory.d (modified) (1 diff)
- trunk/src/compiler/dmd/object_.d (modified) (1 diff)
- trunk/src/compiler/dmd/qsort2.d (modified) (1 diff)
- trunk/src/compiler/dmd/switch_.d (modified) (1 diff)
- trunk/src/compiler/dmd/trace.d (modified) (1 diff)
- trunk/src/compiler/dmd/typeinfo/ti_Ag.d (modified) (1 diff)
- trunk/src/compiler/dmd/typeinfo/ti_Aint.d (modified) (1 diff)
- trunk/src/compiler/dmd/typeinfo/ti_Along.d (modified) (1 diff)
- trunk/src/compiler/dmd/typeinfo/ti_Ashort.d (modified) (1 diff)
- trunk/src/compiler/dmd/util/console.d (modified) (1 diff)
- trunk/src/compiler/dmd/util/cpuid.d (modified) (1 diff)
- trunk/src/compiler/dmd/util/string.d (modified) (1 diff)
- trunk/src/gc/basic/gc.d (modified) (1 diff)
- trunk/src/gc/basic/gcalloc.d (modified) (3 diffs)
- trunk/src/gc/basic/gcbits.d (modified) (1 diff)
- trunk/src/gc/basic/gcx.d (modified) (1 diff)
- trunk/src/gc/stub/gc.d (modified) (1 diff)
- trunk/src/gc/stub/posix.mak (modified) (3 diffs)
- trunk/src/gc/stub/win32.mak (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/D1.0/src/common/core/runtime.d
r29 r36 23 23 extern (C) bool rt_init( ExceptionHandler dg = null ); 24 24 extern (C) bool rt_term( ExceptionHandler dg = null ); 25 26 extern (C) void* rt_loadLibrary( in char[] name ); 27 extern (C) void rt_unloadLibrary( void* ptr ); 25 28 } 26 29 … … 86 89 { 87 90 return rt_isHalting(); 91 } 92 93 94 /** 95 * Locates a dynamic library with the supplied library name and dynamically 96 * loads it into the caller's address space. If the library contains a D 97 * runtime it will be integrated with the current runtime. 98 * 99 * Params: 100 * name = The name of the dynamic library to load. 101 * 102 * Returns: 103 * A reference to the library or null on error. 104 */ 105 static void* loadLibrary( in char[] name ) 106 { 107 return rt_loadLibrary( name ); 108 } 109 110 111 /** 112 * Unloads the dynamic library referenced by p. If this library contains a 113 * D runtime then any necessary finalization or cleanup of that runtime 114 * will be performed. 115 * 116 * Params: 117 * p = A reference to the library to unload. 118 */ 119 static void unloadLibrary( void* p ) 120 { 121 rt_unloadLibrary( p ); 88 122 } 89 123 branches/D1.0/src/common/core/thread.d
r35 r36 85 85 private 86 86 { 87 import stdc.stdint : uintptr_t; // for _beginthreadex decl below88 import sys.windows.windows;87 import core.stdc.stdint : uintptr_t; // for _beginthreadex decl below 88 import core.sys.windows.windows; 89 89 90 90 const DWORD TLS_OUT_OF_INDEXES = 0xFFFFFFFF; … … 152 152 private 153 153 { 154 import stdc.posix.semaphore;155 import stdc.posix.pthread;156 import stdc.posix.signal;157 import stdc.posix.time;158 import stdc.errno;154 import core.sys.posix.semaphore; 155 import core.sys.posix.pthread; 156 import core.sys.posix.signal; 157 import core.sys.posix.time; 158 import core.stdc.errno; 159 159 160 160 extern (C) int getErrno(); … … 825 825 MAX_SLEEP_MILLIS = uint.max - 1 826 826 } 827 827 828 period = period < TICKS_PER_MILLI ? 828 829 1 : … … 853 854 { 854 855 if( period > MAX_SLEEP_TICKS ) 855 {856 tin.tv_sec= tin.tv_sec.max;857 tin.tv_nsec = 0;858 }859 else860 {856 { 857 tin.tv_sec = tin.tv_sec.max; 858 tin.tv_nsec = 0; 859 } 860 else 861 { 861 862 tin.tv_sec = cast(typeof(tin.tv_sec)) (period / TICKS_PER_SECOND); 862 863 tin.tv_nsec = cast(typeof(tin.tv_nsec)) (period % TICKS_PER_SECOND) * NANOS_PER_TICK; 863 } 864 865 while( true ) 866 { 867 if( !nanosleep( &tin, &tout ) ) 868 return; 869 if( getErrno() != EINTR ) 864 } 865 while( true ) 866 { 867 if( !nanosleep( &tin, &tout ) ) 868 return; 869 if( getErrno() != EINTR ) 870 870 throw new ThreadException( "Unable to sleep for the specified duration" ); 871 tin = tout;872 }871 tin = tout; 872 } 873 873 period -= (cast(typeof(period)) tin.tv_sec) * TICKS_PER_SECOND; 874 874 period -= (cast(typeof(period)) tin.tv_nsec) / NANOS_PER_TICK; … … 2258 2258 version( Posix ) 2259 2259 { 2260 import stdc.posix.unistd; // for sysconf2261 import stdc.posix.sys.mman; // for mmap2262 import stdc.posix.stdlib; // for malloc, valloc, free2260 import core.sys.posix.unistd; // for sysconf 2261 import core.sys.posix.sys.mman; // for mmap 2262 import core.sys.posix.stdlib; // for malloc, valloc, free 2263 2263 2264 2264 version( AsmX86_Win32 ) {} else … … 2272 2272 // an obsolescent feature according to the POSIX spec, so a 2273 2273 // custom solution is still preferred. 2274 import stdc.posix.ucontext;2274 import core.sys.posix.ucontext; 2275 2275 } 2276 2276 } branches/D1.0/src/common/posix.mak
r32 r36 24 24 #CFLAGS=-g $(ADD_CFLAGS) 25 25 26 DFLAGS=-release -O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)27 #DFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 28 28 29 TFLAGS=-O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)30 #TFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)29 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 30 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 31 31 32 DOCFLAGS=-version=DDoc -version=Posix32 DOCFLAGS=-version=DDoc 33 33 34 34 CC=gcc … … 77 77 78 78 OBJ_STDC= \ 79 stdc/errno.o79 core/stdc/errno.o 80 80 81 81 ALL_OBJS= \ … … 114 114 115 115 ### memory 116 116 117 core/memory_.o : core/memory.d 117 118 $(DC) -c $(DFLAGS) -Hf$*.di $< -of$@ 119 118 120 ### thread 119 121 branches/D1.0/src/common/win32.mak
r29 r36 74 74 75 75 OBJ_STDC= \ 76 stdc\errno.obj76 core\stdc\errno.obj 77 77 78 78 ALL_OBJS= \ branches/D1.0/src/compiler/dmd/aaA.d
r17 r36 36 36 private 37 37 { 38 import stdc.stdarg;39 import stdc.string;38 import core.stdc.stdarg; 39 import core.stdc.string; 40 40 41 41 enum BlkAttr : uint branches/D1.0/src/compiler/dmd/adi.d
r8 r36 39 39 private 40 40 { 41 debug(adi) import stdc.stdio;42 import stdc.string;43 import stdc.stdlib;41 debug(adi) import core.stdc.stdio; 42 import core.stdc.string; 43 import core.stdc.stdlib; 44 44 import util.utf; 45 45 branches/D1.0/src/compiler/dmd/arraycat.d
r8 r36 34 34 private 35 35 { 36 import stdc.string;37 debug import stdc.stdio;36 import core.stdc.string; 37 debug import core.stdc.stdio; 38 38 } 39 39 branches/D1.0/src/compiler/dmd/cmath2.d
r8 r36 13 13 module rt.cmath2; 14 14 15 private import stdc.math;15 private import core.stdc.math; 16 16 17 17 extern (C): branches/D1.0/src/compiler/dmd/cover.d
r29 r36 18 18 { 19 19 version( Windows ) 20 import sys.windows.windows;20 import core.sys.windows.windows; 21 21 else version( Posix ) 22 22 { 23 import stdc.posix.fcntl;24 import stdc.posix.unistd;23 import core.sys.posix.fcntl; 24 import core.sys.posix.unistd; 25 25 } 26 26 import core.bitmanip; 27 import stdc.stdio;27 import core.stdc.stdio; 28 28 import util.utf; 29 29 branches/D1.0/src/compiler/dmd/dmain2.d
r29 r36 14 14 { 15 15 import util.console; 16 import stdc.stddef; 17 import stdc.stdlib; 18 import stdc.string; 19 } 20 21 version(Windows) 22 { 16 import core.stdc.stddef; 17 import core.stdc.stdlib; 18 import core.stdc.string; 19 } 20 21 version (Windows) 22 { 23 extern (Windows) alias int function() FARPROC; 24 extern (Windows) FARPROC GetProcAddress(void*, in char*); 25 extern (Windows) void* LoadLibraryA(in char*); 26 extern (Windows) int FreeLibrary(void*); 23 27 extern (Windows) void* LocalFree(void*); 24 28 extern (Windows) wchar_t* GetCommandLineW(); 25 29 extern (Windows) wchar_t** CommandLineToArgvW(wchar_t*, int*); 26 30 extern (Windows) export int WideCharToMultiByte(uint, uint, wchar_t*, int, char*, int, char*, int); 27 pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW31 pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW 28 32 } 29 33 … … 38 42 extern (C) void _moduleDtor(); 39 43 extern (C) void thread_joinAll(); 44 45 /*********************************** 46 * These are a temporary means of providing a GC hook for DLL use. They may be 47 * replaced with some other similar functionality later. 48 */ 49 50 extern (C) void* rt_loadLibrary(in char[] name) 51 { 52 throw new Exception("rt_loadLibrary not yet implemented on linux."); 53 } 54 55 extern (C) void rt_unloadLibrary(void* ptr) 56 { 57 throw new Exception("rt_unloadLibrary not yet implemented."); 58 } 40 59 41 60 /*********************************** branches/D1.0/src/compiler/dmd/lifetime.d
r29 r36 30 30 private 31 31 { 32 import stdc.stdlib;33 import stdc.string;34 import stdc.stdarg;35 debug(PRINTF) import stdc.stdio;32 import core.stdc.stdlib; 33 import core.stdc.string; 34 import core.stdc.stdarg; 35 debug(PRINTF) import core.stdc.stdio; 36 36 } 37 37 branches/D1.0/src/compiler/dmd/memory.d
r8 r36 141 141 extern (C) void rt_scanStaticData( scanFn scan ) 142 142 { 143 scan(rt_staticDataBottom(), rt_staticDataTop()); 144 } 145 146 /** 147 * 148 */ 149 extern (C) void* rt_staticDataBottom() 150 { 143 151 version( Windows ) 144 152 { 145 scan( &_xi_a, &_end );153 return &_xi_a; 146 154 } 147 155 else version( linux ) 148 156 { 149 scan( &__data_start, &_end );157 return &__data_start; 150 158 } 151 159 else … … 154 162 } 155 163 } 164 165 /** 166 * 167 */ 168 extern (C) void* rt_staticDataTop() 169 { 170 version( Windows ) 171 { 172 return &_end; 173 } 174 else version( linux ) 175 { 176 return &_end; 177 } 178 else 179 { 180 static assert( false, "Operating system not supported." ); 181 } 182 } branches/D1.0/src/compiler/dmd/object_.d
r30 r36 40 40 private 41 41 { 42 import stdc.string;43 import stdc.stdlib;42 import core.stdc.string; 43 import core.stdc.stdlib; 44 44 import util.string; 45 debug(PRINTF) import stdc.stdio;45 debug(PRINTF) import core.stdc.stdio; 46 46 47 47 extern (C) void onOutOfMemoryError(); branches/D1.0/src/compiler/dmd/posix.mak
r16 r36 21 21 #CFLAGS=-g $(ADD_CFLAGS) 22 22 23 DFLAGS=-release -O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)24 #DFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)23 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 24 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 25 25 26 TFLAGS=-O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)27 #TFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)26 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 27 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 28 28 29 DOCFLAGS=-version=DDoc -version=Posix29 DOCFLAGS=-version=DDoc 30 30 31 31 CC=gcc branches/D1.0/src/compiler/dmd/qsort2.d
r8 r36 18 18 //debug=qsort; 19 19 20 private import stdc.stdlib;20 private import core.stdc.stdlib; 21 21 22 22 struct Array branches/D1.0/src/compiler/dmd/switch_.d
r8 r36 28 28 module rt.switch_; 29 29 30 private import stdc.string;30 private import core.stdc.string; 31 31 32 32 /****************************************************** branches/D1.0/src/compiler/dmd/trace.d
r29 r36 17 17 { 18 18 import util.string; 19 import stdc.ctype;20 import stdc.stdio;21 import stdc.string;22 import stdc.stdlib;19 import core.stdc.ctype; 20 import core.stdc.stdio; 21 import core.stdc.string; 22 import core.stdc.stdlib; 23 23 } 24 24 branches/D1.0/src/compiler/dmd/typeinfo/ti_Ag.d
r8 r36 3 3 4 4 private import util.string; 5 private import stdc.string;5 private import core.stdc.string; 6 6 7 7 // byte[] branches/D1.0/src/compiler/dmd/typeinfo/ti_Aint.d
r8 r36 2 2 module rt.typeinfo.ti_Aint; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // int[] branches/D1.0/src/compiler/dmd/typeinfo/ti_Along.d
r8 r36 2 2 module rt.typeinfo.ti_Along; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // long[] branches/D1.0/src/compiler/dmd/typeinfo/ti_Ashort.d
r8 r36 2 2 module rt.typeinfo.ti_Ashort; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // short[] branches/D1.0/src/compiler/dmd/util/console.d
r8 r36 13 13 version (Windows) 14 14 { 15 import sys.windows.windows;15 import core.sys.windows.windows; 16 16 } 17 17 else version( Posix ) 18 18 { 19 import stdc.posix.unistd;19 import core.sys.posix.unistd; 20 20 } 21 21 import util.string; branches/D1.0/src/compiler/dmd/util/cpuid.d
r14 r36 41 41 module rt.util.cpuid; 42 42 43 private import stdc.string;43 private import core.stdc.string; 44 44 45 45 version(D_InlineAsm_X86) branches/D1.0/src/compiler/dmd/util/string.d
r8 r36 9 9 module rt.util.string; 10 10 11 private import stdc.string;11 private import core.stdc.string; 12 12 13 13 char[] intToString( char[] buf, uint val ) 14 14 { 15 15 assert( buf.length > 9 ); 16 char*p = buf.ptr + buf.length;16 auto p = buf.ptr + buf.length; 17 17 18 18 do 19 19 { 20 *--p = val % 10 + '0';20 *--p = cast(char)(val % 10 + '0'); 21 21 } while( val /= 10 ); 22 22 branches/D1.0/src/dmd-win32.mak
r29 r36 18 18 DIR_RT=compiler\dmd 19 19 DIR_GC=gc\basic 20 DIR_GC_STUB=gc\stub 20 21 21 22 LIB_CC=$(DIR_CC)\druntime-core.lib … … 59 60 make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 60 61 cd ..\.. 62 cd $(DIR_GC_STUB) 63 make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)" 64 cd ..\.. 61 65 $(RM) $(LIB_TARGET) 62 66 $(LC) -c -n $(LIB_TARGET) $(LIB_CC) $(LIB_RT) $(LIB_GC) 63 67 $(RM) $(DUP_TARGET) 64 68 copy $(LIB_TARGET) $(DUP_TARGET) 69 65 70 66 71 doc : $(ALL_DOCS) … … 72 77 cd ..\.. 73 78 cd $(DIR_GC) 79 make -fwin32.mak doc DC=$(DC) 80 cd ..\.. 81 cd $(DIR_GC_STUB) 74 82 make -fwin32.mak doc DC=$(DC) 75 83 cd ..\.. … … 90 98 make -fwin32.mak clean 91 99 cd ..\.. 100 cd $(DIR_GC_STUB) 101 make -fwin32.mak clean 102 cd ..\.. 92 103 $(RM) $(LIB_MASK) 93 104 … … 102 113 make -fwin32.mak install 103 114 cd ..\.. 115 cd $(DIR_GC_STUB) 116 make -fwin32.mak install 117 cd ..\.. 104 118 $(CP) $(LIB_MASK) $(LIB_DEST)\. branches/D1.0/src/gc/basic/gc.d
r29 r36 29 29 private import gcx; 30 30 private import gcstats; 31 private import stdc.stdlib;31 private import core.stdc.stdlib; 32 32 33 33 version=GCCLASS; branches/D1.0/src/gc/basic/gcalloc.d
r29 r36 30 30 version (Windows) 31 31 { 32 private import sys.windows.windows;32 private import core.sys.windows.windows; 33 33 34 34 alias int pthread_t; … … 43 43 else version (Posix) 44 44 { 45 private import stdc.posix.sys.mman;46 private import stdc.stdlib;45 private import core.sys.posix.sys.mman; 46 private import core.stdc.stdlib; 47 47 48 48 //version = GC_Use_Alloc_MMap; … … 50 50 else 51 51 { 52 private import stdc.stdlib;52 private import core.stdc.stdlib; 53 53 54 54 //version = GC_Use_Alloc_Malloc; branches/D1.0/src/gc/basic/gcbits.d
r29 r36 31 31 { 32 32 import core.bitmanip; 33 import stdc.string;34 import stdc.stdlib;33 import core.stdc.string; 34 import core.stdc.stdlib; 35 35 extern (C) void onOutOfMemoryError(); 36 36 } branches/D1.0/src/gc/basic/gcx.d
r29 r36 53 53 private import gcalloc; 54 54 55 private import cstdlib = stdc.stdlib : calloc, free, malloc, realloc;56 private import stdc.string;57 58 debug private import stdc.stdio;55 private import cstdlib = core.stdc.stdlib : calloc, free, malloc, realloc; 56 private import core.stdc.string; 57 58 debug private import core.stdc.stdio; 59 59 60 60 version (GNU) branches/D1.0/src/gc/basic/posix.mak
r16 r36 24 24 #CFLAGS=-g $(ADD_CFLAGS) 25 25 26 DFLAGS=-release -O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)27 #DFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 28 28 29 TFLAGS=-O -inline -w -nofloat -version=Posix$(ADD_DFLAGS)30 #TFLAGS=-g -w -nofloat -version=Posix$(ADD_DFLAGS)29 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 30 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 31 31 32 DOCFLAGS=-version=DDoc -version=Posix32 DOCFLAGS=-version=DDoc 33 33 34 34 CC=gcc branches/D1.0/src/gc/stub/gc.d
r29 r36 21 21 module gc.gc; 22 22 23 private import stdc.stdlib;23 private import core.stdc.stdlib; 24 24 25 25 private branches/D1.0/src/gc/stub/posix.mak
r16 r36 11 11 # Delete unneeded files created by build process 12 12 13 LIB_TARGET= druntime-gc-stub.a14 LIB_MASK= druntime-gc-stub*.a13 LIB_TARGET=libdruntime-gc-stub.a 14 LIB_MASK=libdruntime-gc-stub*.a 15 15 16 16 CP=cp -f … … 21 21 ADD_DFLAGS= 22 22 23 CFLAGS=-O -m32$(ADD_CFLAGS)24 #CFLAGS=-g -m32$(ADD_CFLAGS)23 CFLAGS=-O $(ADD_CFLAGS) 24 #CFLAGS=-g $(ADD_CFLAGS) 25 25 26 ### warnings disabled because gcx has issues ### 26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 27 28 28 DFLAGS=-release -O -inline -version=Posix $(ADD_DFLAGS)29 #DFLAGS=-g -version=Posix $(ADD_DFLAGS)30 29 31 TFLAGS=-O -inline - version=Posix$(ADD_DFLAGS)32 #TFLAGS=-g - version=Posix$(ADD_DFLAGS)30 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 31 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 33 32 34 DOCFLAGS=-version=DDoc -version=Posix33 DOCFLAGS=-version=DDoc 35 34 36 35 CC=gcc … … 38 37 DC=dmd 39 38 40 LIB_DEST=.. 39 LIB_DEST=../../../lib 41 40 42 41 .SUFFIXES: .s .S .c .cpp .d .html .o branches/D1.0/src/gc/stub/win32.mak
r16 r36 11 11 # Delete unneeded files created by build process 12 12 13 LIB_TARGET= tango-gc-stub.lib14 LIB_MASK= tango-gc-stub*.lib13 LIB_TARGET=druntime-gc-stub.lib 14 LIB_MASK=druntime-gc-stub*.lib 15 15 16 16 CP=xcopy /y … … 24 24 #CFLAGS=-g -mn -6 -r $(ADD_CFLAGS) 25 25 26 ### warnings disabled because gcx has issues ### 26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 27 28 28 DFLAGS=-release -O -inline $(ADD_DFLAGS)29 #DFLAGS=-g -release $(ADD_DFLAGS)30 29 31 TFLAGS=-O -inline $(ADD_DFLAGS)32 #TFLAGS=-g $(ADD_DFLAGS)30 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 31 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 33 32 34 33 DOCFLAGS=-version=DDoc … … 38 37 DC=dmd 39 38 40 LIB_DEST=.. 39 LIB_DEST=..\..\..\lib 41 40 42 41 .DEFAULT: .asm .c .cpp .d .html .obj … … 94 93 $(MD) $(LIB_DEST) 95 94 $(CP) $(LIB_MASK) $(LIB_DEST)\. 95 copy gc.obj $(LIB_DEST)\gcstub.obj trunk/src/common/core/memory.d
r33 r36 48 48 extern (C) void gc_removeRoot( void* p ); 49 49 extern (C) void gc_removeRange( void* p ); 50 51 extern (C) void* gc_getHandle();52 extern (C) void gc_setHandle( void* p );53 extern (C) void gc_endHandle();54 50 } 55 51 … … 446 442 gc_removeRange( p ); 447 443 } 448 449 /**450 * Get handle to the collector.451 * The only thing that can be done with this handle is pass it to452 * setHandle(). getHandle/setHandle/endHandle work together so that453 * if there are multiple instances of the gc running, only one instance454 * can be set to run.455 * The most common case of this is under Windows where a D application456 * calls functions in a DLL that is implemented in D.457 */458 459 static void* getHandle()460 {461 return gc_getHandle();462 }463 464 /**465 * Set handle to the collector.466 * The handle p is an opaque handle, acquired by a call to467 * getHandle().468 */469 470 static void setHandle(void* p)471 {472 gc_setHandle(p);473 }474 475 /**476 * Call when done using the collector specified by the477 * call to setHandle().478 */479 480 static void endHandle()481 {482 gc_endHandle();483 }484 444 } trunk/src/common/core/runtime.d
r29 r36 23 23 extern (C) bool rt_init( ExceptionHandler dg = null ); 24 24 extern (C) bool rt_term( ExceptionHandler dg = null ); 25 26 extern (C) void* rt_loadLibrary( in char[] name ); 27 extern (C) void rt_unloadLibrary( void* ptr ); 25 28 } 26 29 … … 86 89 { 87 90 return rt_isHalting(); 91 } 92 93 94 /** 95 * Locates a dynamic library with the supplied library name and dynamically 96 * loads it into the caller's address space. If the library contains a D 97 * runtime it will be integrated with the current runtime. 98 * 99 * Params: 100 * name = The name of the dynamic library to load. 101 * 102 * Returns: 103 * A reference to the library or null on error. 104 */ 105 static void* loadLibrary( in char[] name ) 106 { 107 return rt_loadLibrary( name ); 108 } 109 110 111 /** 112 * Unloads the dynamic library referenced by p. If this library contains a 113 * D runtime then any necessary finalization or cleanup of that runtime 114 * will be performed. 115 * 116 * Params: 117 * p = A reference to the library to unload. 118 */ 119 static void unloadLibrary( void* p ) 120 { 121 rt_unloadLibrary( p ); 88 122 } 89 123 trunk/src/common/core/thread.d
r35 r36 85 85 private 86 86 { 87 import stdc.stdint : uintptr_t; // for _beginthreadex decl below88 import sys.windows.windows;87 import core.stdc.stdint : uintptr_t; // for _beginthreadex decl below 88 import core.sys.windows.windows; 89 89 90 90 const DWORD TLS_OUT_OF_INDEXES = 0xFFFFFFFF; … … 152 152 private 153 153 { 154 import stdc.posix.semaphore;155 import stdc.posix.pthread;156 import stdc.posix.signal;157 import stdc.posix.time;158 import stdc.errno;154 import core.sys.posix.semaphore; 155 import core.sys.posix.pthread; 156 import core.sys.posix.signal; 157 import core.sys.posix.time; 158 import core.stdc.errno; 159 159 160 160 extern (C) int getErrno(); 161 161 162 version( GNU ) 162 163 { … … 2257 2258 version( Posix ) 2258 2259 { 2259 import stdc.posix.unistd; // for sysconf2260 import stdc.posix.sys.mman; // for mmap2261 import stdc.posix.stdlib; // for malloc, valloc, free2260 import core.sys.posix.unistd; // for sysconf 2261 import core.sys.posix.sys.mman; // for mmap 2262 import core.sys.posix.stdlib; // for malloc, valloc, free 2262 2263 2263 2264 version( AsmX86_Win32 ) {} else … … 2271 2272 // an obsolescent feature according to the POSIX spec, so a 2272 2273 // custom solution is still preferred. 2273 import stdc.posix.ucontext;2274 import core.sys.posix.ucontext; 2274 2275 } 2275 2276 } trunk/src/common/posix.mak
r33 r36 77 77 78 78 OBJ_STDC= \ 79 stdc/errno.o79 core/stdc/errno.o 80 80 81 81 ALL_OBJS= \ trunk/src/common/win32.mak
r29 r36 74 74 75 75 OBJ_STDC= \ 76 stdc\errno.obj76 core\stdc\errno.obj 77 77 78 78 ALL_OBJS= \ trunk/src/compiler/dmd/aaA.d
r17 r36 36 36 private 37 37 { 38 import stdc.stdarg;39 import stdc.string;38 import core.stdc.stdarg; 39 import core.stdc.string; 40 40 41 41 enum BlkAttr : uint trunk/src/compiler/dmd/adi.d
r6 r36 39 39 private 40 40 { 41 debug(adi) import stdc.stdio;42 import stdc.string;43 import stdc.stdlib;41 debug(adi) import core.stdc.stdio; 42 import core.stdc.string; 43 import core.stdc.stdlib; 44 44 import util.utf; 45 45 trunk/src/compiler/dmd/arrayassign.d
r10 r36 10 10 { 11 11 import util.string; 12 import stdc.string;13 import stdc.stdlib;14 debug(PRINTF) import stdc.stdio;12 import core.stdc.string; 13 import core.stdc.stdlib; 14 debug(PRINTF) import core.stdc.stdio; 15 15 } 16 16 trunk/src/compiler/dmd/arraycat.d
r5 r36 34 34 private 35 35 { 36 import stdc.string;37 debug import stdc.stdio;36 import core.stdc.string; 37 debug import core.stdc.stdio; 38 38 } 39 39 trunk/src/compiler/dmd/cmath2.d
r5 r36 13 13 module rt.cmath2; 14 14 15 private import stdc.math;15 private import core.stdc.math; 16 16 17 17 extern (C): trunk/src/compiler/dmd/cover.d
r29 r36 18 18 { 19 19 version( Windows ) 20 import sys.windows.windows;20 import core.sys.windows.windows; 21 21 else version( Posix ) 22 22 { 23 import stdc.posix.fcntl;24 import stdc.posix.unistd;23 import core.sys.posix.fcntl; 24 import core.sys.posix.unistd; 25 25 } 26 26 import core.bitmanip; 27 import stdc.stdio;27 import core.stdc.stdio; 28 28 import util.utf; 29 29 trunk/src/compiler/dmd/dmain2.d
r29 r36 14 14 { 15 15 import util.console; 16 import stdc.stddef; 17 import stdc.stdlib; 18 import stdc.string; 19 } 20 21 version(Windows) 22 { 16 import core.stdc.stddef; 17 import core.stdc.stdlib; 18 import core.stdc.string; 19 } 20 21 version (Windows) 22 { 23 extern (Windows) alias int function() FARPROC; 24 extern (Windows) FARPROC GetProcAddress(void*, in char*); 25 extern (Windows) void* LoadLibraryA(in char*); 26 extern (Windows) int FreeLibrary(void*); 23 27 extern (Windows) void* LocalFree(void*); 24 28 extern (Windows) wchar_t* GetCommandLineW(); 25 29 extern (Windows) wchar_t** CommandLineToArgvW(wchar_t*, int*); 26 30 extern (Windows) export int WideCharToMultiByte(uint, uint, wchar_t*, int, char*, int, char*, int); 27 pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW31 pragma(lib, "shell32.lib"); // needed for CommandLineToArgvW 28 32 } 29 33 … … 38 42 extern (C) void _moduleDtor(); 39 43 extern (C) void thread_joinAll(); 44 45 /*********************************** 46 * These are a temporary means of providing a GC hook for DLL use. They may be 47 * replaced with some other similar functionality later. 48 */ 49 extern (C) 50 { 51 void* gc_getHandle(); 52 void gc_setHandle(void* p); 53 void gc_clrHandle(); 54 55 alias void* function() gcGetFn; 56 alias void function(void*) gcSetFn; 57 alias void function() gcClrFn; 58 alias bool function(ExceptionHandler dg = null) rtInitFn; 59 alias bool function(ExceptionHandler dg = null) rtTermFn; 60 } 61 62 extern (C) void* rt_loadLibrary(in char[] name) 63 { 64 version (Windows) 65 { 66 char[260] temp = void; 67 temp[0 .. name.length] = name[]; 68 temp[name.length] = cast(char) 0; 69 void* ptr = LoadLibraryA(temp.ptr); 70 if (ptr is null) 71 return ptr; 72 gcSetFn gcSet = cast(gcSetFn) GetProcAddress(ptr, "_gc_setHandle"); 73 rtInitFn rtInit = cast(rtInitFn) GetProcAddress(ptr, "_rt_init"); 74 if (gcSet is null || rtInit is null) 75 return ptr; 76 gcSet(gc_getHandle()); 77 rtInit(); 78 return ptr; 79 80 } 81 else version (linux) 82 { 83 throw new Exception("rt_loadLibrary not yet implemented on linux."); 84 } 85 } 86 87 extern (C) void rt_unloadLibrary(void* ptr) 88 { 89 version (Windows) 90 { 91 gcClrFn gcClr = cast(gcClrFn) GetProcAddress(ptr, "_gc_clrHandle"); 92 rtTermFn rtTerm = cast(rtTermFn) GetProcAddress(ptr, "_rt_term"); 93 94 if (gcClr !is null && rtTerm !is null) 95 { 96 rtTerm(); 97 gcClr(); 98 } 99 return FreeLibrary(ptr) != 0; 100 } 101 else version (linux) 102 { 103 throw new Exception("rt_unloadLibrary not yet implemented on linux."); 104 } 105 } 40 106 41 107 /*********************************** trunk/src/compiler/dmd/lifetime.d
r29 r36 30 30 private 31 31 { 32 import stdc.stdlib;33 import stdc.string;34 import stdc.stdarg;35 debug(PRINTF) import stdc.stdio;32 import core.stdc.stdlib; 33 import core.stdc.string; 34 import core.stdc.stdarg; 35 debug(PRINTF) import core.stdc.stdio; 36 36 } 37 37 trunk/src/compiler/dmd/memory.d
r33 r36 181 181 } 182 182 } 183 184 trunk/src/compiler/dmd/object_.d
r30 r36 40 40 private 41 41 { 42 import stdc.string;43 import stdc.stdlib;42 import core.stdc.string; 43 import core.stdc.stdlib; 44 44 import util.string; 45 debug(PRINTF) import stdc.stdio;45 debug(PRINTF) import core.stdc.stdio; 46 46 47 47 extern (C) void onOutOfMemoryError(); trunk/src/compiler/dmd/qsort2.d
r5 r36 18 18 //debug=qsort; 19 19 20 private import stdc.stdlib;20 private import core.stdc.stdlib; 21 21 22 22 struct Array trunk/src/compiler/dmd/switch_.d
r5 r36 28 28 module rt.switch_; 29 29 30 private import stdc.string;30 private import core.stdc.string; 31 31 32 32 /****************************************************** trunk/src/compiler/dmd/trace.d
r20 r36 17 17 { 18 18 import util.string; 19 import stdc.ctype;20 import stdc.stdio;21 import stdc.string;22 import stdc.stdlib;19 import core.stdc.ctype; 20 import core.stdc.stdio; 21 import core.stdc.string; 22 import core.stdc.stdlib; 23 23 } 24 24 trunk/src/compiler/dmd/typeinfo/ti_Ag.d
r7 r36 3 3 4 4 private import util.string; 5 private import stdc.string;5 private import core.stdc.string; 6 6 7 7 // byte[] trunk/src/compiler/dmd/typeinfo/ti_Aint.d
r7 r36 2 2 module rt.typeinfo.ti_Aint; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // int[] trunk/src/compiler/dmd/typeinfo/ti_Along.d
r7 r36 2 2 module rt.typeinfo.ti_Along; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // long[] trunk/src/compiler/dmd/typeinfo/ti_Ashort.d
r7 r36 2 2 module rt.typeinfo.ti_Ashort; 3 3 4 private import stdc.string;4 private import core.stdc.string; 5 5 6 6 // short[] trunk/src/compiler/dmd/util/console.d
r5 r36 13 13 version (Windows) 14 14 { 15 import sys.windows.windows;15 import core.sys.windows.windows; 16 16 } 17 17 else version( Posix ) 18 18 { 19 import stdc.posix.unistd;19 import core.sys.posix.unistd; 20 20 } 21 21 import util.string; trunk/src/compiler/dmd/util/cpuid.d
r7 r36 41 41 module rt.util.cpuid; 42 42 43 private import stdc.string;43 private import core.stdc.string; 44 44 45 45 version(D_InlineAsm_X86) trunk/src/compiler/dmd/util/string.d
r20 r36 9 9 module rt.util.string; 10 10 11 private import stdc.string;11 private import core.stdc.string; 12 12 13 13 char[] intToString( char[] buf, uint val ) trunk/src/gc/basic/gc.d
r33 r36 29 29 private import gcx; 30 30 private import gcstats; 31 private import stdc.stdlib;31 private import core.stdc.stdlib; 32 32 33 33 version=GCCLASS; trunk/src/gc/basic/gcalloc.d
r29 r36 30 30 version (Windows) 31 31 { 32 private import sys.windows.windows;32 private import core.sys.windows.windows; 33 33 34 34 alias int pthread_t; … … 43 43 else version (Posix) 44 44 { 45 private import stdc.posix.sys.mman;46 private import stdc.stdlib;45 private import core.sys.posix.sys.mman; 46 private import core.stdc.stdlib; 47 47 48 48 //version = GC_Use_Alloc_MMap; … … 50 50 else 51 51 { 52 private import stdc.stdlib;52 private import core.stdc.stdlib; 53 53 54 54 //version = GC_Use_Alloc_Malloc; trunk/src/gc/basic/gcbits.d
r29 r36 31 31 { 32 32 import core.bitmanip; 33 import stdc.string;34 import stdc.stdlib;33 import core.stdc.string; 34 import core.stdc.stdlib; 35 35 extern (C) void onOutOfMemoryError(); 36 36 } trunk/src/gc/basic/gcx.d
r33 r36 53 53 private import gcalloc; 54 54 55 private import cstdlib = stdc.stdlib : calloc, free, malloc, realloc;56 private import stdc.string;57 58 debug private import stdc.stdio;55 private import cstdlib = core.stdc.stdlib : calloc, free, malloc, realloc; 56 private import core.stdc.string; 57 58 debug private import core.stdc.stdio; 59 59 60 60 version (GNU) trunk/src/gc/stub/gc.d
r33 r36 21 21 module gc.gc; 22 22 23 private import stdc.stdlib;23 private import core.stdc.stdlib; 24 24 25 25 private trunk/src/gc/stub/posix.mak
r33 r36 11 11 # Delete unneeded files created by build process 12 12 13 LIB_TARGET= druntime-gc-stub.a14 LIB_MASK= druntime-gc-stub*.a13 LIB_TARGET=libdruntime-gc-stub.a 14 LIB_MASK=libdruntime-gc-stub*.a 15 15 16 16 CP=cp -f … … 21 21 ADD_DFLAGS= 22 22 23 CFLAGS=-O -m32$(ADD_CFLAGS)24 #CFLAGS=-g -m32$(ADD_CFLAGS)23 CFLAGS=-O $(ADD_CFLAGS) 24 #CFLAGS=-g $(ADD_CFLAGS) 25 25 26 ### warnings disabled because gcx has issues ### 26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 27 28 28 DFLAGS=-release -O -inline $(ADD_DFLAGS)29 #DFLAGS=-g $(ADD_DFLAGS)30 29 31 TFLAGS=-O -inline $(ADD_DFLAGS)32 #TFLAGS=-g $(ADD_DFLAGS)30 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 31 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 33 32 34 33 DOCFLAGS=-version=DDoc … … 38 37 DC=dmd 39 38 40 LIB_DEST=.. 39 LIB_DEST=../../../lib 41 40 42 41 .SUFFIXES: .s .S .c .cpp .d .html .o trunk/src/gc/stub/win32.mak
r34 r36 24 24 #CFLAGS=-g -mn -6 -r $(ADD_CFLAGS) 25 25 26 ### warnings disabled because gcx has issues ### 26 DFLAGS=-release -O -inline -w -nofloat $(ADD_DFLAGS) 27 #DFLAGS=-g -w -nofloat $(ADD_DFLAGS) 27 28 28 DFLAGS=-release -O -inline $(ADD_DFLAGS)29 #DFLAGS=-g -release $(ADD_DFLAGS)30 29 31 TFLAGS=-O -inline $(ADD_DFLAGS)32 #TFLAGS=-g $(ADD_DFLAGS)30 TFLAGS=-O -inline -w -nofloat $(ADD_DFLAGS) 31 #TFLAGS=-g -w -nofloat $(ADD_DFLAGS) 33 32 34 33 DOCFLAGS=-version=DDoc
