build msvcrt and crtdll from same source via lib\crt
fix problem with scanf/printf reading/printing doubles
Modified: trunk/reactos/lib/crtdll/crtdll.def
Added: trunk/reactos/lib/crtdll/dllmain.c
Modified: trunk/reactos/lib/crtdll/makefile

Modified: trunk/reactos/lib/crtdll/crtdll.def
--- trunk/reactos/lib/crtdll/crtdll.def	2005-01-27 21:16:41 UTC (rev 13340)
+++ trunk/reactos/lib/crtdll/crtdll.def	2005-01-27 21:17:28 UTC (rev 13341)
@@ -35,16 +35,16 @@
 ; __builtin_new
 ; __builtin_delete
 ; _set_new_handler__FPFUi_i
+; I commented out these, cause i dont get why they were added. -Gunnar
 ;
-;
 LIBRARY CRTDLL.DLL
 EXPORTS
-__builtin_new
-__builtin_delete
-??2@YAPAXI@Z=malloc
-??3@YAXPAX@Z=free
-?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=_set_new_handler__FPFUi_i
-_set_new_handler__FPFUi_i
+;__builtin_new
+;__builtin_delete
+??2@YAPAXI@Z=MSVCRT_operator_new
+??3@YAXPAX@Z=MSVCRT_operator_delete
+?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=MSVCRT__set_new_handler
+;_set_new_handler__FPFUi_i
 _CIacos
 _CIasin
 _CIatan
@@ -61,31 +61,31 @@
 _CIsqrt
 _CItan
 _CItanh
-_HUGE_dll
+_HUGE_dll=_HUGE DATA
 _XcptFilter
 __GetMainArgs
-__argc_dll
-__argv_dll
+__argc_dll=__argc DATA
+__argv_dll=__argv DATA
 __dllonexit
 __doserrno
 __fpecode
 __isascii
 __iscsym=NTDLL.__iscsym
 __iscsymf=NTDLL.__iscsymf
-__mb_cur_max_dll
+__mb_cur_max_dll=__mb_cur_max DATA
 __pxcptinfoptrs
 __threadhandle
 __threadid
 __toascii=NTDLL.__toascii
 _abnormal_termination
 _access
-_acmdln_dll
-_aexit_rtn_dll
+_acmdln_dll=_acmdln DATA
+_aexit_rtn_dll=_aexit_rtn DATA
 _amsg_exit
 _assert
-_basemajor_dll
-_baseminor_dll
-_baseversion_dll
+_basemajor_dll=CRTDLL__basemajor_dll DATA
+_baseminor_dll=CRTDLL__baseminor_dll DATA
+_baseversion_dll=CRTDLL__baseversion_dll DATA
 _beep
 _beginthread
 _c_exit
@@ -100,23 +100,23 @@
 _clearfp
 _close
 _commit
-_commode_dll
+_commode_dll=_commode DATA
 _control87
 _controlfp
 _copysign
 _cprintf
-_cpumode_dll
+_cpumode_dll=_cpumode DATA ;fixme: wine has CRTDLL__cpumode_dll
 _cputs
 _creat
 _cscanf
-_ctype
+_ctype DATA
 _cwait
-_daylight_dll
+_daylight_dll=_daylight DATA
 _dup
 _dup2
 _ecvt
 _endthread
-_environ_dll
+_environ_dll=_environ DATA
 _eof
 _errno
 _except_handler2
@@ -136,23 +136,23 @@
 _fgetchar
 _fgetwchar
 _filbuf
-_fileinfo_dll
+;_fileinfo_dll=_fileinfo DATA
 _filelength
-_fileno
+_fileno DATA
 _findclose
 _findfirst
 _findnext
 _finite
 _flsbuf
 _flushall
-_fmode_dll
+_fmode_dll=__fmode DATA
 _fpclass
 _fpieee_flt
 _fpreset
 _fputchar
 _fputwchar
 _fsopen
-_fstat
+_fstat=CRTDLL__fstat
 _ftime
 _ftol=NTDLL._ftol
 _fullpath
@@ -177,7 +177,7 @@
 _heapwalk
 _hypot
 _initterm
-_iob
+_iob DATA
 _isatty
 _isctype
 _ismbbalnum
@@ -236,7 +236,7 @@
 _mbctolower
 _mbctombb
 _mbctoupper
-_mbctype
+_mbctype DATA
 _mbsbtype
 _mbscat
 _mbschr
@@ -282,21 +282,21 @@
 _onexit
 _open
 _open_osfhandle
-_osmajor_dll
-_osminor_dll
-_osmode_dll
-_osver_dll
-_osversion_dll
+_osmajor_dll=CRTDLL__osmajor_dll DATA
+_osminor_dll=CRTDLL__osminor_dll DATA
+_osmode_dll=CRTDLL__osmode_dll DATA
+_osver_dll=_osver DATA
+_osversion_dll=CRTDLL__osversion_dll DATA
 _pclose
-_pctype_dll
-_pgmptr_dll
+_pctype_dll=_pctype DATA
+_pgmptr_dll=_pgmptr DATA
 _pipe
 _popen
 _purecall
 _putch
 _putenv
 _putw
-_pwctype_dll
+_pwctype_dll=_pwctype DATA
 _read
 _rmdir
 _rmtmp
@@ -321,7 +321,7 @@
 _spawnvp
 _spawnvpe
 _splitpath
-_stat
+_stat=CRTDLL__stat
 _statusfp
 _strcmpi=NTDLL._strcmpi
 _strdate
@@ -343,14 +343,14 @@
 _strtime
 _strupr=NTDLL._strupr
 _swab
-_sys_errlist
-_sys_nerr_dll
+_sys_errlist DATA
+_sys_nerr_dll=_sys_nerr DATA
 _tell
 _tempnam
-_timezone_dll
+_timezone_dll=_timezone
 _tolower=NTDLL._tolower
 _toupper=NTDLL._toupper
-_tzname
+_tzname DATA
 _tzset
 _ultoa=NTDLL._ultoa
 _ultow=NTDLL._ultow
@@ -370,9 +370,9 @@
 _wcsrev
 _wcsset
 _wcsupr
-_winmajor_dll
-_winminor_dll
-_winver_dll
+_winmajor_dll=_winmajor DATA
+_winminor_dll=_winminor DATA
+_winver_dll=_winver DATA
 _write
 _wtoi=NTDLL._wtoi
 _wtol=NTDLL._wtol

Added: trunk/reactos/lib/crtdll/dllmain.c
--- trunk/reactos/lib/crtdll/dllmain.c	2005-01-27 21:16:41 UTC (rev 13340)
+++ trunk/reactos/lib/crtdll/dllmain.c	2005-01-27 21:17:28 UTC (rev 13341)
@@ -0,0 +1,296 @@
+/* $Id: dllmain.c 12852 2005-01-06 13:58:04Z mf $
+ *
+ * dllmain.c
+ *
+ * ReactOS MSVCRT.DLL Compatibility Library
+ *
+ *  THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ *  This source code is offered for use in the public domain. You may
+ *  use, modify or distribute it freely.
+ *
+ *  This code is distributed in the hope that it will be useful but
+ *  WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
+ *  DISCLAMED. This includes but is not limited to warrenties of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $Revision: 1.24 $
+ * $Author: mf $
+ * $Date: 2005-01-06 14:58:04 +0100 (Thu, 06 Jan 2005) $
+ *
+ */
+
+#include "precomp.h"
+#include <msvcrt/internal/tls.h>
+#include <msvcrt/stdlib.h>
+#include <msvcrt/wine/msvcrt.h>
+#include <sys/stat.h>
+
+#define NDEBUG
+#include <msvcrt/msvcrtdbg.h>
+
+
+/* EXTERNAL PROTOTYPES ********************************************************/
+
+//void __fileno_init(void);
+extern BOOL __fileno_init(void);
+extern int BlockEnvToEnvironA(void);
+extern int BlockEnvToEnvironW(void);
+extern void FreeEnvironment(char **environment);
+
+extern unsigned int _osver;
+extern unsigned int _winminor;
+extern unsigned int _winmajor;
+extern unsigned int _winver;
+
+unsigned int CRTDLL__basemajor_dll;
+unsigned int CRTDLL__baseminor_dll;
+unsigned int CRTDLL__baseversion_dll;
+unsigned int CRTDLL__cpumode_dll;
+unsigned int CRTDLL__osmajor_dll;
+unsigned int CRTDLL__osminor_dll;
+unsigned int CRTDLL__osmode_dll;
+unsigned int CRTDLL__osversion_dll;
+
+extern char* _acmdln;        /* pointer to ascii command line */
+extern wchar_t* _wcmdln;     /* pointer to wide character command line */
+#undef _environ
+extern char** _environ;      /* pointer to environment block */
+extern char** __initenv;     /* pointer to initial environment block */
+extern wchar_t** _wenviron;  /* pointer to environment block */
+extern wchar_t** __winitenv; /* pointer to initial environment block */
+
+
+
+/* dev_t is a short in crtdll but an unsigned int in msvcrt */
+typedef short crtdll_dev_t;
+
+struct crtdll_stat
+{
+  crtdll_dev_t   st_dev;
+  _ino_t         st_ino;
+  unsigned short st_mode;
+  short          st_nlink;
+  short          st_uid;
+  short          st_gid;
+  crtdll_dev_t   st_rdev;
+  _off_t         st_size;
+  time_t         st_atime;
+  time_t         st_mtime;
+  time_t         st_ctime;
+};
+
+/* convert struct _stat from crtdll format to msvcrt format */
+static void convert_struct_stat( struct crtdll_stat *dst, const struct _stat *src )
+{
+    dst->st_dev   = src->st_dev;
+    dst->st_ino   = src->st_ino;
+    dst->st_mode  = src->st_mode;
+    dst->st_nlink = src->st_nlink;
+    dst->st_uid   = src->st_uid;
+    dst->st_gid   = src->st_gid;
+    dst->st_rdev  = src->st_rdev;
+    dst->st_size  = src->st_size;
+    dst->st_atime = src->st_atime;
+    dst->st_mtime = src->st_mtime;
+    dst->st_ctime = src->st_ctime;
+}
+
+/* from msvcrt */
+extern void __getmainargs( int *argc, char ***argv, char ***envp,
+                           int expand_wildcards, int *new_mode );
+
+/* LIBRARY GLOBAL VARIABLES ***************************************************/
+
+HANDLE hHeap = NULL;        /* handle for heap */
+
+
+/* LIBRARY ENTRY POINT ********************************************************/
+
+BOOL
+STDCALL
+DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved)
+{
+    switch (dwReason)
+    {
+    case DLL_PROCESS_ATTACH://1
+        /* initialize version info */
+        DPRINT("Attach %d\n", nAttachCount);
+
+        _osver = GetVersion();
+
+        CRTDLL__basemajor_dll   = (_osver >> 24) & 0xFF;
+        CRTDLL__baseminor_dll   = (_osver >> 16) & 0xFF;
+        CRTDLL__baseversion_dll = (_osver >> 16);
+        CRTDLL__cpumode_dll     = 1; /* FIXME */
+        CRTDLL__osmajor_dll     = (_osver >>8) & 0xFF;
+        CRTDLL__osminor_dll     = (_osver & 0xFF);
+        CRTDLL__osmode_dll      = 1; /* FIXME */
+        CRTDLL__osversion_dll   = (_osver & 0xFFFF);
+
+        _winmajor = (_osver >> 8) & 0xFF;
+        _winminor = _osver & 0xFF;
+        _winver = (_winmajor << 8) + _winminor;
+        _osver = (_osver >> 16) & 0xFFFF;
+        hHeap = HeapCreate(0, 100000, 0);
+        if (hHeap == NULL)
+            return FALSE;
+        if (!__fileno_init()) 
+            return FALSE;
+
+        /* create tls stuff */
+        if (!CreateThreadData())
+            return FALSE;
+
+        if (BlockEnvToEnvironA() < 0)
+            return FALSE;
+
+        if (BlockEnvToEnvironW() < 0)
+        {
+            FreeEnvironment((char**)_wenviron);
+            return FALSE;
+        }
+
+        _acmdln = _strdup(GetCommandLineA());
+        _wcmdln = _wcsdup(GetCommandLineW());
+
+        /* FIXME: more initializations... */
+
+        /* FIXME: Initialization of the WINE code */
+        msvcrt_init_mt_locks();
+
+        DPRINT("Attach done\n");
+        break;
+
+    case DLL_THREAD_ATTACH://2
+        break;
+
+    case DLL_THREAD_DETACH://4
+        FreeThreadData(NULL);
+        break;
+
+    case DLL_PROCESS_DETACH://0
+        DPRINT("Detach %d\n", nAttachCount);
+        /* FIXME: more cleanup... */
+        _fcloseall();
+
+        /* destroy tls stuff */
+        DestroyThreadData();
+
+	if (__winitenv && __winitenv != _wenviron)
+            FreeEnvironment((char**)__winitenv);
+        if (_wenviron)
+            FreeEnvironment((char**)_wenviron);
+
+	if (__initenv && __initenv != _environ)
+            FreeEnvironment(__initenv);
+        if (_environ)
+            FreeEnvironment(_environ);
+
+        /* destroy heap */
+        HeapDestroy(hHeap);
+
+        DPRINT("Detach done\n");
+        break;
+    }
+
+    return TRUE;
+}
+
+
+
+
+/*********************************************************************
+ *                  __GetMainArgs  (CRTDLL.@)
+ */
+void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards )
+{
+    int new_mode = 0;
+    __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
+}
+
+
+/*********************************************************************
+ *    _fstat (CRTDLL.@)
+ */
+int CRTDLL__fstat(int fd, struct crtdll_stat* buf)
+{
+    extern int _fstat(int,struct _stat*);
+    struct _stat st;
+    int ret;
+
+    if (!(ret = _fstat( fd, &st ))) convert_struct_stat( buf, &st );
+    return ret;
+}
+
+
+/*********************************************************************
+ *    _stat (CRTDLL.@)
+ */
+int CRTDLL__stat(const char* path, struct crtdll_stat * buf)
+{
+    extern int _stat(const char*,struct _stat*);
+    struct _stat st;
+    int ret;
+
+    if (!(ret = _stat( path, &st ))) convert_struct_stat( buf, &st );
+    return ret;
+}
+
+
+/*********************************************************************
+ *    _strdec (CRTDLL.@)
+ */
+char *_strdec(const char *str1, const char *str2)
+{
+    return (char *)(str2 - 1);
+}
+
+
+/*********************************************************************
+ *    _strinc (CRTDLL.@)
+ */
+char *_strinc(const char *str)
+{
+    return (char *)(str + 1);
+}
+
+
+/*********************************************************************
+ *    _strncnt (CRTDLL.@)
+ */
+size_t _strncnt(const char *str, size_t maxlen)
+{
+    size_t len = strlen(str);
+    return (len > maxlen) ? maxlen : len;
+}
+
+
+/*********************************************************************
+ *    _strnextc (CRTDLL.@)
+ */
+unsigned int _strnextc(const char *str)
+{
+    return (unsigned int)str[0];
+}
+
+
+/*********************************************************************
+ *    _strninc (CRTDLL.@)
+ */
+char *_strninc(const char *str, size_t len)
+{
+    return (char *)(str + len);
+}
+
+
+/*********************************************************************
+ *    _strspnp (CRTDLL.@)
+ */
+char *_strspnp( const char *str1, const char *str2)
+{
+    str1 += strspn( str1, str2 );
+    return *str1 ? (char*)str1 : NULL;
+}
+
+/* EOF */

Modified: trunk/reactos/lib/crtdll/makefile
--- trunk/reactos/lib/crtdll/makefile	2005-01-27 21:16:41 UTC (rev 13340)
+++ trunk/reactos/lib/crtdll/makefile	2005-01-27 21:17:28 UTC (rev 13341)
@@ -2,7 +2,7 @@
 
 PATH_TO_TOP = ../..
 
-PATH_TO_MSVCRT = ../msvcrt
+TARGET_DEFONLY = yes
 
 TARGET_TYPE = dynlink
 
@@ -15,489 +15,39 @@
 # don't remove @nn from exported symbols - needed so dlltool doesn't mess up mangled c++ exports
 RM_AT_FROM_SYMBOLS = no
 
-TARGET_LFLAGS = -nostartfiles -nostdlib
+TARGET_LFLAGS = -nostartfiles -nostdlib --enable-stdcall-fixup
 
-TARGET_CFLAGS = -D_MSVCRT_LIB_ -Werror -Wall
+TARGET_SDKLIBS = crt.a string.a kernel32.a ntdll.a wine.a
 
-# require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_GCCLIBS = gcc
 
-TARGET_SDKLIBS = string.a kernel32.a ntdll.a
+TARGET_CFLAGS = -D__USE_W32API -Wall -Werror
 
-TARGET_GCCLIBS = gcc
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += \
+	-D_DISABLE_TIDENTS \
+	-D__USE_W32API \
+	-D__REACTOS__ \
+	-D_WIN32_IE=0x600 \
+	-D_WIN32_WINNT=0x501 \
+	-DUSE_MSVCRT_PREFIX \
+	-D_MT
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
-TARGET_CLEAN = \
-	conio/*.o \
-	ctype/*.o \
-	direct/*.o \
-	dirent/*.o \
-	except/*.o \
-	float/*.o \
-	io/*.o \
-	libc/*.o \
-	malloc/*.o \
-	math/*.o \
-	mbstring/*.o \
-	misc/*.o \
-	process/*.o \
-	quad/*.o \
-	search/*.o \
-	setjmp/*.o \
-	signal/*.o \
-	stdio/*.o \
-	stdlib/*.o \
-	string/*.o \
-	sys_stat/*.o \
-	tchar/*.o \
-	time/*.o \
-	wchar/*.o
+TARGET_CLEAN = dllmain.o
 
-
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
 
 
-CONIO_OBJECTS = \
-	$(PATH_TO_MSVCRT)/conio/cgets.o \
-	$(PATH_TO_MSVCRT)/conio/cprintf.o \
-	$(PATH_TO_MSVCRT)/conio/cputs.o \
-	$(PATH_TO_MSVCRT)/conio/cscanf.o \
-	$(PATH_TO_MSVCRT)/conio/getch.o \
-	$(PATH_TO_MSVCRT)/conio/getche.o \
-	$(PATH_TO_MSVCRT)/conio/kbhit.o \
-	$(PATH_TO_MSVCRT)/conio/putch.o \
-	$(PATH_TO_MSVCRT)/conio/ungetch.o
 
-CTYPE_OBJECTS = \
-	$(PATH_TO_MSVCRT)/ctype/ctype.o \
-	$(PATH_TO_MSVCRT)/ctype/isalnum.o \
-	$(PATH_TO_MSVCRT)/ctype/isascii.o \
-	$(PATH_TO_MSVCRT)/ctype/iscntrl.o \
-	ctype/isctype.o \
-	$(PATH_TO_MSVCRT)/ctype/isgraph.o \
-	$(PATH_TO_MSVCRT)/ctype/isprint.o \
-	$(PATH_TO_MSVCRT)/ctype/ispunct.o \
-	$(PATH_TO_MSVCRT)/ctype/isupper.o
 
-# REMOVED CTYPE ENTRIES:
-#	$(PATH_TO_MSVCRT)/ctype/isalpha.o \
-#	$(PATH_TO_MSVCRT)/ctype/iscsym.o \
-#	$(PATH_TO_MSVCRT)/ctype/isdigit.o \
-#	$(PATH_TO_MSVCRT)/ctype/islower.o \
-#	$(PATH_TO_MSVCRT)/ctype/isspace.o \
-#	$(PATH_TO_MSVCRT)/ctype/isxdigit.o \
-#	$(PATH_TO_MSVCRT)/ctype/toascii.o \
-#	$(PATH_TO_MSVCRT)/ctype/tolower.o \
-#	$(PATH_TO_MSVCRT)/ctype/toupper.o \
+OBJECTS = 	dllmain.o
 
-DIRECT_OBJECTS = \
-	$(PATH_TO_MSVCRT)/direct/chdir.o \
-	$(PATH_TO_MSVCRT)/direct/chdrive.o \
-	$(PATH_TO_MSVCRT)/direct/getcwd.o \
-	$(PATH_TO_MSVCRT)/direct/getdcwd.o \
-	$(PATH_TO_MSVCRT)/direct/getdfree.o \
-	$(PATH_TO_MSVCRT)/direct/getdrive.o \
-	$(PATH_TO_MSVCRT)/direct/mkdir.o \
-	$(PATH_TO_MSVCRT)/direct/rmdir.o
-
-EXCEPT_OBJECTS = \
-	except/abnorter.o \
-	except/exhand2.o \
-	except/matherr.o \
-	except/unwind.o
-
-FLOAT_OBJECTS = \
-	$(PATH_TO_MSVCRT)/float/chgsign.o \
-	$(PATH_TO_MSVCRT)/float/clearfp.o \
-	$(PATH_TO_MSVCRT)/float/cntrlfp.o \
-	$(PATH_TO_MSVCRT)/float/copysign.o \
-	$(PATH_TO_MSVCRT)/float/fpclass.o \
-	$(PATH_TO_MSVCRT)/float/fpreset.o \
-	$(PATH_TO_MSVCRT)/float/isnan.o \
-	$(PATH_TO_MSVCRT)/float/logb.o \
-	$(PATH_TO_MSVCRT)/float/nafter.o \
-	$(PATH_TO_MSVCRT)/float/scalb.o \
-	$(PATH_TO_MSVCRT)/float/statfp.o
-
-IO_OBJECTS = \
-	$(PATH_TO_MSVCRT)/io/access.o \
-	$(PATH_TO_MSVCRT)/io/chmod.o \
-	$(PATH_TO_MSVCRT)/io/chsize.o \
-	$(PATH_TO_MSVCRT)/io/close.o \
-	$(PATH_TO_MSVCRT)/io/commit.o \
-	io/create.o \
-	io/dup.o \
-	$(PATH_TO_MSVCRT)/io/dup2.o \
-	io/eof.o \
-	$(PATH_TO_MSVCRT)/io/filelen.o \
-	io/find.o \
-	io/fmode.o \
-	$(PATH_TO_MSVCRT)/io/isatty.o \
-	$(PATH_TO_MSVCRT)/io/locking.o \
-	io/lseek.o \
-	$(PATH_TO_MSVCRT)/io/mktemp.o \
-	io/open.o \
-	io/pipe.o \
-	io/read.o \
-	$(PATH_TO_MSVCRT)/io/setmode.o \
-	$(PATH_TO_MSVCRT)/io/sopen.o \
-	$(PATH_TO_MSVCRT)/io/tell.o \
-	$(PATH_TO_MSVCRT)/io/umask.o \
-	io/unlink.o \
-	$(PATH_TO_MSVCRT)/io/utime.o \
-	io/write.o
-
-LOCALE_OBJECTS = \
-	$(PATH_TO_MSVCRT)/locale/locale.o 
-
-MATH_OBJECTS = \
-	$(PATH_TO_MSVCRT)/math/acos.o \
-	math/acosh.o \
-	$(PATH_TO_MSVCRT)/math/asin.o \
-	math/asinh.o \
-	$(PATH_TO_MSVCRT)/math/atan.o \
-	$(PATH_TO_MSVCRT)/math/atan2.o\
-	math/atanh.o \
-	$(PATH_TO_MSVCRT)/math/cabs.o \
-	math/ceil.o \
-	$(PATH_TO_MSVCRT)/math/cos.o \
-	$(PATH_TO_MSVCRT)/math/cosh.o \
-	$(PATH_TO_MSVCRT)/math/exp.o \
-	$(PATH_TO_MSVCRT)/math/fabs.o\
-	math/floor.o \
-	$(PATH_TO_MSVCRT)/math/fmod.o \
-	$(PATH_TO_MSVCRT)/math/frexp.o \
-	math/huge_val.o \
-	$(PATH_TO_MSVCRT)/math/hypot.o \
-	$(PATH_TO_MSVCRT)/math/j0_y0.o \
-	$(PATH_TO_MSVCRT)/math/j1_y1.o \
-	$(PATH_TO_MSVCRT)/math/jn_yn.o \
-	$(PATH_TO_MSVCRT)/math/ldexp.o \
-	$(PATH_TO_MSVCRT)/math/log.o \
-	$(PATH_TO_MSVCRT)/math/log10.o \
-	$(PATH_TO_MSVCRT)/math/modf.o \
-	$(PATH_TO_MSVCRT)/math/pow.o \
-	$(PATH_TO_MSVCRT)/math/sin.o \
-	$(PATH_TO_MSVCRT)/math/sinh.o \
-	$(PATH_TO_MSVCRT)/math/sqrt.o \
-	$(PATH_TO_MSVCRT)/math/stubs.o \
-	$(PATH_TO_MSVCRT)/math/tan.o \
-	$(PATH_TO_MSVCRT)/math/tanh.o
-
-MALLOC_OBJECTS = \
-	malloc/expand.o \
-	malloc/heap.o
-
-MBSTRING_OBJECTS = \
-	$(PATH_TO_MSVCRT)/mbstring/hanzen.o \
-	$(PATH_TO_MSVCRT)/mbstring/ischira.o \
-	$(PATH_TO_MSVCRT)/mbstring/iskana.o \
-	$(PATH_TO_MSVCRT)/mbstring/iskpun.o \
-	$(PATH_TO_MSVCRT)/mbstring/islead.o \
-	$(PATH_TO_MSVCRT)/mbstring/islwr.o \
-	$(PATH_TO_MSVCRT)/mbstring/iskmoji.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbal.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbaln.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbc.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbgra.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbkaln.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismblead.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbpri.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbpun.o \
-	$(PATH_TO_MSVCRT)/mbstring/ismbtrl.o \
-	$(PATH_TO_MSVCRT)/mbstring/isuppr.o \
-	$(PATH_TO_MSVCRT)/mbstring/jistojms.o \
-	$(PATH_TO_MSVCRT)/mbstring/jmstojis.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbbtype.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbccpy.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbclen.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbscat.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbschr.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbscmp.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbscoll.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbscpy.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbscspn.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsdec.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsdup.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsicmp.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsicoll.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsinc.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbslen.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbslwr.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsncat.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsnccnt.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsncmp.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsncoll.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsncpy.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsnextc.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsnicmp.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsnicoll.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsninc.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsnset.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbspbrk.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsrchr.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsrev.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsset.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsspn.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsspnp.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsstr.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbstok.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbstrlen.o \
-	$(PATH_TO_MSVCRT)/mbstring/mbsupr.o
-
-MISC_OBJECTS = \
-	misc/amsg.o \
-	$(PATH_TO_MSVCRT)/misc/assert.o \
-	misc/debug.o \
-	misc/dllmain.o \
-	misc/GetArgs.o \
-	$(PATH_TO_MSVCRT)/misc/initterm.o \
-	misc/purecall.o \
-	misc/setnew.o
-
-PROCESS_OBJECTS = \
-	process/_cwait.o \
-	process/_system.o\
-	$(PATH_TO_MSVCRT)/process/dll.o \
-	process/spawnl.o \
-	process/spawnlp.o \
-	process/spawnlpe.o \
-	process/spawnvp.o \
-	process/spawnv.o \
-	process/spawnve.o \
-	process/spawnle.o \
-	process/execl.o \
-	process/execlp.o \
-	process/execlpe.o \
-	process/execvpe.o \
-	process/execvp.o \
-	process/execv.o \
-	process/execle.o \
-	process/execve.o \
-	$(PATH_TO_MSVCRT)/process/procid.o \
-	process/thread.o \
-	$(PATH_TO_MSVCRT)/process/threadid.o
-
-QUAD_OBJECTS = \
-	quad/qdivrem.o \
-	quad/divdi3.o \
-	quad/moddi3.o \
-	quad/udivdi3.o \
-	quad/umoddi3.o
-
-SEARCH_OBJECTS = \
-	$(PATH_TO_MSVCRT)/search/lfind.o \
-	$(PATH_TO_MSVCRT)/search/lsearch.o
-
-SETJMP_OBJECTS = \
-	$(PATH_TO_MSVCRT)/setjmp/i386/setjmp.o
-
-SIGNAL_OBJECTS = \
-	signal/xcptfil.o \
-	signal/xcptinfo.o \
-	$(PATH_TO_MSVCRT)/signal/signal.o
-
-STDIO_OBJECTS = \
-	$(PATH_TO_MSVCRT)/stdio/allocfil.o \
-	stdio/getenv.o \
-	$(PATH_TO_MSVCRT)/stdio/clearerr.o \
-	$(PATH_TO_MSVCRT)/stdio/fclose.o \
-	$(PATH_TO_MSVCRT)/stdio/fdopen.o \
-	$(PATH_TO_MSVCRT)/stdio/feof.o \
-	stdio/ferror.o \
-	stdio/fflush.o \
-	$(PATH_TO_MSVCRT)/stdio/fgetc.o \
-	stdio/fgetchar.o \
-	$(PATH_TO_MSVCRT)/stdio/fgetpos.o \
-	stdio/fgets.o \
-	stdio/filbuf.o \
-	stdio/fileno.o \
-	$(PATH_TO_MSVCRT)/stdio/flsbuf.o \
-	stdio/fopen.o \
-	$(PATH_TO_MSVCRT)/stdio/fprintf.o \
-	$(PATH_TO_MSVCRT)/stdio/fputc.o \
-	stdio/fputchar.o\
-	stdio/fputs.o \
-	stdio/fread.o \
-	stdio/freopen.o \
-	stdio/fscanf.o \
-	$(PATH_TO_MSVCRT)/stdio/fseek.o \
-	$(PATH_TO_MSVCRT)/stdio/fsetpos.o \
-	stdio/frlist.o \
-	stdio/fsopen.o \
-	stdio/ftell.o \
-	$(PATH_TO_MSVCRT)/stdio/fwalk.o \
-	stdio/fwrite.o \
-	stdio/getc.o \
-	stdio/getchar.o \
-	stdio/gets.o \
-	$(PATH_TO_MSVCRT)/stdio/getw.o \
-	stdio/perror.o \
-	stdio/popen.o \
-	stdio/printf.o \
-	stdio/putc.o \
-	stdio/putchar.o \
-	stdio/puts.o \
-	$(PATH_TO_MSVCRT)/stdio/putw.o \
-	stdio/remove.o \
-	$(PATH_TO_MSVCRT)/stdio/rename.o \
-	$(PATH_TO_MSVCRT)/stdio/rewind.o \
-	$(PATH_TO_MSVCRT)/stdio/rmtmp.o \
-	$(PATH_TO_MSVCRT)/stdio/scanf.o \
-	$(PATH_TO_MSVCRT)/stdio/setbuf.o \
-	stdio/setbuffe.o \
-	stdio/setlineb.o \
-	$(PATH_TO_MSVCRT)/stdio/setvbuf.o \
-	$(PATH_TO_MSVCRT)/stdio/sprintf.o \
-	$(PATH_TO_MSVCRT)/stdio/sscanf.o \
-	$(PATH_TO_MSVCRT)/stdio/stdhnd.o \
-	stdio/stdiohk.o \
-	$(PATH_TO_MSVCRT)/stdio/tempnam.o \
-	$(PATH_TO_MSVCRT)/stdio/tmpfile.o \
-	$(PATH_TO_MSVCRT)/stdio/tmpnam.o \
-	$(PATH_TO_MSVCRT)/stdio/ungetc.o \
-	$(PATH_TO_MSVCRT)/stdio/vfprintf.o \
-	$(PATH_TO_MSVCRT)/stdio/vfscanf.o \
-	$(PATH_TO_MSVCRT)/stdio/vfwprint.o \
-	$(PATH_TO_MSVCRT)/stdio/vprintf.o \
-	$(PATH_TO_MSVCRT)/stdio/vscanf.o \
-	$(PATH_TO_MSVCRT)/stdio/vsprintf.o \
-	$(PATH_TO_MSVCRT)/stdio/vsscanf.o
- 
-STDLIB_OBJECTS = \
-	$(PATH_TO_MSVCRT)/stdlib/_exit.o \
-	$(PATH_TO_MSVCRT)/stdlib/abort.o \
-	$(PATH_TO_MSVCRT)/stdlib/abs.o \
-	$(PATH_TO_MSVCRT)/stdlib/atexit.o \
-	$(PATH_TO_MSVCRT)/stdlib/atof.o \
-	$(PATH_TO_MSVCRT)/stdlib/atoi.o \
-	$(PATH_TO_MSVCRT)/stdlib/atol.o \
-	$(PATH_TO_MSVCRT)/stdlib/bsearch.o \
-	$(PATH_TO_MSVCRT)/stdlib/div.o \
-	$(PATH_TO_MSVCRT)/stdlib/ecvt.o \
-	$(PATH_TO_MSVCRT)/stdlib/ecvtbuf.o \
-	stdlib/errno.o \
-	$(PATH_TO_MSVCRT)/stdlib/fcvt.o \
-	$(PATH_TO_MSVCRT)/stdlib/fcvtbuf.o \
-	stdlib/fullpath.o \
-	$(PATH_TO_MSVCRT)/stdlib/gcvt.o \
-	$(PATH_TO_MSVCRT)/stdlib/itoa.o \
-	stdlib/itow.o \
-	$(PATH_TO_MSVCRT)/stdlib/labs.o \
-	$(PATH_TO_MSVCRT)/stdlib/ldiv.o \
-	$(PATH_TO_MSVCRT)/stdlib/makepath.o \
-	stdlib/malloc.o \
-	stdlib/mbstowcs.o \
-	$(PATH_TO_MSVCRT)/stdlib/obsol.o \
-	stdlib/putenv.o \
-	stdlib/qsort.o \
-	stdlib/rand.o \
-	$(PATH_TO_MSVCRT)/stdlib/rot.o \
-	$(PATH_TO_MSVCRT)/stdlib/senv.o \
-	$(PATH_TO_MSVCRT)/stdlib/splitp.o \
-	$(PATH_TO_MSVCRT)/stdlib/strtod.o \
-	$(PATH_TO_MSVCRT)/stdlib/strtol.o \
-	$(PATH_TO_MSVCRT)/stdlib/strtoul.o \
-	$(PATH_TO_MSVCRT)/stdlib/swab.o \
-	$(PATH_TO_MSVCRT)/stdlib/wcstod.o \
-	stdlib/wcstomb.o
-	
-STRING_OBJECTS = \
-	string/lasttok.o \
-	$(PATH_TO_MSVCRT)/string/strcoll.o \
-	$(PATH_TO_MSVCRT)/string/strdup.o \
-	string/strerror.o \
-	$(PATH_TO_MSVCRT)/string/strrev.o \
-	$(PATH_TO_MSVCRT)/string/strset.o \
-	$(PATH_TO_MSVCRT)/string/strtok.o \
-	$(PATH_TO_MSVCRT)/string/strxfrm.o
-
-#	string/str_old.o \
-#	$(PATH_TO_MSVCRT)/string/memicmp.o \
-#	$(PATH_TO_MSVCRT)/string/stricmp.o \
-#	$(PATH_TO_MSVCRT)/string/strlwr.o \
-#	$(PATH_TO_MSVCRT)/string/strnicmp.o \
-#	$(PATH_TO_MSVCRT)/string/strpbrk.o \
-#	$(PATH_TO_MSVCRT)/string/strstr.o \
-#	$(PATH_TO_MSVCRT)/string/strupr.o \
-
-SYS_STAT_OBJECTS = \
-	sys_stat/fstat.o \
-	$(PATH_TO_MSVCRT)/sys_stat/futime.o \
-	sys_stat/ftime.o \
-	sys_stat/systime.o \
-	sys_stat/stat.o
-
-TCHAR_OBJECTS = \
-	tchar/strdec.o \
-	tchar/strinc.o \
-	tchar/strninc.o \
-	tchar/strncnt.o \
-	tchar/strnextc.o \
-	tchar/strspnp.o
-
-TIME_OBJECTS = \
-	$(PATH_TO_MSVCRT)/time/time.o \
-	$(PATH_TO_MSVCRT)/time/clock.o \
-	$(PATH_TO_MSVCRT)/time/ctime.o \
-	$(PATH_TO_MSVCRT)/time/difftime.o \
-	$(PATH_TO_MSVCRT)/time/strdate.o \
-	$(PATH_TO_MSVCRT)/time/strftime.o \
-	$(PATH_TO_MSVCRT)/time/strtime.o \
-	time/tz_vars.o
-
-WSTRING_OBJECTS = \
-	wchar/wlasttok.o \
-	wchar/wcscoll.o \
-	$(PATH_TO_MSVCRT)/wstring/wcsdup.o \
-	$(PATH_TO_MSVCRT)/wstring/wcsrev.o \
-	$(PATH_TO_MSVCRT)/wstring/wcsset.o \
-	$(PATH_TO_MSVCRT)/wstring/wcstok.o \
-	$(PATH_TO_MSVCRT)/wstring/wcsxfrm.o
-
-#	wchar/wcstod.o \
-#	wchar/wcstok.o \
-#	wchar/wcstol.o \
-#	wchar/wtoi.o \
-#	$(PATH_TO_MSVCRT)/wstring/wcscspn.o \
-#	$(PATH_TO_MSVCRT)/wstring/wcsicmp.o \
-#	$(PATH_TO_MSVCRT)/wstring/wcslwr.o \
-#	$(PATH_TO_MSVCRT)/wstring/wcspbrk.o \
-#	$(PATH_TO_MSVCRT)/wstring/wcsspn.o \
[truncated at 1000 lines; 35 more skipped]