+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.3 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _ALLOC_H_
-#define _ALLOC_H_
-
-#include <crtdll/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);
-void * _alloca(size_t size);
-
-
-
-#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__ */
-
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#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
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.5 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _CONIO_H_
-#define _CONIO_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-char* _cgets (char* szBuffer);
-int _cprintf (const char* szFormat, ...);
-int _cputs (const char* szString);
-int _cscanf (char* szFormat, ...);
-
-int _getch (void);
-int _getche (void);
-int _kbhit (void);
-int _putch (int cPut);
-int _ungetch (int cUnget);
-
-
-#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__ */
+++ /dev/null
-void debug_printf(char* fmt, ...);
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.5 $
- * $Author: ekohl $
- * $Date: 2000/01/05 19:42:56 $
- *
- */
-#ifndef _LINUX_CTYPE_H
-#define _LINUX_CTYPE_H
-
-#ifndef _CTYPE_H_
-#define _CTYPE_H_
-
-#define __need_wchar_t
-#define __need_wint_t
-#include <crtdll/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
-#define _PUNCT 0x0010
-#define _CONTROL 0x0020
-#define _BLANK 0x0040
-#define _HEX 0x0080
-
-#define _ALPHA 0x0103
-#define _LEADBYTE 0x8000
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int isalnum(int c);
-int isalpha(int c);
-int iscntrl(int c);
-int isdigit(int c);
-int isgraph(int c);
-int islower(int c);
-int isprint(int c);
-int ispunct(int c);
-int isspace(int c);
-int isupper(int c);
-int isxdigit(int c);
-
-#ifndef __STRICT_ANSI__
-int _isctype (unsigned int c, int ctypeFlags);
-#endif
-
-int tolower(int c);
-int toupper(int c);
-
-/*
- * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by CRTDLL. However, underscored versions are also exported.
- */
-#ifndef __STRICT_ANSI__
-int _tolower(int c);
-int _toupper(int c);
-#endif
-
-#ifndef WEOF
-#define WEOF (wchar_t)(0xFFFF)
-#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 */
-int iswalnum(wint_t wc);
-int iswalpha(wint_t wc);
-int iswascii(wint_t wc);
-int iswcntrl(wint_t wc);
-int iswctype(wint_t wc, wctype_t wctypeFlags);
-int is_wctype(wint_t wc, wctype_t wctypeFlags); /* Obsolete! */
-int iswdigit(wint_t wc);
-int iswgraph(wint_t wc);
-int iswlower(wint_t wc);
-int iswprint(wint_t wc);
-int iswpunct(wint_t wc);
-int iswspace(wint_t wc);
-int iswupper(wint_t wc);
-int iswxdigit(wint_t wc);
-
-wchar_t towlower(wchar_t c);
-wchar_t towupper(wchar_t c);
-
-int isleadbyte (int c);
-
-#ifndef __STRICT_ANSI__
-int __isascii (int c);
-int __toascii (int c);
-int __iscsymf (int c); /* Valid first character in C symbol */
-int __iscsym (int c); /* 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
-#endif
+++ /dev/null
-/*
- * dir.h
- *
- * Functions for working with directories and path 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _DIR_H_
-#define _DIR_H_
-
-#include <crtdll/stdio.h> /* To get FILENAME_MAX... ugly. */
-#include <crtdll/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 structure is 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. */
-};
-
-/*
- * 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 _chdir (const char* szPath);
-char* _getcwd (char* caBuffer, int nBufferSize);
-int _mkdir (const char* szPath);
-char* _mktemp (char* szTemplate);
-int _rmdir (const char* szPath);
-
-
-#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__ */
+++ /dev/null
-#ifndef __include_direct_h_
-#define __include_direct_h_
-
-struct _diskfree_t {
- unsigned short total_clusters;
- unsigned short avail_clusters;
- unsigned short sectors_per_cluster;
- unsigned short bytes_per_sector;
-};
-
-
-int _chdrive( int drive );
-int _getdrive( void );
-char *_getcwd( char *buffer, int maxlen );
-
-int _chdir(const char *_path);
-char *_getcwd(char *, int);
-int _mkdir(const char *_path);
-int _rmdir(const char *_path);
-unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t *_diskspace);
-#define chdir _chdir
-#define getcwd _getcwd
-#define mkdir _mkdir
-#define rmdir _rmdir
-
-
-#endif
+++ /dev/null
-/*
- * DIRENT.H (formerly DIRLIB.H)
- *
- * by M. J. Weinstein Released to public domain 1-Jan-89
- *
- * Because I have heard that this feature (opendir, readdir, closedir)
- * it so useful for programmers coming from UNIX or attempting to port
- * UNIX code, and because it is reasonably light weight, I have included
- * it in the Mingw32 package.
- * - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- *
- * This code is distributed in the hope that is will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includeds but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.3 $
- * $Author: ariadne $
- * $Date: 1999/04/02 21:42:06 $
- *
- */
-
-#ifndef _STRICT_ANSI
-
-#ifndef _DIRENT_H_
-#define _DIRENT_H_
-
-#include <crtdll/dir.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct dirent
-{
- long d_ino;
- unsigned short d_reclen;
- unsigned short d_namlen;
- char d_name[FILENAME_MAX+1];
-};
-
-typedef struct
-{
- struct _finddata_t dd_dta; /* disk transfer area for this dir */
- struct dirent dd_dir; /* dirent struct to return from dir */
- long dd_handle; /* _findnext handle */
- short dd_stat; /* status return from last lookup */
- char dd_name[1]; /* full name of file (struct is extended */
-} DIR;
-
-DIR* opendir (const char* szPath);
-struct dirent* readdir (DIR* dir);
-int closedir (DIR* dir);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif _DIRENT_H_
-
-#endif /* Not _STRICT_ANSI */
+++ /dev/null
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-#ifndef __dj_include_h_
-#define __dj_include_h_
-
-#ifndef __dj_ENFORCE_ANSI_FREESTANDING
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _POSIX_SOURCE
-
-
-
-struct ftime {
- unsigned ft_tsec:5; /* 0-29, double to get real seconds */
- unsigned ft_min:6; /* 0-59 */
- unsigned ft_hour:5; /* 0-23 */
- unsigned ft_day:5; /* 1-31 */
- unsigned ft_month:4; /* 1-12 */
- unsigned ft_year:7; /* since 1980 */
-};
-
-struct date {
- short da_year;
- char da_day;
- char da_mon;
-};
-
-struct time {
- unsigned char ti_min;
- unsigned char ti_hour;
- unsigned char ti_hund;
- unsigned char ti_sec;
-};
-
-struct dfree {
- unsigned df_avail;
- unsigned df_total;
- unsigned df_bsec;
- unsigned df_sclus;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern unsigned short _osmajor, _osminor;
-extern const char * _os_flavor;
-
-unsigned short _get_version(int);
-
-
-
-
-int getftime(int handle, struct ftime *ftimep);
-int setftime(int handle, struct ftime *ftimep);
-
-int getcbrk(void);
-int setcbrk(int new_value);
-
-void getdate(struct date *);
-void gettime(struct time *);
-void setdate(struct date *);
-void settime(struct time *);
-
-void getdfree(unsigned char drive, struct dfree *ptr);
-
-void delay(unsigned msec);
-/* int _get_default_drive(void);
-void _fixpath(const char *, char *); */
-
-
-/*
- * For compatibility with other DOS C compilers.
- */
-
-#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
-#define _A_RDONLY 0x01 /* Read only file */
-#define _A_HIDDEN 0x02 /* Hidden file */
-#define _A_SYSTEM 0x04 /* System file */
-#define _A_VOLID 0x08 /* Volume ID file */
-#define _A_SUBDIR 0x10 /* Subdirectory */
-#define _A_ARCH 0x20 /* Archive file */
-
-#define _enable enable
-#define _disable disable
-
-struct date_t {
- unsigned char day; /* 1-31 */
- unsigned char month; /* 1-12 */
- unsigned short year; /* 1980-2099 */
- unsigned char dayofweek; /* 0-6, 0=Sunday */
-};
-#define dosdate_t date_t
-
-struct time_t {
- unsigned char hour; /* 0-23 */
- unsigned char minute; /* 0-59 */
- unsigned char second; /* 0-59 */
- unsigned char hsecond; /* 0-99 */
-};
-#define dostime_t time_t
-
-
-
-#define finddata_t _finddata_t
-
-
-#define diskfree_t _diskfree_t
-
-struct _DOSERROR {
- int exterror;
- #ifdef __cplusplus
- char errclass;
- #else
- char class;
- #endif
- char action;
- char locus;
-};
-#define DOSERROR _DOSERROR
-
-
-
-
-void _getdate(struct date_t *_date);
-unsigned int _setdate(struct date_t *_date);
-void _gettime(struct time_t *_time);
-unsigned int _settime(struct time_t *_time);
-
-unsigned int _getftime(int _handle, unsigned int *_p_date, unsigned int *_p_time);
-unsigned int _setftime(int _handle, unsigned int _date, unsigned int _time);
-unsigned int _getfileattr(const char *_filename, unsigned int *_p_attr);
-unsigned int _setfileattr(const char *_filename, unsigned int _attr);
-
-
-void _setdrive(unsigned int _drive, unsigned int *_p_drives);
-
-
-int exterr(struct _DOSERROR *_p_error);
-#define dosexterr(_ep) exterr(_ep)
-
-#include <crtdll/direct.h>
-
-#define int386(_i, _ir, _or) int86(_i, _ir, _or)
-#define int386x(_i, _ir, _or, _sr) int86x(_i, _ir, _or, _sr)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_POSIX_SOURCE */
-#endif /* !__STRICT_ANSI__ */
-#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
-
-#ifndef __dj_ENFORCE_FUNCTION_CALLS
-#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
-
-#endif /* !__dj_include_h_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: chorns $
- * $Date: 2002/05/05 14:57:38 $
- *
- */
-
-#ifndef _ERRNO_H_
-#define _ERRNO_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * 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).
- */
-
-/*
- * 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())
-
-#if __MSVCRT__
-/* One of the MSVCRTxx libraries */
-
-extern int* __imp__sys_nerr;
-#define sys_nerr (*__imp__sys_nerr)
-
-extern char** __imp__sys_errlist;
-#ifndef sys_errlist
-#define sys_errlist (__imp__sys_errlist)
-#endif
-
-#else
-/* CRTDLL run time library */
-
-
-#define _sys_nerr (*_sys_nerr_dll)
-extern int* _sys_nerr_dll;
-#define sys_nerr (*_sys_nerr_dll)
-
-extern const char* __sys_errlist[];
-#define sys_errlist (__sys_errlist)
-
-#endif
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * excpt.h
- *
- * Support for operating system level structured exception handling.
- *
- * NOTE: This is very preliminary stuff. I am also pretty sure it is
- * completely Intel specific.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * Based on code by Mikey <jeffdb@netzone.com>
- *
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.1 $
- * $Author: ariadne $
- * $Date: 1999/04/02 21:42:06 $
- *
- */
-
-#ifndef _EXCPT_H_
-#define _EXCPT_H_
-
-#ifndef __STRICT_ANSI__
-
-#include <windows.h>
-
-/*
- * NOTE: The constants structs and typedefs below should be defined in the
- * Win32 API headers.
- */
-#define EH_NONCONTINUABLE 0x01
-#define EH_UNWINDING 0x02
-#define EH_EXIT_UNWIND 0x04
-#define EH_STACK_INVALID 0x08
-#define EH_NESTED_CALL 0x10
-
-#ifndef RC_INVOKED
-
-typedef enum {
- ExceptionContinueExecution,
- ExceptionContinueSearch,
- ExceptionNestedException,
- ExceptionCollidedUnwind
-} EXCEPTION_DISPOSITION;
-
-
-/*
- * End of stuff that should be in the Win32 API files.
- */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The type of function that is expected as an exception handler to be
- * installed with _try1.
- */
-typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
- (struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
-
-/*
- * This is not entirely necessary, but it is the structure installed by
- * the _try1 primitive below.
- */
-typedef struct _EXCEPTION_REGISTRATION
-{
- struct _EXCEPTION_REGISTRATION* prev;
- PEXCEPTION_HANDLER handler;
-} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
-
-typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
-typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
-
-/*
- * A macro which installs the supplied exception handler.
- * Push the pointer to the new handler onto the stack,
- * then push the pointer to the old registration structure (at fs:0)
- * onto the stack, then put a pointer to the new registration
- * structure (i.e. the current stack pointer) at fs:0.
- */
-#define __try1(pHandler) \
- __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
-
-
-/*
- * A macro which (dispite its name) *removes* an installed
- * exception handler. Should be used only in conjunction with the above
- * install routine __try1.
- * Move the pointer to the old reg. struct (at the current stack
- * position) to fs:0, replacing the pointer we installed above,
- * then add 8 to the stack pointer to get rid of the space we
- * used when we pushed on our new reg. struct above. Notice that
- * the stack must be in the exact state at this point that it was
- * after we did _try1 or this will smash things.
- */
-#define __except1 \
- __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
- : : : "%eax");
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not strict ANSI */
-
-#endif /* _EXCPT_H_ not defined */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: ekohl $
- * $Date: 2001/06/15 18:32:25 $
- *
- */
-/* 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 <crtdll/io.h>
-
-/*
- * This variable determines the default file mode.
- * TODO: Which flags work?
- */
-#if 0
-#if __MSVCRT__
-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;
-extern unsigned int _fmode;
-
-
-/* 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_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. */
-
-/* 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
-
-#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
- * WARNING: Even if not created by _open! */
-
-
-#define _O_RANDOM 0x0010
-#define _O_SEQUENTIAL _O_RANDOM
-#define _O_SHORT_LIVED 0x1000
-
-#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_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 nHandle, int nAccessMode);
-
-#ifndef _NO_OLDNAMES
-int setmode (int nHandle, int nAccessMode);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not __STRICT_ANSI__ */
-#endif /* Not _FCNTL_H_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.5 $
- * $Author: ariadne $
- * $Date: 1999/04/23 18:43:00 $
- *
- */
-
-#ifndef _FLOAT_H_
-#define _FLOAT_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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
-
-
-/* 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
-
-void _fpreset (void); /* Reset the FPU */
-
-/* Global 'variable' for the current floating point error code. */
-int * __fpecode(void);
-#define _fpecode (*(__fpecode()))
-
-/*
- * IEEE recommended functions
- */
-
-double _chgsign (double x);
-double _copysign (double dTo, double dFrom);
-double _logb (double x);
-double _nextafter (double x, double y);
-double _scalb (double x, long n);
-
-/* 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 */
-
-int _finite (double x);
-int _fpclass (double x);
-int _isnan (double x);
-int _isinf (double x); // not exported
-
-int _isnanl (long double x); // not exported
-int _isinfl (long double x); // not exported
-
-#define isnan(x) _isnan(x)
-#define isinf(x) _isinf(x)
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FLOAT_H_ */
+++ /dev/null
-/* 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__ */
+++ /dev/null
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-
-#ifndef __dj_include_libc_file_h__
-#define __dj_include_libc_file_h__
-
-#include <crtdll/stdio.h>
-#include <crtdll/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 *f);
-
-int __set_errno(int err);
-void *filehnd(int fn);
-
-char __is_text_file(FILE *p);
-
-int __fileno_alloc(void *hFile, int mode);
-
-int _doprnt(const char *fmt, va_list args, FILE *f);
-int _doscan(FILE *iop, const char *fmt, va_list argp);
-
-
-int __fileno_dup2( int handle1, int handle2 );
-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;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __dj_include_libc_file_h__ */
-
-
-
+++ /dev/null
-#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
+++ /dev/null
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)quad.h 8.1 (Berkeley) 6/4/93
- * $Id: quad.h,v 1.3 1999/05/09 14:00:05 ariadne Exp $
- */
-
-/*
- * Quad arithmetic.
- *
- * This library makes the following assumptions:
- *
- * - The type long long (aka quad_t) exists.
- *
- * - A quad variable is exactly twice as long as `long'.
- *
- * - The machine's arithmetic is two's complement.
- *
- * This library can provide 128-bit arithmetic on a machine with 128-bit
- * quads and 64-bit longs, for instance, or 96-bit arithmetic on machines
- * with 48-bit longs.
- */
-#include <windows.h>
-//#include <ddk/li.h>
-
-
-typedef unsigned long long u_quad_t; /* quads */
-typedef long long quad_t;
-typedef unsigned long u_long;
-
-
-
-/*
- * Define the order of 32-bit words in 64-bit words.
- */
-#define _QUAD_HIGHWORD 1
-#define _QUAD_LOWWORD 0
-
-//#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <limits.h>
-
-/*
- * Depending on the desired operation, we view a `long long' (aka quad_t) in
- * one or more of the following formats.
- */
-union uu {
- quad_t q; /* as a (signed) quad */
- quad_t uq; /* as an unsigned quad */
- long sl[2]; /* as two signed longs */
- u_long ul[2]; /* as two unsigned longs */
-};
-
-/*
- * Define high and low longwords.
- */
-#define H _QUAD_HIGHWORD
-#define L _QUAD_LOWWORD
-
-/*
- * Total number of bits in a quad_t and in the pieces that make it up.
- * These are used for shifting, and also below for halfword extraction
- * and assembly.
- */
-#define QUAD_BITS (sizeof(quad_t) * CHAR_BIT)
-#define LONG_BITS (sizeof(long) * CHAR_BIT)
-#define HALF_BITS (sizeof(long) * CHAR_BIT / 2)
-
-/*
- * Extract high and low shortwords from longword, and move low shortword of
- * longword to upper half of long, i.e., produce the upper longword of
- * ((quad_t)(x) << (number_of_bits_in_long/2)). (`x' must actually be u_long.)
- *
- * These are used in the multiply code, to split a longword into upper
- * and lower halves, and to reassemble a product as a quad_t, shifted left
- * (sizeof(long)*CHAR_BIT/2).
- */
-#define HHALF(x) ((x) >> HALF_BITS)
-#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1))
-#define LHUP(x) ((x) << HALF_BITS)
-
-quad_t __divdi3(quad_t a, quad_t b);
-quad_t __moddi3(quad_t a, quad_t b);
-u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem);
-u_quad_t __udivdi3(u_quad_t a, u_quad_t b);
-u_quad_t __umoddi3(u_quad_t a, u_quad_t b);
-
-/*
- * XXX
- * Compensate for gcc 1 vs gcc 2. Gcc 1 defines ?sh?di3's second argument
- * as u_quad_t, while gcc 2 correctly uses int. Unfortunately, we still use
- * both compilers.
- */
-#if __GNUC__ >= 2
-typedef unsigned int qshift_t;
-#else
-typedef u_quad_t qshift_t;
-#endif
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.3 $
- * $Author: ariadne $
- * $Date: 1999/04/02 21:42:06 $
- *
- */
-/* Appropriated for Reactos Crtdll by Ariadne */
-/* added D_OK */
-/* changed get_osfhandle and open_osfhandle */
-/* added fileno as macro */
-#ifndef _IO_H_
-#define _IO_H_
-
-#ifndef __STRICT_ANSI__
-
-#include <crtdll/sys/types.h>
-
-#include <crtdll/sys/stat.h>
-
-
-/* We need the definition of FILE anyway... */
-#include <crtdll/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 <crtdll/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* szFileName, int nAccessMode);
-int _chsize (int nHandle, long lnNewSize);
-int _close (int nHandle);
-int _commit(int _fd);
-int _creat (const char* szFileName, int nAccessMode);
-int _dup (int nHandle);
-int _dup2 (int nOldHandle, int nNewHandle);
-long _filelength (int nHandle);
-int _fileno (FILE* fileGetHandle);
-void* _get_osfhandle (int nHandle);
-int _isatty (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 nHandle);
-#endif
-
-/* LK_... locking commands defined in sys/locking.h. */
-int _locking (int nHandle, int nCmd, long lnLockRegionLength);
-
-off_t _lseek(int _fd, off_t _offset, int _whence);
-int _open (const char* szFileName, int nFlags, ...);
-int _open_osfhandle (void *lnOSHandle, int nFlags);
-int _pipe (int *naHandles, unsigned int unSize, int nMode);
-size_t _read(int _fd, void *_buf, size_t _nbyte);
-
-/* SH_... flags for nFlag defined in share.h */
-int _sopen (char* szFileName, int nAccess, int nFlag, int nMode);
-
-long _tell (int nHandle);
-unsigned _umask (unsigned unMode);
-int _unlink (const char* szFileName);
-size_t _write(int _fd, const void *_buf, size_t _nbyte);
-
-#ifndef _NO_OLDNAMES
-/*
- * Non-underscored versions of non-ANSI functions to improve portability.
- * These functions live in libmoldname.a.
- */
-
-#define access _access
-#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 /* Not strict ANSI */
-
-#endif /* _IO_H_ not defined */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.2 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef _LOCALE_H_
-#define _LOCALE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * 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
-
-/*
- * 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;
-};
-
-char* setlocale (int nCategory, const char* locale);
-struct lconv* localeconv (void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.2 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _MALLOC_H_
-#define _MALLOC_H_
-
-#include <crtdll/alloc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void * _expand( void *memblock, size_t size );
-int _heapchk (void); /* Verify heap integrety. */
-int _heapmin (void); /* Return unused heap to the OS. */
-int _heapset (unsigned int unFill);
-size_t _msize (void* pBlock);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _MALLOC_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.6 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-// added modfl
-
-#ifndef _MATH_H_
-#define _MATH_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.
- */
-#if __MSVCRT__
-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);
-
-#ifndef _NO_OLDNAMES
-
-/*
- * Non-underscored versions of non-ANSI functions. These reside in
- * liboldnames.a. Provided for extra portability.
- */
-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 _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _MATH_H_ */
-
+++ /dev/null
-#ifndef _MBCTYPE_H
-#define _MBCTYPE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//#define _MS 0x01
-//#define _MP 0x02
-//#define _M1 0x04
-//#define _M2 0x08
-
-#define _MBC_SINGLE 0
-#define _MBC_LEAD 1
-#define _MBC_TRAIL 2
-#define _MBC_ILLEGAL -1
-
-#define _MB_CP_SBCS 0
-#define _MB_CP_OEM -2
-#define _MB_CP_ANSI -3
-#define _MB_CP_LOCALE -4
-
-#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)
-
-extern char _jctype[257];
-
-
-int _ismbbkalnum( unsigned int c );
-int _ismbbkana( unsigned char c );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-#ifndef _MBSTRING_H_
-#define _MBSTRING_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <crtdll/stddef.h>
-
-size_t _mbstrlen(const char *str);
-
-
-
-
-int _mbbtype(unsigned char c, int type);
-int _mbsbtype( const unsigned char *str, size_t n );
-
-unsigned int _mbbtombc(unsigned int c);
-unsigned int _mbctombb(unsigned int c);
-
-unsigned char * _mbscat(unsigned char *dst, const unsigned char *src);
-unsigned char * _mbschr(unsigned char *str, unsigned char* c);
-int _mbscmp(const unsigned char *, const unsigned char *);
-int _mbscoll(const unsigned char *, const unsigned char *);
-unsigned char * _mbscpy(unsigned char *, const unsigned char *);
-size_t _mbscspn(const unsigned char *, const unsigned char *);
-unsigned char * _mbsdup(const unsigned char *str);
-int _mbsicmp(const unsigned char *, const unsigned char *);
-int _mbsicoll(const unsigned char *, const unsigned char *);
-size_t _mbslen(const unsigned char *str);
-
-unsigned char * _mbsncat(unsigned char *, const unsigned char *, size_t);
-unsigned char * _mbsnbcat(unsigned char *, const unsigned char *, size_t);
-
-
-int _mbsncmp(const unsigned char *, const unsigned char *, size_t);
-int _mbsnbcmp(const unsigned char *, const unsigned char *, size_t);
-
-int _mbsncoll(const unsigned char *, const unsigned char *, size_t);
-int _mbsnbcoll(const unsigned char *, const unsigned char *, size_t);
-
-
-unsigned char * _mbsncpy(unsigned char *, const unsigned char *, size_t);
-unsigned char * _mbsnbcpy(unsigned char *, const unsigned char *, size_t);
-
-int _mbsnicmp(const unsigned char *, const unsigned char *, size_t);
-int _mbsnbicmp(const unsigned char *, const unsigned char *, size_t);
-
-int _mbsnicoll(const unsigned char *, const unsigned char *, size_t);
-int _mbsnbicoll(const unsigned char *, const unsigned char *, size_t);
-
-unsigned char * _mbsnset(unsigned char *, unsigned int, size_t);
-unsigned char * _mbsnbset(unsigned char *, unsigned int, size_t);
-
-size_t _mbsnccnt(const unsigned char *, size_t);
-
-
-unsigned char * _mbspbrk(const unsigned char *, const unsigned char *);
-unsigned char * _mbsrchr(const unsigned char *, unsigned int);
-unsigned char * _mbsrev(unsigned char *);
-unsigned char * _mbsset(unsigned char *, unsigned int);
-size_t _mbsspn(const unsigned char *, const unsigned char *);
-
-unsigned char * _mbsstr(const unsigned char *, const unsigned char *);
-unsigned char * _mbstok(unsigned char *, unsigned char *);
-
-unsigned char * _mbslwr(unsigned char *str);
-unsigned char * _mbsupr(unsigned char *str);
-
-size_t _mbclen(const unsigned char *);
-void _mbccpy(unsigned char *, const unsigned char *);
-
-/* tchar routines */
-
-unsigned char * _mbsdec(const unsigned char *, const unsigned char *);
-unsigned char * _mbsinc(const unsigned char *);
-size_t _mbsnbcnt(const unsigned char *, size_t);
-unsigned int _mbsnextc (const unsigned char *);
-unsigned char * _mbsninc(const unsigned char *, size_t);
-unsigned char * _mbsspnp(const unsigned char *, const unsigned char *);
-
-/* character routines */
-
-int _ismbcalnum(unsigned int c);
-int _ismbcalpha(unsigned int c);
-int _ismbcdigit(unsigned int c);
-int _ismbcgraph(unsigned int c);
-int _ismbclegal(unsigned int c);
-int _ismbclower(unsigned int c);
-int _ismbcprint(unsigned int c);
-int _ismbcpunct(unsigned int c);
-int _ismbcspace(unsigned int c);
-int _ismbcupper(unsigned int c);
-
-unsigned int _mbctolower(unsigned int);
-unsigned int _mbctoupper(unsigned int);
-
-
-int _ismbblead( unsigned int c);
-int _ismbbtrail( unsigned int c);
-int _ismbslead( const unsigned char *s, const unsigned char *c);
-int _ismbstrail( const unsigned char *s, const unsigned char *c);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.3 $
- * $Author: ariadne $
- * $Date: 1999/04/02 21:42:06 $
- *
- */
-/* Appropriated for Reactos Crtdll by Ariadne */
-/* changed second argument of cwait from nPID to hProc */
-
-#ifndef _PROCESS_H_
-#define _PROCESS_H_
-
-#ifndef __STRICT_ANSI__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void _cexit(void);
-void _c_exit(void);
-
-/*
- * 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 */
-
-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);
-
-
-/*
- * 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 */
-
-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 (*pfuncStart)(void *),
- unsigned unStackSize, void* pArgList);
-void _endthread (void);
-
-#if __MSVCRT__
-unsigned long
- _beginthreadex (void *pSecurity, unsigned unStackSize,
- unsigned (*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 /* Not __STRICT_ANSI__ */
-
-#endif /* _PROCESS_H_ not defined */
+++ /dev/null
-
-#ifndef _SEARCH_H_
-#define _SEARCH_H_
-
-//char *key
-//void *data
-
-//enum { FIND, ENTER } ACTION;
-//enum { preorder, postorder, endorder, leaf } VISIT;
-
-#include <crtdll/stddef.h>
-#include <crtdll/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
+++ /dev/null
-/*
-** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
-**
-** This file is distributed under the terms listed in the document
-** "copying.dj", available from DJ Delorie at the address above.
-** A copy of "copying.dj" should accompany this file; if not, a copy
-** should be available from where this file was obtained. This file
-** may not be distributed without a verbatim copy of "copying.dj".
-**
-** This file is distributed WITHOUT ANY WARRANTY; without even the implied
-** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _SETJMP_H_
-#define _SETJMP_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
- unsigned long eax;
- unsigned long ebx;
- unsigned long ecx;
- unsigned long edx;
- unsigned long esi;
- unsigned long edi;
- unsigned long ebp;
- unsigned long esp;
- unsigned long eip;
- unsigned short es;
- unsigned short fs;
- unsigned short gs;
- unsigned short ss;
-} jmp_buf[1];
-
-extern int _setjmp(jmp_buf);
-extern void longjmp(jmp_buf, int);
-
-#define setjmp(jmp_buf) _setjmp(jmp_buf)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
\ No newline at end of file
+++ /dev/null
-#ifndef _include_share_h_
-#define _include_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
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.3 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-/* added some extra signal constants */
-#ifndef _SIGNAL_H_
-#define _SIGNAL_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * 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 nSig);
-
-/*
- * 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)
-
-/*
- * 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
-
-/*
- * 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 sig);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.2 $
- * $Author: rex $
- * $Date: 1999/03/19 05:55:09 $
- *
- */
-/* 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.
- */
-#define va_start(ap, pN) \
- ((ap) = ((va_list) __builtin_next_arg(pN)))
-#else
-/*
- * For a simple minded compiler this should work (it works in GNU too for
- * vararg lists that don't follow shorts and such).
- */
-#define va_start(ap, pN) \
- ((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
-#endif
-
-
-/*
- * End processing of variable argument list. In this case we do nothing.
- */
-#define va_end(ap) ((void)0)
-
-
-/*
- * 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.
- */
-
-#define va_arg(ap, t) \
- (((ap) = (ap) + __va_argsiz(t)), \
- *((t*) (void*) ((ap) - __va_argsiz(t))))
-
-#endif /* Not RC_INVOKED */
-
-#endif /* not _STDARG_H_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: dwelch $
- * $Date: 2001/02/19 15:04:50 $
- *
- */
-
-
-#ifndef __CRTDLL_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 __CRTDLL_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 CRTDLL 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 (__CRTDLL_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 /* __CRTDLL_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 (__CRTDLL_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 /* __CRTDLL_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 (__CRTDLL_STDDEF_H_) || defined (__need_wchar_t)
-
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#define _WCHAR_T
-#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 /* __CRTDLL_STDDEF_H_ or __need_wchar_t. */
-
-/*
- * wint_t, the equivalent of int in wchar ctype functions.
- */
-#if defined (__CRTDLL_STDDEF_H_) || defined (__need_wint_t)
-
-#ifndef _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 /* __CRTDLL_STDDEF_H_ or __need_wint_t. */
-
-
-/*
- * A null pointer constant.
- */
-
-#if defined (__CRTDLL_STDDEF_H_) || defined (__need_NULL)
-
-#undef NULL
-#define NULL (0)
-#endif /* __CRTDLL_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 (__CRTDLL_STDDEF_H_)
-#define offsetof(TYPE, MEMBER) ((size_t) &( ((TYPE *) 0)->MEMBER ))
-#endif /* __CRTDLL_STDDEF_H_ */
-
-
-#endif /* not __CRTDLL__CRTDLL_STDDEF_H_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.13 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-/* 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 <crtdll/stddef.h>
-
-
-/* Some flags for the iobuf structure provided by djgpp stdio.h */
-#define _IOREAD 0x000010
-#define _IOWRT 0x000020
-#define _IOMYBUF 0x000040
-
-#define _IOEOF 0x000100
-#define _IOERR 0x000200
-#define _IOSTRG 0x000400
-
-#define _IOBINARY 0x000800
-#define _IOTEXT 0x000000
-
-#define _IOAPPEND 0x002000
-#define _IORMONCL 0x004000 /* remove on close, for temp files */
-/* if _flag & _IORMONCL, ._name_to_remove needs freeing */
-#define _IOUNGETC 0x010000 /* there is an ungetc'ed character in the buffer */
-#define _IOCOMMIT 0x008000
-
-#define _IODIRTY 0x000080
-#define _IOAHEAD 0x000008
-#define _IORW (_IOREAD | _IOWRITE )
-
-
-/*
- * 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 <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);
-
-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);
-
-#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 0 /* fully buffered */
-#define _IOLBF 1 /* line buffered */
-#define _IONBF 2 /* unbuffered */
-
-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);
-
-#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 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);
-
-/* 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
-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);
-int putwc (wchar_t wc, FILE* fileWrite);
-int putws (const wchar_t* wsOutput);
-#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?
- */
-typedef 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
-
-#define clearerr(f) (((f)->_flag) &= ~(_IOERR|_IOEOF))
-#define feof(f) (((f)->_flag&_IOEOF)!=0)
-#define ferror(f) (((f)->_flag&_IOERR)!=0)
-#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_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.4 $
- * $Author: ariadne $
- * $Date: 1999/04/14 07:10:15 $
- *
- */
-/* 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_
-
-#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)
-
-
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#include <crtdll/stddef.h>
-
-#include <crtdll/mbstring.h>
-
-#ifndef __ATTRIB_NORETURN
-#ifdef __GNUC__
-#define _ATTRIB_NORETURN __attribute__ ((noreturn))
-#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);
-
-
-/*
- * RAND_MAX is the maximum value that may be returned by rand.
- * The minimum is zero.
- */
-#define RAND_MAX 0x7FFF
-
-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);
-
-/* These values may be used as exit status codes. */
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE -1
-
-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
-
-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;
-typedef struct { long long quot, rem; } lldiv_t;
-
-div_t div (int nNumerator, int nDenominator);
-ldiv_t ldiv (long lNumerator, long lDenominator);
-lldiv_t lldiv (long long lNumerator, long long lDenominator);
-
-
-#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* szNameEqValue);
-void _searchenv (const char* szFileName, const char* szVar,
- char* szFullPathBuf);
-
-void _splitpath( const char *path, char *drive, char *dir,
- char *fname, char *ext );
-
-char* _itoa (int nValue, char* sz, int nRadix);
-char* _ltoa (long lnValue, char* sz, int nRadix);
-
-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
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _STDLIB_H_ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.5 $
- * $Author: chorns $
- * $Date: 2001/09/23 22:14:02 $
- *
- */
-/* 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_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define size_t, wchar_t and NULL
- */
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#include <crtdll/stddef.h>
-
-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);
-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);
-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);
-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 */
-
-#endif
-
-#ifdef __cplusplus
-}; /* extern "c" */
-#endif
+++ /dev/null
-/*
- * This file is part of the Mingw32 package.
- *
- * This fcntl.h maps to the root fcntl.h
- */
-#ifndef __STRICT_ANSI__
-#include <crtdll/fcntl.h>
-#endif
+++ /dev/null
-/*
- * This file is part of the Mingw32 package.
- *
- * This file.h maps to the root fcntl.h
- * TODO?
- */
-#ifndef __STRICT_ANSI__
-#include <crtdll/fcntl.h>
-#endif
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.2 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _LOCKING_H_
-#define _LOCKING_H_
-
-/*
- * TODO: Define LK_... constants.
- */
-
-#endif /* Not _LOCKING_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.7 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _STAT_H_
-#define _STAT_H_
-
-#include <crtdll/sys/types.h>
-
-
-/*
- * 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
-{
- short 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. */
- int st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- short 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 */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-int _fstat (int nFileNo, struct stat* pstat);
-int _chmod (const char* szPath, int nMode);
-int _stat (const char* szPath, struct stat* pstat);
-
-
-#ifndef _NO_OLDNAMES
-
-#define fstat(nFileNo, pstat) _fstat(nFileNo, pstat)
-#define chmod(szPath,nMode) _chmod(szPath,nMode)
-#define stat(szPath,pstat) _stat(szPath,pstat)
-
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _STAT_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
+++ /dev/null
-
-#include <crtdll/time.h>
-
+++ /dev/null
-/*
- * 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.2 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:57 $
- *
- */
-
-#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* timebBuffer);
-
-#ifndef _NO_OLDNAMES
-void ftime (struct timeb* timebBuffer);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _TIMEB_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
+++ /dev/null
-/*
- * 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.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:57 $
- *
- */
-
-#ifndef _TYPES_H_
-#define _TYPES_H_
-
-#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_ */
+++ /dev/null
-/*
- * This file is part of the Mingw32 package.
- *
- * unistd.h maps (roughly) to io.h
- */
-#ifndef __STRICT_ANSI__
-#include <crtdll/io.h>
-#endif
-
+++ /dev/null
-/*
- * 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.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:57 $
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _UTIME_H_
-#define _UTIME_H_
-
-#define __need_wchar_t
-#define __need_size_t
-#include <crtdll/stddef.h>
-#include <crtdll/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* szFileName, struct _utimbuf* pTimes);
-int _futime (int nHandle, struct _utimbuf *pTimes);
-
-/* The wide character version, only available for MSVCRT versions of the
- * C runtime library. */
-int _wutime (const wchar_t *szFileName, struct _utimbuf *times);
-
-
-#ifndef _NO_OLDNAMES
-int utime (const char* szFileName, struct utimbuf* pTimes);
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _UTIME_H_ */
-#endif /* Not __STRICT_ANSI__ */
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.1 $
- * $Author: ariadne $
- * $Date: 1999/04/02 21:42:06 $
- *
- */
-
-#ifndef _TCHAR_H_
-#define _TCHAR_H_
-
-/*
- * NOTE: This tests _UNICODE, which is different from the UNICODE define
- * used to differentiate Win32 API calls.
- */
-#ifdef _UNICODE
-
-
-/*
- * 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;
-#endif /* Not RC_INVOKED */
-#define _TCHAR_DEFINED
-#endif
-
-
-/*
- * Enclose constant strings and literal characters in the _TEXT and _T macro to make
- * them unicode constant strings when _UNICODE is defined.
- */
-#define _TEXT(x) L ## x
-#define _T(x) L ## x
-
-/*
- * Unicode functions
- */
-
-#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 _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 _tcsftime wcsftime
-
-#else /* Not _UNICODE */
-
-/*
- * TCHAR, the type you should use instead of char.
- */
-#ifndef _TCHAR_DEFINED
-#ifndef RC_INVOKED
-typedef char TCHAR;
-#endif
-#define _TCHAR_DEFINED
-#endif
-
-/*
- * Enclose constant strings and characters in the _TEXT and _T macro.
- */
-#define _TEXT(x) x
-#define _T(x) x
-
-
-/*
- * Non-unicode (standard) functions
- */
-
-#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 _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 _tcsftime strftime
-
-#endif /* Not _UNICODE */
-
-#endif /* Not _TCHAR_H_ */
-
+++ /dev/null
-/*
- * 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.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-/* Appropriated for Reactos Crtdll by Ariadne */
-#ifndef _TIME_H_
-#define _TIME_H_
-
-#define __need_wchar_t
-#define __need_size_t
-#include <crtdll/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 <crtdll/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*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _TIME_H_ */
-
+++ /dev/null
-/*
- * 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.2 $
- * $Author: robd $
- * $Date: 2002/11/24 18:09:56 $
- *
- */
-
-#ifndef _WCHAR_H_
-#define _WCHAR_H_
-
-
-#include <crtdll/ctype.h>
-#include <crtdll/stdio.h>
-#include <crtdll/stdlib.h>
-#include <crtdll/string.h>
-#include <crtdll/time.h>
-
-#endif /* not _WCHAR_H_ */
-
-
-
#ifdef __GNUC__
+//typedef long long LONGLONG;
+//typedef unsigned long long ULONGLONG;
+//typedef long long *PLONGLONG;
+//typedef unsigned long long *PULONGLONG;
#define HAVE_LONGLONG
#define LONGLONG_DEFINED
#define LONGLONG long long
#define ULONGLONG unsigned long long
+#define PLONGLONG long long *
+#define PULONGLONG unsigned long long *
-#else
+#else /*__GNUC__*/
#define LONGLONG_DEFINED
-#define LONGLONG long
-#define ULONGLONG unsigned long
-#define PLONGLONG long*
-#define PULONGLONG unsigned long*
+#define LONGLONG __int64
+#define ULONGLONG unsigned __int64
+#define PLONGLONG __int64*
+#define PULONGLONG unsigned __int64*
#define __attribute__(a)
#define __volatile
+#define inline __inline
+#define __asm__
+#define __volatile__(a)
+#define __attribute__(a)
+struct _KTHREAD { int foobar; };
+struct _ETHREAD { int foobar; };
+struct _EPROCESS { int foobar; };
+
#ifndef _DEBUG
#pragma function(_disable,_enable)
#pragma function(_inp,_inpw,_outp,_outpw)
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
* $Author: robd $
- * $Date: 2002/11/24 18:06:00 $
+ * $Date: 2002/11/25 15:47:52 $
*
*/
/* Appropriated for Reactos Crtdll by Ariadne */
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, ...);
+++ /dev/null
-/*
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision: 1.1 $
- * $Author: robd $
- * $Date: 2002/11/24 18:14:19 $
- *
- */
-
-#ifndef _TCHAR_H_
-#define _TCHAR_H_
-
-/*
- * NOTE: This tests _UNICODE, which is different from the UNICODE define
- * used to differentiate Win32 API calls.
- */
-#ifdef _UNICODE
-
-
-/*
- * 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;
-#endif /* Not RC_INVOKED */
-#define _TCHAR_DEFINED
-#endif
-
-
-/*
- * Enclose constant strings and literal characters in the _TEXT and _T macro to make
- * them unicode constant strings when _UNICODE is defined.
- */
-#define _TEXT(x) L ## x
-#define _T(x) L ## x
-
-/*
- * Unicode functions
- */
-
-#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 _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 _tcsftime wcsftime
-
-#else /* Not _UNICODE */
-
-/*
- * TCHAR, the type you should use instead of char.
- */
-#ifndef _TCHAR_DEFINED
-#ifndef RC_INVOKED
-typedef char TCHAR;
-#endif
-#define _TCHAR_DEFINED
-#endif
-
-/*
- * Enclose constant strings and characters in the _TEXT and _T macro.
- */
-#define _TEXT(x) x
-#define _T(x) x
-
-
-/*
- * Non-unicode (standard) functions
- */
-
-#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 _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 _tcsftime strftime
-
-#endif /* Not _UNICODE */
-
-#endif /* Not _TCHAR_H_ */
-
-/* $Id: rtltypes.h,v 1.2 2002/11/24 18:24:51 robd Exp $
+/* $Id: rtltypes.h,v 1.3 2002/11/25 15:47:52 robd Exp $
*
*/
PULONG Buffer;
} RTL_BITMAP, *PRTL_BITMAP;
+
+#ifdef __GNUC__
+#define STDCALL_FUNC STDCALL
+#else
+#define STDCALL_FUNC(a) (__stdcall a )
+#endif /*__GNUC__*/
+
+
typedef NTSTATUS STDCALL_FUNC
-(*PRTL_QUERY_REGISTRY_ROUTINE)(PWSTR ValueName,
+(*PRTL_QUERY_REGISTRY_ROUTINE) (PWSTR ValueName,
ULONG ValueType,
PVOID ValueData,
ULONG ValueLength,
#include <basetsd.h>
#ifdef __GNUC__
-//#define STDCALL_FUNCPTR(a) STDCALL (* a)
-//#define STDCALL_FUNC(a) (STDCALL a )
#define STDCALL_FUNC STDCALL
#else
-//#define STDCALL_FUNCPTR(a) (STDCALL * a )
#define STDCALL_FUNC(a) (__stdcall a )
#endif /*__GNUC__*/
typedef unsigned short *PWCH;
typedef unsigned short *PWORD;
-#ifdef __GNUC__
-//typedef long long LONGLONG;
-//typedef unsigned long long ULONGLONG;
-//typedef long long *PLONGLONG;
-//typedef unsigned long long *PULONGLONG;
-#define LONGLONG long long
-#define ULONGLONG unsigned long long
-#define PLONGLONG long long *
-#define PULONGLONG unsigned long long *
-#else
-//typedef double LONGLONG;
-//typedef double ULONGLONG;
-//typedef double *PLONGLONG;
-//typedef double *PULONGLONG;
-#include <msvcrt\crttypes.h>
-#define inline __inline
-#define __asm__
-#define __volatile__(a)
-#define __attribute__(a)
-struct _KTHREAD { int foobar; };
-struct _ETHREAD { int foobar; };
-struct _EPROCESS { int foobar; };
-#endif
+#include <msvcrt\crttypes.h> // for definition of LONGLONG, PLONGLONG etc
typedef const void *LPCVOID;
typedef BYTE *LPBYTE, *PBYTE;