svn path=/trunk/; revision=19673
43 files changed:
* PROGRAMMER: Eric Kohl (Imported from DJGPP)
*/
* PROGRAMMER: Eric Kohl (Imported from DJGPP)
*/
-#include <conio.h>
-#include <stdlib.h>
-#include <conio.h>
-#include <internal/console.h>
-
-#include <conio.h>
-#include <internal/console.h>
-
-#include <conio.h>
-#include <internal/console.h>
-
/*
* FIXME PeekConsoleInput returns more than keyboard hits
/*
* FIXME PeekConsoleInput returns more than keyboard hits
-#include <conio.h>
-#include <internal/console.h>
-
-
-
int char_avail = 0;
int ungot_char = 0;
int char_avail = 0;
int ungot_char = 0;
#include "precomp.h"
#include <direct.h>
#include <stdlib.h>
#include "precomp.h"
#include <direct.h>
#include <stdlib.h>
#include <direct.h>
#include <internal/debug.h>
#include <tchar.h>
#include <direct.h>
#include <internal/debug.h>
#include <tchar.h>
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>
#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
+#endif
+#ifndef UINT64_MAX
#define UINT64_MAX 0xffffffffffffffff
#endif
#define UINT64_MAX 0xffffffffffffffff
#endif
#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;
#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;
#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 */
#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...
#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
int __cdecl _flsbuf (int, FILE*);
#endif
int __cdecl _flsbuf (int, FILE*);
#endif
#endif /* __dj_include_libc_file_h__ */
#endif /* __dj_include_libc_file_h__ */
#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 */
#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>
#include <tchar.h>
#define NDEBUG
#include <tchar.h>
#define NDEBUG
#include <stdarg.h>
#endif
#include <stdarg.h>
#endif
#include <sys/stat.h>
#include <string.h>
#include <share.h>
#include <sys/stat.h>
#include <string.h>
#include <share.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. */
* ====================================================
*/
* ====================================================
*/
-#include <float.h>
-#include <math.h>
-#include <internal/ieee.h>
-#include <internal/math.h>
-
//static const double one = 1.0;
//static const double one = 1.0;
#include <mbstring.h>
#include <string.h>
#include <mbstring.h>
#include <string.h>
#include <mbstring.h>
#include <stdlib.h>
#include <mbstring.h>
#include <stdlib.h>
#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 <string.h>
+#include <conio.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#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 */
#include <stdlib.h>
#include <string.h>
#include <process.h>
#include <stdlib.h>
#include <string.h>
#include <process.h>
#include <signal.h>
#include <stdlib.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
void _default_handler(int signal);
#include <string.h>
void _default_handler(int signal);
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>
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.")
/* 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"
#ifdef perror
#undef perror
void perror(const char *s);
#ifdef perror
#undef perror
void perror(const char *s);
-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);
/* 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>
void _atexit_cleanup(void)
{
void _atexit_cleanup(void)
{
*
*/
#include "precomp.h"
*
*/
#include "precomp.h"
-#include <internal/tls.h>
-
#include "doserrmap.h"
/*
#include "doserrmap.h"
/*
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#include <stdlib.h>
-#include <string.h>
-#include <tchar.h>
-
#define _UNICODE
#define UNICODE
#define _UNICODE
#define UNICODE
#include <malloc.h>
#include <stdlib.h>
#include <internal/mtdll.h>
#include <malloc.h>
#include <stdlib.h>
#include <internal/mtdll.h>
#include "precomp.h"
#include <wchar.h>
#include "precomp.h"
#include <wchar.h>
#include <ctype.h>
#define NDEBUG
#include <ctype.h>
#define NDEBUG
-#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>
+#ifndef _CRT_PRECOMP_H
+#define _CRT_PRECOMP_H
+
+#include <stdio.h>
+#include <internal/tls.h>
+#include <stdlib.h>
+
+#endif /* _CRT_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
+#ifndef _CRT_PRECOMP_H
+#define _CRT_PRECOMP_H
+
+#include <stdio.h>
+#include <internal/tls.h>
+#include <stdlib.h>
+
+#endif /* _CRT_PRECOMP_H */
double atan (double __x)
{
double atan (double __x)
{
- register double __value;
__asm __volatile__
("fld1\n\t"
"fpatan"
__asm __volatile__
("fld1\n\t"
"fpatan"
- : "=t" (__value) : "0" (__x));
+ : "=t" (__val) : "0" (__x));
*/
double ceil (double __x)
{
*/
double ceil (double __x)
{
- register double __value;
__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));
*/
double cos (double __x)
{
*/
double cos (double __x)
{
- register double __value;
__asm __volatile__
("fcos"
__asm __volatile__
("fcos"
- : "=t" (__value): "0" (__x));
+ : "=t" (__val): "0" (__x));
*/
double fabs (double __x)
{
*/
double fabs (double __x)
{
- register double __value;
__asm __volatile__
("fabs"
__asm __volatile__
("fabs"
- : "=t" (__value) : "0" (__x));
+ : "=t" (__val) : "0" (__x));
*/
double floor (double __x)
{
*/
double floor (double __x)
{
- register double __value;
__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));
*/
double log (double __x)
{
*/
double log (double __x)
{
- register double __value;
__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));
}
double __log2 (double __x)
{
}
double __log2 (double __x)
{
- register double __value;
__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));
*/
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)
"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));
*/
double sin (double __x)
{
*/
double sin (double __x)
{
- register double __value;
__asm __volatile__
("fsin"
__asm __volatile__
("fsin"
- : "=t" (__value) : "0" (__x));
+ : "=t" (__val) : "0" (__x));
*/
double sqrt (double __x)
{
*/
double sqrt (double __x)
{
- register double __value;
__asm __volatile__
("fsqrt"
__asm __volatile__
("fsqrt"
- : "=t" (__value) : "0" (__x));
+ : "=t" (__val) : "0" (__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));