more crt, crtdll and msvcrt cleanup
authorSteven Edwards <winehacker@gmail.com>
Sun, 27 Nov 2005 06:20:33 +0000 (06:20 +0000)
committerSteven Edwards <winehacker@gmail.com>
Sun, 27 Nov 2005 06:20:33 +0000 (06:20 +0000)
svn path=/trunk/; revision=19673

43 files changed:
reactos/lib/crt/conio/cgets.c
reactos/lib/crt/conio/cprintf.c
reactos/lib/crt/conio/cputs.c
reactos/lib/crt/conio/getch.c
reactos/lib/crt/conio/getche.c
reactos/lib/crt/conio/kbhit.c
reactos/lib/crt/conio/putch.c
reactos/lib/crt/conio/ungetch.c
reactos/lib/crt/direct/getcwd.c
reactos/lib/crt/direct/getdcwd.c
reactos/lib/crt/float/isnan.c
reactos/lib/crt/include/float.h
reactos/lib/crt/include/internal/atexit.h
reactos/lib/crt/include/internal/console.h
reactos/lib/crt/include/internal/file.h
reactos/lib/crt/include/internal/math.h
reactos/lib/crt/include/internal/tls.h
reactos/lib/crt/io/access.c
reactos/lib/crt/io/open.c
reactos/lib/crt/math/hypot.c
reactos/lib/crt/math/modf.c
reactos/lib/crt/mbstring/mbscat.c
reactos/lib/crt/mbstring/mbscpy.c
reactos/lib/crt/mbstring/mbsdup.c
reactos/lib/crt/precomp.h
reactos/lib/crt/process/_system.c
reactos/lib/crt/signal/signal.c
reactos/lib/crt/stdio/fgetchar.c
reactos/lib/crt/stdio/gets.c
reactos/lib/crt/stdio/perror.c
reactos/lib/crt/stdio/vfwprint.c
reactos/lib/crt/stdlib/atexit.c
reactos/lib/crt/stdlib/errno.c
reactos/lib/crt/stdlib/makepath.c
reactos/lib/crt/stdlib/splitp.c
reactos/lib/crt/stdlib/wsplitp.c
reactos/lib/crt/wine/heap.c
reactos/lib/crt/wine/scanf.c
reactos/lib/crtdll/dllmain.c
reactos/lib/crtdll/precomp.h
reactos/lib/msvcrt/dllmain.c
reactos/lib/msvcrt/precomp.h
reactos/lib/rtl/math.c

index 6c25041..915f14b 100644 (file)
@@ -6,8 +6,7 @@
  * PROGRAMMER:       Eric Kohl (Imported from DJGPP)
  */
 
  * PROGRAMMER:       Eric Kohl (Imported from DJGPP)
  */
 
-#include <conio.h>
-#include <stdlib.h>
+#include "precomp.h"
 
 /*
  * @implemented
 
 /*
  * @implemented
index 86e3fe6..756961b 100644 (file)
@@ -8,8 +8,6 @@
 
 #include "precomp.h"
 
 
 #include "precomp.h"
 
-#include <conio.h>
-
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
index ab5911a..65e9fb2 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "precomp.h"
  */
 
 #include "precomp.h"
-#include <conio.h>
 
 /*
  * @implemented
 
 /*
  * @implemented
index 46821e1..a5ad690 100644 (file)
@@ -9,9 +9,6 @@
  */
 
 #include "precomp.h"
  */
 
 #include "precomp.h"
-#include <conio.h>
-#include <internal/console.h>
-
 
 /*
  * @implemented
 
 /*
  * @implemented
index bae6e84..c281ac0 100644 (file)
@@ -10,9 +10,7 @@
  *              28/12/98: Created
  */
 
  *              28/12/98: Created
  */
 
-#include <conio.h>
-#include <internal/console.h>
-
+#include "precomp.h"
 
 int _getche(void)
 {
 
 int _getche(void)
 {
index 6f0c0ad..617442f 100644 (file)
@@ -9,9 +9,6 @@
  */
 
 #include "precomp.h"
  */
 
 #include "precomp.h"
-#include <conio.h>
-#include <internal/console.h>
-
 
 /*
  * FIXME PeekConsoleInput returns more than keyboard hits
 
 /*
  * FIXME PeekConsoleInput returns more than keyboard hits
index d6a91a6..8ecca07 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "precomp.h"
  */
 
 #include "precomp.h"
-#include <conio.h>
 
 /*
  * @implemented
 
 /*
  * @implemented
index 9fb1e2b..cb5e710 100644 (file)
 
 #include "precomp.h"
 
 
 #include "precomp.h"
 
-#include <conio.h>
-#include <internal/console.h>
-
-
-
 int char_avail = 0;
 int ungot_char = 0;
 
 int char_avail = 0;
 int ungot_char = 0;
 
index a01ba1d..196af47 100644 (file)
@@ -1,7 +1,6 @@
 #include "precomp.h"
 #include <direct.h>
 #include <stdlib.h>
 #include "precomp.h"
 #include <direct.h>
 #include <stdlib.h>
-#include <errno.h>
 #include <tchar.h>
 
 /*
 #include <tchar.h>
 
 /*
index 229c488..c3a8d78 100644 (file)
@@ -2,7 +2,6 @@
 #include <direct.h>
 #include <internal/debug.h>
 #include <tchar.h>
 #include <direct.h>
 #include <internal/debug.h>
 #include <tchar.h>
-#include <errno.h>
 
 /*
  * @implemented
 
 /*
  * @implemented
index 70fd6b2..4f33cf7 100644 (file)
@@ -16,9 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <math.h>
-#include <float.h>
-#include <internal/ieee.h>
+#include "precomp.h"
 
 
 /*
 
 
 /*
index 000faa0..86b1b4d 100644 (file)
 #define _FPE_STACKUNDERFLOW    0x8b
 #define _FPE_EXPLICITGEN       0x8c    /* raise( SIGFPE ); */
 
 #define _FPE_STACKUNDERFLOW    0x8b
 #define _FPE_EXPLICITGEN       0x8c    /* raise( SIGFPE ); */
 
-#ifndef __GNUC__
-#define DBL_MAX_10_EXP  308  
+#ifndef DBL_MAX_10_EXP
+#define DBL_MAX_10_EXP  308
+#endif
+#ifndef S_IFIFO
 #define S_IFIFO                        -1
 #define S_IFIFO                        -1
+#endif
+#ifndef UINT64_MAX
 #define UINT64_MAX     0xffffffffffffffff
 #endif
 
 #define UINT64_MAX     0xffffffffffffffff
 #endif
 
index ab036e6..626e886 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef __CRT_INTERNAL_ATEXIT_H
 #define __CRT_INTERNAL_ATEXIT_H
 
 #ifndef __CRT_INTERNAL_ATEXIT_H
 #define __CRT_INTERNAL_ATEXIT_H
 
+#ifndef _CRT_PRECOMP_H
+#error DO NOT INCLUDE THIS HEADER DIRECTLY
+#endif
 
 struct __atexit {
     struct __atexit* __next;
 
 struct __atexit {
     struct __atexit* __next;
index c478c21..351fe16 100644 (file)
@@ -3,6 +3,10 @@
 #ifndef __CRT_INTERNAL_CONSOLE_H
 #define __CRT_INTERNAL_CONSOLE_H
 
 #ifndef __CRT_INTERNAL_CONSOLE_H
 #define __CRT_INTERNAL_CONSOLE_H
 
+#ifndef _CRT_PRECOMP_H
+#error DO NOT INCLUDE THIS HEADER DIRECTLY
+#endif
+
 extern int char_avail;
 extern int ungot_char;
 
 extern int char_avail;
 extern int ungot_char;
 
index 9aeceb9..de562e3 100644 (file)
@@ -136,13 +136,11 @@ void _fwalk(void (*func)(FILE*)); // not exported
 #define MB_CUR_MAX __mb_cur_max
 
 
 #define MB_CUR_MAX __mb_cur_max
 
 
-int _isnanl(double x);
-int _isinfl(double x);
+int _isnanl(long double x);
+int _isinfl(long double x);
 int _isnan(double x);
 int _isinf(double x);
 
 int _isnan(double x);
 int _isinf(double x);
 
-
-
 /* Flags for the iobuf structure (for reference) */
 #if 0
 #define  _IOREAD  1 /* currently reading */
 /* Flags for the iobuf structure (for reference) */
 #if 0
 #define  _IOREAD  1 /* currently reading */
@@ -150,24 +148,22 @@ int _isinf(double x);
 #define  _IORW 0x0080 /* opened as "r+w" */
 #endif
 
 #define  _IORW 0x0080 /* opened as "r+w" */
 #endif
 
+#ifndef W_OK
+#define        W_OK    2       /* Check for write permission */
+#endif
+
 /* internal FILE->_flag flags */
 
 #define _IOMYBUF  0x0008  /* stdio malloc()'d buffer */
 #define _IOEOF    0x0010  /* EOF reached on read */
 #define _IOERR    0x0020  /* I/O error from system */
 #define _IOSTRG   0x0040  /* Strange or no file descriptor */
 /* internal FILE->_flag flags */
 
 #define _IOMYBUF  0x0008  /* stdio malloc()'d buffer */
 #define _IOEOF    0x0010  /* EOF reached on read */
 #define _IOERR    0x0020  /* I/O error from system */
 #define _IOSTRG   0x0040  /* Strange or no file descriptor */
-
 #define _IOBINARY 0x040000
 #define _IOTEXT   0x000000
 #define _IOBINARY 0x040000
 #define _IOTEXT   0x000000
-
 #define _IOCOMMIT 0x100000
 #define _IOCOMMIT 0x100000
-
 #define _IODIRTY  0x010000
 #define _IOAHEAD  0x020000
 
 #define _IODIRTY  0x010000
 #define _IOAHEAD  0x020000
 
-
-
-
 /*
  * The three possible buffering mode (nMode) values for setvbuf.
  * NOTE: _IOFBF works, but _IOLBF seems to work like unbuffered...
 /*
  * The three possible buffering mode (nMode) values for setvbuf.
  * NOTE: _IOFBF works, but _IOLBF seems to work like unbuffered...
@@ -176,12 +172,10 @@ int _isinf(double x);
 #define _IOFBF    0x0000     /* full buffered */
 #define _IOLBF    0x0040     /* line buffered */
 #define _IONBF    0x0004     /* not buffered */
 #define _IOFBF    0x0000     /* full buffered */
 #define _IOLBF    0x0040     /* line buffered */
 #define _IONBF    0x0004     /* not buffered */
-
 #define _IO_LBF   0x80000    /* this value is used insteat of _IOLBF within the
                                 structure FILE as value for _flags,
                                 because _IOLBF has the same value as _IOSTRG */
 
 #define _IO_LBF   0x80000    /* this value is used insteat of _IOLBF within the
                                 structure FILE as value for _flags,
                                 because _IOLBF has the same value as _IOSTRG */
 
-
 wint_t _filwbuf(FILE *f);
 
 #if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 2
 wint_t _filwbuf(FILE *f);
 
 #if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 2
@@ -189,6 +183,5 @@ wint_t _filwbuf(FILE *f);
    int __cdecl _flsbuf (int, FILE*);
 #endif
 
    int __cdecl _flsbuf (int, FILE*);
 #endif
 
-
 #endif /* __dj_include_libc_file_h__ */
 
 #endif /* __dj_include_libc_file_h__ */
 
index c08defd..7f74307 100644 (file)
@@ -1,7 +1,9 @@
-
 #ifndef __CRT_INTERNAL_MATH_H
 #define __CRT_INTERNAL_MATH_H
 
 #ifndef __CRT_INTERNAL_MATH_H
 #define __CRT_INTERNAL_MATH_H
 
+#ifndef _CRT_PRECOMP_H
+#error DO NOT INCLUDE THIS HEADER DIRECTLY
+#endif
 
 int     _isinf          (double); /* not exported */
 int     _isnanl         (long double); /* not exported */
 
 int     _isinf          (double); /* not exported */
 int     _isnanl         (long double); /* not exported */
index 1ad72f2..4adcc83 100644 (file)
@@ -3,6 +3,10 @@
 #ifndef __CRT_INTERNAL_TLS_H
 #define __CRT_INTERNAL_TLS_H
 
 #ifndef __CRT_INTERNAL_TLS_H
 #define __CRT_INTERNAL_TLS_H
 
+#ifndef _CRT_PRECOMP_H
+#error DO NOT INCLUDE THIS HEADER DIRECTLY
+#endif
+
 #include <stdarg.h>
 
 #include <windef.h>
 #include <stdarg.h>
 
 #include <windef.h>
index 6b9b090..ad8dfb6 100644 (file)
@@ -1,5 +1,4 @@
 #include "precomp.h"
 #include "precomp.h"
-#include <errno.h>
 #include <tchar.h>
 
 #define NDEBUG
 #include <tchar.h>
 
 #define NDEBUG
index 226b69f..560faee 100644 (file)
@@ -42,7 +42,6 @@
 #include <stdarg.h>
 #endif
 
 #include <stdarg.h>
 #endif
 
-#include <fcntl.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <share.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <share.h>
index 15636e1..fb84bf1 100644 (file)
  */
 #include "precomp.h"
 
  */
 #include "precomp.h"
 
-#include <float.h>
-#include <math.h>
-#include <errno.h>
-
 /* Approximate square roots of DBL_MAX and DBL_MIN.  Numbers
    between these two shouldn't neither overflow nor underflow
    when squared.  */
 /* Approximate square roots of DBL_MAX and DBL_MIN.  Numbers
    between these two shouldn't neither overflow nor underflow
    when squared.  */
index 2505cc6..2b8cc65 100644 (file)
  * ====================================================
  */
 
  * ====================================================
  */
 
-#include <float.h>
-#include <math.h>
-#include <internal/ieee.h>
-#include <internal/math.h>
-
+#include "precomp.h"
 
 //static const double one = 1.0;
 
 
 //static const double one = 1.0;
 
index 65b481b..880880d 100644 (file)
@@ -1,3 +1,4 @@
+#include "precomp.h"
 #include <string.h>
 
 /*
 #include <string.h>
 
 /*
index 76abf44..980a02a 100644 (file)
@@ -1,3 +1,4 @@
+#include "precomp.h"
 #include <mbstring.h>
 #include <string.h>
 
 #include <mbstring.h>
 #include <string.h>
 
index 2c3617b..bcae290 100644 (file)
@@ -9,6 +9,7 @@
  *              12/04/99: Created
  */
 
  *              12/04/99: Created
  */
 
+#include "precomp.h"
 #include <mbstring.h>
 #include <stdlib.h>
 
 #include <mbstring.h>
 #include <stdlib.h>
 
index 6af39a1..2f7e9de 100644 (file)
@@ -2,13 +2,18 @@
 #define _CRT_PRECOMP_H
 
 /* Some global constants to hack around the msvc build */
 #define _CRT_PRECOMP_H
 
 /* Some global constants to hack around the msvc build */
+/* These will go away or be moved soon enough */
+#define _CRT_NON_CONFORMING_SWPRINTFS
 #define _CRT_SECURE_NO_DEPRECATE
 #define _INC_WTIME_INL
 #define _INC_UTIME_INL
 #define _INC_TIME_INL
 
 /* Headers to be compiled */
 #define _CRT_SECURE_NO_DEPRECATE
 #define _INC_WTIME_INL
 #define _INC_UTIME_INL
 #define _INC_TIME_INL
 
 /* Headers to be compiled */
+#include <stdlib.h>
 #include <stdio.h>
 #include <stdio.h>
+#include <string.h>
+#include <conio.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <float.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <float.h>
@@ -16,6 +21,9 @@
 #include <math.h>
 #include <limits.h>
 
 #include <math.h>
 #include <limits.h>
 
+#include <sys/stat.h>
+#include <share.h>
+
 /* PSDK/NDK Headers */
 #define WIN32_NO_STATUS
 #include <windows.h>
 /* PSDK/NDK Headers */
 #define WIN32_NO_STATUS
 #include <windows.h>
 #endif
 
 /* CRT Internal data */
 #endif
 
 /* CRT Internal data */
+#include <internal/atexit.h>
+#include <internal/console.h>
 #include <internal/file.h>
 #include <internal/ieee.h>
 #include <internal/file.h>
 #include <internal/ieee.h>
+#include <internal/tls.h>
 
 #endif /* _CRT_PRECOMP_H */
 
 #endif /* _CRT_PRECOMP_H */
index 7a917b8..e0cbae7 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <process.h>
 #include <stdlib.h>
 #include <string.h>
 #include <process.h>
-#include <errno.h>
 
 /*
  * @implemented
 
 /*
  * @implemented
index d5d2510..ef9e467 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <signal.h>
 #include <stdlib.h>
 
 #include <signal.h>
 #include <stdlib.h>
-#include <errno.h>
 #include <string.h>
 
 void _default_handler(int signal);
 #include <string.h>
 
 void _default_handler(int signal);
index bc0926e..32c8c71 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include "precomp.h"
  */
 
 #include "precomp.h"
-#include <conio.h>
 
 int _fgetchar(void)
 {
 
 int _fgetchar(void)
 {
index 177e219..3e2ad2a 100644 (file)
@@ -83,9 +83,7 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
+#include "precomp.h"
 
 link_warning (gets, "the `gets' function is dangerous and should not be used.")
 
 
 link_warning (gets, "the `gets' function is dangerous and should not be used.")
 
index 36edbc5..95716dd 100644 (file)
@@ -1,9 +1,6 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
 
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
 
-#include <errno.h>
-
-
 #ifdef perror
 #undef perror
 void perror(const char *s);
 #ifdef perror
 #undef perror
 void perror(const char *s);
index 8422811..be2f15d 100644 (file)
@@ -2,12 +2,6 @@
 
 #include "precomp.h"
 
 
 #include "precomp.h"
 
-int _isnanl(double x);
-int _isinfl(double x);
-int _isnan(double x);
-int _isinf(double x);
-
-
 int
 __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp);
 
 int
 __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp);
 
index d6c105c..9320d9b 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-#include <internal/atexit.h>
+#include "precomp.h"
 
 void _atexit_cleanup(void)
 {
 
 void _atexit_cleanup(void)
 {
index e2ae388..7b74bdb 100644 (file)
@@ -2,8 +2,6 @@
  *
  */
 #include "precomp.h"
  *
  */
 #include "precomp.h"
-#include <internal/tls.h>
-
 #include "doserrmap.h"
 
 /*
 #include "doserrmap.h"
 
 /*
index 8db6a67..32449bf 100644 (file)
@@ -1,5 +1,6 @@
 /* $Id$
  */
 /* $Id$
  */
+#include "precomp.h"
 #include <stdlib.h>
 #include <string.h>
 
 #include <stdlib.h>
 #include <string.h>
 
index bb00b4c..e09457f 100644 (file)
@@ -1,7 +1,4 @@
-#include <stdlib.h>
-#include <string.h>
-#include <tchar.h>
-
+#include "precomp.h"
 
 /*
  * @implemented
 
 /*
  * @implemented
index 0b5a3ca..4655be5 100644 (file)
@@ -2,4 +2,6 @@
 #define _UNICODE
 #define UNICODE
 
 #define _UNICODE
 #define UNICODE
 
+#include <tchar.h>
+
 #include "splitp.c"
 #include "splitp.c"
index a9ccba4..f130b9f 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "precomp.h"
 
 
 #include "precomp.h"
 
-#include <errno.h>
 #include <malloc.h>
 #include <stdlib.h>
 #include <internal/mtdll.h>
 #include <malloc.h>
 #include <stdlib.h>
 #include <internal/mtdll.h>
index 571dc26..827e8f5 100644 (file)
@@ -26,7 +26,6 @@
 #include "precomp.h"
 
 #include <wchar.h>
 #include "precomp.h"
 
 #include <wchar.h>
-#include <conio.h>
 #include <ctype.h>
 
 #define NDEBUG
 #include <ctype.h>
 
 #define NDEBUG
index f1aa0a7..93939db 100644 (file)
@@ -21,9 +21,6 @@
  */
 
 #include <precomp.h>
  */
 
 #include <precomp.h>
-#include <stdio.h>
-#include <internal/tls.h>
-#include <stdlib.h>
 #include <internal/wine/msvcrt.h>
 #include <sys/stat.h>
 
 #include <internal/wine/msvcrt.h>
 #include <sys/stat.h>
 
index 776a87c..d30dfa7 100644 (file)
@@ -1 +1,9 @@
+#ifndef _CRT_PRECOMP_H
+#define _CRT_PRECOMP_H
+
+#include <stdio.h>
 #include <windows.h>
 #include <windows.h>
+#include <internal/tls.h>
+#include <stdlib.h>
+
+#endif /* _CRT_PRECOMP_H */
index bae034d..a2b30a7 100644 (file)
@@ -21,9 +21,6 @@
  */
 
 #include <precomp.h>
  */
 
 #include <precomp.h>
-#include <stdio.h>
-#include <internal/tls.h>
-#include <stdlib.h>
 #include <internal/wine/msvcrt.h>
 
 #define NDEBUG
 #include <internal/wine/msvcrt.h>
 
 #define NDEBUG
index 776a87c..acfc877 100644 (file)
@@ -1 +1,9 @@
+#ifndef _CRT_PRECOMP_H
+#define _CRT_PRECOMP_H
+
+#include <stdio.h>
+#include <internal/tls.h>
+#include <stdlib.h>
 #include <windows.h>
 #include <windows.h>
+
+#endif /* _CRT_PRECOMP_H */
index 86c789f..f292e5c 100644 (file)
@@ -31,13 +31,13 @@ int _fltused = 0x9875;
 
 double atan (double __x)
 {
 
 double atan (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fld1\n\t"
      "fpatan"
   __asm __volatile__
     ("fld1\n\t"
      "fpatan"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -45,16 +45,16 @@ double atan (double __x)
  */
 double ceil (double __x)
 {
  */
 double ceil (double __x)
 {
-  register double __value;
+  register double __val;
   __volatile unsigned short int __cw, __cwtmp;
 
   __asm __volatile ("fnstcw %0" : "=m" (__cw));
   __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */
   __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
   __volatile unsigned short int __cw, __cwtmp;
 
   __asm __volatile ("fnstcw %0" : "=m" (__cw));
   __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */
   __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
-  __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
+  __asm __volatile ("frndint" : "=t" (__val) : "0" (__x));
   __asm __volatile ("fldcw %0" : : "m" (__cw));
 
   __asm __volatile ("fldcw %0" : : "m" (__cw));
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -62,12 +62,12 @@ double ceil (double __x)
  */
 double cos (double __x)
 {
  */
 double cos (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fcos"
   __asm __volatile__
     ("fcos"
-     : "=t" (__value): "0" (__x));
+     : "=t" (__val): "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -75,12 +75,12 @@ double cos (double __x)
  */
 double fabs (double __x)
 {
  */
 double fabs (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fabs"
   __asm __volatile__
     ("fabs"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -88,16 +88,16 @@ double fabs (double __x)
  */
 double floor (double __x)
 {
  */
 double floor (double __x)
 {
-  register double __value;
+  register double __val;
   __volatile unsigned short int __cw, __cwtmp;
 
   __asm __volatile ("fnstcw %0" : "=m" (__cw));
   __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
   __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
   __volatile unsigned short int __cw, __cwtmp;
 
   __asm __volatile ("fnstcw %0" : "=m" (__cw));
   __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
   __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
-  __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
+  __asm __volatile ("frndint" : "=t" (__val) : "0" (__x));
   __asm __volatile ("fldcw %0" : : "m" (__cw));
 
   __asm __volatile ("fldcw %0" : : "m" (__cw));
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -105,26 +105,26 @@ double floor (double __x)
  */
 double log (double __x)
 {
  */
 double log (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fldln2\n\t"
      "fxch\n\t"
      "fyl2x"
   __asm __volatile__
     ("fldln2\n\t"
      "fxch\n\t"
      "fyl2x"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 double __log2 (double __x)
 {
 }
 
 double __log2 (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fld1\n\t"
      "fxch\n\t"
      "fyl2x"
   __asm __volatile__
     ("fld1\n\t"
      "fxch\n\t"
      "fyl2x"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -132,7 +132,7 @@ double __log2 (double __x)
  */
 double pow (double __x, double __y)
 {
  */
 double pow (double __x, double __y)
 {
-  register double __value, __exponent;
+  register double __val, __exponent;
   long __p = (long) __y;
 
   if (__x == 0.0 && __y > 0.0)
   long __p = (long) __y;
 
   if (__x == 0.0 && __y > 0.0)
@@ -165,13 +165,13 @@ double pow (double __x, double __y)
      "fxch\n\t"
      "fsub      %%st(1)         # fract(y * log2(x))\n\t"
      "f2xm1                     # 2^(fract(y * log2(x))) - 1\n\t"
      "fxch\n\t"
      "fsub      %%st(1)         # fract(y * log2(x))\n\t"
      "f2xm1                     # 2^(fract(y * log2(x))) - 1\n\t"
-     : "=t" (__value), "=u" (__exponent) :  "0" (__log2 (__x)), "1" (__y));
-  __value += 1.0;
+     : "=t" (__val), "=u" (__exponent) :  "0" (__log2 (__x)), "1" (__y));
+  __val += 1.0;
   __asm __volatile__
     ("fscale"
   __asm __volatile__
     ("fscale"
-     : "=t" (__value) : "0" (__value), "u" (__exponent));
+     : "=t" (__val) : "0" (__val), "u" (__exponent));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -179,12 +179,12 @@ double pow (double __x, double __y)
  */
 double sin (double __x)
 {
  */
 double sin (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fsin"
   __asm __volatile__
     ("fsin"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -192,12 +192,12 @@ double sin (double __x)
  */
 double sqrt (double __x)
 {
  */
 double sqrt (double __x)
 {
-  register double __value;
+  register double __val;
   __asm __volatile__
     ("fsqrt"
   __asm __volatile__
     ("fsqrt"
-     : "=t" (__value) : "0" (__x));
+     : "=t" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 
 /*
 }
 
 /*
@@ -205,11 +205,11 @@ double sqrt (double __x)
  */
 double tan (double __x)
 {
  */
 double tan (double __x)
 {
-  register double __value;
-  register double __value2 __attribute__ ((unused));
+  register double __val;
+  register double __val2 __attribute__ ((unused));
   __asm __volatile__
     ("fptan"
   __asm __volatile__
     ("fptan"
-     : "=t" (__value2), "=u" (__value) : "0" (__x));
+     : "=t" (__val2), "=u" (__val) : "0" (__x));
 
 
-  return __value;
+  return __val;
 }
 }