OSDN Git Service

Remove filters for CRTDLL and __MSVCRT__.
authorEarnie Boyd <earnie@users.sourceforge.net>
Fri, 7 Sep 2012 14:36:34 +0000 (10:36 -0400)
committerEarnie Boyd <earnie@users.sourceforge.net>
Fri, 7 Sep 2012 14:36:34 +0000 (10:36 -0400)
* Makefile.in: Remove -[DU]__MSVCRT__ and -[DU]__CRTDLL__.
* crt1.o: Remove CRTDLL specific target.
* dllcrt1.o: Ditto.
* gcrt1.o: Ditto.
* include/assert.h: Modify documentation to remove the use of CRTDLL.
* include/setjmp.h: Ditto.
* src/libcrt/crt/ofmt_stub.s: Ditto.
* include/ctype.h: Ditto.
Remove filters for __MSVCRT__ and unneeded #else coding.
* include/dirent.h: Ditto.
* include/dos.h: Ditto.
* include/io.h: Ditto.
* include/math.h: Ditto.
* include/process.h: Ditto.
* include/stdio.h: Ditto.
* include/stdlib.h: Ditto.
* include/string.h: Ditto.
* include/sys/stat.h: Ditto.
* include/sys/types.h: Ditto.
* include/sys/utime.h: Ditto.
* include/tchar.h: Ditto.
* include/time.h: Ditto.
* include/wchar.h: Ditto.
* include/wctype.h: Ditto.
* src/libcrt/crt/crt1.c: Ditto.
* src/libcrt/crt/init.c: Ditto.
* lib/lib32/moldname.def.in: Remove filters for __CRTDLL__.
* src/libcrt/tlssup.c: Remove filter for CRTDLL.

25 files changed:
ChangeLog
Makefile.in
include/assert.h
include/ctype.h
include/direct.h
include/dos.h
include/io.h
include/math.h
include/process.h
include/setjmp.h
include/stdio.h
include/stdlib.h
include/string.h
include/sys/stat.h
include/sys/types.h
include/sys/utime.h
include/tchar.h
include/time.h
include/wchar.h
include/wctype.h
lib/lib32/moldname.def.in
src/libcrt/crt/crt1.c
src/libcrt/crt/init.c
src/libcrt/crt/ofmt_stub.s
src/libcrt/crt/tlssup.c

index 456f89f..7f5dc47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,38 @@
 2012-09-07  Earnie Boyd  <earnie@users.sourceforge.net>
 
+       Remove filters for CRTDLL and __MSVCRT__.
+
+       * Makefile.in: Remove -[DU]__MSVCRT__ and -[DU]__CRTDLL__.
+       * crt1.o: Remove CRTDLL specific target.
+       * dllcrt1.o: Ditto.
+       * gcrt1.o: Ditto.
+       * include/assert.h: Modify documentation to remove the use of CRTDLL.
+       * include/setjmp.h: Ditto.
+       * src/libcrt/crt/ofmt_stub.s: Ditto.
+       * include/ctype.h: Ditto.
+       Remove filters for __MSVCRT__ and unneeded #else coding.
+       * include/dirent.h: Ditto.
+       * include/dos.h: Ditto.
+       * include/io.h: Ditto.
+       * include/math.h: Ditto.
+       * include/process.h: Ditto.
+       * include/stdio.h: Ditto.
+       * include/stdlib.h: Ditto.
+       * include/string.h: Ditto.
+       * include/sys/stat.h: Ditto.
+       * include/sys/types.h: Ditto.
+       * include/sys/utime.h: Ditto.
+       * include/tchar.h: Ditto.
+       * include/time.h: Ditto.
+       * include/wchar.h: Ditto.
+       * include/wctype.h: Ditto.
+       * src/libcrt/crt/crt1.c: Ditto.
+       * src/libcrt/crt/init.c: Ditto.
+       * lib/lib32/moldname.def.in: Remove filters for __CRTDLL__.
+       * src/libcrt/tlssup.c: Remove filter for CRTDLL.
+
+2012-09-07  Earnie Boyd  <earnie@users.sourceforge.net>
+
        Apply LICENSE to all files as appropriate.
 
        * tests/Makefile.in: Add file preamble.
index 9a8d6e8..d32a229 100644 (file)
@@ -626,7 +626,7 @@ $(msvcrt_DEF): lib/lib32/msvcrt.def.in
        $(CC) -DRUNTIME=$(basename $(notdir $@)) \
                -D__FILENAME__=$@ \
                -D__$(basename $(notdir $@))__=1 \
-               -D__MSVCRT__ -C -E -P -xc-header \
+               -C -E -P -xc-header \
                $? > $@
 
 
@@ -641,7 +641,7 @@ $(moldname_DEF): lib/lib32/moldname.def.in
        $(CC) -DRUNTIME=$(basename $(notdir $@)) \
                -D__FILENAME__=$$F \
                -D__$(basename $(notdir $@))__=1 \
-               -D__MSVCRT__ -C -E -P -xc-header \
+               -C -E -P -xc-header \
                $? > $@
 
 SRCDIR := lib/lib32
@@ -693,13 +693,9 @@ lib%.a: %.o
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
 
 SRCDIR := src/libcrt/crt
-$(SRCDIR)/crt1.o $(SRCDIR)/dllcrt1.o:
-       $(MKDIR_P) $(@D)
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -U__MSVCRT__ -D__CRTDLL__ -o $@ $<
-
 $(SRCDIR)/crt2.o $(SRCDIR)/dllcrt2.o:
        $(MKDIR_P) $(@D)
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -D__MSVCRT__ -U__CRTDLL__ -o $@ $<
+       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
 
 $(SRCDIR)/crt1.o: $(SRCDIR)/crt1.c
 $(SRCDIR)/dllcrt1.o: $(SRCDIR)/dllcrt1.c
@@ -716,13 +712,9 @@ $(libscrnsavw_a_OBJECTS): $(libscrnsavw_a_SOURCES)
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(scrnsavw_o_CFLAGS) -o $@ $<
 
 SRCDIR := misc/gpl/profile
-$(SRCDIR)/gcrt1.o:
-       mkdir -p $(@D)
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -U__MSVCRT__ -D__CRTDLL__ -o $@ $<
-
 $(SRCDIR)/gcrt2.o:
        mkdir -p $(@D)
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -D__MSVCRT__ -U__CRTDLL__ -o $@ $<
+       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
 
 $(SRCDIR)/gcrt1.o $(SRCDIR)/gcrt2.o: $(SRCDIR)/gcrt0.c
 
index 1eddeed..6f9cdd0 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
 #else /* debugging enabled */
 
 /*
- * CRTDLL nicely supplies a function which does the actual output and
+ * The runtime nicely supplies a function which does the actual output and
  * call to abort.
  */
 _CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
index 28ca1a9..e744a09 100644 (file)
@@ -90,7 +90,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW toupper(int);
 
 /*
  * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
+ * explicitly by MSVCRT.DLL. However, underscored versions are also
  * exported.
  */
 #ifndef        __STRICT_ANSI__
@@ -105,22 +105,11 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int);
 /* Also defined in stdlib.h */
 #ifndef MB_CUR_MAX
 #ifdef __DECLSPEC_SUPPORTED
-# ifdef __MSVCRT__
-#  define MB_CUR_MAX __mb_cur_max
    __MINGW_IMPORT int __mb_cur_max;
-# else /* not __MSVCRT */
-#  define MB_CUR_MAX __mb_cur_max_dll
-   __MINGW_IMPORT int __mb_cur_max_dll;
-# endif        /* not __MSVCRT */
-
+#  define MB_CUR_MAX __mb_cur_max
 #else          /* ! __DECLSPEC_SUPPORTED */
-# ifdef __MSVCRT__
    extern int* _imp____mb_cur_max;
 #  define MB_CUR_MAX (*_imp____mb_cur_max)
-# else         /* not __MSVCRT */
-   extern int*  _imp____mb_cur_max_dll;
-#  define MB_CUR_MAX (*_imp____mb_cur_max_dll)
-# endif        /* not __MSVCRT */
 #endif         /*  __DECLSPEC_SUPPORTED */
 #endif  /* MB_CUR_MAX */
 
@@ -129,25 +118,15 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int);
 # if __MSVCRT_VERSION__ <= 0x0700
   __MINGW_IMPORT unsigned short _ctype[];
 # endif
-# ifdef __MSVCRT__
   __MINGW_IMPORT unsigned short* _pctype;
-# else /* CRTDLL */
-  __MINGW_IMPORT unsigned short* _pctype_dll;
-# define  _pctype _pctype_dll
-# endif 
 
 #else          /*  __DECLSPEC_SUPPORTED */
 # if __MSVCRT_VERSION__ <= 0x0700
   extern unsigned short** _imp___ctype;
 # define _ctype (*_imp___ctype)
 # endif
-# ifdef __MSVCRT__
   extern unsigned short** _imp___pctype;
 # define _pctype (*_imp___pctype)
-# else /* CRTDLL */
-  extern unsigned short** _imp___pctype_dll;
-# define _pctype (*_imp___pctype_dll)
-# endif /* CRTDLL */
 #endif         /*  __DECLSPEC_SUPPORTED */
 
 /*
index 149b8ed..5c576f5 100644 (file)
@@ -68,13 +68,11 @@ _CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfre
 
 #ifndef _WDIRECT_DEFINED
 /* wide character versions. Also in wchar.h */
-#ifdef __MSVCRT__ 
 _CRTIMP int __cdecl __MINGW_NOTHROW _wchdir(const wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd(wchar_t*, int);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd(int, wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir(const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir(const wchar_t*);
-#endif /* __MSVCRT__ */
 #define _WDIRECT_DEFINED
 #endif
 
index 25d06d4..e2c629f 100644 (file)
 extern "C" {
 #endif
 
-#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
-#ifndef __DECLSPEC_SUPPORTED
-extern unsigned int *_imp___basemajor_dll;
-extern unsigned int *_imp___baseminor_dll;
-extern unsigned int *_imp___baseversion_dll;
-extern unsigned int *_imp___osmajor_dll;
-extern unsigned int *_imp___osminor_dll;
-extern unsigned int *_imp___osmode_dll;
-
-#define _basemajor (*_imp___basemajor_dll)
-#define _baseminor (*_imp___baseminor_dll)
-#define _baseversion (*_imp___baseversion_dll)
-#define _osmajor (*_imp___osmajor_dll)
-#define _osminor (*_imp___osminor_dll)
-#define _osmode (*_imp___osmode_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT unsigned int _basemajor_dll;
-__MINGW_IMPORT unsigned int _baseminor_dll;
-__MINGW_IMPORT unsigned int _baseversion_dll;
-__MINGW_IMPORT unsigned int _osmajor_dll;
-__MINGW_IMPORT unsigned int _osminor_dll;
-__MINGW_IMPORT unsigned int _osmode_dll;
-
-#define _basemajor _basemajor_dll
-#define _baseminor _baseminor_dll
-#define _baseversion _baseversion_dll
-#define _osmajor _osmajor_dll
-#define _osminor _osminor_dll
-#define _osmode _osmode_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-#endif /* ! __MSVCRT__ */
-
 #ifndef _DISKFREE_T_DEFINED
 /* needed by _getdiskfree (also in direct.h) */
 struct _diskfree_t {
index 521871e..77e4559 100644 (file)
@@ -267,7 +267,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _mkdir (const char*);
 _CRTIMP char* __cdecl __MINGW_NOTHROW _mktemp (char*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _rmdir (const char*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
-#ifdef __MSVCRT__
 _CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int);
 #if __MSVCRT_VERSION__ < 0x0800
 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*);
@@ -306,8 +305,6 @@ __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence)
 }
 #endif
 
-#endif /* __MSVCRT__ */
-
 #ifndef _NO_OLDNAMES
 
 #ifndef _UWIN
@@ -398,9 +395,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, unsigned int);
 
 /* Wide character versions. Also declared in wchar.h. */
-/* Not in crtdll.dll */
 #if !defined (_WIO_DEFINED)
-#if defined (__MSVCRT__)
 _CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int);
@@ -441,7 +436,6 @@ _CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, s
 _CRTALIAS int  __cdecl __MINGW_NOTHROW _wfindnexti64 (intptr_t _v1, struct _wfinddatai64_t* _v2)        { return(_wfindnext32i64  (_v1,(struct _wfinddata32i64_t*)_v2)); }
 #endif /* !_USE_32BIT_TIME_T */
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
-#endif /* defined (__MSVCRT__) */
 #define _WIO_DEFINED
 #endif /* _WIO_DEFINED */
 
index 03f6bd0..f286999 100644 (file)
@@ -106,8 +106,6 @@ extern "C" {
  * __imp__HUGE is a pointer to the actual variable _HUGE in
  * MSVCRT.DLL. If we used _HUGE directly we would get a pointer
  * to a thunk function.
- *
- * NOTE: The CRTDLL version uses _HUGE_dll instead.
  */
 
 #if __MINGW_GNUC_PREREQ(3, 3)
@@ -116,25 +114,13 @@ extern "C" {
 
 #ifndef __DECLSPEC_SUPPORTED
 
-#ifdef __MSVCRT__
 extern double* _imp___HUGE;
 #define        HUGE_VAL        (*_imp___HUGE)
-#else
-/* CRTDLL */
-extern double* _imp___HUGE_dll;
-#define        HUGE_VAL        (*_imp___HUGE_dll)
-#endif
 
 #else /* __DECLSPEC_SUPPORTED */
 
-#ifdef __MSVCRT__
 __MINGW_IMPORT double  _HUGE;
 #define        HUGE_VAL        _HUGE
-#else
-/* CRTDLL */
-__MINGW_IMPORT double  _HUGE_dll;
-#define        HUGE_VAL        _HUGE_dll
-#endif
 
 #endif /* __DECLSPEC_SUPPORTED */
 #endif /* __MINGW_GNUC_PREREQ(3, 3) */
index c8cbb1d..094e644 100644 (file)
@@ -121,9 +121,6 @@ _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const
 #endif
 
 /*
- * The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
- * They are provided by MSVCRT.
- *
  * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
  * making for race conditions if you are not careful. Basically you have to
  * make sure that no-one is going to do *anything* with the thread handle
@@ -135,13 +132,10 @@ _CRTIMP unsigned long __cdecl __MINGW_NOTHROW
        _beginthread    (void (*)(void *), unsigned, void*);
 _CRTIMP void __cdecl __MINGW_NOTHROW _endthread        (void);
 
-#ifdef __MSVCRT__
 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW
        _beginthreadex  (void *, unsigned, unsigned (__stdcall *) (void *), 
                         void*, unsigned, unsigned*);
 _CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);
-#endif
-
 
 #ifndef        _NO_OLDNAMES
 /*
index 0c694bb..ed5e802 100644 (file)
@@ -46,7 +46,7 @@ extern "C" {
 typedef _JBTYPE jmp_buf[_JBLEN];
 
 /*
- * The function provided by CRTDLL which appears to do the actual work
+ * The function provided by MSVCRT.DLL which appears to do the actual work
  * of setjmp.
  */
 _CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
index a6d7112..d81b29a 100644 (file)
@@ -461,15 +461,10 @@ size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE
  * this type are unknown, but we (the compiler) need to know the size
  * because the programmer using fgetpos and fsetpos will be setting aside
  * storage for fpos_t structres. Actually I tested using a byte array and
- * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
- * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
+ * it is fairly evident that the fpos_t it's a 64-bit number in
  * MSVCRT however, and for now `long long' will do.
  */
-#ifdef __MSVCRT__
 typedef long long fpos_t;
-#else
-typedef long   fpos_t;
-#endif
 
 _CRTIMP int __cdecl __MINGW_NOTHROW    fgetpos (FILE*, fpos_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    fsetpos (FILE*, const fpos_t*);
@@ -517,10 +512,8 @@ _CRTIMP FILE* __cdecl __MINGW_NOTHROW      _fdopen (int, const char*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _fileno (FILE*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _fcloseall (void);
 _CRTIMP FILE* __cdecl __MINGW_NOTHROW  _fsopen (const char*, const char*, int);
-#ifdef __MSVCRT__
 _CRTIMP int __cdecl __MINGW_NOTHROW    _getmaxstdio (void);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _setmaxstdio (int);
-#endif
 
 #if __MSVCRT_VERSION__ >= 0x800
 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
@@ -544,7 +537,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*);
 #define fileno(__F) ((__F)->_file)
 #endif
 
-#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
+#if !defined (__NO_MINGW_LFS)
 #include <sys/types.h>
 __CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char*, const char*);
 __CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
@@ -557,7 +550,7 @@ int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
 #ifdef __USE_MINGW_FSEEK
 int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
 #define fseeko64(fp, offset, whence)  __mingw_fseeko64(fp, offset, whence)
-#endif
+#endif /* __USER_MINGW_FSEEK */
 
 __CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE *);
 __CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
@@ -596,7 +589,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
 _CRTIMP int __cdecl __MINGW_NOTHROW    vswprintf (wchar_t*, const wchar_t*, __VALIST);
 #endif
 
-#ifdef __MSVCRT__ 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    fputws (const wchar_t*, FILE*);
 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
@@ -619,7 +611,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wperror (const wchar_t*);
 _CRTIMP FILE* __cdecl __MINGW_NOTHROW  _wpopen (const wchar_t*, const wchar_t*);
 #endif  /* __STRICT_ANSI__ */
-#endif /* __MSVCRT__ */
 
 #ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t*  format, ...);
@@ -640,11 +631,9 @@ int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
 #endif /* _WSTDIO_DEFINED */
 
 #ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
 #ifndef NO_OLDNAMES
 _CRTIMP FILE* __cdecl __MINGW_NOTHROW  wpopen (const wchar_t*, const wchar_t*);
 #endif /* not NO_OLDNAMES */
-#endif /* MSVCRT runtime */
 
 /*
  * Other Non ANSI wide functions
index 2105b86..d0b7cb8 100644 (file)
@@ -86,7 +86,6 @@ extern int    _argc;
 extern char**  _argv;
 
 /* imports from runtime dll of the above variables */
-#ifdef __MSVCRT__
 
 extern int*  __cdecl __MINGW_NOTHROW   __p___argc(void);
 extern char*** __cdecl __MINGW_NOTHROW  __p___argv(void);
@@ -96,47 +95,17 @@ extern wchar_t***  __cdecl __MINGW_NOTHROW __p___wargv(void);
 #define __argv (*__p___argv())
 #define __wargv (*__p___wargv())
 
-#else /* !MSVCRT */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern int*    _imp____argc_dll;
-extern char***  _imp____argv_dll;
-#define __argc (*_imp____argc_dll)
-#define __argv (*_imp____argv_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT int    __argc_dll;
-__MINGW_IMPORT char**  __argv_dll;
-#define __argc __argc_dll
-#define __argv __argv_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* __MSVCRT */
 #endif /* __STRICT_ANSI__ */
 /*
  * Also defined in ctype.h.
  */
 #ifndef MB_CUR_MAX
 #ifdef __DECLSPEC_SUPPORTED
-# ifdef __MSVCRT__
 #  define MB_CUR_MAX __mb_cur_max
    __MINGW_IMPORT int __mb_cur_max;
-# else         /* not __MSVCRT */
-#  define MB_CUR_MAX __mb_cur_max_dll
-   __MINGW_IMPORT int __mb_cur_max_dll;
-# endif                /* not __MSVCRT */
-
 #else          /* ! __DECLSPEC_SUPPORTED */
-# ifdef __MSVCRT__
    extern int* _imp____mb_cur_max;
 #  define MB_CUR_MAX (*_imp____mb_cur_max)
-# else         /* not __MSVCRT */
-   extern int*  _imp____mb_cur_max_dll;
-#  define MB_CUR_MAX (*_imp____mb_cur_max_dll)
-# endif        /* not __MSVCRT */
 #endif         /*  __DECLSPEC_SUPPORTED */
 #endif  /* MB_CUR_MAX */
 
@@ -159,24 +128,13 @@ extern int errno;
  * Use environ from the DLL, not as a global. 
  */
 
-#ifdef __MSVCRT__
   extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void);
   extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW  __p__wenviron(void);
 # define _environ (*__p__environ())
 # define _wenviron (*__p__wenviron())
-#else /* ! __MSVCRT__ */
-# ifndef __DECLSPEC_SUPPORTED
-    extern char *** _imp___environ_dll;
-#   define _environ (*_imp___environ_dll)
-# else /* __DECLSPEC_SUPPORTED */
-    __MINGW_IMPORT char ** _environ_dll;
-#   define _environ _environ_dll
-# endif /* __DECLSPEC_SUPPORTED */
-#endif /* ! __MSVCRT__ */
 
 #define environ _environ
 
-#ifdef __MSVCRT__
 /* One of the MSVCRTxx libraries */
 
 #ifndef __DECLSPEC_SUPPORTED
@@ -189,20 +147,6 @@ extern int errno;
 # endif /* _UWIN */
 #endif /* __DECLSPEC_SUPPORTED */
 
-#else /* ! __MSVCRT__ */
-
-/* CRTDLL run time library */
-
-#ifndef __DECLSPEC_SUPPORTED
-  extern int*  _imp___sys_nerr_dll;
-# define sys_nerr      (*_imp___sys_nerr_dll)
-#else /* __DECLSPEC_SUPPORTED */
-  __MINGW_IMPORT int   _sys_nerr_dll;
-# define sys_nerr      _sys_nerr_dll
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* ! __MSVCRT__ */
-
 #ifndef __DECLSPEC_SUPPORTED
 extern char*** _imp__sys_errlist;
 #define        sys_errlist     (*_imp___sys_errlist)
@@ -217,9 +161,6 @@ __MINGW_IMPORT char*        _sys_errlist[];
  * OS version and such constants.
  */
 
-#ifdef __MSVCRT__
-/* msvcrtxx.dll */
-
 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int*   __p__osver(void);
 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int*   __p__winver(void);
 extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int*   __p__winmajor(void);
@@ -237,54 +178,13 @@ __MINGW_IMPORT unsigned int _winmajor;
 __MINGW_IMPORT unsigned int _winminor;
 #endif /* __DECLSPEC_SUPPORTED */
 
-#else
-/* Not msvcrtxx.dll, thus crtdll.dll */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern unsigned int*   _imp___osver_dll;
-extern unsigned int*   _imp___winver_dll;
-extern unsigned int*   _imp___winmajor_dll;
-extern unsigned int*   _imp___winminor_dll;
-
-#define _osver         (*_imp___osver_dll)
-#define _winver                (*_imp___winver_dll)
-#define _winmajor      (*_imp___winmajor_dll)
-#define _winminor      (*_imp___winminor_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT unsigned int    _osver_dll;
-__MINGW_IMPORT unsigned int    _winver_dll;
-__MINGW_IMPORT unsigned int    _winmajor_dll;
-__MINGW_IMPORT unsigned int    _winminor_dll;
-
-#define _osver         _osver_dll
-#define _winver                _winver_dll
-#define _winmajor      _winmajor_dll
-#define _winminor      _winminor_dll
 
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif
-
-#if defined  __MSVCRT__
 /* although the _pgmptr is exported as DATA,
  * be safe and use the access function __p__pgmptr() to get it. */
 _CRTIMP char** __cdecl __MINGW_NOTHROW __p__pgmptr(void);
 #define _pgmptr     (*__p__pgmptr())
 _CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void);
 #define _wpgmptr    (*__p__wpgmptr())
-#else /* ! __MSVCRT__ */
-# ifndef __DECLSPEC_SUPPORTED
-  extern char** __imp__pgmptr_dll;
-# define _pgmptr (*_imp___pgmptr_dll)
-# else /* __DECLSPEC_SUPPORTED */
- __MINGW_IMPORT char* _pgmptr_dll;
-# define _pgmptr _pgmptr_dll
-# endif /* __DECLSPEC_SUPPORTED */
-/* no wide version in CRTDLL */
-#endif /* __MSVCRT__ */
 
 /*
  * This variable determines the default file mode.
@@ -292,23 +192,12 @@ _CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void);
  */
 #if !defined (__DECLSPEC_SUPPORTED) || defined (__IN_MINGW_RUNTIME)
 
-#ifdef __MSVCRT__
 extern int* _imp___fmode;
 #define        _fmode  (*_imp___fmode)
-#else
-/* CRTDLL */
-extern int* _imp___fmode_dll;
-#define        _fmode  (*_imp___fmode_dll)
-#endif
 
 #else /* __DECLSPEC_SUPPORTED */
 
-#ifdef __MSVCRT__
 __MINGW_IMPORT  int _fmode;
-#else /* ! __MSVCRT__ */
-__MINGW_IMPORT  int _fmode_dll;
-#define        _fmode  _fmode_dll
-#endif /* ! __MSVCRT__ */
 
 #endif /* __DECLSPEC_SUPPORTED */
 
@@ -353,7 +242,6 @@ _CRTIMP double __cdecl __MINGW_NOTHROW      wcstod  (const wchar_t*, wchar_t**);
 float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
 long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
 #endif /* __NO_ISOCEXT */
-#ifdef __MSVCRT__ 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wputenv(const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
@@ -361,7 +249,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW         _wsystem(const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW    _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW   _wfullpath (wchar_t*, const wchar_t*, size_t);
-#endif
 #define _WSTDLIB_DEFINED
 #endif
 
@@ -447,7 +334,6 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW  _itow (int, wchar_t*, int);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW  _ltow (long, wchar_t*, int);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW  _ultow (unsigned long, wchar_t*, int);
 
-#ifdef __MSVCRT__
 _CRTIMP __int64 __cdecl __MINGW_NOTHROW        _atoi64(const char *);
 _CRTIMP char* __cdecl __MINGW_NOTHROW  _i64toa(__int64, char *, int);
 _CRTIMP char* __cdecl __MINGW_NOTHROW  _ui64toa(unsigned __int64, char *, int);
@@ -493,7 +379,6 @@ typedef void
 _invalid_parameter_handler _set_invalid_parameter_handler (_invalid_parameter_handler);
 
 # endif /* __MSVCRT_VERSION__ >= 0x800 */
-#endif /* __MSVCRT__ */
 
 #ifndef        _NO_OLDNAMES
 
@@ -536,7 +421,6 @@ __CRT_INLINE long long __cdecl __MINGW_NOTHROW llabs(long long _j)
 long long  __cdecl __MINGW_NOTHROW strtoll (const char* __restrict__, char** __restrict, int);
 unsigned long long  __cdecl __MINGW_NOTHROW strtoull (const char* __restrict__, char** __restrict__, int);
 
-#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */ 
 long long  __cdecl __MINGW_NOTHROW atoll (const char *);
 
 #if !defined (__STRICT_ANSI__)
@@ -563,8 +447,6 @@ __CRT_INLINE wchar_t*  __cdecl __MINGW_NOTHROW ulltow (unsigned long long _n, wc
 #endif /* (__NO_INLINE__) */
 #endif /* (__STRICT_ANSI__)  */
 
-#endif /* __MSVCRT__ */
-
 #endif /* !__NO_ISOCEXT */
 
 
index dfb9294..b530de5 100644 (file)
@@ -73,7 +73,7 @@ _CRTIMP size_t __cdecl __MINGW_NOTHROW        strxfrm (char*, const char*, size_t);
 
 #ifndef __STRICT_ANSI__
 /*
- * Extra non-ANSI functions provided by the CRTDLL library
+ * Extra non-ANSI functions provided by the runtime library
  */
 _CRTIMP char* __cdecl __MINGW_NOTHROW  _strerror (const char *);
 _CRTIMP void* __cdecl __MINGW_NOTHROW  _memccpy (void*, const void*, int, size_t);
@@ -90,10 +90,8 @@ _CRTIMP char* __cdecl __MINGW_NOTHROW        _strset (char*, int);
 _CRTIMP char* __cdecl __MINGW_NOTHROW  _strupr (char*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _swab (const char*, char*, size_t);
 
-#ifdef __MSVCRT__
 _CRTIMP int __cdecl __MINGW_NOTHROW  _strncoll(const char*, const char*, size_t);
 _CRTIMP int __cdecl __MINGW_NOTHROW  _strnicoll(const char*, const char*, size_t);
-#endif
 
 #ifndef        _NO_OLDNAMES
 /*
@@ -156,11 +154,8 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
 
 #ifndef        __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI string functions provided by CRTDLL.
- */
 
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
+/* NOTE: _wcscmpi not provided by MSVCRT.DLL, this define is for portability */
 #define                _wcscmpi        _wcsicmp
 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
@@ -173,14 +168,12 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
 
-#ifdef __MSVCRT__
 _CRTIMP int __cdecl __MINGW_NOTHROW  _wcsncoll(const wchar_t*, const wchar_t*, size_t);
 _CRTIMP int   __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
 #if __MSVCRT_VERSION__ >= 0x0700
 _CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
 _CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
 #endif
-#endif
 
 #ifndef        _NO_OLDNAMES
 /* NOTE: There is no _wcscmpi, but this is for compatibility. */
index 1a22dfb..b39a792 100644 (file)
@@ -130,7 +130,6 @@ struct stat
 };
 #endif /* _NO_OLDNAMES */
 
-#if defined (__MSVCRT__)
 struct _stati64 {
     _dev_t st_dev;
     _ino_t st_ino;
@@ -202,7 +201,6 @@ struct _stat64i32 {
        __time64_t      st_ctime;
 };
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
-#endif /* __MSVCRT__ */
 #define _STAT_DEFINED
 #endif /* _STAT_DEFINED */
 
@@ -227,7 +225,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
 
 #endif /* Not _NO_OLDNAMES */
 
-#if defined (__MSVCRT__)
 #if __MSVCRT_VERSION__ < 0x0800
 _CRTIMP int __cdecl __MINGW_NOTHROW  _fstati64(int, struct _stati64 *);
 _CRTIMP int __cdecl __MINGW_NOTHROW  _stati64(const char *, struct _stati64 *);
@@ -280,7 +277,6 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW       _wstati64 (const wchar_t* _v1, struct _sta
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
 #define _WSTAT_DEFINED
 #endif /* _WSTAT_DEFIND */
-#endif /* __MSVCRT__ */
 
 #ifdef __cplusplus
 }
index 47cc3df..bb34549 100644 (file)
@@ -72,11 +72,7 @@ typedef _off_t       off_t;
 
 #ifndef _DEV_T_
 #define        _DEV_T_
-#ifdef __MSVCRT__
 typedef unsigned int _dev_t;
-#else
-typedef short _dev_t;
-#endif
 
 #ifndef        _NO_OLDNAMES
 typedef _dev_t dev_t;
index dfbaefe..760ea5f 100644 (file)
@@ -81,11 +81,9 @@ _CRTIMP int __cdecl __MINGW_NOTHROW  _futime (int, struct _utimbuf*);
 
 /* The wide character version, only available for MSVCRT versions of the
  * C runtime library. */
-#ifdef __MSVCRT__
 #if __MSVCRT_VERSION__ < 0x0800
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wutime (const wchar_t*, struct _utimbuf*);
 #endif
-#endif /* MSVCRT runtime */
 
 /* These require newer versions of msvcrt.dll (6.10 or higher).  */ 
 #if __MSVCRT_VERSION__ >= 0x0601
index e72a8d8..5a4ef8c 100644 (file)
@@ -179,9 +179,7 @@ typedef wchar_t _TCHAR;
 #define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
 #define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
 
-#if 1  /* defined __MSVCRT__ */
 /*
- *   These wide functions not in crtdll.dll.
  *   Define macros anyway so that _wfoo rather than _tfoo is undefined
  */
 #define _ttoi64     _wtoi64
@@ -262,7 +260,6 @@ typedef wchar_t _TCHAR;
 #define _tstat32i64    _wstat32i64
 #define _tstat64i32    _wstat64i32
 #endif /* __MSVCRT_VERSION__ > 0x0800 */
-#endif  /* __MSVCRT__ */
 
 /* dirent structures and functions */
 #define _tdirent       _wdirent
@@ -447,8 +444,6 @@ typedef char        _TCHAR;
 #define _trmdir            _rmdir
 #define _tstat      _stat
 
-#if 1  /* defined __MSVCRT__ */
-/* Not in crtdll.dll. Define macros anyway? */
 #define _ttoi64     _atoi64
 #define _i64tot     _i64toa
 #define _ui64tot    _ui64toa
@@ -478,7 +473,6 @@ typedef char        _TCHAR;
 #define _tstat32i64    _stat32i64
 #define _tstat64i32    _stat64i32
 #endif /* __MSVCRT_VERSION__ > 0x0800 */
-#endif  /* __MSVCRT__ */
 
 /* dirent structures and functions */
 #define _tdirent       dirent
index 8d463b0..ece1a94 100644 (file)
@@ -194,7 +194,6 @@ _CRTALIAS struct tm*           __cdecl __MINGW_NOTHROW      localtime (const time_t* _v)      {
  * _tzname: standard/daylight savings time zone names (an array with two
  *          elements).
  */
-#ifdef __MSVCRT__
 
 /* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
 extern _CRTIMP int* __cdecl __MINGW_NOTHROW    __p__daylight (void);
@@ -205,62 +204,18 @@ __MINGW_IMPORT int        _daylight;
 __MINGW_IMPORT long    _timezone;
 __MINGW_IMPORT char    *_tzname[2];
 
-#else /* not __MSVCRT (ie. crtdll) */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern int*    _imp___daylight_dll;
-extern long*   _imp___timezone_dll;
-extern char**  _imp___tzname;
-
-#define _daylight      (*_imp___daylight_dll)
-#define _timezone      (*_imp___timezone_dll)
-#define _tzname                (*_imp___tzname)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT int     _daylight_dll;
-__MINGW_IMPORT long    _timezone_dll;
-__MINGW_IMPORT char*   _tzname[2];
-
-#define _daylight      _daylight_dll
-#define _timezone      _timezone_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* not __MSVCRT__ */
-
 #endif /* Not __STRICT_ANSI__ */
 
 #ifndef _NO_OLDNAMES
-
-#ifdef __MSVCRT__
-
 /* These go in the oldnames import library for MSVCRT. */
 __MINGW_IMPORT int     daylight;
 __MINGW_IMPORT long    timezone;
 __MINGW_IMPORT char    *tzname[2];
-
-#else /* not __MSVCRT__ */
-
-/* CRTDLL is royally messed up when it comes to these macros.
-   TODO: import and alias these via oldnames import library instead 
-   of macros.  */
-
-#define daylight        _daylight
-/* NOTE: timezone not defined as macro because it would conflict with
-   struct timezone in sys/time.h.
-   Also, tzname used to a be macro, but now it's in moldname. */
-__MINGW_IMPORT char    *tzname[2];
-
-#endif /* not __MSVCRT__ */
-
 #endif /* Not _NO_OLDNAMES */
 
 #ifndef _WTIME_DEFINED
 /* wide function prototypes, also declared in wchar.h */
 #ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW       _wasctime(const struct tm*);
 #if __MSVCRT_VERSION__ < 0x0800
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW       _wctime(const time_t*);
@@ -278,7 +233,6 @@ _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW  _wctime (const time_t* _v) { return(_
 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW     _wctime (const time_t* _v) { return(_wctime32 (_v)); }
 #endif
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
-#endif /*  __MSVCRT__ */
 #endif /* __STRICT_ANSI__ */
 _CRTIMP size_t __cdecl __MINGW_NOTHROW         wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
 #define _WTIME_DEFINED
index fdf9728..54f0e51 100644 (file)
@@ -126,7 +126,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
 _CRTIMP int __cdecl __MINGW_NOTHROW    vswprintf (wchar_t*, const wchar_t*, __VALIST);
 #endif
 
-#ifdef __MSVCRT__
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    fputws (const wchar_t*, FILE*);
 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
@@ -147,7 +146,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wperror (const wchar_t*);
 _CRTIMP FILE* __cdecl __MINGW_NOTHROW  _wpopen (const wchar_t*, const wchar_t*);
 #endif  /* __STRICT_ANSI__ */
-#endif /* __MSVCRT__ */
 
 #ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t*, size_t, const wchar_t*, ...);
@@ -175,7 +173,6 @@ _CRTIMP double __cdecl __MINGW_NOTHROW      wcstod (const wchar_t*, wchar_t**);
 float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
 long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
 #endif /* __NO_ISOCEXT */
-#ifdef __MSVCRT__ 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wputenv(const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
@@ -183,7 +180,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
 _CRTIMP void __cdecl __MINGW_NOTHROW   _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
-#endif
 _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int);
 _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t);
 _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int);
@@ -193,7 +189,6 @@ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int,
 
 #ifndef _WTIME_DEFINED
 #ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
 /* wide function prototypes, also declared in time.h */
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW       _wasctime (const struct tm*);
 #if __MSVCRT_VERSION__ < 0x0800
@@ -213,7 +208,6 @@ _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW  _wctime (const time_t* _v)      { return(_
 #endif
 #endif
 
-#endif /* __MSVCRT__ */
 #endif /* __STRICT_ANSI__ */
 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
 #define _WTIME_DEFINED
@@ -244,11 +238,7 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
 
 #ifndef        __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI functions provided by CRTDLL.
- */
-
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
+/* NOTE: _wcscmpi not provided by runtime dll, this define is for portability */
 #define                _wcscmpi        _wcsicmp
 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
@@ -261,14 +251,12 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
 
-#ifdef __MSVCRT__
 _CRTIMP int __cdecl __MINGW_NOTHROW  _wcsncoll(const wchar_t*, const wchar_t*, size_t);
 _CRTIMP int   __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
 #if __MSVCRT_VERSION__ >= 0x0700
 _CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
 _CRTIMP  wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
 #endif
-#endif
 
 #ifndef        _NO_OLDNAMES
 /* NOTE: There is no _wcscmpi, but this is for compatibility. */
@@ -410,10 +398,7 @@ struct _wfinddata64i32_t {
 #endif
 
 /* Wide character versions. Also defined in io.h. */
-/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
-   applies to other wide character versions? */
 #if !defined (_WIO_DEFINED)
-#if defined (__MSVCRT__)
 #include <stdint.h>  /* For intptr_t.  */
 _CRTIMP int __cdecl __MINGW_NOTHROW    _waccess (const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wchmod (const wchar_t*, int);
@@ -455,19 +440,16 @@ _CRTALIAS int  __cdecl __MINGW_NOTHROW    _wfindnexti64 (long _v1, struct _wfinddat
 #endif /* !_USE_32BIT_TIME_T*/
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
 
-#endif /* defined (__MSVCRT__) */
 #define _WIO_DEFINED
 #endif /* _WIO_DEFINED */
 
 #ifndef _WDIRECT_DEFINED
 /* Also in direct.h */
-#ifdef __MSVCRT__
 _CRTIMP int __cdecl __MINGW_NOTHROW      _wchdir (const wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW  _wgetcwd (wchar_t*, int);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW  _wgetdcwd (int, wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW      _wmkdir (const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW      _wrmdir (const wchar_t*);
-#endif /* __MSVCRT__ */
 #define _WDIRECT_DEFINED
 #endif /* _WDIRECT_DEFINED */
 
@@ -514,7 +496,6 @@ struct stat
 };
 #endif /* _NO_OLDNAMES */
 
-#if defined (__MSVCRT__)
 struct _stati64 {
     _dev_t st_dev;
     _ino_t st_ino;
@@ -589,13 +570,11 @@ struct _stat64i32 {
 };
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
 
-#endif  /* __MSVCRT__ */
 #define _STAT_DEFINED
 #endif /* _STAT_DEFINED */
 
 #if !defined ( _WSTAT_DEFINED)
 /* also declared in sys/stat.h */
-#if defined __MSVCRT__
 #if __MSVCRT_VERSION__ < 0x0800
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wstat (const wchar_t*, struct _stat*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    _wstati64 (const wchar_t*, struct _stati64*);
@@ -615,7 +594,6 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW       _wstat (const wchar_t* _v1, struct _stat*
 _CRTALIAS int __cdecl __MINGW_NOTHROW  _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat32i64 (_v1,(struct _stat32i64*)_v2)); }
 #endif /* !_USE_32BIT_TIME_T */
 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
-#endif  /* __MSVCRT__ */
 #define _WSTAT_DEFINED
 #endif /* ! _WSTAT_DEFIND  */
 
index 786faf4..b65ef35 100644 (file)
@@ -100,25 +100,14 @@ _CRTIMP int __cdecl __MINGW_NOTHROW       isleadbyte (int);
 # if __MSVCRT_VERSION__ <= 0x0700
   __MINGW_IMPORT unsigned short _ctype[];
 # endif 
-# ifdef __MSVCRT__
   __MINGW_IMPORT unsigned short* _pctype;
-# else /* CRTDLL */
-  __MINGW_IMPORT unsigned short* _pctype_dll;
-# define  _pctype _pctype_dll
-# endif
-
 #else          /* ! __DECLSPEC_SUPPORTED */
 # if __MSVCRT_VERSION__ <= 0x0700
   extern unsigned short** _imp___ctype;
 # define _ctype (*_imp___ctype)
 # endif
-# ifdef __MSVCRT__
   extern unsigned short** _imp___pctype;
 # define _pctype (*_imp___pctype)
-# else /* CRTDLL */
-  extern unsigned short** _imp___pctype_dll;
-# define _pctype (*_imp___pctype_dll)
-# endif        /* CRTDLL */
 #endif         /*  __DECLSPEC_SUPPORTED */
 
 
index b8bae6b..82d194b 100644 (file)
@@ -31,9 +31,7 @@ chsize
 close
 creat
 cwait
-#if !(__CRTDLL__)
 daylight DATA
-#endif
 dup
 dup2
 ecvt
@@ -110,9 +108,7 @@ strupr
 swab
 tell
 tempnam
-#if  !(__CRTDLL__)
 timezone DATA
-#endif
 ; export tzname for both. See <time.h>
 tzname DATA
 tzset
@@ -129,9 +125,7 @@ wcsnset
 wcsrev
 wcsset
 wcsupr
-#if  !(__CRTDLL__)
 wpopen
-#endif
 write
 ; non-ANSI functions declared in math.h
 j0
index ab73b50..424ed21 100644 (file)
@@ -59,21 +59,17 @@ extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
  * Must have the correct app type for MSVCRT. 
  */
 
-#ifdef __MSVCRT__
 #define __UNKNOWN_APP    0
 #define __CONSOLE_APP    1
 #define __GUI_APP        2
 __MINGW_IMPORT void __set_app_type(int);
-#endif /* __MSVCRT__ */
 
 /*  Global _fmode for this .exe, not the one in msvcrt.dll,
     The default is set in txtmode.o in libmingw32.a */
 /* Override the dllimport'd declarations in stdlib.h */
 #undef _fmode 
 extern int _fmode; 
-#ifdef __MSVCRT__
 extern int* __p__fmode(void); /* To access the dll _fmode */
-#endif
 
 /*
  * Setup the default file handles to have the _CRT_fmode mode, as well as
@@ -111,11 +107,7 @@ _mingw32_init_fmode (void)
     }
 
     /*  Now sync  the dll _fmode to the  one for this .exe.  */
-#ifdef __MSVCRT__
     *__p__fmode() = _fmode;    
-#else
-    *_imp___fmode_dll = _fmode;
-#endif
 }
 
 /* This function will be called when a trap occurs. Thanks to Jacob
@@ -276,9 +268,7 @@ __mingw_CRTStartup (void)
 void
 mainCRTStartup (void)
 {
-#ifdef __MSVCRT__
   __set_app_type (__CONSOLE_APP);
-#endif
   __mingw_CRTStartup ();
 }
 
@@ -290,9 +280,7 @@ mainCRTStartup (void)
 void
 WinMainCRTStartup (void)
 {
-#ifdef __MSVCRT__
   __set_app_type (__GUI_APP);
-#endif
   __mingw_CRTStartup ();
 }
 
index 61522b0..01230bd 100644 (file)
@@ -48,14 +48,10 @@ char **_argv = 0;
  */
 extern int _CRT_glob;
 
-#ifdef __MSVCRT__
 typedef struct {
   int newmode;
 } _startupinfo;
 extern void __getmainargs (int *, char ***, char ***, int, _startupinfo *);
-#else
-extern void __GetMainArgs (int *, char ***, char ***, int);
-#endif
 
 /*
  * Initialize the _argc, _argv and environ variables.
@@ -66,20 +62,13 @@ _mingw32_init_mainargs ()
   /* The environ variable is provided directly in stdlib.h through
    * a dll function call. */
   char **dummy_environ;
-#ifdef __MSVCRT__
   _startupinfo start_info;
   start_info.newmode = 0;
-#endif
 
   /*
    * Microsoft's runtime provides a function for doing just that.
    */
-#ifdef __MSVCRT__
   (void) __getmainargs (&_argc, &_argv, &dummy_environ, _CRT_glob, 
                         &start_info);
-#else
-  /* CRTDLL version */
-  (void) __GetMainArgs (&_argc, &_argv, &dummy_environ, _CRT_glob);
-#endif
 }
 
index 3f797b4..d8b97b1 100644 (file)
@@ -30,7 +30,6 @@
  * versions of MSVCRT, (those which do not already advertise availability of
  * any exported _get_output_format() function); this will permit _pformat()
  * to transparently interoperate with all supported versions of MSVCRT.
- * (Likewise for CRTDLL).
  */
        .text
        .p2align 1,,4
index 2141b2e..9f1225b 100644 (file)
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#ifdef CRTDLL
-#undef CRTDLL
-#endif
-
 #include <windows.h>
 #include <stdio.h>
 #include <memory.h>