-use native mingw headers and not private copies of them
tchar.h:
-added lotsa missin stuff

svn path=/trunk/; revision=13606
This commit is contained in:
Gunnar Dalsnes 2005-02-16 22:22:42 +00:00
parent 159e5dbdb6
commit 66c87c2788
48 changed files with 400 additions and 4736 deletions

View file

@ -1,86 +0,0 @@
/*
* alloc.h
*
* Memory management functions. Because most of these functions are
* actually declared in stdlib.h I have decided to simply include that
* header file. This file is included by malloc.h. My head hurts...
*
* NOTE: In the version of the Standard C++ Library from Cygnus there
* is also an alloc.h which needs to be on your include path. Most of
* the time I think the most sensible option would be to get rid of
* this file.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _ALLOC_H_
#define _ALLOC_H_
#include <msvcrt/stdlib.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* The structure used to walk through the heap with _heapwalk.
* TODO: This is a guess at the internals of this structure.
*/
typedef struct _heapinfo
{
void* ptr;
unsigned int size;
int in_use;
} _HEAPINFO;
int _heapwalk(_HEAPINFO* pHeapinfo);
#ifdef __GNUC__
#ifdef USE_C_ALLOCA
void* C_alloca(size_t size);
#define _alloca(x) C_alloca(x)
#else /* USE_C_ALLOCA */
#define _alloca(x) __builtin_alloca(x)
#endif /* USE_C_ALLOCA */
#else /* __GNUC__ */
void* _alloca(size_t size);
#endif /* __GNUC__ */
#ifndef _NO_OLDNAMES
#define heapwalk(x) _heapwalk(x)
#define alloca(s) _alloca(s)
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _ALLOC_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,69 +0,0 @@
/*
* assert.h
*
* Define the assert macro for debug output.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef _ASSERT_H_
#define _ASSERT_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NDEBUG
/*
* If not debugging, assert does nothing.
*/
#define assert(x) ((void)0)
#else /* debugging enabled */
/*
* CRTDLL nicely supplies a function which does the actual output and
* call to abort.
*/
#ifndef __ATTRIB_NORETURN
#ifdef __GNUC__
#define _ATTRIB_NORETURN __attribute__ ((noreturn))
#else /* Not __GNUC__ */
#define _ATTRIB_NORETURN
#endif /* __GNUC__ */
#endif
void _assert(const char* szExpression, const char* szFileName, int nLine) _ATTRIB_NORETURN;
/*
* Definition of the assert macro.
*/
#define assert(x) if(!(x)) _assert( #x , __FILE__, __LINE__);
#endif /* NDEBUG */
#ifdef __cplusplus
}
#endif
#endif /* Not _ASSERT_H_ */

View file

@ -1,63 +0,0 @@
/*
* conio.h
*
* Low level console I/O functions. Pretty please try to use the ANSI
* standard ones if you are writing new code.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _CONIO_H_
#define _CONIO_H_
#ifdef __cplusplus
extern "C" {
#endif
char* _cgets(char*);
int _cprintf(const char*, ...);
int _cputs(const char*);
int _cscanf(char*, ...);
int _getch(void);
int _getche(void);
int _kbhit(void);
int _putch(int);
int _ungetch(int);
#ifndef _NO_OLDNAMES
#define getch _getch
#define getche _getche
#define kbhit _kbhit
#define putch(cPut) _putch(cPut)
#define ungetch(cUnget) _ungetch(cUnget)
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not _CONIO_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,146 +0,0 @@
/*
* ctype.h
*
* Functions for testing character types and converting characters.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.10 $
* $Author$
* $Date$
*
*/
#ifndef _CTYPE_H_
#define _CTYPE_H_
#define __need_wchar_t
#define __need_wint_t
#include <msvcrt/stddef.h>
/*
* The following flags are used to tell iswctype and _isctype what character
* types you are looking for.
*/
#define _UPPER 0x0001
#define _LOWER 0x0002
#define _DIGIT 0x0004
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
#define _PUNCT 0x0010
#define _CONTROL 0x0020
#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
#define _HEX 0x0080
#define _LEADBYTE 0x8000
#define _ALPHA 0x0103
#ifdef __cplusplus
extern "C" {
#endif
int isalnum(int);
int isalpha(int);
int iscntrl(int);
int isdigit(int);
int isgraph(int);
int islower(int);
int isprint(int);
int ispunct(int);
int isspace(int);
int isupper(int);
int isxdigit(int);
#ifndef __STRICT_ANSI__
int _isctype (unsigned int, int);
#endif
/* These are the ANSI versions, with correct checking of argument */
int tolower(int);
int toupper(int);
/*
* NOTE: The above are not old name type wrappers, but functions exported
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
* exported.
*/
#ifndef __STRICT_ANSI__
/*
* These are the cheap non-std versions: The return values are undefined
* if the argument is not ASCII char or is not of appropriate case
*/
int _tolower(int);
int _toupper(int);
#endif
/*
* TODO: MB_CUR_MAX should be defined here (if not already defined, since
* it should also be defined in stdlib.h). It is supposed to be the
* maximum number of bytes in a multi-byte character in the current
* locale. Perhaps accessible through the __mb_curr_max_dll entry point,
* but I think (again) that that is a variable pointer, which leads to
* problems under the current Cygwin compiler distribution.
*/
typedef int wctype_t;
/* Wide character equivalents */
#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswascii(wint_t);
int iswcntrl(wint_t);
int iswctype(wint_t, wctype_t);
int is_wctype(wint_t, wctype_t); /* Obsolete! */
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswprint(wint_t);
int iswpunct(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
wchar_t towlower(wchar_t);
wchar_t towupper(wchar_t);
int isleadbyte(int);
#ifndef __STRICT_ANSI__
int __isascii(int);
int __toascii(int);
int __iscsymf(int); /* Valid first character in C symbol */
int __iscsym(int); /* Valid character in C symbol (after first) */
#ifndef _NO_OLDNAMES
#define isascii(c) __isascii(c)
#define toascii(c) _toascii(c)
#define iscsymf(c) __iscsymf(c)
#define iscsym(c) __iscsym(c)
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#endif /* Not _CTYPE_H_ */

View file

@ -1,149 +0,0 @@
/*
* dir.h
*
* Functions for working with directories and path names.
* This file OBSOLESCENT and only provided for backward compatibility.
* Please use io.h instead.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.6 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _DIR_H_
#define _DIR_H_
#include <msvcrt/stdio.h> /* To get FILENAME_MAX... ugly. */
#include <msvcrt/sys/types.h> /* To get time_t. */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Attributes of files as returned by _findfirst et al.
*/
#define _A_NORMAL 0x00000000
#define _A_RDONLY 0x00000001
#define _A_HIDDEN 0x00000002
#define _A_SYSTEM 0x00000004
#define _A_VOLID 0x00000008
#define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
/*
* The following structures are filled in by _findfirst or _findnext when
* they succeed in finding a match.
*/
struct _finddata_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
_fsize_t size;
char name[FILENAME_MAX]; /* may include spaces. */
};
struct _finddatai64_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
__int64 size;
char name[FILENAME_MAX]; /* may include spaces. */
};
struct _wfinddata_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
_fsize_t size;
wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
struct _wfinddatai64_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
__int64 size;
wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
/*
* Functions for searching for files. _findfirst returns -1 if no match
* is found. Otherwise it returns a handle to be used in _findnext and
* _findclose calls. _findnext also returns -1 if no match could be found,
* and 0 if a match was found. Call _findclose when you are finished.
*/
int _findclose(int nHandle);
int _findfirst(const char* szFilespec, struct _finddata_t* find);
int _findnext(int nHandle, struct _finddata_t* find);
int _findfirsti64(const char* szFilespec, struct _finddatai64_t* find);
int _findnexti64(int nHandle, struct _finddatai64_t* find);
/* Wide character versions */
int _wfindfirst(const wchar_t *_name, struct _wfinddata_t *result);
int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result);
int _wfindnext(int handle, struct _wfinddata_t *result);
int _wfindnexti64(int handle, struct _wfinddatai64_t *result);
int _chdir(const char* szPath);
char* _getcwd(char* caBuffer, int nBufferSize);
int _mkdir(const char* szPath);
char* _mktemp(char* szTemplate);
int _rmdir(const char* szPath);
/* Wide character versions */
int _wchdir(const wchar_t *szPath);
wchar_t* _wgetcwd(wchar_t *buffer, int maxlen);
int _wmkdir(const wchar_t *_path);
wchar_t* _wmktemp(wchar_t *_template);
int _wrmdir(const wchar_t *_path);
#ifndef _NO_OLDNAMES
int chdir(const char* szPath);
char* getcwd(char* caBuffer, int nBufferSize);
int mkdir(const char* szPath);
char* mktemp(char* szTemplate);
int rmdir(const char* szPath);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not _DIR_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,81 +0,0 @@
/*
* direct.h
*
* Functions for manipulating paths and directories (included from io.h)
* plus functions for setting the current drive.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef _DIRECT_H_
#define _DIRECT_H_
#ifndef _WCHAR_T_
typedef unsigned short wchar_t;
#define _WCHAR_T_
#endif
#ifndef _SIZE_T_
typedef unsigned int size_t;
#define _SIZE_T_
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct _diskfree_t {
unsigned short total_clusters;
unsigned short avail_clusters;
unsigned short sectors_per_cluster;
unsigned short bytes_per_sector;
};
int _getdrive(void);
int _chdrive(int);
char* _getcwd(char*, int);
unsigned int _getdiskfree(unsigned int, struct _diskfree_t*);
int _chdir(const char*);
int _mkdir(const char*);
int _rmdir(const char*);
#define chdir _chdir
#define getcwd _getcwd
#define mkdir _mkdir
#define rmdir _rmdir
char* _getdcwd(int nDrive, char* caBuffer, int nBufLen);
wchar_t* _wgetcwd(wchar_t *buffer, int maxlen);
wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen);
int _wchdir(const wchar_t* _path);
int _wmkdir(const wchar_t* _path);
int _wrmdir(const wchar_t* _path);
#ifdef __cplusplus
}
#endif
#endif /* Not _DIRECT_H_ */

View file

@ -1,120 +0,0 @@
/*
* errno.h
*
* Error numbers and access to error reporting.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.7 $
* $Author$
* $Date$
*
*/
#ifndef _ERRNO_H_
#define _ERRNO_H_
/*
* Error numbers.
* TODO: Can't be sure of some of these assignments, I guessed from the
* names given by strerror and the defines in the Cygnus errno.h. A lot
* of the names from the Cygnus errno.h are not represented, and a few
* of the descriptions returned by strerror do not obviously match
* their error naming.
*/
#define EPERM 1 /* Operation not permitted */
#define ENOFILE 2 /* No such file or directory */
#define ENOENT 2
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted function call */
#define EIO 5 /* Input/output error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file descriptor */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Resource temporarily unavailable */
#define ENOMEM 12 /* Not enough space */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
/* 15 - Unknown Error */
#define EBUSY 16 /* strerror reports "Resource device" */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Improper link (cross-device link?) */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate I/O control operation */
/* 26 - Unknown Error */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Domain error (math functions) */
#define ERANGE 34 /* Result too large (possibly too small) */
/* 35 - Unknown Error */
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
#define EDEADLK 36
/* 37 - Unknown Error */
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
#define EILSEQ 42 /* Illegal byte sequence */
/*
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
* sockets.h header provided with windows32api-0.1.2.
* You should go and put an #if 0 ... #endif around the whole block
* of errors (look at the comment above them).
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions of macros for the 'variables' errno, _doserrno, sys_nerr and
* sys_errlist.
*/
int* _errno(void);
#define errno (*_errno())
int* __doserrno(void);
#define _doserrno (*__doserrno())
/* One of the MSVCRTxx libraries */
extern int* __imp__sys_nerr;
#ifndef sys_nerr
#define sys_nerr (*__imp__sys_nerr)
#endif
extern char** __imp__sys_errlist;
#ifndef sys_errlist
#define sys_errlist (__imp__sys_errlist)
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not _ERRNO_H_ */

View file

@ -1,130 +0,0 @@
/*
* fcntl.h
*
* Access constants for _open. Note that the permissions constants are
* in sys/stat.h (ick).
*
* This code is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.6 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* added _O_RANDOM_O_SEQUENTIAL _O_SHORT_LIVED*/
/* changed fmode_dll */
#ifndef _FCNTL_H_
#define _FCNTL_H_
/*
* It appears that fcntl.h should include io.h for compatibility...
*/
#include <msvcrt/io.h>
/*
* This variable determines the default file mode.
* TODO: Which flags work?
*/
#if 0
#ifdef __MSVCRT__ // || _MSVCRT_LIB_
extern unsigned int* __imp__fmode;
#define _fmode (*__imp__fmode)
#else
/* CRTDLL */
extern unsigned int* _fmode_dll;
#define _fmode (*_fmode_dll)
#endif
#endif /* 0 */
/*
* NOTE: This is the correct definition to build crtdll.
* It is NOT valid outside of crtdll.
*/
extern unsigned int* _fmode_dll;
#ifndef __USE_W32API
extern unsigned int _fmode;
#endif
/* Specifiy one of these flags to define the access mode. */
#define _O_RDONLY 0
#define _O_WRONLY 1
#define _O_RDWR 2
/* Mask for access mode bits in the _open flags. */
#define _O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
#define _O_RANDOM 0x0010
#define _O_SEQUENTIAL _O_RANDOM
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
* WARNING: Even if not created by _open! */
#define _O_NOINHERIT 0x0080
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
#define _O_SHORT_LIVED 0x1000
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
#define _O_BINARY 0x8000 /* Input and output is not translated. */
#define _O_RAW _O_BINARY
#ifndef __STRICT_ANSI__
#ifndef _NO_OLDNAMES
/* POSIX/Non-ANSI names for increased portability */
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_ACCMODE _O_ACCMODE
#define O_APPEND _O_APPEND
#define O_CREAT _O_CREAT
#define O_TRUNC _O_TRUNC
#define O_EXCL _O_EXCL
#define O_TEXT _O_TEXT
#define O_BINARY _O_BINARY
#define O_TEMPORARY _O_TEMPORARY
#define O_NOINHERIT _O_NOINHERIT
#define O_RANDOM _O_RANDOM
#define O_SEQUENTIAL _O_RANDOM
#define O_SHORT_LIVED _O_SHORT_LIVED
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
extern "C" {
#endif
int _setmode (int, int);
#ifndef _NO_OLDNAMES
int setmode (int, int);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not __STRICT_ANSI__ */
#endif /* Not _FCNTL_H_ */

View file

@ -1,214 +0,0 @@
/*
* float.h
*
* Constants related to floating point arithmetic.
*
* Also included here are some non-ANSI bits for accessing the floating
* point controller.
*
* NOTE: GCC provides float.h, and it is probably more accurate than this,
* but it doesn't include the non-standard stuff for accessing the
* fp controller. (TODO: Move those bits elsewhere?) Thus it is
* probably not a good idea to use the GCC supplied version instead
* of this header.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
#ifndef _FLOAT_H_
#define _FLOAT_H_
#define FLT_ROUNDS 1
#define FLT_GUARD 1
#define FLT_NORMALIZE 1
/*
* The characteristics of float.
*/
/* The radix for floating point representation. */
#define FLT_RADIX 2
/* Decimal digits of precision. */
#define FLT_DIG 6
/* Smallest number such that 1+x != 1 */
#define FLT_EPSILON 1.19209290e-07F
/* The number of base FLT_RADIX digits in the mantissa. */
#define FLT_MANT_DIG 24
/* The maximum floating point number. */
#define FLT_MAX 3.40282347e+38F
/* Maximum n such that FLT_RADIX^n - 1 is representable. */
#define FLT_MAX_EXP 128
/* Maximum n such that 10^n is representable. */
#define FLT_MAX_10_EXP 38
/* Minimum normalized floating-point number. */
#define FLT_MIN 1.17549435e-38F
/* Minimum n such that FLT_RADIX^n is a normalized number. */
#define FLT_MIN_EXP (-125)
/* Minimum n such that 10^n is a normalized number. */
#define FLT_MIN_10_EXP (-37)
/*
* The characteristics of double.
*/
#define DBL_DIG 15
#define DBL_EPSILON 1.1102230246251568e-16
#define DBL_MANT_DIG 53
#define DBL_MAX 1.7976931348623157e+308
#define DBL_MAX_EXP 1024
#define DBL_MAX_10_EXP 308
#define DBL_MIN 2.2250738585072014e-308
#define DBL_MIN_EXP (-1021)
#define DBL_MIN_10_EXP (-307)
/*
* The characteristics of long double.
* NOTE: long double is the same as double.
*/
#define LDBL_DIG 15
#define LDBL_EPSILON 1.1102230246251568e-16L
#define LDBL_MANT_DIG 53
#define LDBL_MAX 1.7976931348623157e+308L
#define LDBL_MAX_EXP 1024
#define LDBL_MAX_10_EXP 308
#define LDBL_MIN 2.2250738585072014e-308L
#define LDBL_MIN_EXP (-1021)
#define LDBL_MIN_10_EXP (-307)
/*
* Functions and definitions for controlling the FPU.
*/
#ifndef __STRICT_ANSI__
/* TODO: These constants are only valid for x86 machines */
/* Control word masks for unMask */
#define _MCW_EM 0x0008001F /* Error masks */
#define _MCW_IC 0x00040000 /* Infinity */
#define _MCW_RC 0x00000300 /* Rounding */
#define _MCW_PC 0x00030000 /* Precision */
/* Control word values for unNew (use with related unMask above) */
#define _EM_INVALID 0x00000010
#define _EM_DENORMAL 0x00080000
#define _EM_ZERODIVIDE 0x00000008
#define _EM_OVERFLOW 0x00000004
#define _EM_UNDERFLOW 0x00000002
#define _EM_INEXACT 0x00000001
#define _IC_AFFINE 0x00040000
#define _IC_PROJECTIVE 0x00000000
#define _RC_CHOP 0x00000300
#define _RC_UP 0x00000200
#define _RC_DOWN 0x00000100
#define _RC_NEAR 0x00000000
#define _PC_24 0x00020000
#define _PC_53 0x00010000
#define _PC_64 0x00000000
/* Return values for fpclass. */
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
#define _FPCLASS_NN 0x0008 /* Negative Normal */
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
#ifdef __cplusplus
extern "C" {
#endif
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
* i.e. change the bits in unMask to have the values they have in unNew,
* leaving other bits unchanged. */
unsigned int _controlfp(unsigned int unNew, unsigned int unMask);
unsigned int _control87(unsigned int unNew, unsigned int unMask);
unsigned int _clearfp(void); /* Clear the FPU status word */
unsigned int _statusfp(void); /* Report the FPU status word */
#define _clear87 _clearfp
#define _status87 _statusfp
/*
MSVCRT.dll _fpreset initializes the control register to 0x27f,
the status register to zero and the tag word to 0FFFFh.
This differs from asm instruction finit/fninit which set control
word to 0x37f (64 bit mantissa precison rather than 53 bit).
By default, the mingw version of _fpreset sets fp control as
per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
building your application.
*/
void _fpreset(void); /* Reset the FPU */
/* Global 'variable' for the current floating point error code. */
int* __fpecode(void);
#define _fpecode (*(__fpecode()))
/*
* IEEE recommended functions. MS puts them in float.h
* but they really belong in math.h.
*/
double _chgsign (double);
double _copysign (double, double);
double _logb (double);
double _nextafter (double, double);
double _scalb (double, long);
int _finite (double);
int _fpclass (double);
int _isnan (double);
int _isinf (double); /* not exported */
int _isnanl (long double); /* not exported */
int _isinfl (long double); /* not exported */
#define isnan(x) _isnan(x)
#define isinf(x) _isinf(x)
#ifdef __cplusplus
}
#endif
#endif /* Not __STRICT_ANSI__ */
#endif /* _FLOAT_H_ */

View file

@ -1,33 +0,0 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_libc_atexit_h__
#define __dj_include_libc_dosexec_h__
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
struct __atexit {
struct __atexit* __next;
void (*__function)(void);
};
extern struct __atexit* __atexit_ptr;
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* __dj_include_libc_dosexec_h__ */

View file

@ -1,12 +0,0 @@
/* console.h */
#ifndef __MSVCRT_INTERNAL_CONSOLE_H
#define __MSVCRT_INTERNAL_CONSOLE_H
extern int char_avail;
extern int ungot_char;
#endif /* __MSVCRT_INTERNAL_CONSOLE_H */
/* EOF */

View file

@ -1,79 +0,0 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_libc_file_h__
#define __dj_include_libc_file_h__
#include <msvcrt/stdio.h>
#include <msvcrt/fcntl.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
#ifndef _IORMONCL
#define _IORMONCL 004000 /* remove on close, for temp files */
#endif
/* if _flag & _IORMONCL, ._name_to_remove needs freeing */
#ifndef _IOUNGETC
#define _IOUNGETC 010000 /* there is an ungetc'ed character in the buffer */
#endif
/* might need check for IO_APPEND aswell */
#define OPEN4WRITING(f) ((((f)->_flag & _IOWRT) == _IOWRT))
#define OPEN4READING(f) ((((f)->_flag & _IOREAD) == _IOREAD))
/* might need check for IO_APPEND aswell */
#define WRITE_STREAM(f) ((((f)->_flag & _IOWRT) == _IOWRT))
#define READ_STREAM(f) ((((f)->_flag & _IOREAD) == _IOREAD))
char __validfp(FILE*);
int __set_errno(int err);
int __set_doserrno(int error);
void* filehnd(int fn);
char __is_text_file(FILE*);
int __fileno_alloc(void* hFile, int mode);
int _doprnt(const char* fmt, va_list args, FILE *);
int _doscan(FILE* iop, const char* fmt, va_list argp);
int __fileno_dup2(int handle1, int handle2);
int __fileno_getmode(int _fd);
int __fileno_setmode(int _fd, int _newmode);
int __fileno_close(int _fd);
void sigabort_handler(int sig);
#include <windows.h>
void UnixTimeToFileTime(time_t unix_time, FILETIME* filetime, DWORD remainder);
time_t FileTimeToUnixTime(const FILETIME* filetime, DWORD *remainder);
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#define __FILE_REC_MAX 20
typedef struct __file_rec
{
struct __file_rec* next;
int count;
FILE* files[__FILE_REC_MAX];
} __file_rec;
extern __file_rec* __file_rec_list;
void _dosmaperr(unsigned long oserrcode);
extern int __fmode;
#ifdef __cplusplus
}
#endif
#endif /* __dj_include_libc_file_h__ */

View file

@ -1,25 +0,0 @@
#ifndef _IEEE_H
#define _IEEE_H
typedef struct {
unsigned int mantissa:23;
unsigned int exponent:8;
unsigned int sign:1;
} float_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:20;
unsigned int exponent:11;
unsigned int sign:1;
} double_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:32;
unsigned int exponent:15;
unsigned int sign:1;
unsigned int empty:16;
} long_double_t;
#endif

View file

@ -1,72 +0,0 @@
/*
* Copyright (c) 2002, TransGaming Technologies Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef WINE_MTDLL_H
#define WINE_MTDLL_H
#if defined(_MT)
#define _mlock(locknum) _lock(locknum)
#define _munlock(locknum) _unlock(locknum)
void _unlock( int locknum );
void _lock( int locknum );
#else
#define _mlock(locknum) do {} while(0)
#define _munlock(locknum) do {} while(0)
#endif
#define _SIGNAL_LOCK 1
#define _IOB_SCAN_LOCK 2
#define _TMPNAM_LOCK 3
#define _INPUT_LOCK 4
#define _OUTPUT_LOCK 5
#define _CSCANF_LOCK 6
#define _CPRINTF_LOCK 7
#define _CONIO_LOCK 8
#define _HEAP_LOCK 9
#define _BHEAP_LOCK 10 /* No longer used? */
#define _TIME_LOCK 11
#define _ENV_LOCK 12
#define _EXIT_LOCK1 13
#define _EXIT_LOCK2 14
#define _THREADDATA_LOCK 15 /* No longer used? */
#define _POPEN_LOCK 16
#define _LOCKTAB_LOCK 17
#define _OSFHND_LOCK 18
#define _SETLOCALE_LOCK 19
#define _LC_COLLATE_LOCK 20 /* No longer used? */
#define _LC_CTYPE_LOCK 21 /* No longer used? */
#define _LC_MONETARY_LOCK 22 /* No longer used? */
#define _LC_NUMERIC_LOCK 23 /* No longer used? */
#define _LC_TIME_LOCK 24 /* No longer used? */
#define _MB_CP_LOCK 25
#define _NLG_LOCK 26
#define _TYPEINFO_LOCK 27
#define _STREAM_LOCKS 28
/* Must match definition in msvcrt/stdio.h */
#define _IOB_ENTRIES 20
#define _LAST_STREAM_LOCK (_STREAM_LOCKS+_IOB_ENTRIES-1)
#define _TOTAL_LOCKS (_LAST_STREAM_LOCK+1)
#endif /* WINE_MTDLL_H */

View file

@ -1,31 +0,0 @@
/* rterror.h */
#ifndef __MSVCRT_INTERNAL_RTERROR_H
#define __MSVCRT_INTERNAL_RTERROR_H
#define _RT_STACK 0 /* stack overflow */
#define _RT_NULLPTR 1 /* null pointer assignment */
#define _RT_FLOAT 2 /* floating point not loaded */
#define _RT_INTDIV 3 /* integer divide by 0 */
#define _RT_SPACEARG 4 /* not enough space for arguments */
#define _RT_SPACEENV 5 /* not enough space for environment */
#define _RT_ABORT 6 /* abnormal program termination */
#define _RT_THREAD 7 /* not enough space for thread data */
#define _RT_LOCK 8 /* unexpected multi-thread lock error */
#define _RT_HEAP 9 /* unexpected heap error */
#define _RT_OPENCON 10 /* unable to open console device */
#define _RT_NONCONT 11 /* non-continuable exception */
#define _RT_INVALDISP 12 /* invalid disposition of exception */
#define _RT_ONEXIT 13 /* insufficient heap to allocate
* initial table of function pointers
* used by _onexit()/atexit(). */
#define _RT_PUREVIRT 14 /* pure virtual function call attempted
* (C++ error) */
#define _RT_STDIOINIT 15 /* not enough space for stdio initialization */
#define _RT_LOWIOINIT 16 /* not enough space for lowio initialization */
void _amsg_exit (int errnum);
#endif /* __MSVCRT_INTERNAL_RTERROR_H */

View file

@ -1,12 +0,0 @@
/* stdio.h */
#ifndef __MSVCRT_INTERNAL_STDIO_H
#define __MSVCRT_INTERNAL_STDIO_H
int __vfscanf(FILE* s, const char* format, va_list argptr);
int __vscanf(const char* format, va_list arg);
int __vsscanf(const char* s,const char* format, va_list arg);
#endif /* __MSVCRT_INTERNAL_STDIO_H */
/* EOF */

View file

@ -1,42 +0,0 @@
/* tls.h */
#ifndef __MSVCRT_INTERNAL_TLS_H
#define __MSVCRT_INTERNAL_TLS_H
#include <windows.h>
#include <msvcrt/crttypes.h>
#include <msvcrt/stddef.h>
typedef struct _ThreadData
{
int terrno; /* *nix error code */
unsigned long tdoserrno; /* Win32 error code (for I/O only) */
unsigned LONGLONG tnext; /* used by rand/srand */
char *lasttoken; /* used by strtok */
wchar_t *wlasttoken; /* used by wcstok */
int fpecode; /* fp exception code */
/* qsort variables */
int (*qcmp)(const void *, const void *); /* the comparison routine */
int qsz; /* size of each record */
int thresh; /* THRESHold in chars */
int mthresh; /* MTHRESHold in chars */
EXCEPTION_RECORD *exc_record; /* Head of exception record list */
} THREADDATA, *PTHREADDATA;
int CreateThreadData(void);
void DestroyThreadData(void);
void FreeThreadData(PTHREADDATA ptd);
PTHREADDATA GetThreadData(void);
#endif /* __MSVCRT_INTERNAL_TLS_H */
/* EOF */

View file

@ -1,168 +0,0 @@
/*
* io.h
*
* System level I/O functions and types.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* added D_OK */
/* changed get_osfhandle and open_osfhandle */
/* added fileno as macro */
#ifndef __STRICT_ANSI__
#ifndef _IO_H_
#define _IO_H_
#include <msvcrt/sys/types.h>
#include <msvcrt/sys/stat.h>
/* We need the definition of FILE anyway... */
#include <msvcrt/stdio.h>
/* MSVC's io.h contains the stuff from dir.h, so I will too.
* NOTE: This also defines off_t, the file offset type, through
* and inclusion of sys/types.h */
#include <msvcrt/dir.h>
/* TODO: Maximum number of open handles has not been tested, I just set
* it the same as FOPEN_MAX. */
#define HANDLE_MAX FOPEN_MAX
/* Some defines for _access nAccessMode (MS doesn't define them, but
* it doesn't seem to hurt to add them). */
#define F_OK 0 /* Check for file existence */
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */
/* TODO: Is this safe? X_OK not supported directly... */
#define X_OK R_OK /* Check for execute permission */
#define D_OK 0x10
#ifdef __cplusplus
extern "C" {
#endif
int _access (const char*, int);
int _chsize (int, long);
int _close (int);
int _commit(int);
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
* the "owner write permission" bit (on FAT). */
int _creat (const char*, int);
int _dup (int);
int _dup2 (int, int);
long _filelength (int);
int _fileno (FILE*);
void* _get_osfhandle (int);
int _isatty (int);
int _chmod (const char* szPath, int nMode);
__int64 _filelengthi64(int nHandle);
/* In a very odd turn of events this function is excluded from those
* files which define _STREAM_COMPAT. This is required in order to
* build GNU libio because of a conflict with _eof in streambuf.h
* line 107. Actually I might just be able to change the name of
* the enum member in streambuf.h... we'll see. TODO */
#ifndef _STREAM_COMPAT
int _eof (int);
#endif
/* LK_... locking commands defined in sys/locking.h. */
int _locking (int, int, long);
off_t _lseek(int, off_t, int);
/* Optional third argument is unsigned unPermissions. */
int _open (const char*, int, ...);
int _open_osfhandle (void*, int);
int _pipe (int*, unsigned int, int);
size_t _read(int, void*, size_t);
/* SH_... flags for nShFlags defined in share.h
* Optional fourth argument is unsigned unPermissions */
int _sopen (char*, int, int, int);
long _tell(int);
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
unsigned _umask(unsigned);
int _unlink(const char*);
size_t _write(int, const void*, size_t);
__int64 _lseeki64(int _fildes, __int64 _offset, int _whence);
__int64 _telli64(int nHandle);
/* Wide character versions. Also declared in wchar.h. */
/* Not in crtdll.dll */
int _waccess(const wchar_t*, int);
int _wchmod(const wchar_t*, int);
int _wcreat(const wchar_t*, int);
int _wunlink(const wchar_t*);
int _wopen(const wchar_t*, int, ...);
int _wsopen(wchar_t*, int, int, int);
#ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions to improve portability.
* These functions live in libmoldname.a.
*/
#define access _access
#define chmod _chmod
#define chsize _chsize
#define close _close
#define creat _creat
#define dup _dup
#define dup2 _dup2
#define eof _eof
#define filelength _filelength
#define fileno(f) ((f)->_file)
#define isatty _isatty
#define lseek _lseek
#define open _open
#define read _read
#define sopen(path,access,shflag,mode) _open((path), (access)|(shflag), (mode))
#define tell(file) _lseek(_file, 0, SEEK_CUR)
#define umask _umask
#define unlink _unlink
#define write _write
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* _IO_H_ not defined */
#endif /* Not strict ANSI */

View file

@ -1,87 +0,0 @@
/*
* locale.h
*
* Functions and types for localization (ie. changing the appearance of
* output based on the standards of a certain country).
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef _LOCALE_H_
#define _LOCALE_H_
/*
* NOTE: I have tried to test this, but I am limited by my knowledge of
* locale issues. The structure does not bomb if you look at the
* values, and 'decimal_point' even seems to be correct. But the
* rest of the values are, by default, not particularly useful
* (read meaningless and not related to the international settings
* of the system).
*/
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MIN LC_ALL
#define LC_MAX LC_TIME
/*
* The structure returned by 'localeconv'.
*/
struct lconv
{
char* decimal_point;
char* thousands_sep;
char* grouping;
char* int_curr_symbol;
char* currency_symbol;
char* mon_decimal_point;
char* mon_thousands_sep;
char* mon_grouping;
char* positive_sign;
char* negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#ifdef __cplusplus
extern "C" {
#endif
char* setlocale(int, const char*);
struct lconv* localeconv(void);
#ifdef __cplusplus
}
#endif
#endif /* Not _LOCALE_H_ */

View file

@ -1,53 +0,0 @@
/*
* malloc.h
*
* Support for programs which want to use malloc.h to get memory management
* functions. Unless you absolutely need some of these functions and they are
* not in the ANSI headers you should use the ANSI standard header files
* instead.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _MALLOC_H_
#define _MALLOC_H_
#include <msvcrt/alloc.h>
#ifdef __cplusplus
extern "C" {
#endif
int _heapchk(void); /* Verify heap integrety. */
int _heapmin(void); /* Return unused heap to the OS. */
int _heapset(unsigned int);
size_t _msize(void*);
void* _expand(void*, size_t);
#ifdef __cplusplus
}
#endif
#endif /* Not _MALLOC_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,183 +0,0 @@
/*
* math.h
*
* Mathematical functions.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.6 $
* $Author$
* $Date$
*
*/
/* added modfl */
#ifndef _MATH_H_
#define _MATH_H_
#include <msvcrt/crttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* HUGE_VAL is returned by strtod when the value would overflow the
* representation of 'double'. There are other uses as well.
*
* __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.
*/
#ifdef _MSVCRT_LIB_
extern double* __imp__HUGE;
#define HUGE_VAL (*__imp__HUGE)
#else
/* CRTDLL */
extern double* _HUGE_dll;
#define HUGE_VAL (*_HUGE_dll)
#endif
struct _exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
/*
* Types for the above _exception structure.
*/
#define _DOMAIN 1 /* domain error in argument */
#define _SING 2 /* singularity */
#define _OVERFLOW 3 /* range overflow */
#define _UNDERFLOW 4 /* range underflow */
#define _TLOSS 5 /* total loss of precision */
#define _PLOSS 6 /* partial loss of precision */
/*
* Exception types with non-ANSI names for compatibility.
*/
#ifndef __STRICT_ANSI__
#ifndef _NO_OLDNAMES
#define DOMAIN _DOMAIN
#define SING _SING
#define OVERFLOW _OVERFLOW
#define UNDERFLOW _UNDERFLOW
#define TLOSS _TLOSS
#define PLOSS _PLOSS
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
double sin (double x);
double cos (double x);
double tan (double x);
double sinh (double x);
double cosh (double x);
double tanh (double x);
double asin (double x);
double acos (double x);
double atan (double x);
double atan2 (double y, double x);
double exp (double x);
double log (double x);
double log10 (double x);
double pow (double x, double y);
long double powl (long double x,long double y);
double sqrt (double x);
double ceil (double x);
double floor (double x);
double fabs (double x);
double ldexp (double x, int n);
double frexp (double x, int* exp);
double modf (double x, double* ip);
long double modfl (long double x,long double* ip);
double fmod (double x, double y);
#ifndef __STRICT_ANSI__
/* Complex number (for cabs) */
struct _complex
{
double x; /* Real part */
double y; /* Imaginary part */
};
double _cabs (struct _complex x);
double _hypot (double x, double y);
double _j0 (double x);
double _j1 (double x);
double _jn (int n, double x);
double _y0 (double x);
double _y1 (double x);
double _yn (int n, double x);
#endif /* Not __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#ifdef __MSVCRT__
double linkme_sin(double x);
double linkme_cos(double x);
double linkme_tan(double x);
double linkme_sinh(double x);
double linkme_cosh(double x);
double linkme_tanh(double x);
double linkme_asin(double x);
double linkme_acos(double x);
double linkme_atan(double x);
double linkme_atan2(double y, double x);
double linkme_exp(double x);
double linkme_log(double x);
double linkme_log10(double x);
double linkme_pow(double x, double y);
long double linkme_powl(long double x,long double y);
double linkme_sqrt(double x);
double linkme_ceil(double x);
double linkme_floor(double x);
double linkme_fabs(double x);
double linkme_ldexp(double x, int n);
double linkme_frexp(double x, int* exp);
double linkme_modf(double x, double* ip);
long double linkme_modfl(long double x,long double* ip);
double linkme_fmod(double x, double y);
/*
* linkme_log2
* linkme_floor
* linkme_ldexp
* linkme_pow
*/
#endif
#endif /* Not _MATH_H_ */

View file

@ -1,78 +0,0 @@
/*
* mbctype.h
*
* Functions for testing multibyte character types and converting characters.
*
* This file is part of the Mingw32 package.
*
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _MBCTYPE_H_
#define _MBCTYPE_H_
/* return values for _mbsbtype and _mbbtype in mbstring.h */
#define _MBC_SINGLE 0
#define _MBC_LEAD 1
#define _MBC_TRAIL 2
#define _MBC_ILLEGAL (-1)
/* args for setmbcp (in lieu of actual codepage) */
#define _MB_CP_SBCS 0
#define _MB_CP_OEM (-2)
#define _MB_CP_ANSI (-3)
#define _MB_CP_LOCALE (-4)
/* TODO: bit masks */
/*
*#define _MS 0x01
*#define _MP 0x02
*#define _M1 0x04
*#define _M2 0x08
#define _SBUP
#define _SBLOW
*/
#define _KNJ_M ((char)0x01) /* Non-punctuation of Kana-set */
#define _KNJ_P ((char)0x02) /* Punctuation of Kana-set */
#define _KNJ_1 ((char)0x04) /* Legal 1st byte of double byte stream */
#define _KNJ_2 ((char)0x08) /* Legal 2nd btye of double byte stream */
#define ___ 0
#define _1_ _KNJ_1 /* Legal 1st byte of double byte code */
#define __2 _KNJ_2 /* Legal 2nd byte of double byte code */
#define _M_ _KNJ_M /* Non-puntuation in Kana-set */
#define _P_ _KNJ_P /* Punctuation of Kana-set */
#define _12 (_1_|__2)
#define _M2 (_M_|__2)
#define _P2 (_P_|__2)
#ifdef __cplusplus
extern "C" {
#endif
extern char _jctype[257];
int _ismbbkana(unsigned char);
int _ismbbkalnum(unsigned int);
#ifdef __cplusplus
}
#endif
#endif /* Not _MCTYPE_H_ */

View file

@ -1,114 +0,0 @@
/*
* mbstring.h
*
* Protototypes for string functions supporting multibyte characters.
*
* This file is part of the Mingw32 package.
*
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _MBSTRING_H_
#define _MBSTRING_H_
#include <msvcrt/stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* character routines */
int _ismbcalnum(unsigned int);
int _ismbcalpha(unsigned int);
int _ismbcdigit(unsigned int);
int _ismbcgraph(unsigned int);
int _ismbcprint(unsigned int);
int _ismbcpunct(unsigned int);
int _ismbcspace(unsigned int);
int _ismbclower(unsigned int);
int _ismbcupper(unsigned int);
int _ismbclegal(unsigned int);
int _ismbblead(unsigned int);
int _ismbbtrail(unsigned int);
int _ismbslead(const unsigned char*, const unsigned char*);
int _ismbstrail(const unsigned char*, const unsigned char*);
unsigned int _mbctolower(unsigned int);
unsigned int _mbctoupper(unsigned int);
void _mbccpy(unsigned char*, const unsigned char*);
size_t _mbclen(const unsigned char*);
unsigned int _mbbtombc(unsigned int);
unsigned int _mbctombb(unsigned int);
/* Return value constants for these are defined in mbctype.h. */
int _mbbtype(unsigned char, int);
int _mbsbtype(const unsigned char*, size_t);
unsigned char* _mbscpy(unsigned char*, const unsigned char*);
unsigned char* _mbsncpy(unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsnbcpy(unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsset(unsigned char*, unsigned int);
unsigned char* _mbsnset(unsigned char*, unsigned int, size_t);
unsigned char* _mbsnbset(unsigned char*, unsigned int, size_t);
unsigned char* _mbsdup(const unsigned char*);
unsigned char* _mbsrev(unsigned char*);
unsigned char* _mbscat(unsigned char*, const unsigned char*);
unsigned char* _mbsncat(unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsnbcat(unsigned char*, const unsigned char*, size_t);
size_t _mbslen(const unsigned char*);
size_t _mbsnbcnt(const unsigned char*, size_t);
size_t _mbsnccnt(const unsigned char*, size_t);
unsigned char* _mbschr(unsigned char*, unsigned char*);
unsigned char* _mbsrchr(const unsigned char*, unsigned int);
size_t _mbsspn(const unsigned char*, const unsigned char*);
size_t _mbscspn(const unsigned char*, const unsigned char*);
unsigned char* _mbsspnp(const unsigned char*, const unsigned char*);
unsigned char* _mbspbrk(const unsigned char*, const unsigned char*);
int _mbscmp(const unsigned char*, const unsigned char*);
int _mbsicmp(const unsigned char*, const unsigned char*);
int _mbsncmp(const unsigned char*, const unsigned char*, size_t);
int _mbsnicmp(const unsigned char*, const unsigned char*, size_t);
int _mbsnbcmp(const unsigned char*, const unsigned char*, size_t);
int _mbsnbicmp(const unsigned char*, const unsigned char*, size_t);
int _mbscoll(const unsigned char*, const unsigned char*);
int _mbsicoll(const unsigned char*, const unsigned char*);
int _mbsncoll(const unsigned char*, const unsigned char*, size_t);
int _mbsnicoll(const unsigned char*, const unsigned char*, size_t);
int _mbsnbcoll(const unsigned char*, const unsigned char*, size_t);
int _mbsnbicoll(const unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsinc(const unsigned char*);
unsigned char* _mbsninc(const unsigned char*, size_t);
unsigned char* _mbsdec(const unsigned char*, const unsigned char*);
unsigned int _mbsnextc (const unsigned char*);
unsigned char* _mbslwr(unsigned char*);
unsigned char* _mbsupr(unsigned char*);
unsigned char* _mbstok(unsigned char*, unsigned char*);
unsigned char* _mbsstr(const unsigned char*, const unsigned char*);
size_t _mbstrlen(const char*str);
#ifdef __cplusplus
}
#endif
#endif /* Not _MBSTRING_H_ */

View file

@ -1,64 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: include/msvcrt/msvcrtdbg.h
* PURPOSE: Useful debugging macros
* PROGRAMMER:
* UPDATE HISTORY:
*
*/
/*
* NOTE: Define NDEBUG before including this header to disable debugging
* macros
*/
#ifndef __MSVCRT_DEBUG
#define __MSVCRT_DEBUG
#include <roscfg.h>
#include <msvcrt/internal/file.h>
#if 0
#ifdef NDEBUG
#undef NDEBUG
#endif
#endif
#ifdef DBG
#define DPRINT1(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
#define CHECKPOINT1 do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
#else
#ifdef __GNUC__
#define DPRINT1(args...)
#else
#define DPRINT DbgPrint
#endif
#define CHECKPOINT1
#endif
#if !defined(NDEBUG) && defined(DBG)
#define DPRINT(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
#define CHECKPOINT do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
#else
#ifdef __GNUC__
#define DPRINT(args...)
#else
#define DPRINT DbgPrint
#endif
#define CHECKPOINT
#endif /* NDEBUG */
/* ULONG CDECL DbgPrint(PCH Format, ...); */
ULONG DbgPrint(PCH Format,...);
/* unsigned long DbgPrint(const char* Format, ...); */
/* #define TRACE 0 ? (void)0 : Trace */
/* void Trace(TCHAR* lpszFormat, ...); */
#endif /* __MSVCRT_DEBUG */

View file

@ -1,160 +0,0 @@
/*
* process.h
*
* Function calls for spawning child processes.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* changed second argument of cwait from nPID to hProc */
#ifndef __STRICT_ANSI__
#ifndef _PROCESS_H_
#define _PROCESS_H_
/*
* Constants for cwait actions.
* Obsolete for Win32.
*/
#define _WAIT_CHILD 0
#define _WAIT_GRANDCHILD 1
#ifndef _NO_OLDNAMES
#define WAIT_CHILD _WAIT_CHILD
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
#endif /* Not _NO_OLDNAMES */
/*
* Mode constants for spawn functions.
*/
#define _P_WAIT 0
#define _P_NOWAIT 1
#define _P_OVERLAY 2
#define _OLD_P_OVERLAY _P_OVERLAY
#define _P_NOWAITO 3
#define _P_DETACH 4
#ifndef _NO_OLDNAMES
#define P_WAIT _P_WAIT
#define P_NOWAIT _P_NOWAIT
#define P_OVERLAY _P_OVERLAY
#define OLD_P_OVERLAY _OLD_P_OVERLAY
#define P_NOWAITO _P_NOWAITO
#define P_DETACH _P_DETACH
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
extern "C" {
#endif
void _cexit(void);
void _c_exit(void);
int _cwait (int* pnStatus, int hProc, int nAction);
int _getpid(void);
int _execl (const char* szPath, const char* szArgv0, ...);
int _execle (const char* szPath, const char* szArgv0, ...);
int _execlp (const char* szPath, const char* szArgv0, ...);
int _execlpe (const char* szPath, const char* szArgv0, ...);
int _execv (const char* szPath, char* const* szaArgv);
int _execve (const char* szPath, char* const* szaArgv, char* const* szaEnv);
int _execvp (const char* szPath, char* const* szaArgv);
int _execvpe (const char* szPath, char* const* szaArgv, char* const* szaEnv);
int _spawnl (int nMode, const char* szPath, const char* szArgv0, ...);
int _spawnle (int nMode, const char* szPath, const char* szArgv0,...);
int _spawnlp (int nMode, const char* szPath, const char* szArgv0,...);
int _spawnlpe (int nMode, const char* szPath, const char* szArgv0,...);
int _spawnv (int nMode, const char* szPath, char* const* szaArgv);
int _spawnve (int nMode, const char* szPath, char* const* szaArgv, char* const* szaEnv);
int _spawnvp (int nMode, const char* szPath, char* const* szaArgv);
int _spawnvpe (int nMode, const char* szPath, char* const* szaArgv, char* const* szaEnv);
/*
* 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
* after the thread calls _endthread or returns from the thread function.
*
* NOTE: No old names for these functions. Use the underscore.
*/
unsigned long
_beginthread(void (__cdecl *pfuncStart)(void*),
unsigned unStackSize, void* pArgList);
void _endthread (void);
#ifdef __MSVCRT__
unsigned long
_beginthreadex(void* pSecurity, unsigned unStackSize,
unsigned (__stdcall *pfuncStart)(void*), void* pArgList,
unsigned unInitFlags, unsigned* pThreadAddr);
void _endthreadex(unsigned unExitCode);
#endif
void* _loaddll(char* name);
int _unloaddll(void* handle);
unsigned long __threadid(void);
#define _threadid __threadid()
void* __threadhandle(void);
#ifndef _NO_OLDNAMES
#define cwait _cwait
#define getpid _getpid
#define execl _execl
#define execle _execle
#define execlp _execlp
#define execlpe _execlpe
#define execv _execv
#define execve _execve
#define execvp _execvp
#define execvpe _execvpe
#define spawnl _spawnl
#define spawnle _spawnle
#define spawnlp _spawnlp
#define spawnlpe _spawnlpe
#define spawnv _spawnv
#define spawnve _spawnve
#define spawnvp _spawnvp
#define spawnvpe _spawnvpe
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* _PROCESS_H_ not defined */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,39 +0,0 @@
#ifndef _SEARCH_H_
#define _SEARCH_H_
/*
*char *key
*void *data
*enum { FIND, ENTER } ACTION;
*enum { preorder, postorder, endorder, leaf } VISIT;
*/
#include <msvcrt/stddef.h>
#include <msvcrt/sys/types.h>
/* The Single UNIX ® Specification, Version 2 Copyright © 1997 The Open Group */
/*
*int hcreate(size_t);
*void hdestroy(void);
*ENTRY *hsearch(ENTRY, ACTION);
*void insque(void *, void *);
*/
void *_lfind(const void *, const void *, size_t *,
size_t, int (*)(const void *, const void *));
void *_lsearch(const void *, void *, size_t *,
size_t, int (*)(const void *, const void *));
/*
*void remque(void *);
*void *tdelete(const void *, void **,
* int(*)(const void *, const void *));
*void *tfind(const void *, void *const *,
* int(*)(const void *, const void *));
*void *tsearch(const void *, void **,
* int(*)(const void *, const void *));
*void twalk(const void *,
* void (*)(const void *, VISIT, int ));
*/
#endif

View file

@ -1,44 +0,0 @@
/*
* share.h
*
* Constants for file sharing functions.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef _SHARE_H_
#define _SHARE_H_
#define SH_COMPAT 0x0000
#define SH_DENYRW 0x0010
#define SH_DENYWR 0x0020
#define SH_DENYRD 0x0030
#define SH_DENYNO 0x0040
#define _SH_COMPAT SH_COMPAT
#define _SH_DENYRW SH_DENYRW
#define _SH_DENYWR SH_DENYWR
#define _SH_DENYRD SH_DENYRD
#define _SH_DENYNO SH_DENYNO
#endif /* Not _SHARE_H_ */

View file

@ -1,113 +0,0 @@
/*
* signal.h
*
* A way to set handlers for exceptional conditions (also known as signals).
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
/* added some extra signal constants */
#ifndef _SIGNAL_H_
#define _SIGNAL_H_
/*
* The actual signal values. Using other values with signal
* produces a SIG_ERR return value.
*
* NOTE: SIGINT is produced when the user presses Ctrl-C.
* SIGILL has not been tested.
* SIGFPE doesn't seem to work?
* SIGSEGV does not catch writing to a NULL pointer (that shuts down
* your app; can you say "segmentation violation core dump"?).
* SIGTERM comes from what kind of termination request exactly?
* SIGBREAK is indeed produced by pressing Ctrl-Break.
* SIGABRT is produced by calling abort.
* TODO: The above results may be related to not installing an appropriate
* structured exception handling frame. Results may be better if I ever
* manage to get the SEH stuff down.
*/
#define SIGINT 2 /* Interactive attention */
#define SIGILL 4 /* Illegal instruction */
#define SIGFPE 8 /* Floating point error */
#define SIGSEGV 11 /* Segmentation violation */
#define SIGTERM 15 /* Termination request */
#define SIGBREAK 21 /* Control-break */
#define SIGABRT 22 /* Abnormal termination (abort) */
#define SIGALRM 293
#define SIGHUP 294
/* SIGINT is ansi */
#define SIGKILL 296
#define SIGPIPE 297
#define SIGQUIT 298
#define SIGUSR1 299
#define SIGUSR2 300
#define SIGNOFP 301
#define SIGTRAP 302
#define SIGTIMR 303 /* Internal for setitimer (SIGALRM, SIGPROF) */
#define SIGPROF 304
#define SIGMAX 320
/*
* The prototypes (below) are the easy part. The hard part is figuring
* out what signals are available and what numbers they are assigned
* along with appropriate values of SIG_DFL and SIG_IGN.
*/
/*
* A pointer to a signal handler function. A signal handler takes a
* single int, which is the signal it handles.
*/
typedef void (*_p_sig_fn_t)(int);
/*
* These are special values of signal handler pointers which are
* used to send a signal to the default handler (SIG_DFL), ignore
* the signal (SIG_IGN), or indicate an error return (SIG_ERR).
*/
#define SIG_DFL ((_p_sig_fn_t) 0)
#define SIG_IGN ((_p_sig_fn_t) 1)
#define SIG_ERR ((_p_sig_fn_t) -1)
#ifdef __cplusplus
extern "C" {
#endif
/*
* Call signal to set the signal handler for signal sig to the
* function pointed to by handler. Returns a pointer to the
* previous handler, or SIG_ERR if an error occurs. Initially
* unhandled signals defined above will return SIG_DFL.
*/
_p_sig_fn_t signal(int sig, _p_sig_fn_t func);
/*
* Raise the signal indicated by sig. Returns non-zero on success.
*/
int raise(int);
#ifdef __cplusplus
}
#endif
#endif /* Not _SIGNAL_H_ */

View file

@ -1,115 +0,0 @@
/*
* stdarg.h
*
* Provides facilities for stepping through a list of function arguments of
* an unknown number and type.
*
* NOTE: Gcc should provide stdarg.h, and I believe their version will work
* with crtdll. If necessary I think you can replace this with the GCC
* stdarg.h (or is it vararg.h).
*
* Note that the type used in va_arg is supposed to match the actual type
* *after default promotions*. Thus, va_arg (..., short) is not valid.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
#ifndef _STDARG_H_
#define _STDARG_H_
/*
* Don't do any of this stuff for the resource compiler.
*/
#ifndef RC_INVOKED
/*
* I was told that Win NT likes this.
*/
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif
#ifndef _VA_LIST
#define _VA_LIST
typedef char* va_list;
#endif
/*
* Amount of space required in an argument list (ie. the stack) for an
* argument of type t.
*/
#define __va_argsiz(t) \
(((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
/*
* Start variable argument list processing by setting AP to point to the
* argument after pN.
*/
#ifdef __GNUC__
/*
* In GNU the stack is not necessarily arranged very neatly in order to
* pack shorts and such into a smaller argument list. Fortunately a
* neatly arranged version is available through the use of __builtin_next_arg.
*/
#ifndef va_start
#define va_start(ap, pN) \
((ap) = ((va_list) __builtin_next_arg(pN)))
#endif
#else
/*
* For a simple minded compiler this should work (it works in GNU too for
* vararg lists that don't follow shorts and such).
*/
#ifndef va_start
#define va_start(ap, pN) \
((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
#endif
#endif
/*
* End processing of variable argument list. In this case we do nothing.
*/
#ifndef va_end
#define va_end(ap) ((void)0)
#endif
/*
* Increment ap to the next argument in the list while returing a
* pointer to what ap pointed to first, which is of type t.
*
* We cast to void* and then to t* because this avoids a warning about
* increasing the alignment requirement.
*/
#ifndef va_arg
#define va_arg(ap, t) \
(((ap) = (ap) + __va_argsiz(t)), \
*((t*) (void*) ((ap) - __va_argsiz(t))))
#endif
#endif /* Not RC_INVOKED */
#endif /* not _STDARG_H_ */

View file

@ -1,178 +0,0 @@
/*
* stddef.h
*
* Standard type definitions provided by the C library.
*
* NOTE: Actually supplied by the compiler (correct?). As such, GCC
* supplies a version of this header file. Unfortunately, GCC's
* version is all tied up with the way other headers for the
* GNU C library are implemented (or vice-versa), in a similar
* way to how the other Mingw32 headers are dependent on
* certain internals of this file. It is not clear to me whether
* you can safely use the GCC version in place of this version.
* TODO: Line up usage in other header files to work with GCC
* stddef.h.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.7 $
* $Author$
* $Date$
*
*/
#ifndef __MSVCRT_STDDEF_H_
/*
* Any one of these symbols __need_* means that a standard header file
* wants us just to define one data type. So don't define
* the symbols that indicate this file's entire job has been done.
*/
#if (!defined(__need_wchar_t) && !defined(__need_wint_t) \
&& !defined(__need_size_t) && !defined(__need_ptrdiff_t) \
&& !defined(__need_NULL))
#define __MSVCRT_STDDEF_H_
#endif
/*
* NOTE: The following typedefs are done using __xxx_TYPE__ defines followed
* by typedefs using those defines. I have chosen to do it this way because
* GCC supplies definitions for __xxx_TYPE__ macros and if, for example, your
* size_t is typedef'ed differently from what GCC expects it will give you
* warnings when you prototype functions like memcmp and memcpy. The values
* for __xxx_TYPE__ in this header file are the same as those given by GCC.
* Those values appear to work with the MSVCRT functions.
*/
/*
* Signed type of difference of two pointers.
*/
/* Define this type if we are doing the whole job, or if we want this type
* in particular. */
#if defined (__MSVCRT_STDDEF_H_) || defined (__need_ptrdiff_t)
#ifndef _PTRDIFF_T_
#define _PTRDIFF_T_
#ifndef __PTRDIFF_TYPE__
#define __PTRDIFF_TYPE__ int
#endif
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
/* If this symbol has done its job, get rid of it. */
#undef __need_ptrdiff_t
#endif /* __MSVCRT_STDDEF_H_ or __need_ptrdiff_t. */
/*
* Unsigned type of `sizeof' something.
*/
/* Define this type if we are doing the whole job,
* or if we want this type in particular. */
#if defined (__MSVCRT_STDDEF_H_) || defined (__need_size_t)
#ifndef _SIZE_T_
#define _SIZE_T_
#define SIZE_T_DEFINED
#define _SIZE_T
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ unsigned int
#endif
typedef __SIZE_TYPE__ size_t;
#endif
#undef __need_size_t
#endif /* __MSVCRT_STDDEF_H_ or __need_size_t. */
/* Wide character type.
Locale-writers should change this as necessary to
be big enough to hold unique values not between 0 and 127,
and not (wchar_t) -1, for each defined multibyte character. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (__MSVCRT_STDDEF_H_) || defined (__need_wchar_t)
#ifndef _WCHAR_T_
#define _WCHAR_T_
#define _WCHAR_T
#define _WCHAR_T_DEFINED
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ short unsigned int
#endif
#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t;
#endif /* C++ */
#endif /* wchar_t not already defined */
#undef __need_wchar_t
#endif /* __MSVCRT_STDDEF_H_ or __need_wchar_t. */
/*
* wint_t, the equivalent of int in wchar ctype functions.
*/
#if defined (__MSVCRT_STDDEF_H_) || defined (__need_wint_t)
#if ! defined(_WINT_T_) && ! defined(_WINT_T)
#define _WINT_T_
#define _WINT_T /* To satisfy libstdc++ */
#ifndef __WINT_TYPE__
#define __WINT_TYPE__ short int
#endif /* Not defined __WINT_TYPE__ */
typedef __WINT_TYPE__ wint_t;
#endif /* Not defined _WINT_T_ */
#undef __need_wint_t
#endif /* __MSVCRT_STDDEF_H_ or __need_wint_t. */
/*
* A null pointer constant.
*/
#if defined (__MSVCRT_STDDEF_H_) || defined (__need_NULL)
#undef NULL
#ifdef __cplusplus
#define NULL (0)
#else
#define NULL ((void *)0)
#endif
#endif /* __MSVCRT_STDDEF_H_ or __need_NULL */
#undef __need_NULL
/*
* Offsetof, a macro for finding the offset of a member in a structure.
* Works by returning the 'address' of the MEMBER of a TYPE struct at address
* zero.
*/
#if defined (__MSVCRT_STDDEF_H_)
#define offsetof(TYPE, MEMBER) ((size_t) &( ((TYPE *) 0)->MEMBER ))
#endif /* __MSVCRT_STDDEF_H_ */
#endif /* not __MSVCRT_STDDEF_H_ */

View file

@ -1,375 +0,0 @@
/*
* stdio.h
*
* Definitions of types and prototypes of functions for standard input and
* output.
*
* NOTE: The file manipulation functions provided by Microsoft seem to
* work with either slash (/) or backslash (\) as the path separator.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.8 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* implemented clearerr feof ferror perror as macros */
/* added _IOCOMMIT */
/* added filbuf and flsbuf and fwalk */
#ifndef _STDIO_H_
#define _STDIO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
#include <msvcrt/stddef.h>
#define _IOREAD 0x0001
#define _IOWRT 0x0002
#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 _IOCOMMIT 0x100000
#define _IODIRTY 0x010000
#define _IOAHEAD 0x020000
/*
* I used to include stdarg.h at this point, in order to allow for the
* functions later on in the file which use va_list. That conflicts with
* using stdio.h and varargs.h in the same file, so I do the typedef myself.
*/
/*
*#ifndef _VA_LIST
*#define _VA_LIST
*typedef char* va_list;
*#endif
*/
#include <msvcrt/stdarg.h>
/*
* FILE should be used as a pointer to an opaque data type. Do not rely on
* anything else, especially the size or contents of this structure!
*/
#ifndef _FILE_DEFINED
typedef struct {
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _ungotchar;
int _bufsiz;
char* _name_to_remove;
} FILE;
#define _FILE_DEFINED
#endif
//#define _fillsize _bufsiz
/*
* The three standard file pointers provided by the run time library.
* NOTE: These will go to the bit-bucket silently in GUI applications!
*/
extern FILE _iob[]; /* an array of FILE */
#define stdin (&_iob[0])
#define stdout (&_iob[1])
#define stderr (&_iob[2])
#define stdaux (&_iob[3])
#define stdprn (&_iob[4])
/* Returned by various functions on end of file condition or error. */
#define EOF (-1)
/*
* The maximum length of a file name. You should use GetVolumeInformation
* instead of this constant. But hey, this works.
*
* NOTE: This is used in the structure _finddata_t (see dir.h) so changing it
* is probably not a good idea.
*/
#define FILENAME_MAX (260)
/*
* The maximum number of files that may be open at once. I have set this to
* a conservative number. The actual value may be higher.
*/
#define FOPEN_MAX (20)
/*
* File Operations
*/
FILE* fopen(const char* szFileName, const char* szMode);
FILE* freopen(const char* szNewFileName, const char* szNewMode, FILE* fileChangeAssociation);
int fflush(FILE* fileFlush);
int fclose(FILE* fileClose);
#define fcloseall _fcloseall
int remove(const char* szFileName);
int rename(const char* szOldFileName, const char* szNewFileName);
FILE* tmpfile(void);
FILE* _fdopen(int handle, char *mode);
FILE* _wfdopen(int handle, wchar_t *mode);
FILE* _wfopen(const wchar_t *file, const wchar_t *mode);
FILE* _wfreopen(const wchar_t *file, const wchar_t *mode, FILE *f);
FILE* _fsopen(const char *file, const char *mode, int shflag);
FILE* _wfsopen(const wchar_t *file, const wchar_t *mode, int shflag);
int _wremove(const wchar_t* szFileName);
int _wrename(const wchar_t *oldName, const wchar_t *newName);
int _filbuf(FILE* f);
int _flsbuf(int c, FILE* f);
void _fwalk(void (*func)(FILE*)); // not exported
int _fcloseall(void);
/*
* The maximum size of name (including NUL) that will be put in the user
* supplied buffer caName.
* NOTE: This has not been determined by experiment, but based on the
* maximum file name length above it is probably reasonable. I could be
* wrong...
*/
#define L_tmpnam (260)
char* tmpnam(char caName[]);
char* _tempnam(const char *szDir, const char *szPfx);
wchar_t* _wtmpnam(wchar_t *s);
wchar_t *_wtempnam(const wchar_t *dir,const wchar_t *prefix);
#ifndef _NO_OLDNAMES
#define tempnam _tempnam
#endif /* Not _NO_OLDNAMES */
/*
* The three possible buffering mode (nMode) values for setvbuf.
* NOTE: _IOFBF works, but _IOLBF seems to work like unbuffered...
* maybe I'm testing it wrong?
*/
#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 */
int setvbuf(FILE* fileSetBuffer, char* caBuffer, int nMode, size_t sizeBuffer);
/*
* The buffer size as used by setbuf such that it is equivalent to
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
*/
#define BUFSIZ 512
void setbuf(FILE* fileSetBuffer, char* caBuffer);
/*
* Pipe Operations
*/
int _pclose(FILE* pipeClose);
FILE* _popen(const char* szPipeName, const char* szMode);
FILE* _wpopen(const wchar_t *cm, const wchar_t *md);
#define popen _popen
#define pclose _pclose
/* Wide character version */
FILE* _wpopen(const wchar_t* szPipeName, const wchar_t* szMode);
/*
* Formatted Output
*/
int fprintf(FILE* filePrintTo, const char* szFormat, ...);
int printf(const char* szFormat, ...);
int sprintf(char* caBuffer, const char* szFormat, ...);
int _snprintf(char*, size_t, const char*, ...);
int vfprintf(FILE* filePrintTo, const char* szFormat, va_list varg);
int vprintf(const char* szFormat, va_list varg);
int vsprintf(char* caBuffer, const char* szFormat, va_list varg);
int _vsnprintf(char* caBuffer, size_t cnt, const char* szFormat, va_list varg);
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
/* Wide character versions */
int fwprintf(FILE* filePrintTo, const wchar_t* wsFormat, ...);
int wprintf(const wchar_t* wsFormat, ...);
int swprintf(wchar_t* wcaBuffer, const wchar_t* wsFormat, ...);
int vfwprintf(FILE* filePrintTo, const wchar_t* wsFormat, va_list varg);
int vwprintf(const wchar_t* wsFormat, va_list varg);
int vswprintf(wchar_t* wcaBuffer, const wchar_t* wsFormat, va_list varg);
/*
* Formatted Input
*/
int fscanf(FILE* fileReadFrom, const char* szFormat, ...);
int scanf(const char* szFormat, ...);
int sscanf(const char* szReadFrom, const char* szFormat, ...);
/* Wide character versions */
int fwscanf(FILE* fileReadFrom, const wchar_t* wsFormat, ...);
int wscanf(const wchar_t* wsFormat, ...);
int swscanf(const wchar_t* wsReadFrom, const wchar_t* wsFormat, ...);
/*
* Character Input and Output Functions
*/
int fgetc(FILE* fileRead);
char* fgets(char* caBuffer, int nBufferSize, FILE* fileRead);
int fputc(int c, FILE* fileWrite);
int fputs(const char* szOutput, FILE* fileWrite);
int getc(FILE* fileRead);
int getchar(void);
char* gets(char* caBuffer); /* Unsafe: how does gets know how long the buffer is? */
int putc(int c, FILE* fileWrite);
int putchar(int c);
int puts(const char* szOutput);
int ungetc(int c, FILE* fileWasRead);
/* Wide character versions */
wint_t fgetwc(FILE* fileRead);
wint_t fputwc(wchar_t wc, FILE* fileWrite);
wint_t getwc(FILE *fileRead); // not exported from crtdll
/* TODO: check type wint_t, why doesn't compare to WEOF correctly ??? */
/* wint_t putwc(wint_t wc, FILE* fileWrite); */
int putwc(wint_t wc, FILE* fileWrite);
wint_t putwchar(wint_t c);
int _putws(const wchar_t* ws);
wint_t ungetwc(wchar_t wc, FILE* fileWasRead);
wint_t _filwbuf(FILE *f);
wint_t _flswbuf(wchar_t c, FILE *f);
/*
* Not exported by CRTDLL.DLL included for reference purposes.
*/
#if 0
wchar_t* fgetws(wchar_t* wcaBuffer, int nBufferSize, FILE* fileRead);
int fputws(const wchar_t* wsOutput, FILE* fileWrite);
int getwc(FILE* fileRead);
int getwchar();
wchar_t* getws(wchar_t* wcaBuffer);
#endif /* 0 */
/* NOTE: putchar has no wide char equivalent even in tchar.h */
/*
* Direct Input and Output Functions
*/
size_t fread(void* pBuffer, size_t sizeObject, size_t sizeObjCount, FILE* fileRead);
size_t fwrite(const void* pObjArray, size_t sizeObject, size_t sizeObjCount, FILE* fileWrite);
/*
* File Positioning Functions
*/
/* Constants for nOrigin indicating the position relative to which fseek
* sets the file position. Enclosed in ifdefs because io.h could also
* define them. (Though not anymore since io.h includes this file now.) */
#ifndef SEEK_SET
#define SEEK_SET (0)
#endif
#ifndef SEEK_CUR
#define SEEK_CUR (1)
#endif
#ifndef SEEK_END
#define SEEK_END (2)
#endif
int fseek(FILE* fileSetPosition, long lnOffset, int nOrigin);
long ftell(FILE* fileGetPosition);
void rewind(FILE* fileRewind);
/*
* An opaque data type used for storing file positions... The contents of
* 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
* MSVCRT however, and for now `long long' will do.
*/
typedef long long fpos_t;
int fgetpos(FILE* fileGetPosition, fpos_t* pfpos);
int fsetpos(FILE* fileSetPosition, const fpos_t* pfpos);
/*
* Error Functions
*/
#if 0
void clearerr(FILE* fileClearErrors);
int feof(FILE* fileIsAtEnd);
int ferror(FILE* fileIsError);
void perror(const char* szErrorMessage);
#endif
void _wperror(const wchar_t *s);
#define clearerr(f) (((f)->_flag) &= ~(_IOERR|_IOEOF))
#define feof(f) (((f)->_flag&_IOEOF)!=0)
/* #define ferror(f) (((f)->_flag&_IOERR)!=0) */
int ferror(FILE* fileIsError);
#define perror(s) (fprintf(stderr, "%s: %s\n", (s), _strerror(NULL)))
/*
* Non ANSI functions
*/
#ifndef __STRICT_ANSI__
int _fgetchar(void);
int _fputchar(int c);
FILE* _fdopen(int nHandle, char* szMode);
#ifndef _NO_OLDNAMES
#define fgetchar _fgetchar
#define fputchar _fputchar
#define fdopen _fdopen
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#endif /* _STDIO_H_ */

View file

@ -1,248 +0,0 @@
/*
* stdlib.h
*
* Definitions for common types, variables, and functions.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.7 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* added splitpath */
/* changed definition of environ and argc */
/* moved prototype for swab from string.h to stdlib.h */
#ifndef _STDLIB_H_
#define _STDLIB_H_
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#include <msvcrt/stddef.h>
/*
* RAND_MAX is the maximum value that may be returned by rand.
* The minimum is zero.
*/
#define RAND_MAX 0x7FFF
#ifndef _MAX_PATH
#define _MAX_DRIVE 3
#define _MAX_FNAME 256
#define _MAX_DIR _MAX_FNAME
#define _MAX_EXT _MAX_FNAME
#define _MAX_PATH 260
#endif
/*
* These values may be used as exit status codes.
*/
#define EXIT_SUCCESS 0
#define EXIT_FAILURE -1
#ifdef __cplusplus
extern "C" {
#endif
/*
* This seems like a convenient place to declare these variables, which
* give programs using WinMain (or main for that matter) access to main-ish
* argc and argv. environ is a pointer to a table of environment variables.
* NOTE: Strings in _argv and environ are ANSI strings.
*/
extern int* __argc_dll;
extern char*** __argv_dll;
extern char*** _environ_dll;
#define __argc (*__argc_dll)
#define __argv (*__argv_dll)
#define _environ (*_environ_dll)
#include <msvcrt/mbstring.h>
#ifndef __ATTRIB_NORETURN
#ifdef __GNUC__
#define _ATTRIB_NORETURN __attribute__ ((noreturn))
#ifndef __int64
#define __int64 long long
#endif /* Not __int64 */
#else /* Not __GNUC__ */
#define _ATTRIB_NORETURN
#endif /* __GNUC__ */
#endif
double atof(const char* szNumber);
int atoi(const char* szNumber);
long atol(const char* szNumber);
double strtod(const char* szNumber, char** pszAfterNumber);
double wcstod(const wchar_t* wsNumber, wchar_t** pwsAfterNumber);
long strtol(const char* szNumber, char** pszAfterNumber, int nBase);
long wcstol(const wchar_t* wsNumber, wchar_t** pwsAfterNumber, int nBase);
unsigned long strtoul(const char* szNumber, char** pszAfterNumber, int nBase);
unsigned long wcstoul(const wchar_t* wsNumber, wchar_t** pwsAfterNumber, int nBase);
size_t wcstombs(char* mbsDest, const wchar_t* wsConvert, size_t size);
int wctomb(char* mbDest, wchar_t wc);
int mblen(const char* mbs, size_t sizeString);
size_t mbstowcs(wchar_t* wcaDest, const char* mbsConvert, size_t size);
int mbtowc(wchar_t* wcDest, const char* mbConvert, size_t size);
int rand(void);
void srand(unsigned int nSeed);
void* calloc(size_t sizeObjCnt, size_t sizeObject);
void* malloc(size_t sizeObject);
void* realloc(void* pObject, size_t sizeNew);
void free(void* pObject);
void abort(void) _ATTRIB_NORETURN;
void exit(int nStatus) _ATTRIB_NORETURN;
int atexit(void (*pfuncExitProcessing)(void));
int system(const char* szCommand); // impl in process
char* getenv(const char* szVarName); // impl in stdio ???
wchar_t* _wgetenv(const wchar_t* szVarName);
typedef int (*_pfunccmp_t)(const void*, const void*);
void* bsearch(const void* pKey, const void* pBase, size_t cntObjects, size_t sizeObject, _pfunccmp_t pfuncCmp);
void qsort(const void* pBase, size_t cntObjects, size_t sizeObject, _pfunccmp_t pfuncCmp);
int abs(int n);
long labs(long n);
/*
* div_t and ldiv_t are structures used to return the results of div and
* ldiv.
*
* NOTE: div and ldiv appear not to work correctly unless
* -fno-pcc-struct-return is specified. This is included in the
* mingw32 specs file.
*/
typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
#ifdef __GNUC__ // robd
typedef struct { long long quot, rem; } lldiv_t;
#else
typedef struct { double quot, rem; } lldiv_t;
#endif
div_t div(int nNumerator, int nDenominator);
ldiv_t ldiv(long lNumerator, long lDenominator);
#ifdef __GNUC__ // robd
lldiv_t lldiv(long long lNumerator, long long lDenominator);
#else
lldiv_t lldiv(double lNumerator, double lDenominator);
#endif
#ifndef __STRICT_ANSI__
/*
* NOTE: Officially the three following functions are obsolete. The Win32 API
* functions SetErrorMode, Beep and Sleep are their replacements.
*/
void _beep(unsigned int, unsigned int);
void _seterrormode(int nMode);
void _sleep(unsigned long ulTime);
void _exit(int nStatus) _ATTRIB_NORETURN;
int _putenv(const char *val);
void _searchenv(const char *file, const char *var, char *path);
void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);
void _wsplitpath(const wchar_t* path, wchar_t* drive, wchar_t* dir, wchar_t* fname, wchar_t* ext);
char* _itoa(int nValue, char* sz, int nRadix);
char* _ltoa(long lnValue, char* sz, int nRadix);
int _wputenv(const wchar_t *val);
void _wsearchenv(const wchar_t *file, const wchar_t *var, wchar_t *path);
void _makepath(char *path, const char *drive, const char *dir, const char *fname, const char *ext);
void _wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t *dir, const wchar_t *fname, const wchar_t *ext);
wchar_t* _wfullpath(wchar_t *absPath, const wchar_t *relPath, size_t maxLength);
char* _i64toa(__int64 value, char *string, int radix);
char* _ultoa(unsigned long value, char *string, int radix);
char* _ui64toa(unsigned __int64 value, char *string, int radix);
wchar_t* _itow(int nValue, wchar_t* sz, int nRadix);
wchar_t* _i64tow(__int64 value, wchar_t *string, int radix);
wchar_t* _ltow(long lnValue, wchar_t* sz, int nRadix);
wchar_t* _ultow(unsigned long value, wchar_t *string, int radix);
wchar_t* _ui64tow(unsigned __int64 value, wchar_t *string, int radix);
__int64 _atoi64(const char *szNumber);
int _wtoi(const wchar_t *str);
__int64 _wtoi64(const wchar_t *str);
long _wtol(const wchar_t *str);
char* _ecvt(double dValue, int nDig, int* pnDec, int* pnSign);
char* _fcvt(double dValue, int nDig, int* pnDec, int* pnSign);
char* _gcvt(double dValue, int nDec, char* caBuf);
char* _fullpath(char* caBuf, const char* szPath, size_t sizeMax);
void _swab(const char* caFrom, char* caTo, size_t sizeToCopy);
unsigned int _rotl(unsigned int value, int shift);
unsigned int _rotr(unsigned int value, int shift);
unsigned long _lrotl(unsigned long value, int shift);
unsigned long _lrotr(unsigned long value, int shift);
#ifndef _NO_OLDNAMES
#define beep _beep
#define seterrormode _seterrormode
#define sleep _sleep
#define putenv _putenv
#define searchenv _searchenv
#define splitpath _splitpath
#define itoa _itoa
#define ltoa _ltoa
#define ecvt _ecvt
#define fcvt _fcvt
#define gcvt _gcvt
#define swab _swab
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
/*
* Undefine the no return attribute used in some function definitions
*/
#undef _ATTRIB_NORETURN
#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define _tsplitpath _wsplitpath
#define _tmakepath _wmakepath
#else
#define _tsplitpath _splitpath
#define _tmakepath _makepath
#endif
#endif /* _DISABLE_TIDENTS */
#ifdef __cplusplus
}
#endif
#endif /* Not _STDLIB_H_ */

View file

@ -1,193 +0,0 @@
/*
* string.h
*
* Definitions for memory and string functions.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.7 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
/* changed prototype for _strerror */
/* moved prototype for swab from string.h to stdlib.h */
#ifndef _STRING_H_
#define _STRING_H_
/*
* Define size_t, wchar_t and NULL
*/
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#include <msvcrt/stddef.h>
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
char * ___strtok; /* removed extern specifier 02-06-98, BD */
/*
* Prototypes of the ANSI Standard C library string functions.
*/
void* memchr(const void* p, int cSearchFor, size_t sizeSearch);
int memcmp(const void* p1, const void* p2, size_t sizeSearch);
void* memcpy(void* pCopyTo, const void* pSource, size_t sizeSource);
void* memmove(void* pMoveTo, const void* pSource, size_t sizeSource);
void* memset(void* p, int cFill, size_t sizeRepeatCount);
char* strcat(char* szAddTo, const char* szAdd);
char* strchr(const char* szSearch, int cFor);
int strcmp(const char* sz1, const char* sz2);
int strcoll(const char* sz1, const char* sz2); /* Compare using locale */
char* strcpy(char* szCopyTo, const char* szSource);
size_t strcspn(const char* szGetPrefix, const char* szNotIncluding);
char* strerror(int nError); /* NOTE: NOT an old name wrapper. */
char * _strerror(const char *s);
size_t strlen(const char* sz);
size_t strnlen(const char* sz, size_t count); /* not exported */
char* strncat(char* szAddTo, const char* szAdd, size_t sizeMaxAdd);
int strncmp(const char* sz1, const char* sz2, size_t sizeMaxCompare);
char* strncpy(char* szCopyTo, const char* szSource, size_t sizeMaxCopy);
char* strpbrk(const char* szSearch, const char* szAnyOf);
char* strrchr(const char* szSearch, int cFor);
size_t strspn(const char* szGetPrefix, const char *szIncluding);
char* strstr(const char* szSearch, const char *szFor);
char* strtok(char* szTokenize, const char* szDelimiters);
size_t strxfrm(char* szTransformed, const char *szSource, size_t sizeTransform);
#ifndef __STRICT_ANSI__
/*
* Extra non-ANSI functions provided by the CRTDLL library
*/
void* _memccpy(void* pCopyTo, const void* pSource, int cTerminator, size_t sizeMaxCopy);
int _memicmp(const void* p1, const void* p2, size_t sizeSearch);
char* _strdup(const char *szDuplicate);
int _strcmpi(const char* sz1, const char* sz2);
int _stricmp(const char* sz1, const char* sz2);
int _stricoll(const char* sz1, const char* sz2);
char* _strlwr(char* szToConvert);
int _strnicmp(const char* sz1, const char* sz2, size_t sizeMaxCompare);
char* _strnset(char* szToFill, int cFill, size_t sizeMaxFill);
char* _strrev(char* szToReverse);
char* _strset(char* szToFill, int cFill);
char* _strupr(char* szToConvert);
#endif /* Not __STRICT_ANSI__ */
/*
* Unicode versions of the standard calls.
*/
wchar_t* wcscat(wchar_t* wsAddTo, const wchar_t* wsAdd);
wchar_t* wcschr(const wchar_t* wsSearch, wchar_t wcFor);
int wcscmp(const wchar_t* ws1, const wchar_t* ws2);
int wcscoll(const wchar_t* ws1, const wchar_t* ws2);
wchar_t* wcscpy(wchar_t* wsCopyTo, const wchar_t* wsSource);
size_t wcscspn(const wchar_t* wsGetPrefix, const wchar_t* wsNotIncluding);
/* Note: No wcserror in CRTDLL. */
size_t wcslen(const wchar_t* ws);
wchar_t* wcsncat(wchar_t* wsAddTo, const wchar_t* wsAdd, size_t sizeMaxAdd);
int wcsncmp(const wchar_t* ws1, const wchar_t* ws2, size_t sizeMaxCompare);
wchar_t* wcsncpy(wchar_t* wsCopyTo, const wchar_t* wsSource, size_t sizeMaxCopy);
wchar_t* wcspbrk(const wchar_t* wsSearch, const wchar_t* wsAnyOf);
wchar_t* wcsrchr(const wchar_t* wsSearch, wchar_t wcFor);
size_t wcsspn(const wchar_t* wsGetPrefix, const wchar_t* wsIncluding);
wchar_t* wcsstr(const wchar_t* wsSearch, const wchar_t* wsFor);
wchar_t* wcstok(wchar_t* wsTokenize, const wchar_t* wsDelimiters);
size_t wcsxfrm(wchar_t* wsTransformed, const wchar_t *wsSource, size_t sizeTransform);
#ifndef __STRICT_ANSI__
/*
* Unicode versions of non-ANSI functions provided by CRTDLL.
*/
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
#define _wcscmpi _wcsicmp
wchar_t* _wcsdup(const wchar_t* wsToDuplicate);
int _wcsicmp(const wchar_t* ws1, const wchar_t* ws2);
int _wcsicoll(const wchar_t* ws1, const wchar_t* ws2);
int _wcsncoll(const wchar_t *s1, const wchar_t *s2, size_t c);
int _wcsnicoll(const wchar_t *s1, const wchar_t *s2, size_t c);
wchar_t* _wcslwr(wchar_t* wsToConvert);
int _wcsnicmp(const wchar_t* ws1, const wchar_t* ws2, size_t sizeMaxCompare);
wchar_t* _wcsnset(wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
wchar_t* _wcsrev(wchar_t* wsToReverse);
wchar_t* _wcsset(wchar_t* wsToFill, wchar_t wcToFill);
wchar_t* _wcsupr(wchar_t* wsToConvert);
#endif /* Not __STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
#ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions. They live in liboldnames.a
* and provide a little extra portability. Also a few extra UNIX-isms like
* strcasecmp.
*/
void* memccpy(void* pCopyTo, const void* pSource, int cTerminator, size_t sizeMaxCopy);
int memicmp(const void* p1, const void* p2, size_t sizeSearch);
#define strdup(szDuplicate) _strdup(szDuplicate)
int strcmpi(const char* sz1, const char* sz2);
int stricmp(const char* sz1, const char* sz2);
int strcasecmp(const char* sz1, const char* sz2);
int stricoll(const char* sz1, const char* sz2);
char* strlwr(char* szToConvert);
int strnicmp(const char* sz1, const char* sz2, size_t sizeMaxCompare);
int strncasecmp(const char* sz1, const char* sz2, size_t sizeMaxCompare);
char* strnset(char* szToFill, int cFill, size_t sizeMaxFill);
char* strrev(char* szToReverse);
char* strset(char* szToFill, int cFill);
char* strupr(char* szToConvert);
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
int wcscmpi(const wchar_t* ws1, const wchar_t* ws2);
#if __MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION == 5
wchar_t* wcsdup(wchar_t* wsToDuplicate);
#else
wchar_t* wcsdup(const wchar_t* wsToDuplicate);
#endif
int wcsicmp(const wchar_t* ws1, const wchar_t* ws2);
int wcsicoll(const wchar_t* ws1, const wchar_t* ws2);
wchar_t* wcslwr(wchar_t* wsToConvert);
int wcsnicmp(const wchar_t* ws1, const wchar_t* ws2, size_t sizeMaxCompare);
wchar_t* wcsnset(wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
wchar_t* wcsrev(wchar_t* wsToReverse);
wchar_t* wcsset(wchar_t* wsToFill, wchar_t wcToFill);
wchar_t* wcsupr(wchar_t* wsToConvert);
#endif /* Not _NO_OLDNAMES */
#endif /* Not strict ANSI */
#ifdef __cplusplus
}
#endif
#endif /* Not _STRING_H_ */

View file

@ -1,8 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* This fcntl.h maps to the root fcntl.h
*/
#ifndef __STRICT_ANSI__
#include <msvcrt/fcntl.h>
#endif

View file

@ -1,9 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* This file.h maps to the root fcntl.h
* TODO?
*/
#ifndef __STRICT_ANSI__
#include <msvcrt/fcntl.h>
#endif

View file

@ -1,49 +0,0 @@
/*
* locking.h
*
* Constants for the mode parameter of the locking function.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _LOCKING_H_
#define _LOCKING_H_
#define _LK_UNLCK 0 /* Unlock */
#define _LK_LOCK 1 /* Lock */
#define _LK_NBLCK 2 /* Non-blocking lock */
#define _LK_RLCK 3 /* Lock for read only */
#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
#ifndef NO_OLDNAMES
#define LK_UNLCK _LK_UNLCK
#define LK_LOCK _LK_LOCK
#define LK_NBLCK _LK_NBLCK
#define LK_RLCK _LK_RLCK
#define LK_NBRLCK _LK_NBRLCK
#endif /* Not NO_OLDNAMES */
#endif /* Not _LOCKING_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,144 +0,0 @@
/*
* stat.h
*
* Symbolic constants for opening and creating files, also stat, fstat and
* chmod functions.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.7 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _STAT_H_
#define _STAT_H_
#include <msvcrt/sys/types.h>
#ifndef _WCHAR_T_
#define _WCHAR_T_
#define _WCHAR_T
#define _WCHAR_T_DEFINED
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ short unsigned int
#endif
#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t;
#endif /* C++ */
#endif /* wchar_t not already defined */
/*
* Constants for the stat st_mode member.
*/
#define S_IFIFO 0x1000 /* FIFO */
#define S_IFCHR 0x2000 /* Character */
#define S_IFBLK 0x3000 /* Block */
#define S_IFDIR 0x4000 /* Directory */
#define S_IFREG 0x8000 /* Regular */
#define S_IFMT 0xF000 /* File type mask */
#define S_IEXEC 0x0040
#define S_IWRITE 0x0080
#define S_IREAD 0x0100
#define S_ISDIR(m) ((m) & S_IFDIR)
#define S_ISFIFO(m) ((m) & S_IFIFO)
#define S_ISCHR(m) ((m) & S_IFCHR)
#define S_ISBLK(m) ((m) & S_IFBLK)
#define S_ISREG(m) ((m) & S_IFREG)
#define S_IRWXU (S_IREAD | S_IWRITE | S_IEXEC)
#define S_IXUSR S_IEXEC
#define S_IWUSR S_IWRITE
#define S_IRUSR S_IREAD
#define _S_IEXEC S_IEXEC
#define _S_IREAD S_IREAD
#define _S_IWRITE S_IWRITE
/*
* The structure manipulated and returned by stat and fstat.
*
* NOTE: If called on a directory the values in the time fields are not only
* invalid, they will cause localtime et. al. to return NULL. And calling
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
*/
struct stat
{
unsigned st_dev; /* Equivalent to drive number 0=A 1=B ... */
short st_ino; /* Always zero ? */
short st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
unsigned st_rdev; /* Seems useless (not even filled in) */
long st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
struct _stati64
{
unsigned st_dev; /* Equivalent to drive number 0=A 1=B ... */
short st_ino; /* Always zero ? */
short st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
unsigned st_rdev; /* Seems useless (not even filled in) */
__int64 st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
#ifdef __cplusplus
extern "C" {
#endif
int _fstat(int, struct stat*);
int _stat(const char*, struct stat*);
__int64 _fstati64(int nFileNo, struct _stati64* pstat);
__int64 _stati64(const char* szPath, struct _stati64* pstat);
int _wstat(const wchar_t* szPath, struct stat* pstat);
__int64 _wstati64(const wchar_t* szPath, struct _stati64* pstat);
#ifndef _NO_OLDNAMES
#define fstat(nFileNo, pstat) _fstat(nFileNo, pstat)
#define stat(szPath,pstat) _stat(szPath,pstat)
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not _STAT_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,3 +0,0 @@
#include <msvcrt/time.h>

View file

@ -1,61 +0,0 @@
/*
* timeb.h
*
* Support for the UNIX System V ftime system call.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.4 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _TIMEB_H_
#define _TIMEB_H_
/*
* TODO: Structure not tested.
*/
struct timeb
{
long time;
short millitm;
short _timezone;
short dstflag;
};
#ifdef __cplusplus
extern "C" {
#endif
/* TODO: Not tested. */
void _ftime(struct timeb*);
#ifndef _NO_OLDNAMES
void ftime(struct timeb*);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not _TIMEB_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,68 +0,0 @@
/*
* types.h
*
* The definition of constants, data types and global variables.
*
* This file is part of the Mingw32 package.
*
* 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
* DISCLAIMED. This includes but is not limited to warrenties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
#ifndef _TYPES_H_
#define _TYPES_H_
#ifdef __GNUC__
#undef __int64
#define __int64 long long
#endif
#ifndef _TIME_T_
#define _TIME_T_
typedef long time_t;
#endif
#ifndef __STRICT_ANSI__
#ifndef _OFF_T_DEFINED
typedef long _off_t;
#ifndef _NO_OLDNAMES
#define off_t _off_t
#endif
#define _OFF_T_DEFINED
#endif /* Not _OFF_T_DEFINED */
#ifndef _DEV_T_DEFINED
typedef short _dev_t;
#ifndef _NO_OLDNAMES
#define dev_t _dev_t
#endif
#define _DEV_T_DEFINED
#endif /* Not _DEV_T_DEFINED */
#ifndef _INO_T_DEFINED
typedef short _ino_t;
#ifndef _NO_OLDNAMES
#define ino_t _ino_t
#endif
#define _INO_T_DEFINED
#endif /* Not _INO_T_DEFINED */
#endif /* Not __STRICT_ANSI__ */
#endif /* Not _TYPES_H_ */

View file

@ -1,9 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* unistd.h maps (roughly) to io.h
*/
#ifndef __STRICT_ANSI__
#include <msvcrt/io.h>
#endif

View file

@ -1,80 +0,0 @@
/*
* utime.h
*
* Support for the utime function.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _UTIME_H_
#define _UTIME_H_
#define __need_wchar_t
#define __need_size_t
#include <msvcrt/stddef.h>
#include <msvcrt/sys/types.h>
/*
* Structure used by _utime function.
*/
struct _utimbuf
{
time_t actime; /* Access time */
time_t modtime; /* Modification time */
};
#ifndef _NO_OLDNAMES
/* NOTE: Must be the same as _utimbuf above. */
struct utimbuf
{
time_t actime;
time_t modtime;
};
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
extern "C" {
#endif
int _utime(const char*, struct _utimbuf*);
int _futime(int, struct _utimbuf*);
/* The wide character version, only available for MSVCRT versions of the
* C runtime library. */
int _wutime(const wchar_t*, struct _utimbuf*);
#ifndef _NO_OLDNAMES
int utime(const char*, struct utimbuf*);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not _UTIME_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -1,125 +0,0 @@
/*
* time.h
*
* Date and time functions and types.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.6 $
* $Author$
* $Date$
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
#ifndef _TIME_H_
#define _TIME_H_
#define __need_wchar_t
#define __need_size_t
#include <msvcrt/stddef.h>
/*
* Number of clock ticks per second. A clock tick is the unit by which
* processor time is measured and is returned by 'clock'.
*/
#define CLOCKS_PER_SEC 1000.0
#define CLK_TICK CLOCKS_PER_SEC
/*
* Need a definition of time_t.
*/
#include <msvcrt/sys/types.h>
/*
* A type for storing the current time and date. This is the number of
* seconds since midnight Jan 1, 1970.
* NOTE: Normally this is defined by the above include of sys/types.h
*/
#ifndef _TIME_T_
typedef long time_t;
#define _TIME_T_
#endif
/*
* A type for measuring processor time (in clock ticks).
*/
#ifndef _CLOCK_T_
typedef long clock_t;
#define _CLOCK_T_
#endif
/*
* A structure for storing all kinds of useful information about the
* current (or another) time.
*/
struct tm
{
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
int tm_min; /* Minutes: 0-59 */
int tm_hour; /* Hours since midnight: 0-23 */
int tm_mday; /* Day of the month: 1-31 */
int tm_mon; /* Months *since* january: 0-11 */
int tm_year; /* Years since 1900 */
int tm_wday; /* Days since Sunday (0-6) */
int tm_yday; /* Days since Jan. 1: 0-365 */
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
* -1 don't know */
char *tm_zone;
int tm_gmtoff;
};
#ifdef __cplusplus
extern "C" {
#endif
clock_t clock(void);
time_t time(time_t*);
double difftime(time_t, time_t);
time_t mktime(struct tm*);
/*
* These functions write to and return pointers to static buffers that may
* be overwritten by other function calls. Yikes!
*
* NOTE: localtime, and perhaps the others of the four functions grouped
* below may return NULL if their argument is not 'acceptable'. Also note
* that calling asctime with a NULL pointer will produce an Invalid Page
* Fault and crap out your program. Guess how I know. Hint: stat called on
* a directory gives 'invalid' times in st_atime etc...
*/
char* asctime(const struct tm*);
char* ctime(const time_t*);
struct tm* gmtime(const time_t*);
struct tm* localtime(const time_t*);
size_t strftime(char*, size_t, const char*, const struct tm*);
size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
wchar_t* _wasctime(const struct tm *timeptr);
wchar_t* _wctime(const time_t * const timep);
char* _strdate(const char *datestr);
wchar_t* _wstrdate(const wchar_t *datestr);
char* _strtime(char* buf);
wchar_t* _wstrtime(wchar_t* buf);
#ifdef __cplusplus
}
#endif
#endif /* Not _TIME_H_ */

View file

@ -1,41 +0,0 @@
/*
* wchar.h
*
* Defines of all functions for supporting wide characters. Actually it
* just includes all those headers, which is not a good thing to do from a
* processing time point of view, but it does mean that everything will be
* in sync.
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.5 $
* $Author$
* $Date$
*
*/
#ifndef _WCHAR_H_
#define _WCHAR_H_
#define WCHAR_MIN 0
#define WCHAR_MAX ((wchar_t)-1)
#include <msvcrt/ctype.h>
#include <msvcrt/stdio.h>
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
#include <msvcrt/time.h>
#endif /* not _WCHAR_H_ */

View file

@ -1,124 +0,0 @@
/*
* msvcrt C++ exception handling
*
* Copyright 2002 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __MSVCRT_CPPEXCEPT_H
#define __MSVCRT_CPPEXCEPT_H
#define CXX_FRAME_MAGIC 0x19930520
#define CXX_EXCEPTION 0xe06d7363
typedef void (*vtable_ptr)();
/* type_info object, see cpp.c for inplementation */
typedef struct __type_info
{
vtable_ptr *vtable;
char *name; /* Unmangled name, allocated lazily */
char mangled[32]; /* Variable length, but we declare it large enough for static RTTI */
} type_info;
/* the exception frame used by CxxFrameHandler */
typedef struct __cxx_exception_frame
{
EXCEPTION_REGISTRATION_RECORD frame; /* the standard exception frame */
int trylevel;
DWORD ebp;
} cxx_exception_frame;
/* info about a single catch {} block */
typedef struct __catchblock_info
{
UINT flags; /* flags (see below) */
type_info *type_info; /* C++ type caught by this block */
int offset; /* stack offset to copy exception object to */
void (*handler)(); /* catch block handler code */
} catchblock_info;
#define TYPE_FLAG_CONST 1
#define TYPE_FLAG_VOLATILE 2
#define TYPE_FLAG_REFERENCE 8
/* info about a single try {} block */
typedef struct __tryblock_info
{
int start_level; /* start trylevel of that block */
int end_level; /* end trylevel of that block */
int catch_level; /* initial trylevel of the catch block */
int catchblock_count; /* count of catch blocks in array */
catchblock_info *catchblock; /* array of catch blocks */
} tryblock_info;
/* info about the unwind handler for a given trylevel */
typedef struct __unwind_info
{
int prev; /* prev trylevel unwind handler, to run after this one */
void (*handler)(); /* unwind handler */
} unwind_info;
/* descriptor of all try blocks of a given function */
typedef struct __cxx_function_descr
{
UINT magic; /* must be CXX_FRAME_MAGIC */
UINT unwind_count; /* number of unwind handlers */
unwind_info *unwind_table; /* array of unwind handlers */
UINT tryblock_count; /* number of try blocks */
tryblock_info *tryblock; /* array of try blocks */
UINT unknown[3];
} cxx_function_descr;
typedef void (*cxx_copy_ctor)(void);
/* complete information about a C++ type */
typedef struct __cxx_type_info
{
UINT flags; /* flags (see CLASS_* flags below) */
type_info *type_info; /* C++ type info */
int this_offset; /* offset of base class this pointer from start of object */
int vbase_descr; /* offset of virtual base class descriptor */
int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */
size_t size; /* object size */
cxx_copy_ctor copy_ctor; /* copy constructor */
} cxx_type_info;
#define CLASS_IS_SIMPLE_TYPE 1
#define CLASS_HAS_VIRTUAL_BASE_CLASS 4
/* table of C++ types that apply for a given object */
typedef struct __cxx_type_info_table
{
UINT count; /* number of types */
const cxx_type_info *info[3]; /* variable length, we declare it large enough for static RTTI */
} cxx_type_info_table;
typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, cxx_exception_frame*,
PCONTEXT, EXCEPTION_REGISTRATION_RECORD**,
cxx_function_descr*, int nested_trylevel,
EXCEPTION_REGISTRATION_RECORD *nested_frame, DWORD unknown3 );
/* type information for an exception object */
typedef struct __cxx_exception_type
{
UINT flags; /* TYPE_FLAG flags */
void (*destructor)(); /* exception object destructor */
cxx_exc_custom_handler custom_handler; /* custom handler for this exception */
const cxx_type_info_table *type_info_table; /* list of types for this exception object */
} cxx_exception_type;
void _CxxThrowException(void*,const cxx_exception_type*);
#endif /* __MSVCRT_CPPEXCEPT_H */

View file

@ -1,53 +0,0 @@
/*
* C++ exception handling facility
*
* Copyright 2000 Francois Gouget.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_EH_H
#define __WINE_EH_H
#ifndef __WINE_USE_MSVCRT
#define __WINE_USE_MSVCRT
#endif
#if !defined(__cplusplus) && !defined(USE_MSVCRT_PREFIX)
#error "eh.h is meant only for C++ applications"
#endif
#ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
struct _EXCEPTION_POINTERS;
typedef void (*terminate_handler)();
typedef void (*terminate_function)();
typedef void (*unexpected_handler)();
typedef void (*unexpected_function)();
typedef void (*_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
terminate_function MSVCRT(set_terminate)(terminate_function func);
unexpected_function MSVCRT(set_unexpected)(unexpected_function func);
_se_translator_function MSVCRT(_set_se_translator)(_se_translator_function func);
void MSVCRT(terminate)();
void MSVCRT(unexpected)();
#endif /* __WINE_EH_H */

View file

@ -1,128 +0,0 @@
/*
* Copyright 2001 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_MSVCRT_H
#define __WINE_MSVCRT_H
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "msvcrt/string.h"
#include "eh.h"
/* TLS data */
extern DWORD MSVCRT_tls_index;
typedef struct __MSVCRT_thread_data
{
int _errno; // ros
unsigned long doserrno;
char *mbstok_next; /* next ptr for mbstok() */
char *efcvt_buffer; /* buffer for ecvt/fcvt */
terminate_function terminate_handler;
unexpected_function unexpected_handler;
_se_translator_function se_translator;
EXCEPTION_RECORD *exc_record;
} MSVCRT_thread_data;
extern MSVCRT_thread_data *msvcrt_get_thread_data(void);
extern int MSVCRT_current_lc_all_cp;
void _purecall(void);
void MSVCRT__set_errno(int);
char* msvcrt_strndup(const char*,unsigned int);
#ifndef __REACTOS__
MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int);
#endif
void MSVCRT__amsg_exit(int errnum);
extern char **MSVCRT__environ;
#ifndef __REACTOS__
extern MSVCRT_wchar_t **MSVCRT__wenviron;
extern char ** msvcrt_SnapshotOfEnvironmentA(char **);
extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **);
#endif
/* FIXME: This should be declared in new.h but it's not an extern "C" so
* it would not be much use anyway. Even for Winelib applications.
*/
int MSVCRT__set_new_mode(int mode);
void* MSVCRT_operator_new(unsigned long size);
void MSVCRT_operator_delete(void*);
#ifndef __REACTOS__
typedef void* (*MSVCRT_malloc_func)(MSVCRT_size_t);
#endif
typedef void (*MSVCRT_free_func)(void*);
#ifndef __REACTOS__
extern char* MSVCRT___unDName(int,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,unsigned int);
#endif
/* Setup and teardown multi threaded locks */
extern void msvcrt_init_mt_locks(void);
extern void msvcrt_free_mt_locks(void);
extern void msvcrt_init_io(void);
extern void msvcrt_free_io(void);
extern void msvcrt_init_console(void);
extern void msvcrt_free_console(void);
extern void msvcrt_init_args(void);
extern void msvcrt_free_args(void);
/* run-time error codes */
#define _RT_STACK 0
#define _RT_NULLPTR 1
#define _RT_FLOAT 2
#define _RT_INTDIV 3
#define _RT_EXECMEM 5
#define _RT_EXECFORM 6
#define _RT_EXECENV 7
#define _RT_SPACEARG 8
#define _RT_SPACEENV 9
#define _RT_ABORT 10
#define _RT_NPTR 12
#define _RT_FPTR 13
#define _RT_BREAK 14
#define _RT_INT 15
#define _RT_THREAD 16
#define _RT_LOCK 17
#define _RT_HEAP 18
#define _RT_OPENCON 19
#define _RT_QWIN 20
#define _RT_NOMAIN 21
#define _RT_NONCONT 22
#define _RT_INVALDISP 23
#define _RT_ONEXIT 24
#define _RT_PUREVIRT 25
#define _RT_STDIOINIT 26
#define _RT_LOWIOINIT 27
#define _RT_HEAPINIT 28
#define _RT_DOMAIN 120
#define _RT_SING 121
#define _RT_TLOSS 122
#define _RT_CRNL 252
#define _RT_BANNER 255
#endif /* __WINE_MSVCRT_H */

View file

@ -1,268 +1,410 @@
/*
* tchar.h
*
* Unicode mapping layer for the standard C library. By including this
* file and using the 't' names for string functions
* (eg. _tprintf) you can make code which can be easily adapted to both
* Unicode and non-unicode environments. In a unicode enabled compile define
* _UNICODE before including tchar.h, otherwise the standard non-unicode
* library functions will be used.
*
* Note that you still need to include string.h or stdlib.h etc. to define
* the appropriate functions. Also note that there are several defines
* included for non-ANSI functions which are commonly available (but using
* the convention of prepending an underscore to non-ANSI library function
* names).
*
* This file is part of the Mingw32 package.
*
* 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.14 $
* $Author$
* $Date$
*
*/
#ifndef _ROS_TCHAR_H_
#define _ROS_TCHAR_H_
#ifndef _TCHAR_H_
#define _TCHAR_H_
#include <msvcrt/string.h>
#include <string.h>
/*
* NOTE: This tests _UNICODE, which is different from the UNICODE define
* used to differentiate Win32 API calls.
*/
#ifdef _UNICODE
#ifdef _UNICODE
#define __TEXT(q) L##q
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef wchar_t TCHAR;
typedef wchar_t _TCHAR;
#endif /* Not RC_INVOKED */
#define _TCHAR_DEFINED
#endif
#define _TINT wint_t
#define _TSCHAR wchar_t
#define _TUCHAR wchar_t
#define _TXCHAR wchar_t
#define _TEOF WEOF
#define _tenviron _wenviron
#define _tfinddata_t _wfinddata_t
/* dirent structures and functions */
#define _tdirent _wdirent
#define _TDIR _WDIR
#define _topendir _wopendir
#define _tclosedir _wclosedir
#define _treaddir _wreaddir
#define _trewinddir _wrewinddir
#define _ttelldir _wtelldir
#define _tseekdir _wseekdir
#define _ttoi64 _wtoi64
#define _i64tot _i64tow
#define _ui64tot _ui64tow
#define _tcsnccoll _wstrncoll
#define _tcsncoll _wstrncoll
#define _tcsncicoll _wstrnicoll
#define _tfindfirsti64 _wfindfirsti64
#define _tfindnexti64 _wfindnexti64
#define _tfinddatai64_t _wfinddatai64_t
#define _tunlink _wunlink
#define _tgetdcwd _wgetdcwd
/*
* Use TCHAR instead of char or wchar_t. It will be appropriately translated
* if _UNICODE is correctly defined (or not).
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef wchar_t _TCHAR;
typedef wchar_t _TSCHAR;
typedef wchar_t _TUCHAR;
typedef wchar_t _TXCHAR;
/* #if !__STDC__ */
typedef wchar_t TCHAR;
/* #endif */
#endif /* Not RC_INVOKED */
#define _TCHAR_DEFINED
#define _fgettc fgetwc
#define _fgettchar _fgetwchar
#define _fgetts fgetws
#define _fputtc fputwc
#define _fputtchar _fputwchar
#define _fputts fputws
#define _ftprintf fwprintf
#define _ftscanf fwscanf
#define _gettc getwc
#define _gettchar getwchar
#define _getts getws
#define _istalnum iswalnum
#define _istalpha iswalpha
#define _istascii iswascii
#define _istcntrl iswcntrl
#define _istdigit iswdigit
#define _istgraph iswgraph
#define _istlead(c) 0
#define _istleadbyte(c) 0
#define _istlegal(c) 1
#define _istlower iswlower
#define _istprint iswprint
#define _istpunct iswpunct
#define _istspace iswspace
#define _istupper iswupper
#define _istxdigit iswxdigit
#define _itot _itow
#define _ltot _ltow
#define _puttc putwc
#define _puttchar putwchar
#define _putts putws
#define _tmain wmain
#define _sntprintf _snwprintf
#define _stprintf swprintf
#define _stscanf swscanf
#define _taccess _waccess
#define _tasctime _wasctime
#define _tccpy(d,s) (*(d)=*(s))
#define _tchdir _wchdir
#define _tclen(c) 2
#define _tchmod _wchmod
#define _tcreat _wcreat
#define _tcscat wcscat
#define _tcschr wcschr
#define _tcsclen wcslen
#define _tcscmp wcscmp
#define _tcscoll wcscoll
#define _tcscpy wcscpy
#define _tcscspn wcscspn
#define _tcsdec _wcsdec
#define _tcsdup _wcsdup
#define _tcsftime wcsftime
#define _tcsicmp _wcsicmp
#define _tcsicoll _wcsicoll
#define _tcsinc _wcsinc
#define _tcslen wcslen
#define _tcslwr _wcslwr
#define _tcsnbcnt _wcnscnt
#define _tcsncat wcsncat
#define _tcsnccat wcsncat
#define _tcsncmp wcsncmp
#define _tcsnccmp wcsncmp
#define _tcsnccnt _wcsncnt
#define _tcsnccpy wcsncpy
#define _tcsncicmp _wcsnicmp
#define _tcsncpy wcsncpy
#define _tcsncset _wcsnset
#define _tcsnextc _wcsnextc
#define _tcsnicmp _wcsnicmp
#define _tcsnicoll _wcsnicoll
#define _tcsninc _wcsninc
#define _tcsnccnt _wcsncnt
#define _tcsnset _wcsnset
#define _tcspbrk wcspbrk
#define _tcsspnp _wcsspnp
#define _tcsrchr wcsrchr
#define _tcsrev _wcsrev
#define _tcsset _wcsset
#define _tcsspn wcsspn
#define _tcsstr wcsstr
#define _tcstod wcstod
#define _tcstok wcstok
#define _tcstol wcstol
#define _tcstoul wcstoul
#define _tcsupr _wcsupr
#define _tcsxfrm wcsxfrm
#define _tctime _wctime
#define _texecl _wexecl
#define _texecle _wexecle
#define _texeclp _wexeclp
#define _texeclpe _wexeclpe
#define _texecv _wexecv
#define _texecve _wexecve
#define _texecvp _wexecvp
#define _texecvpe _wexecvpe
#define _tfdopen _wfdopen
#define _tfindfirst _wfindfirst
#define _tfindnext _wfindnext
#define _tfopen _wfopen
#define _tfreopen _wfreopen
#define _tfsopen _wfsopen
#define _tfullpath _wfullpath
#define _tgetcwd _wgetcwd
#define _tgetenv _wgetenv
#define _tmain wmain
#define _tmakepath _wmakepath
#define _tmkdir _wmkdir
#define _tmktemp _wmktemp
#define _tperror _wperror
#define _topen _wopen
#define _totlower towlower
#define _totupper towupper
#define _tpopen _wpopen
#define _tprintf wprintf
#define _tremove _wremove
#define _trename _wrename
#define _trmdir _wrmdir
#define _tsearchenv _wsearchenv
#define _tscanf wscanf
#define _tsetlocale _wsetlocale
#define _tsopen _wsopen
#define _tspawnl _wspawnl
#define _tspawnle _wspawnle
#define _tspawnlp _wspawnlp
#define _tspawnlpe _wspawnlpe
#define _tspawnv _wspawnv
#define _tspawnve _wspawnve
#define _tspawnvp _wspawnvp
#define _tspawnvpe _wspawnvpe
#define _tsplitpath _wsplitpath
#define _tstat _wstat
#define _tstrdate _wstrdate
#define _tstrtime _wstrtime
#define _tsystem _wsystem
#define _ttempnam _wtempnam
#define _ttmpnam _wtmpnam
#define _ttoi _wtoi
#define _ttol _wtol
#define _tutime _wutime
#define _tWinMain wWinMain
#define _ultot _ultow
#define _ungettc ungetwc
#define _vftprintf vfwprintf
#define _vsntprintf _vsnwprintf
#define _vstprintf vswprintf
#define _vtprintf vwprintf
#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
#define _wcsinc(_wcs) ((_wcs)+1)
#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
#else
#define __TEXT(q) q
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef char TCHAR;
typedef char _TCHAR;
#endif
#define _TCHAR_DEFINED
#endif
#define _TINT int
#define _TSCHAR signed char
#define _TUCHAR unsigned char
#define _TXCHAR char
#define _TEOF EOF
#define _tenviron _environ
#define _tfinddata_t _finddata_t
/* dirent structures and functions */
#define _tdirent dirent
#define _TDIR DIR
#define _topendir opendir
#define _tclosedir closedir
#define _treaddir readdir
#define _trewinddir rewinddir
#define _ttelldir telldir
#define _tseekdir seekdir
#define _ttoi64 _atoi64
#define _i64tot _i64toa
#define _ui64tot _ui64toa
#define _tcsnccoll _strncoll
#define _tcsncoll _strncoll
#define _tcsncicoll _strnicoll
#define _tfindfirsti64 _findfirsti64
#define _tfindnexti64 _findnexti64
#define _tfinddatai64_t _finddatai64_t
#define _tunlink _unlink
#define _tgetdcwd _getdcwd
#define _fgettc fgetc
#define _fgettchar fgetchar
#define _fgetts fgets
#define _fputtc fputc
#define _fputtchar fputchar
#define _fputts fputs
#define _ftprintf fprintf
#define _ftscanf fscanf
#define _gettc getc
#define _gettchar getchar
#define _getts gets
#define _istalnum isalnum
#define _istalpha isalpha
#define _istascii __isascii
#define _istcntrl iscntrl
#define _istdigit isdigit
#define _istgraph isgraph
#define _istlead(c) 0
#define _istleadbyte(c) 0
#define _istlegal(c) 1
#define _istlower islower
#define _istprint isprint
#define _istpunct ispunct
#define _istspace isspace
#define _istupper isupper
#define _istxdigit isxdigit
#define _itot _itoa
#define _ltot _ltoa
#define _puttc putc
#define _puttchar putchar
#define _putts puts
#define _tmain main
#define _sntprintf _snprintf
#define _stprintf sprintf
#define _stscanf sscanf
#define _taccess _access
#define _tasctime asctime
#define _tccpy(d,s) (*(d)=*(s))
#define _tchdir _chdir
#define _tclen(c) 1
#define _tchmod _chmod
#define _tcreat _creat
#define _tcscat strcat
#define _tcschr strchr
#define _tcsclen strlen
#define _tcscmp strcmp
#define _tcscoll strcoll
#define _tcscpy strcpy
#define _tcscspn strcspn
#define _tcsdec _strdec
#define _tcsdup _strdup
#define _tcsftime strftime
#define _tcsicmp _stricmp
#define _tcsicoll _stricoll
#define _tcsinc _strinc
#define _tcslen strlen
#define _tcslwr _strlwr
#define _tcsnbcnt _strncnt
#define _tcsncat strncat
#define _tcsnccat strncat
#define _tcsncmp strncmp
#define _tcsnccmp strncmp
#define _tcsnccnt _strncnt
#define _tcsnccpy strncpy
#define _tcsncicmp _strnicmp
#define _tcsncpy strncpy
#define _tcsncset _strnset
#define _tcsnextc _strnextc
#define _tcsnicmp _strnicmp
#define _tcsnicoll _strnicoll
#define _tcsninc _strninc
#define _tcsnccnt _strncnt
#define _tcsnset _strnset
#define _tcspbrk strpbrk
#define _tcsspnp _strspnp
#define _tcsrchr strrchr
#define _tcsrev _strrev
#define _tcsset _strset
#define _tcsspn strspn
#define _tcsstr strstr
#define _tcstod strtod
#define _tcstok strtok
#define _tcstol strtol
#define _tcstoul strtoul
#define _tcsupr _strupr
#define _tcsxfrm strxfrm
#define _tctime ctime
#define _texecl _execl
#define _texecle _execle
#define _texeclp _execlp
#define _texeclpe _execlpe
#define _texecv _execv
#define _texecve _execve
#define _texecvp _execvp
#define _texecvpe _execvpe
#define _tfdopen _fdopen
#define _tfindfirst _findfirst
#define _tfindnext _findnext
#define _tfopen fopen
#define _tfreopen freopen
#define _tfsopen _fsopen
#define _tfullpath _fullpath
#define _tgetcwd _getcwd
#define _tgetenv getenv
#define _tmain main
#define _tmakepath _makepath
#define _tmkdir _mkdir
#define _tmktemp _mktemp
#define _tperror perror
#define _topen _open
#define _totlower tolower
#define _totupper toupper
#define _tpopen _popen
#define _tprintf printf
#define _tremove remove
#define _trename rename
#define _trmdir _rmdir
#define _tsearchenv _searchenv
#define _tscanf scanf
#define _tsetlocale setlocale
#define _tsopen _sopen
#define _tspawnl _spawnl
#define _tspawnle _spawnle
#define _tspawnlp _spawnlp
#define _tspawnlpe _spawnlpe
#define _tspawnv _spawnv
#define _tspawnve _spawnve
#define _tspawnvp _spawnvp
#define _tspawnvpe _spawnvpe
#define _tsplitpath _splitpath
#define _tstat _stat
#define _tstrdate _strdate
#define _tstrtime _strtime
#define _tsystem system
#define _ttempnam _tempnam
#define _ttmpnam tmpnam
#define _ttoi atoi
#define _ttol atol
#define _tutime _utime
#define _tWinMain WinMain
#define _ultot _ultoa
#define _ungettc ungetc
#define _vftprintf vfprintf
#define _vsntprintf _vsnprintf
#define _vstprintf vsprintf
#define _vtprintf vprintf
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
#define _strinc(_str) ((_str)+1)
#define _strnextc(_str) ((unsigned int) *(_str))
#define _strninc(_str, _inc) (((_str)+(_inc)))
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
#endif
/*
* Enclose constant strings and literal characters in the _TEXT and _T macro to make
* them unicode constant strings when _UNICODE is defined.
*/
#ifndef _TEXT
#define _TEXT(x) L ## x
#endif
#ifndef _T
#define _T(x) L ## x
#endif
#define _TEXT(x) __TEXT(x)
#define _T(x) __TEXT(x)
/*
* Unicode functions
*/
#endif /* _TCHAR_H_ */
#define _tmain _wmain
#define _tprintf wprintf
#define _ftprintf fwprintf
#define _stprintf swprintf
#define _sntprintf _snwprintf
#define _vtprintf vwprintf
#define _vftprintf vfwprintf
#define _vstprintf vswprintf
#define _vsntprintf _vsnwprintf
#define _tscanf wscanf
#define _ftscanf fwscanf
#define _stscanf swscanf
#define _fgettc fgetwc
#define _fgettchar _fgetwchar
#define _fgetts fgetws
#define _fputtc fputwc
#define _fputtchar _fputwchar
#define _fputts fputws
#define _gettc getwc
#define _getts getws
#define _puttc putwc
#define _putts putws
#define _ungettc ungetwc
#define _tcstod wcstod
#define _tcstol wcstol
#define _tcstoul wcstoul
#define _tcscat wcscat
#define _tcschr wcschr
#define _tcscmp wcscmp
#define _tcscpy wcscpy
#define _tcscspn wcscspn
#define _tcslen wcslen
#define _tcsncat wcsncat
#define _tcsncmp wcsncmp
#define _tcsncpy wcsncpy
#define _tcsnlen wcsnlen
#define _tcspbrk wcspbrk
#define _tcsrchr wcsrchr
#define _tcsspn wcsspn
#define _tcsstr wcsstr
#define _tcstok wcstok
#define _tcsdup _wcsdup
#define _tcsicmp _wcsicmp
#define _tcsnicmp _wcsnicmp
#define _tcsnset _wcsnset
#define _tcsrev _wcsrev
#define _tcsset _wcsset
#define _tcslwr _wcslwr
#define _tcsupr _wcsupr
#define _tcsxfrm wcsxfrm
#define _tcscoll wcscoll
#define _tcsicoll _wcsicoll
#define _istalpha iswalpha
#define _istupper iswupper
#define _istlower iswlower
#define _istdigit iswdigit
#define _istxdigit iswxdigit
#define _istspace iswspace
#define _istpunct iswpunct
#define _istalnum iswalnum
#define _istprint iswprint
#define _istgraph iswgraph
#define _istcntrl iswcntrl
#define _istascii iswascii
#define _totupper towupper
#define _totlower towlower
#define _ttoi _wtoi
#define _ttoi64 _wtoi64
#define _tcsftime wcsftime
#define _tsplitpath _wsplitpath
#define _tmakepath _wmakepath
#define _tfopen _wfopen
#else /* Not _UNICODE */
/*
* TCHAR, the type you should use instead of char.
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef char _TCHAR;
typedef signed char _TSCHAR;
typedef unsigned char _TUCHAR;
typedef char _TXCHAR;
/*#if !__STDC__*/
typedef char TCHAR;
/*#endif*/
#endif
#define _TCHAR_DEFINED
#endif
/*
* Enclose constant strings and characters in the _TEXT and _T macro.
*/
#ifndef _TEXT
#define _TEXT(x) x
#endif
#ifndef _T
#define _T(x) x
#endif
/*
* Non-unicode (standard) functions
*/
#define _tmain main
#define _tprintf printf
#define _ftprintf fprintf
#define _stprintf sprintf
#define _sntprintf _snprintf
#define _vtprintf vprintf
#define _vftprintf vfprintf
#define _vstprintf vsprintf
#define _vsntprintf _vsnprintf
#define _tscanf scanf
#define _ftscanf fscanf
#define _stscanf sscanf
#define _fgettc fgetc
#define _fgettchar _fgetchar
#define _fgetts fgets
#define _fputtc fputc
#define _fputtchar _fputchar
#define _fputts fputs
#define _gettc getc
#define _getts gets
#define _puttc putc
#define _putts puts
#define _ungettc ungetc
#define _tcstod strtod
#define _tcstol strtol
#define _tcstoul strtoul
#define _tcscat strcat
#define _tcschr strchr
#define _tcscmp strcmp
#define _tcscpy strcpy
#define _tcscspn strcspn
#define _tcslen strlen
#define _tcsncat strncat
#define _tcsncmp strncmp
#define _tcsncpy strncpy
#define _tcsnlen strnlen
#define _tcspbrk strpbrk
#define _tcsrchr strrchr
#define _tcsspn strspn
#define _tcsstr strstr
#define _tcstok strtok
#define _tcsdup _strdup
#define _tcsicmp _stricmp
#define _tcsnicmp _strnicmp
#define _tcsnset _strnset
#define _tcsrev _strrev
#define _tcsset _strset
#define _tcslwr _strlwr
#define _tcsupr _strupr
#define _tcsxfrm strxfrm
#define _tcscoll strcoll
#define _tcsicoll _stricoll
#define _istalpha isalpha
#define _istupper isupper
#define _istlower islower
#define _istdigit isdigit
#define _istxdigit isxdigit
#define _istspace isspace
#define _istpunct ispunct
#define _istalnum isalnum
#define _istprint isprint
#define _istgraph isgraph
#define _istcntrl iscntrl
#define _istascii isascii
#define _totupper toupper
#define _totlower tolower
#define _ttoi atoi
#define _ttoi64 _atoi64
#define _tcsftime strftime
#define _tsplitpath _splitpath
#define _tmakepath _makepath
#define _tfopen fopen
#endif /* Not _UNICODE */
#endif /* Not _TCHAR_H_ */