summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-04-17 02:34:22 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2002-04-17 02:34:22 +0000
commitf920e3d5e21d6a6822ab29d180e4c8611113c1da (patch)
treefcf89c683c7e7f14440e0a283db0c5544e9d1d37
parent7ce48952d0990519c983c34b6a3a57d1d7d3f2dc (diff)
downloadgdb-f920e3d5e21d6a6822ab29d180e4c8611113c1da.tar.gz
* crt1.c: Revert changes of 2002-04-16. Use _fpreset again.
* msvcrt.def (_fpreset): Mark as DATA so that only _imp___fpreset is exported. * msvcrt20.def (_fpreset): Likewise. * msvcrt40.def (_fpreset): Likewise. * crtdll.def (_fpreset): Likewise. * CRT_fp10.c (_fpreset): Overide library _fpreset with one that calls fninit. (fpreset): Add oldname alias. (__CRT_PC): Delete definition. _fpreset does it now. * CRT_fp8.c (_fpreset): Force use of library _imp___fpreset. (fpreset): Add oldname alias. (__CRT_PC): Delete definition. * moldname.def.in: Comment out fpreset. * moldname-msvcrt.def: Regenerate. * moldname-crtdll.def: Regenerate. * include/fenv.h (FE_DFL_ENV): Define as (fenv_t*)0. * mingwex/fesetenv.c (FE_DFL_ENV): Use it to set environment with the _fpreset determined by startup CRT_fp object.
-rw-r--r--winsup/mingw/CRT_fp10.c14
-rw-r--r--winsup/mingw/CRT_fp8.c16
-rw-r--r--winsup/mingw/ChangeLog22
-rw-r--r--winsup/mingw/crt1.c20
-rw-r--r--winsup/mingw/crtdll.def704
-rw-r--r--winsup/mingw/include/fenv.h6
-rw-r--r--winsup/mingw/mingwex/fesetenv.c26
-rw-r--r--winsup/mingw/moldname-crtdll.def3
-rw-r--r--winsup/mingw/moldname-msvcrt.def3
-rw-r--r--winsup/mingw/moldname.def.in3
-rw-r--r--winsup/mingw/msvcrt.def737
-rw-r--r--winsup/mingw/msvcrt20.def719
-rw-r--r--winsup/mingw/msvcrt40.def676
13 files changed, 2908 insertions, 41 deletions
diff --git a/winsup/mingw/CRT_fp10.c b/winsup/mingw/CRT_fp10.c
index 0527aeb0315..a13fb0096b8 100644
--- a/winsup/mingw/CRT_fp10.c
+++ b/winsup/mingw/CRT_fp10.c
@@ -1,12 +1,16 @@
/*
* CRT_FP10.c
*
- * This object file defines __CRT_PC to have a value of 10,
- * which will set default floating point precesion to 64-bit mantissa
+ * This defines _fpreset as asm ("fnint"). Calls to _fpreset
+ * will set default floating point precesion to 64-bit mantissa
* at app startup.
*
- * Linking in CRT_FP10.o before libmingw.a will override the value
- * set by CRT_FP8.o.
+ * Linking in CRT_FP10.o before libmingw.a will override the definition
+ * set in CRT_FP8.o.
*/
-unsigned int __CRT_PC = 10;
+/* Override library _fpreset() with asm fninit */
+void _fpreset (void)
+ { __asm__ ( "fninit" ) ;}
+
+void __attribute__ ((alias ("_fpreset"))) fpreset(void);
diff --git a/winsup/mingw/CRT_fp8.c b/winsup/mingw/CRT_fp8.c
index d375fef8845..d772d759a24 100644
--- a/winsup/mingw/CRT_fp8.c
+++ b/winsup/mingw/CRT_fp8.c
@@ -1,10 +1,18 @@
/*
* CRT_FP8.c
*
- * This object file defines __CRT_PC to have a value of 8, which
- * set default floating point precesion to 53-bit mantissa at app startup.
+ * This forces calls of _fpreset to the MSVCRT function
+ * exported from dll. Effectively it make default
+ * precison same as apps built with MSVC (53-bit mantissa).
+
*
- * To change to 64-bit mantissa, link in CRT_FP10.o before libmningw.a.
+ * To change to 64-bit mantissa, link in CRT_FP10.o before libmingw.a.
*/
- unsigned int __CRT_PC = 8;
+/* Link against the _fpreset visible in import lib */
+
+extern void (*_imp___fpreset)(void) ;
+void _fpreset (void)
+{ (*_imp___fpreset)(); }
+
+void __attribute__ ((alias ("_fpreset"))) fpreset(void);
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index cb9e1fa70ec..cdfe46e549d 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,25 @@
+2002-04-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * crt1.c: Revert changes of 2002-04-16. Use _fpreset again.
+ * msvcrt.def (_fpreset): Mark as DATA so that only
+ _imp___fpreset is exported.
+ * msvcrt20.def (_fpreset): Likewise.
+ * msvcrt40.def (_fpreset): Likewise.
+ * crtdll.def (_fpreset): Likewise.
+ * CRT_fp10.c (_fpreset): Overide library _fpreset with one
+ that calls fninit.
+ (fpreset): Add alias.
+ (__CRT_PC): Delete definition. _fpreset does it now.
+ * CRT_fp8.c (_fpreset): Force use of library _imp___fpreset.
+ (fpreset): Add alias.
+ (__CRT_PC): Delete definition.
+ * moldname.def.in: Comment out fpreset.
+ * moldname-msvcrt.def: Regenerate.
+ * moldname-crtdll.def: Regenerate.
+ * include/fenv.h (FE_DFL_ENV): Define as (fenv_t*)0.
+ * mingwex/fesetenv.c (FE_DFL_ENV): Use it to set environment
+ with the _fpreset determined by startup CRT_fp object.
+
2002-04-16 Danny Smith <dannysmith@users.sourceforge.net>
* CRT_fp8.c: New file.
diff --git a/winsup/mingw/crt1.c b/winsup/mingw/crt1.c
index b572c4f34cd..f91f1da28f1 100644
--- a/winsup/mingw/crt1.c
+++ b/winsup/mingw/crt1.c
@@ -61,21 +61,6 @@ __MINGW_IMPORT void __set_app_type(int);
*/
extern unsigned int _CRT_fmode;
-/*
- * If the user links in CRT_fp10.o or a different object
- * defining __CRT_PC this will override default FP precison set
- * in CRT_fp8.o in libmingw.a.
- */
-extern unsigned int __CRT_PC;
-static inline void
-__CRT_fesetenv (void)
-{
- if (__CRT_PC == 8)
- _fpreset();
- else
- __asm__ volatile ("fninit");
-}
-
static void
_mingw32_init_fmode ()
{
@@ -151,7 +136,7 @@ _gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
{
signal (SIGFPE, SIG_IGN);
if (reset_fpu)
- __CRT_fesetenv();
+ _fpreset ();
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
@@ -187,7 +172,7 @@ __mingw_CRTStartup ()
/*
* Initialize floating point unit.
*/
- __CRT_fesetenv();
+ _fpreset (); /* Supplied by the runtime library. */
/*
* Set up __argc, __argv and _environ.
@@ -246,3 +231,4 @@ WinMainCRTStartup ()
#endif
__mingw_CRTStartup ();
}
+
diff --git a/winsup/mingw/crtdll.def b/winsup/mingw/crtdll.def
new file mode 100644
index 00000000000..694547471e6
--- /dev/null
+++ b/winsup/mingw/crtdll.def
@@ -0,0 +1,704 @@
+;
+; crtdll.def
+;
+; Exports from crtdll.dll from Windows 95 SYSTEM directory. Hopefully this
+; should also work with the crtdll provided with Windows NT.
+;
+; Contributors:
+; Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
+;
+; 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$
+; $Author$
+; $Date$
+;
+; These three functions appear to be name mangled in some way, so GCC is
+; probably not going to be able to use them in any case.
+;
+; ??2@YAPAXI@Z
+; ??3@YAXPAX@Z
+; ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
+;
+; These are functions for which I have not yet written prototypes or
+; otherwise set up (they are still included below though unlike those
+; first three).
+;
+; _CIacos
+; _CIasin
+; _CIatan
+; _CIatan2
+; _CIcos
+; _CIcosh
+; _CIexp
+; _CIfmod
+; _CIlog
+; _CIlog10
+; _CIpow
+; _CIsin
+; _CIsinh
+; _CIsqrt
+; _CItan
+; _CItanh
+; __dllonexit
+; __mb_cur_max_dll
+; __threadhandle
+; __threadid
+; _abnormal_termination
+; _acmdln_dll
+; _aexit_rtn_dll
+; _amsg_exit
+; _commit
+; _commode_dll
+; _cpumode_dll
+; _ctype
+; _expand
+; _fcloseall
+; _filbuf
+; _fileinfo_dll
+; _flsbuf
+; _flushall
+; _fmode_dll
+; _fpieee_flt
+; _fsopen
+; _ftol
+; _getdiskfree
+; _getdllprocaddr
+; _getdrive
+; _getdrives
+; _getsystime
+; _initterm
+; _ismbbalnum
+; _ismbbalpha
+; _ismbbgraph
+; _ismbbkalnum
+; _ismbbkana
+; _ismbbkpunct
+; _ismbblead
+; _ismbbprint
+; _ismbbpunct
+; _ismbbtrail
+; _ismbcalpha
+; _ismbcdigit
+; _ismbchira
+; _ismbckata
+; _ismbcl0
+; _ismbcl1
+; _ismbcl2
+; _ismbclegal
+; _ismbclower
+; _ismbcprint
+; _ismbcspace
+; _ismbcsymbol
+; _ismbcupper
+; _ismbslead
+; _ismbstrail
+; _lfind
+; _loaddll
+; _lrotl
+; _lrotr
+; _lsearch
+; _makepath
+; _matherr
+; _mbbtombc
+; _mbbtype
+; _mbccpy
+; _mbcjistojms
+; _mbcjmstojis
+; _mbclen
+; _mbctohira
+; _mbctokata
+; _mbctolower
+; _mbctombb
+; _mbctoupper
+; _mbctype
+; _mbsbtype
+; _mbscat
+; _mbscmp
+; _mbscpy
+; _mbscspn
+; _mbsdec
+; _mbsdup
+; _mbsicmp
+; _mbsinc
+; _mbslen
+; _mbslwr
+; _mbsnbcat
+; _mbsnbcmp
+; _mbsnbcnt
+; _mbsnbcpy
+; _mbsnbicmp
+; _mbsnbset
+; _mbsnccnt
+; _mbsncmp
+; _mbsncpy
+; _mbsnextc
+; _mbsnicmp
+; _mbsninc
+; _mbsnset
+; _mbspbrk
+; _mbsrchr
+; _mbsrev
+; _mbsset
+; _mbsspn
+; _mbsspnp
+; _mbsstr
+; _mbstrlen
+; _mbsupr
+; _onexit
+; _osversion_dll
+; _pctype_dll
+; _purecall
+; _pwctype_dll
+; _rmtmp
+; _rotl
+; _rotr
+; _setsystime
+; _snprintf
+; _snwprintf
+; _splitpath
+; _strdate
+; _strdec
+; _strinc
+; _strncnt
+; _strnextc
+; _strninc
+; _strspnp
+; _strtime
+; _tempnam
+; _ultoa
+; _unloaddll
+; _vsnprintf
+; _vsnwprintf
+; _wtoi
+; _wtol
+;
+EXPORTS
+_CIacos
+_CIasin
+_CIatan
+_CIatan2
+_CIcos
+_CIcosh
+_CIexp
+_CIfmod
+_CIlog
+_CIlog10
+_CIpow
+_CIsin
+_CIsinh
+_CIsqrt
+_CItan
+_CItanh
+_HUGE_dll DATA
+_XcptFilter
+__GetMainArgs
+__argc_dll DATA
+__argv_dll DATA
+__dllonexit
+__doserrno
+__fpecode
+__isascii
+__iscsym
+__iscsymf
+__mb_cur_max_dll DATA
+__pxcptinfoptrs
+__threadhandle
+__threadid
+__toascii
+_abnormal_termination
+_access
+_acmdln_dll DATA
+_aexit_rtn_dll DATA
+_amsg_exit
+_assert
+_basemajor_dll DATA
+_baseminor_dll DATA
+_baseversion_dll DATA
+_beep
+_beginthread
+_c_exit
+_cabs
+_cexit
+_cgets
+_chdir
+_chdrive
+_chgsign
+_chmod
+_chsize
+_clearfp
+_close
+_commit
+_commode_dll DATA
+_control87
+_controlfp
+_copysign
+_cprintf
+_cpumode_dll DATA
+_cputs
+_creat
+_cscanf
+_ctype
+_cwait
+_daylight_dll DATA
+_dup
+_dup2
+_ecvt
+_endthread
+_environ_dll DATA
+_eof
+_errno
+_except_handler2
+_execl
+_execle
+_execlp
+_execlpe
+_execv
+_execve
+_execvp
+_execvpe
+_exit
+_expand
+_fcloseall
+_fcvt
+_fdopen
+_fgetchar
+_fgetwchar
+_filbuf
+_fileinfo_dll DATA
+_filelength
+_fileno
+_findclose
+_findfirst
+_findnext
+_finite
+_flsbuf
+_flushall
+_fmode_dll DATA
+_fpclass
+_fpieee_flt
+_fpreset DATA
+_fputchar
+_fputwchar
+_fsopen
+_fstat
+_ftime
+_ftol
+_fullpath
+_futime
+_gcvt
+_get_osfhandle
+_getch
+_getche
+_getcwd
+_getdcwd
+_getdiskfree
+_getdllprocaddr
+_getdrive
+_getdrives
+_getpid
+_getsystime
+_getw
+_global_unwind2
+_heapchk
+_heapmin
+_heapset
+_heapwalk
+_hypot
+_initterm
+_iob DATA
+_isatty
+_isctype
+_ismbbalnum
+_ismbbalpha
+_ismbbgraph
+_ismbbkalnum
+_ismbbkana
+_ismbbkpunct
+_ismbblead
+_ismbbprint
+_ismbbpunct
+_ismbbtrail
+_ismbcalpha
+_ismbcdigit
+_ismbchira
+_ismbckata
+_ismbcl0
+_ismbcl1
+_ismbcl2
+_ismbclegal
+_ismbclower
+_ismbcprint
+_ismbcspace
+_ismbcsymbol
+_ismbcupper
+_ismbslead
+_ismbstrail
+_isnan
+_itoa
+_j0
+_j1
+_jn
+_kbhit
+_lfind
+_loaddll
+_local_unwind2
+_locking
+_logb
+_lrotl
+_lrotr
+_lsearch
+_lseek
+_ltoa
+_makepath
+_matherr
+_mbbtombc
+_mbbtype
+_mbccpy
+_mbcjistojms
+_mbcjmstojis
+_mbclen
+_mbctohira
+_mbctokata
+_mbctolower
+_mbctombb
+_mbctoupper
+_mbctype
+_mbsbtype
+_mbscat
+_mbschr
+_mbscmp
+_mbscpy
+_mbscspn
+_mbsdec
+_mbsdup
+_mbsicmp
+_mbsinc
+_mbslen
+_mbslwr
+_mbsnbcat
+_mbsnbcmp
+_mbsnbcnt
+_mbsnbcpy
+_mbsnbicmp
+_mbsnbset
+_mbsncat
+_mbsnccnt
+_mbsncmp
+_mbsncpy
+_mbsnextc
+_mbsnicmp
+_mbsninc
+_mbsnset
+_mbspbrk
+_mbsrchr
+_mbsrev
+_mbsset
+_mbsspn
+_mbsspnp
+_mbsstr
+_mbstok
+_mbstrlen
+_mbsupr
+_memccpy
+_memicmp
+_mkdir
+_mktemp
+_msize
+_nextafter
+_onexit
+_open
+_open_osfhandle
+_osmajor_dll DATA
+_osminor_dll DATA
+_osmode_dll DATA
+_osver_dll DATA
+_osversion_dll DATA
+_pclose
+_pctype_dll DATA
+_pgmptr_dll DATA
+_pipe
+_popen
+_purecall
+_putch
+_putenv
+_putw
+_pwctype_dll DATA
+_read
+_rmdir
+_rmtmp
+_rotl
+_rotr
+_scalb
+_searchenv
+_seterrormode
+_setjmp
+_setmode
+_setsystime
+_sleep
+_snprintf
+_snwprintf
+_sopen
+_spawnl
+_spawnle
+_spawnlp
+_spawnlpe
+_spawnv
+_spawnve
+_spawnvp
+_spawnvpe
+_splitpath
+_stat
+_statusfp
+_strcmpi
+_strdate
+_strdec
+_strdup
+_strerror
+_stricmp
+_stricoll
+_strinc
+_strlwr
+_strncnt
+_strnextc
+_strnicmp
+_strninc
+_strnset
+_strrev
+_strset
+_strspnp
+_strtime
+_strupr
+_swab
+_sys_errlist DATA
+_sys_nerr_dll DATA
+_tell
+_tempnam
+_timezone_dll DATA
+_tolower
+_toupper
+_tzname DATA
+_tzset
+_ultoa
+_umask
+_ungetch
+_unlink
+_unloaddll
+_utime
+_vsnprintf
+_vsnwprintf
+_wcsdup
+_wcsicmp
+_wcsicoll
+_wcslwr
+_wcsnicmp
+_wcsnset
+_wcsrev
+_wcsset
+_wcsupr
+_winmajor_dll DATA
+_winminor_dll DATA
+_winver_dll DATA
+_write
+_wtoi
+_wtol
+_y0
+_y1
+_yn
+abort
+abs
+acos
+asctime
+asin
+atan
+atan2
+atexit
+atof
+atoi
+atol
+bsearch
+calloc
+ceil
+clearerr
+clock
+cos
+cosh
+ctime
+difftime
+div
+exit
+exp
+fabs
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fgetwc
+floor
+fmod
+fopen
+fprintf
+fputc
+fputs
+fputwc
+fread
+free
+freopen
+frexp
+fscanf
+fseek
+fsetpos
+ftell
+fwprintf
+fwrite
+fwscanf
+getc
+getchar
+getenv
+gets
+gmtime
+is_wctype
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+isleadbyte
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalnum
+iswalpha
+iswascii
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+isxdigit
+labs
+ldexp
+ldiv
+localeconv
+localtime
+log
+log10
+longjmp
+malloc
+mblen
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+mktime
+modf
+perror
+pow
+printf
+putc
+putchar
+puts
+qsort
+raise
+rand
+realloc
+remove
+rename
+rewind
+scanf
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sinh
+sprintf
+sqrt
+srand
+sscanf
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strftime
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtol
+strtoul
+strxfrm
+swprintf
+swscanf
+system
+tan
+tanh
+time
+tmpfile
+tmpnam
+tolower
+toupper
+towlower
+towupper
+ungetc
+ungetwc
+vfprintf
+vfwprintf
+vprintf
+vsprintf
+vswprintf
+vwprintf
+wcscat
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstod
+wcstok
+wcstol
+wcstombs
+wcstoul
+wcsxfrm
+wctomb
+wprintf
+wscanf
diff --git a/winsup/mingw/include/fenv.h b/winsup/mingw/include/fenv.h
index 471bdcc4d83..eed44031421 100644
--- a/winsup/mingw/include/fenv.h
+++ b/winsup/mingw/include/fenv.h
@@ -53,9 +53,9 @@ typedef struct
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
#define FE_PC53_ENV ((const fenv_t *)-2)
-/* The FE_DFL_ENV macro is required by standard. *
-/* For now, define the MSVCRT version as default. */
-#define FE_DFL_ENV FE_PC53_ENV
+/* The FE_DFL_ENV macro is required by standard.
+ fesetenv will use the environment set at app startup.*/
+#define FE_DFL_ENV ((const fenv_t *) 0)
#ifndef RC_INVOKED
#ifdef __cplusplus
diff --git a/winsup/mingw/mingwex/fesetenv.c b/winsup/mingw/mingwex/fesetenv.c
index c8f07613e5e..b3d5c5f05e7 100644
--- a/winsup/mingw/mingwex/fesetenv.c
+++ b/winsup/mingw/mingwex/fesetenv.c
@@ -10,21 +10,29 @@
exceptions.
*/
+extern void (*_imp___fpreset)( void ) ;
+
int fesetenv (const fenv_t * envp)
{
if (envp == FE_PC64_ENV)
-/*
- * fninit initializes the control register to 0x37f,
- * the status register to zero and the tag word to 0FFFFh.
- * The other registers are unaffected.
- */
+ /*
+ * fninit initializes the control register to 0x37f,
+ * the status register to zero and the tag word to 0FFFFh.
+ * The other registers are unaffected.
+ */
__asm__ ("fninit");
else if (envp == FE_PC53_ENV)
-/*
- * MS _fpreset() does same *except* it sets control word
- * to 0x27f (53-bit precison).
- */
+ /*
+ * MS _fpreset() does same *except* it sets control word
+ * to 0x27f (53-bit precison).
+ * We force calling _fpreset in msvcrt.dll
+ */
+
+ (*_imp___fpreset)();
+
+ else if (envp == FE_DFL_ENV)
+ /* Use the choice made at app startup */
_fpreset();
else
diff --git a/winsup/mingw/moldname-crtdll.def b/winsup/mingw/moldname-crtdll.def
index f27fa1562db..669900b3199 100644
--- a/winsup/mingw/moldname-crtdll.def
+++ b/winsup/mingw/moldname-crtdll.def
@@ -54,7 +54,8 @@ fgetchar
fgetwchar
filelength
fileno
-fpreset
+; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
+; fpreset
fputchar
fputwchar
fstat
diff --git a/winsup/mingw/moldname-msvcrt.def b/winsup/mingw/moldname-msvcrt.def
index f6e90755a23..f3f7da3f375 100644
--- a/winsup/mingw/moldname-msvcrt.def
+++ b/winsup/mingw/moldname-msvcrt.def
@@ -54,7 +54,8 @@ fgetchar
fgetwchar
filelength
fileno
-fpreset
+; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
+; fpreset
fputchar
fputwchar
fstat
diff --git a/winsup/mingw/moldname.def.in b/winsup/mingw/moldname.def.in
index c0032aff63f..1c88b0a56c8 100644
--- a/winsup/mingw/moldname.def.in
+++ b/winsup/mingw/moldname.def.in
@@ -54,7 +54,8 @@ fgetchar
fgetwchar
filelength
fileno
-fpreset
+; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
+; fpreset
fputchar
fputwchar
fstat
diff --git a/winsup/mingw/msvcrt.def b/winsup/mingw/msvcrt.def
new file mode 100644
index 00000000000..8d3e1a8cc21
--- /dev/null
+++ b/winsup/mingw/msvcrt.def
@@ -0,0 +1,737 @@
+;
+; msvcrt.def
+;
+; Exports from msvcrt.dll. Msvcrt.dll appears to be distributed with
+; Internet Explorer 4.0, and may be more common in the future, but
+; right now it seems like a risky choice. There are differences, although
+; they seem to be minor overall, between the exports from msvcrt and msvcrt20.
+; However, for most purposes the two sets are interchangable.
+;
+; NOTE: All exports, except for what appeared to be C++ mangled names,
+; are included. Not all functions have prototypes in the headers
+; (and some aren't functions at all).
+;
+; Contributors:
+; Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
+;
+; 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$
+; $Author$
+; $Date$
+;
+EXPORTS
+_CIacos
+_CIasin
+_CIatan
+_CIatan2
+_CIcos
+_CIcosh
+_CIexp
+_CIfmod
+_CIlog
+_CIlog10
+_CIpow
+_CIsin
+_CIsinh
+_CIsqrt
+_CItan
+_CItanh
+_CxxThrowException
+_EH_prolog
+_Getdays
+_Getmonths
+_Gettnames
+_HUGE DATA
+_Strftime
+_XcptFilter
+__CxxFrameHandler
+__CxxLongjmpUnwind
+__RTCastToVoid
+__RTDynamicCast
+__RTtypeid
+__STRINGTOLD
+__argc DATA
+__argv DATA
+__badioinfo
+__crtCompareStringA
+__crtGetLocaleInfoW
+__crtLCMapStringA
+__dllonexit
+__doserrno
+__fpecode
+__getmainargs
+__initenv DATA
+__isascii
+__iscsym
+__iscsymf
+__lc_codepage
+__lc_handle
+__lconv_init
+__mb_cur_max DATA
+__p___argc
+__p___argv
+__p___initenv
+__p___mb_cur_max
+__p___wargv
+__p___winitenv
+__p__acmdln
+__p__amblksiz
+__p__commode
+__p__daylight
+__p__dstbias
+__p__environ
+__p__fileinfo
+__p__fmode
+__p__iob
+__p__mbctype
+__p__osver
+__p__pctype
+__p__pgmptr
+__p__pwctype
+__p__timezone
+__p__tzname
+__p__wcmdln
+__p__wenviron
+__p__winmajor
+__p__winminor
+__p__winver
+__p__wpgmptr
+__pioinfo
+__pxcptinfoptrs
+__set_app_type
+__setlc_active
+__setusermatherr
+__threadhandle
+__threadid
+__toascii
+__unDName
+__unguarded_readlc_active
+__wargv DATA
+__wgetmainargs
+__winitenv DATA
+_abnormal_termination
+_access
+_acmdln DATA
+_adj_fdiv_m16i
+_adj_fdiv_m32
+_adj_fdiv_m32i
+_adj_fdiv_m64
+_adj_fdiv_r
+_adj_fdivr_m16i
+_adj_fdivr_m32
+_adj_fdivr_m32i
+_adj_fdivr_m64
+_adj_fpatan
+_adj_fprem
+_adj_fprem1
+_adj_fptan
+_adjust_fdiv DATA
+_aexit_rtn DATA
+_amsg_exit
+_assert
+_atodbl
+_atoi64
+_atoldbl
+_beep
+_beginthread
+_beginthreadex
+_c_exit
+_cabs
+_callnewh
+_cexit
+_cgets
+_chdir
+_chdrive
+_chgsign
+_chmod
+_chsize
+_clearfp
+_close
+_commit
+_commode DATA
+_control87
+_controlfp
+_copysign
+_cprintf
+_cputs
+_creat
+_cscanf
+_ctype DATA
+_cwait
+_daylight DATA
+_dstbias
+_dup
+_dup2
+_ecvt
+_endthread
+_endthreadex
+_environ DATA
+_eof
+_errno
+_except_handler2
+_except_handler3
+_execl
+_execle
+_execlp
+_execlpe
+_execv
+_execve
+_execvp
+_execvpe
+_exit
+_expand
+_fcloseall
+_fcvt
+_fdopen
+_fgetchar
+_fgetwchar
+_filbuf
+_fileinfo DATA
+_filelength
+_filelengthi64
+_fileno
+_findclose
+_findfirst
+_findfirsti64
+_findnext
+_findnexti64
+_finite
+_flsbuf
+_flushall
+_fmode DATA
+_fpclass
+_fpieee_flt
+_fpreset DATA
+_fputchar
+_fputwchar
+_fsopen
+_fstat
+_fstati64
+_ftime
+_ftol
+_fullpath
+_futime
+_gcvt
+_get_osfhandle
+_get_sbh_threshold
+_getch
+_getche
+_getcwd
+_getdcwd
+_getdiskfree
+_getdllprocaddr
+_getdrive
+_getdrives
+_getmaxstdio
+_getmbcp
+_getpid
+_getsystime
+_getw
+_getws
+_global_unwind2
+_heapadd
+_heapchk
+_heapmin
+_heapset
+_heapused
+_heapwalk
+_hypot
+_i64toa
+_i64tow
+_initterm
+_inp
+_inpd
+_inpw
+_iob DATA
+_isatty
+_isctype
+_ismbbalnum
+_ismbbalpha
+_ismbbgraph
+_ismbbkalnum
+_ismbbkana
+_ismbbkprint
+_ismbbkpunct
+_ismbblead
+_ismbbprint
+_ismbbpunct
+_ismbbtrail
+_ismbcalnum
+_ismbcalpha
+_ismbcdigit
+_ismbcgraph
+_ismbchira
+_ismbckata
+_ismbcl0
+_ismbcl1
+_ismbcl2
+_ismbclegal
+_ismbclower
+_ismbcprint
+_ismbcpunct
+_ismbcspace
+_ismbcsymbol
+_ismbcupper
+_ismbslead
+_ismbstrail
+_isnan
+_itoa
+_itow
+_j0
+_j1
+_jn
+_kbhit
+_lfind
+_loaddll
+_local_unwind2
+_lock
+_locking
+_logb
+_longjmpex
+_lrotl
+_lrotr
+_lsearch
+_lseek
+_lseeki64
+_ltoa
+_ltow
+_makepath
+_mbbtombc
+_mbbtype
+_mbccpy
+_mbcjistojms
+_mbcjmstojis
+_mbclen
+_mbctohira
+_mbctokata
+_mbctolower
+_mbctombb
+_mbctoupper
+_mbctype DATA
+_mbsbtype
+_mbscat
+_mbschr
+_mbscmp
+_mbscoll
+_mbscpy
+_mbscspn
+_mbsdec
+_mbsdup
+_mbsicmp
+_mbsicoll
+_mbsinc
+_mbslen
+_mbslwr
+_mbsnbcat
+_mbsnbcmp
+_mbsnbcnt
+_mbsnbcoll
+_mbsnbcpy
+_mbsnbicmp
+_mbsnbicoll
+_mbsnbset
+_mbsncat
+_mbsnccnt
+_mbsncmp
+_mbsncoll
+_mbsncpy
+_mbsnextc
+_mbsnicmp
+_mbsnicoll
+_mbsninc
+_mbsnset
+_mbspbrk
+_mbsrchr
+_mbsrev
+_mbsset
+_mbsspn
+_mbsspnp
+_mbsstr
+_mbstok
+_mbstrlen
+_mbsupr
+_memccpy
+_memicmp
+_mkdir
+_mktemp
+_msize
+_nextafter
+_onexit
+_open
+_open_osfhandle
+_osver DATA
+_outp
+_outpd
+_outpw
+_pclose
+_pctype DATA
+_pgmptr DATA
+_pipe
+_popen
+_purecall
+_putch
+_putenv
+_putw
+_putws
+_pwctype DATA
+_read
+_rmdir
+_rmtmp
+_rotl
+_rotr
+_safe_fdiv
+_safe_fdivr
+_safe_fprem
+_safe_fprem1
+_scalb
+_searchenv
+_seh_longjmp_unwind
+_set_error_mode
+_set_sbh_threshold
+_seterrormode
+_setjmp
+_setjmp3
+_setmaxstdio
+_setmbcp
+_setmode
+_setsystime
+_sleep
+_snprintf
+_snwprintf
+_sopen
+_spawnl
+_spawnle
+_spawnlp
+_spawnlpe
+_spawnv
+_spawnve
+_spawnvp
+_spawnvpe
+_splitpath
+_stat
+_stati64
+_statusfp
+_strcmpi
+_strdate
+_strdup
+_strerror
+_stricmp
+_stricoll
+_strlwr
+_strncoll
+_strnicmp
+_strnicoll
+_strnset
+_strrev
+_strset
+_strtime
+_strupr
+_swab
+_sys_errlist DATA
+_sys_nerr DATA
+_tell
+_telli64
+_tempnam
+_timezone DATA
+_tolower
+_toupper
+_tzname DATA
+_tzset
+_ui64toa
+_ui64tow
+_ultoa
+_ultow
+_umask
+_ungetch
+_unlink
+_unloaddll
+_unlock
+_utime
+_vsnprintf
+_vsnwprintf
+_waccess
+_wasctime
+_wchdir
+_wchmod
+_wcmdln DATA
+_wcreat
+_wcsdup
+_wcsicmp
+_wcsicoll
+_wcslwr
+_wcsncoll
+_wcsnicmp
+_wcsnicoll
+_wcsnset
+_wcsrev
+_wcsset
+_wcsupr
+_wctime
+_wenviron DATA
+_wexecl
+_wexecle
+_wexeclp
+_wexeclpe
+_wexecv
+_wexecve
+_wexecvp
+_wexecvpe
+_wfdopen
+_wfindfirst
+_wfindfirsti64
+_wfindnext
+_wfindnexti64
+_wfopen
+_wfreopen
+_wfsopen
+_wfullpath
+_wgetcwd
+_wgetdcwd
+_wgetenv
+_winmajor DATA
+_winminor DATA
+_winver DATA
+_wmakepath
+_wmkdir
+_wmktemp
+_wopen
+_wperror
+_wpgmptr DATA
+_wpopen
+_wputenv
+_wremove
+_wrename
+_write
+_wrmdir
+_wsearchenv
+_wsetlocale
+_wsopen
+_wspawnl
+_wspawnle
+_wspawnlp
+_wspawnlpe
+_wspawnv
+_wspawnve
+_wspawnvp
+_wspawnvpe
+_wsplitpath
+_wstat
+_wstati64
+_wstrdate
+_wstrtime
+_wsystem
+_wtempnam
+_wtmpnam
+_wtoi
+_wtoi64
+_wtol
+_wunlink
+_wutime
+_y0
+_y1
+_yn
+abort
+abs
+acos
+asctime
+asin
+atan
+atan2
+atexit
+atof
+atoi
+atol
+bsearch
+calloc
+ceil
+clearerr
+clock
+cos
+cosh
+ctime
+difftime
+div
+exit
+exp
+fabs
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fgetwc
+fgetws
+floor
+fmod
+fopen
+fprintf
+fputc
+fputs
+fputwc
+fputws
+fread
+free
+freopen
+frexp
+fscanf
+fseek
+fsetpos
+ftell
+fwprintf
+fwrite
+fwscanf
+getc
+getchar
+getenv
+gets
+getwc
+getwchar
+gmtime
+is_wctype
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+isleadbyte
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalnum
+iswalpha
+iswascii
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+isxdigit
+labs
+ldexp
+ldiv
+localeconv
+localtime
+log
+log10
+longjmp
+malloc
+mblen
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+mktime
+modf
+perror
+pow
+printf
+putc
+putchar
+puts
+putwc
+putwchar
+qsort
+raise
+rand
+realloc
+remove
+rename
+rewind
+scanf
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sinh
+sprintf
+sqrt
+srand
+sscanf
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strftime
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtol
+strtoul
+strxfrm
+swprintf
+swscanf
+system
+tan
+tanh
+time
+tmpfile
+tmpnam
+tolower
+toupper
+towlower
+towupper
+ungetc
+ungetwc
+vfprintf
+vfwprintf
+vprintf
+vsprintf
+vswprintf
+vwprintf
+wcscat
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstod
+wcstok
+wcstol
+wcstombs
+wcstoul
+wcsxfrm
+wctomb
+wprintf
+wscanf
+
diff --git a/winsup/mingw/msvcrt20.def b/winsup/mingw/msvcrt20.def
new file mode 100644
index 00000000000..77ff49510cc
--- /dev/null
+++ b/winsup/mingw/msvcrt20.def
@@ -0,0 +1,719 @@
+;
+; msvcrt20.def
+;
+; Exports from msvcrt20.dll. I am hoping that msvcrt20.dll will be reasonably
+; common on user systems (if not ubiquitous) so that, effectively, it can
+; be considered part of the OS. Apparently it was included with the Windows 95
+; distribution, so it should be present there at least.
+;
+; NOTE: All exports, except for what appeared to be C++ mangled names,
+; are included. Not all functions have prototypes in the headers
+; (and some aren't functions at all).
+;
+; Contributors:
+; Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
+;
+; 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$
+; $Author$
+; $Date$
+;
+EXPORTS
+_CIacos
+_CIasin
+_CIatan
+_CIatan2
+_CIcos
+_CIcosh
+_CIexp
+_CIfmod
+_CIlog
+_CIlog10
+_CIpow
+_CIsin
+_CIsinh
+_CIsqrt
+_CItan
+_CItanh
+_CxxThrowException
+_HUGE
+_XcptFilter
+__CxxFrameHandler
+__CxxLongjmpUnwind
+__STRINGTOLD
+__argc
+__argv
+__dllonexit
+__doserrno
+__fpecode
+__getmainargs
+__initenv
+__isascii
+__iscsym
+__iscsymf
+__lconv_init
+__mb_cur_max
+__p___argc
+__p___argv
+__p___initenv
+__p___mb_cur_max
+__p___wargv
+__p___winitenv
+__p__acmdln
+__p__amblksiz
+__p__commode
+__p__daylight
+__p__environ
+__p__fmode
+__p__iob
+__p__mbctype
+__p__osver
+__p__pctype
+__p__pgmptr
+__p__pwctype
+__p__timezone
+__p__tzname
+__p__wcmdln
+__p__wenviron
+__p__winmajor
+__p__winminor
+__p__winver
+__p__wpgmptr
+__pxcptinfoptrs
+__threadhandle
+__threadid
+__toascii
+__wargv
+__wgetmainargs
+__winitenv
+_abnormal_termination
+_access
+_acmdln
+_adj_fdiv_m16i
+_adj_fdiv_m32
+_adj_fdiv_m32i
+_adj_fdiv_m64
+_adj_fdiv_r
+_adj_fdivr_m16i
+_adj_fdivr_m32
+_adj_fdivr_m32i
+_adj_fdivr_m64
+_adj_fpatan
+_adj_fprem
+_adj_fprem1
+_adj_fptan
+_adjust_fdiv
+_aexit_rtn
+_amsg_exit
+_assert
+_atodbl
+_atoldbl
+_beep
+_beginthread
+_beginthreadex
+_c_exit
+_cabs
+_cexit
+_cgets
+_chdir
+_chdrive
+_chgsign
+_chmod
+_chsize
+_clearfp
+_close
+_commit
+_commode
+_control87
+_controlfp
+_copysign
+_cprintf
+_cputs
+_creat
+_cscanf
+_ctype
+_cwait
+_daylight
+_dup
+_dup2
+_ecvt
+_endthread
+_endthreadex
+_environ
+_eof
+_errno
+_except_handler2
+_except_handler3
+_execl
+_execle
+_execlp
+_execlpe
+_execv
+_execve
+_execvp
+_execvpe
+_exit
+_expand
+_fcloseall
+_fcvt
+_fdopen
+_fgetchar
+_fgetwchar
+_filbuf
+_fileinfo
+_filelength
+_fileno
+_findclose
+_findfirst
+_findnext
+_finite
+_flsbuf
+_flushall
+_fmode
+_fpclass
+_fpieee_flt
+_fpreset DATA
+_fputchar
+_fputwchar
+_fsopen
+_fstat
+_ftime
+_ftol
+_fullpath
+_futime
+_gcvt
+_get_osfhandle
+_getch
+_getche
+_getcwd
+_getdcwd
+_getdiskfree
+_getdllprocaddr
+_getdrive
+_getdrives
+_getmbcp
+_getpid
+_getsystime
+_getw
+_getws
+_global_unwind2
+_heapadd
+_heapchk
+_heapmin
+_heapset
+_heapused
+_heapwalk
+_hypot
+_initterm
+_iob
+_isatty
+_isctype
+_ismbbalnum
+_ismbbalpha
+_ismbbgraph
+_ismbbkalnum
+_ismbbkana
+_ismbbkprint
+_ismbbkpunct
+_ismbblead
+_ismbbprint
+_ismbbpunct
+_ismbbtrail
+_ismbcalnum
+_ismbcalpha
+_ismbcdigit
+_ismbcgraph
+_ismbchira
+_ismbckata
+_ismbcl0
+_ismbcl1
+_ismbcl2
+_ismbclegal
+_ismbclower
+_ismbcprint
+_ismbcpunct
+_ismbcspace
+_ismbcsymbol
+_ismbcupper
+_ismbslead
+_ismbstrail
+_isnan
+_itoa
+_itow
+_j0
+_j1
+_jn
+_kbhit
+_lfind
+_loaddll
+_local_unwind2
+_locking
+_logb
+_longjmpex
+_lrotl
+_lrotr
+_lsearch
+_lseek
+_ltoa
+_ltow
+_makepath
+_matherr
+_mbbtombc
+_mbbtype
+_mbccpy
+_mbcjistojms
+_mbcjmstojis
+_mbclen
+_mbctohira
+_mbctokata
+_mbctolower
+_mbctombb
+_mbctoupper
+_mbctype
+_mbsbtype
+_mbscat
+_mbschr
+_mbscmp
+_mbscoll
+_mbscpy
+_mbscspn
+_mbsdec
+_mbsdup
+_mbsicmp
+_mbsicoll
+_mbsinc
+_mbslen
+_mbslwr
+_mbsnbcat
+_mbsnbcmp
+_mbsnbcnt
+_mbsnbcoll
+_mbsnbcpy
+_mbsnbicmp
+_mbsnbicoll
+_mbsnbset
+_mbsncat
+_mbsnccnt
+_mbsncmp
+_mbsncoll
+_mbsncpy
+_mbsnextc
+_mbsnicmp
+_mbsnicoll
+_mbsninc
+_mbsnset
+_mbspbrk
+_mbsrchr
+_mbsrev
+_mbsset
+_mbsspn
+_mbsspnp
+_mbsstr
+_mbstok
+_mbstrlen
+_mbsupr
+_memccpy
+_memicmp
+_mkdir
+_mktemp
+_msize
+_mtlock
+_mtunlock
+_nextafter
+_onexit
+_open
+_open_osfhandle
+_osver
+_pclose
+_pctype
+_pgmptr
+_pipe
+_popen
+_purecall
+_putch
+_putenv
+_putw
+_putws
+_pwctype
+_read
+_rmdir
+_rmtmp
+_rotl
+_rotr
+_safe_fdiv
+_safe_fdivr
+_safe_fprem
+_safe_fprem1
+_scalb
+_searchenv
+__seh_longjmp_unwind@4
+_seterrormode
+_setjmp
+_setjmp3
+_setmbcp
+_setmode
+_setsystime
+_sleep
+_snprintf
+_snwprintf
+_sopen
+_spawnl
+_spawnle
+_spawnlp
+_spawnlpe
+_spawnv
+_spawnve
+_spawnvp
+_spawnvpe
+_splitpath
+_stat
+_statusfp
+_strcmpi
+_strdate
+_strdup
+_strerror
+_stricmp
+_stricoll
+_strlwr
+_strncoll
+_strnicmp
+_strnicoll
+_strnset
+_strrev
+_strset
+_strtime
+_strupr
+_swab
+_sys_errlist
+_sys_nerr
+_tccpy
+_tclen
+_tcschr
+_tcsclen
+_tcscmp
+_tcscspn
+_tcsdec
+_tcsicmp
+_tcsinc
+_tcslwr
+_tcsnbcnt
+_tcsncat
+_tcsnccat
+_tcsnccmp
+_tcsnccnt
+_tcsnccpy
+_tcsncicmp
+_tcsncmp
+_tcsncpy
+_tcsncset
+_tcsnextc
+_tcsnicmp
+_tcsninc
+_tcsnset
+_tcspbrk
+_tcsrchr
+_tcsrev
+_tcsset
+_tcsspn
+_tcsspnp
+_tcsstr
+_tcstok
+_tcsupr
+_tell
+_tempnam
+_timezone
+_tolower
+_toupper
+_tzname
+_tzset
+_ultoa
+_ultow
+_umask
+_ungetch
+_unlink
+_unloaddll
+_utime
+_vsnprintf
+_vsnwprintf
+_waccess
+_wasctime
+_wchdir
+_wchmod
+_wcmdln
+_wcreat
+_wcsdup
+_wcsicmp
+_wcsicoll
+_wcslwr
+_wcsncoll
+_wcsnicmp
+_wcsnicoll
+_wcsnset
+_wcsrev
+_wcsset
+_wcsupr
+_wctime
+_wenviron
+_wexecl
+_wexecle
+_wexeclp
+_wexeclpe
+_wexecv
+_wexecve
+_wexecvp
+_wexecvpe
+_wfdopen
+_wfindfirst
+_wfindnext
+_wfopen
+_wfreopen
+_wfsopen
+_wfullpath
+_wgetcwd
+_wgetdcwd
+_wgetenv
+_winmajor
+_winminor
+_winver
+_wmakepath
+_wmkdir
+_wmktemp
+_wopen
+_wperror
+_wpgmptr
+_wpopen
+_wputenv
+_wremove
+_wrename
+_write
+_wrmdir
+_wsearchenv
+_wsetlocale
+_wsopen
+_wspawnl
+_wspawnle
+_wspawnlp
+_wspawnlpe
+_wspawnv
+_wspawnve
+_wspawnvp
+_wspawnvpe
+_wsplitpath
+_wstat
+_wstrdate
+_wstrtime
+_wsystem
+_wtempnam
+_wtmpnam
+_wtoi
+_wtol
+_wunlink
+_wutime
+_y0
+_y1
+_yn
+abort
+abs
+acos
+asctime
+asin
+atan
+atan2
+atexit
+atof
+atoi
+atol
+bsearch
+calloc
+ceil
+clearerr
+clock
+cos
+cosh
+ctime
+difftime
+div
+exit
+exp
+fabs
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fgetwc
+fgetws
+floor
+fmod
+fopen
+fprintf
+fputc
+fputs
+fputwc
+fputws
+fread
+free
+freopen
+frexp
+fscanf
+fseek
+fsetpos
+ftell
+fwprintf
+fwrite
+fwscanf
+getc
+getchar
+getenv
+gets
+getwc
+getwchar
+gmtime
+is_wctype
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+isleadbyte
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalnum
+iswalpha
+iswascii
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+isxdigit
+labs
+ldexp
+ldiv
+localeconv
+localtime
+log
+log10
+longjmp
+malloc
+mblen
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+mktime
+modf
+perror
+pow
+printf
+putc
+putchar
+puts
+putwc
+putwchar
+qsort
+raise
+rand
+realloc
+remove
+rename
+rewind
+scanf
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sinh
+sprintf
+sqrt
+srand
+sscanf
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strftime
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtol
+strtoul
+strxfrm
+swprintf
+swscanf
+system
+tan
+tanh
+time
+tmpfile
+tmpnam
+tolower
+toupper
+towlower
+towupper
+ungetc
+ungetwc
+vfprintf
+vfwprintf
+vprintf
+vsprintf
+vswprintf
+vwprintf
+wcscat
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstod
+wcstok
+wcstol
+wcstombs
+wcstoul
+wcsxfrm
+wctomb
+wprintf
+wscanf
+
diff --git a/winsup/mingw/msvcrt40.def b/winsup/mingw/msvcrt40.def
new file mode 100644
index 00000000000..936aff962ee
--- /dev/null
+++ b/winsup/mingw/msvcrt40.def
@@ -0,0 +1,676 @@
+EXPORTS
+$I10_OUTPUT
+_CIacos
+_CIasin
+_CIatan
+_CIatan2
+_CIcos
+_CIcosh
+_CIexp
+_CIfmod
+_CIlog
+_CIlog10
+_CIpow
+_CIsin
+_CIsinh
+_CIsqrt
+_CItan
+_CItanh
+_CxxThrowException
+_EH_prolog
+_HUGE
+_XcptFilter
+__CxxFrameHandler
+__CxxLongjmpUnwind
+__RTCastToVoid
+__RTDynamicCast
+__RTtypeid
+__STRINGTOLD
+__argc
+__argv
+__dllonexit
+__doserrno
+__fpecode
+__getmainargs
+__initenv
+__isascii
+__iscsym
+__iscsymf
+__lconv_init
+__mb_cur_max
+__p___argc
+__p___argv
+__p___initenv
+__p___mb_cur_max
+__p___wargv
+__p___winitenv
+__p__acmdln
+__p__amblksiz
+__p__commode
+__p__daylight
+__p__environ
+__p__fmode
+__p__iob
+__p__mbctype
+__p__osver
+__p__pctype
+__p__pgmptr
+__p__pwctype
+__p__timezone
+__p__tzname
+__p__wcmdln
+__p__wenviron
+__p__winmajor
+__p__winminor
+__p__winver
+__p__wpgmptr
+__pxcptinfoptrs
+__set_app_type
+__setusermatherr
+__threadhandle
+__threadid
+__toascii
+__unDName
+__wargv
+__wgetmainargs
+__winitenv
+_abnormal_termination
+_access
+_acmdln
+_adj_fdiv_m16i
+_adj_fdiv_m32
+_adj_fdiv_m32i
+_adj_fdiv_m64
+_adj_fdiv_r
+_adj_fdivr_m16i
+_adj_fdivr_m32
+_adj_fdivr_m32i
+_adj_fdivr_m64
+_adj_fpatan
+_adj_fprem
+_adj_fprem1
+_adj_fptan
+_adjust_fdiv
+_aexit_rtn
+_amsg_exit
+_assert
+_atodbl
+_atoldbl
+_beep
+_beginthread
+_beginthreadex
+_c_exit
+_cabs
+_cexit
+_cgets
+_chdir
+_chdrive
+_chgsign
+_chmod
+_chsize
+_clearfp
+_close
+_commit
+_commode
+_control87
+_controlfp
+_copysign
+_cprintf
+_cputs
+_creat
+_cscanf
+_ctype
+_cwait
+_daylight
+_dup
+_dup2
+_ecvt
+_endthread
+_endthreadex
+_environ
+_eof
+_errno
+_except_handler2
+_except_handler3
+_execl
+_execle
+_execlp
+_execlpe
+_execv
+_execve
+_execvp
+_execvpe
+_exit
+_expand
+_fcloseall
+_fcvt
+_fdopen
+_fgetchar
+_fgetwchar
+_filbuf
+_fileinfo
+_filelength
+_filelengthi64
+_fileno
+_findclose
+_findfirst
+_findfirsti64
+_findnext
+_findnexti64
+_finite
+_flsbuf
+_flushall
+_fmode
+_fpclass
+_fpieee_flt
+_fpreset DATA
+_fputchar
+_fputwchar
+_fsopen
+_fstat
+_fstati64
+_ftime
+_ftol
+_fullpath
+_futime
+_gcvt
+_get_osfhandle
+_getch
+_getche
+_getcwd
+_getdcwd
+_getdiskfree
+_getdllprocaddr
+_getdrive
+_getdrives
+_getmbcp
+_getpid
+_getsystime
+_getw
+_getws
+_global_unwind2
+_heapadd
+_heapchk
+_heapmin
+_heapset
+_heapused
+_heapwalk
+_hypot
+_initterm
+_iob
+_isatty
+_isctype
+_ismbbalnum
+_ismbbalpha
+_ismbbgraph
+_ismbbkalnum
+_ismbbkana
+_ismbbkprint
+_ismbbkpunct
+_ismbblead
+_ismbbprint
+_ismbbpunct
+_ismbbtrail
+_ismbcalnum
+_ismbcalpha
+_ismbcdigit
+_ismbcgraph
+_ismbchira
+_ismbckata
+_ismbcl0
+_ismbcl1
+_ismbcl2
+_ismbclegal
+_ismbclower
+_ismbcprint
+_ismbcpunct
+_ismbcspace
+_ismbcsymbol
+_ismbcupper
+_ismbslead
+_ismbstrail
+_isnan
+_itoa
+_itow
+_j0
+_j1
+_jn
+_kbhit
+_lfind
+_loaddll
+_local_unwind2
+_locking
+_logb
+_longjmpex
+_lrotl
+_lrotr
+_lsearch
+_lseek
+_lseeki64
+_ltoa
+_ltow
+_makepath
+_mbbtombc
+_mbbtype
+_mbccpy
+_mbcjistojms
+_mbcjmstojis
+_mbclen
+_mbctohira
+_mbctokata
+_mbctolower
+_mbctombb
+_mbctoupper
+_mbctype
+_mbsbtype
+_mbscat
+_mbschr
+_mbscmp
+_mbscoll
+_mbscpy
+_mbscspn
+_mbsdec
+_mbsdup
+_mbsicmp
+_mbsicoll
+_mbsinc
+_mbslen
+_mbslwr
+_mbsnbcat
+_mbsnbcmp
+_mbsnbcnt
+_mbsnbcoll
+_mbsnbcpy
+_mbsnbicmp
+_mbsnbicoll
+_mbsnbset
+_mbsncat
+_mbsnccnt
+_mbsncmp
+_mbsncoll
+_mbsncpy
+_mbsnextc
+_mbsnicmp
+_mbsnicoll
+_mbsninc
+_mbsnset
+_mbspbrk
+_mbsrchr
+_mbsrev
+_mbsset
+_mbsspn
+_mbsspnp
+_mbsstr
+_mbstok
+_mbstrlen
+_mbsupr
+_memccpy
+_memicmp
+_mkdir
+_mktemp
+_msize
+_mtlock
+_mtunlock
+_nextafter
+_onexit
+_open
+_open_osfhandle
+_osver
+_pclose
+_pctype
+_pgmptr
+_pipe
+_popen
+_purecall
+_putch
+_putenv
+_putw
+_putws
+_pwctype
+_read
+_rmdir
+_rmtmp
+_rotl
+_rotr
+_safe_fdiv
+_safe_fdivr
+_safe_fprem
+_safe_fprem1
+_scalb
+_searchenv
+_seh_longjmp_unwind
+_set_error_mode
+_seterrormode
+_setjmp
+_setjmp3
+_setmaxstdio
+_setmbcp
+_setmode
+_setsystime
+_sleep
+_snprintf
+_snwprintf
+_sopen
+_spawnl
+_spawnle
+_spawnlp
+_spawnlpe
+_spawnv
+_spawnve
+_spawnvp
+_spawnvpe
+_splitpath
+_stat
+_stati64
+_statusfp
+_strcmpi
+_strdate
+_strdup
+_strerror
+_stricmp
+_stricoll
+_strlwr
+_strncoll
+_strnicmp
+_strnicoll
+_strnset
+_strrev
+_strset
+_strtime
+_strupr
+_swab
+_sys_errlist
+_sys_nerr
+_tell
+_telli64
+_tempnam
+_timezone
+_tolower
+_toupper
+_tzname
+_tzset
+_ultoa
+_ultow
+_umask
+_ungetch
+_unlink
+_unloaddll
+_utime
+_vsnprintf
+_vsnwprintf
+_waccess
+_wasctime
+_wchdir
+_wchmod
+_wcmdln
+_wcreat
+_wcsdup
+_wcsicmp
+_wcsicoll
+_wcslwr
+_wcsncoll
+_wcsnicmp
+_wcsnicoll
+_wcsnset
+_wcsrev
+_wcsset
+_wcsupr
+_wctime
+_wenviron
+_wexecl
+_wexecle
+_wexeclp
+_wexeclpe
+_wexecv
+_wexecve
+_wexecvp
+_wexecvpe
+_wfdopen
+_wfindfirst
+_wfindfirsti64
+_wfindnext
+_wfindnexti64
+_wfopen
+_wfreopen
+_wfsopen
+_wfullpath
+_wgetcwd
+_wgetdcwd
+_wgetenv
+_winmajor
+_winminor
+_winver
+_wmakepath
+_wmkdir
+_wmktemp
+_wopen
+_wperror
+_wpgmptr
+_wpopen
+_wputenv
+_wremove
+_wrename
+_write
+_wrmdir
+_wsearchenv
+_wsetlocale
+_wsopen
+_wspawnl
+_wspawnle
+_wspawnlp
+_wspawnlpe
+_wspawnv
+_wspawnve
+_wspawnvp
+_wspawnvpe
+_wsplitpath
+_wstat
+_wstati64
+_wstrdate
+_wstrtime
+_wsystem
+_wtempnam
+_wtmpnam
+_wtoi
+_wtol
+_wunlink
+_wutime
+_y0
+_y1
+_yn
+abort
+abs
+acos
+asctime
+asin
+atan
+atan2
+atexit
+atof
+atoi
+atol
+bsearch
+calloc
+ceil
+clearerr
+clock
+cos
+cosh
+ctime
+difftime
+div
+exit
+exp
+fabs
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fgetwc
+fgetws
+floor
+fmod
+fopen
+fprintf
+fputc
+fputs
+fputwc
+fputws
+fread
+free
+freopen
+frexp
+fscanf
+fseek
+fsetpos
+ftell
+fwprintf
+fwrite
+fwscanf
+getc
+getchar
+getenv
+gets
+getwc
+getwchar
+gmtime
+is_wctype
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+isleadbyte
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalnum
+iswalpha
+iswascii
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+isxdigit
+labs
+ldexp
+ldiv
+localeconv
+localtime
+log
+log10
+longjmp
+malloc
+mblen
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+mktime
+modf
+perror
+pow
+printf
+putc
+putchar
+puts
+putwc
+putwchar
+qsort
+raise
+rand
+realloc
+remove
+rename
+rewind
+scanf
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sinh
+sprintf
+sqrt
+srand
+sscanf
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strftime
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtol
+strtoul
+strxfrm
+swprintf
+swscanf
+system
+tan
+tanh
+time
+tmpfile
+tmpnam
+tolower
+toupper
+towlower
+towupper
+ungetc
+ungetwc
+vfprintf
+vfwprintf
+vprintf
+vsprintf
+vswprintf
+vwprintf
+wcscat
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstod
+wcstok
+wcstol
+wcstombs
+wcstoul
+wcsxfrm
+wctomb
+wprintf
+wscanf
+