Unified · Split
| @@ -177,7 +177,7 @@ VPATH+=lib · 176 unmodified lines | ||
| 177 | 177 | ifdef CONFIG_WIN32 |
| 178 | 178 | # for windows, we must use TCC because we generate ELF objects |
| 179 | 179 | LIBTCC1_OBJS+=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o |
| 180 | −LIBTCC1_CC=./tcc.exe -Bwin32 -DTCC_TARGET_PE | |
| 180 | +LIBTCC1_CC=./tcc.exe -Bwin32 -Iinclude $(NATIVE_TARGET) | |
| 181 | 181 | VPATH+=win32/lib |
| 182 | 182 | endif |
| 183 | 183 | ifeq ($(ARCH),i386) |
| @@ -245,7 +245,7 @@ install: $(PROGS) $(LIBTCC1) libtcc.a tcc-doc.html · 61 unmodified lines | ||
| 245 | 245 | $(INSTALL) -m644 $(LIBTCC1) win32/lib/*.def "$(tccdir)/lib" |
| 246 | 246 | cp -r win32/include/. "$(tccdir)/include" |
| 247 | 247 | cp -r win32/examples/. "$(tccdir)/examples" |
| 248 | −# $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include" | |
| 248 | + $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include" | |
| 249 | 249 | $(INSTALL) -m644 tcc-doc.html win32/tcc-win32.txt "$(tccdir)/doc" |
| 250 | 250 | $(INSTALL) -m644 libtcc.a libtcc.h "$(tccdir)/libtcc" |
| 251 | 251 | endif |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _STDARG_H |
| 3 | 3 | |
| 4 | 4 | #ifdef __x86_64__ |
| 5 | +#ifndef _WIN64 | |
| 5 | 6 | #include <stdlib.h> |
| 6 | 7 | |
| 7 | 8 | /* GCC compatible definition of va_list. */ |
| @@ -48,16 +49,21 @@ typedef struct __va_list_struct *va_list; · 40 unmodified lines | ||
| 48 | 49 | *(dest) = *(src)) |
| 49 | 50 | #define va_end(ap) __builtin_free(ap) |
| 50 | 51 | |
| 51 | −#else | |
| 52 | − | |
| 52 | +#else /* _WIN64 */ | |
| 53 | 53 | typedef char *va_list; |
| 54 | +#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7) | |
| 55 | +#define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7))) | |
| 56 | +#define va_copy(dest, src) (dest) = (src) | |
| 57 | +#define va_end(ap) | |
| 58 | +#endif | |
| 54 | 59 | |
| 60 | +#else /* __i386__ */ | |
| 61 | +typedef char *va_list; | |
| 55 | 62 | /* only correct for i386 */ |
| 56 | 63 | #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3) |
| 57 | 64 | #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3))) |
| 58 | 65 | #define va_copy(dest, src) (dest) = (src) |
| 59 | 66 | #define va_end(ap) |
| 60 | − | |
| 61 | 67 | #endif |
| 62 | 68 | |
| 63 | 69 | /* fix a buggy dependency on GCC in libio.h */ |
| @@ -1,11 +1,12 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | #ifndef _VARARGS_H |
| 2 | 7 | #define _VARARGS_H |
| 3 | 8 | |
| 4 | −#include <stdarg.h> | |
| 5 | − | |
| 6 | −#define va_dcl | |
| 7 | −#define va_alist __va_alist | |
| 8 | −#undef va_start | |
| 9 | −#define va_start(ap) ap = __builtin_varargs_start | |
| 9 | +#error "TinyCC no longer implements <varargs.h>." | |
| 10 | +#error "Revise your code to use <stdarg.h>." | |
| 10 | 11 | |
| 11 | 12 | #endif |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | /* |
| 2 | 2 | * _mingw.h |
| 3 | 3 | * |
| 4 | − * This file is for TCC-PE and not part of the Mingw32 package. | |
| 4 | + * This file is for TinyCC and not part of the Mingw32 package. | |
| 5 | 5 | * |
| 6 | 6 | * THIS SOFTWARE IS NOT COPYRIGHTED |
| 7 | 7 | * |
| @@ -24,25 +24,75 @@ · 16 unmodified lines | ||
| 24 | 24 | #define __int32 long |
| 25 | 25 | #define __int16 short |
| 26 | 26 | #define __int8 char |
| 27 | + | |
| 27 | 28 | #define __cdecl __attribute__((__cdecl__)) |
| 28 | −#define __stdcall __attribute__((__stdcall__)) | |
| 29 | 29 | #define __declspec(x) __attribute__((x)) |
| 30 | +#define __fastcall | |
| 31 | + | |
| 32 | +// #define __MINGW_IMPORT extern __declspec(dllimport) | |
| 30 | 33 | |
| 31 | −#define __MINGW32_VERSION 2.0 | |
| 32 | −#define __MINGW32_MAJOR_VERSION 2 | |
| 33 | −#define __MINGW32_MINOR_VERSION 0 | |
| 34 | +#undef _MSVCRT_ | |
| 35 | +#undef __MINGW_IMPORT | |
| 34 | 36 | |
| 35 | −#define __MSVCRT__ 1 | |
| 36 | −#define __MINGW_IMPORT extern | |
| 37 | −#define _CRTIMP | |
| 37 | +#define _CRTIMP extern | |
| 38 | 38 | #define __CRT_INLINE extern __inline__ |
| 39 | +#define __MINGW_NOTHROW | |
| 40 | +#define __MINGW_ATTRIB_NORETURN | |
| 41 | +#define __MINGW_ATTRIB_DEPRECATED | |
| 42 | +#define __GNUC_VA_LIST | |
| 43 | + | |
| 44 | +#define _CONST_RETURN | |
| 45 | +#define _CRT_ALIGN(x) __attribute__((aligned(x))) | |
| 46 | +#define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) | |
| 47 | + | |
| 48 | +#define __CRT_STRINGIZE(_Value) #_Value | |
| 49 | +#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value) | |
| 39 | 50 | |
| 51 | +#define __CRT_WIDE(_String) L ## _String | |
| 52 | +#define _CRT_WIDE(_String) __CRT_WIDE(_String) | |
| 53 | + | |
| 54 | +#ifdef _WIN64 | |
| 55 | +typedef __int64 intptr_t; | |
| 56 | +typedef unsigned __int64 uintptr_t; | |
| 57 | +#define __stdcall | |
| 58 | +#define _AMD64_ 1 | |
| 59 | +#define __x86_64 1 | |
| 60 | +#else | |
| 61 | +typedef __int32 intptr_t; | |
| 62 | +typedef unsigned __int32 uintptr_t; | |
| 63 | +#define __stdcall __attribute__((__stdcall__)) | |
| 64 | +#define _X86_ 1 | |
| 40 | 65 | #define WIN32 1 |
| 66 | +#endif | |
| 41 | 67 | |
| 42 | −#ifndef _WINT_T | |
| 43 | −#define _WINT_T | |
| 44 | −typedef unsigned int wint_t; | |
| 68 | +#define _INTEGRAL_MAX_BITS 64 | |
| 69 | +#define _CRT_PACKING 8 | |
| 70 | + | |
| 71 | +typedef long __time32_t; | |
| 72 | +#define _TIME32_T_DEFINED | |
| 73 | +typedef __int64 __time64_t; | |
| 74 | +#define _TIME64_T_DEFINED | |
| 75 | + | |
| 76 | +#ifdef _USE_32BIT_TIME_T | |
| 77 | +#ifdef _WIN64 | |
| 78 | +#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 | |
| 79 | +#endif | |
| 80 | +typedef __time32_t time_t; | |
| 81 | +#else | |
| 82 | +typedef __time64_t time_t; | |
| 45 | 83 | #endif |
| 84 | +#define _TIME_T_DEFINED | |
| 85 | + | |
| 86 | +#define _WCTYPE_T_DEFINED | |
| 87 | +typedef unsigned int wint_t; | |
| 88 | +typedef unsigned short wctype_t; | |
| 89 | + | |
| 90 | +#define _ERRCODE_DEFINED | |
| 91 | +typedef int errno_t; | |
| 92 | + | |
| 93 | +typedef struct threadlocaleinfostruct *pthreadlocinfo; | |
| 94 | +typedef struct threadmbcinfostruct *pthreadmbcinfo; | |
| 95 | +typedef struct localeinfo_struct _locale_tstruct,*_locale_t; | |
| 46 | 96 | |
| 47 | 97 | /* for winapi */ |
| 48 | 98 | #define _ANONYMOUS_UNION |
| @@ -50,5 +100,17 @@ typedef unsigned int wint_t; · 1 unmodified line | ||
| 50 | 100 | #define DECLSPEC_NORETURN |
| 51 | 101 | #define WIN32_LEAN_AND_MEAN |
| 52 | 102 | #define DECLARE_STDCALL_P(type) __stdcall type |
| 103 | +#define NOSERVICE 1 | |
| 104 | +#define NOMCX 1 | |
| 105 | +#define NOIME 1 | |
| 106 | +#ifndef WINVER | |
| 107 | +#define WINVER 0x0502 | |
| 108 | +#endif | |
| 109 | +#ifndef _WIN32_WINNT | |
| 110 | +#define _WIN32_WINNT 0x502 | |
| 111 | +#endif | |
| 112 | + | |
| 113 | +/* get va_list */ | |
| 114 | +#include <stdarg.h> | |
| 53 | 115 | |
| 54 | 116 | #endif /* __MINGW_H */ |
| @@ -1,71 +1,54 @@ | ||
| 1 | −/* | |
| 2 | − * assert.h | |
| 3 | − * | |
| 4 | − * Define the assert macro for debug output. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef __ASSERT_H_ | |
| 7 | +#define __ASSERT_H_ | |
| 26 | 8 | |
| 27 | −#ifndef _ASSERT_H_ | |
| 28 | −#define _ASSERT_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | − | |
| 33 | −#ifndef RC_INVOKED | |
| 34 | − | |
| 35 | −#ifdef __cplusplus | |
| 36 | −extern "C" { | |
| 10 | +#ifdef __cplusplus | |
| 11 | +#include <stdlib.h> | |
| 37 | 12 | #endif |
| 38 | 13 | |
| 39 | 14 | #ifdef NDEBUG |
| 15 | +#ifndef assert | |
| 16 | +#define assert(_Expression) ((void)0) | |
| 17 | +#endif | |
| 18 | +#else | |
| 19 | + | |
| 20 | +#ifndef _CRT_TERMINATE_DEFINED | |
| 21 | +#define _CRT_TERMINATE_DEFINED | |
| 22 | + void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 23 | + _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 24 | +#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ | |
| 25 | +/* C99 function name */ | |
| 26 | +void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN; | |
| 27 | +__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status) | |
| 28 | +{ _exit(status); } | |
| 29 | +#endif | |
| 40 | 30 | |
| 41 | −/* | |
| 42 | − * If not debugging, assert does nothing. | |
| 43 | − */ | |
| 44 | −#define assert(x) ((void)0) | |
| 31 | +#pragma push_macro("abort") | |
| 32 | +#undef abort | |
| 33 | + void __cdecl __declspec(noreturn) abort(void); | |
| 34 | +#pragma pop_macro("abort") | |
| 45 | 35 | |
| 46 | −#else /* debugging enabled */ | |
| 36 | +#endif | |
| 47 | 37 | |
| 48 | −/* | |
| 49 | − * CRTDLL nicely supplies a function which does the actual output and | |
| 50 | − * call to abort. | |
| 51 | − */ | |
| 52 | −void _assert (const char*, const char*, int) | |
| 53 | −#ifdef __GNUC__ | |
| 54 | − __attribute__ ((noreturn)) | |
| 38 | +#ifdef __cplusplus | |
| 39 | +extern "C" { | |
| 55 | 40 | #endif |
| 56 | − ; | |
| 57 | 41 | |
| 58 | −/* | |
| 59 | − * Definition of the assert macro. | |
| 60 | − */ | |
| 61 | −#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__)) | |
| 62 | −#endif /* NDEBUG */ | |
| 42 | +extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line); | |
| 63 | 43 | |
| 64 | −#ifdef __cplusplus | |
| 44 | +#ifdef __cplusplus | |
| 65 | 45 | } |
| 66 | 46 | #endif |
| 67 | 47 | |
| 68 | −#endif /* Not RC_INVOKED */ | |
| 48 | +#ifndef assert | |
| 49 | +#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0)) | |
| 50 | +#endif | |
| 69 | 51 | |
| 70 | −#endif /* Not _ASSERT_H_ */ | |
| 52 | +#endif | |
| 71 | 53 | |
| 54 | +#endif | |
| @@ -1,159 +1,409 @@ | ||
| 1 | −/* A conio implementation for Mingw/Dev-C++. | |
| 2 | − * | |
| 3 | − * Written by: | |
| 4 | − * Hongli Lai <hongli@telekabel.nl> | |
| 5 | − * tkorrovi <tkorrovi@altavista.net> on 2002/02/26. | |
| 6 | − * Andrew Westcott <ajwestco@users.sourceforge.net> | |
| 7 | − * | |
| 8 | − * Offered for use in the public domain without any warranty. | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 9 | 5 | */ |
| 6 | +#ifndef _INC_CONIO | |
| 7 | +#define _INC_CONIO | |
| 10 | 8 | |
| 11 | −#ifndef _CONIO_H_ | |
| 12 | −#define _CONIO_H_ | |
| 13 | − | |
| 14 | − | |
| 15 | −#include <stdio.h> | |
| 9 | +#include <_mingw.h> | |
| 16 | 10 | |
| 17 | 11 | #ifdef __cplusplus |
| 18 | 12 | extern "C" { |
| 19 | 13 | #endif |
| 20 | 14 | |
| 21 | −#define BLINK 0 | |
| 22 | − | |
| 23 | −typedef enum | |
| 24 | −{ | |
| 25 | − BLACK, | |
| 26 | − BLUE, | |
| 27 | − GREEN, | |
| 28 | − CYAN, | |
| 29 | − RED, | |
| 30 | − MAGENTA, | |
| 31 | − BROWN, | |
| 32 | − LIGHTGRAY, | |
| 33 | − DARKGRAY, | |
| 34 | − LIGHTBLUE, | |
| 35 | − LIGHTGREEN, | |
| 36 | − LIGHTCYAN, | |
| 37 | − LIGHTRED, | |
| 38 | − LIGHTMAGENTA, | |
| 39 | − YELLOW, | |
| 40 | − WHITE | |
| 41 | −} COLORS; | |
| 42 | − | |
| 43 | − | |
| 44 | −#define cgets _cgets | |
| 45 | −#define cprintf _cprintf | |
| 46 | −#define cputs _cputs | |
| 47 | −#define cscanf _cscanf | |
| 48 | −#define ScreenClear clrscr | |
| 49 | − | |
| 50 | −/* blinkvideo */ | |
| 51 | − | |
| 52 | −void clreol (void); | |
| 53 | −void clrscr (void); | |
| 54 | − | |
| 55 | −int _conio_gettext (int left, int top, int right, int bottom, | |
| 56 | − char *str); | |
| 57 | −/* _conio_kbhit */ | |
| 58 | − | |
| 59 | −void delline (void); | |
| 60 | − | |
| 61 | −/* gettextinfo */ | |
| 62 | −void gotoxy(int x, int y); | |
| 63 | −/* | |
| 64 | −highvideo | |
| 65 | −insline | |
| 66 | −intensevideo | |
| 67 | −lowvideo | |
| 68 | −movetext | |
| 69 | −normvideo | |
| 70 | −*/ | |
| 71 | − | |
| 72 | −void puttext (int left, int top, int right, int bottom, char *str); | |
| 73 | − | |
| 74 | −// Screen Variables | |
| 75 | − | |
| 76 | −/* ScreenCols | |
| 77 | −ScreenGetChar | |
| 78 | −ScreenGetCursor | |
| 79 | −ScreenMode | |
| 80 | −ScreenPutChar | |
| 81 | −ScreenPutString | |
| 82 | −ScreenRetrieve | |
| 83 | −ScreenRows | |
| 84 | −ScreenSetCursor | |
| 85 | −ScreenUpdate | |
| 86 | −ScreenUpdateLine | |
| 87 | −ScreenVisualBell | |
| 88 | −_set_screen_lines */ | |
| 89 | − | |
| 90 | −void _setcursortype (int type); | |
| 91 | − | |
| 92 | −void textattr (int _attr); | |
| 93 | − | |
| 94 | −void textbackground (int color); | |
| 95 | − | |
| 96 | −void textcolor (int color); | |
| 97 | − | |
| 98 | −/* textmode */ | |
| 99 | − | |
| 100 | −int wherex (void); | |
| 101 | − | |
| 102 | −int wherey (void); | |
| 103 | − | |
| 104 | −/* window */ | |
| 105 | − | |
| 106 | − | |
| 107 | − | |
| 108 | −/* The code below was part of Mingw's conio.h */ | |
| 109 | −/* | |
| 110 | − * conio.h | |
| 111 | − * | |
| 112 | − * Low level console I/O functions. Pretty please try to use the ANSI | |
| 113 | − * standard ones if you are writing new code. | |
| 114 | − * | |
| 115 | − * This file is part of the Mingw32 package. | |
| 116 | − * | |
| 117 | − * Contributors: | |
| 118 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 119 | − * | |
| 120 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 121 | − * | |
| 122 | − * This source code is offered for use in the public domain. You may | |
| 123 | − * use, modify or distribute it freely. | |
| 124 | − * | |
| 125 | − * This code is distributed in the hope that it will be useful but | |
| 126 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 127 | − * DISCLAMED. This includes but is not limited to warranties of | |
| 128 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 129 | − * | |
| 130 | − * $Revision: 1.2 $ | |
| 131 | − * $Author: bellard $ | |
| 132 | − * $Date: 2005/04/17 13:14:29 $ | |
| 133 | − * | |
| 134 | − */ | |
| 15 | + _CRTIMP char *_cgets(char *_Buffer); | |
| 16 | + _CRTIMP int __cdecl _cprintf(const char *_Format,...); | |
| 17 | + _CRTIMP int __cdecl _cputs(const char *_Str); | |
| 18 | + _CRTIMP int __cdecl _cscanf(const char *_Format,...); | |
| 19 | + _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...); | |
| 20 | + _CRTIMP int __cdecl _getch(void); | |
| 21 | + _CRTIMP int __cdecl _getche(void); | |
| 22 | + _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList); | |
| 23 | + _CRTIMP int __cdecl _cprintf_p(const char *_Format,...); | |
| 24 | + _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList); | |
| 25 | + _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...); | |
| 26 | + _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 27 | + _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...); | |
| 28 | + _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 29 | + _CRTIMP int __cdecl _kbhit(void); | |
| 30 | + | |
| 31 | +#if defined(_X86_) && !defined(__x86_64) | |
| 32 | + int __cdecl _inp(unsigned short); | |
| 33 | + unsigned short __cdecl _inpw(unsigned short); | |
| 34 | + unsigned long __cdecl _inpd(unsigned short); | |
| 35 | + int __cdecl _outp(unsigned short,int); | |
| 36 | + unsigned short __cdecl _outpw(unsigned short,unsigned short); | |
| 37 | + unsigned long __cdecl _outpd(unsigned short,unsigned long); | |
| 38 | +#endif | |
| 39 | + | |
| 40 | + _CRTIMP int __cdecl _putch(int _Ch); | |
| 41 | + _CRTIMP int __cdecl _ungetch(int _Ch); | |
| 42 | + _CRTIMP int __cdecl _getch_nolock(void); | |
| 43 | + _CRTIMP int __cdecl _getche_nolock(void); | |
| 44 | + _CRTIMP int __cdecl _putch_nolock(int _Ch); | |
| 45 | + _CRTIMP int __cdecl _ungetch_nolock(int _Ch); | |
| 46 | + | |
| 47 | +#ifndef _WCONIO_DEFINED | |
| 48 | +#define _WCONIO_DEFINED | |
| 49 | + | |
| 50 | +#ifndef WEOF | |
| 51 | +#define WEOF (wint_t)(0xFFFF) | |
| 52 | +#endif | |
| 135 | 53 | |
| 136 | −char* _cgets (char*); | |
| 137 | −int _cprintf (const char*, ...); | |
| 138 | −int _cputs (const char*); | |
| 139 | −int _cscanf (char*, ...); | |
| 54 | + _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer); | |
| 55 | + _CRTIMP wint_t __cdecl _getwch(void); | |
| 56 | + _CRTIMP wint_t __cdecl _getwche(void); | |
| 57 | + _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh); | |
| 58 | + _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh); | |
| 59 | + _CRTIMP int __cdecl _cputws(const wchar_t *_String); | |
| 60 | + _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...); | |
| 61 | + _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...); | |
| 62 | + _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 63 | + _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 64 | + _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...); | |
| 65 | + _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 66 | + _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 67 | + _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 68 | + _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 69 | + _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 70 | + _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh); | |
| 71 | + _CRTIMP wint_t __cdecl _getwch_nolock(void); | |
| 72 | + _CRTIMP wint_t __cdecl _getwche_nolock(void); | |
| 73 | + _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh); | |
| 74 | +#endif | |
| 140 | 75 | |
| 141 | −int _getch (void); | |
| 142 | −int _getche (void); | |
| 143 | −int _kbhit (void); | |
| 144 | −int _putch (int); | |
| 145 | −int _ungetch (int); | |
| 76 | +#ifndef NO_OLDNAMES | |
| 77 | + char *__cdecl cgets(char *_Buffer); | |
| 78 | + int __cdecl cprintf(const char *_Format,...); | |
| 79 | + int __cdecl cputs(const char *_Str); | |
| 80 | + int __cdecl cscanf(const char *_Format,...); | |
| 81 | + int __cdecl getch(void); | |
| 82 | + int __cdecl getche(void); | |
| 83 | + int __cdecl kbhit(void); | |
| 84 | + int __cdecl putch(int _Ch); | |
| 85 | + int __cdecl ungetch(int _Ch); | |
| 86 | + | |
| 87 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 88 | + int __cdecl inp(unsigned short); | |
| 89 | + unsigned short __cdecl inpw(unsigned short); | |
| 90 | + int __cdecl outp(unsigned short,int); | |
| 91 | + unsigned short __cdecl outpw(unsigned short,unsigned short); | |
| 92 | +#endif | |
| 146 | 93 | |
| 94 | + /* I/O intrin functions. */ | |
| 95 | + __CRT_INLINE unsigned char __inbyte(unsigned short Port) | |
| 96 | + { | |
| 97 | + unsigned char value; | |
| 98 | + __asm__ __volatile__ ("inb %w1,%b0" | |
| 99 | + : "=a" (value) | |
| 100 | + : "Nd" (Port)); | |
| 101 | + return value; | |
| 102 | + } | |
| 103 | + __CRT_INLINE unsigned short __inword(unsigned short Port) | |
| 104 | + { | |
| 105 | + unsigned short value; | |
| 106 | + __asm__ __volatile__ ("inw %w1,%w0" | |
| 107 | + : "=a" (value) | |
| 108 | + : "Nd" (Port)); | |
| 109 | + return value; | |
| 110 | + } | |
| 111 | + __CRT_INLINE unsigned long __indword(unsigned short Port) | |
| 112 | + { | |
| 113 | + unsigned long value; | |
| 114 | + __asm__ __volatile__ ("inl %w1,%0" | |
| 115 | + : "=a" (value) | |
| 116 | + : "Nd" (Port)); | |
| 117 | + return value; | |
| 118 | + } | |
| 119 | + __CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data) | |
| 120 | + { | |
| 121 | + __asm__ __volatile__ ("outb %b0,%w1" | |
| 122 | + : | |
| 123 | + : "a" (Data), "Nd" (Port)); | |
| 124 | + } | |
| 125 | + __CRT_INLINE void __outword(unsigned short Port,unsigned short Data) | |
| 126 | + { | |
| 127 | + __asm__ __volatile__ ("outw %w0,%w1" | |
| 128 | + : | |
| 129 | + : "a" (Data), "Nd" (Port)); | |
| 130 | + } | |
| 131 | + __CRT_INLINE void __outdword(unsigned short Port,unsigned long Data) | |
| 132 | + { | |
| 133 | + __asm__ __volatile__ ("outl %0,%w1" | |
| 134 | + : | |
| 135 | + : "a" (Data), "Nd" (Port)); | |
| 136 | + } | |
| 137 | + __CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count) | |
| 138 | + { | |
| 139 | + __asm__ __volatile__ ( | |
| 140 | + "cld ; rep ; insb " | |
| 141 | + : "=D" (Buffer), "=c" (Count) | |
| 142 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 143 | + ); | |
| 144 | + } | |
| 145 | + __CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count) | |
| 146 | + { | |
| 147 | + __asm__ __volatile__ ( | |
| 148 | + "cld ; rep ; insw " | |
| 149 | + : "=D" (Buffer), "=c" (Count) | |
| 150 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 151 | + ); | |
| 152 | + } | |
| 153 | + __CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count) | |
| 154 | + { | |
| 155 | + __asm__ __volatile__ ( | |
| 156 | + "cld ; rep ; insl " | |
| 157 | + : "=D" (Buffer), "=c" (Count) | |
| 158 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 159 | + ); | |
| 160 | + } | |
| 161 | + | |
| 162 | + __CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count) | |
| 163 | + { | |
| 164 | + __asm__ __volatile__ ( | |
| 165 | + "cld ; rep ; outsb " | |
| 166 | + : "=S" (Buffer), "=c" (Count) | |
| 167 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 168 | + ); | |
| 169 | + } | |
| 170 | + __CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count) | |
| 171 | + { | |
| 172 | + __asm__ __volatile__ ( | |
| 173 | + "cld ; rep ; outsw " | |
| 174 | + : "=S" (Buffer), "=c" (Count) | |
| 175 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 176 | + ); | |
| 177 | + } | |
| 178 | + __CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count) | |
| 179 | + { | |
| 180 | + __asm__ __volatile__ ( | |
| 181 | + "cld ; rep ; outsl " | |
| 182 | + : "=S" (Buffer), "=c" (Count) | |
| 183 | + : "d"(Port), "0"(Buffer), "1" (Count) | |
| 184 | + ); | |
| 185 | + } | |
| 186 | + | |
| 187 | + __CRT_INLINE unsigned __int64 __readcr0(void) | |
| 188 | + { | |
| 189 | + unsigned __int64 value; | |
| 190 | + __asm__ __volatile__ ( | |
| 191 | + "mov %%cr0, %[value]" | |
| 192 | + : [value] "=q" (value)); | |
| 193 | + return value; | |
| 194 | + } | |
| 195 | + | |
| 196 | + /* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32 | |
| 197 | + seperatly. */ | |
| 198 | + | |
| 199 | +#ifdef _WIN64 | |
| 200 | + __CRT_INLINE void __writecr0(unsigned __int64 Data) | |
| 201 | + { | |
| 202 | + __asm__ __volatile__ ( | |
| 203 | + "mov %[Data], %%cr0" | |
| 204 | + : | |
| 205 | + : [Data] "q" (Data) | |
| 206 | + : "memory"); | |
| 207 | + } | |
| 208 | + | |
| 209 | + __CRT_INLINE unsigned __int64 __readcr2(void) | |
| 210 | + { | |
| 211 | + unsigned __int64 value; | |
| 212 | + __asm__ __volatile__ ( | |
| 213 | + "mov %%cr2, %[value]" | |
| 214 | + : [value] "=q" (value)); | |
| 215 | + return value; | |
| 216 | + } | |
| 217 | + | |
| 218 | + __CRT_INLINE void __writecr2(unsigned __int64 Data) | |
| 219 | + { | |
| 220 | + __asm__ __volatile__ ( | |
| 221 | + "mov %[Data], %%cr2" | |
| 222 | + : | |
| 223 | + : [Data] "q" (Data) | |
| 224 | + : "memory"); | |
| 225 | + } | |
| 226 | + | |
| 227 | + __CRT_INLINE unsigned __int64 __readcr3(void) | |
| 228 | + { | |
| 229 | + unsigned __int64 value; | |
| 230 | + __asm__ __volatile__ ( | |
| 231 | + "mov %%cr3, %[value]" | |
| 232 | + : [value] "=q" (value)); | |
| 233 | + return value; | |
| 234 | + } | |
| 235 | + | |
| 236 | + __CRT_INLINE void __writecr3(unsigned __int64 Data) | |
| 237 | + { | |
| 238 | + __asm__ __volatile__ ( | |
| 239 | + "mov %[Data], %%cr3" | |
| 240 | + : | |
| 241 | + : [Data] "q" (Data) | |
| 242 | + : "memory"); | |
| 243 | + } | |
| 244 | + | |
| 245 | + __CRT_INLINE unsigned __int64 __readcr4(void) | |
| 246 | + { | |
| 247 | + unsigned __int64 value; | |
| 248 | + __asm__ __volatile__ ( | |
| 249 | + "mov %%cr4, %[value]" | |
| 250 | + : [value] "=q" (value)); | |
| 251 | + return value; | |
| 252 | + } | |
| 253 | + | |
| 254 | + __CRT_INLINE void __writecr4(unsigned __int64 Data) | |
| 255 | + { | |
| 256 | + __asm__ __volatile__ ( | |
| 257 | + "mov %[Data], %%cr4" | |
| 258 | + : | |
| 259 | + : [Data] "q" (Data) | |
| 260 | + : "memory"); | |
| 261 | + } | |
| 262 | + | |
| 263 | + __CRT_INLINE unsigned __int64 __readcr8(void) | |
| 264 | + { | |
| 265 | + unsigned __int64 value; | |
| 266 | + __asm__ __volatile__ ( | |
| 267 | + "mov %%cr8, %[value]" | |
| 268 | + : [value] "=q" (value)); | |
| 269 | + return value; | |
| 270 | + } | |
| 271 | + | |
| 272 | + __CRT_INLINE void __writecr8(unsigned __int64 Data) | |
| 273 | + { | |
| 274 | + __asm__ __volatile__ ( | |
| 275 | + "mov %[Data], %%cr8" | |
| 276 | + : | |
| 277 | + : [Data] "q" (Data) | |
| 278 | + : "memory"); | |
| 279 | + } | |
| 280 | + | |
| 281 | +#elif defined(_WIN32) | |
| 282 | + | |
| 283 | + __CRT_INLINE void __writecr0(unsigned Data) | |
| 284 | + { | |
| 285 | + __asm__ __volatile__ ( | |
| 286 | + "mov %[Data], %%cr0" | |
| 287 | + : | |
| 288 | + : [Data] "q" (Data) | |
| 289 | + : "memory"); | |
| 290 | + } | |
| 291 | + | |
| 292 | + __CRT_INLINE unsigned long __readcr2(void) | |
| 293 | + { | |
| 294 | + unsigned long value; | |
| 295 | + __asm__ __volatile__ ( | |
| 296 | + "mov %%cr2, %[value]" | |
| 297 | + : [value] "=q" (value)); | |
| 298 | + return value; | |
| 299 | + } | |
| 300 | + | |
| 301 | + __CRT_INLINE void __writecr2(unsigned Data) | |
| 302 | + { | |
| 303 | + __asm__ __volatile__ ( | |
| 304 | + "mov %[Data], %%cr2" | |
| 305 | + : | |
| 306 | + : [Data] "q" (Data) | |
| 307 | + : "memory"); | |
| 308 | + } | |
| 309 | + | |
| 310 | + __CRT_INLINE unsigned long __readcr3(void) | |
| 311 | + { | |
| 312 | + unsigned long value; | |
| 313 | + __asm__ __volatile__ ( | |
| 314 | + "mov %%cr3, %[value]" | |
| 315 | + : [value] "=q" (value)); | |
| 316 | + return value; | |
| 317 | + } | |
| 318 | + | |
| 319 | + __CRT_INLINE void __writecr3(unsigned Data) | |
| 320 | + { | |
| 321 | + __asm__ __volatile__ ( | |
| 322 | + "mov %[Data], %%cr3" | |
| 323 | + : | |
| 324 | + : [Data] "q" (Data) | |
| 325 | + : "memory"); | |
| 326 | + } | |
| 327 | + | |
| 328 | + __CRT_INLINE unsigned long __readcr4(void) | |
| 329 | + { | |
| 330 | + unsigned long value; | |
| 331 | + __asm__ __volatile__ ( | |
| 332 | + "mov %%cr4, %[value]" | |
| 333 | + : [value] "=q" (value)); | |
| 334 | + return value; | |
| 335 | + } | |
| 336 | + | |
| 337 | + __CRT_INLINE void __writecr4(unsigned Data) | |
| 338 | + { | |
| 339 | + __asm__ __volatile__ ( | |
| 340 | + "mov %[Data], %%cr4" | |
| 341 | + : | |
| 342 | + : [Data] "q" (Data) | |
| 343 | + : "memory"); | |
| 344 | + } | |
| 345 | + | |
| 346 | + __CRT_INLINE unsigned long __readcr8(void) | |
| 347 | + { | |
| 348 | + unsigned long value; __asm__ __volatile__ ( | |
| 349 | + "mov %%cr8, %[value]" | |
| 350 | + : [value] "=q" (value)); | |
| 351 | + return value; | |
| 352 | + } | |
| 353 | + | |
| 354 | + __CRT_INLINE void __writecr8(unsigned Data) | |
| 355 | + { | |
| 356 | + __asm__ __volatile__ ( | |
| 357 | + "mov %[Data], %%cr8" | |
| 358 | + : | |
| 359 | + : [Data] "q" (Data) | |
| 360 | + : "memory"); | |
| 361 | + } | |
| 362 | + | |
| 363 | +#endif | |
| 147 | 364 | |
| 148 | −int getch (void); | |
| 149 | −int getche (void); | |
| 150 | −int kbhit (void); | |
| 151 | −int putch (int); | |
| 152 | −int ungetch (int); | |
| 365 | + __CRT_INLINE unsigned __int64 __readmsr(unsigned long msr) | |
| 366 | + { | |
| 367 | + unsigned __int64 val1, val2; | |
| 368 | + __asm__ __volatile__( | |
| 369 | + "rdmsr" | |
| 370 | + : "=a" (val1), "=d" (val2) | |
| 371 | + : "c" (msr)); | |
| 372 | + return val1 | (val2 << 32); | |
| 373 | + } | |
| 374 | + | |
| 375 | + __CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value) | |
| 376 | + { | |
| 377 | + unsigned long val1 = Value, val2 = Value >> 32; | |
| 378 | + __asm__ __volatile__ ( | |
| 379 | + "wrmsr" | |
| 380 | + : | |
| 381 | + : "c" (msr), "a" (val1), "d" (val2)); | |
| 382 | + } | |
| 383 | + | |
| 384 | + __CRT_INLINE unsigned __int64 __rdtsc(void) | |
| 385 | + { | |
| 386 | + unsigned __int64 val1, val2; | |
| 387 | + __asm__ __volatile__ ( | |
| 388 | + "rdtsc" | |
| 389 | + : "=a" (val1), "=d" (val2)); | |
| 390 | + return val1 | (val2 << 32); | |
| 391 | + } | |
| 392 | + | |
| 393 | + __CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType) | |
| 394 | + { | |
| 395 | + __asm__ __volatile__ ( | |
| 396 | + "cpuid" | |
| 397 | + : "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3]) | |
| 398 | + : "a" (InfoType)); | |
| 399 | + } | |
| 153 | 400 | |
| 401 | +#endif | |
| 154 | 402 | |
| 155 | 403 | #ifdef __cplusplus |
| 156 | 404 | } |
| 157 | 405 | #endif |
| 158 | 406 | |
| 159 | −#endif /* _CONIO_H_ */ | |
| 407 | +#include <sec_api/conio_s.h> | |
| 408 | + | |
| 409 | +#endif | |
| @@ -1,232 +1,281 @@ | ||
| 1 | −/* | |
| 2 | − * ctype.h | |
| 3 | − * | |
| 4 | − * Functions for testing character types and converting characters. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_CTYPE | |
| 7 | +#define _INC_CTYPE | |
| 26 | 8 | |
| 27 | −#ifndef _CTYPE_H_ | |
| 28 | −#define _CTYPE_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −#define __need_wchar_t | |
| 34 | −#define __need_wint_t | |
| 35 | −#ifndef RC_INVOKED | |
| 36 | −#include <stddef.h> | |
| 37 | −#endif /* Not RC_INVOKED */ | |
| 38 | − | |
| 39 | − | |
| 40 | −/* | |
| 41 | − * The following flags are used to tell iswctype and _isctype what character | |
| 42 | − * types you are looking for. | |
| 43 | − */ | |
| 44 | −#define _UPPER 0x0001 | |
| 45 | −#define _LOWER 0x0002 | |
| 46 | −#define _DIGIT 0x0004 | |
| 47 | −#define _SPACE 0x0008 /* HT LF VT FF CR SP */ | |
| 48 | −#define _PUNCT 0x0010 | |
| 49 | −#define _CONTROL 0x0020 | |
| 50 | −#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */ | |
| 51 | −#define _HEX 0x0080 | |
| 52 | −#define _LEADBYTE 0x8000 | |
| 53 | − | |
| 54 | −#define _ALPHA 0x0103 | |
| 55 | − | |
| 56 | −#ifndef RC_INVOKED | |
| 57 | − | |
| 58 | 11 | #ifdef __cplusplus |
| 59 | 12 | extern "C" { |
| 60 | 13 | #endif |
| 61 | 14 | |
| 62 | −int isalnum(int); | |
| 63 | −int isalpha(int); | |
| 64 | −int iscntrl(int); | |
| 65 | −int isdigit(int); | |
| 66 | −int isgraph(int); | |
| 67 | −int islower(int); | |
| 68 | −int isprint(int); | |
| 69 | −int ispunct(int); | |
| 70 | −int isspace(int); | |
| 71 | −int isupper(int); | |
| 72 | −int isxdigit(int); | |
| 73 | − | |
| 74 | −#ifndef __STRICT_ANSI__ | |
| 75 | −int _isctype (int, int); | |
| 15 | +#ifndef WEOF | |
| 16 | +#define WEOF (wint_t)(0xFFFF) | |
| 76 | 17 | #endif |
| 77 | 18 | |
| 78 | −/* These are the ANSI versions, with correct checking of argument */ | |
| 79 | −int tolower(int); | |
| 80 | −int toupper(int); | |
| 19 | +#ifndef _CRT_CTYPEDATA_DEFINED | |
| 20 | +#define _CRT_CTYPEDATA_DEFINED | |
| 21 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 81 | 22 | |
| 82 | −/* | |
| 83 | − * NOTE: The above are not old name type wrappers, but functions exported | |
| 84 | − * explicitly by MSVCRT/CRTDLL. However, underscored versions are also | |
| 85 | − * exported. | |
| 86 | − */ | |
| 87 | −#ifndef __STRICT_ANSI__ | |
| 88 | −/* | |
| 89 | − * These are the cheap non-std versions: The return values are undefined | |
| 90 | − * if the argument is not ASCII char or is not of appropriate case | |
| 91 | − */ | |
| 92 | −int _tolower(int); | |
| 93 | −int _toupper(int); | |
| 23 | +#ifndef __PCTYPE_FUNC | |
| 24 | +#define __PCTYPE_FUNC __pctype_func() | |
| 25 | +#ifdef _MSVCRT_ | |
| 26 | +#define __pctype_func() (_pctype) | |
| 27 | +#else | |
| 28 | +#define __pctype_func() (*_imp___pctype) | |
| 29 | +#endif | |
| 94 | 30 | #endif |
| 95 | 31 | |
| 96 | −/* Also defined in stdlib.h */ | |
| 97 | −#ifndef MB_CUR_MAX | |
| 98 | −# ifdef __MSVCRT__ | |
| 99 | −# define MB_CUR_MAX __mb_cur_max | |
| 100 | − __MINGW_IMPORT int __mb_cur_max; | |
| 101 | −# else /* not __MSVCRT */ | |
| 102 | −# define MB_CUR_MAX __mb_cur_max_dll | |
| 103 | − __MINGW_IMPORT int __mb_cur_max_dll; | |
| 104 | −# endif /* not __MSVCRT */ | |
| 105 | −#endif /* MB_CUR_MAX */ | |
| 106 | − | |
| 107 | −__MINGW_IMPORT unsigned short _ctype[]; | |
| 108 | −#ifdef __MSVCRT__ | |
| 109 | −__MINGW_IMPORT unsigned short* _pctype; | |
| 110 | −#else /* CRTDLL */ | |
| 111 | −__MINGW_IMPORT unsigned short* _pctype_dll; | |
| 112 | −#define _pctype _pctype_dll | |
| 113 | −#endif | |
| 114 | − | |
| 115 | −/* | |
| 116 | − * Use inlines here rather than macros, because macros will upset | |
| 117 | − * C++ usage (eg, ::isalnum), and so usually get undefined | |
| 118 | − * | |
| 119 | − * According to standard for SB chars, these function are defined only | |
| 120 | − * for input values representable by unsigned char or EOF. | |
| 121 | − * Thus, there is no range test. | |
| 122 | − * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars. | |
| 123 | − * | |
| 124 | − * If no MB char support is needed, these can be simplified even | |
| 125 | − * more by command line define -DMB_CUR_MAX=1. The compiler will then | |
| 126 | − * optimise away the constant condition. | |
| 127 | − */ | |
| 32 | +#ifndef _pctype | |
| 33 | +#ifdef _MSVCRT_ | |
| 34 | + extern unsigned short *_pctype; | |
| 35 | +#else | |
| 36 | + extern unsigned short **_imp___pctype; | |
| 37 | +#define _pctype (*_imp___pctype) | |
| 38 | +#endif | |
| 39 | +#endif | |
| 128 | 40 | |
| 41 | +#endif | |
| 42 | +#endif | |
| 129 | 43 | |
| 130 | −#if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ )) | |
| 131 | −/* use simple lookup if SB locale, else _isctype() */ | |
| 132 | −#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask)) | |
| 133 | −extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));} | |
| 134 | −extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);} | |
| 135 | −extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);} | |
| 136 | −extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);} | |
| 137 | −extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));} | |
| 138 | −extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);} | |
| 139 | −extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));} | |
| 140 | −extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);} | |
| 141 | −extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);} | |
| 142 | −extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);} | |
| 143 | −extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);} | |
| 44 | +#ifndef _CRT_WCTYPEDATA_DEFINED | |
| 45 | +#define _CRT_WCTYPEDATA_DEFINED | |
| 46 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 47 | +#ifndef _wctype | |
| 48 | +#ifdef _MSVCRT_ | |
| 49 | + extern unsigned short *_wctype; | |
| 50 | +#else | |
| 51 | + extern unsigned short **_imp___wctype; | |
| 52 | +#define _wctype (*_imp___wctype) | |
| 53 | +#endif | |
| 54 | +#endif | |
| 55 | +#ifdef _MSVCRT_ | |
| 56 | +#define __pwctype_func() (_pwctype) | |
| 57 | +#ifndef _pwctype | |
| 58 | + extern unsigned short *_pwctype; | |
| 59 | +#endif | |
| 60 | +#else | |
| 61 | +#define __pwctype_func() (*_imp___pwctype) | |
| 62 | +#ifndef _pwctype | |
| 63 | + extern unsigned short **_imp___pwctype; | |
| 64 | +#define _pwctype (*_imp___pwctype) | |
| 65 | +#endif | |
| 66 | +#endif | |
| 67 | +#endif | |
| 68 | +#endif | |
| 144 | 69 | |
| 145 | −/* these reproduce behaviour of lib underscored versions */ | |
| 146 | −extern __inline__ int _tolower(int c) {return ( c -'A'+'a');} | |
| 147 | −extern __inline__ int _toupper(int c) {return ( c -'a'+'A');} | |
| 70 | + /* CRT stuff */ | |
| 71 | +#if 1 | |
| 72 | + extern const unsigned char __newclmap[]; | |
| 73 | + extern const unsigned char __newcumap[]; | |
| 74 | + extern pthreadlocinfo __ptlocinfo; | |
| 75 | + extern pthreadmbcinfo __ptmbcinfo; | |
| 76 | + extern int __globallocalestatus; | |
| 77 | + extern int __locale_changed; | |
| 78 | + extern struct threadlocaleinfostruct __initiallocinfo; | |
| 79 | + extern _locale_tstruct __initiallocalestructinfo; | |
| 80 | + pthreadlocinfo __cdecl __updatetlocinfo(void); | |
| 81 | + pthreadmbcinfo __cdecl __updatetmbcinfo(void); | |
| 82 | +#endif | |
| 148 | 83 | |
| 149 | −/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only | |
| 150 | − if we only want C-locale. */ | |
| 84 | +#define _UPPER 0x1 | |
| 85 | +#define _LOWER 0x2 | |
| 86 | +#define _DIGIT 0x4 | |
| 87 | +#define _SPACE 0x8 | |
| 88 | + | |
| 89 | +#define _PUNCT 0x10 | |
| 90 | +#define _CONTROL 0x20 | |
| 91 | +#define _BLANK 0x40 | |
| 92 | +#define _HEX 0x80 | |
| 93 | + | |
| 94 | +#define _LEADBYTE 0x8000 | |
| 95 | +#define _ALPHA (0x0100|_UPPER|_LOWER) | |
| 96 | + | |
| 97 | +#ifndef _CTYPE_DEFINED | |
| 98 | +#define _CTYPE_DEFINED | |
| 99 | + | |
| 100 | + _CRTIMP int __cdecl _isctype(int _C,int _Type); | |
| 101 | + _CRTIMP int __cdecl _isctype_l(int _C,int _Type,_locale_t _Locale); | |
| 102 | + _CRTIMP int __cdecl isalpha(int _C); | |
| 103 | + _CRTIMP int __cdecl _isalpha_l(int _C,_locale_t _Locale); | |
| 104 | + _CRTIMP int __cdecl isupper(int _C); | |
| 105 | + _CRTIMP int __cdecl _isupper_l(int _C,_locale_t _Locale); | |
| 106 | + _CRTIMP int __cdecl islower(int _C); | |
| 107 | + _CRTIMP int __cdecl _islower_l(int _C,_locale_t _Locale); | |
| 108 | + _CRTIMP int __cdecl isdigit(int _C); | |
| 109 | + _CRTIMP int __cdecl _isdigit_l(int _C,_locale_t _Locale); | |
| 110 | + _CRTIMP int __cdecl isxdigit(int _C); | |
| 111 | + _CRTIMP int __cdecl _isxdigit_l(int _C,_locale_t _Locale); | |
| 112 | + _CRTIMP int __cdecl isspace(int _C); | |
| 113 | + _CRTIMP int __cdecl _isspace_l(int _C,_locale_t _Locale); | |
| 114 | + _CRTIMP int __cdecl ispunct(int _C); | |
| 115 | + _CRTIMP int __cdecl _ispunct_l(int _C,_locale_t _Locale); | |
| 116 | + _CRTIMP int __cdecl isalnum(int _C); | |
| 117 | + _CRTIMP int __cdecl _isalnum_l(int _C,_locale_t _Locale); | |
| 118 | + _CRTIMP int __cdecl isprint(int _C); | |
| 119 | + _CRTIMP int __cdecl _isprint_l(int _C,_locale_t _Locale); | |
| 120 | + _CRTIMP int __cdecl isgraph(int _C); | |
| 121 | + _CRTIMP int __cdecl _isgraph_l(int _C,_locale_t _Locale); | |
| 122 | + _CRTIMP int __cdecl iscntrl(int _C); | |
| 123 | + _CRTIMP int __cdecl _iscntrl_l(int _C,_locale_t _Locale); | |
| 124 | + _CRTIMP int __cdecl toupper(int _C); | |
| 125 | + _CRTIMP int __cdecl tolower(int _C); | |
| 126 | + _CRTIMP int __cdecl _tolower(int _C); | |
| 127 | + _CRTIMP int __cdecl _tolower_l(int _C,_locale_t _Locale); | |
| 128 | + _CRTIMP int __cdecl _toupper(int _C); | |
| 129 | + _CRTIMP int __cdecl _toupper_l(int _C,_locale_t _Locale); | |
| 130 | + _CRTIMP int __cdecl __isascii(int _C); | |
| 131 | + _CRTIMP int __cdecl __toascii(int _C); | |
| 132 | + _CRTIMP int __cdecl __iscsymf(int _C); | |
| 133 | + _CRTIMP int __cdecl __iscsym(int _C); | |
| 134 | + | |
| 135 | +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) | |
| 136 | +int __cdecl isblank(int _C); | |
| 137 | +#endif | |
| 138 | +#endif | |
| 151 | 139 | |
| 152 | −#endif /* _NO_CTYPE_INLINES */ | |
| 140 | +#ifndef _WCTYPE_DEFINED | |
| 141 | +#define _WCTYPE_DEFINED | |
| 142 | + | |
| 143 | + int __cdecl iswalpha(wint_t _C); | |
| 144 | + _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale); | |
| 145 | + int __cdecl iswupper(wint_t _C); | |
| 146 | + _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale); | |
| 147 | + int __cdecl iswlower(wint_t _C); | |
| 148 | + _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale); | |
| 149 | + int __cdecl iswdigit(wint_t _C); | |
| 150 | + _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale); | |
| 151 | + int __cdecl iswxdigit(wint_t _C); | |
| 152 | + _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale); | |
| 153 | + int __cdecl iswspace(wint_t _C); | |
| 154 | + _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale); | |
| 155 | + int __cdecl iswpunct(wint_t _C); | |
| 156 | + _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale); | |
| 157 | + int __cdecl iswalnum(wint_t _C); | |
| 158 | + _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale); | |
| 159 | + int __cdecl iswprint(wint_t _C); | |
| 160 | + _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale); | |
| 161 | + int __cdecl iswgraph(wint_t _C); | |
| 162 | + _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale); | |
| 163 | + int __cdecl iswcntrl(wint_t _C); | |
| 164 | + _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale); | |
| 165 | + int __cdecl iswascii(wint_t _C); | |
| 166 | + int __cdecl isleadbyte(int _C); | |
| 167 | + _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale); | |
| 168 | + wint_t __cdecl towupper(wint_t _C); | |
| 169 | + _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale); | |
| 170 | + wint_t __cdecl towlower(wint_t _C); | |
| 171 | + _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale); | |
| 172 | + int __cdecl iswctype(wint_t _C,wctype_t _Type); | |
| 173 | + _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale); | |
| 174 | + _CRTIMP int __cdecl __iswcsymf(wint_t _C); | |
| 175 | + _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale); | |
| 176 | + _CRTIMP int __cdecl __iswcsym(wint_t _C); | |
| 177 | + _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale); | |
| 178 | + int __cdecl is_wctype(wint_t _C,wctype_t _Type); | |
| 179 | + | |
| 180 | +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) | |
| 181 | +int __cdecl iswblank(wint_t _C); | |
| 182 | +#endif | |
| 183 | +#endif | |
| 153 | 184 | |
| 154 | −/* Wide character equivalents */ | |
| 185 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 155 | 186 | |
| 156 | −#ifndef WEOF | |
| 157 | −#define WEOF (wchar_t)(0xFFFF) | |
| 158 | −#endif | |
| 159 | − | |
| 160 | −#ifndef _WCTYPE_T_DEFINED | |
| 161 | −typedef wchar_t wctype_t; | |
| 162 | −#define _WCTYPE_T_DEFINED | |
| 163 | −#endif | |
| 164 | − | |
| 165 | −int iswalnum(wint_t); | |
| 166 | −int iswalpha(wint_t); | |
| 167 | −int iswascii(wint_t); | |
| 168 | −int iswcntrl(wint_t); | |
| 169 | −int iswctype(wint_t, wctype_t); | |
| 170 | −int is_wctype(wint_t, wctype_t); /* Obsolete! */ | |
| 171 | −int iswdigit(wint_t); | |
| 172 | −int iswgraph(wint_t); | |
| 173 | −int iswlower(wint_t); | |
| 174 | −int iswprint(wint_t); | |
| 175 | −int iswpunct(wint_t); | |
| 176 | −int iswspace(wint_t); | |
| 177 | −int iswupper(wint_t); | |
| 178 | −int iswxdigit(wint_t); | |
| 179 | − | |
| 180 | −wchar_t towlower(wchar_t); | |
| 181 | −wchar_t towupper(wchar_t); | |
| 182 | − | |
| 183 | −int isleadbyte (int); | |
| 184 | − | |
| 185 | −/* Also in wctype.h */ | |
| 186 | −#if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) | |
| 187 | −#define __WCTYPE_INLINES_DEFINED | |
| 188 | −extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} | |
| 189 | −extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} | |
| 190 | −extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);} | |
| 191 | −extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} | |
| 192 | −extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} | |
| 193 | −extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} | |
| 194 | −extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} | |
| 195 | −extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} | |
| 196 | −extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} | |
| 197 | −extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} | |
| 198 | −extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} | |
| 199 | −extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} | |
| 200 | −extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} | |
| 201 | −#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */ | |
| 202 | − | |
| 203 | −#ifndef __STRICT_ANSI__ | |
| 204 | −int __isascii (int); | |
| 205 | −int __toascii (int); | |
| 206 | −int __iscsymf (int); /* Valid first character in C symbol */ | |
| 207 | −int __iscsym (int); /* Valid character in C symbol (after first) */ | |
| 208 | − | |
| 209 | −#ifndef __NO_CTYPE_INLINES | |
| 210 | −extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);} | |
| 211 | −extern __inline__ int __toascii(int c) {return (c & 0x7F);} | |
| 212 | −extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));} | |
| 213 | −extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));} | |
| 214 | −#endif /* __NO_CTYPE_INLINES */ | |
| 215 | − | |
| 216 | −#ifndef _NO_OLDNAMES | |
| 217 | −int isascii (int); | |
| 218 | −int toascii (int); | |
| 219 | −int iscsymf (int); | |
| 220 | −int iscsym (int); | |
| 221 | −#endif /* Not _NO_OLDNAMES */ | |
| 222 | − | |
| 223 | −#endif /* Not __STRICT_ANSI__ */ | |
| 187 | +#ifndef MB_CUR_MAX | |
| 188 | +#define MB_CUR_MAX ___mb_cur_max_func() | |
| 189 | +#ifndef __mb_cur_max | |
| 190 | +#ifdef _MSVCRT_ | |
| 191 | + extern int __mb_cur_max; | |
| 192 | +#else | |
| 193 | +#define __mb_cur_max (*_imp____mb_cur_max) | |
| 194 | + extern int *_imp____mb_cur_max; | |
| 195 | +#endif | |
| 196 | +#endif | |
| 197 | +#ifdef _MSVCRT_ | |
| 198 | +#define ___mb_cur_max_func() (__mb_cur_max) | |
| 199 | +#else | |
| 200 | +#define ___mb_cur_max_func() (*_imp____mb_cur_max) | |
| 201 | +#endif | |
| 202 | +#endif | |
| 224 | 203 | |
| 225 | −#ifdef __cplusplus | |
| 226 | −} | |
| 204 | +#define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b)) | |
| 205 | +#define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & (_Flag)) | |
| 206 | +#define _ischartype_l(_Char,_Flag,_Locale) (((_Locale)!=NULL && (((_locale_t)(_Locale))->locinfo->mb_cur_max) > 1) ? _isctype_l(_Char,(_Flag),_Locale) : _chvalidchk_l(_Char,_Flag,_Locale)) | |
| 207 | +#define _isalpha_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA,_Locale) | |
| 208 | +#define _isupper_l(_Char,_Locale) _ischartype_l(_Char,_UPPER,_Locale) | |
| 209 | +#define _islower_l(_Char,_Locale) _ischartype_l(_Char,_LOWER,_Locale) | |
| 210 | +#define _isdigit_l(_Char,_Locale) _ischartype_l(_Char,_DIGIT,_Locale) | |
| 211 | +#define _isxdigit_l(_Char,_Locale) _ischartype_l(_Char,_HEX,_Locale) | |
| 212 | +#define _isspace_l(_Char,_Locale) _ischartype_l(_Char,_SPACE,_Locale) | |
| 213 | +#define _ispunct_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT,_Locale) | |
| 214 | +#define _isalnum_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA|_DIGIT,_Locale) | |
| 215 | +#define _isprint_l(_Char,_Locale) _ischartype_l(_Char,_BLANK|_PUNCT|_ALPHA|_DIGIT,_Locale) | |
| 216 | +#define _isgraph_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT|_ALPHA|_DIGIT,_Locale) | |
| 217 | +#define _iscntrl_l(_Char,_Locale) _ischartype_l(_Char,_CONTROL,_Locale) | |
| 218 | +#define _tolower(_Char) ((_Char)-'A'+'a') | |
| 219 | +#define _toupper(_Char) ((_Char)-'a'+'A') | |
| 220 | +#define __isascii(_Char) ((unsigned)(_Char) < 0x80) | |
| 221 | +#define __toascii(_Char) ((_Char) & 0x7f) | |
| 222 | + | |
| 223 | +#ifndef _WCTYPE_INLINE_DEFINED | |
| 224 | +#define _WCTYPE_INLINE_DEFINED | |
| 225 | + | |
| 226 | +#undef _CRT_WCTYPE_NOINLINE | |
| 227 | +#ifndef __cplusplus | |
| 228 | +#define iswalpha(_c) (iswctype(_c,_ALPHA)) | |
| 229 | +#define iswupper(_c) (iswctype(_c,_UPPER)) | |
| 230 | +#define iswlower(_c) (iswctype(_c,_LOWER)) | |
| 231 | +#define iswdigit(_c) (iswctype(_c,_DIGIT)) | |
| 232 | +#define iswxdigit(_c) (iswctype(_c,_HEX)) | |
| 233 | +#define iswspace(_c) (iswctype(_c,_SPACE)) | |
| 234 | +#define iswpunct(_c) (iswctype(_c,_PUNCT)) | |
| 235 | +#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT)) | |
| 236 | +#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT)) | |
| 237 | +#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT)) | |
| 238 | +#define iswcntrl(_c) (iswctype(_c,_CONTROL)) | |
| 239 | +#define iswascii(_c) ((unsigned)(_c) < 0x80) | |
| 240 | +#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p)) | |
| 241 | +#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p)) | |
| 242 | +#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p)) | |
| 243 | +#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p)) | |
| 244 | +#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p)) | |
| 245 | +#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p)) | |
| 246 | +#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p)) | |
| 247 | +#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p)) | |
| 248 | +#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p)) | |
| 249 | +#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p)) | |
| 250 | +#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p)) | |
| 251 | +#endif | |
| 227 | 252 | #endif |
| 228 | 253 | |
| 229 | −#endif /* Not RC_INVOKED */ | |
| 254 | +#define __iscsymf(_c) (isalpha(_c) || ((_c)=='_')) | |
| 255 | +#define __iscsym(_c) (isalnum(_c) || ((_c)=='_')) | |
| 256 | +#define __iswcsymf(_c) (iswalpha(_c) || ((_c)=='_')) | |
| 257 | +#define __iswcsym(_c) (iswalnum(_c) || ((_c)=='_')) | |
| 258 | +#define _iscsymf_l(_c,_p) (_isalpha_l(_c,_p) || ((_c)=='_')) | |
| 259 | +#define _iscsym_l(_c,_p) (_isalnum_l(_c,_p) || ((_c)=='_')) | |
| 260 | +#define _iswcsymf_l(_c,_p) (_iswalpha_l(_c,_p) || ((_c)=='_')) | |
| 261 | +#define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_')) | |
| 262 | +#endif | |
| 230 | 263 | |
| 231 | −#endif /* Not _CTYPE_H_ */ | |
| 264 | +#ifndef NO_OLDNAMES | |
| 265 | +#ifndef _CTYPE_DEFINED | |
| 266 | + int __cdecl isascii(int _C); | |
| 267 | + int __cdecl toascii(int _C); | |
| 268 | + int __cdecl iscsymf(int _C); | |
| 269 | + int __cdecl iscsym(int _C); | |
| 270 | +#else | |
| 271 | +#define isascii __isascii | |
| 272 | +#define toascii __toascii | |
| 273 | +#define iscsymf __iscsymf | |
| 274 | +#define iscsym __iscsym | |
| 275 | +#endif | |
| 276 | +#endif | |
| 232 | 277 | |
| 278 | +#ifdef __cplusplus | |
| 279 | +} | |
| 280 | +#endif | |
| 281 | +#endif | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * dir.h |
| 3 | 8 | * |
| @@ -1,95 +1,68 @@ | ||
| 1 | −/* | |
| 2 | − * direct.h | |
| 3 | − * | |
| 4 | − * Functions for manipulating paths and directories (included from io.h) | |
| 5 | − * plus functions for setting the current drive. | |
| 6 | − * | |
| 7 | − * This file is part of the Mingw32 package. | |
| 8 | − * | |
| 9 | − * Contributors: | |
| 10 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 6 | +#ifndef _INC_DIRECT | |
| 7 | +#define _INC_DIRECT | |
| 27 | 8 | |
| 28 | −#ifndef __STRICT_ANSI__ | |
| 29 | − | |
| 30 | −#ifndef _DIRECT_H_ | |
| 31 | −#define _DIRECT_H_ | |
| 32 | − | |
| 33 | −/* All the headers include this file. */ | |
| 34 | 9 | #include <_mingw.h> |
| 35 | − | |
| 36 | −#define __need_wchar_t | |
| 37 | −#ifndef RC_INVOKED | |
| 38 | −#include <stddef.h> | |
| 39 | −#endif /* Not RC_INVOKED */ | |
| 40 | − | |
| 41 | 10 | #include <io.h> |
| 42 | 11 | |
| 43 | −#ifndef RC_INVOKED | |
| 12 | +#pragma pack(push,_CRT_PACKING) | |
| 44 | 13 | |
| 45 | −#ifdef __cplusplus | |
| 14 | +#ifdef __cplusplus | |
| 46 | 15 | extern "C" { |
| 47 | 16 | #endif |
| 48 | 17 | |
| 49 | 18 | #ifndef _DISKFREE_T_DEFINED |
| 50 | −/* needed by _getdiskfree (also in dos.h) */ | |
| 51 | −struct _diskfree_t { | |
| 52 | − unsigned total_clusters; | |
| 53 | − unsigned avail_clusters; | |
| 54 | − unsigned sectors_per_cluster; | |
| 55 | − unsigned bytes_per_sector; | |
| 56 | −}; | |
| 57 | 19 | #define _DISKFREE_T_DEFINED |
| 58 | −#endif | |
| 59 | − | |
| 60 | −/* | |
| 61 | − * You really shouldn't be using these. Use the Win32 API functions instead. | |
| 62 | − * However, it does make it easier to port older code. | |
| 63 | − */ | |
| 64 | −int _getdrive (void); | |
| 65 | −unsigned long _getdrives(void); | |
| 66 | −int _chdrive (int); | |
| 67 | −char* _getdcwd (int, char*, int); | |
| 68 | −unsigned _getdiskfree (unsigned, struct _diskfree_t *); | |
| 20 | + struct _diskfree_t { | |
| 21 | + unsigned total_clusters; | |
| 22 | + unsigned avail_clusters; | |
| 23 | + unsigned sectors_per_cluster; | |
| 24 | + unsigned bytes_per_sector; | |
| 25 | + }; | |
| 26 | +#endif | |
| 69 | 27 | |
| 70 | −#ifndef _NO_OLDNAMES | |
| 71 | −# define diskfree_t _diskfree_t | |
| 28 | + _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes); | |
| 29 | + _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes); | |
| 30 | + char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes); | |
| 31 | + _CRTIMP int __cdecl _chdir(const char *_Path); | |
| 32 | + _CRTIMP int __cdecl _mkdir(const char *_Path); | |
| 33 | + _CRTIMP int __cdecl _rmdir(const char *_Path); | |
| 34 | + _CRTIMP int __cdecl _chdrive(int _Drive); | |
| 35 | + _CRTIMP int __cdecl _getdrive(void); | |
| 36 | + _CRTIMP unsigned long __cdecl _getdrives(void); | |
| 37 | + | |
| 38 | +#ifndef _GETDISKFREE_DEFINED | |
| 39 | +#define _GETDISKFREE_DEFINED | |
| 40 | + _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree); | |
| 72 | 41 | #endif |
| 73 | 42 | |
| 74 | 43 | #ifndef _WDIRECT_DEFINED |
| 75 | −/* wide character versions. Also in wchar.h */ | |
| 76 | −#ifdef __MSVCRT__ | |
| 77 | −int _wchdir(const wchar_t*); | |
| 78 | −wchar_t* _wgetcwd(wchar_t*, int); | |
| 79 | −wchar_t* _wgetdcwd(int, wchar_t*, int); | |
| 80 | −int _wmkdir(const wchar_t*); | |
| 81 | −int _wrmdir(const wchar_t*); | |
| 82 | −#endif /* __MSVCRT__ */ | |
| 83 | 44 | #define _WDIRECT_DEFINED |
| 45 | + _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); | |
| 46 | + _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); | |
| 47 | + wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords); | |
| 48 | + _CRTIMP int __cdecl _wchdir(const wchar_t *_Path); | |
| 49 | + _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path); | |
| 50 | + _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path); | |
| 84 | 51 | #endif |
| 85 | 52 | |
| 86 | −#ifdef __cplusplus | |
| 87 | −} | |
| 88 | −#endif | |
| 53 | +#ifndef NO_OLDNAMES | |
| 89 | 54 | |
| 90 | −#endif /* Not RC_INVOKED */ | |
| 55 | +#define diskfree_t _diskfree_t | |
| 91 | 56 | |
| 92 | −#endif /* Not _DIRECT_H_ */ | |
| 57 | + char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes); | |
| 58 | + int __cdecl chdir(const char *_Path); | |
| 59 | + int __cdecl mkdir(const char *_Path); | |
| 60 | + int __cdecl rmdir(const char *_Path); | |
| 61 | +#endif | |
| 93 | 62 | |
| 94 | −#endif /* Not __STRICT_ANSI__ */ | |
| 63 | +#ifdef __cplusplus | |
| 64 | +} | |
| 65 | +#endif | |
| 95 | 66 | |
| 67 | +#pragma pack(pop) | |
| 68 | +#endif | |
| @@ -1,33 +1,18 @@ | ||
| 1 | −/* | |
| 2 | − * DIRENT.H (formerly DIRLIB.H) | |
| 3 | − * | |
| 4 | − * by M. J. Weinstein Released to public domain 1-Jan-89 | |
| 5 | − * | |
| 6 | − * Because I have heard that this feature (opendir, readdir, closedir) | |
| 7 | − * it so useful for programmers coming from UNIX or attempting to port | |
| 8 | − * UNIX code, and because it is reasonably light weight, I have included | |
| 9 | − * it in the Mingw32 package. I have also added an implementation of | |
| 10 | − * rewinddir, seekdir and telldir. | |
| 11 | − * - Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 12 | − * | |
| 13 | − * This code is distributed in the hope that is will be useful but | |
| 14 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 15 | − * DISCLAIMED. This includeds but is not limited to warranties of | |
| 16 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 17 | − * | |
| 18 | − * $Revision: 1.2 $ | |
| 19 | − * $Author: bellard $ | |
| 20 | − * $Date: 2005/04/17 13:14:29 $ | |
| 21 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 22 | 5 | */ |
| 6 | +/* All the headers include this file. */ | |
| 7 | +#include <_mingw.h> | |
| 23 | 8 | |
| 24 | 9 | #ifndef __STRICT_ANSI__ |
| 25 | 10 | |
| 26 | 11 | #ifndef _DIRENT_H_ |
| 27 | 12 | #define _DIRENT_H_ |
| 28 | 13 | |
| 29 | −/* All the headers include this file. */ | |
| 30 | −#include <_mingw.h> | |
| 14 | + | |
| 15 | +#pragma pack(push,_CRT_PACKING) | |
| 31 | 16 | |
| 32 | 17 | #include <io.h> |
| 33 | 18 | |
| @@ -37,52 +22,103 @@ · 3 unmodified lines | ||
| 37 | 22 | extern "C" { |
| 38 | 23 | #endif |
| 39 | 24 | |
| 40 | −struct dirent | |
| 41 | −{ | |
| 42 | − long d_ino; /* Always zero. */ | |
| 43 | − unsigned short d_reclen; /* Always zero. */ | |
| 44 | − unsigned short d_namlen; /* Length of name in d_name. */ | |
| 45 | − char* d_name; /* File name. */ | |
| 46 | − /* NOTE: The name in the dirent structure points to the name in the | |
| 47 | − * finddata_t structure in the DIR. */ | |
| 48 | −}; | |
| 49 | − | |
| 50 | −/* | |
| 51 | − * This is an internal data structure. Good programmers will not use it | |
| 52 | − * except as an argument to one of the functions below. | |
| 53 | − */ | |
| 54 | −typedef struct | |
| 55 | −{ | |
| 56 | − /* disk transfer area for this dir */ | |
| 57 | − struct _finddata_t dd_dta; | |
| 58 | − | |
| 59 | − /* dirent struct to return from dir (NOTE: this makes this thread | |
| 60 | − * safe as long as only one thread uses a particular DIR struct at | |
| 61 | − * a time) */ | |
| 62 | − struct dirent dd_dir; | |
| 63 | − | |
| 64 | − /* _findnext handle */ | |
| 65 | − long dd_handle; | |
| 66 | − | |
| 67 | − /* | |
| 68 | − * Status of search: | |
| 69 | − * 0 = not started yet (next entry to read is first entry) | |
| 70 | − * -1 = off the end | |
| 71 | − * positive = 0 based index of next entry | |
| 72 | − */ | |
| 73 | − short dd_stat; | |
| 74 | − | |
| 75 | − /* given path for dir with search pattern (struct is extended) */ | |
| 76 | − char dd_name[1]; | |
| 77 | −} DIR; | |
| 78 | − | |
| 79 | − | |
| 80 | −DIR* opendir (const char*); | |
| 81 | −struct dirent* readdir (DIR*); | |
| 82 | −int closedir (DIR*); | |
| 83 | −void rewinddir (DIR*); | |
| 84 | −long telldir (DIR*); | |
| 85 | −void seekdir (DIR*, long); | |
| 25 | + struct dirent | |
| 26 | + { | |
| 27 | + long d_ino; /* Always zero. */ | |
| 28 | + unsigned short d_reclen; /* Always zero. */ | |
| 29 | + unsigned short d_namlen; /* Length of name in d_name. */ | |
| 30 | + char* d_name; /* File name. */ | |
| 31 | + /* NOTE: The name in the dirent structure points to the name in the | |
| 32 | + * finddata_t structure in the DIR. */ | |
| 33 | + }; | |
| 34 | + | |
| 35 | + /* | |
| 36 | + * This is an internal data structure. Good programmers will not use it | |
| 37 | + * except as an argument to one of the functions below. | |
| 38 | + * dd_stat field is now int (was short in older versions). | |
| 39 | + */ | |
| 40 | + typedef struct | |
| 41 | + { | |
| 42 | + /* disk transfer area for this dir */ | |
| 43 | + struct _finddata_t dd_dta; | |
| 44 | + | |
| 45 | + /* dirent struct to return from dir (NOTE: this makes this thread | |
| 46 | + * safe as long as only one thread uses a particular DIR struct at | |
| 47 | + * a time) */ | |
| 48 | + struct dirent dd_dir; | |
| 49 | + | |
| 50 | + /* _findnext handle */ | |
| 51 | + long dd_handle; | |
| 52 | + | |
| 53 | + /* | |
| 54 | + * Status of search: | |
| 55 | + * 0 = not started yet (next entry to read is first entry) | |
| 56 | + * -1 = off the end | |
| 57 | + * positive = 0 based index of next entry | |
| 58 | + */ | |
| 59 | + int dd_stat; | |
| 60 | + | |
| 61 | + /* given path for dir with search pattern (struct is extended) */ | |
| 62 | + char dd_name[1]; | |
| 63 | + } DIR; | |
| 64 | + | |
| 65 | + DIR* __cdecl opendir (const char*); | |
| 66 | + struct dirent* __cdecl readdir (DIR*); | |
| 67 | + int __cdecl closedir (DIR*); | |
| 68 | + void __cdecl rewinddir (DIR*); | |
| 69 | + long __cdecl telldir (DIR*); | |
| 70 | + void __cdecl seekdir (DIR*, long); | |
| 71 | + | |
| 72 | + | |
| 73 | + /* wide char versions */ | |
| 74 | + | |
| 75 | + struct _wdirent | |
| 76 | + { | |
| 77 | + long d_ino; /* Always zero. */ | |
| 78 | + unsigned short d_reclen; /* Always zero. */ | |
| 79 | + unsigned short d_namlen; /* Length of name in d_name. */ | |
| 80 | + wchar_t* d_name; /* File name. */ | |
| 81 | + /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */ | |
| 82 | + }; | |
| 83 | + | |
| 84 | + /* | |
| 85 | + * This is an internal data structure. Good programmers will not use it | |
| 86 | + * except as an argument to one of the functions below. | |
| 87 | + */ | |
| 88 | + typedef struct | |
| 89 | + { | |
| 90 | + /* disk transfer area for this dir */ | |
| 91 | + struct _wfinddata_t dd_dta; | |
| 92 | + | |
| 93 | + /* dirent struct to return from dir (NOTE: this makes this thread | |
| 94 | + * safe as long as only one thread uses a particular DIR struct at | |
| 95 | + * a time) */ | |
| 96 | + struct _wdirent dd_dir; | |
| 97 | + | |
| 98 | + /* _findnext handle */ | |
| 99 | + long dd_handle; | |
| 100 | + | |
| 101 | + /* | |
| 102 | + * Status of search: | |
| 103 | + * 0 = not started yet (next entry to read is first entry) | |
| 104 | + * -1 = off the end | |
| 105 | + * positive = 0 based index of next entry | |
| 106 | + */ | |
| 107 | + int dd_stat; | |
| 108 | + | |
| 109 | + /* given path for dir with search pattern (struct is extended) */ | |
| 110 | + wchar_t dd_name[1]; | |
| 111 | + } _WDIR; | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + _WDIR* __cdecl _wopendir (const wchar_t*); | |
| 116 | + struct _wdirent* __cdecl _wreaddir (_WDIR*); | |
| 117 | + int __cdecl _wclosedir (_WDIR*); | |
| 118 | + void __cdecl _wrewinddir (_WDIR*); | |
| 119 | + long __cdecl _wtelldir (_WDIR*); | |
| 120 | + void __cdecl _wseekdir (_WDIR*, long); | |
| 121 | + | |
| 86 | 122 | |
| 87 | 123 | #ifdef __cplusplus |
| 88 | 124 | } |
| @@ -90,7 +126,10 @@ void seekdir (DIR*, long); · 1 unmodified line | ||
| 90 | 126 | |
| 91 | 127 | #endif /* Not RC_INVOKED */ |
| 92 | 128 | |
| 129 | +#pragma pack(pop) | |
| 130 | + | |
| 93 | 131 | #endif /* Not _DIRENT_H_ */ |
| 94 | 132 | |
| 133 | + | |
| 95 | 134 | #endif /* Not __STRICT_ANSI__ */ |
| 96 | 135 | |
| @@ -1,110 +1,55 @@ | ||
| 1 | −/* | |
| 2 | − * dos.h | |
| 3 | − * | |
| 4 | − * DOS-specific functions and structures. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_DOS | |
| 7 | +#define _INC_DOS | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 28 | − | |
| 29 | −#ifndef _DOS_H_ | |
| 30 | −#define _DOS_H_ | |
| 31 | − | |
| 32 | −/* All the headers include this file. */ | |
| 33 | 9 | #include <_mingw.h> |
| 34 | − | |
| 35 | −#define __need_wchar_t | |
| 36 | −#ifndef RC_INVOKED | |
| 37 | −#include <stddef.h> | |
| 38 | −#endif /* Not RC_INVOKED */ | |
| 39 | − | |
| 40 | −/* For DOS file attributes */ | |
| 41 | 10 | #include <io.h> |
| 42 | 11 | |
| 43 | −#ifndef RC_INVOKED | |
| 12 | +#pragma pack(push,_CRT_PACKING) | |
| 44 | 13 | |
| 45 | 14 | #ifdef __cplusplus |
| 46 | 15 | extern "C" { |
| 47 | 16 | #endif |
| 48 | 17 | |
| 49 | −#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */ | |
| 50 | −#ifndef __DECLSPEC_SUPPORTED | |
| 51 | −extern unsigned int *__imp__basemajor_dll; | |
| 52 | −extern unsigned int *__imp__baseminor_dll; | |
| 53 | −extern unsigned int *__imp__baseversion_dll; | |
| 54 | −extern unsigned int *__imp__osmajor_dll; | |
| 55 | −extern unsigned int *__imp__osminor_dll; | |
| 56 | −extern unsigned int *__imp__osmode_dll; | |
| 57 | − | |
| 58 | −#define _basemajor (*__imp__basemajor_dll) | |
| 59 | −#define _baseminor (*__imp__baseminor_dll) | |
| 60 | −#define _baseversion (*__imp__baseversion_dll) | |
| 61 | −#define _osmajor (*__imp__osmajor_dll) | |
| 62 | −#define _osminor (*__imp__osminor_dll) | |
| 63 | −#define _osmode (*__imp__osmode_dll) | |
| 64 | − | |
| 65 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 66 | − | |
| 67 | −__MINGW_IMPORT unsigned int _basemajor_dll; | |
| 68 | −__MINGW_IMPORT unsigned int _baseminor_dll; | |
| 69 | −__MINGW_IMPORT unsigned int _baseversion_dll; | |
| 70 | −__MINGW_IMPORT unsigned int _osmajor_dll; | |
| 71 | −__MINGW_IMPORT unsigned int _osminor_dll; | |
| 72 | −__MINGW_IMPORT unsigned int _osmode_dll; | |
| 18 | +#ifndef _DISKFREE_T_DEFINED | |
| 19 | +#define _DISKFREE_T_DEFINED | |
| 73 | 20 | |
| 74 | −#define _basemajor _basemajor_dll | |
| 75 | −#define _baseminor _baseminor_dll | |
| 76 | −#define _baseversion _baseversion_dll | |
| 77 | −#define _osmajor _osmajor_dll | |
| 78 | −#define _osminor _osminor_dll | |
| 79 | −#define _osmode _osmode_dll | |
| 21 | + struct _diskfree_t { | |
| 22 | + unsigned total_clusters; | |
| 23 | + unsigned avail_clusters; | |
| 24 | + unsigned sectors_per_cluster; | |
| 25 | + unsigned bytes_per_sector; | |
| 26 | + }; | |
| 27 | +#endif | |
| 80 | 28 | |
| 81 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 82 | −#endif /* ! __MSVCRT__ */ | |
| 29 | +#define _A_NORMAL 0x00 | |
| 30 | +#define _A_RDONLY 0x01 | |
| 31 | +#define _A_HIDDEN 0x02 | |
| 32 | +#define _A_SYSTEM 0x04 | |
| 33 | +#define _A_SUBDIR 0x10 | |
| 34 | +#define _A_ARCH 0x20 | |
| 83 | 35 | |
| 84 | −#ifndef _DISKFREE_T_DEFINED | |
| 85 | −/* needed by _getdiskfree (also in direct.h) */ | |
| 86 | −struct _diskfree_t { | |
| 87 | − unsigned total_clusters; | |
| 88 | − unsigned avail_clusters; | |
| 89 | − unsigned sectors_per_cluster; | |
| 90 | − unsigned bytes_per_sector; | |
| 91 | −}; | |
| 92 | −#define _DISKFREE_T_DEFINED | |
| 93 | −#endif | |
| 36 | +#ifndef _GETDISKFREE_DEFINED | |
| 37 | +#define _GETDISKFREE_DEFINED | |
| 38 | + _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree); | |
| 39 | +#endif | |
| 94 | 40 | |
| 95 | −unsigned _getdiskfree (unsigned, struct _diskfree_t *); | |
| 41 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 42 | + void __cdecl _disable(void); | |
| 43 | + void __cdecl _enable(void); | |
| 44 | +#endif | |
| 96 | 45 | |
| 97 | −#ifndef _NO_OLDNAMES | |
| 98 | −# define diskfree_t _diskfree_t | |
| 46 | +#ifndef NO_OLDNAMES | |
| 47 | +#define diskfree_t _diskfree_t | |
| 99 | 48 | #endif |
| 100 | 49 | |
| 101 | 50 | #ifdef __cplusplus |
| 102 | 51 | } |
| 103 | 52 | #endif |
| 104 | 53 | |
| 105 | −#endif /* Not RC_INVOKED */ | |
| 106 | − | |
| 107 | −#endif /* Not _DOS_H_ */ | |
| 108 | − | |
| 109 | −#endif /* Not __STRICT_ANSI__ */ | |
| 110 | − | |
| 54 | +#pragma pack(pop) | |
| 55 | +#endif | |
| @@ -1,117 +1,75 @@ | ||
| 1 | −/* | |
| 2 | − * errno.h | |
| 3 | − * | |
| 4 | − * Error numbers and access to error reporting. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_ERRNO | |
| 7 | +#define _INC_ERRNO | |
| 26 | 8 | |
| 27 | −#ifndef _ERRNO_H_ | |
| 28 | −#define _ERRNO_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −/* | |
| 34 | − * Error numbers. | |
| 35 | − * TODO: Can't be sure of some of these assignments, I guessed from the | |
| 36 | − * names given by strerror and the defines in the Cygnus errno.h. A lot | |
| 37 | − * of the names from the Cygnus errno.h are not represented, and a few | |
| 38 | − * of the descriptions returned by strerror do not obviously match | |
| 39 | − * their error naming. | |
| 40 | − */ | |
| 41 | −#define EPERM 1 /* Operation not permitted */ | |
| 42 | −#define ENOFILE 2 /* No such file or directory */ | |
| 43 | −#define ENOENT 2 | |
| 44 | −#define ESRCH 3 /* No such process */ | |
| 45 | −#define EINTR 4 /* Interrupted function call */ | |
| 46 | −#define EIO 5 /* Input/output error */ | |
| 47 | −#define ENXIO 6 /* No such device or address */ | |
| 48 | −#define E2BIG 7 /* Arg list too long */ | |
| 49 | −#define ENOEXEC 8 /* Exec format error */ | |
| 50 | −#define EBADF 9 /* Bad file descriptor */ | |
| 51 | −#define ECHILD 10 /* No child processes */ | |
| 52 | −#define EAGAIN 11 /* Resource temporarily unavailable */ | |
| 53 | −#define ENOMEM 12 /* Not enough space */ | |
| 54 | −#define EACCES 13 /* Permission denied */ | |
| 55 | −#define EFAULT 14 /* Bad address */ | |
| 56 | −/* 15 - Unknown Error */ | |
| 57 | −#define EBUSY 16 /* strerror reports "Resource device" */ | |
| 58 | −#define EEXIST 17 /* File exists */ | |
| 59 | −#define EXDEV 18 /* Improper link (cross-device link?) */ | |
| 60 | −#define ENODEV 19 /* No such device */ | |
| 61 | −#define ENOTDIR 20 /* Not a directory */ | |
| 62 | −#define EISDIR 21 /* Is a directory */ | |
| 63 | −#define EINVAL 22 /* Invalid argument */ | |
| 64 | −#define ENFILE 23 /* Too many open files in system */ | |
| 65 | −#define EMFILE 24 /* Too many open files */ | |
| 66 | −#define ENOTTY 25 /* Inappropriate I/O control operation */ | |
| 67 | −/* 26 - Unknown Error */ | |
| 68 | −#define EFBIG 27 /* File too large */ | |
| 69 | −#define ENOSPC 28 /* No space left on device */ | |
| 70 | −#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */ | |
| 71 | −#define EROFS 30 /* Read-only file system */ | |
| 72 | −#define EMLINK 31 /* Too many links */ | |
| 73 | −#define EPIPE 32 /* Broken pipe */ | |
| 74 | −#define EDOM 33 /* Domain error (math functions) */ | |
| 75 | −#define ERANGE 34 /* Result too large (possibly too small) */ | |
| 76 | −/* 35 - Unknown Error */ | |
| 77 | −#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */ | |
| 78 | −#define EDEADLK 36 | |
| 79 | −/* 37 - Unknown Error */ | |
| 80 | −#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */ | |
| 81 | −#define ENOLCK 39 /* No locks available (46 in Cyg?) */ | |
| 82 | −#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */ | |
| 83 | −#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */ | |
| 84 | −#define EILSEQ 42 /* Illegal byte sequence */ | |
| 85 | − | |
| 86 | −/* | |
| 87 | − * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the | |
| 88 | − * sockets.h header provided with windows32api-0.1.2. | |
| 89 | − * You should go and put an #if 0 ... #endif around the whole block | |
| 90 | − * of errors (look at the comment above them). | |
| 91 | − */ | |
| 92 | − | |
| 93 | −#ifndef RC_INVOKED | |
| 94 | − | |
| 95 | −#ifdef __cplusplus | |
| 11 | +#ifdef __cplusplus | |
| 96 | 12 | extern "C" { |
| 97 | 13 | #endif |
| 98 | 14 | |
| 99 | −/* | |
| 100 | − * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see | |
| 101 | − * stdlib.h. | |
| 102 | − */ | |
| 103 | −#ifdef _UWIN | |
| 104 | −#undef errno | |
| 105 | −extern int errno; | |
| 106 | −#else | |
| 107 | −int* _errno(void); | |
| 108 | −#define errno (*_errno()) | |
| 15 | +#ifndef _CRT_ERRNO_DEFINED | |
| 16 | +#define _CRT_ERRNO_DEFINED | |
| 17 | + _CRTIMP extern int *__cdecl _errno(void); | |
| 18 | +#define errno (*_errno()) | |
| 19 | + | |
| 20 | + errno_t __cdecl _set_errno(int _Value); | |
| 21 | + errno_t __cdecl _get_errno(int *_Value); | |
| 109 | 22 | #endif |
| 110 | 23 | |
| 111 | −#ifdef __cplusplus | |
| 112 | −} | |
| 24 | +#define EPERM 1 | |
| 25 | +#define ENOENT 2 | |
| 26 | +#define ESRCH 3 | |
| 27 | +#define EINTR 4 | |
| 28 | +#define EIO 5 | |
| 29 | +#define ENXIO 6 | |
| 30 | +#define E2BIG 7 | |
| 31 | +#define ENOEXEC 8 | |
| 32 | +#define EBADF 9 | |
| 33 | +#define ECHILD 10 | |
| 34 | +#define EAGAIN 11 | |
| 35 | +#define ENOMEM 12 | |
| 36 | +#define EACCES 13 | |
| 37 | +#define EFAULT 14 | |
| 38 | +#define EBUSY 16 | |
| 39 | +#define EEXIST 17 | |
| 40 | +#define EXDEV 18 | |
| 41 | +#define ENODEV 19 | |
| 42 | +#define ENOTDIR 20 | |
| 43 | +#define EISDIR 21 | |
| 44 | +#define ENFILE 23 | |
| 45 | +#define EMFILE 24 | |
| 46 | +#define ENOTTY 25 | |
| 47 | +#define EFBIG 27 | |
| 48 | +#define ENOSPC 28 | |
| 49 | +#define ESPIPE 29 | |
| 50 | +#define EROFS 30 | |
| 51 | +#define EMLINK 31 | |
| 52 | +#define EPIPE 32 | |
| 53 | +#define EDOM 33 | |
| 54 | +#define EDEADLK 36 | |
| 55 | +#define ENAMETOOLONG 38 | |
| 56 | +#define ENOLCK 39 | |
| 57 | +#define ENOSYS 40 | |
| 58 | +#define ENOTEMPTY 41 | |
| 59 | + | |
| 60 | +#ifndef RC_INVOKED | |
| 61 | +#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED) | |
| 62 | +#define _SECURECRT_ERRCODE_VALUES_DEFINED | |
| 63 | +#define EINVAL 22 | |
| 64 | +#define ERANGE 34 | |
| 65 | +#define EILSEQ 42 | |
| 66 | +#define STRUNCATE 80 | |
| 67 | +#endif | |
| 113 | 68 | #endif |
| 114 | 69 | |
| 115 | −#endif /* Not RC_INVOKED */ | |
| 70 | +#define EDEADLOCK EDEADLK | |
| 116 | 71 | |
| 117 | −#endif /* Not _ERRNO_H_ */ | |
| 72 | +#ifdef __cplusplus | |
| 73 | +} | |
| 74 | +#endif | |
| 75 | +#endif | |
| @@ -1,20 +1,123 @@ | ||
| 1 | −#ifndef _EXCPT_H | |
| 2 | −#define _EXCPT_H | |
| 3 | −#if __GNUC__ >=3 | |
| 4 | −#pragma GCC system_header | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_EXCPT | |
| 7 | +#define _INC_EXCPT | |
| 8 | + | |
| 9 | +#include <_mingw.h> | |
| 10 | + | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + struct _EXCEPTION_POINTERS; | |
| 18 | + | |
| 19 | +#ifndef EXCEPTION_DISPOSITION | |
| 20 | +#define EXCEPTION_DISPOSITION int | |
| 21 | +#endif | |
| 22 | +#define ExceptionContinueExecution 0 | |
| 23 | +#define ExceptionContinueSearch 1 | |
| 24 | +#define ExceptionNestedException 2 | |
| 25 | +#define ExceptionCollidedUnwind 3 | |
| 26 | + | |
| 27 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 28 | + struct _EXCEPTION_RECORD; | |
| 29 | + struct _CONTEXT; | |
| 30 | + | |
| 31 | + EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext); | |
| 32 | +#elif defined(__ia64__) | |
| 33 | + | |
| 34 | + typedef struct _EXCEPTION_POINTERS *Exception_info_ptr; | |
| 35 | + struct _EXCEPTION_RECORD; | |
| 36 | + struct _CONTEXT; | |
| 37 | + struct _DISPATCHER_CONTEXT; | |
| 38 | + | |
| 39 | + _CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,unsigned __int64 _MemoryStackFp,unsigned __int64 _BackingStoreFp,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext,unsigned __int64 _GlobalPointer); | |
| 40 | +#elif defined(__x86_64) | |
| 41 | + | |
| 42 | + struct _EXCEPTION_RECORD; | |
| 43 | + struct _CONTEXT; | |
| 44 | +#endif | |
| 45 | + | |
| 46 | +#define GetExceptionCode _exception_code | |
| 47 | +#define exception_code _exception_code | |
| 48 | +#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info | |
| 49 | +#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info | |
| 50 | +#define AbnormalTermination _abnormal_termination | |
| 51 | +#define abnormal_termination _abnormal_termination | |
| 52 | + | |
| 53 | + unsigned long __cdecl _exception_code(void); | |
| 54 | + void *__cdecl _exception_info(void); | |
| 55 | + int __cdecl _abnormal_termination(void); | |
| 56 | + | |
| 57 | +#define EXCEPTION_EXECUTE_HANDLER 1 | |
| 58 | +#define EXCEPTION_CONTINUE_SEARCH 0 | |
| 59 | +#define EXCEPTION_CONTINUE_EXECUTION -1 | |
| 60 | + | |
| 61 | + /* CRT stuff */ | |
| 62 | + typedef void (__cdecl * _PHNDLR)(int); | |
| 63 | + | |
| 64 | + struct _XCPT_ACTION { | |
| 65 | + unsigned long XcptNum; | |
| 66 | + int SigNum; | |
| 67 | + _PHNDLR XcptAction; | |
| 68 | + }; | |
| 69 | + | |
| 70 | + extern struct _XCPT_ACTION _XcptActTab[]; | |
| 71 | + extern int _XcptActTabCount; | |
| 72 | + extern int _XcptActTabSize; | |
| 73 | + extern int _First_FPE_Indx; | |
| 74 | + extern int _Num_FPE; | |
| 75 | + | |
| 76 | + int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr); | |
| 77 | + int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr); | |
| 78 | + | |
| 79 | + /* | |
| 80 | + * The type of function that is expected as an exception handler to be | |
| 81 | + * installed with _try1. | |
| 82 | + */ | |
| 83 | + typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); | |
| 84 | + | |
| 85 | +#ifndef HAVE_NO_SEH | |
| 86 | + /* | |
| 87 | + * This is not entirely necessary, but it is the structure installed by | |
| 88 | + * the _try1 primitive below. | |
| 89 | + */ | |
| 90 | + typedef struct _EXCEPTION_REGISTRATION { | |
| 91 | + struct _EXCEPTION_REGISTRATION *prev; | |
| 92 | + EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); | |
| 93 | + } EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION; | |
| 94 | + | |
| 95 | + typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD; | |
| 96 | + typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD; | |
| 97 | +#endif | |
| 98 | + | |
| 99 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 100 | +#define __try1(pHandler) \ | |
| 101 | + __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler)); | |
| 102 | + | |
| 103 | +#define __except1 \ | |
| 104 | + __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \ | |
| 105 | + : : : "%eax"); | |
| 106 | +#elif defined(__x86_64) | |
| 107 | +#define __try1(pHandler) \ | |
| 108 | + __asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler)); | |
| 109 | + | |
| 110 | +#define __except1 \ | |
| 111 | + __asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \ | |
| 112 | + : : : "%rax"); | |
| 113 | +#else | |
| 114 | +#define __try1(pHandler) | |
| 115 | +#define __except1 | |
| 5 | 116 | #endif |
| 6 | 117 | |
| 7 | −/* FIXME: This will make some code compile. The programs will most | |
| 8 | − likely crash when an exception is raised, but at least they will | |
| 9 | − compile. */ | |
| 10 | −#ifdef __GNUC__ | |
| 11 | −#define __try | |
| 12 | −#define __except(x) if (0) /* don't execute handler */ | |
| 13 | −#define __finally | |
| 14 | − | |
| 15 | −#define _try __try | |
| 16 | −#define _except __except | |
| 17 | −#define _finally __finally | |
| 118 | +#ifdef __cplusplus | |
| 119 | +} | |
| 18 | 120 | #endif |
| 19 | 121 | |
| 122 | +#pragma pack(pop) | |
| 20 | 123 | #endif |
| @@ -1,135 +1,52 @@ | ||
| 1 | −/* | |
| 2 | − * fcntl.h | |
| 3 | − * | |
| 4 | − * Access constants for _open. Note that the permissions constants are | |
| 5 | − * in sys/stat.h (ick). | |
| 6 | − * | |
| 7 | − * This code is part of the Mingw32 package. | |
| 8 | − * | |
| 9 | − * Contributors: | |
| 10 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 27 | − | |
| 28 | −#ifndef __STRICT_ANSI__ | |
| 29 | − | |
| 30 | −#ifndef _FCNTL_H_ | |
| 31 | −#define _FCNTL_H_ | |
| 32 | − | |
| 33 | −/* All the headers include this file. */ | |
| 34 | 6 | #include <_mingw.h> |
| 35 | 7 | |
| 36 | −/* | |
| 37 | − * It appears that fcntl.h should include io.h for compatibility... | |
| 38 | − */ | |
| 39 | 8 | #include <io.h> |
| 40 | 9 | |
| 41 | −/* Specifiy one of these flags to define the access mode. */ | |
| 42 | −#define _O_RDONLY 0 | |
| 43 | −#define _O_WRONLY 1 | |
| 44 | −#define _O_RDWR 2 | |
| 45 | − | |
| 46 | −/* Mask for access mode bits in the _open flags. */ | |
| 47 | −#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) | |
| 48 | − | |
| 49 | −#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */ | |
| 50 | − | |
| 51 | −#define _O_RANDOM 0x0010 | |
| 52 | −#define _O_SEQUENTIAL 0x0020 | |
| 53 | −#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing. | |
| 54 | − * WARNING: Even if not created by _open! */ | |
| 55 | −#define _O_NOINHERIT 0x0080 | |
| 56 | − | |
| 57 | −#define _O_CREAT 0x0100 /* Create the file if it does not exist. */ | |
| 58 | −#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */ | |
| 59 | −#define _O_EXCL 0x0400 /* Open only if the file does not exist. */ | |
| 60 | − | |
| 61 | −/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */ | |
| 62 | −#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */ | |
| 63 | −#define _O_BINARY 0x8000 /* Input and output is not translated. */ | |
| 64 | −#define _O_RAW _O_BINARY | |
| 65 | − | |
| 66 | −#ifndef _NO_OLDNAMES | |
| 67 | − | |
| 68 | −/* POSIX/Non-ANSI names for increased portability */ | |
| 69 | −#define O_RDONLY _O_RDONLY | |
| 70 | −#define O_WRONLY _O_WRONLY | |
| 71 | −#define O_RDWR _O_RDWR | |
| 72 | −#define O_ACCMODE _O_ACCMODE | |
| 73 | −#define O_APPEND _O_APPEND | |
| 74 | −#define O_CREAT _O_CREAT | |
| 75 | −#define O_TRUNC _O_TRUNC | |
| 76 | −#define O_EXCL _O_EXCL | |
| 77 | −#define O_TEXT _O_TEXT | |
| 78 | −#define O_BINARY _O_BINARY | |
| 79 | −#define O_TEMPORARY _O_TEMPORARY | |
| 80 | −#define O_NOINHERIT _O_NOINHERIT | |
| 81 | −#define O_SEQENTIAL _O_SEQUENTIAL | |
| 82 | −#define O_RANDOM _O_RANDOM | |
| 83 | − | |
| 84 | −#endif /* Not _NO_OLDNAMES */ | |
| 85 | − | |
| 86 | − | |
| 87 | −#ifndef RC_INVOKED | |
| 88 | − | |
| 89 | −/* | |
| 90 | − * This variable determines the default file mode. | |
| 91 | − * TODO: Which flags work? | |
| 92 | − */ | |
| 93 | −#ifndef __DECLSPEC_SUPPORTED | |
| 94 | − | |
| 95 | −#ifdef __MSVCRT__ | |
| 96 | −extern unsigned int* __imp__fmode; | |
| 97 | −#define _fmode (*__imp__fmode) | |
| 98 | −#else | |
| 99 | −/* CRTDLL */ | |
| 100 | −extern unsigned int* __imp__fmode_dll; | |
| 101 | −#define _fmode (*__imp__fmode_dll) | |
| 10 | +#ifndef _INC_FCNTL | |
| 11 | +#define _INC_FCNTL | |
| 12 | + | |
| 13 | +#define _O_RDONLY 0x0000 | |
| 14 | +#define _O_WRONLY 0x0001 | |
| 15 | +#define _O_RDWR 0x0002 | |
| 16 | +#define _O_APPEND 0x0008 | |
| 17 | +#define _O_CREAT 0x0100 | |
| 18 | +#define _O_TRUNC 0x0200 | |
| 19 | +#define _O_EXCL 0x0400 | |
| 20 | +#define _O_TEXT 0x4000 | |
| 21 | +#define _O_BINARY 0x8000 | |
| 22 | +#define _O_WTEXT 0x10000 | |
| 23 | +#define _O_U16TEXT 0x20000 | |
| 24 | +#define _O_U8TEXT 0x40000 | |
| 25 | +#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) | |
| 26 | + | |
| 27 | +#define _O_RAW _O_BINARY | |
| 28 | +#define _O_NOINHERIT 0x0080 | |
| 29 | +#define _O_TEMPORARY 0x0040 | |
| 30 | +#define _O_SHORT_LIVED 0x1000 | |
| 31 | + | |
| 32 | +#define _O_SEQUENTIAL 0x0020 | |
| 33 | +#define _O_RANDOM 0x0010 | |
| 34 | + | |
| 35 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 36 | +#define O_RDONLY _O_RDONLY | |
| 37 | +#define O_WRONLY _O_WRONLY | |
| 38 | +#define O_RDWR _O_RDWR | |
| 39 | +#define O_APPEND _O_APPEND | |
| 40 | +#define O_CREAT _O_CREAT | |
| 41 | +#define O_TRUNC _O_TRUNC | |
| 42 | +#define O_EXCL _O_EXCL | |
| 43 | +#define O_TEXT _O_TEXT | |
| 44 | +#define O_BINARY _O_BINARY | |
| 45 | +#define O_RAW _O_BINARY | |
| 46 | +#define O_TEMPORARY _O_TEMPORARY | |
| 47 | +#define O_NOINHERIT _O_NOINHERIT | |
| 48 | +#define O_SEQUENTIAL _O_SEQUENTIAL | |
| 49 | +#define O_RANDOM _O_RANDOM | |
| 50 | +#define O_ACCMODE _O_ACCMODE | |
| 102 | 51 | #endif |
| 103 | − | |
| 104 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 105 | − | |
| 106 | −#ifdef __MSVCRT__ | |
| 107 | −__MINGW_IMPORT unsigned int _fmode; | |
| 108 | −#else /* ! __MSVCRT__ */ | |
| 109 | −__MINGW_IMPORT unsigned int _fmode_dll; | |
| 110 | −#define _fmode _fmode_dll | |
| 111 | −#endif /* ! __MSVCRT__ */ | |
| 112 | − | |
| 113 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 114 | − | |
| 115 | − | |
| 116 | −#ifdef __cplusplus | |
| 117 | −extern "C" { | |
| 118 | 52 | #endif |
| 119 | − | |
| 120 | −int _setmode (int, int); | |
| 121 | − | |
| 122 | −#ifndef _NO_OLDNAMES | |
| 123 | −int setmode (int, int); | |
| 124 | −#endif /* Not _NO_OLDNAMES */ | |
| 125 | − | |
| 126 | −#ifdef __cplusplus | |
| 127 | −} | |
| 128 | −#endif | |
| 129 | − | |
| 130 | −#endif /* Not RC_INVOKED */ | |
| 131 | − | |
| 132 | −#endif /* Not _FCNTL_H_ */ | |
| 133 | − | |
| 134 | −#endif /* Not __STRICT_ANSI__ */ | |
| 135 | − | |
| @@ -1,15 +1,49 @@ | ||
| 1 | −#ifndef _FENV_H | |
| 2 | −#define _FENV_H | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _FENV_H_ | |
| 7 | +#define _FENV_H_ | |
| 3 | 8 | |
| 9 | +#include <_mingw.h> | |
| 10 | + | |
| 11 | +/* FPU status word exception flags */ | |
| 12 | +#define FE_INVALID 0x01 | |
| 13 | +#define FE_DENORMAL 0x02 | |
| 14 | +#define FE_DIVBYZERO 0x04 | |
| 15 | +#define FE_OVERFLOW 0x08 | |
| 16 | +#define FE_UNDERFLOW 0x10 | |
| 17 | +#define FE_INEXACT 0x20 | |
| 18 | +#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \ | |
| 19 | + | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) | |
| 20 | + | |
| 21 | +/* FPU control word rounding flags */ | |
| 22 | +#define FE_TONEAREST 0x0000 | |
| 23 | +#define FE_DOWNWARD 0x0400 | |
| 24 | +#define FE_UPWARD 0x0800 | |
| 25 | +#define FE_TOWARDZERO 0x0c00 | |
| 26 | + | |
| 27 | +/* The MXCSR exception flags are the same as the | |
| 28 | + FE flags. */ | |
| 29 | +#define __MXCSR_EXCEPT_FLAG_SHIFT 0 | |
| 30 | + | |
| 31 | +/* How much to shift FE status word exception flags | |
| 32 | + to get MXCSR rounding flags, */ | |
| 33 | +#define __MXCSR_ROUND_FLAG_SHIFT 3 | |
| 34 | + | |
| 35 | +#ifndef RC_INVOKED | |
| 4 | 36 | /* |
| 5 | 37 | For now, support only for the basic abstraction of flags that are |
| 6 | − either set or clear. fexcept_t could be structure that holds more info | |
| 7 | − about the fp environment. | |
| 38 | + either set or clear. fexcept_t could be structure that holds more | |
| 39 | + info about the fp environment. | |
| 8 | 40 | */ |
| 9 | 41 | typedef unsigned short fexcept_t; |
| 10 | 42 | |
| 11 | −/* This 28-byte struct represents the entire floating point | |
| 12 | − environment as stored by fnstenv or fstenv */ | |
| 43 | +/* This 32-byte struct represents the entire floating point | |
| 44 | + environment as stored by fnstenv or fstenv, augmented by | |
| 45 | + the contents of the MXCSR register, as stored by stmxcsr | |
| 46 | + (if CPU supports it). */ | |
| 13 | 47 | typedef struct |
| 14 | 48 | { |
| 15 | 49 | unsigned short __control_word; |
| @@ -24,58 +58,47 @@ typedef struct · 8 unmodified lines | ||
| 24 | 58 | unsigned int __data_offset; |
| 25 | 59 | unsigned short __data_selector; |
| 26 | 60 | unsigned short __unused3; |
| 61 | + unsigned int __mxcsr; /* contents of the MXCSR register */ | |
| 27 | 62 | } fenv_t; |
| 28 | 63 | |
| 29 | 64 | |
| 30 | −/* FPU status word exception flags */ | |
| 31 | −#define FE_INVALID 0x01 | |
| 32 | −#define FE_DENORMAL 0x02 | |
| 33 | −#define FE_DIVBYZERO 0x04 | |
| 34 | −#define FE_OVERFLOW 0x08 | |
| 35 | −#define FE_UNDERFLOW 0x10 | |
| 36 | −#define FE_INEXACT 0x20 | |
| 37 | −#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \ | |
| 38 | − | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) | |
| 39 | − | |
| 40 | −/* FPU control word rounding flags */ | |
| 41 | −#define FE_TONEAREST 0x0000 | |
| 42 | −#define FE_DOWNWARD 0x0400 | |
| 43 | −#define FE_UPWARD 0x0800 | |
| 44 | −#define FE_TOWARDZERO 0x0c00 | |
| 65 | +/*The C99 standard (7.6.9) allows us to define implementation-specific macros for | |
| 66 | + different fp environments */ | |
| 67 | + | |
| 68 | +/* The default Intel x87 floating point environment (64-bit mantissa) */ | |
| 69 | +#define FE_PC64_ENV ((const fenv_t *)-1) | |
| 45 | 70 | |
| 71 | +/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */ | |
| 72 | +#define FE_PC53_ENV ((const fenv_t *)-2) | |
| 46 | 73 | |
| 47 | −/* The default floating point environment */ | |
| 48 | −#define FE_DFL_ENV ((const fenv_t *)-1) | |
| 74 | +/* The FE_DFL_ENV macro is required by standard. | |
| 75 | + fesetenv will use the environment set at app startup.*/ | |
| 76 | +#define FE_DFL_ENV ((const fenv_t *) 0) | |
| 49 | 77 | |
| 50 | − | |
| 51 | −#ifndef RC_INVOKED | |
| 52 | 78 | #ifdef __cplusplus |
| 53 | 79 | extern "C" { |
| 54 | 80 | #endif |
| 55 | 81 | |
| 56 | − | |
| 57 | 82 | /*TODO: Some of these could be inlined */ |
| 58 | 83 | /* 7.6.2 Exception */ |
| 59 | 84 | |
| 60 | −extern int feclearexcept (int); | |
| 61 | −extern int fegetexceptflag (fexcept_t * flagp, int excepts); | |
| 62 | −extern int feraiseexcept (int excepts ); | |
| 63 | −extern int fesetexceptflag (const fexcept_t *, int); | |
| 64 | −extern int fetestexcept (int excepts); | |
| 65 | − | |
| 85 | +extern int __cdecl feclearexcept (int); | |
| 86 | +extern int __cdecl fegetexceptflag (fexcept_t * flagp, int excepts); | |
| 87 | +extern int __cdecl feraiseexcept (int excepts ); | |
| 88 | +extern int __cdecl fesetexceptflag (const fexcept_t *, int); | |
| 89 | +extern int __cdecl fetestexcept (int excepts); | |
| 66 | 90 | |
| 67 | 91 | /* 7.6.3 Rounding */ |
| 68 | 92 | |
| 69 | −extern int fegetround (void); | |
| 70 | −extern int fesetround (int mode); | |
| 71 | − | |
| 93 | +extern int __cdecl fegetround (void); | |
| 94 | +extern int __cdecl fesetround (int mode); | |
| 72 | 95 | |
| 73 | 96 | /* 7.6.4 Environment */ |
| 74 | 97 | |
| 75 | −extern int fegetenv (fenv_t * envp); | |
| 76 | −extern int fesetenv (const fenv_t * ); | |
| 77 | −extern int feupdateenv (const fenv_t *); | |
| 78 | −extern int feholdexcept (fenv_t *); | |
| 98 | +extern int __cdecl fegetenv(fenv_t * envp); | |
| 99 | +extern int __cdecl fesetenv(const fenv_t * ); | |
| 100 | +extern int __cdecl feupdateenv(const fenv_t *); | |
| 101 | +extern int __cdecl feholdexcept(fenv_t *); | |
| 79 | 102 | |
| 80 | 103 | #ifdef __cplusplus |
| 81 | 104 | } |
| @@ -1,224 +0,0 @@ | ||
| 1 | −/* | |
| 2 | − * float.h | |
| 3 | − * | |
| 4 | − * Constants related to floating point arithmetic. | |
| 5 | − * | |
| 6 | − * Also included here are some non-ANSI bits for accessing the floating | |
| 7 | − * point controller. | |
| 8 | − * | |
| 9 | − * NOTE: GCC provides float.h, and it is probably more accurate than this, | |
| 10 | − * but it doesn't include the non-standard stuff for accessing the | |
| 11 | − * fp controller. (TODO: Move those bits elsewhere?) Thus it is | |
| 12 | − * probably not a good idea to use the GCC supplied version instead | |
| 13 | − * of this header. | |
| 14 | − * | |
| 15 | − * This file is part of the Mingw32 package. | |
| 16 | − * | |
| 17 | − * Contributors: | |
| 18 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 19 | − * | |
| 20 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 21 | − * | |
| 22 | − * This source code is offered for use in the public domain. You may | |
| 23 | − * use, modify or distribute it freely. | |
| 24 | − * | |
| 25 | − * This code is distributed in the hope that it will be useful but | |
| 26 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 27 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 28 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 29 | − * | |
| 30 | − * $Revision: 1.2 $ | |
| 31 | − * $Author: bellard $ | |
| 32 | − * $Date: 2005/04/17 13:14:29 $ | |
| 33 | − * | |
| 34 | − */ | |
| 35 | − | |
| 36 | −#ifndef _FLOAT_H_ | |
| 37 | −#define _FLOAT_H_ | |
| 38 | − | |
| 39 | −/* All the headers include this file. */ | |
| 40 | −#include <_mingw.h> | |
| 41 | − | |
| 42 | −#define FLT_ROUNDS 1 | |
| 43 | −#define FLT_GUARD 1 | |
| 44 | −#define FLT_NORMALIZE 1 | |
| 45 | − | |
| 46 | −/* | |
| 47 | − * The characteristics of float. | |
| 48 | − */ | |
| 49 | − | |
| 50 | −/* The radix for floating point representation. */ | |
| 51 | −#define FLT_RADIX 2 | |
| 52 | − | |
| 53 | −/* Decimal digits of precision. */ | |
| 54 | −#define FLT_DIG 6 | |
| 55 | − | |
| 56 | −/* Smallest number such that 1+x != 1 */ | |
| 57 | −#define FLT_EPSILON 1.19209290e-07F | |
| 58 | − | |
| 59 | −/* The number of base FLT_RADIX digits in the mantissa. */ | |
| 60 | −#define FLT_MANT_DIG 24 | |
| 61 | − | |
| 62 | −/* The maximum floating point number. */ | |
| 63 | −#define FLT_MAX 3.40282347e+38F | |
| 64 | − | |
| 65 | −/* Maximum n such that FLT_RADIX^n - 1 is representable. */ | |
| 66 | −#define FLT_MAX_EXP 128 | |
| 67 | − | |
| 68 | −/* Maximum n such that 10^n is representable. */ | |
| 69 | −#define FLT_MAX_10_EXP 38 | |
| 70 | − | |
| 71 | −/* Minimum normalized floating-point number. */ | |
| 72 | −#define FLT_MIN 1.17549435e-38F | |
| 73 | − | |
| 74 | −/* Minimum n such that FLT_RADIX^n is a normalized number. */ | |
| 75 | −#define FLT_MIN_EXP (-125) | |
| 76 | − | |
| 77 | −/* Minimum n such that 10^n is a normalized number. */ | |
| 78 | −#define FLT_MIN_10_EXP (-37) | |
| 79 | − | |
| 80 | − | |
| 81 | −/* | |
| 82 | − * The characteristics of double. | |
| 83 | − */ | |
| 84 | −#define DBL_DIG 15 | |
| 85 | −#define DBL_EPSILON 1.1102230246251568e-16 | |
| 86 | −#define DBL_MANT_DIG 53 | |
| 87 | −#define DBL_MAX 1.7976931348623157e+308 | |
| 88 | −#define DBL_MAX_EXP 1024 | |
| 89 | −#define DBL_MAX_10_EXP 308 | |
| 90 | −#define DBL_MIN 2.2250738585072014e-308 | |
| 91 | −#define DBL_MIN_EXP (-1021) | |
| 92 | −#define DBL_MIN_10_EXP (-307) | |
| 93 | − | |
| 94 | − | |
| 95 | −/* | |
| 96 | − * The characteristics of long double. | |
| 97 | − * NOTE: long double is the same as double. | |
| 98 | − */ | |
| 99 | −#define LDBL_DIG 15 | |
| 100 | −#define LDBL_EPSILON 1.1102230246251568e-16L | |
| 101 | −#define LDBL_MANT_DIG 53 | |
| 102 | −#define LDBL_MAX 1.7976931348623157e+308L | |
| 103 | −#define LDBL_MAX_EXP 1024 | |
| 104 | −#define LDBL_MAX_10_EXP 308 | |
| 105 | −#define LDBL_MIN 2.2250738585072014e-308L | |
| 106 | −#define LDBL_MIN_EXP (-1021) | |
| 107 | −#define LDBL_MIN_10_EXP (-307) | |
| 108 | − | |
| 109 | − | |
| 110 | −/* | |
| 111 | − * Functions and definitions for controlling the FPU. | |
| 112 | − */ | |
| 113 | −#ifndef __STRICT_ANSI__ | |
| 114 | − | |
| 115 | −/* TODO: These constants are only valid for x86 machines */ | |
| 116 | − | |
| 117 | −/* Control word masks for unMask */ | |
| 118 | −#define _MCW_EM 0x0008001F /* Error masks */ | |
| 119 | −#define _MCW_IC 0x00040000 /* Infinity */ | |
| 120 | −#define _MCW_RC 0x00000300 /* Rounding */ | |
| 121 | −#define _MCW_PC 0x00030000 /* Precision */ | |
| 122 | − | |
| 123 | −/* Control word values for unNew (use with related unMask above) */ | |
| 124 | −#define _EM_INVALID 0x00000010 | |
| 125 | −#define _EM_DENORMAL 0x00080000 | |
| 126 | −#define _EM_ZERODIVIDE 0x00000008 | |
| 127 | −#define _EM_OVERFLOW 0x00000004 | |
| 128 | −#define _EM_UNDERFLOW 0x00000002 | |
| 129 | −#define _EM_INEXACT 0x00000001 | |
| 130 | −#define _IC_AFFINE 0x00040000 | |
| 131 | −#define _IC_PROJECTIVE 0x00000000 | |
| 132 | −#define _RC_CHOP 0x00000300 | |
| 133 | −#define _RC_UP 0x00000200 | |
| 134 | −#define _RC_DOWN 0x00000100 | |
| 135 | −#define _RC_NEAR 0x00000000 | |
| 136 | −#define _PC_24 0x00020000 | |
| 137 | −#define _PC_53 0x00010000 | |
| 138 | −#define _PC_64 0x00000000 | |
| 139 | − | |
| 140 | −/* These are also defined in Mingw math.h, needed to work around | |
| 141 | − GCC build issues. */ | |
| 142 | −/* Return values for fpclass. */ | |
| 143 | −#ifndef __MINGW_FPCLASS_DEFINED | |
| 144 | −#define __MINGW_FPCLASS_DEFINED 1 | |
| 145 | −#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ | |
| 146 | −#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ | |
| 147 | −#define _FPCLASS_NINF 0x0004 /* Negative Infinity */ | |
| 148 | −#define _FPCLASS_NN 0x0008 /* Negative Normal */ | |
| 149 | −#define _FPCLASS_ND 0x0010 /* Negative Denormal */ | |
| 150 | −#define _FPCLASS_NZ 0x0020 /* Negative Zero */ | |
| 151 | −#define _FPCLASS_PZ 0x0040 /* Positive Zero */ | |
| 152 | −#define _FPCLASS_PD 0x0080 /* Positive Denormal */ | |
| 153 | −#define _FPCLASS_PN 0x0100 /* Positive Normal */ | |
| 154 | −#define _FPCLASS_PINF 0x0200 /* Positive Infinity */ | |
| 155 | −#endif /* __MINGW_FPCLASS_DEFINED */ | |
| 156 | − | |
| 157 | −/* invalid subconditions (_SW_INVALID also set) */ | |
| 158 | −#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ | |
| 159 | −#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ | |
| 160 | −#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ | |
| 161 | −#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ | |
| 162 | − | |
| 163 | −/* Floating point error signals and return codes */ | |
| 164 | −#define _FPE_INVALID 0x81 | |
| 165 | −#define _FPE_DENORMAL 0x82 | |
| 166 | −#define _FPE_ZERODIVIDE 0x83 | |
| 167 | −#define _FPE_OVERFLOW 0x84 | |
| 168 | −#define _FPE_UNDERFLOW 0x85 | |
| 169 | −#define _FPE_INEXACT 0x86 | |
| 170 | −#define _FPE_UNEMULATED 0x87 | |
| 171 | −#define _FPE_SQRTNEG 0x88 | |
| 172 | −#define _FPE_STACKOVERFLOW 0x8a | |
| 173 | −#define _FPE_STACKUNDERFLOW 0x8b | |
| 174 | −#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ | |
| 175 | − | |
| 176 | −#ifndef RC_INVOKED | |
| 177 | − | |
| 178 | −#ifdef __cplusplus | |
| 179 | −extern "C" { | |
| 180 | −#endif | |
| 181 | − | |
| 182 | −/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask), | |
| 183 | − * i.e. change the bits in unMask to have the values they have in unNew, | |
| 184 | − * leaving other bits unchanged. */ | |
| 185 | −unsigned int _controlfp (unsigned int unNew, unsigned int unMask); | |
| 186 | −unsigned int _control87 (unsigned int unNew, unsigned int unMask); | |
| 187 | − | |
| 188 | − | |
| 189 | −unsigned int _clearfp (void); /* Clear the FPU status word */ | |
| 190 | −unsigned int _statusfp (void); /* Report the FPU status word */ | |
| 191 | −#define _clear87 _clearfp | |
| 192 | −#define _status87 _statusfp | |
| 193 | − | |
| 194 | −void _fpreset (void); /* Reset the FPU */ | |
| 195 | −void fpreset (void); | |
| 196 | − | |
| 197 | −/* Global 'variable' for the current floating point error code. */ | |
| 198 | −int * __fpecode(void); | |
| 199 | −#define _fpecode (*(__fpecode())) | |
| 200 | − | |
| 201 | −/* | |
| 202 | − * IEEE recommended functions | |
| 203 | − */ | |
| 204 | − | |
| 205 | −double _chgsign (double); | |
| 206 | −double _copysign (double, double); | |
| 207 | −double _logb (double); | |
| 208 | −double _nextafter (double, double); | |
| 209 | −double _scalb (double, long); | |
| 210 | − | |
| 211 | −int _finite (double); | |
| 212 | −int _fpclass (double); | |
| 213 | −int _isnan (double); | |
| 214 | − | |
| 215 | −#ifdef __cplusplus | |
| 216 | −} | |
| 217 | −#endif | |
| 218 | − | |
| 219 | −#endif /* Not RC_INVOKED */ | |
| 220 | − | |
| 221 | −#endif /* Not __STRICT_ANSI__ */ | |
| 222 | − | |
| 223 | −#endif /* _FLOAT_H_ */ | |
| 224 | − | |
| @@ -1,8 +1,14 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* 7.8 Format conversion of integer types <inttypes.h> */ |
| 2 | 7 | |
| 3 | −#ifndef _INTTYPES_H | |
| 4 | −#define _INTTYPES_H | |
| 8 | +#ifndef _INTTYPES_H_ | |
| 9 | +#define _INTTYPES_H_ | |
| 5 | 10 | |
| 11 | +#include <_mingw.h> | |
| 6 | 12 | #include <stdint.h> |
| 7 | 13 | #define __need_wchar_t |
| 8 | 14 | #include <stddef.h> |
| @@ -43,7 +49,6 @@ typedef struct { · 34 unmodified lines | ||
| 43 | 49 | #define PRIdFAST64 "I64d" |
| 44 | 50 | |
| 45 | 51 | #define PRIdMAX "I64d" |
| 46 | −#define PRIdPTR "d" | |
| 47 | 52 | |
| 48 | 53 | #define PRIi8 "i" |
| 49 | 54 | #define PRIi16 "i" |
| @@ -61,7 +66,6 @@ typedef struct { · 11 unmodified lines | ||
| 61 | 66 | #define PRIiFAST64 "I64i" |
| 62 | 67 | |
| 63 | 68 | #define PRIiMAX "I64i" |
| 64 | −#define PRIiPTR "i" | |
| 65 | 69 | |
| 66 | 70 | #define PRIo8 "o" |
| 67 | 71 | #define PRIo16 "o" |
| @@ -80,8 +84,6 @@ typedef struct { · 12 unmodified lines | ||
| 80 | 84 | |
| 81 | 85 | #define PRIoMAX "I64o" |
| 82 | 86 | |
| 83 | −#define PRIoPTR "o" | |
| 84 | − | |
| 85 | 87 | /* fprintf macros for unsigned types */ |
| 86 | 88 | #define PRIu8 "u" |
| 87 | 89 | #define PRIu16 "u" |
| @@ -100,7 +102,6 @@ typedef struct { · 12 unmodified lines | ||
| 100 | 102 | #define PRIuFAST64 "I64u" |
| 101 | 103 | |
| 102 | 104 | #define PRIuMAX "I64u" |
| 103 | −#define PRIuPTR "u" | |
| 104 | 105 | |
| 105 | 106 | #define PRIx8 "x" |
| 106 | 107 | #define PRIx16 "x" |
| @@ -118,7 +119,6 @@ typedef struct { · 11 unmodified lines | ||
| 118 | 119 | #define PRIxFAST64 "I64x" |
| 119 | 120 | |
| 120 | 121 | #define PRIxMAX "I64x" |
| 121 | −#define PRIxPTR "x" | |
| 122 | 122 | |
| 123 | 123 | #define PRIX8 "X" |
| 124 | 124 | #define PRIX16 "X" |
| @@ -136,7 +136,6 @@ typedef struct { · 11 unmodified lines | ||
| 136 | 136 | #define PRIXFAST64 "I64X" |
| 137 | 137 | |
| 138 | 138 | #define PRIXMAX "I64X" |
| 139 | −#define PRIXPTR "X" | |
| 140 | 139 | |
| 141 | 140 | /* |
| 142 | 141 | * fscanf macros for signed int types |
| @@ -158,7 +157,6 @@ typedef struct { · 15 unmodified lines | ||
| 158 | 157 | #define SCNdFAST64 "I64d" |
| 159 | 158 | |
| 160 | 159 | #define SCNdMAX "I64d" |
| 161 | −#define SCNdPTR "d" | |
| 162 | 160 | |
| 163 | 161 | #define SCNi16 "hi" |
| 164 | 162 | #define SCNi32 "i" |
| @@ -173,7 +171,6 @@ typedef struct { · 8 unmodified lines | ||
| 173 | 171 | #define SCNiFAST64 "I64i" |
| 174 | 172 | |
| 175 | 173 | #define SCNiMAX "I64i" |
| 176 | −#define SCNiPTR "i" | |
| 177 | 174 | |
| 178 | 175 | #define SCNo16 "ho" |
| 179 | 176 | #define SCNo32 "o" |
| @@ -188,7 +185,6 @@ typedef struct { · 8 unmodified lines | ||
| 188 | 185 | #define SCNoFAST64 "I64o" |
| 189 | 186 | |
| 190 | 187 | #define SCNoMAX "I64o" |
| 191 | −#define SCNoPTR "o" | |
| 192 | 188 | |
| 193 | 189 | #define SCNx16 "hx" |
| 194 | 190 | #define SCNx32 "x" |
| @@ -203,8 +199,6 @@ typedef struct { · 8 unmodified lines | ||
| 203 | 199 | #define SCNxFAST64 "I64x" |
| 204 | 200 | |
| 205 | 201 | #define SCNxMAX "I64x" |
| 206 | −#define SCNxPTR "x" | |
| 207 | − | |
| 208 | 202 | |
| 209 | 203 | /* fscanf macros for unsigned int types */ |
| 210 | 204 | |
| @@ -221,7 +215,32 @@ typedef struct { · 10 unmodified lines | ||
| 221 | 215 | #define SCNuFAST64 "I64u" |
| 222 | 216 | |
| 223 | 217 | #define SCNuMAX "I64u" |
| 224 | −#define SCNuPTR "u" | |
| 218 | + | |
| 219 | +#ifdef _WIN64 | |
| 220 | +#define PRIdPTR "I64d" | |
| 221 | +#define PRIiPTR "I64i" | |
| 222 | +#define PRIoPTR "I64o" | |
| 223 | +#define PRIuPTR "I64u" | |
| 224 | +#define PRIxPTR "I64x" | |
| 225 | +#define PRIXPTR "I64X" | |
| 226 | +#define SCNdPTR "I64d" | |
| 227 | +#define SCNiPTR "I64i" | |
| 228 | +#define SCNoPTR "I64o" | |
| 229 | +#define SCNxPTR "I64x" | |
| 230 | +#define SCNuPTR "I64u" | |
| 231 | +#else | |
| 232 | +#define PRIdPTR "d" | |
| 233 | +#define PRIiPTR "i" | |
| 234 | +#define PRIoPTR "o" | |
| 235 | +#define PRIuPTR "u" | |
| 236 | +#define PRIxPTR "x" | |
| 237 | +#define PRIXPTR "X" | |
| 238 | +#define SCNdPTR "d" | |
| 239 | +#define SCNiPTR "i" | |
| 240 | +#define SCNoPTR "o" | |
| 241 | +#define SCNxPTR "x" | |
| 242 | + #define SCNuPTR "u" | |
| 243 | +#endif | |
| 225 | 244 | |
| 226 | 245 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 227 | 246 | /* |
| @@ -254,19 +273,22 @@ typedef struct { · 26 unmodified lines | ||
| 254 | 273 | |
| 255 | 274 | #endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */ |
| 256 | 275 | |
| 257 | −extern inline intmax_t imaxabs (intmax_t j) | |
| 276 | +intmax_t __cdecl imaxabs (intmax_t j); | |
| 277 | +__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j) | |
| 258 | 278 | {return (j >= 0 ? j : -j);} |
| 259 | −imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom); | |
| 279 | +imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom); | |
| 260 | 280 | |
| 261 | 281 | /* 7.8.2 Conversion functions for greatest-width integer types */ |
| 262 | 282 | |
| 263 | −intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); | |
| 264 | −uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); | |
| 283 | +intmax_t __cdecl strtoimax (const char* __restrict__ nptr, | |
| 284 | + char** __restrict__ endptr, int base); | |
| 285 | +uintmax_t __cdecl strtoumax (const char* __restrict__ nptr, | |
| 286 | + char** __restrict__ endptr, int base); | |
| 265 | 287 | |
| 266 | −intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, | |
| 267 | − int base); | |
| 268 | −uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, | |
| 269 | − int base); | |
| 288 | +intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr, | |
| 289 | + wchar_t** __restrict__ endptr, int base); | |
| 290 | +uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr, | |
| 291 | + wchar_t** __restrict__ endptr, int base); | |
| 270 | 292 | |
| 271 | 293 | #ifdef __cplusplus |
| 272 | 294 | } |
| @@ -1,296 +1,418 @@ | ||
| 1 | −/* | |
| 2 | − * io.h | |
| 3 | − * | |
| 4 | − * System level I/O functions and types. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 25 | − */ | |
| 26 | − | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 28 | 1 | |
| 29 | −#ifndef _IO_H_ | |
| 30 | −#define _IO_H_ | |
| 2 | +/** | |
| 3 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 4 | + * This file is part of the w64 mingw-runtime package. | |
| 5 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 6 | + */ | |
| 7 | +#ifndef _IO_H_ | |
| 8 | +#define _IO_H_ | |
| 31 | 9 | |
| 32 | −/* All the headers include this file. */ | |
| 33 | 10 | #include <_mingw.h> |
| 11 | +#include <string.h> | |
| 34 | 12 | |
| 35 | −/* We need the definition of FILE anyway... */ | |
| 36 | −#include <stdio.h> | |
| 37 | − | |
| 38 | −/* MSVC's io.h contains the stuff from dir.h, so I will too. | |
| 39 | − * NOTE: This also defines off_t, the file offset type, through | |
| 40 | − * an inclusion of sys/types.h */ | |
| 41 | −#ifndef __STRICT_ANSI__ | |
| 13 | +#pragma pack(push,_CRT_PACKING) | |
| 42 | 14 | |
| 43 | −#include <sys/types.h> /* To get time_t. */ | |
| 15 | +#ifndef _POSIX_ | |
| 44 | 16 | |
| 45 | −/* | |
| 46 | − * Attributes of files as returned by _findfirst et al. | |
| 47 | − */ | |
| 48 | −#define _A_NORMAL 0x00000000 | |
| 49 | −#define _A_RDONLY 0x00000001 | |
| 50 | −#define _A_HIDDEN 0x00000002 | |
| 51 | −#define _A_SYSTEM 0x00000004 | |
| 52 | −#define _A_VOLID 0x00000008 | |
| 53 | −#define _A_SUBDIR 0x00000010 | |
| 54 | −#define _A_ARCH 0x00000020 | |
| 55 | − | |
| 56 | − | |
| 57 | −#ifndef RC_INVOKED | |
| 17 | +#ifdef __cplusplus | |
| 18 | +extern "C" { | |
| 19 | +#endif | |
| 58 | 20 | |
| 59 | −#ifndef _FSIZE_T_DEFINED | |
| 60 | −typedef unsigned long _fsize_t; | |
| 21 | +_CRTIMP char* __cdecl _getcwd (char*, int); | |
| 22 | +#ifndef _FSIZE_T_DEFINED | |
| 23 | + typedef unsigned long _fsize_t; | |
| 61 | 24 | #define _FSIZE_T_DEFINED |
| 62 | 25 | #endif |
| 63 | 26 | |
| 64 | −/* | |
| 65 | − * The following structure is filled in by _findfirst or _findnext when | |
| 66 | − * they succeed in finding a match. | |
| 67 | − */ | |
| 68 | −struct _finddata_t | |
| 69 | −{ | |
| 70 | − unsigned attrib; /* Attributes, see constants above. */ | |
| 71 | − time_t time_create; | |
| 72 | − time_t time_access; /* always midnight local time */ | |
| 73 | − time_t time_write; | |
| 74 | − _fsize_t size; | |
| 75 | − char name[FILENAME_MAX]; /* may include spaces. */ | |
| 76 | −}; | |
| 77 | − | |
| 78 | −struct _finddatai64_t { | |
| 79 | − unsigned attrib; | |
| 80 | − time_t time_create; | |
| 81 | − time_t time_access; | |
| 82 | − time_t time_write; | |
| 83 | − __int64 size; | |
| 84 | − char name[FILENAME_MAX]; | |
| 85 | −}; | |
| 27 | +#ifndef _FINDDATA_T_DEFINED | |
| 28 | + | |
| 29 | + struct _finddata32_t { | |
| 30 | + unsigned attrib; | |
| 31 | + __time32_t time_create; | |
| 32 | + __time32_t time_access; | |
| 33 | + __time32_t time_write; | |
| 34 | + _fsize_t size; | |
| 35 | + char name[260]; | |
| 36 | + }; | |
| 37 | + | |
| 38 | +/*#if _INTEGRAL_MAX_BITS >= 64*/ | |
| 39 | + | |
| 40 | + struct _finddata32i64_t { | |
| 41 | + unsigned attrib; | |
| 42 | + __time32_t time_create; | |
| 43 | + __time32_t time_access; | |
| 44 | + __time32_t time_write; | |
| 45 | + __int64 size; | |
| 46 | + char name[260]; | |
| 47 | + }; | |
| 48 | + | |
| 49 | + struct _finddata64i32_t { | |
| 50 | + unsigned attrib; | |
| 51 | + __time64_t time_create; | |
| 52 | + __time64_t time_access; | |
| 53 | + __time64_t time_write; | |
| 54 | + _fsize_t size; | |
| 55 | + char name[260]; | |
| 56 | + }; | |
| 57 | + | |
| 58 | + struct __finddata64_t { | |
| 59 | + unsigned attrib; | |
| 60 | + __time64_t time_create; | |
| 61 | + __time64_t time_access; | |
| 62 | + __time64_t time_write; | |
| 63 | + __int64 size; | |
| 64 | + char name[260]; | |
| 65 | + }; | |
| 66 | +/* #endif */ | |
| 67 | + | |
| 68 | +#ifdef _USE_32BIT_TIME_T | |
| 69 | +#define _finddata_t _finddata32_t | |
| 70 | +#define _finddatai64_t _finddata32i64_t | |
| 71 | + | |
| 72 | +#ifdef _WIN64 | |
| 73 | +#define _findfirst _findfirst32 | |
| 74 | +#define _findnext _findnext32 | |
| 75 | +#else | |
| 76 | +#define _findfirst32 _findfirst | |
| 77 | +#define _findnext32 _findnext | |
| 78 | +#endif | |
| 79 | +#define _findfirsti64 _findfirst32i64 | |
| 80 | +#define _findnexti64 _findnext32i64 | |
| 81 | +#else | |
| 82 | +#define _finddata_t _finddata64i32_t | |
| 83 | +#define _finddatai64_t __finddata64_t | |
| 84 | + | |
| 85 | +#define _findfirst _findfirst64i32 | |
| 86 | +#define _findnext _findnext64i32 | |
| 87 | +#define _findfirsti64 _findfirst64 | |
| 88 | +#define _findnexti64 _findnext64 | |
| 89 | +#endif | |
| 86 | 90 | |
| 91 | +#define _FINDDATA_T_DEFINED | |
| 92 | +#endif | |
| 87 | 93 | |
| 88 | 94 | #ifndef _WFINDDATA_T_DEFINED |
| 89 | −struct _wfinddata_t { | |
| 90 | − unsigned attrib; | |
| 91 | − time_t time_create; /* -1 for FAT file systems */ | |
| 92 | − time_t time_access; /* -1 for FAT file systems */ | |
| 93 | − time_t time_write; | |
| 94 | − _fsize_t size; | |
| 95 | − wchar_t name[FILENAME_MAX]; /* may include spaces. */ | |
| 96 | −}; | |
| 97 | −struct _wfinddatai64_t { | |
| 98 | − unsigned attrib; | |
| 99 | − time_t time_create; | |
| 100 | − time_t time_access; | |
| 101 | − time_t time_write; | |
| 102 | − __int64 size; | |
| 103 | − wchar_t name[FILENAME_MAX]; | |
| 104 | −}; | |
| 95 | + | |
| 96 | + struct _wfinddata32_t { | |
| 97 | + unsigned attrib; | |
| 98 | + __time32_t time_create; | |
| 99 | + __time32_t time_access; | |
| 100 | + __time32_t time_write; | |
| 101 | + _fsize_t size; | |
| 102 | + wchar_t name[260]; | |
| 103 | + }; | |
| 104 | + | |
| 105 | +/* #if _INTEGRAL_MAX_BITS >= 64 */ | |
| 106 | + | |
| 107 | + struct _wfinddata32i64_t { | |
| 108 | + unsigned attrib; | |
| 109 | + __time32_t time_create; | |
| 110 | + __time32_t time_access; | |
| 111 | + __time32_t time_write; | |
| 112 | + __int64 size; | |
| 113 | + wchar_t name[260]; | |
| 114 | + }; | |
| 115 | + | |
| 116 | + struct _wfinddata64i32_t { | |
| 117 | + unsigned attrib; | |
| 118 | + __time64_t time_create; | |
| 119 | + __time64_t time_access; | |
| 120 | + __time64_t time_write; | |
| 121 | + _fsize_t size; | |
| 122 | + wchar_t name[260]; | |
| 123 | + }; | |
| 124 | + | |
| 125 | + struct _wfinddata64_t { | |
| 126 | + unsigned attrib; | |
| 127 | + __time64_t time_create; | |
| 128 | + __time64_t time_access; | |
| 129 | + __time64_t time_write; | |
| 130 | + __int64 size; | |
| 131 | + wchar_t name[260]; | |
| 132 | + }; | |
| 133 | +/* #endif */ | |
| 134 | + | |
| 135 | +#ifdef _USE_32BIT_TIME_T | |
| 136 | +#define _wfinddata_t _wfinddata32_t | |
| 137 | +#define _wfinddatai64_t _wfinddata32i64_t | |
| 138 | + | |
| 139 | +#define _wfindfirst _wfindfirst32 | |
| 140 | +#define _wfindnext _wfindnext32 | |
| 141 | +#define _wfindfirsti64 _wfindfirst32i64 | |
| 142 | +#define _wfindnexti64 _wfindnext32i64 | |
| 143 | +#else | |
| 144 | +#define _wfinddata_t _wfinddata64i32_t | |
| 145 | +#define _wfinddatai64_t _wfinddata64_t | |
| 146 | + | |
| 147 | +#define _wfindfirst _wfindfirst64i32 | |
| 148 | +#define _wfindnext _wfindnext64i32 | |
| 149 | +#define _wfindfirsti64 _wfindfirst64 | |
| 150 | +#define _wfindnexti64 _wfindnext64 | |
| 151 | +#endif | |
| 105 | 152 | |
| 106 | 153 | #define _WFINDDATA_T_DEFINED |
| 107 | 154 | #endif |
| 108 | 155 | |
| 109 | −#ifdef __cplusplus | |
| 110 | −extern "C" { | |
| 156 | +#define _A_NORMAL 0x00 | |
| 157 | +#define _A_RDONLY 0x01 | |
| 158 | +#define _A_HIDDEN 0x02 | |
| 159 | +#define _A_SYSTEM 0x04 | |
| 160 | +#define _A_SUBDIR 0x10 | |
| 161 | +#define _A_ARCH 0x20 | |
| 162 | + | |
| 163 | +#ifndef _SIZE_T_DEFINED | |
| 164 | +#define _SIZE_T_DEFINED | |
| 165 | +#undef size_t | |
| 166 | +#ifdef _WIN64 | |
| 167 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 168 | + typedef unsigned int size_t __attribute__ ((mode (DI))); | |
| 169 | +#else | |
| 170 | + typedef unsigned __int64 size_t; | |
| 171 | +#endif | |
| 172 | +#else | |
| 173 | + typedef unsigned int size_t; | |
| 174 | +#endif | |
| 111 | 175 | #endif |
| 112 | 176 | |
| 113 | −/* | |
| 114 | − * Functions for searching for files. _findfirst returns -1 if no match | |
| 115 | − * is found. Otherwise it returns a handle to be used in _findnext and | |
| 116 | − * _findclose calls. _findnext also returns -1 if no match could be found, | |
| 117 | − * and 0 if a match was found. Call _findclose when you are finished. | |
| 118 | − */ | |
| 119 | −int _findfirst (const char*, struct _finddata_t*); | |
| 120 | −int _findnext (int, struct _finddata_t*); | |
| 121 | −int _findclose (int); | |
| 177 | +#ifndef _SSIZE_T_DEFINED | |
| 178 | +#define _SSIZE_T_DEFINED | |
| 179 | +#undef ssize_t | |
| 180 | +#ifdef _WIN64 | |
| 181 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 182 | + typedef int ssize_t __attribute__ ((mode (DI))); | |
| 183 | +#else | |
| 184 | + typedef __int64 ssize_t; | |
| 185 | +#endif | |
| 186 | +#else | |
| 187 | + typedef int ssize_t; | |
| 188 | +#endif | |
| 189 | +#endif | |
| 122 | 190 | |
| 123 | −int _chdir (const char*); | |
| 124 | −char* _getcwd (char*, int); | |
| 125 | −int _mkdir (const char*); | |
| 126 | −char* _mktemp (char*); | |
| 127 | −int _rmdir (const char*); | |
| 191 | +#ifndef _OFF_T_DEFINED | |
| 192 | +#define _OFF_T_DEFINED | |
| 193 | +#ifndef _OFF_T_ | |
| 194 | +#define _OFF_T_ | |
| 195 | + typedef long _off_t; | |
| 196 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 197 | + typedef long off_t; | |
| 198 | +#endif | |
| 199 | +#endif | |
| 200 | +#endif | |
| 128 | 201 | |
| 202 | +#ifndef _OFF64_T_DEFINED | |
| 203 | +#define _OFF64_T_DEFINED | |
| 204 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 205 | + typedef int _off64_t __attribute__ ((mode (DI))); | |
| 206 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 207 | + typedef int off64_t __attribute__ ((mode (DI))); | |
| 208 | +#endif | |
| 209 | +#else | |
| 210 | + typedef long long _off64_t; | |
| 211 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 212 | + typedef long long off64_t; | |
| 213 | +#endif | |
| 214 | +#endif | |
| 215 | +#endif | |
| 129 | 216 | |
| 130 | −#ifdef __MSVCRT__ | |
| 131 | −__int64 _filelengthi64(int); | |
| 132 | −long _findfirsti64(const char*, struct _finddatai64_t*); | |
| 133 | −int _findnexti64(long, struct _finddatai64_t*); | |
| 134 | −__int64 _lseeki64(int, __int64, int); | |
| 135 | −__int64 _telli64(int); | |
| 136 | −#endif /* __MSVCRT__ */ | |
| 217 | + /* Some defines for _access nAccessMode (MS doesn't define them, but | |
| 218 | + * it doesn't seem to hurt to add them). */ | |
| 219 | +#define F_OK 0 /* Check for file existence */ | |
| 220 | +#define X_OK 1 /* Check for execute permission. */ | |
| 221 | +#define W_OK 2 /* Check for write permission */ | |
| 222 | +#define R_OK 4 /* Check for read permission */ | |
| 137 | 223 | |
| 224 | + _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode); | |
| 225 | + _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode); | |
| 226 | + _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size); | |
| 227 | + _CRTIMP int __cdecl _close(int _FileHandle); | |
| 228 | + _CRTIMP int __cdecl _commit(int _FileHandle); | |
| 229 | + _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode); | |
| 230 | + _CRTIMP int __cdecl _dup(int _FileHandle); | |
| 231 | + _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst); | |
| 232 | + _CRTIMP int __cdecl _eof(int _FileHandle); | |
| 233 | + _CRTIMP long __cdecl _filelength(int _FileHandle); | |
| 234 | + _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData); | |
| 235 | + _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData); | |
| 236 | + _CRTIMP int __cdecl _findclose(intptr_t _FindHandle); | |
| 237 | + _CRTIMP int __cdecl _isatty(int _FileHandle); | |
| 238 | + _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes); | |
| 239 | + _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin); | |
| 240 | + _off64_t lseek64(int fd,_off64_t offset, int whence); | |
| 241 | + _CRTIMP char *__cdecl _mktemp(char *_TemplateName); | |
| 242 | + _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode); | |
| 243 | + _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); | |
| 244 | + | |
| 245 | +#ifndef _CRT_DIRECTORY_DEFINED | |
| 246 | +#define _CRT_DIRECTORY_DEFINED | |
| 247 | + int __cdecl remove(const char *_Filename); | |
| 248 | + int __cdecl rename(const char *_OldFilename,const char *_NewFilename); | |
| 249 | + _CRTIMP int __cdecl _unlink(const char *_Filename); | |
| 250 | +#ifndef NO_OLDNAMES | |
| 251 | + int __cdecl unlink(const char *_Filename); | |
| 252 | +#endif | |
| 253 | +#endif | |
| 138 | 254 | |
| 139 | −#ifndef _NO_OLDNAMES | |
| 255 | + _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode); | |
| 256 | + _CRTIMP long __cdecl _tell(int _FileHandle); | |
| 257 | + _CRTIMP int __cdecl _umask(int _Mode); | |
| 258 | + _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount); | |
| 259 | + | |
| 260 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 261 | + _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle); | |
| 262 | + _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData); | |
| 263 | + _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData); | |
| 264 | +#ifdef __cplusplus | |
| 265 | +#include <string.h> | |
| 266 | +#endif | |
| 267 | + intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData); | |
| 268 | + __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData) | |
| 269 | + { | |
| 270 | + struct __finddata64_t fd; | |
| 271 | + intptr_t ret = _findfirst64(_Filename,&fd); | |
| 272 | + _FindData->attrib=fd.attrib; | |
| 273 | + _FindData->time_create=fd.time_create; | |
| 274 | + _FindData->time_access=fd.time_access; | |
| 275 | + _FindData->time_write=fd.time_write; | |
| 276 | + _FindData->size=(_fsize_t) fd.size; | |
| 277 | + strncpy(_FindData->name,fd.name,260); | |
| 278 | + return ret; | |
| 279 | + } | |
| 280 | + _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData); | |
| 281 | + _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData); | |
| 282 | + int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData); | |
| 283 | + __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData) | |
| 284 | + { | |
| 285 | + struct __finddata64_t fd; | |
| 286 | + int ret = _findnext64(_FindHandle,&fd); | |
| 287 | + _FindData->attrib=fd.attrib; | |
| 288 | + _FindData->time_create=fd.time_create; | |
| 289 | + _FindData->time_access=fd.time_access; | |
| 290 | + _FindData->time_write=fd.time_write; | |
| 291 | + _FindData->size=(_fsize_t) fd.size; | |
| 292 | + strncpy(_FindData->name,fd.name,260); | |
| 293 | + return ret; | |
| 294 | + } | |
| 295 | + __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin); | |
| 296 | + __int64 __cdecl _telli64(int _FileHandle); | |
| 297 | +#endif | |
| 298 | +#ifndef NO_OLDNAMES | |
| 140 | 299 | |
| 141 | 300 | #ifndef _UWIN |
| 142 | −int chdir (const char*); | |
| 143 | −char* getcwd (char*, int); | |
| 144 | −int mkdir (const char*); | |
| 145 | −char* mktemp (char*); | |
| 146 | −int rmdir (const char*); | |
| 301 | + int __cdecl chdir (const char *); | |
| 302 | + char *__cdecl getcwd (char *, int); | |
| 303 | + int __cdecl mkdir (const char *); | |
| 304 | + char *__cdecl mktemp(char *); | |
| 305 | + int __cdecl rmdir (const char*); | |
| 306 | + int __cdecl chmod (const char *, int); | |
| 147 | 307 | #endif /* _UWIN */ |
| 148 | 308 | |
| 149 | −#endif /* Not _NO_OLDNAMES */ | |
| 309 | +#endif /* Not NO_OLDNAMES */ | |
| 150 | 310 | |
| 151 | −#ifdef __cplusplus | |
| 152 | −} | |
| 311 | + _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode); | |
| 312 | + | |
| 313 | +#ifndef __cplusplus | |
| 314 | + _CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...); | |
| 315 | + _CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...); | |
| 316 | +#else | |
| 317 | + extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0); | |
| 318 | + extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0); | |
| 153 | 319 | #endif |
| 154 | 320 | |
| 155 | −#endif /* Not RC_INVOKED */ | |
| 321 | +#ifndef _WIO_DEFINED | |
| 322 | +#define _WIO_DEFINED | |
| 323 | + _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode); | |
| 324 | + _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode); | |
| 325 | + _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode); | |
| 326 | + _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); | |
| 327 | + _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); | |
| 328 | + _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename); | |
| 329 | + _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename); | |
| 330 | + _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName); | |
| 331 | + | |
| 332 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 333 | + _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); | |
| 334 | + intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); | |
| 335 | + _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); | |
| 336 | + _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); | |
| 337 | + int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); | |
| 338 | + _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); | |
| 339 | +#endif | |
| 156 | 340 | |
| 157 | −#endif /* Not __STRICT_ANSI__ */ | |
| 341 | + _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); | |
| 158 | 342 | |
| 159 | −/* TODO: Maximum number of open handles has not been tested, I just set | |
| 160 | − * it the same as FOPEN_MAX. */ | |
| 161 | −#define HANDLE_MAX FOPEN_MAX | |
| 343 | +#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64)) | |
| 344 | + _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...); | |
| 345 | + _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...); | |
| 346 | +#else | |
| 347 | + extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0); | |
| 348 | + extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0); | |
| 349 | +#endif | |
| 162 | 350 | |
| 351 | +#endif | |
| 163 | 352 | |
| 164 | −/* Some defines for _access nAccessMode (MS doesn't define them, but | |
| 165 | − * it doesn't seem to hurt to add them). */ | |
| 166 | −#define F_OK 0 /* Check for file existence */ | |
| 167 | −#define X_OK 1 /* Check for execute permission. */ | |
| 168 | −#define W_OK 2 /* Check for write permission */ | |
| 169 | −#define R_OK 4 /* Check for read permission */ | |
| 353 | + int __cdecl __lock_fhandle(int _Filehandle); | |
| 354 | + void __cdecl _unlock_fhandle(int _Filehandle); | |
| 355 | + _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle); | |
| 356 | + _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags); | |
| 357 | + | |
| 358 | +#ifndef NO_OLDNAMES | |
| 359 | + int __cdecl access(const char *_Filename,int _AccessMode); | |
| 360 | + int __cdecl chmod(const char *_Filename,int _AccessMode); | |
| 361 | + int __cdecl chsize(int _FileHandle,long _Size); | |
| 362 | + int __cdecl close(int _FileHandle); | |
| 363 | + int __cdecl creat(const char *_Filename,int _PermissionMode); | |
| 364 | + int __cdecl dup(int _FileHandle); | |
| 365 | + int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst); | |
| 366 | + int __cdecl eof(int _FileHandle); | |
| 367 | + long __cdecl filelength(int _FileHandle); | |
| 368 | + int __cdecl isatty(int _FileHandle); | |
| 369 | + int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes); | |
| 370 | + long __cdecl lseek(int _FileHandle,long _Offset,int _Origin); | |
| 371 | + char *__cdecl mktemp(char *_TemplateName); | |
| 372 | + int __cdecl open(const char *_Filename,int _OpenFlag,...); | |
| 373 | + int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); | |
| 374 | + int __cdecl setmode(int _FileHandle,int _Mode); | |
| 375 | + int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...); | |
| 376 | + long __cdecl tell(int _FileHandle); | |
| 377 | + int __cdecl umask(int _Mode); | |
| 378 | + int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount); | |
| 379 | +#endif | |
| 170 | 380 | |
| 171 | −#ifndef RC_INVOKED | |
| 381 | +#ifdef __cplusplus | |
| 382 | +} | |
| 383 | +#endif | |
| 384 | +#endif | |
| 172 | 385 | |
| 173 | −#ifdef __cplusplus | |
| 386 | +#ifdef __cplusplus | |
| 174 | 387 | extern "C" { |
| 175 | 388 | #endif |
| 176 | 389 | |
| 177 | −int _access (const char*, int); | |
| 178 | −int _chsize (int, long); | |
| 179 | −int _close (int); | |
| 180 | −int _commit(int); | |
| 181 | − | |
| 182 | −/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80), | |
| 183 | − * the "owner write permission" bit (on FAT). */ | |
| 184 | −int _creat (const char*, unsigned); | |
| 185 | − | |
| 186 | −int _dup (int); | |
| 187 | −int _dup2 (int, int); | |
| 188 | −long _filelength (int); | |
| 189 | −int _fileno (FILE*); | |
| 190 | −long _get_osfhandle (int); | |
| 191 | −int _isatty (int); | |
| 192 | − | |
| 193 | −/* In a very odd turn of events this function is excluded from those | |
| 194 | − * files which define _STREAM_COMPAT. This is required in order to | |
| 195 | − * build GNU libio because of a conflict with _eof in streambuf.h | |
| 196 | − * line 107. Actually I might just be able to change the name of | |
| 197 | − * the enum member in streambuf.h... we'll see. TODO */ | |
| 198 | −#ifndef _STREAM_COMPAT | |
| 199 | −int _eof (int); | |
| 200 | −#endif | |
| 201 | − | |
| 202 | −/* LK_... locking commands defined in sys/locking.h. */ | |
| 203 | −int _locking (int, int, long); | |
| 204 | − | |
| 205 | −long _lseek (int, long, int); | |
| 206 | − | |
| 207 | −/* Optional third argument is unsigned unPermissions. */ | |
| 208 | −int _open (const char*, int, ...); | |
| 209 | − | |
| 210 | −int _open_osfhandle (long, int); | |
| 211 | −int _pipe (int *, unsigned int, int); | |
| 212 | −int _read (int, void*, unsigned int); | |
| 213 | − | |
| 214 | −/* SH_... flags for nShFlags defined in share.h | |
| 215 | − * Optional fourth argument is unsigned unPermissions */ | |
| 216 | −int _sopen (const char*, int, int, ...); | |
| 217 | − | |
| 218 | −long _tell (int); | |
| 219 | −/* Should umask be in sys/stat.h and/or sys/types.h instead? */ | |
| 220 | −int _umask (int); | |
| 221 | −int _unlink (const char*); | |
| 222 | −int _write (int, const void*, unsigned int); | |
| 223 | − | |
| 224 | −/* Wide character versions. Also declared in wchar.h. */ | |
| 225 | −/* Not in crtdll.dll */ | |
| 226 | −#if !defined (_WIO_DEFINED) | |
| 227 | −#if defined (__MSVCRT__) | |
| 228 | −int _waccess(const wchar_t*, int); | |
| 229 | −int _wchmod(const wchar_t*, int); | |
| 230 | −int _wcreat(const wchar_t*, int); | |
| 231 | −long _wfindfirst(wchar_t*, struct _wfinddata_t*); | |
| 232 | −int _wfindnext(long, struct _wfinddata_t *); | |
| 233 | −int _wunlink(const wchar_t*); | |
| 234 | −int _wopen(const wchar_t*, int, ...); | |
| 235 | −int _wsopen(const wchar_t*, int, int, ...); | |
| 236 | −wchar_t * _wmktemp(wchar_t*); | |
| 237 | −long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); | |
| 238 | −int _wfindnexti64(long, struct _wfinddatai64_t*); | |
| 239 | −#endif /* defined (__MSVCRT__) */ | |
| 240 | −#define _WIO_DEFINED | |
| 241 | −#endif /* _WIO_DEFINED */ | |
| 242 | − | |
| 243 | −#ifndef _NO_OLDNAMES | |
| 244 | −/* | |
| 245 | − * Non-underscored versions of non-ANSI functions to improve portability. | |
| 246 | − * These functions live in libmoldname.a. | |
| 247 | − */ | |
| 390 | +/* Misc stuff */ | |
| 391 | +char *getlogin(void); | |
| 392 | +#ifdef __USE_MINGW_ALARM | |
| 393 | +unsigned int alarm(unsigned int seconds); | |
| 394 | +#endif | |
| 248 | 395 | |
| 249 | −#ifndef _UWIN | |
| 250 | −int access (const char*, int); | |
| 251 | −int chsize (int, long ); | |
| 252 | −int close (int); | |
| 253 | −int creat (const char*, int); | |
| 254 | −int dup (int); | |
| 255 | −int dup2 (int, int); | |
| 256 | −int eof (int); | |
| 257 | −long filelength (int); | |
| 258 | −int fileno (FILE*); | |
| 259 | −int isatty (int); | |
| 260 | −long lseek (int, long, int); | |
| 261 | −int open (const char*, int, ...); | |
| 262 | −int read (int, void*, unsigned int); | |
| 263 | −int sopen (const char*, int, int, ...); | |
| 264 | −long tell (int); | |
| 265 | −int umask (int); | |
| 266 | −int unlink (const char*); | |
| 267 | −int write (int, const void*, unsigned int); | |
| 268 | −#endif /* _UWIN */ | |
| 396 | +#ifdef __USE_MINGW_ACCESS | |
| 397 | +/* Old versions of MSVCRT access() just ignored X_OK, while the version | |
| 398 | + shipped with Vista, returns an error code. This will restore the | |
| 399 | + old behaviour */ | |
| 400 | +static inline int __mingw_access (const char *__fname, int __mode) { | |
| 401 | + return _access (__fname, __mode & ~X_OK); | |
| 402 | +} | |
| 269 | 403 | |
| 270 | −/* Wide character versions. Also declared in wchar.h. */ | |
| 271 | −/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */ | |
| 272 | −#if 0 | |
| 273 | −int waccess(const wchar_t *, int); | |
| 274 | −int wchmod(const wchar_t *, int); | |
| 275 | −int wcreat(const wchar_t *, int); | |
| 276 | −long wfindfirst(wchar_t *, struct _wfinddata_t *); | |
| 277 | −int wfindnext(long, struct _wfinddata_t *); | |
| 278 | −int wunlink(const wchar_t *); | |
| 279 | −int wrename(const wchar_t *, const wchar_t *); | |
| 280 | −int wopen(const wchar_t *, int, ...); | |
| 281 | −int wsopen(const wchar_t *, int, int, ...); | |
| 282 | −wchar_t * wmktemp(wchar_t *); | |
| 404 | +#define access(__f,__m) __mingw_access (__f, __m) | |
| 283 | 405 | #endif |
| 284 | 406 | |
| 285 | −#endif /* Not _NO_OLDNAMES */ | |
| 286 | 407 | |
| 287 | −#ifdef __cplusplus | |
| 408 | +#ifdef __cplusplus | |
| 288 | 409 | } |
| 289 | 410 | #endif |
| 290 | 411 | |
| 291 | −#endif /* Not RC_INVOKED */ | |
| 292 | 412 | |
| 293 | −#endif /* _IO_H_ not defined */ | |
| 413 | +#pragma pack(pop) | |
| 414 | + | |
| 415 | +#include <sec_api/io_s.h> | |
| 294 | 416 | |
| 295 | −#endif /* Not strict ANSI */ | |
| 417 | +#endif /* End _IO_H_ */ | |
| 296 | 418 | |
| @@ -1,115 +1,111 @@ | ||
| 1 | −/* | |
| 2 | − * limits.h | |
| 3 | − * | |
| 4 | − * Defines constants for the sizes of integral types. | |
| 5 | − * | |
| 6 | − * NOTE: GCC should supply a version of this header and it should be safe to | |
| 7 | − * use that version instead of this one (maybe safer). | |
| 8 | − * | |
| 9 | − * This file is part of the Mingw32 package. | |
| 10 | − * | |
| 11 | − * Contributors: | |
| 12 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 13 | − * | |
| 14 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 15 | − * | |
| 16 | − * This source code is offered for use in the public domain. You may | |
| 17 | − * use, modify or distribute it freely. | |
| 18 | − * | |
| 19 | − * This code is distributed in the hope that it will be useful but | |
| 20 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 21 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 22 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 23 | − * | |
| 24 | − * $Revision: 1.2 $ | |
| 25 | − * $Author: bellard $ | |
| 26 | − * $Date: 2005/04/17 13:14:29 $ | |
| 27 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 28 | 5 | */ |
| 29 | − | |
| 30 | −#ifndef _LIMITS_H_ | |
| 31 | −#define _LIMITS_H_ | |
| 32 | − | |
| 33 | −/* All the headers include this file. */ | |
| 34 | 6 | #include <_mingw.h> |
| 35 | 7 | |
| 36 | −/* | |
| 37 | − * File system limits | |
| 38 | − * | |
| 39 | − * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the | |
| 40 | − * same as FILENAME_MAX and FOPEN_MAX from stdio.h? | |
| 41 | − * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is | |
| 42 | − * required for the NUL. TODO: Test? | |
| 43 | − */ | |
| 44 | −#define PATH_MAX (259) | |
| 8 | +#ifndef _INC_LIMITS | |
| 9 | +#define _INC_LIMITS | |
| 45 | 10 | |
| 46 | 11 | /* |
| 47 | − * Characteristics of the char data type. | |
| 48 | − * | |
| 49 | − * TODO: Is MB_LEN_MAX correct? | |
| 50 | − */ | |
| 51 | −#define CHAR_BIT 8 | |
| 52 | −#define MB_LEN_MAX 2 | |
| 53 | − | |
| 54 | −#define SCHAR_MIN (-128) | |
| 55 | −#define SCHAR_MAX 127 | |
| 56 | − | |
| 57 | −#define UCHAR_MAX 255 | |
| 12 | +* File system limits | |
| 13 | +* | |
| 14 | +* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the | |
| 15 | +* same as FILENAME_MAX and FOPEN_MAX from stdio.h? | |
| 16 | +* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is | |
| 17 | +* required for the NUL. TODO: Test? | |
| 18 | +*/ | |
| 19 | +#define PATH_MAX (259) | |
| 58 | 20 | |
| 59 | −/* TODO: Is this safe? I think it might just be testing the preprocessor, | |
| 60 | − * not the compiler itself... */ | |
| 61 | −#if ('\x80' < 0) | |
| 62 | −#define CHAR_MIN SCHAR_MIN | |
| 63 | −#define CHAR_MAX SCHAR_MAX | |
| 64 | −#else | |
| 65 | −#define CHAR_MIN 0 | |
| 66 | −#define CHAR_MAX UCHAR_MAX | |
| 21 | +#define CHAR_BIT 8 | |
| 22 | +#define SCHAR_MIN (-128) | |
| 23 | +#define SCHAR_MAX 127 | |
| 24 | +#define UCHAR_MAX 0xff | |
| 25 | + | |
| 26 | +#define CHAR_MIN SCHAR_MIN | |
| 27 | +#define CHAR_MAX SCHAR_MAX | |
| 28 | + | |
| 29 | +#define MB_LEN_MAX 5 | |
| 30 | +#define SHRT_MIN (-32768) | |
| 31 | +#define SHRT_MAX 32767 | |
| 32 | +#define USHRT_MAX 0xffff | |
| 33 | +#define INT_MIN (-2147483647 - 1) | |
| 34 | +#define INT_MAX 2147483647 | |
| 35 | +#define UINT_MAX 0xffffffff | |
| 36 | +#define LONG_MIN (-2147483647L - 1) | |
| 37 | +#define LONG_MAX 2147483647L | |
| 38 | +#define ULONG_MAX 0xffffffffUL | |
| 39 | +#define LLONG_MAX 9223372036854775807ll | |
| 40 | +#define LLONG_MIN (-9223372036854775807ll - 1) | |
| 41 | +#define ULLONG_MAX 0xffffffffffffffffull | |
| 42 | + | |
| 43 | +#if _INTEGRAL_MAX_BITS >= 8 | |
| 44 | +#define _I8_MIN (-127 - 1) | |
| 45 | +#define _I8_MAX 127i8 | |
| 46 | +#define _UI8_MAX 0xffu | |
| 67 | 47 | #endif |
| 68 | 48 | |
| 69 | −/* | |
| 70 | − * Maximum and minimum values for ints. | |
| 71 | − */ | |
| 72 | −#define INT_MAX 2147483647 | |
| 73 | −#define INT_MIN (-INT_MAX-1) | |
| 74 | − | |
| 75 | −#define UINT_MAX 0xffffffff | |
| 76 | − | |
| 77 | −/* | |
| 78 | − * Maximum and minimum values for shorts. | |
| 79 | − */ | |
| 80 | −#define SHRT_MAX 32767 | |
| 81 | −#define SHRT_MIN (-SHRT_MAX-1) | |
| 82 | − | |
| 83 | −#define USHRT_MAX 0xffff | |
| 84 | − | |
| 85 | −/* | |
| 86 | − * Maximum and minimum values for longs and unsigned longs. | |
| 87 | − * | |
| 88 | − * TODO: This is not correct for Alphas, which have 64 bit longs. | |
| 89 | − */ | |
| 90 | −#define LONG_MAX 2147483647L | |
| 91 | − | |
| 92 | −#define LONG_MIN (-LONG_MAX-1) | |
| 93 | − | |
| 94 | −#define ULONG_MAX 0xffffffffUL | |
| 95 | − | |
| 96 | − | |
| 97 | −/* | |
| 98 | − * The GNU C compiler also allows 'long long int' | |
| 99 | − */ | |
| 100 | −#if !defined(__STRICT_ANSI__) && defined(__GNUC__) | |
| 101 | − | |
| 102 | −#define LONG_LONG_MAX 9223372036854775807LL | |
| 103 | −#define LONG_LONG_MIN (-LONG_LONG_MAX-1) | |
| 49 | +#if _INTEGRAL_MAX_BITS >= 16 | |
| 50 | +#define _I16_MIN (-32767 - 1) | |
| 51 | +#define _I16_MAX 32767i16 | |
| 52 | +#define _UI16_MAX 0xffffu | |
| 53 | +#endif | |
| 104 | 54 | |
| 105 | −#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1) | |
| 55 | +#if _INTEGRAL_MAX_BITS >= 32 | |
| 56 | +#define _I32_MIN (-2147483647 - 1) | |
| 57 | +#define _I32_MAX 2147483647 | |
| 58 | +#define _UI32_MAX 0xffffffffu | |
| 59 | +#endif | |
| 106 | 60 | |
| 107 | −/* ISO C9x macro names */ | |
| 108 | −#define LLONG_MAX LONG_LONG_MAX | |
| 109 | −#define LLONG_MIN LONG_LONG_MIN | |
| 110 | −#define ULLONG_MAX ULONG_LONG_MAX | |
| 61 | +#if defined(__GNUC__) | |
| 62 | +#undef LONG_LONG_MAX | |
| 63 | +#define LONG_LONG_MAX 9223372036854775807ll | |
| 64 | +#undef LONG_LONG_MIN | |
| 65 | +#define LONG_LONG_MIN (-LONG_LONG_MAX-1) | |
| 66 | +#undef ULONG_LONG_MAX | |
| 67 | +#define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull) | |
| 68 | +#endif | |
| 111 | 69 | |
| 112 | −#endif /* Not Strict ANSI and GNU C compiler */ | |
| 70 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 71 | +#define _I64_MIN (-9223372036854775807ll - 1) | |
| 72 | +#define _I64_MAX 9223372036854775807ll | |
| 73 | +#define _UI64_MAX 0xffffffffffffffffull | |
| 74 | +#endif | |
| 113 | 75 | |
| 76 | +#ifndef SIZE_MAX | |
| 77 | +#ifdef _WIN64 | |
| 78 | +#define SIZE_MAX _UI64_MAX | |
| 79 | +#else | |
| 80 | +#define SIZE_MAX UINT_MAX | |
| 81 | +#endif | |
| 82 | +#endif | |
| 114 | 83 | |
| 115 | −#endif /* not _LIMITS_H_ */ | |
| 84 | +#ifdef _POSIX_ | |
| 85 | +#define _POSIX_ARG_MAX 4096 | |
| 86 | +#define _POSIX_CHILD_MAX 6 | |
| 87 | +#define _POSIX_LINK_MAX 8 | |
| 88 | +#define _POSIX_MAX_CANON 255 | |
| 89 | +#define _POSIX_MAX_INPUT 255 | |
| 90 | +#define _POSIX_NAME_MAX 14 | |
| 91 | +#define _POSIX_NGROUPS_MAX 0 | |
| 92 | +#define _POSIX_OPEN_MAX 16 | |
| 93 | +#define _POSIX_PATH_MAX 255 | |
| 94 | +#define _POSIX_PIPE_BUF 512 | |
| 95 | +#define _POSIX_SSIZE_MAX 32767 | |
| 96 | +#define _POSIX_STREAM_MAX 8 | |
| 97 | +#define _POSIX_TZNAME_MAX 3 | |
| 98 | +#define ARG_MAX 14500 | |
| 99 | +#define LINK_MAX 1024 | |
| 100 | +#define MAX_CANON _POSIX_MAX_CANON | |
| 101 | +#define MAX_INPUT _POSIX_MAX_INPUT | |
| 102 | +#define NAME_MAX 255 | |
| 103 | +#define NGROUPS_MAX 16 | |
| 104 | +#define OPEN_MAX 32 | |
| 105 | +#define PATH_MAX 512 | |
| 106 | +#define PIPE_BUF _POSIX_PIPE_BUF | |
| 107 | +#define SSIZE_MAX _POSIX_SSIZE_MAX | |
| 108 | +#define STREAM_MAX 20 | |
| 109 | +#define TZNAME_MAX 10 | |
| 110 | +#endif | |
| 111 | +#endif | |
| @@ -1,100 +1,91 @@ | ||
| 1 | −/* | |
| 2 | − * locale.h | |
| 3 | − * | |
| 4 | − * Functions and types for localization (ie. changing the appearance of | |
| 5 | − * output based on the standards of a certain country). | |
| 6 | − * | |
| 7 | − * This file is part of the Mingw32 package. | |
| 8 | − * | |
| 9 | − * Contributors: | |
| 10 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 6 | +#ifndef _INC_LOCALE | |
| 7 | +#define _INC_LOCALE | |
| 27 | 8 | |
| 28 | −#ifndef _LOCALE_H_ | |
| 29 | −#define _LOCALE_H_ | |
| 30 | − | |
| 31 | −/* All the headers include this file. */ | |
| 32 | 9 | #include <_mingw.h> |
| 33 | 10 | |
| 34 | −/* | |
| 35 | − * NOTE: I have tried to test this, but I am limited by my knowledge of | |
| 36 | − * locale issues. The structure does not bomb if you look at the | |
| 37 | − * values, and 'decimal_point' even seems to be correct. But the | |
| 38 | − * rest of the values are, by default, not particularly useful | |
| 39 | − * (read meaningless and not related to the international settings | |
| 40 | − * of the system). | |
| 41 | − */ | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 42 | 12 | |
| 43 | −#define LC_ALL 0 | |
| 44 | −#define LC_COLLATE 1 | |
| 45 | −#define LC_CTYPE 2 | |
| 46 | −#define LC_MONETARY 3 | |
| 47 | −#define LC_NUMERIC 4 | |
| 48 | −#define LC_TIME 5 | |
| 49 | −#define LC_MIN LC_ALL | |
| 50 | −#define LC_MAX LC_TIME | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 51 | 16 | |
| 52 | −#ifndef RC_INVOKED | |
| 17 | +#ifndef NULL | |
| 18 | +#ifdef __cplusplus | |
| 19 | +#define NULL 0 | |
| 20 | +#else | |
| 21 | +#define NULL ((void *)0) | |
| 22 | +#endif | |
| 23 | +#endif | |
| 53 | 24 | |
| 54 | −/* | |
| 55 | − * The structure returned by 'localeconv'. | |
| 56 | − */ | |
| 57 | −struct lconv | |
| 58 | −{ | |
| 59 | − char* decimal_point; | |
| 60 | − char* thousands_sep; | |
| 61 | − char* grouping; | |
| 62 | − char* int_curr_symbol; | |
| 63 | − char* currency_symbol; | |
| 64 | − char* mon_decimal_point; | |
| 65 | − char* mon_thousands_sep; | |
| 66 | − char* mon_grouping; | |
| 67 | − char* positive_sign; | |
| 68 | − char* negative_sign; | |
| 69 | − char int_frac_digits; | |
| 70 | − char frac_digits; | |
| 71 | − char p_cs_precedes; | |
| 72 | − char p_sep_by_space; | |
| 73 | − char n_cs_precedes; | |
| 74 | − char n_sep_by_space; | |
| 75 | − char p_sign_posn; | |
| 76 | − char n_sign_posn; | |
| 77 | −}; | |
| 25 | +#define LC_ALL 0 | |
| 26 | +#define LC_COLLATE 1 | |
| 27 | +#define LC_CTYPE 2 | |
| 28 | +#define LC_MONETARY 3 | |
| 29 | +#define LC_NUMERIC 4 | |
| 30 | +#define LC_TIME 5 | |
| 78 | 31 | |
| 79 | −#ifdef __cplusplus | |
| 80 | −extern "C" { | |
| 32 | +#define LC_MIN LC_ALL | |
| 33 | +#define LC_MAX LC_TIME | |
| 34 | + | |
| 35 | +#ifndef _LCONV_DEFINED | |
| 36 | +#define _LCONV_DEFINED | |
| 37 | + struct lconv { | |
| 38 | + char *decimal_point; | |
| 39 | + char *thousands_sep; | |
| 40 | + char *grouping; | |
| 41 | + char *int_curr_symbol; | |
| 42 | + char *currency_symbol; | |
| 43 | + char *mon_decimal_point; | |
| 44 | + char *mon_thousands_sep; | |
| 45 | + char *mon_grouping; | |
| 46 | + char *positive_sign; | |
| 47 | + char *negative_sign; | |
| 48 | + char int_frac_digits; | |
| 49 | + char frac_digits; | |
| 50 | + char p_cs_precedes; | |
| 51 | + char p_sep_by_space; | |
| 52 | + char n_cs_precedes; | |
| 53 | + char n_sep_by_space; | |
| 54 | + char p_sign_posn; | |
| 55 | + char n_sign_posn; | |
| 56 | + }; | |
| 81 | 57 | #endif |
| 82 | 58 | |
| 83 | −char* setlocale (int, const char*); | |
| 84 | −struct lconv* localeconv (void); | |
| 59 | +#ifndef _CONFIG_LOCALE_SWT | |
| 60 | +#define _CONFIG_LOCALE_SWT | |
| 85 | 61 | |
| 86 | −#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */ | |
| 87 | −# define __need_wchar_t | |
| 88 | −# include <stddef.h> | |
| 89 | − wchar_t* _wsetlocale(int, const wchar_t*); | |
| 90 | −# define _WLOCALE_DEFINED | |
| 91 | −#endif /* ndef _WLOCALE_DEFINED */ | |
| 62 | +#define _ENABLE_PER_THREAD_LOCALE 0x1 | |
| 63 | +#define _DISABLE_PER_THREAD_LOCALE 0x2 | |
| 64 | +#define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10 | |
| 65 | +#define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20 | |
| 66 | +#define _ENABLE_PER_THREAD_LOCALE_NEW 0x100 | |
| 67 | +#define _DISABLE_PER_THREAD_LOCALE_NEW 0x200 | |
| 92 | 68 | |
| 93 | −#ifdef __cplusplus | |
| 94 | −} | |
| 95 | 69 | #endif |
| 96 | 70 | |
| 97 | −#endif /* Not RC_INVOKED */ | |
| 71 | + int __cdecl _configthreadlocale(int _Flag); | |
| 72 | + char *__cdecl setlocale(int _Category,const char *_Locale); | |
| 73 | + _CRTIMP struct lconv *__cdecl localeconv(void); | |
| 74 | + _locale_t __cdecl _get_current_locale(void); | |
| 75 | + _locale_t __cdecl _create_locale(int _Category,const char *_Locale); | |
| 76 | + void __cdecl _free_locale(_locale_t _Locale); | |
| 77 | + _locale_t __cdecl __get_current_locale(void); | |
| 78 | + _locale_t __cdecl __create_locale(int _Category,const char *_Locale); | |
| 79 | + void __cdecl __free_locale(_locale_t _Locale); | |
| 98 | 80 | |
| 99 | −#endif /* Not _LOCALE_H_ */ | |
| 81 | +#ifndef _WLOCALE_DEFINED | |
| 82 | +#define _WLOCALE_DEFINED | |
| 83 | + _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale); | |
| 84 | +#endif | |
| 100 | 85 | |
| 86 | +#ifdef __cplusplus | |
| 87 | +} | |
| 88 | +#endif | |
| 89 | + | |
| 90 | +#pragma pack(pop) | |
| 91 | +#endif | |
| @@ -1,87 +1,177 @@ | ||
| 1 | −/* | |
| 2 | − * malloc.h | |
| 3 | − * | |
| 4 | − * Support for programs which want to use malloc.h to get memory management | |
| 5 | − * functions. Unless you absolutely need some of these functions and they are | |
| 6 | − * not in the ANSI headers you should use the ANSI standard header files | |
| 7 | − * instead. | |
| 8 | − * | |
| 9 | − * This file is part of the Mingw32 package. | |
| 10 | − * | |
| 11 | − * Contributors: | |
| 12 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 13 | − * | |
| 14 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 15 | − * | |
| 16 | − * This source code is offered for use in the public domain. You may | |
| 17 | − * use, modify or distribute it freely. | |
| 18 | − * | |
| 19 | − * This code is distributed in the hope that it will be useful but | |
| 20 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 21 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 22 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 23 | − * | |
| 24 | − * $Revision: 1.2 $ | |
| 25 | − * $Author: bellard $ | |
| 26 | − * $Date: 2005/04/17 13:14:29 $ | |
| 27 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 28 | 5 | */ |
| 29 | − | |
| 30 | −#ifndef __STRICT_ANSI__ | |
| 31 | − | |
| 32 | 6 | #ifndef _MALLOC_H_ |
| 33 | 7 | #define _MALLOC_H_ |
| 34 | 8 | |
| 35 | −/* All the headers include this file. */ | |
| 36 | 9 | #include <_mingw.h> |
| 37 | 10 | |
| 38 | −#include <stdlib.h> | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 39 | 12 | |
| 40 | −#ifndef RC_INVOKED | |
| 13 | +#ifndef _MM_MALLOC_H_INCLUDED | |
| 14 | +#define _MM_MALLOC_H_INCLUDED | |
| 15 | +#endif | |
| 41 | 16 | |
| 42 | −/* | |
| 43 | − * The structure used to walk through the heap with _heapwalk. | |
| 44 | − */ | |
| 45 | −typedef struct _heapinfo | |
| 46 | −{ | |
| 47 | − int* _pentry; | |
| 48 | − size_t _size; | |
| 49 | − int _useflag; | |
| 50 | −} _HEAPINFO; | |
| 17 | +#ifdef __cplusplus | |
| 18 | +extern "C" { | |
| 19 | +#endif | |
| 20 | + | |
| 21 | +#ifdef _WIN64 | |
| 22 | +#define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0 | |
| 23 | +#else | |
| 24 | +#define _HEAP_MAXREQ 0xFFFFFFE0 | |
| 25 | +#endif | |
| 26 | + | |
| 27 | +#ifndef _STATIC_ASSERT | |
| 28 | +#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] | |
| 29 | +#endif | |
| 30 | + | |
| 31 | +/* Return codes for _heapwalk() */ | |
| 32 | +#define _HEAPEMPTY (-1) | |
| 33 | +#define _HEAPOK (-2) | |
| 34 | +#define _HEAPBADBEGIN (-3) | |
| 35 | +#define _HEAPBADNODE (-4) | |
| 36 | +#define _HEAPEND (-5) | |
| 37 | +#define _HEAPBADPTR (-6) | |
| 51 | 38 | |
| 52 | 39 | /* Values for _heapinfo.useflag */ |
| 53 | −#define _USEDENTRY 0 | |
| 54 | −#define _FREEENTRY 1 | |
| 40 | +#define _FREEENTRY 0 | |
| 41 | +#define _USEDENTRY 1 | |
| 42 | + | |
| 43 | +#ifndef _HEAPINFO_DEFINED | |
| 44 | +#define _HEAPINFO_DEFINED | |
| 45 | + /* The structure used to walk through the heap with _heapwalk. */ | |
| 46 | + typedef struct _heapinfo { | |
| 47 | + int *_pentry; | |
| 48 | + size_t _size; | |
| 49 | + int _useflag; | |
| 50 | + } _HEAPINFO; | |
| 51 | +#endif | |
| 55 | 52 | |
| 56 | −#ifdef __cplusplus | |
| 57 | −extern "C" { | |
| 53 | + extern unsigned int _amblksiz; | |
| 54 | + | |
| 55 | +#define _mm_free(a) _aligned_free(a) | |
| 56 | +#define _mm_malloc(a,b) _aligned_malloc(a,b) | |
| 57 | + | |
| 58 | +#ifndef _CRT_ALLOCATION_DEFINED | |
| 59 | +#define _CRT_ALLOCATION_DEFINED | |
| 60 | + void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); | |
| 61 | + void __cdecl free(void *_Memory); | |
| 62 | + void *__cdecl malloc(size_t _Size); | |
| 63 | + void *__cdecl realloc(void *_Memory,size_t _NewSize); | |
| 64 | + _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size); | |
| 65 | + /* _CRTIMP void __cdecl _aligned_free(void *_Memory); | |
| 66 | + _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); */ | |
| 67 | + _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); | |
| 68 | + _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); | |
| 69 | + _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); | |
| 70 | + _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); | |
| 71 | + _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); | |
| 72 | +#endif | |
| 73 | + | |
| 74 | +#define _MAX_WAIT_MALLOC_CRT 60000 | |
| 75 | + | |
| 76 | + _CRTIMP int __cdecl _resetstkoflw (void); | |
| 77 | + _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue); | |
| 78 | + | |
| 79 | + _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize); | |
| 80 | + _CRTIMP size_t __cdecl _msize(void *_Memory); | |
| 81 | +#ifdef __GNUC__ | |
| 82 | +#undef _alloca | |
| 83 | +#define _alloca(x) __builtin_alloca((x)) | |
| 84 | +#else | |
| 85 | + void *__cdecl _alloca(size_t _Size); | |
| 86 | +#endif | |
| 87 | + _CRTIMP size_t __cdecl _get_sbh_threshold(void); | |
| 88 | + _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue); | |
| 89 | + _CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value); | |
| 90 | + _CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value); | |
| 91 | + _CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size); | |
| 92 | + _CRTIMP int __cdecl _heapchk(void); | |
| 93 | + _CRTIMP int __cdecl _heapmin(void); | |
| 94 | + _CRTIMP int __cdecl _heapset(unsigned int _Fill); | |
| 95 | + _CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo); | |
| 96 | + _CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit); | |
| 97 | + _CRTIMP intptr_t __cdecl _get_heap_handle(void); | |
| 98 | + | |
| 99 | +#define _ALLOCA_S_THRESHOLD 1024 | |
| 100 | +#define _ALLOCA_S_STACK_MARKER 0xCCCC | |
| 101 | +#define _ALLOCA_S_HEAP_MARKER 0xDDDD | |
| 102 | + | |
| 103 | +#if(defined(_X86_) && !defined(__x86_64)) | |
| 104 | +#define _ALLOCA_S_MARKER_SIZE 8 | |
| 105 | +#elif defined(__ia64__) || defined(__x86_64) | |
| 106 | +#define _ALLOCA_S_MARKER_SIZE 16 | |
| 107 | +#endif | |
| 108 | + | |
| 109 | +#if !defined(RC_INVOKED) | |
| 110 | + static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) { | |
| 111 | + if(_Ptr) { | |
| 112 | + *((unsigned int*)_Ptr) = _Marker; | |
| 113 | + _Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE; | |
| 114 | + } | |
| 115 | + return _Ptr; | |
| 116 | + } | |
| 117 | +#endif | |
| 118 | + | |
| 119 | +#undef _malloca | |
| 120 | +#define _malloca(size) \ | |
| 121 | + ((((size) + _ALLOCA_S_MARKER_SIZE) <= _ALLOCA_S_THRESHOLD) ? \ | |
| 122 | + _MarkAllocaS(_alloca((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_STACK_MARKER) : \ | |
| 123 | + _MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_HEAP_MARKER)) | |
| 124 | +#undef _FREEA_INLINE | |
| 125 | +#define _FREEA_INLINE | |
| 126 | + | |
| 127 | +#ifndef RC_INVOKED | |
| 128 | +#undef _freea | |
| 129 | + static __inline void __cdecl _freea(void *_Memory) { | |
| 130 | + unsigned int _Marker; | |
| 131 | + if(_Memory) { | |
| 132 | + _Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE; | |
| 133 | + _Marker = *(unsigned int *)_Memory; | |
| 134 | + if(_Marker==_ALLOCA_S_HEAP_MARKER) { | |
| 135 | + free(_Memory); | |
| 136 | + } | |
| 137 | +#ifdef _ASSERTE | |
| 138 | + else if(_Marker!=_ALLOCA_S_STACK_MARKER) { | |
| 139 | + _ASSERTE(("Corrupted pointer passed to _freea",0)); | |
| 140 | + } | |
| 141 | +#endif | |
| 142 | + } | |
| 143 | + } | |
| 144 | +#endif /* RC_INVOKED */ | |
| 145 | + | |
| 146 | +#ifndef NO_OLDNAMES | |
| 147 | +#undef alloca | |
| 148 | +#ifdef __GNUC__ | |
| 149 | +#define alloca(x) __builtin_alloca((x)) | |
| 150 | +#else | |
| 151 | +#define alloca _alloca | |
| 152 | +#endif | |
| 58 | 153 | #endif |
| 59 | −/* | |
| 60 | − The _heap* memory allocation functions are supported on NT | |
| 61 | − but not W9x. On latter, they always set errno to ENOSYS. | |
| 62 | −*/ | |
| 63 | −int _heapwalk (_HEAPINFO*); | |
| 64 | 154 | |
| 65 | −#ifndef _NO_OLDNAMES | |
| 66 | −int heapwalk (_HEAPINFO*); | |
| 67 | −#endif /* Not _NO_OLDNAMES */ | |
| 155 | +#ifdef HEAPHOOK | |
| 156 | +#ifndef _HEAPHOOK_DEFINED | |
| 157 | +#define _HEAPHOOK_DEFINED | |
| 158 | + typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **); | |
| 159 | +#endif | |
| 68 | 160 | |
| 69 | −int _heapchk (void); /* Verify heap integrety. */ | |
| 70 | −int _heapmin (void); /* Return unused heap to the OS. */ | |
| 71 | −int _heapset (unsigned int); | |
| 161 | + _CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook); | |
| 72 | 162 | |
| 73 | −size_t _msize (void*); | |
| 74 | −size_t _get_sbh_threshold (void); | |
| 75 | −int _set_sbh_threshold (size_t); | |
| 76 | −void * _expand (void*, size_t); | |
| 163 | +#define _HEAP_MALLOC 1 | |
| 164 | +#define _HEAP_CALLOC 2 | |
| 165 | +#define _HEAP_FREE 3 | |
| 166 | +#define _HEAP_REALLOC 4 | |
| 167 | +#define _HEAP_MSIZE 5 | |
| 168 | +#define _HEAP_EXPAND 6 | |
| 169 | +#endif | |
| 77 | 170 | |
| 78 | 171 | #ifdef __cplusplus |
| 79 | 172 | } |
| 80 | 173 | #endif |
| 81 | 174 | |
| 82 | −#endif /* RC_INVOKED */ | |
| 83 | − | |
| 84 | −#endif /* Not _MALLOC_H_ */ | |
| 85 | − | |
| 86 | −#endif /* Not __STRICT_ANSI__ */ | |
| 175 | +#pragma pack(pop) | |
| 87 | 176 | |
| 177 | +#endif /* _MALLOC_H_ */ | |
| @@ -1,70 +1,59 @@ | ||
| 1 | −/* | |
| 2 | − * math.h | |
| 3 | − * | |
| 4 | − * Mathematical functions. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 26 | − | |
| 27 | 6 | #ifndef _MATH_H_ |
| 28 | 7 | #define _MATH_H_ |
| 29 | 8 | |
| 30 | −/* All the headers include this file. */ | |
| 31 | −#include <_mingw.h> | |
| 32 | − | |
| 33 | −/* | |
| 34 | − * Types for the _exception structure. | |
| 35 | − */ | |
| 9 | +#if __GNUC__ >= 3 | |
| 10 | +#pragma GCC system_header | |
| 11 | +#endif | |
| 36 | 12 | |
| 37 | −#define _DOMAIN 1 /* domain error in argument */ | |
| 38 | −#define _SING 2 /* singularity */ | |
| 39 | −#define _OVERFLOW 3 /* range overflow */ | |
| 40 | −#define _UNDERFLOW 4 /* range underflow */ | |
| 41 | −#define _TLOSS 5 /* total loss of precision */ | |
| 42 | −#define _PLOSS 6 /* partial loss of precision */ | |
| 13 | +#include <_mingw.h> | |
| 43 | 14 | |
| 44 | −/* | |
| 45 | − * Exception types with non-ANSI names for compatibility. | |
| 46 | − */ | |
| 15 | +struct exception; | |
| 47 | 16 | |
| 48 | −#ifndef __STRICT_ANSI__ | |
| 49 | −#ifndef _NO_OLDNAMES | |
| 17 | +#pragma pack(push,_CRT_PACKING) | |
| 50 | 18 | |
| 51 | −#define DOMAIN _DOMAIN | |
| 52 | −#define SING _SING | |
| 53 | −#define OVERFLOW _OVERFLOW | |
| 54 | −#define UNDERFLOW _UNDERFLOW | |
| 55 | −#define TLOSS _TLOSS | |
| 56 | −#define PLOSS _PLOSS | |
| 19 | +#define _DOMAIN 1 | |
| 20 | +#define _SING 2 | |
| 21 | +#define _OVERFLOW 3 | |
| 22 | +#define _UNDERFLOW 4 | |
| 23 | +#define _TLOSS 5 | |
| 24 | +#define _PLOSS 6 | |
| 57 | 25 | |
| 58 | −#endif /* Not _NO_OLDNAMES */ | |
| 59 | −#endif /* Not __STRICT_ANSI__ */ | |
| 26 | +#ifndef __STRICT_ANSI__ | |
| 27 | +#ifndef NO_OLDNAMES | |
| 28 | +#define DOMAIN _DOMAIN | |
| 29 | +#define SING _SING | |
| 30 | +#define OVERFLOW _OVERFLOW | |
| 31 | +#define UNDERFLOW _UNDERFLOW | |
| 32 | +#define TLOSS _TLOSS | |
| 33 | +#define PLOSS _PLOSS | |
| 34 | +#endif | |
| 35 | +#endif | |
| 60 | 36 | |
| 37 | +#ifndef __STRICT_ANSI__ | |
| 38 | +#define M_E 2.71828182845904523536 | |
| 39 | +#define M_LOG2E 1.44269504088896340736 | |
| 40 | +#define M_LOG10E 0.434294481903251827651 | |
| 41 | +#define M_LN2 0.693147180559945309417 | |
| 42 | +#define M_LN10 2.30258509299404568402 | |
| 43 | +#define M_PI 3.14159265358979323846 | |
| 44 | +#define M_PI_2 1.57079632679489661923 | |
| 45 | +#define M_PI_4 0.785398163397448309616 | |
| 46 | +#define M_1_PI 0.318309886183790671538 | |
| 47 | +#define M_2_PI 0.636619772367581343076 | |
| 48 | +#define M_2_SQRTPI 1.12837916709551257390 | |
| 49 | +#define M_SQRT2 1.41421356237309504880 | |
| 50 | +#define M_SQRT1_2 0.707106781186547524401 | |
| 51 | +#endif | |
| 61 | 52 | |
| 62 | −/* These are also defined in Mingw float.h; needed here as well to work | |
| 63 | − around GCC build issues. */ | |
| 64 | −#ifndef __STRICT_ANSI__ | |
| 53 | +#ifndef __STRICT_ANSI__ | |
| 54 | +/* See also float.h */ | |
| 65 | 55 | #ifndef __MINGW_FPCLASS_DEFINED |
| 66 | 56 | #define __MINGW_FPCLASS_DEFINED 1 |
| 67 | −/* IEEE 754 classication */ | |
| 68 | 57 | #define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ |
| 69 | 58 | #define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ |
| 70 | 59 | #define _FPCLASS_NINF 0x0004 /* Negative Infinity */ |
| @@ -75,250 +64,679 @@ · 4 unmodified lines | ||
| 75 | 64 | #define _FPCLASS_PD 0x0080 /* Positive Denormal */ |
| 76 | 65 | #define _FPCLASS_PN 0x0100 /* Positive Normal */ |
| 77 | 66 | #define _FPCLASS_PINF 0x0200 /* Positive Infinity */ |
| 78 | −#endif /* __MINGW_FPCLASS_DEFINED */ | |
| 79 | −#endif /* Not __STRICT_ANSI__ */ | |
| 80 | − | |
| 81 | −#ifndef RC_INVOKED | |
| 67 | +#endif | |
| 68 | +#endif | |
| 82 | 69 | |
| 83 | 70 | #ifdef __cplusplus |
| 84 | 71 | extern "C" { |
| 85 | 72 | #endif |
| 86 | 73 | |
| 87 | −/* | |
| 88 | − * HUGE_VAL is returned by strtod when the value would overflow the | |
| 89 | − * representation of 'double'. There are other uses as well. | |
| 90 | − * | |
| 91 | − * __imp__HUGE is a pointer to the actual variable _HUGE in | |
| 92 | − * MSVCRT.DLL. If we used _HUGE directly we would get a pointer | |
| 93 | − * to a thunk function. | |
| 94 | − * | |
| 95 | − * NOTE: The CRTDLL version uses _HUGE_dll instead. | |
| 96 | − */ | |
| 97 | − | |
| 98 | −#ifndef __DECLSPEC_SUPPORTED | |
| 74 | +#ifndef _EXCEPTION_DEFINED | |
| 75 | +#define _EXCEPTION_DEFINED | |
| 76 | + struct _exception { | |
| 77 | + int type; | |
| 78 | + char *name; | |
| 79 | + double arg1; | |
| 80 | + double arg2; | |
| 81 | + double retval; | |
| 82 | + }; | |
| 83 | +#endif | |
| 99 | 84 | |
| 100 | −#ifdef __MSVCRT__ | |
| 101 | −extern double* __imp__HUGE; | |
| 102 | −#define HUGE_VAL (*__imp__HUGE) | |
| 103 | −#else | |
| 104 | −/* CRTDLL */ | |
| 105 | −extern double* __imp__HUGE_dll; | |
| 106 | −#define HUGE_VAL (*__imp__HUGE_dll) | |
| 85 | +#ifndef _COMPLEX_DEFINED | |
| 86 | +#define _COMPLEX_DEFINED | |
| 87 | + struct _complex { | |
| 88 | + double x,y; | |
| 89 | + }; | |
| 107 | 90 | #endif |
| 108 | 91 | |
| 109 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 92 | +#define EDOM 33 | |
| 93 | +#define ERANGE 34 | |
| 110 | 94 | |
| 111 | −#ifdef __MSVCRT__ | |
| 112 | −__MINGW_IMPORT double _HUGE; | |
| 113 | −#define HUGE_VAL _HUGE | |
| 95 | +#ifndef _HUGE | |
| 96 | +#ifdef _MSVCRT_ | |
| 97 | + extern double *_HUGE; | |
| 114 | 98 | #else |
| 115 | −/* CRTDLL */ | |
| 116 | −__MINGW_IMPORT double _HUGE_dll; | |
| 117 | −#define HUGE_VAL _HUGE_dll | |
| 99 | + extern double *_imp___HUGE; | |
| 100 | +#define _HUGE (*_imp___HUGE) | |
| 101 | +#endif | |
| 118 | 102 | #endif |
| 119 | 103 | |
| 120 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 121 | − | |
| 122 | −struct _exception | |
| 123 | −{ | |
| 124 | − int type; | |
| 125 | − char *name; | |
| 126 | − double arg1; | |
| 127 | − double arg2; | |
| 128 | − double retval; | |
| 129 | −}; | |
| 130 | − | |
| 131 | − | |
| 132 | −double sin (double); | |
| 133 | −double cos (double); | |
| 134 | −double tan (double); | |
| 135 | −double sinh (double); | |
| 136 | −double cosh (double); | |
| 137 | −double tanh (double); | |
| 138 | −double asin (double); | |
| 139 | −double acos (double); | |
| 140 | −double atan (double); | |
| 141 | −double atan2 (double, double); | |
| 142 | −double exp (double); | |
| 143 | −double log (double); | |
| 144 | −double log10 (double); | |
| 145 | −double pow (double, double); | |
| 146 | −double sqrt (double); | |
| 147 | −double ceil (double); | |
| 148 | −double floor (double); | |
| 149 | −double fabs (double); | |
| 150 | −double ldexp (double, int); | |
| 151 | −double frexp (double, int*); | |
| 152 | −double modf (double, double*); | |
| 153 | −double fmod (double, double); | |
| 154 | − | |
| 155 | − | |
| 156 | −#ifndef __STRICT_ANSI__ | |
| 157 | − | |
| 158 | −/* Complex number (for cabs) */ | |
| 159 | −struct _complex | |
| 160 | −{ | |
| 161 | − double x; /* Real part */ | |
| 162 | − double y; /* Imaginary part */ | |
| 163 | −}; | |
| 164 | − | |
| 165 | −double _cabs (struct _complex); | |
| 166 | −double _hypot (double, double); | |
| 167 | −double _j0 (double); | |
| 168 | −double _j1 (double); | |
| 169 | −double _jn (int, double); | |
| 170 | −double _y0 (double); | |
| 171 | −double _y1 (double); | |
| 172 | −double _yn (int, double); | |
| 173 | −int _matherr (struct _exception *); | |
| 174 | − | |
| 175 | −/* These are also declared in Mingw float.h; needed here as well to work | |
| 176 | − around GCC build issues. */ | |
| 177 | −/* BEGIN FLOAT.H COPY */ | |
| 178 | −/* | |
| 179 | − * IEEE recommended functions | |
| 180 | − */ | |
| 181 | − | |
| 182 | −double _chgsign (double); | |
| 183 | −double _copysign (double, double); | |
| 184 | −double _logb (double); | |
| 185 | −double _nextafter (double, double); | |
| 186 | −double _scalb (double, long); | |
| 187 | − | |
| 188 | −int _finite (double); | |
| 189 | −int _fpclass (double); | |
| 190 | −int _isnan (double); | |
| 191 | − | |
| 192 | −/* END FLOAT.H COPY */ | |
| 193 | − | |
| 194 | −#if !defined (_NO_OLDNAMES) \ | |
| 195 | − || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) | |
| 196 | − | |
| 197 | −/* | |
| 198 | − * Non-underscored versions of non-ANSI functions. These reside in | |
| 199 | − * liboldnames.a. They are now also ISO C99 standand names. | |
| 200 | − * Provided for extra portability. | |
| 201 | − */ | |
| 104 | +#define HUGE_VAL _HUGE | |
| 202 | 105 | |
| 203 | −double cabs (struct _complex); | |
| 204 | −double hypot (double, double); | |
| 205 | −double j0 (double); | |
| 206 | −double j1 (double); | |
| 207 | −double jn (int, double); | |
| 208 | −double y0 (double); | |
| 209 | −double y1 (double); | |
| 210 | −double yn (int, double); | |
| 106 | +#ifndef _CRT_ABS_DEFINED | |
| 107 | +#define _CRT_ABS_DEFINED | |
| 108 | + int __cdecl abs(int _X); | |
| 109 | + long __cdecl labs(long _X); | |
| 110 | +#endif | |
| 111 | + double __cdecl acos(double _X); | |
| 112 | + double __cdecl asin(double _X); | |
| 113 | + double __cdecl atan(double _X); | |
| 114 | + double __cdecl atan2(double _Y,double _X); | |
| 115 | +#ifndef _SIGN_DEFINED | |
| 116 | +#define _SIGN_DEFINED | |
| 117 | + _CRTIMP double __cdecl _copysign (double _Number,double _Sign); | |
| 118 | + _CRTIMP double __cdecl _chgsign (double _X); | |
| 119 | +#endif | |
| 120 | + double __cdecl cos(double _X); | |
| 121 | + double __cdecl cosh(double _X); | |
| 122 | + double __cdecl exp(double _X); | |
| 123 | + double __cdecl expm1(double _X); | |
| 124 | + double __cdecl fabs(double _X); | |
| 125 | + double __cdecl fmod(double _X,double _Y); | |
| 126 | + double __cdecl log(double _X); | |
| 127 | + double __cdecl log10(double _X); | |
| 128 | + double __cdecl pow(double _X,double _Y); | |
| 129 | + double __cdecl sin(double _X); | |
| 130 | + double __cdecl sinh(double _X); | |
| 131 | + double __cdecl tan(double _X); | |
| 132 | + double __cdecl tanh(double _X); | |
| 133 | + double __cdecl sqrt(double _X); | |
| 134 | +#ifndef _CRT_ATOF_DEFINED | |
| 135 | +#define _CRT_ATOF_DEFINED | |
| 136 | + double __cdecl atof(const char *_String); | |
| 137 | + double __cdecl _atof_l(const char *_String,_locale_t _Locale); | |
| 138 | +#endif | |
| 211 | 139 | |
| 212 | −#endif /* Not _NO_OLDNAMES */ | |
| 140 | + _CRTIMP double __cdecl _cabs(struct _complex _ComplexA); | |
| 141 | + double __cdecl ceil(double _X); | |
| 142 | + double __cdecl floor(double _X); | |
| 143 | + double __cdecl frexp(double _X,int *_Y); | |
| 144 | + double __cdecl _hypot(double _X,double _Y); | |
| 145 | + _CRTIMP double __cdecl _j0(double _X); | |
| 146 | + _CRTIMP double __cdecl _j1(double _X); | |
| 147 | + _CRTIMP double __cdecl _jn(int _X,double _Y); | |
| 148 | + double __cdecl ldexp(double _X,int _Y); | |
| 149 | +#ifndef _CRT_MATHERR_DEFINED | |
| 150 | +#define _CRT_MATHERR_DEFINED | |
| 151 | + int __cdecl _matherr(struct _exception *_Except); | |
| 152 | +#endif | |
| 153 | + double __cdecl modf(double _X,double *_Y); | |
| 154 | + _CRTIMP double __cdecl _y0(double _X); | |
| 155 | + _CRTIMP double __cdecl _y1(double _X); | |
| 156 | + _CRTIMP double __cdecl _yn(int _X,double _Y); | |
| 157 | + | |
| 158 | +#if(defined(_X86_) && !defined(__x86_64)) | |
| 159 | + _CRTIMP int __cdecl _set_SSE2_enable(int _Flag); | |
| 160 | + /* from libmingwex */ | |
| 161 | + float __cdecl _hypotf(float _X,float _Y); | |
| 162 | +#endif | |
| 213 | 163 | |
| 214 | −#endif /* Not __STRICT_ANSI__ */ | |
| 164 | + float frexpf(float _X,int *_Y); | |
| 165 | + float __cdecl ldexpf(float _X,int _Y); | |
| 166 | + long double __cdecl ldexpl(long double _X,int _Y); | |
| 167 | + float __cdecl acosf(float _X); | |
| 168 | + float __cdecl asinf(float _X); | |
| 169 | + float __cdecl atanf(float _X); | |
| 170 | + float __cdecl atan2f(float _X,float _Y); | |
| 171 | + float __cdecl cosf(float _X); | |
| 172 | + float __cdecl sinf(float _X); | |
| 173 | + float __cdecl tanf(float _X); | |
| 174 | + float __cdecl coshf(float _X); | |
| 175 | + float __cdecl sinhf(float _X); | |
| 176 | + float __cdecl tanhf(float _X); | |
| 177 | + float __cdecl expf(float _X); | |
| 178 | + float __cdecl expm1f(float _X); | |
| 179 | + float __cdecl logf(float _X); | |
| 180 | + float __cdecl log10f(float _X); | |
| 181 | + float __cdecl modff(float _X,float *_Y); | |
| 182 | + float __cdecl powf(float _X,float _Y); | |
| 183 | + float __cdecl sqrtf(float _X); | |
| 184 | + float __cdecl ceilf(float _X); | |
| 185 | + float __cdecl floorf(float _X); | |
| 186 | + float __cdecl fmodf(float _X,float _Y); | |
| 187 | + float __cdecl _hypotf(float _X,float _Y); | |
| 188 | + float __cdecl fabsf(float _X); | |
| 189 | +#if !defined(__ia64__) | |
| 190 | + /* from libmingwex */ | |
| 191 | + float __cdecl _copysignf (float _Number,float _Sign); | |
| 192 | + float __cdecl _chgsignf (float _X); | |
| 193 | + float __cdecl _logbf(float _X); | |
| 194 | + float __cdecl _nextafterf(float _X,float _Y); | |
| 195 | + int __cdecl _finitef(float _X); | |
| 196 | + int __cdecl _isnanf(float _X); | |
| 197 | + int __cdecl _fpclassf(float _X); | |
| 198 | +#endif | |
| 215 | 199 | |
| 216 | −#ifdef __cplusplus | |
| 217 | −} | |
| 200 | +#ifndef __cplusplus | |
| 201 | + __CRT_INLINE long double __cdecl fabsl (long double x) | |
| 202 | + { | |
| 203 | + long double res; | |
| 204 | + __asm__ ("fabs;" : "=t" (res) : "0" (x)); | |
| 205 | + return res; | |
| 206 | + } | |
| 207 | +#define _hypotl(x,y) ((long double)_hypot((double)(x),(double)(y))) | |
| 208 | +#define _matherrl _matherr | |
| 209 | + __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); } | |
| 210 | + __CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); } | |
| 211 | + __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); } | |
| 212 | + | |
| 213 | +#if !defined (__ia64__) | |
| 214 | + __CRT_INLINE float __cdecl fabsf (float x) | |
| 215 | + { | |
| 216 | + float res; | |
| 217 | + __asm__ ("fabs;" : "=t" (res) : "0" (x)); | |
| 218 | + return res; | |
| 219 | + } | |
| 220 | + | |
| 221 | + __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); } | |
| 222 | +#endif | |
| 223 | +#else | |
| 224 | + // cplusplus | |
| 225 | + __CRT_INLINE long double __cdecl fabsl (long double x) | |
| 226 | + { | |
| 227 | + long double res; | |
| 228 | + __asm__ ("fabs;" : "=t" (res) : "0" (x)); | |
| 229 | + return res; | |
| 230 | + } | |
| 231 | + __CRT_INLINE long double modfl(long double _X,long double *_Y) { | |
| 232 | + double _Di,_Df = modf((double)_X,&_Di); | |
| 233 | + *_Y = (long double)_Di; | |
| 234 | + return (_Df); | |
| 235 | + } | |
| 236 | + __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign(static_cast<double>(_Number)); } | |
| 237 | + __CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign(static_cast<double>(_Number),static_cast<double>(_Sign)); } | |
| 238 | + __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); } | |
| 239 | +#ifndef __ia64__ | |
| 240 | + __CRT_INLINE float __cdecl fabsf (float x) | |
| 241 | + { | |
| 242 | + float res; | |
| 243 | + __asm__ ("fabs;" : "=t" (res) : "0" (x)); | |
| 244 | + return res; | |
| 245 | + } | |
| 246 | + __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); } | |
| 247 | +#ifndef __x86_64 | |
| 248 | + __CRT_INLINE float acosf(float _X) { return ((float)acos((double)_X)); } | |
| 249 | + __CRT_INLINE float asinf(float _X) { return ((float)asin((double)_X)); } | |
| 250 | + __CRT_INLINE float atanf(float _X) { return ((float)atan((double)_X)); } | |
| 251 | + __CRT_INLINE float atan2f(float _X,float _Y) { return ((float)atan2((double)_X,(double)_Y)); } | |
| 252 | + __CRT_INLINE float ceilf(float _X) { return ((float)ceil((double)_X)); } | |
| 253 | + __CRT_INLINE float cosf(float _X) { return ((float)cos((double)_X)); } | |
| 254 | + __CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); } | |
| 255 | + __CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); } | |
| 256 | + __CRT_INLINE float floorf(float _X) { return ((float)floor((double)_X)); } | |
| 257 | + __CRT_INLINE float fmodf(float _X,float _Y) { return ((float)fmod((double)_X,(double)_Y)); } | |
| 258 | + __CRT_INLINE float logf(float _X) { return ((float)log((double)_X)); } | |
| 259 | + __CRT_INLINE float log10f(float _X) { return ((float)log10((double)_X)); } | |
| 260 | + __CRT_INLINE float modff(float _X,float *_Y) { | |
| 261 | + double _Di,_Df = modf((double)_X,&_Di); | |
| 262 | + *_Y = (float)_Di; | |
| 263 | + return ((float)_Df); | |
| 264 | + } | |
| 265 | + __CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); } | |
| 266 | + __CRT_INLINE float sinf(float _X) { return ((float)sin((double)_X)); } | |
| 267 | + __CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); } | |
| 268 | + __CRT_INLINE float sqrtf(float _X) { return ((float)sqrt((double)_X)); } | |
| 269 | + __CRT_INLINE float tanf(float _X) { return ((float)tan((double)_X)); } | |
| 270 | + __CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); } | |
| 271 | +#endif | |
| 272 | +#endif | |
| 218 | 273 | #endif |
| 219 | −#endif /* Not RC_INVOKED */ | |
| 220 | 274 | |
| 275 | +#ifndef NO_OLDNAMES | |
| 276 | +#define matherr _matherr | |
| 277 | + | |
| 278 | +#define HUGE _HUGE | |
| 279 | + /* double __cdecl cabs(struct _complex _X); */ | |
| 280 | + double __cdecl hypot(double _X,double _Y); | |
| 281 | + _CRTIMP double __cdecl j0(double _X); | |
| 282 | + _CRTIMP double __cdecl j1(double _X); | |
| 283 | + _CRTIMP double __cdecl jn(int _X,double _Y); | |
| 284 | + _CRTIMP double __cdecl y0(double _X); | |
| 285 | + _CRTIMP double __cdecl y1(double _X); | |
| 286 | + _CRTIMP double __cdecl yn(int _X,double _Y); | |
| 287 | +#endif | |
| 221 | 288 | |
| 222 | 289 | #ifndef __NO_ISOCEXT |
| 290 | +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ | |
| 291 | + || !defined __STRICT_ANSI__ || defined __GLIBCPP__ | |
| 223 | 292 | |
| 224 | −#define INFINITY HUGE_VAL | |
| 225 | 293 | #define NAN (0.0F/0.0F) |
| 294 | +#define HUGE_VALF (1.0F/0.0F) | |
| 295 | +#define HUGE_VALL (1.0L/0.0L) | |
| 296 | +#define INFINITY (1.0F/0.0F) | |
| 297 | + | |
| 226 | 298 | |
| 227 | −/* | |
| 228 | − Return values for fpclassify. | |
| 229 | − These are based on Intel x87 fpu condition codes | |
| 230 | − in the high byte of status word and differ from | |
| 231 | − the return values for MS IEEE 754 extension _fpclass() | |
| 232 | −*/ | |
| 233 | 299 | #define FP_NAN 0x0100 |
| 234 | 300 | #define FP_NORMAL 0x0400 |
| 235 | 301 | #define FP_INFINITE (FP_NAN | FP_NORMAL) |
| 236 | 302 | #define FP_ZERO 0x4000 |
| 237 | 303 | #define FP_SUBNORMAL (FP_NORMAL | FP_ZERO) |
| 238 | −/* 0x0200 is signbit mask */ | |
| 304 | + /* 0x0200 is signbit mask */ | |
| 239 | 305 | |
| 240 | −#ifndef RC_INVOKED | |
| 241 | −#ifdef __cplusplus | |
| 242 | −extern "C" { | |
| 243 | −#endif | |
| 244 | 306 | |
| 245 | −double nan(const char *tagp); | |
| 246 | −float nanf(const char *tagp); | |
| 307 | + /* | |
| 308 | + We can't __CRT_INLINE float or double, because we want to ensure truncation | |
| 309 | + to semantic type before classification. | |
| 310 | + (A normal long double value might become subnormal when | |
| 311 | + converted to double, and zero when converted to float.) | |
| 312 | + */ | |
| 247 | 313 | |
| 248 | −#ifndef __STRICT_ANSI__ | |
| 249 | −#define nan() nan("") | |
| 250 | −#define nanf() nanf("") | |
| 251 | −#endif | |
| 314 | + extern int __cdecl __fpclassifyf (float); | |
| 315 | + extern int __cdecl __fpclassify (double); | |
| 252 | 316 | |
| 317 | + __CRT_INLINE int __cdecl __fpclassifyl (long double x){ | |
| 318 | + unsigned short sw; | |
| 319 | + __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x)); | |
| 320 | + return sw & (FP_NAN | FP_NORMAL | FP_ZERO ); | |
| 321 | + } | |
| 253 | 322 | |
| 254 | −/* | |
| 255 | − We can't inline float, because we want to ensure truncation | |
| 256 | − to semantic type before classification. If we extend to long | |
| 257 | − double, we will also need to make double extern only. | |
| 258 | − (A normal long double value might become subnormal when | |
| 259 | − converted to double, and zero when converted to float.) | |
| 260 | −*/ | |
| 261 | −extern __inline__ int __fpclassify (double x){ | |
| 262 | − unsigned short sw; | |
| 263 | − __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x)); | |
| 264 | − return sw & (FP_NAN | FP_NORMAL | FP_ZERO ); | |
| 265 | −} | |
| 323 | +#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \ | |
| 324 | + : sizeof (x) == sizeof (double) ? __fpclassify (x) \ | |
| 325 | + : __fpclassifyl (x)) | |
| 266 | 326 | |
| 267 | −extern int __fpclassifyf (float); | |
| 327 | + /* 7.12.3.2 */ | |
| 328 | +#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0) | |
| 268 | 329 | |
| 269 | −#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) \ | |
| 270 | − : __fpclassify(x)) | |
| 330 | + /* 7.12.3.3 */ | |
| 331 | +#define isinf(x) (fpclassify(x) == FP_INFINITE) | |
| 271 | 332 | |
| 272 | −/* We don't need to worry about trucation here: | |
| 273 | − A NaN stays a NaN. */ | |
| 333 | + /* 7.12.3.4 */ | |
| 334 | + /* We don't need to worry about trucation here: | |
| 335 | + A NaN stays a NaN. */ | |
| 336 | + | |
| 337 | + __CRT_INLINE int __cdecl __isnan (double _x) | |
| 338 | + { | |
| 339 | + unsigned short sw; | |
| 340 | + __asm__ ("fxam;" | |
| 341 | + "fstsw %%ax": "=a" (sw) : "t" (_x)); | |
| 342 | + return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL)) | |
| 343 | + == FP_NAN; | |
| 344 | + } | |
| 345 | + | |
| 346 | + __CRT_INLINE int __cdecl __isnanf (float _x) | |
| 347 | + { | |
| 348 | + unsigned short sw; | |
| 349 | + __asm__ ("fxam;" | |
| 350 | + "fstsw %%ax": "=a" (sw) : "t" (_x)); | |
| 351 | + return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL)) | |
| 352 | + == FP_NAN; | |
| 353 | + } | |
| 354 | + | |
| 355 | + __CRT_INLINE int __cdecl __isnanl (long double _x) | |
| 356 | + { | |
| 357 | + unsigned short sw; | |
| 358 | + __asm__ ("fxam;" | |
| 359 | + "fstsw %%ax": "=a" (sw) : "t" (_x)); | |
| 360 | + return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL)) | |
| 361 | + == FP_NAN; | |
| 362 | + } | |
| 363 | + | |
| 364 | + | |
| 365 | +#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \ | |
| 366 | + : sizeof (x) == sizeof (double) ? __isnan (x) \ | |
| 367 | + : __isnanl (x)) | |
| 368 | + | |
| 369 | + /* 7.12.3.5 */ | |
| 370 | +#define isnormal(x) (fpclassify(x) == FP_NORMAL) | |
| 274 | 371 | |
| 275 | −extern __inline__ int __isnan (double _x) | |
| 276 | −{ | |
| 277 | − unsigned short sw; | |
| 278 | − __asm__ ("fxam;" | |
| 279 | − "fstsw %%ax": "=a" (sw) : "t" (_x)); | |
| 280 | − return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL)) | |
| 281 | − == FP_NAN; | |
| 282 | −} | |
| 372 | + /* 7.12.3.6 The signbit macro */ | |
| 373 | + __CRT_INLINE int __cdecl __signbit (double x) { | |
| 374 | + unsigned short stw; | |
| 375 | + __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x)); | |
| 376 | + return stw & 0x0200; | |
| 377 | + } | |
| 378 | + | |
| 379 | + __CRT_INLINE int __cdecl __signbitf (float x) { | |
| 380 | + unsigned short stw; | |
| 381 | + __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x)); | |
| 382 | + return stw & 0x0200; | |
| 383 | + } | |
| 384 | + | |
| 385 | + __CRT_INLINE int __cdecl __signbitl (long double x) { | |
| 386 | + unsigned short stw; | |
| 387 | + __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x)); | |
| 388 | + return stw & 0x0200; | |
| 389 | + } | |
| 390 | + | |
| 391 | +#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \ | |
| 392 | + : sizeof (x) == sizeof (double) ? __signbit (x) \ | |
| 393 | + : __signbitl (x)) | |
| 394 | + | |
| 395 | + extern double __cdecl exp2(double); | |
| 396 | + extern float __cdecl exp2f(float); | |
| 397 | + extern long double __cdecl exp2l(long double); | |
| 398 | + | |
| 399 | +#define FP_ILOGB0 ((int)0x80000000) | |
| 400 | +#define FP_ILOGBNAN ((int)0x80000000) | |
| 401 | + extern int __cdecl ilogb (double); | |
| 402 | + extern int __cdecl ilogbf (float); | |
| 403 | + extern int __cdecl ilogbl (long double); | |
| 404 | + | |
| 405 | + extern double __cdecl log1p(double); | |
| 406 | + extern float __cdecl log1pf(float); | |
| 407 | + extern long double __cdecl log1pl(long double); | |
| 408 | + | |
| 409 | + extern double __cdecl log2 (double); | |
| 410 | + extern float __cdecl log2f (float); | |
| 411 | + extern long double __cdecl log2l (long double); | |
| 412 | + | |
| 413 | + extern double __cdecl logb (double); | |
| 414 | + extern float __cdecl logbf (float); | |
| 415 | + extern long double __cdecl logbl (long double); | |
| 416 | + | |
| 417 | + __CRT_INLINE double __cdecl logb (double x) | |
| 418 | + { | |
| 419 | + double res; | |
| 420 | + __asm__ ("fxtract\n\t" | |
| 421 | + "fstp %%st" : "=t" (res) : "0" (x)); | |
| 422 | + return res; | |
| 423 | + } | |
| 424 | + | |
| 425 | + __CRT_INLINE float __cdecl logbf (float x) | |
| 426 | + { | |
| 427 | + float res; | |
| 428 | + __asm__ ("fxtract\n\t" | |
| 429 | + "fstp %%st" : "=t" (res) : "0" (x)); | |
| 430 | + return res; | |
| 431 | + } | |
| 432 | + | |
| 433 | + __CRT_INLINE long double __cdecl logbl (long double x) | |
| 434 | + { | |
| 435 | + long double res; | |
| 436 | + __asm__ ("fxtract\n\t" | |
| 437 | + "fstp %%st" : "=t" (res) : "0" (x)); | |
| 438 | + return res; | |
| 439 | + } | |
| 440 | + | |
| 441 | + extern long double __cdecl modfl (long double, long double*); | |
| 442 | + | |
| 443 | + /* 7.12.6.13 */ | |
| 444 | + extern double __cdecl scalbn (double, int); | |
| 445 | + extern float __cdecl scalbnf (float, int); | |
| 446 | + extern long double __cdecl scalbnl (long double, int); | |
| 447 | + | |
| 448 | + extern double __cdecl scalbln (double, long); | |
| 449 | + extern float __cdecl scalblnf (float, long); | |
| 450 | + extern long double __cdecl scalblnl (long double, long); | |
| 451 | + | |
| 452 | + /* 7.12.7.1 */ | |
| 453 | + /* Implementations adapted from Cephes versions */ | |
| 454 | + extern double __cdecl cbrt (double); | |
| 455 | + extern float __cdecl cbrtf (float); | |
| 456 | + extern long double __cdecl cbrtl (long double); | |
| 457 | + | |
| 458 | + __CRT_INLINE float __cdecl hypotf (float x, float y) | |
| 459 | + { return (float) hypot (x, y);} | |
| 460 | + extern long double __cdecl hypotl (long double, long double); | |
| 461 | + | |
| 462 | + extern long double __cdecl powl (long double, long double); | |
| 463 | + extern long double __cdecl expl(long double); | |
| 464 | + extern long double __cdecl expm1l(long double); | |
| 465 | + extern long double __cdecl coshl(long double); | |
| 466 | + extern long double __cdecl fabsl (long double); | |
| 467 | + extern long double __cdecl acosl(long double); | |
| 468 | + extern long double __cdecl asinl(long double); | |
| 469 | + extern long double __cdecl atanl(long double); | |
| 470 | + extern long double __cdecl atan2l(long double,long double); | |
| 471 | + extern long double __cdecl sinhl(long double); | |
| 472 | + extern long double __cdecl tanhl(long double); | |
| 473 | + | |
| 474 | + /* 7.12.8.1 The erf functions */ | |
| 475 | + extern double __cdecl erf (double); | |
| 476 | + extern float __cdecl erff (float); | |
| 477 | + /* TODO | |
| 478 | + extern long double __cdecl erfl (long double); | |
| 479 | + */ | |
| 480 | + | |
| 481 | + /* 7.12.8.2 The erfc functions */ | |
| 482 | + extern double __cdecl erfc (double); | |
| 483 | + extern float __cdecl erfcf (float); | |
| 484 | + /* TODO | |
| 485 | + extern long double __cdecl erfcl (long double); | |
| 486 | + */ | |
| 487 | + | |
| 488 | + /* 7.12.8.3 The lgamma functions */ | |
| 489 | + extern double __cdecl lgamma (double); | |
| 490 | + extern float __cdecl lgammaf (float); | |
| 491 | + extern long double __cdecl lgammal (long double); | |
| 492 | + | |
| 493 | + /* 7.12.8.4 The tgamma functions */ | |
| 494 | + extern double __cdecl tgamma (double); | |
| 495 | + extern float __cdecl tgammaf (float); | |
| 496 | + extern long double __cdecl tgammal (long double); | |
| 497 | + | |
| 498 | + extern long double __cdecl ceill (long double); | |
| 499 | + extern long double __cdecl floorl (long double); | |
| 500 | + extern long double __cdecl frexpl(long double,int *); | |
| 501 | + extern long double __cdecl log10l(long double); | |
| 502 | + extern long double __cdecl logl(long double); | |
| 503 | + extern long double __cdecl cosl(long double); | |
| 504 | + extern long double __cdecl sinl(long double); | |
| 505 | + extern long double __cdecl tanl(long double); | |
| 506 | + extern long double sqrtl(long double); | |
| 507 | + | |
| 508 | + /* 7.12.9.3 */ | |
| 509 | + extern double __cdecl nearbyint ( double); | |
| 510 | + extern float __cdecl nearbyintf (float); | |
| 511 | + extern long double __cdecl nearbyintl (long double); | |
| 512 | + | |
| 513 | + /* 7.12.9.4 */ | |
| 514 | + /* round, using fpu control word settings */ | |
| 515 | + __CRT_INLINE double __cdecl rint (double x) | |
| 516 | + { | |
| 517 | + double retval; | |
| 518 | + __asm__ ("frndint;": "=t" (retval) : "0" (x)); | |
| 519 | + return retval; | |
| 520 | + } | |
| 521 | + | |
| 522 | + __CRT_INLINE float __cdecl rintf (float x) | |
| 523 | + { | |
| 524 | + float retval; | |
| 525 | + __asm__ ("frndint;" : "=t" (retval) : "0" (x) ); | |
| 526 | + return retval; | |
| 527 | + } | |
| 528 | + | |
| 529 | + __CRT_INLINE long double __cdecl rintl (long double x) | |
| 530 | + { | |
| 531 | + long double retval; | |
| 532 | + __asm__ ("frndint;" : "=t" (retval) : "0" (x) ); | |
| 533 | + return retval; | |
| 534 | + } | |
| 535 | + | |
| 536 | + /* 7.12.9.5 */ | |
| 537 | + __CRT_INLINE long __cdecl lrint (double x) | |
| 538 | + { | |
| 539 | + long retval; | |
| 540 | + __asm__ __volatile__ \ | |
| 541 | + ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 542 | + return retval; | |
| 543 | + } | |
| 544 | + | |
| 545 | + __CRT_INLINE long __cdecl lrintf (float x) | |
| 546 | + { | |
| 547 | + long retval; | |
| 548 | + __asm__ __volatile__ \ | |
| 549 | + ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 550 | + return retval; | |
| 551 | + } | |
| 552 | + | |
| 553 | + __CRT_INLINE long __cdecl lrintl (long double x) | |
| 554 | + { | |
| 555 | + long retval; | |
| 556 | + __asm__ __volatile__ \ | |
| 557 | + ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 558 | + return retval; | |
| 559 | + } | |
| 560 | + | |
| 561 | + __CRT_INLINE long long __cdecl llrint (double x) | |
| 562 | + { | |
| 563 | + long long retval; | |
| 564 | + __asm__ __volatile__ \ | |
| 565 | + ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 566 | + return retval; | |
| 567 | + } | |
| 568 | + | |
| 569 | + __CRT_INLINE long long __cdecl llrintf (float x) | |
| 570 | + { | |
| 571 | + long long retval; | |
| 572 | + __asm__ __volatile__ \ | |
| 573 | + ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 574 | + return retval; | |
| 575 | + } | |
| 576 | + | |
| 577 | + __CRT_INLINE long long __cdecl llrintl (long double x) | |
| 578 | + { | |
| 579 | + long long retval; | |
| 580 | + __asm__ __volatile__ \ | |
| 581 | + ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \ | |
| 582 | + return retval; | |
| 583 | + } | |
| 584 | + | |
| 585 | + /* 7.12.9.6 */ | |
| 586 | + /* round away from zero, regardless of fpu control word settings */ | |
| 587 | + extern double __cdecl round (double); | |
| 588 | + extern float __cdecl roundf (float); | |
| 589 | + extern long double __cdecl roundl (long double); | |
| 590 | + | |
| 591 | + /* 7.12.9.7 */ | |
| 592 | + extern long __cdecl lround (double); | |
| 593 | + extern long __cdecl lroundf (float); | |
| 594 | + extern long __cdecl lroundl (long double); | |
| 595 | + | |
| 596 | + extern long long __cdecl llround (double); | |
| 597 | + extern long long __cdecl llroundf (float); | |
| 598 | + extern long long __cdecl llroundl (long double); | |
| 599 | + | |
| 600 | + /* 7.12.9.8 */ | |
| 601 | + /* round towards zero, regardless of fpu control word settings */ | |
| 602 | + extern double __cdecl trunc (double); | |
| 603 | + extern float __cdecl truncf (float); | |
| 604 | + extern long double __cdecl truncl (long double); | |
| 605 | + | |
| 606 | + extern long double __cdecl fmodl (long double, long double); | |
| 607 | + | |
| 608 | + /* 7.12.10.2 */ | |
| 609 | + extern double __cdecl remainder (double, double); | |
| 610 | + extern float __cdecl remainderf (float, float); | |
| 611 | + extern long double __cdecl remainderl (long double, long double); | |
| 612 | + | |
| 613 | + /* 7.12.10.3 */ | |
| 614 | + extern double __cdecl remquo(double, double, int *); | |
| 615 | + extern float __cdecl remquof(float, float, int *); | |
| 616 | + extern long double __cdecl remquol(long double, long double, int *); | |
| 617 | + | |
| 618 | + /* 7.12.11.1 */ | |
| 619 | + extern double __cdecl copysign (double, double); /* in libmoldname.a */ | |
| 620 | + extern float __cdecl copysignf (float, float); | |
| 621 | + extern long double __cdecl copysignl (long double, long double); | |
| 622 | + | |
| 623 | + /* 7.12.11.2 Return a NaN */ | |
| 624 | + extern double __cdecl nan(const char *tagp); | |
| 625 | + extern float __cdecl nanf(const char *tagp); | |
| 626 | + extern long double __cdecl nanl(const char *tagp); | |
| 283 | 627 | |
| 284 | −extern __inline__ int __isnanf (float _x) | |
| 285 | −{ | |
| 286 | − unsigned short sw; | |
| 287 | − __asm__ ("fxam;" | |
| 288 | − "fstsw %%ax": "=a" (sw) : "t" (_x)); | |
| 289 | − return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL)) | |
| 290 | − == FP_NAN; | |
| 291 | −} | |
| 628 | +#ifndef __STRICT_ANSI__ | |
| 629 | +#define _nan() nan("") | |
| 630 | +#define _nanf() nanf("") | |
| 631 | +#define _nanl() nanl("") | |
| 632 | +#endif | |
| 292 | 633 | |
| 293 | −#define isnan(x) ((sizeof(x) == sizeof(float)) ? __isnanf(x) \ | |
| 294 | − : __isnan(x)) | |
| 634 | + /* 7.12.11.3 */ | |
| 635 | + extern double __cdecl nextafter (double, double); /* in libmoldname.a */ | |
| 636 | + extern float __cdecl nextafterf (float, float); | |
| 637 | + extern long double __cdecl nextafterl (long double, long double); | |
| 638 | + | |
| 639 | + /* 7.12.11.4 The nexttoward functions: TODO */ | |
| 640 | + | |
| 641 | + /* 7.12.12.1 */ | |
| 642 | + /* x > y ? (x - y) : 0.0 */ | |
| 643 | + extern double __cdecl fdim (double x, double y); | |
| 644 | + extern float __cdecl fdimf (float x, float y); | |
| 645 | + extern long double __cdecl fdiml (long double x, long double y); | |
| 646 | + | |
| 647 | + /* fmax and fmin. | |
| 648 | + NaN arguments are treated as missing data: if one argument is a NaN | |
| 649 | + and the other numeric, then these functions choose the numeric | |
| 650 | + value. */ | |
| 651 | + | |
| 652 | + /* 7.12.12.2 */ | |
| 653 | + extern double __cdecl fmax (double, double); | |
| 654 | + extern float __cdecl fmaxf (float, float); | |
| 655 | + extern long double __cdecl fmaxl (long double, long double); | |
| 656 | + | |
| 657 | + /* 7.12.12.3 */ | |
| 658 | + extern double __cdecl fmin (double, double); | |
| 659 | + extern float __cdecl fminf (float, float); | |
| 660 | + extern long double __cdecl fminl (long double, long double); | |
| 661 | + | |
| 662 | + /* 7.12.13.1 */ | |
| 663 | + /* return x * y + z as a ternary op */ | |
| 664 | + extern double __cdecl fma (double, double, double); | |
| 665 | + extern float __cdecl fmaf (float, float, float); | |
| 666 | + extern long double __cdecl fmal (long double, long double, long double); | |
| 667 | + | |
| 668 | + | |
| 669 | + /* 7.12.14 */ | |
| 670 | + /* | |
| 671 | + * With these functions, comparisons involving quiet NaNs set the FP | |
| 672 | + * condition code to "unordered". The IEEE floating-point spec | |
| 673 | + * dictates that the result of floating-point comparisons should be | |
| 674 | + * false whenever a NaN is involved, with the exception of the != op, | |
| 675 | + * which always returns true: yes, (NaN != NaN) is true). | |
| 676 | + */ | |
| 295 | 677 | |
| 678 | +#if __GNUC__ >= 3 | |
| 296 | 679 | |
| 297 | −#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0) | |
| 298 | −#define isinf(x) (fpclassify(x) == FP_INFINITE) | |
| 299 | −#define isnormal(x) (fpclassify(x) == FP_NORMAL) | |
| 680 | +#define isgreater(x, y) __builtin_isgreater(x, y) | |
| 681 | +#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) | |
| 682 | +#define isless(x, y) __builtin_isless(x, y) | |
| 683 | +#define islessequal(x, y) __builtin_islessequal(x, y) | |
| 684 | +#define islessgreater(x, y) __builtin_islessgreater(x, y) | |
| 685 | +#define isunordered(x, y) __builtin_isunordered(x, y) | |
| 300 | 686 | |
| 687 | +#else | |
| 688 | + /* helper */ | |
| 689 | + __CRT_INLINE int __cdecl | |
| 690 | + __fp_unordered_compare (long double x, long double y){ | |
| 691 | + unsigned short retval; | |
| 692 | + __asm__ ("fucom %%st(1);" | |
| 693 | + "fnstsw;": "=a" (retval) : "t" (x), "u" (y)); | |
| 694 | + return retval; | |
| 695 | + } | |
| 301 | 696 | |
| 302 | −extern __inline__ int __signbit (double x) { | |
| 303 | − unsigned short stw; | |
| 304 | − __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x)); | |
| 305 | − return stw & 0x0200; | |
| 306 | −} | |
| 697 | +#define isgreater(x, y) ((__fp_unordered_compare(x, y) \ | |
| 698 | + & 0x4500) == 0) | |
| 699 | +#define isless(x, y) ((__fp_unordered_compare (y, x) \ | |
| 700 | + & 0x4500) == 0) | |
| 701 | +#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \ | |
| 702 | + & FP_INFINITE) == 0) | |
| 703 | +#define islessequal(x, y) ((__fp_unordered_compare(y, x) \ | |
| 704 | + & FP_INFINITE) == 0) | |
| 705 | +#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \ | |
| 706 | + & FP_SUBNORMAL) == 0) | |
| 707 | +#define isunordered(x, y) ((__fp_unordered_compare(x, y) \ | |
| 708 | + & 0x4500) == 0x4500) | |
| 307 | 709 | |
| 308 | −extern __inline__ int __signbitf (float x) { | |
| 309 | − unsigned short stw; | |
| 310 | − __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x)); | |
| 311 | − return stw & 0x0200; | |
| 710 | +#endif | |
| 711 | + | |
| 712 | + | |
| 713 | +#endif /* __STDC_VERSION__ >= 199901L */ | |
| 714 | +#endif /* __NO_ISOCEXT */ | |
| 715 | + | |
| 716 | +#ifdef __cplusplus | |
| 717 | +} | |
| 718 | +extern "C++" { | |
| 719 | + template<class _Ty> inline _Ty _Pow_int(_Ty _X,int _Y) { | |
| 720 | + unsigned int _N; | |
| 721 | + if(_Y >= 0) _N = (unsigned int)_Y; | |
| 722 | + else _N = (unsigned int)(-_Y); | |
| 723 | + for(_Ty _Z = _Ty(1);;_X *= _X) { | |
| 724 | + if((_N & 1)!=0) _Z *= _X; | |
| 725 | + if((_N >>= 1)==0) return (_Y < 0 ? _Ty(1) / _Z : _Z); | |
| 726 | + } | |
| 727 | + } | |
| 312 | 728 | } |
| 729 | +#endif | |
| 730 | + | |
| 731 | +#pragma pack(pop) | |
| 313 | 732 | |
| 314 | −#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) \ | |
| 315 | − : __signbit(x)) | |
| 733 | +/* 7.12.14 */ | |
| 316 | 734 | /* |
| 317 | 735 | * With these functions, comparisons involving quiet NaNs set the FP |
| 318 | 736 | * condition code to "unordered". The IEEE floating-point spec |
| 319 | 737 | * dictates that the result of floating-point comparisons should be |
| 320 | − * false whenever a NaN is involved, with the exception of the !=, | |
| 321 | − * which always returns true. | |
| 738 | + * false whenever a NaN is involved, with the exception of the != op, | |
| 739 | + * which always returns true: yes, (NaN != NaN) is true). | |
| 322 | 740 | */ |
| 323 | 741 | |
| 324 | 742 | #if __GNUC__ >= 3 |
| @@ -332,7 +750,8 @@ extern __inline__ int __signbitf (float x) { · 7 unmodified lines | ||
| 332 | 750 | |
| 333 | 751 | #else |
| 334 | 752 | /* helper */ |
| 335 | −extern __inline__ int __fp_unordered_compare (double x, double y){ | |
| 753 | +__CRT_INLINE int __cdecl | |
| 754 | +__fp_unordered_compare (long double x, long double y){ | |
| 336 | 755 | unsigned short retval; |
| 337 | 756 | __asm__ ("fucom %%st(1);" |
| 338 | 757 | "fnstsw;": "=a" (retval) : "t" (x), "u" (y)); |
| @@ -354,85 +773,5 @@ extern __inline__ int __fp_unordered_compare (double x, double y){ · 15 unmodified lines | ||
| 354 | 773 | |
| 355 | 774 | #endif |
| 356 | 775 | |
| 357 | −/* round, using fpu control word settings */ | |
| 358 | −extern __inline__ double rint (double x) | |
| 359 | −{ | |
| 360 | − double retval; | |
| 361 | − __asm__ ("frndint;": "=t" (retval) : "0" (x)); | |
| 362 | − return retval; | |
| 363 | −} | |
| 364 | − | |
| 365 | −extern __inline__ float rintf (float x) | |
| 366 | −{ | |
| 367 | − float retval; | |
| 368 | − __asm__ ("frndint;" : "=t" (retval) : "0" (x) ); | |
| 369 | − return retval; | |
| 370 | −} | |
| 371 | − | |
| 372 | −/* round away from zero, regardless of fpu control word settings */ | |
| 373 | −extern double round (double); | |
| 374 | −extern float roundf (float); | |
| 375 | − | |
| 376 | −/* round towards zero, regardless of fpu control word settings */ | |
| 377 | −extern double trunc (double); | |
| 378 | −extern float truncf (float); | |
| 379 | − | |
| 380 | − | |
| 381 | −/* fmax and fmin. | |
| 382 | − NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the | |
| 383 | − these functions choose the numeric value. | |
| 384 | −*/ | |
| 385 | − | |
| 386 | −extern double fmax (double, double); | |
| 387 | −extern double fmin (double, double); | |
| 388 | −extern float fmaxf (float, float); | |
| 389 | −float fminf (float, float); | |
| 390 | − | |
| 391 | −/* return x * y + z as a ternary op */ | |
| 392 | −extern double fma (double, double, double); | |
| 393 | −extern float fmaf (float, float, float); | |
| 394 | − | |
| 395 | −/* one lonely transcendental */ | |
| 396 | −extern double log2 (double _x); | |
| 397 | −extern float log2f (float _x); | |
| 398 | − | |
| 399 | −/* The underscored versions are in MSVCRT.dll. | |
| 400 | − The stubs for these are in libmingwex.a */ | |
| 401 | − | |
| 402 | −double copysign (double, double); | |
| 403 | −float copysignf (float, float); | |
| 404 | −double logb (double); | |
| 405 | −float logbf (float); | |
| 406 | −double nextafter (double, double); | |
| 407 | −float nextafterf (float, float); | |
| 408 | −double scalb (double, long); | |
| 409 | −float scalbf (float, long); | |
| 410 | − | |
| 411 | −#if !defined (__STRICT_ANSI__) /* inline using non-ANSI functions */ | |
| 412 | −extern __inline__ double copysign (double x, double y) | |
| 413 | − { return _copysign(x, y); } | |
| 414 | −extern __inline__ float copysignf (float x, float y) | |
| 415 | − { return _copysign(x, y); } | |
| 416 | −extern __inline__ double logb (double x) | |
| 417 | − { return _logb(x); } | |
| 418 | −extern __inline__ float logbf (float x) | |
| 419 | − { return _logb(x); } | |
| 420 | −extern __inline__ double nextafter(double x, double y) | |
| 421 | − { return _nextafter(x, y); } | |
| 422 | −extern __inline__ float nextafterf(float x, float y) | |
| 423 | − { return _nextafter(x, y); } | |
| 424 | −extern __inline__ double scalb (double x, long i) | |
| 425 | − { return _scalb (x, i); } | |
| 426 | −extern __inline__ float scalbf (float x, long i) | |
| 427 | − { return _scalb(x, i); } | |
| 428 | −#endif /* (__STRICT_ANSI__) */ | |
| 429 | − | |
| 430 | −#ifdef __cplusplus | |
| 431 | −} | |
| 432 | −#endif | |
| 433 | −#endif /* Not RC_INVOKED */ | |
| 434 | − | |
| 435 | −#endif /* __NO_ISOCEXT */ | |
| 436 | − | |
| 437 | −#endif /* Not _MATH_H_ */ | |
| 776 | +#endif /* End _MATH_H_ */ | |
| 438 | 777 | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * This file is part of the Mingw32 package. |
| 3 | 8 | * |
| @@ -1,9 +1,40 @@ | ||
| 1 | −/* | |
| 2 | − * This file is part of the Mingw32 package. | |
| 3 | − * | |
| 4 | − * memory.h maps to the standard string.h header. | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | 5 | */ |
| 6 | −#ifndef __STRICT_ANSI__ | |
| 7 | −#include <string.h> | |
| 6 | +#ifndef _INC_MEMORY | |
| 7 | +#define _INC_MEMORY | |
| 8 | + | |
| 9 | +#include <_mingw.h> | |
| 10 | + | |
| 11 | +#ifdef __cplusplus | |
| 12 | +extern "C" { | |
| 13 | +#endif | |
| 14 | + | |
| 15 | +#ifndef _CONST_RETURN | |
| 16 | +#define _CONST_RETURN | |
| 8 | 17 | #endif |
| 9 | 18 | |
| 19 | +#define _WConst_return _CONST_RETURN | |
| 20 | + | |
| 21 | +#ifndef _CRT_MEMORY_DEFINED | |
| 22 | +#define _CRT_MEMORY_DEFINED | |
| 23 | + _CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount); | |
| 24 | + _CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount); | |
| 25 | + _CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 26 | + _CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale); | |
| 27 | + int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 28 | + void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size); | |
| 29 | + void *__cdecl memset(void *_Dst,int _Val,size_t _Size); | |
| 30 | + | |
| 31 | +#ifndef NO_OLDNAMES | |
| 32 | + void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size); | |
| 33 | + int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 34 | +#endif | |
| 35 | +#endif | |
| 36 | + | |
| 37 | +#ifdef __cplusplus | |
| 38 | +} | |
| 39 | +#endif | |
| 40 | +#endif | |
| @@ -1,158 +1,176 @@ | ||
| 1 | −/* | |
| 2 | − * process.h | |
| 3 | − * | |
| 4 | − * Function calls for spawning child processes. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_PROCESS | |
| 7 | +#define _INC_PROCESS | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 28 | − | |
| 29 | −#ifndef _PROCESS_H_ | |
| 30 | −#define _PROCESS_H_ | |
| 31 | − | |
| 32 | −/* All the headers include this file. */ | |
| 33 | 9 | #include <_mingw.h> |
| 34 | 10 | |
| 35 | 11 | /* Includes a definition of _pid_t and pid_t */ |
| 36 | 12 | #include <sys/types.h> |
| 37 | 13 | |
| 38 | −/* | |
| 39 | − * Constants for cwait actions. | |
| 40 | − * Obsolete for Win32. | |
| 41 | − */ | |
| 42 | −#define _WAIT_CHILD 0 | |
| 43 | −#define _WAIT_GRANDCHILD 1 | |
| 44 | − | |
| 45 | −#ifndef _NO_OLDNAMES | |
| 46 | −#define WAIT_CHILD _WAIT_CHILD | |
| 47 | −#define WAIT_GRANDCHILD _WAIT_GRANDCHILD | |
| 48 | −#endif /* Not _NO_OLDNAMES */ | |
| 49 | − | |
| 50 | −/* | |
| 51 | − * Mode constants for spawn functions. | |
| 52 | − */ | |
| 53 | −#define _P_WAIT 0 | |
| 54 | −#define _P_NOWAIT 1 | |
| 55 | −#define _P_OVERLAY 2 | |
| 56 | −#define _OLD_P_OVERLAY _P_OVERLAY | |
| 57 | −#define _P_NOWAITO 3 | |
| 58 | −#define _P_DETACH 4 | |
| 59 | − | |
| 60 | −#ifndef _NO_OLDNAMES | |
| 61 | −#define P_WAIT _P_WAIT | |
| 62 | −#define P_NOWAIT _P_NOWAIT | |
| 63 | −#define P_OVERLAY _P_OVERLAY | |
| 64 | −#define OLD_P_OVERLAY _OLD_P_OVERLAY | |
| 65 | −#define P_NOWAITO _P_NOWAITO | |
| 66 | −#define P_DETACH _P_DETACH | |
| 67 | −#endif /* Not _NO_OLDNAMES */ | |
| 68 | − | |
| 69 | − | |
| 70 | −#ifndef RC_INVOKED | |
| 71 | − | |
| 72 | −#ifdef __cplusplus | |
| 14 | +#ifndef _POSIX_ | |
| 15 | +#ifdef __cplusplus | |
| 73 | 16 | extern "C" { |
| 74 | 17 | #endif |
| 75 | 18 | |
| 76 | −void _cexit(void); | |
| 77 | −void _c_exit(void); | |
| 78 | − | |
| 79 | −int _cwait (int*, _pid_t, int); | |
| 80 | − | |
| 81 | −_pid_t _getpid(void); | |
| 82 | − | |
| 83 | −int _execl (const char*, const char*, ...); | |
| 84 | −int _execle (const char*, const char*, ...); | |
| 85 | −int _execlp (const char*, const char*, ...); | |
| 86 | −int _execlpe (const char*, const char*, ...); | |
| 87 | −int _execv (const char*, char* const*); | |
| 88 | −int _execve (const char*, char* const*, char* const*); | |
| 89 | −int _execvp (const char*, char* const*); | |
| 90 | −int _execvpe (const char*, char* const*, char* const*); | |
| 91 | − | |
| 92 | −int _spawnl (int, const char*, const char*, ...); | |
| 93 | −int _spawnle (int, const char*, const char*, ...); | |
| 94 | −int _spawnlp (int, const char*, const char*, ...); | |
| 95 | −int _spawnlpe (int, const char*, const char*, ...); | |
| 96 | −int _spawnv (int, const char*, char* const*); | |
| 97 | −int _spawnve (int, const char*, char* const*, char* const*); | |
| 98 | −int _spawnvp (int, const char*, char* const*); | |
| 99 | −int _spawnvpe (int, const char*, char* const*, char* const*); | |
| 100 | − | |
| 101 | −/* | |
| 102 | − * The functions _beginthreadex and _endthreadex are not provided by CRTDLL. | |
| 103 | − * They are provided by MSVCRT. | |
| 104 | − * | |
| 105 | − * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread, | |
| 106 | − * making for race conditions if you are not careful. Basically you have to | |
| 107 | − * make sure that no-one is going to do *anything* with the thread handle | |
| 108 | − * after the thread calls _endthread or returns from the thread function. | |
| 109 | − * | |
| 110 | − * NOTE: No old names for these functions. Use the underscore. | |
| 111 | − */ | |
| 112 | −unsigned long | |
| 113 | − _beginthread (void (*)(void *), unsigned, void*); | |
| 114 | −void _endthread (void); | |
| 115 | − | |
| 116 | −#ifdef __MSVCRT__ | |
| 117 | −unsigned long | |
| 118 | − _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *), | |
| 119 | − void*, unsigned, unsigned*); | |
| 120 | −void _endthreadex (unsigned); | |
| 121 | −#endif | |
| 19 | +#define _P_WAIT 0 | |
| 20 | +#define _P_NOWAIT 1 | |
| 21 | +#define _OLD_P_OVERLAY 2 | |
| 22 | +#define _P_NOWAITO 3 | |
| 23 | +#define _P_DETACH 4 | |
| 24 | +#define _P_OVERLAY 2 | |
| 122 | 25 | |
| 26 | +#define _WAIT_CHILD 0 | |
| 27 | +#define _WAIT_GRANDCHILD 1 | |
| 28 | + | |
| 29 | + _CRTIMP uintptr_t __cdecl _beginthread(void (__cdecl *_StartAddress) (void *),unsigned _StackSize,void *_ArgList); | |
| 30 | + _CRTIMP void __cdecl _endthread(void); | |
| 31 | + _CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned _StackSize,unsigned (__stdcall *_StartAddress) (void *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr); | |
| 32 | + _CRTIMP void __cdecl _endthreadex(unsigned _Retval); | |
| 33 | + | |
| 34 | +#ifndef _CRT_TERMINATE_DEFINED | |
| 35 | +#define _CRT_TERMINATE_DEFINED | |
| 36 | + void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 37 | + _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 38 | + | |
| 39 | +#pragma push_macro("abort") | |
| 40 | +#undef abort | |
| 41 | + void __cdecl __declspec(noreturn) abort(void); | |
| 42 | +#pragma pop_macro("abort") | |
| 123 | 43 | |
| 124 | −#ifndef _NO_OLDNAMES | |
| 125 | −/* | |
| 126 | − * Functions without the leading underscore, for portability. These functions | |
| 127 | − * live in liboldnames.a. | |
| 128 | − */ | |
| 129 | −int cwait (int*, pid_t, int); | |
| 130 | −pid_t getpid (void); | |
| 131 | −int execl (const char*, const char*, ...); | |
| 132 | −int execle (const char*, const char*, ...); | |
| 133 | −int execlp (const char*, const char*, ...); | |
| 134 | −int execlpe (const char*, const char*, ...); | |
| 135 | −int execv (const char*, char* const*); | |
| 136 | −int execve (const char*, char* const*, char* const*); | |
| 137 | −int execvp (const char*, char* const*); | |
| 138 | −int execvpe (const char*, char* const*, char* const*); | |
| 139 | −int spawnl (int, const char*, const char*, ...); | |
| 140 | −int spawnle (int, const char*, const char*, ...); | |
| 141 | −int spawnlp (int, const char*, const char*, ...); | |
| 142 | −int spawnlpe (int, const char*, const char*, ...); | |
| 143 | −int spawnv (int, const char*, char* const*); | |
| 144 | −int spawnve (int, const char*, char* const*, char* const*); | |
| 145 | −int spawnvp (int, const char*, char* const*); | |
| 146 | −int spawnvpe (int, const char*, char* const*, char* const*); | |
| 147 | −#endif /* Not _NO_OLDNAMES */ | |
| 148 | − | |
| 149 | −#ifdef __cplusplus | |
| 150 | −} | |
| 151 | 44 | #endif |
| 152 | 45 | |
| 153 | −#endif /* Not RC_INVOKED */ | |
| 46 | + _CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void); | |
| 47 | + _CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void); | |
| 48 | + _CRTIMP int __cdecl _getpid(void); | |
| 49 | + _CRTIMP intptr_t __cdecl _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); | |
| 50 | + _CRTIMP intptr_t __cdecl _execl(const char *_Filename,const char *_ArgList,...); | |
| 51 | + _CRTIMP intptr_t __cdecl _execle(const char *_Filename,const char *_ArgList,...); | |
| 52 | + _CRTIMP intptr_t __cdecl _execlp(const char *_Filename,const char *_ArgList,...); | |
| 53 | + _CRTIMP intptr_t __cdecl _execlpe(const char *_Filename,const char *_ArgList,...); | |
| 54 | + _CRTIMP intptr_t __cdecl _execv(const char *_Filename,const char *const *_ArgList); | |
| 55 | + _CRTIMP intptr_t __cdecl _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env); | |
| 56 | + _CRTIMP intptr_t __cdecl _execvp(const char *_Filename,const char *const *_ArgList); | |
| 57 | + _CRTIMP intptr_t __cdecl _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env); | |
| 58 | + _CRTIMP intptr_t __cdecl _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...); | |
| 59 | + _CRTIMP intptr_t __cdecl _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...); | |
| 60 | + _CRTIMP intptr_t __cdecl _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...); | |
| 61 | + _CRTIMP intptr_t __cdecl _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...); | |
| 62 | + _CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); | |
| 63 | + _CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); | |
| 64 | + _CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); | |
| 65 | + _CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); | |
| 66 | + | |
| 67 | +#ifndef _CRT_SYSTEM_DEFINED | |
| 68 | +#define _CRT_SYSTEM_DEFINED | |
| 69 | + int __cdecl system(const char *_Command); | |
| 70 | +#endif | |
| 154 | 71 | |
| 155 | −#endif /* _PROCESS_H_ not defined */ | |
| 72 | +#ifndef _WPROCESS_DEFINED | |
| 73 | +#define _WPROCESS_DEFINED | |
| 74 | + _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 75 | + _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 76 | + _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 77 | + _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 78 | + _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 79 | + _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 80 | + _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 81 | + _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 82 | + _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 83 | + _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 84 | + _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 85 | + _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 86 | + _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 87 | + _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 88 | + _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 89 | + _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 90 | +#ifndef _CRT_WSYSTEM_DEFINED | |
| 91 | +#define _CRT_WSYSTEM_DEFINED | |
| 92 | + _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); | |
| 93 | +#endif | |
| 94 | +#endif | |
| 156 | 95 | |
| 157 | −#endif /* Not __STRICT_ANSI__ */ | |
| 96 | + void __cdecl __security_init_cookie(void); | |
| 97 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 98 | + void __fastcall __security_check_cookie(uintptr_t _StackCookie); | |
| 99 | + __declspec(noreturn) void __cdecl __report_gsfailure(void); | |
| 100 | +#else | |
| 101 | + void __cdecl __security_check_cookie(uintptr_t _StackCookie); | |
| 102 | + __declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie); | |
| 103 | +#endif | |
| 104 | + extern uintptr_t __security_cookie; | |
| 105 | + | |
| 106 | + intptr_t __cdecl _loaddll(char *_Filename); | |
| 107 | + int __cdecl _unloaddll(intptr_t _Handle); | |
| 108 | + int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void); | |
| 109 | + | |
| 110 | +#ifdef _DECL_DLLMAIN | |
| 111 | +#ifdef _WINDOWS_ | |
| 112 | + WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); | |
| 113 | + WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); | |
| 114 | + WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); | |
| 115 | + extern WINBOOL (WINAPI *const _pRawDllMain)(HANDLE,DWORD,LPVOID); | |
| 116 | +#else | |
| 117 | + int __stdcall DllMain(void *_HDllHandle,unsigned _Reason,void *_Reserved); | |
| 118 | + int __stdcall _CRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved); | |
| 119 | + int __stdcall _wCRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved); | |
| 120 | + extern int (__stdcall *const _pRawDllMain)(void *,unsigned,void *); | |
| 121 | +#endif | |
| 122 | +#endif | |
| 158 | 123 | |
| 124 | +#ifndef NO_OLDNAMES | |
| 125 | +#define P_WAIT _P_WAIT | |
| 126 | +#define P_NOWAIT _P_NOWAIT | |
| 127 | +#define P_OVERLAY _P_OVERLAY | |
| 128 | +#define OLD_P_OVERLAY _OLD_P_OVERLAY | |
| 129 | +#define P_NOWAITO _P_NOWAITO | |
| 130 | +#define P_DETACH _P_DETACH | |
| 131 | +#define WAIT_CHILD _WAIT_CHILD | |
| 132 | +#define WAIT_GRANDCHILD _WAIT_GRANDCHILD | |
| 133 | + | |
| 134 | + intptr_t __cdecl cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); | |
| 135 | +#ifdef __GNUC__ | |
| 136 | + int __cdecl execl(const char *_Filename,const char *_ArgList,...); | |
| 137 | + int __cdecl execle(const char *_Filename,const char *_ArgList,...); | |
| 138 | + int __cdecl execlp(const char *_Filename,const char *_ArgList,...); | |
| 139 | + int __cdecl execlpe(const char *_Filename,const char *_ArgList,...); | |
| 140 | +#else | |
| 141 | + intptr_t __cdecl execl(const char *_Filename,const char *_ArgList,...); | |
| 142 | + intptr_t __cdecl execle(const char *_Filename,const char *_ArgList,...); | |
| 143 | + intptr_t __cdecl execlp(const char *_Filename,const char *_ArgList,...); | |
| 144 | + intptr_t __cdecl execlpe(const char *_Filename,const char *_ArgList,...); | |
| 145 | +#endif | |
| 146 | + intptr_t __cdecl spawnl(int,const char *_Filename,const char *_ArgList,...); | |
| 147 | + intptr_t __cdecl spawnle(int,const char *_Filename,const char *_ArgList,...); | |
| 148 | + intptr_t __cdecl spawnlp(int,const char *_Filename,const char *_ArgList,...); | |
| 149 | + intptr_t __cdecl spawnlpe(int,const char *_Filename,const char *_ArgList,...); | |
| 150 | + int __cdecl getpid(void); | |
| 151 | +#ifdef __GNUC__ | |
| 152 | + /* Those methods are predefined by gcc builtins to return int. So to prevent | |
| 153 | + stupid warnings, define them in POSIX way. This is save, because those | |
| 154 | + methods do not return in success case, so that the return value is not | |
| 155 | + really dependent to its scalar width. */ | |
| 156 | + int __cdecl execv(const char *_Filename,char *const _ArgList[]); | |
| 157 | + int __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 158 | + int __cdecl execvp(const char *_Filename,char *const _ArgList[]); | |
| 159 | + int __cdecl execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 160 | +#else | |
| 161 | + intptr_t __cdecl execv(const char *_Filename,char *const _ArgList[]); | |
| 162 | + intptr_t __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 163 | + intptr_t __cdecl execvp(const char *_Filename,char *const _ArgList[]); | |
| 164 | + intptr_t __cdecl execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 165 | +#endif | |
| 166 | + intptr_t __cdecl spawnv(int,const char *_Filename,char *const _ArgList[]); | |
| 167 | + intptr_t __cdecl spawnve(int,const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 168 | + intptr_t __cdecl spawnvp(int,const char *_Filename,char *const _ArgList[]); | |
| 169 | + intptr_t __cdecl spawnvpe(int,const char *_Filename,char *const _ArgList[],char *const _Env[]); | |
| 170 | +#endif | |
| 171 | + | |
| 172 | +#ifdef __cplusplus | |
| 173 | +} | |
| 174 | +#endif | |
| 175 | +#endif | |
| 176 | +#endif | |
| @@ -0,0 +1,42 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#ifndef _INC_CONIO_S | |
| 8 | +#define _INC_CONIO_S | |
| 9 | + | |
| 10 | +#include <conio.h> | |
| 11 | + | |
| 12 | +#if defined(MINGW_HAS_SECURE_API) | |
| 13 | + | |
| 14 | +#ifdef __cplusplus | |
| 15 | +extern "C" { | |
| 16 | +#endif | |
| 17 | + | |
| 18 | + _CRTIMP errno_t __cdecl _cgets_s(char *_Buffer,size_t _Size,size_t *_SizeRead); | |
| 19 | + _CRTIMP int __cdecl _cprintf_s(const char *_Format,...); | |
| 20 | + _CRTIMP int __cdecl _cscanf_s(const char *_Format,...); | |
| 21 | + _CRTIMP int __cdecl _cscanf_s_l(const char *_Format,_locale_t _Locale,...); | |
| 22 | + _CRTIMP int __cdecl _vcprintf_s(const char *_Format,va_list _ArgList); | |
| 23 | + _CRTIMP int __cdecl _cprintf_s_l(const char *_Format,_locale_t _Locale,...); | |
| 24 | + _CRTIMP int __cdecl _vcprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 25 | + | |
| 26 | +#ifndef _WCONIO_DEFINED_S | |
| 27 | +#define _WCONIO_DEFINED_S | |
| 28 | + _CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead); | |
| 29 | + _CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...); | |
| 30 | + _CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...); | |
| 31 | + _CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 32 | + _CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList); | |
| 33 | + _CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 34 | + _CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 35 | +#endif | |
| 36 | + | |
| 37 | +#ifdef __cplusplus | |
| 38 | +} | |
| 39 | +#endif | |
| 40 | + | |
| 41 | +#endif | |
| 42 | +#endif | |
| @@ -0,0 +1,19 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#ifndef _INC_CRTDBG_S | |
| 8 | +#define _INC_CRTDBG_S | |
| 9 | + | |
| 10 | +#include <crtdbg.h> | |
| 11 | + | |
| 12 | +#if defined(MINGW_HAS_SECURE_API) | |
| 13 | + | |
| 14 | +#define _dupenv_s_dbg(ps1,size,s2,t,f,l) _dupenv_s(ps1,size,s2) | |
| 15 | +#define _wdupenv_s_dbg(ps1,size,s2,t,f,l) _wdupenv_s(ps1,size,s2) | |
| 16 | + | |
| 17 | +#endif | |
| 18 | + | |
| 19 | +#endif | |
| @@ -0,0 +1,33 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_IO_S | |
| 7 | +#define _INC_IO_S | |
| 8 | + | |
| 9 | +#include <io.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + _CRTIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode); | |
| 18 | + _CRTIMP errno_t __cdecl _chsize_s(int _FileHandle,__int64 _Size); | |
| 19 | + _CRTIMP errno_t __cdecl _mktemp_s(char *_TemplateName,size_t _Size); | |
| 20 | + _CRTIMP errno_t __cdecl _umask_s(int _NewMode,int *_OldMode); | |
| 21 | + | |
| 22 | +#ifndef _WIO_S_DEFINED | |
| 23 | +#define _WIO_S_DEFINED | |
| 24 | + _CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode); | |
| 25 | + _CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords); | |
| 26 | +#endif | |
| 27 | + | |
| 28 | +#ifdef __cplusplus | |
| 29 | +} | |
| 30 | +#endif | |
| 31 | + | |
| 32 | +#endif | |
| 33 | +#endif | |
| @@ -0,0 +1,52 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_MBSTRING_S | |
| 7 | +#define _INC_MBSTRING_S | |
| 8 | + | |
| 9 | +#include <mbstring.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#ifndef _MBSTRING_S_DEFINED | |
| 18 | +#define _MBSTRING_S_DEFINED | |
| 19 | + _CRTIMP errno_t __cdecl _mbscat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src); | |
| 20 | + _CRTIMP errno_t __cdecl _mbscat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale); | |
| 21 | + _CRTIMP errno_t __cdecl _mbscpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src); | |
| 22 | + _CRTIMP errno_t __cdecl _mbscpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale); | |
| 23 | + _CRTIMP errno_t __cdecl _mbslwr_s(unsigned char *_Str,size_t _SizeInBytes); | |
| 24 | + _CRTIMP errno_t __cdecl _mbslwr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale); | |
| 25 | + _CRTIMP errno_t __cdecl _mbsnbcat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); | |
| 26 | + _CRTIMP errno_t __cdecl _mbsnbcat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 27 | + _CRTIMP errno_t __cdecl _mbsnbcpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); | |
| 28 | + _CRTIMP errno_t __cdecl _mbsnbcpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 29 | + _CRTIMP errno_t __cdecl _mbsnbset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount); | |
| 30 | + _CRTIMP errno_t __cdecl _mbsnbset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount,_locale_t _Locale); | |
| 31 | + _CRTIMP errno_t __cdecl _mbsncat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); | |
| 32 | + _CRTIMP errno_t __cdecl _mbsncat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 33 | + _CRTIMP errno_t __cdecl _mbsncpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount); | |
| 34 | + _CRTIMP errno_t __cdecl _mbsncpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 35 | + _CRTIMP errno_t __cdecl _mbsnset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount); | |
| 36 | + _CRTIMP errno_t __cdecl _mbsnset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount,_locale_t _Locale); | |
| 37 | + _CRTIMP errno_t __cdecl _mbsset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val); | |
| 38 | + _CRTIMP errno_t __cdecl _mbsset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,_locale_t _Locale); | |
| 39 | + _CRTIMP unsigned char *__cdecl _mbstok_s(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context); | |
| 40 | + _CRTIMP unsigned char *__cdecl _mbstok_s_l(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context,_locale_t _Locale); | |
| 41 | + _CRTIMP errno_t __cdecl _mbsupr_s(unsigned char *_Str,size_t _SizeInBytes); | |
| 42 | + _CRTIMP errno_t __cdecl _mbsupr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale); | |
| 43 | + _CRTIMP errno_t __cdecl _mbccpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src); | |
| 44 | + _CRTIMP errno_t __cdecl _mbccpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src,_locale_t _Locale); | |
| 45 | +#endif | |
| 46 | + | |
| 47 | +#ifdef __cplusplus | |
| 48 | +} | |
| 49 | +#endif | |
| 50 | + | |
| 51 | +#endif | |
| 52 | +#endif | |
| @@ -0,0 +1,25 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_SEARCH_S | |
| 7 | +#define _INC_SEARCH_S | |
| 8 | + | |
| 9 | +#include <search.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + _CRTIMP void *__cdecl _lfind_s(const void *_Key,const void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context); | |
| 18 | + _CRTIMP void *__cdecl _lsearch_s(const void *_Key,void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context); | |
| 19 | + | |
| 20 | +#ifdef __cplusplus | |
| 21 | +} | |
| 22 | +#endif | |
| 23 | + | |
| 24 | +#endif | |
| 25 | +#endif | |
| @@ -0,0 +1,145 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_STDIO_S | |
| 7 | +#define _INC_STDIO_S | |
| 8 | + | |
| 9 | +#include <stdio.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#ifndef _STDIO_S_DEFINED | |
| 18 | +#define _STDIO_S_DEFINED | |
| 19 | + _CRTIMP errno_t __cdecl clearerr_s(FILE *_File); | |
| 20 | + int __cdecl fprintf_s(FILE *_File,const char *_Format,...); | |
| 21 | + size_t __cdecl fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); | |
| 22 | + _CRTIMP int __cdecl _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); | |
| 23 | + int __cdecl printf_s(const char *_Format,...); | |
| 24 | + _CRTIMP int __cdecl _scanf_l(const char *_Format,_locale_t _Locale,...); | |
| 25 | + _CRTIMP int __cdecl _scanf_s_l(const char *_Format,_locale_t _Locale,...); | |
| 26 | + _CRTIMP int __cdecl _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...); | |
| 27 | + _CRTIMP int __cdecl _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...); | |
| 28 | + _CRTIMP int __cdecl _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 29 | + int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...); | |
| 30 | + _CRTIMP int __cdecl _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); | |
| 31 | + _CRTIMP int __cdecl _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...); | |
| 32 | + _CRTIMP int __cdecl _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...); | |
| 33 | + _CRTIMP int __cdecl _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...); | |
| 34 | + _CRTIMP int __cdecl _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 35 | + _CRTIMP int __cdecl _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 36 | + int __cdecl vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList); | |
| 37 | + int __cdecl vprintf_s(const char *_Format,va_list _ArgList); | |
| 38 | + int __cdecl vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 39 | + _CRTIMP int __cdecl _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 40 | + int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList); | |
| 41 | + _CRTIMP int __cdecl _fprintf_p(FILE *_File,const char *_Format,...); | |
| 42 | + _CRTIMP int __cdecl _printf_p(const char *_Format,...); | |
| 43 | + _CRTIMP int __cdecl _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...); | |
| 44 | + _CRTIMP int __cdecl _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList); | |
| 45 | + _CRTIMP int __cdecl _vprintf_p(const char *_Format,va_list _ArgList); | |
| 46 | + _CRTIMP int __cdecl _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 47 | + _CRTIMP int __cdecl _scprintf_p(const char *_Format,...); | |
| 48 | + _CRTIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList); | |
| 49 | + _CRTIMP int __cdecl _printf_l(const char *_Format,_locale_t _Locale,...); | |
| 50 | + _CRTIMP int __cdecl _printf_p_l(const char *_Format,_locale_t _Locale,...); | |
| 51 | + _CRTIMP int __cdecl _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 52 | + _CRTIMP int __cdecl _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 53 | + _CRTIMP int __cdecl _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); | |
| 54 | + _CRTIMP int __cdecl _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...); | |
| 55 | + _CRTIMP int __cdecl _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 56 | + _CRTIMP int __cdecl _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 57 | + _CRTIMP int __cdecl _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...); | |
| 58 | + _CRTIMP int __cdecl _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 59 | + _CRTIMP int __cdecl _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList); | |
| 60 | + _CRTIMP int __cdecl _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 61 | + _CRTIMP int __cdecl _scprintf_l(const char *_Format,_locale_t _Locale,...); | |
| 62 | + _CRTIMP int __cdecl _scprintf_p_l(const char *_Format,_locale_t _Locale,...); | |
| 63 | + _CRTIMP int __cdecl _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 64 | + _CRTIMP int __cdecl _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 65 | + _CRTIMP int __cdecl _printf_s_l(const char *_Format,_locale_t _Locale,...); | |
| 66 | + _CRTIMP int __cdecl _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 67 | + _CRTIMP int __cdecl _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); | |
| 68 | + _CRTIMP int __cdecl _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 69 | + _CRTIMP int __cdecl _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...); | |
| 70 | + _CRTIMP int __cdecl _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 71 | + _CRTIMP int __cdecl _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 72 | + _CRTIMP int __cdecl _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 73 | + _CRTIMP int __cdecl _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 74 | + _CRTIMP int __cdecl _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); | |
| 75 | + _CRTIMP int __cdecl _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); | |
| 76 | + _CRTIMP int __cdecl _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList); | |
| 77 | + | |
| 78 | +#ifndef _WSTDIO_S_DEFINED | |
| 79 | +#define _WSTDIO_S_DEFINED | |
| 80 | + _CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords); | |
| 81 | + int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...); | |
| 82 | + int __cdecl wprintf_s(const wchar_t *_Format,...); | |
| 83 | + int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList); | |
| 84 | + int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); | |
| 85 | + int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); | |
| 86 | + _CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); | |
| 87 | + _CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); | |
| 88 | + _CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 89 | + _CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 90 | + _CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 91 | + _CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 92 | + _CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); | |
| 93 | + _CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 94 | + _CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 95 | + _CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 96 | + _CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 97 | + _CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); | |
| 98 | + _CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); | |
| 99 | + _CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 100 | + _CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 101 | + _CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); | |
| 102 | + _CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); | |
| 103 | + _CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); | |
| 104 | + _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...); | |
| 105 | + _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...); | |
| 106 | + _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| 107 | + _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 108 | + _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...); | |
| 109 | + _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); | |
| 110 | + _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...); | |
| 111 | + _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 112 | + _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 113 | + _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 114 | + _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 115 | + _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 116 | + _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 117 | + _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 118 | + _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 119 | + _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 120 | + _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 121 | + _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 122 | + _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 123 | + _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 124 | + _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 125 | + _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 126 | + _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 127 | + _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 128 | + _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 129 | + _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); | |
| 130 | + _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); | |
| 131 | + _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 132 | + _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 133 | + _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); | |
| 134 | + _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 135 | + _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 136 | +#endif | |
| 137 | +#endif | |
| 138 | + | |
| 139 | + _CRTIMP size_t __cdecl _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); | |
| 140 | + | |
| 141 | +#ifdef __cplusplus | |
| 142 | +} | |
| 143 | +#endif | |
| 144 | +#endif | |
| 145 | +#endif | |
| @@ -0,0 +1,67 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_STDLIB_S | |
| 7 | +#define _INC_STDLIB_S | |
| 8 | + | |
| 9 | +#include <stdlib.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + _CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); | |
| 18 | + _CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); | |
| 19 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 20 | + _CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix); | |
| 21 | + _CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix); | |
| 22 | +#endif | |
| 23 | + _CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix); | |
| 24 | + _CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount); | |
| 25 | + _CRTIMP errno_t __cdecl _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale); | |
| 26 | + _CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix); | |
| 27 | + _CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale); | |
| 28 | + _CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes); | |
| 29 | + _CRTIMP errno_t __cdecl _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale); | |
| 30 | + | |
| 31 | +#ifndef _WSTDLIB_S_DEFINED | |
| 32 | +#define _WSTDLIB_S_DEFINED | |
| 33 | + _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 34 | + _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 35 | + _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 36 | + _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); | |
| 37 | + _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); | |
| 38 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 39 | + _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 40 | + _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 41 | +#endif | |
| 42 | +#endif | |
| 43 | + | |
| 44 | +#ifndef _POSIX_ | |
| 45 | + _CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign); | |
| 46 | + _CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); | |
| 47 | + _CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits); | |
| 48 | + _CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); | |
| 49 | + _CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value); | |
| 50 | + _CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes); | |
| 51 | + _CRTIMP errno_t __cdecl _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize); | |
| 52 | + | |
| 53 | +#ifndef _WSTDLIBP_S_DEFINED | |
| 54 | +#define _WSTDLIBP_S_DEFINED | |
| 55 | + _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); | |
| 56 | + _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); | |
| 57 | + _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); | |
| 58 | + _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); | |
| 59 | +#endif | |
| 60 | +#endif | |
| 61 | + | |
| 62 | +#ifdef __cplusplus | |
| 63 | +} | |
| 64 | +#endif | |
| 65 | + | |
| 66 | +#endif | |
| 67 | +#endif | |
| @@ -0,0 +1,30 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef __STRALIGN_H_S_ | |
| 7 | +#define __STRALIGN_H_S_ | |
| 8 | + | |
| 9 | +#include <stralign.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED) | |
| 18 | +#if defined(__cplusplus) && defined(_WConst_Return) | |
| 19 | + static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) { | |
| 20 | + if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL); | |
| 21 | + return uaw_wcscpy((PCUWSTR)String,Character); | |
| 22 | + } | |
| 23 | +#endif | |
| 24 | +#endif | |
| 25 | + | |
| 26 | +#ifdef __cplusplus | |
| 27 | +} | |
| 28 | +#endif | |
| 29 | +#endif | |
| 30 | +#endif | |
| @@ -0,0 +1,41 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_STRING_S | |
| 7 | +#define _INC_STRING_S | |
| 8 | + | |
| 9 | +#include <string.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + _CRTIMP errno_t __cdecl _strset_s(char *_Dst,size_t _DstSize,int _Value); | |
| 18 | + _CRTIMP errno_t __cdecl _strerror_s(char *_Buf,size_t _SizeInBytes,const char *_ErrMsg); | |
| 19 | + _CRTIMP errno_t __cdecl _strlwr_s(char *_Str,size_t _Size); | |
| 20 | + _CRTIMP errno_t __cdecl _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale); | |
| 21 | + _CRTIMP errno_t __cdecl _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount); | |
| 22 | + _CRTIMP errno_t __cdecl _strupr_s(char *_Str,size_t _Size); | |
| 23 | + _CRTIMP errno_t __cdecl _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale); | |
| 24 | +#ifndef _WSTRING_S_DEFINED | |
| 25 | +#define _WSTRING_S_DEFINED | |
| 26 | + _CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context); | |
| 27 | + _CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum); | |
| 28 | + _CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg); | |
| 29 | + _CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount); | |
| 30 | + _CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val); | |
| 31 | + _CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords); | |
| 32 | + _CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale); | |
| 33 | + _CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size); | |
| 34 | + _CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale); | |
| 35 | +#endif | |
| 36 | + | |
| 37 | +#ifdef __cplusplus | |
| 38 | +} | |
| 39 | +#endif | |
| 40 | +#endif | |
| 41 | +#endif | |
| @@ -0,0 +1,34 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#ifndef _TIMEB_H_S | |
| 8 | +#define _TIMEB_H_S | |
| 9 | + | |
| 10 | +#include <sys/timeb.h> | |
| 11 | + | |
| 12 | +#ifdef __cplusplus | |
| 13 | +extern "C" { | |
| 14 | +#endif | |
| 15 | + | |
| 16 | +#if defined(MINGW_HAS_SECURE_API) | |
| 17 | + | |
| 18 | +#ifdef _USE_32BIT_TIME_T | |
| 19 | +#define _ftime_s _ftime32_s | |
| 20 | +#else | |
| 21 | +#define _ftime_s _ftime64_s | |
| 22 | +#endif | |
| 23 | + | |
| 24 | + _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time); | |
| 25 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 26 | + _CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time); | |
| 27 | +#endif | |
| 28 | +#endif | |
| 29 | + | |
| 30 | +#ifdef __cplusplus | |
| 31 | +} | |
| 32 | +#endif | |
| 33 | + | |
| 34 | +#endif | |
| @@ -0,0 +1,266 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_TCHAR_S | |
| 7 | +#define _INC_TCHAR_S | |
| 8 | + | |
| 9 | +#include <tchar.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#ifdef _UNICODE | |
| 18 | + | |
| 19 | +#define _tprintf_s wprintf_s | |
| 20 | +#define _tprintf_s_l _wprintf_s_l | |
| 21 | +#define _tcprintf_s _cwprintf_s | |
| 22 | +#define _tcprintf_s_l _cwprintf_s_l | |
| 23 | +#define _vtcprintf_s _vcwprintf_s | |
| 24 | +#define _vtcprintf_s_l _vcwprintf_s_l | |
| 25 | +#define _ftprintf_s fwprintf_s | |
| 26 | +#define _ftprintf_s_l _fwprintf_s_l | |
| 27 | +#define _stprintf_s swprintf_s | |
| 28 | +#define _stprintf_s_l _swprintf_s_l | |
| 29 | +#define _sntprintf_s _snwprintf_s | |
| 30 | +#define _sntprintf_s_l _snwprintf_s_l | |
| 31 | +#define _vtprintf_s vwprintf_s | |
| 32 | +#define _vtprintf_s_l _vwprintf_s_l | |
| 33 | +#define _vftprintf_s vfwprintf_s | |
| 34 | +#define _vftprintf_s_l _vfwprintf_s_l | |
| 35 | +#define _vstprintf_s vswprintf_s | |
| 36 | +#define _vstprintf_s_l _vswprintf_s_l | |
| 37 | +#define _vsntprintf_s _vsnwprintf_s | |
| 38 | +#define _vsntprintf_s_l _vsnwprintf_s_l | |
| 39 | + | |
| 40 | +#define _tscanf_s wscanf_s | |
| 41 | +#define _tscanf_s_l _wscanf_s_l | |
| 42 | +#define _tcscanf_s _cwscanf_s | |
| 43 | +#define _tcscanf_s_l _cwscanf_s_l | |
| 44 | +#define _ftscanf_s fwscanf_s | |
| 45 | +#define _ftscanf_s_l _fwscanf_s_l | |
| 46 | +#define _stscanf_s swscanf_s | |
| 47 | +#define _stscanf_s_l _swscanf_s_l | |
| 48 | +#define _sntscanf_s _snwscanf_s | |
| 49 | +#define _sntscanf_s_l _snwscanf_s_l | |
| 50 | + | |
| 51 | +#define _cgetts_s _cgetws_s | |
| 52 | +#define _getts_s _getws_s | |
| 53 | + | |
| 54 | +#define _itot_s _itow_s | |
| 55 | +#define _ltot_s _ltow_s | |
| 56 | +#define _ultot_s _ultow_s | |
| 57 | +#define _i64tot_s _i64tow_s | |
| 58 | +#define _ui64tot_s _ui64tow_s | |
| 59 | + | |
| 60 | +#define _tcscat_s wcscat_s | |
| 61 | +#define _tcscpy_s wcscpy_s | |
| 62 | +#define _tcsncat_s wcsncat_s | |
| 63 | +#define _tcsncat_s_l _wcsncat_s_l | |
| 64 | +#define _tcsncpy_s wcsncpy_s | |
| 65 | +#define _tcsncpy_s_l _wcsncpy_s_l | |
| 66 | +#define _tcstok_s wcstok_s | |
| 67 | +#define _tcstok_s_l _wcstok_s_l | |
| 68 | +#define _tcserror_s _wcserror_s | |
| 69 | +#define __tcserror_s __wcserror_s | |
| 70 | + | |
| 71 | +#define _tcsnset_s _wcsnset_s | |
| 72 | +#define _tcsnset_s_l _wcsnset_s_l | |
| 73 | +#define _tcsset_s _wcsset_s | |
| 74 | +#define _tcsset_s_l _wcsset_s_l | |
| 75 | + | |
| 76 | +#define _tasctime_s _wasctime_s | |
| 77 | +#define _tctime_s _wctime_s | |
| 78 | +#define _tctime32_s _wctime32_s | |
| 79 | +#define _tctime64_s _wctime64_s | |
| 80 | +#define _tstrdate_s _wstrdate_s | |
| 81 | +#define _tstrtime_s _wstrtime_s | |
| 82 | + | |
| 83 | +#define _tgetenv_s _wgetenv_s | |
| 84 | +#define _tdupenv_s _wdupenv_s | |
| 85 | +#define _tmakepath_s _wmakepath_s | |
| 86 | +#define _tputenv_s _wputenv_s | |
| 87 | +#define _tsearchenv_s _wsearchenv_s | |
| 88 | +#define _tsplitpath_s _wsplitpath_s | |
| 89 | + | |
| 90 | +#define _tfopen_s _wfopen_s | |
| 91 | +#define _tfreopen_s _wfreopen_s | |
| 92 | +#define _ttmpnam_s _wtmpnam_s | |
| 93 | +#define _taccess_s _waccess_s | |
| 94 | +#define _tmktemp_s _wmktemp_s | |
| 95 | + | |
| 96 | +#define _tcsnccat_s wcsncat_s | |
| 97 | +#define _tcsnccat_s_l _wcsncat_s_l | |
| 98 | +#define _tcsnccpy_s wcsncpy_s | |
| 99 | +#define _tcsnccpy_s_l _wcsncpy_s_l | |
| 100 | + | |
| 101 | +#define _tcslwr_s _wcslwr_s | |
| 102 | +#define _tcslwr_s_l _wcslwr_s_l | |
| 103 | +#define _tcsupr_s _wcsupr_s | |
| 104 | +#define _tcsupr_s_l _wcsupr_s_l | |
| 105 | + | |
| 106 | +#define _wcstok_s_l(_String,_Delimiters,_Current_position,_Locale) (wcstok_s(_String,_Delimiters,_Current_position)) | |
| 107 | +#define _wcsnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_wcsnset_s(_Destination,_Destination_size_chars,_Value,_Count)) | |
| 108 | +#define _wcsset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_wcsset_s(_Destination,_Destination_size_chars,_Value)) | |
| 109 | + | |
| 110 | +#else | |
| 111 | + | |
| 112 | +#define _tprintf_s printf_s | |
| 113 | +#define _tprintf_s_l _printf_s_l | |
| 114 | +#define _tcprintf_s _cprintf_s | |
| 115 | +#define _tcprintf_s_l _cprintf_s_l | |
| 116 | +#define _vtcprintf_s _vcprintf_s | |
| 117 | +#define _vtcprintf_s_l _vcprintf_s_l | |
| 118 | +#define _ftprintf_s fprintf_s | |
| 119 | +#define _ftprintf_s_l _fprintf_s_l | |
| 120 | +#define _stprintf_s sprintf_s | |
| 121 | +#define _stprintf_s_l _sprintf_s_l | |
| 122 | +#define _sntprintf_s _snprintf_s | |
| 123 | +#define _sntprintf_s_l _snprintf_s_l | |
| 124 | +#define _vtprintf_s vprintf_s | |
| 125 | +#define _vtprintf_s_l _vprintf_s_l | |
| 126 | +#define _vftprintf_s vfprintf_s | |
| 127 | +#define _vftprintf_s_l _vfprintf_s_l | |
| 128 | +#define _vstprintf_s vsprintf_s | |
| 129 | +#define _vstprintf_s_l _vsprintf_s_l | |
| 130 | +#define _vsntprintf_s _vsnprintf_s | |
| 131 | +#define _vsntprintf_s_l _vsnprintf_s_l | |
| 132 | +#define _tscanf_s scanf_s | |
| 133 | +#define _tscanf_s_l _scanf_s_l | |
| 134 | +#define _tcscanf_s _cscanf_s | |
| 135 | +#define _tcscanf_s_l _cscanf_s_l | |
| 136 | +#define _ftscanf_s fscanf_s | |
| 137 | +#define _ftscanf_s_l _fscanf_s_l | |
| 138 | +#define _stscanf_s sscanf_s | |
| 139 | +#define _stscanf_s_l _sscanf_s_l | |
| 140 | +#define _sntscanf_s _snscanf_s | |
| 141 | +#define _sntscanf_s_l _snscanf_s_l | |
| 142 | + | |
| 143 | +#define _getts_s gets_s | |
| 144 | +#define _cgetts_s _cgets_s | |
| 145 | +#define _itot_s _itoa_s | |
| 146 | +#define _ltot_s _ltoa_s | |
| 147 | +#define _ultot_s _ultoa_s | |
| 148 | +#define _i64tot_s _i64toa_s | |
| 149 | +#define _ui64tot_s _ui64toa_s | |
| 150 | + | |
| 151 | +#define _tcscat_s strcat_s | |
| 152 | +#define _tcscpy_s strcpy_s | |
| 153 | +#define _tcserror_s strerror_s | |
| 154 | +#define __tcserror_s _strerror_s | |
| 155 | + | |
| 156 | +#define _tasctime_s asctime_s | |
| 157 | +#define _tctime_s ctime_s | |
| 158 | +#define _tctime32_s _ctime32_s | |
| 159 | +#define _tctime64_s _ctime64_s | |
| 160 | +#define _tstrdate_s _strdate_s | |
| 161 | +#define _tstrtime_s _strtime_s | |
| 162 | + | |
| 163 | +#define _tgetenv_s getenv_s | |
| 164 | +#define _tdupenv_s _dupenv_s | |
| 165 | +#define _tmakepath_s _makepath_s | |
| 166 | +#define _tputenv_s _putenv_s | |
| 167 | +#define _tsearchenv_s _searchenv_s | |
| 168 | +#define _tsplitpath_s _splitpath_s | |
| 169 | + | |
| 170 | +#define _tfopen_s fopen_s | |
| 171 | +#define _tfreopen_s freopen_s | |
| 172 | +#define _ttmpnam_s tmpnam_s | |
| 173 | +#define _tmktemp_s _mktemp_s | |
| 174 | + | |
| 175 | +#ifndef _POSIX_ | |
| 176 | +#define _taccess_s _access_s | |
| 177 | +#endif | |
| 178 | + | |
| 179 | +#define _tsopen_s _sopen_s | |
| 180 | + | |
| 181 | +#ifdef _MBCS | |
| 182 | + | |
| 183 | +#ifdef _MB_MAP_DIRECT | |
| 184 | + | |
| 185 | +#define _tcsncat_s _mbsnbcat_s | |
| 186 | +#define _tcsncat_s_l _mbsnbcat_s_l | |
| 187 | +#define _tcsncpy_s _mbsnbcpy_s | |
| 188 | +#define _tcsncpy_s_l _mbsnbcpy_s_l | |
| 189 | +#define _tcstok_s _mbstok_s | |
| 190 | +#define _tcstok_s_l _mbstok_s_l | |
| 191 | + | |
| 192 | +#define _tcsnset_s _mbsnbset_s | |
| 193 | +#define _tcsnset_s_l _mbsnbset_s_l | |
| 194 | +#define _tcsset_s _mbsset_s | |
| 195 | +#define _tcsset_s_l _mbsset_s_l | |
| 196 | + | |
| 197 | +#define _tcsnccat_s _mbsncat_s | |
| 198 | +#define _tcsnccat_s_l _mbsncat_s_l | |
| 199 | +#define _tcsnccpy_s _mbsncpy_s | |
| 200 | +#define _tcsnccpy_s_l _mbsncpy_s_l | |
| 201 | +#define _tcsncset_s _mbsnset_s | |
| 202 | +#define _tcsncset_s_l _mbsnset_s_l | |
| 203 | + | |
| 204 | +#define _tcslwr_s _mbslwr_s | |
| 205 | +#define _tcslwr_s_l _mbslwr_s_l | |
| 206 | +#define _tcsupr_s _mbsupr_s | |
| 207 | +#define _tcsupr_s_l _mbsupr_s_l | |
| 208 | + | |
| 209 | +#define _tccpy_s _mbccpy_s | |
| 210 | +#define _tccpy_s_l _mbccpy_s_l | |
| 211 | +#else | |
| 212 | + | |
| 213 | + _CRTIMP char *__cdecl _tcsncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount); | |
| 214 | + _CRTIMP char *__cdecl _tcsncat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 215 | + _CRTIMP char *__cdecl _tcsncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount); | |
| 216 | + _CRTIMP char *__cdecl _tcsncpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 217 | + _CRTIMP char *__cdecl _tcstok_s(char *_Str,const char *_Delim,char **_Context); | |
| 218 | + _CRTIMP char *__cdecl _tcstok_s_l(char *_Str,const char *_Delim,char **_Context,_locale_t _Locale); | |
| 219 | + _CRTIMP errno_t __cdecl _tcsset_s(char *_Str,size_t _SizeInChars,unsigned int _Val); | |
| 220 | + _CRTIMP errno_t __cdecl _tcsset_s_l(char *_Str,size_t _SizeInChars,unsigned int,_locale_t _Locale); | |
| 221 | + _CRTIMP char *__cdecl _tcsnccat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount); | |
| 222 | + _CRTIMP char *__cdecl _tcsnccat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 223 | + _CRTIMP char *__cdecl _tcsnccpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount); | |
| 224 | + _CRTIMP char *__cdecl _tcsnccpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 225 | + _CRTIMP char *__cdecl _tcslwr_s(char *_Str,size_t _SizeInChars); | |
| 226 | + _CRTIMP char *__cdecl _tcslwr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale); | |
| 227 | + _CRTIMP char *__cdecl _tcsupr_s(char *_Str,size_t _SizeInChars); | |
| 228 | + _CRTIMP char *__cdecl _tcsupr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale); | |
| 229 | + | |
| 230 | +#endif | |
| 231 | + | |
| 232 | +#else | |
| 233 | + | |
| 234 | +#define _tcsncat_s strncat_s | |
| 235 | +#define _tcsncat_s_l _strncat_s_l | |
| 236 | +#define _tcsncpy_s strncpy_s | |
| 237 | +#define _tcsncpy_s_l _strncpy_s_l | |
| 238 | +#define _tcstok_s strtok_s | |
| 239 | +#define _tcstok_s_l _strtok_s_l | |
| 240 | + | |
| 241 | +#define _tcsnset_s _strnset_s | |
| 242 | +#define _tcsnset_s_l _strnset_s_l | |
| 243 | +#define _tcsset_s _strset_s | |
| 244 | +#define _tcsset_s _strset_s | |
| 245 | +#define _tcsset_s_l _strset_s_l | |
| 246 | + | |
| 247 | +#define _tcsnccat_s strncat_s | |
| 248 | +#define _tcsnccat_s_l _strncat_s_l | |
| 249 | +#define _tcsnccpy_s strncpy_s | |
| 250 | +#define _tcsnccpy_s_l _strncpy_s_l | |
| 251 | + | |
| 252 | +#define _tcslwr_s _strlwr_s | |
| 253 | +#define _tcslwr_s_l _strlwr_s_l | |
| 254 | +#define _tcsupr_s _strupr_s | |
| 255 | +#define _tcsupr_s_l _strupr_s_l | |
| 256 | + | |
| 257 | +#define _strnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_strnset_s(_Destination,_Destination_size_chars,_Value,_Count)) | |
| 258 | +#define _strset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_strset_s(_Destination,_Destination_size_chars,_Value)) | |
| 259 | +#endif | |
| 260 | +#endif | |
| 261 | + | |
| 262 | +#ifdef __cplusplus | |
| 263 | +} | |
| 264 | +#endif | |
| 265 | +#endif | |
| 266 | +#endif | |
| @@ -0,0 +1,61 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _TIME_H__S | |
| 7 | +#define _TIME_H__S | |
| 8 | + | |
| 9 | +#include <time.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | + _CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time); | |
| 18 | + _CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time); | |
| 19 | + _CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time); | |
| 20 | + _CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes); | |
| 21 | + _CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes); | |
| 22 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 23 | + _CRTIMP errno_t __cdecl _ctime64_s(char *_Buf,size_t _SizeInBytes,const __time64_t *_Time); | |
| 24 | + _CRTIMP errno_t __cdecl _gmtime64_s(struct tm *_Tm,const __time64_t *_Time); | |
| 25 | + _CRTIMP errno_t __cdecl _localtime64_s(struct tm *_Tm,const __time64_t *_Time); | |
| 26 | +#endif | |
| 27 | + | |
| 28 | +#ifndef _WTIME_S_DEFINED | |
| 29 | +#define _WTIME_S_DEFINED | |
| 30 | + _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); | |
| 31 | + _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); | |
| 32 | + _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords); | |
| 33 | + _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords); | |
| 34 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 35 | + _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); | |
| 36 | +#endif | |
| 37 | + | |
| 38 | +#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL) | |
| 39 | +#define _INC_WTIME_S_INL | |
| 40 | +#ifdef _USE_32BIT_TIME_T | |
| 41 | +__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); } | |
| 42 | +#else | |
| 43 | +__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); } | |
| 44 | +#endif | |
| 45 | +#endif | |
| 46 | +#endif | |
| 47 | + | |
| 48 | +#ifndef RC_INVOKED | |
| 49 | +#ifdef _USE_32BIT_TIME_T | |
| 50 | +__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); } | |
| 51 | +#else | |
| 52 | +__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); } | |
| 53 | +#endif | |
| 54 | +#endif | |
| 55 | + | |
| 56 | +#ifdef __cplusplus | |
| 57 | +} | |
| 58 | +#endif | |
| 59 | + | |
| 60 | +#endif | |
| 61 | +#endif | |
| @@ -0,0 +1,128 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_WCHAR_S | |
| 7 | +#define _INC_WCHAR_S | |
| 8 | + | |
| 9 | +#include <wchar.h> | |
| 10 | + | |
| 11 | +#if defined(MINGW_HAS_SECURE_API) | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#ifndef _WIO_S_DEFINED | |
| 18 | +#define _WIO_S_DEFINED | |
| 19 | + _CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode); | |
| 20 | + _CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords); | |
| 21 | +#endif | |
| 22 | + | |
| 23 | +#ifndef _WCONIO_S_DEFINED | |
| 24 | +#define _WCONIO_S_DEFINED | |
| 25 | + _CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead); | |
| 26 | + _CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...); | |
| 27 | + _CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...); | |
| 28 | + _CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 29 | + _CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList); | |
| 30 | + _CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 31 | + _CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 32 | +#endif | |
| 33 | + | |
| 34 | +#ifndef _WSTDIO_S_DEFINED | |
| 35 | +#define _WSTDIO_S_DEFINED | |
| 36 | + _CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords); | |
| 37 | + int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...); | |
| 38 | + int __cdecl wprintf_s(const wchar_t *_Format,...); | |
| 39 | + int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| 40 | + int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList); | |
| 41 | + int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); | |
| 42 | + int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); | |
| 43 | + _CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); | |
| 44 | + _CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); | |
| 45 | + _CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 46 | + _CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 47 | + _CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 48 | + _CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 49 | + _CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); | |
| 50 | + _CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 51 | + _CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 52 | + _CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 53 | + _CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 54 | + _CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); | |
| 55 | + _CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); | |
| 56 | + _CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 57 | + _CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 58 | + _CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); | |
| 59 | + _CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); | |
| 60 | + _CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); | |
| 61 | +#endif | |
| 62 | + | |
| 63 | +#ifndef _WSTDLIB_S_DEFINED | |
| 64 | +#define _WSTDLIB_S_DEFINED | |
| 65 | + _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 66 | + _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 67 | + _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 68 | + _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); | |
| 69 | + _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); | |
| 70 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 71 | + _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 72 | + _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); | |
| 73 | +#endif | |
| 74 | +#endif | |
| 75 | + | |
| 76 | +#ifndef _POSIX_ | |
| 77 | +#ifndef _WSTDLIBP_S_DEFINED | |
| 78 | +#define _WSTDLIBP_S_DEFINED | |
| 79 | + _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); | |
| 80 | + _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); | |
| 81 | + _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); | |
| 82 | + _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); | |
| 83 | +#endif | |
| 84 | +#endif | |
| 85 | + | |
| 86 | +#ifndef _WSTRING_S_DEFINED | |
| 87 | +#define _WSTRING_S_DEFINED | |
| 88 | + _CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context); | |
| 89 | + _CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum); | |
| 90 | + _CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg); | |
| 91 | + _CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount); | |
| 92 | + _CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val); | |
| 93 | + _CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords); | |
| 94 | + _CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale); | |
| 95 | + _CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size); | |
| 96 | + _CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale); | |
| 97 | +#endif | |
| 98 | + | |
| 99 | +#ifndef _WTIME_S_DEFINED | |
| 100 | +#define _WTIME_S_DEFINED | |
| 101 | + _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); | |
| 102 | + _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); | |
| 103 | + _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords); | |
| 104 | + _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords); | |
| 105 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 106 | + _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); | |
| 107 | +#endif | |
| 108 | + | |
| 109 | +#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL) | |
| 110 | +#define _INC_WTIME_S_INL | |
| 111 | +#ifdef _USE_32BIT_TIME_T | |
| 112 | +__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); } | |
| 113 | +#else | |
| 114 | +__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); } | |
| 115 | +#endif | |
| 116 | +#endif | |
| 117 | +#endif | |
| 118 | + | |
| 119 | + _CRTIMP errno_t __cdecl mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State); | |
| 120 | + _CRTIMP errno_t __cdecl wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State); | |
| 121 | + _CRTIMP errno_t __cdecl wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State); | |
| 122 | + | |
| 123 | +#ifdef __cplusplus | |
| 124 | +} | |
| 125 | +#endif | |
| 126 | + | |
| 127 | +#endif | |
| 128 | +#endif | |
| @@ -1,72 +1,160 @@ | ||
| 1 | −/* | |
| 2 | − * setjmp.h | |
| 3 | − * | |
| 4 | − * Declarations supporting setjmp and longjump, a method for avoiding | |
| 5 | − * the normal function call return sequence. (Bleah!) | |
| 6 | − * | |
| 7 | − * This file is part of the Mingw32 package. | |
| 8 | − * | |
| 9 | − * Contributors: | |
| 10 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 6 | +#ifndef _INC_SETJMP | |
| 7 | +#define _INC_SETJMP | |
| 27 | 8 | |
| 28 | −#ifndef _SETJMP_H_ | |
| 29 | −#define _SETJMP_H_ | |
| 30 | − | |
| 31 | −/* All the headers include this file. */ | |
| 32 | 9 | #include <_mingw.h> |
| 33 | 10 | |
| 34 | −#ifndef RC_INVOKED | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 35 | 12 | |
| 36 | 13 | #ifdef __cplusplus |
| 37 | 14 | extern "C" { |
| 38 | 15 | #endif |
| 39 | 16 | |
| 40 | −/* | |
| 41 | − * The buffer used by setjmp to store the information used by longjmp | |
| 42 | − * to perform it's evil goto-like work. The size of this buffer was | |
| 43 | − * determined through experimentation; it's contents are a mystery. | |
| 44 | − * NOTE: This was determined on an i386 (actually a Pentium). The | |
| 45 | − * contents could be different on an Alpha or something else. | |
| 46 | − */ | |
| 17 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 18 | + | |
| 47 | 19 | #define _JBLEN 16 |
| 48 | 20 | #define _JBTYPE int |
| 49 | −typedef _JBTYPE jmp_buf[_JBLEN]; | |
| 50 | 21 | |
| 51 | −/* | |
| 52 | − * The function provided by CRTDLL which appears to do the actual work | |
| 53 | − * of setjmp. | |
| 54 | − */ | |
| 55 | −int _setjmp (jmp_buf); | |
| 22 | + typedef struct __JUMP_BUFFER { | |
| 23 | + unsigned long Ebp; | |
| 24 | + unsigned long Ebx; | |
| 25 | + unsigned long Edi; | |
| 26 | + unsigned long Esi; | |
| 27 | + unsigned long Esp; | |
| 28 | + unsigned long Eip; | |
| 29 | + unsigned long Registration; | |
| 30 | + unsigned long TryLevel; | |
| 31 | + unsigned long Cookie; | |
| 32 | + unsigned long UnwindFunc; | |
| 33 | + unsigned long UnwindData[6]; | |
| 34 | + } _JUMP_BUFFER; | |
| 35 | +#elif defined(__ia64__) | |
| 36 | + typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 { | |
| 37 | + __int64 LowPart; | |
| 38 | + __int64 HighPart; | |
| 39 | + } SETJMP_FLOAT128; | |
| 56 | 40 | |
| 57 | −#define setjmp(x) _setjmp(x) | |
| 41 | +#define _JBLEN 33 | |
| 42 | + typedef SETJMP_FLOAT128 _JBTYPE; | |
| 58 | 43 | |
| 59 | −/* | |
| 60 | − * Return to the last setjmp call and act as if setjmp had returned | |
| 61 | − * nVal (which had better be non-zero!). | |
| 62 | − */ | |
| 63 | −void longjmp (jmp_buf, int); | |
| 44 | + typedef struct __JUMP_BUFFER { | |
| 64 | 45 | |
| 65 | −#ifdef __cplusplus | |
| 66 | −} | |
| 46 | + unsigned long iAReserved[6]; | |
| 47 | + | |
| 48 | + unsigned long Registration; | |
| 49 | + unsigned long TryLevel; | |
| 50 | + unsigned long Cookie; | |
| 51 | + unsigned long UnwindFunc; | |
| 52 | + | |
| 53 | + unsigned long UnwindData[6]; | |
| 54 | + | |
| 55 | + SETJMP_FLOAT128 FltS0; | |
| 56 | + SETJMP_FLOAT128 FltS1; | |
| 57 | + SETJMP_FLOAT128 FltS2; | |
| 58 | + SETJMP_FLOAT128 FltS3; | |
| 59 | + SETJMP_FLOAT128 FltS4; | |
| 60 | + SETJMP_FLOAT128 FltS5; | |
| 61 | + SETJMP_FLOAT128 FltS6; | |
| 62 | + SETJMP_FLOAT128 FltS7; | |
| 63 | + SETJMP_FLOAT128 FltS8; | |
| 64 | + SETJMP_FLOAT128 FltS9; | |
| 65 | + SETJMP_FLOAT128 FltS10; | |
| 66 | + SETJMP_FLOAT128 FltS11; | |
| 67 | + SETJMP_FLOAT128 FltS12; | |
| 68 | + SETJMP_FLOAT128 FltS13; | |
| 69 | + SETJMP_FLOAT128 FltS14; | |
| 70 | + SETJMP_FLOAT128 FltS15; | |
| 71 | + SETJMP_FLOAT128 FltS16; | |
| 72 | + SETJMP_FLOAT128 FltS17; | |
| 73 | + SETJMP_FLOAT128 FltS18; | |
| 74 | + SETJMP_FLOAT128 FltS19; | |
| 75 | + __int64 FPSR; | |
| 76 | + __int64 StIIP; | |
| 77 | + __int64 BrS0; | |
| 78 | + __int64 BrS1; | |
| 79 | + __int64 BrS2; | |
| 80 | + __int64 BrS3; | |
| 81 | + __int64 BrS4; | |
| 82 | + __int64 IntS0; | |
| 83 | + __int64 IntS1; | |
| 84 | + __int64 IntS2; | |
| 85 | + __int64 IntS3; | |
| 86 | + __int64 RsBSP; | |
| 87 | + __int64 RsPFS; | |
| 88 | + __int64 ApUNAT; | |
| 89 | + __int64 ApLC; | |
| 90 | + __int64 IntSp; | |
| 91 | + __int64 IntNats; | |
| 92 | + __int64 Preds; | |
| 93 | + | |
| 94 | + } _JUMP_BUFFER; | |
| 95 | +#elif defined(__x86_64) | |
| 96 | + typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 { | |
| 97 | + unsigned __int64 Part[2]; | |
| 98 | + } SETJMP_FLOAT128; | |
| 99 | + | |
| 100 | +#define _JBLEN 16 | |
| 101 | + typedef SETJMP_FLOAT128 _JBTYPE; | |
| 102 | + | |
| 103 | + typedef struct _JUMP_BUFFER { | |
| 104 | + unsigned __int64 Frame; | |
| 105 | + unsigned __int64 Rbx; | |
| 106 | + unsigned __int64 Rsp; | |
| 107 | + unsigned __int64 Rbp; | |
| 108 | + unsigned __int64 Rsi; | |
| 109 | + unsigned __int64 Rdi; | |
| 110 | + unsigned __int64 R12; | |
| 111 | + unsigned __int64 R13; | |
| 112 | + unsigned __int64 R14; | |
| 113 | + unsigned __int64 R15; | |
| 114 | + unsigned __int64 Rip; | |
| 115 | + unsigned __int64 Spare; | |
| 116 | + SETJMP_FLOAT128 Xmm6; | |
| 117 | + SETJMP_FLOAT128 Xmm7; | |
| 118 | + SETJMP_FLOAT128 Xmm8; | |
| 119 | + SETJMP_FLOAT128 Xmm9; | |
| 120 | + SETJMP_FLOAT128 Xmm10; | |
| 121 | + SETJMP_FLOAT128 Xmm11; | |
| 122 | + SETJMP_FLOAT128 Xmm12; | |
| 123 | + SETJMP_FLOAT128 Xmm13; | |
| 124 | + SETJMP_FLOAT128 Xmm14; | |
| 125 | + SETJMP_FLOAT128 Xmm15; | |
| 126 | + } _JUMP_BUFFER; | |
| 127 | +#endif | |
| 128 | +#ifndef _JMP_BUF_DEFINED | |
| 129 | + typedef _JBTYPE jmp_buf[_JBLEN]; | |
| 130 | +#define _JMP_BUF_DEFINED | |
| 131 | +#endif | |
| 132 | + | |
| 133 | + void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void); | |
| 134 | + | |
| 135 | +#ifdef USE_MINGW_SETJMP_TWO_ARGS | |
| 136 | +#ifndef _INC_SETJMPEX | |
| 137 | +#define setjmp(BUF) _setjmp((BUF),mingw_getsp()) | |
| 138 | + int __cdecl __attribute__ ((__nothrow__)) _setjmp(jmp_buf _Buf,void *_Ctx); | |
| 139 | +#else | |
| 140 | +#undef setjmp | |
| 141 | +#define setjmp(BUF) _setjmpex((BUF),mingw_getsp()) | |
| 142 | +#define setjmpex(BUF) _setjmpex((BUF),mingw_getsp()) | |
| 143 | + int __cdecl __attribute__ ((__nothrow__)) _setjmpex(jmp_buf _Buf,void *_Ctx); | |
| 144 | +#endif | |
| 145 | +#else | |
| 146 | +#ifndef _INC_SETJMPEX | |
| 147 | +#define setjmp _setjmp | |
| 148 | +#endif | |
| 149 | + int __cdecl __attribute__ ((__nothrow__)) setjmp(jmp_buf _Buf); | |
| 67 | 150 | #endif |
| 68 | 151 | |
| 69 | −#endif /* Not RC_INVOKED */ | |
| 152 | + __declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/; | |
| 153 | + __declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl longjmp(jmp_buf _Buf,int _Value); | |
| 70 | 154 | |
| 71 | −#endif /* Not _SETJMP_H_ */ | |
| 155 | +#ifdef __cplusplus | |
| 156 | +} | |
| 157 | +#endif | |
| 72 | 158 | |
| 159 | +#pragma pack(pop) | |
| 160 | +#endif | |
| @@ -1,44 +1,28 @@ | ||
| 1 | −/* | |
| 2 | − * share.h | |
| 3 | − * | |
| 4 | − * Constants for file sharing functions. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_SHARE | |
| 7 | +#define _INC_SHARE | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 28 | 12 | |
| 29 | −#ifndef _SHARE_H_ | |
| 30 | −#define _SHARE_H_ | |
| 13 | +#define _SH_COMPAT 0x00 | |
| 14 | +#define _SH_DENYRW 0x10 | |
| 15 | +#define _SH_DENYWR 0x20 | |
| 16 | +#define _SH_DENYRD 0x30 | |
| 17 | +#define _SH_DENYNO 0x40 | |
| 18 | +#define _SH_SECURE 0x80 | |
| 31 | 19 | |
| 32 | −/* All the headers include this file. */ | |
| 33 | −#include <_mingw.h> | |
| 34 | − | |
| 35 | −#define SH_COMPAT 0x00 /* Compatibility */ | |
| 36 | −#define SH_DENYRW 0x10 /* Deny read/write */ | |
| 37 | −#define SH_DENYWR 0x20 /* Deny write */ | |
| 38 | −#define SH_DENYRD 0x30 /* Deny read */ | |
| 39 | −#define SH_DENYNO 0x40 /* Deny nothing */ | |
| 40 | − | |
| 41 | −#endif /* Not _SHARE_H_ */ | |
| 42 | − | |
| 43 | −#endif /* Not __STRICT_ANSI__ */ | |
| 20 | +#ifndef NO_OLDNAMES | |
| 21 | +#define SH_COMPAT _SH_COMPAT | |
| 22 | +#define SH_DENYRW _SH_DENYRW | |
| 23 | +#define SH_DENYWR _SH_DENYWR | |
| 24 | +#define SH_DENYRD _SH_DENYRD | |
| 25 | +#define SH_DENYNO _SH_DENYNO | |
| 26 | +#endif | |
| 44 | 27 | |
| 28 | +#endif | |
| @@ -1,111 +1,63 @@ | ||
| 1 | −/* | |
| 2 | − * signal.h | |
| 3 | − * | |
| 4 | − * A way to set handlers for exceptional conditions (also known as signals). | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_SIGNAL | |
| 7 | +#define _INC_SIGNAL | |
| 26 | 8 | |
| 27 | −#ifndef _SIGNAL_H_ | |
| 28 | −#define _SIGNAL_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −/* | |
| 34 | − * The actual signal values. Using other values with signal | |
| 35 | − * produces a SIG_ERR return value. | |
| 36 | − * | |
| 37 | − * NOTE: SIGINT is produced when the user presses Ctrl-C. | |
| 38 | − * SIGILL has not been tested. | |
| 39 | − * SIGFPE doesn't seem to work? | |
| 40 | − * SIGSEGV does not catch writing to a NULL pointer (that shuts down | |
| 41 | − * your app; can you say "segmentation violation core dump"?). | |
| 42 | − * SIGTERM comes from what kind of termination request exactly? | |
| 43 | − * SIGBREAK is indeed produced by pressing Ctrl-Break. | |
| 44 | − * SIGABRT is produced by calling abort. | |
| 45 | − * TODO: The above results may be related to not installing an appropriate | |
| 46 | − * structured exception handling frame. Results may be better if I ever | |
| 47 | − * manage to get the SEH stuff down. | |
| 48 | − */ | |
| 49 | −#define SIGINT 2 /* Interactive attention */ | |
| 50 | −#define SIGILL 4 /* Illegal instruction */ | |
| 51 | −#define SIGFPE 8 /* Floating point error */ | |
| 52 | −#define SIGSEGV 11 /* Segmentation violation */ | |
| 53 | −#define SIGTERM 15 /* Termination request */ | |
| 54 | −#define SIGBREAK 21 /* Control-break */ | |
| 55 | −#define SIGABRT 22 /* Abnormal termination (abort) */ | |
| 56 | − | |
| 57 | −#define NSIG 23 /* maximum signal number + 1 */ | |
| 58 | − | |
| 59 | −#ifndef RC_INVOKED | |
| 11 | +#ifdef __cplusplus | |
| 12 | +extern "C" { | |
| 13 | +#endif | |
| 60 | 14 | |
| 61 | 15 | #ifndef _SIG_ATOMIC_T_DEFINED |
| 62 | −typedef int sig_atomic_t; | |
| 63 | 16 | #define _SIG_ATOMIC_T_DEFINED |
| 17 | + typedef int sig_atomic_t; | |
| 64 | 18 | #endif |
| 65 | 19 | |
| 66 | −/* | |
| 67 | − * The prototypes (below) are the easy part. The hard part is figuring | |
| 68 | − * out what signals are available and what numbers they are assigned | |
| 69 | − * along with appropriate values of SIG_DFL and SIG_IGN. | |
| 70 | − */ | |
| 20 | +#define NSIG 23 | |
| 21 | + | |
| 22 | +#define SIGHUP 1 /* hangup */ | |
| 23 | +#define SIGINT 2 | |
| 24 | +#define SIGQUIT 3 /* quit */ | |
| 25 | +#define SIGILL 4 | |
| 26 | +#define SIGTRAP 5 /* trace trap (not reset when caught) */ | |
| 27 | +#define SIGIOT 6 /* IOT instruction */ | |
| 28 | +#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */ | |
| 29 | +#define SIGEMT 7 /* EMT instruction */ | |
| 30 | +#define SIGFPE 8 | |
| 31 | +#define SIGKILL 9 /* kill (cannot be caught or ignored) */ | |
| 32 | +#define SIGBUS 10 /* bus error */ | |
| 33 | +#define SIGSEGV 11 | |
| 34 | +#define SIGSYS 12 /* bad argument to system call */ | |
| 35 | +#define SIGPIPE 13 /* write on a pipe with no one to read it */ | |
| 36 | +#ifdef __USE_MINGW_ALARM | |
| 37 | +#define SIGALRM 14 /* alarm clock */ | |
| 38 | +#endif | |
| 39 | +#define SIGTERM 15 | |
| 40 | +#define SIGBREAK 21 | |
| 41 | +#define SIGABRT2 22 | |
| 71 | 42 | |
| 72 | −/* | |
| 73 | − * A pointer to a signal handler function. A signal handler takes a | |
| 74 | − * single int, which is the signal it handles. | |
| 75 | − */ | |
| 76 | −typedef void (*__p_sig_fn_t)(int); | |
| 43 | +#define SIGABRT_COMPAT 6 | |
| 77 | 44 | |
| 78 | −/* | |
| 79 | − * These are special values of signal handler pointers which are | |
| 80 | − * used to send a signal to the default handler (SIG_DFL), ignore | |
| 81 | − * the signal (SIG_IGN), or indicate an error return (SIG_ERR). | |
| 82 | − */ | |
| 83 | −#define SIG_DFL ((__p_sig_fn_t) 0) | |
| 84 | −#define SIG_IGN ((__p_sig_fn_t) 1) | |
| 85 | −#define SIG_ERR ((__p_sig_fn_t) -1) | |
| 45 | + typedef void (*__p_sig_fn_t)(int); | |
| 86 | 46 | |
| 87 | −#ifdef __cplusplus | |
| 88 | −extern "C" { | |
| 89 | −#endif | |
| 47 | +#define SIG_DFL (__p_sig_fn_t)0 | |
| 48 | +#define SIG_IGN (__p_sig_fn_t)1 | |
| 49 | +#define SIG_GET (__p_sig_fn_t)2 | |
| 50 | +#define SIG_SGE (__p_sig_fn_t)3 | |
| 51 | +#define SIG_ACK (__p_sig_fn_t)4 | |
| 52 | +#define SIG_ERR (__p_sig_fn_t)-1 | |
| 90 | 53 | |
| 91 | −/* | |
| 92 | − * Call signal to set the signal handler for signal sig to the | |
| 93 | − * function pointed to by handler. Returns a pointer to the | |
| 94 | − * previous handler, or SIG_ERR if an error occurs. Initially | |
| 95 | − * unhandled signals defined above will return SIG_DFL. | |
| 96 | − */ | |
| 97 | −__p_sig_fn_t signal(int, __p_sig_fn_t); | |
| 54 | + extern void **__cdecl __pxcptinfoptrs(void); | |
| 55 | +#define _pxcptinfoptrs (*__pxcptinfoptrs()) | |
| 98 | 56 | |
| 99 | −/* | |
| 100 | − * Raise the signal indicated by sig. Returns non-zero on success. | |
| 101 | − */ | |
| 102 | −int raise (int); | |
| 57 | + __p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func); | |
| 58 | + int __cdecl raise(int _SigNum); | |
| 103 | 59 | |
| 104 | −#ifdef __cplusplus | |
| 60 | +#ifdef __cplusplus | |
| 105 | 61 | } |
| 106 | 62 | #endif |
| 107 | − | |
| 108 | −#endif /* Not RC_INVOKED */ | |
| 109 | − | |
| 110 | −#endif /* Not _SIGNAL_H_ */ | |
| 111 | − | |
| 63 | +#endif | |
| @@ -1,19 +0,0 @@ | ||
| 1 | −#ifndef _STDARG_H | |
| 2 | −#define _STDARG_H | |
| 3 | − | |
| 4 | −#ifndef _VA_LIST | |
| 5 | −#define _VA_LIST | |
| 6 | −typedef char *va_list; | |
| 7 | −#endif | |
| 8 | − | |
| 9 | −/* only correct for i386 */ | |
| 10 | −#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3) | |
| 11 | −#define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3))) | |
| 12 | −#define va_copy(dest, src) (dest) = (src) | |
| 13 | −#define va_end(ap) | |
| 14 | − | |
| 15 | −/* fix a buggy dependency on GCC in libio.h */ | |
| 16 | −typedef va_list __gnuc_va_list; | |
| 17 | −#define _VA_LIST_DEFINED | |
| 18 | − | |
| 19 | −#endif | |
| @@ -1,10 +0,0 @@ | ||
| 1 | −#ifndef _STDBOOL_H | |
| 2 | −#define _STDBOOL_H | |
| 3 | − | |
| 4 | −/* ISOC99 boolean */ | |
| 5 | − | |
| 6 | −#define bool _Bool | |
| 7 | −#define true 1 | |
| 8 | −#define false 0 | |
| 9 | − | |
| 10 | −#endif /* _STDBOOL_H */ | |
| @@ -1,23 +0,0 @@ | ||
| 1 | −#ifndef _STDDEF_H | |
| 2 | −#define _STDDEF_H | |
| 3 | − | |
| 4 | −#define NULL ((void *)0) | |
| 5 | −typedef __SIZE_TYPE__ size_t; | |
| 6 | −typedef __WCHAR_TYPE__ wchar_t; | |
| 7 | −typedef __PTRDIFF_TYPE__ ptrdiff_t; | |
| 8 | −#define offsetof(type, field) ((size_t) &((type *)0)->field) | |
| 9 | − | |
| 10 | −/* need to do that because of glibc 2.1 bug (should have a way to test | |
| 11 | − presence of 'long long' without __GNUC__, or TCC should define | |
| 12 | − __GNUC__ ? */ | |
| 13 | −#if !defined(__int8_t_defined) && !defined(__dietlibc__) | |
| 14 | −#define __int8_t_defined | |
| 15 | −typedef char int8_t; | |
| 16 | −typedef short int int16_t; | |
| 17 | −typedef int int32_t; | |
| 18 | −typedef long long int int64_t; | |
| 19 | −#endif | |
| 20 | − | |
| 21 | −void *alloca(size_t); | |
| 22 | − | |
| 23 | −#endif | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* ISO C9x 7.18 Integer types <stdint.h> |
| 2 | 7 | * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794) |
| 3 | 8 | * |
| @@ -20,6 +25,12 @@ · 16 unmodified lines | ||
| 20 | 25 | #ifndef _STDINT_H |
| 21 | 26 | #define _STDINT_H |
| 22 | 27 | |
| 28 | +#include <_mingw.h> | |
| 29 | + | |
| 30 | +#define __need_wint_t | |
| 31 | +#define __need_wchar_t | |
| 32 | +#include "stddef.h" | |
| 33 | + | |
| 23 | 34 | /* 7.18.1.1 Exact-width integer types */ |
| 24 | 35 | typedef signed char int8_t; |
| 25 | 36 | typedef unsigned char uint8_t; |
| @@ -40,9 +51,9 @@ typedef unsigned uint_least32_t; · 14 unmodified lines | ||
| 40 | 51 | typedef long long int_least64_t; |
| 41 | 52 | typedef unsigned long long uint_least64_t; |
| 42 | 53 | |
| 43 | −/* 7.18.1.3 Fastest minimum-width integer types | |
| 54 | +/* 7.18.1.3 Fastest minimum-width integer types | |
| 44 | 55 | * Not actually guaranteed to be fastest for all purposes |
| 45 | − * Here we use the exact-width types for 8 and 16-bit ints. | |
| 56 | + * Here we use the exact-width types for 8 and 16-bit ints. | |
| 46 | 57 | */ |
| 47 | 58 | typedef char int_fast8_t; |
| 48 | 59 | typedef unsigned char uint_fast8_t; |
| @@ -53,10 +64,6 @@ typedef unsigned int uint_fast32_t; · 4 unmodified lines | ||
| 53 | 64 | typedef long long int_fast64_t; |
| 54 | 65 | typedef unsigned long long uint_fast64_t; |
| 55 | 66 | |
| 56 | −/* 7.18.1.4 Integer types capable of holding object pointers */ | |
| 57 | −typedef int intptr_t; | |
| 58 | −typedef unsigned uintptr_t; | |
| 59 | − | |
| 60 | 67 | /* 7.18.1.5 Greatest-width integer types */ |
| 61 | 68 | typedef long long intmax_t; |
| 62 | 69 | typedef unsigned long long uintmax_t; |
| @@ -65,7 +72,7 @@ typedef unsigned long long uintmax_t; · 2 unmodified lines | ||
| 65 | 72 | #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS) |
| 66 | 73 | |
| 67 | 74 | /* 7.18.2.1 Limits of exact-width integer types */ |
| 68 | −#define INT8_MIN (-128) | |
| 75 | +#define INT8_MIN (-128) | |
| 69 | 76 | #define INT16_MIN (-32768) |
| 70 | 77 | #define INT32_MIN (-2147483647 - 1) |
| 71 | 78 | #define INT64_MIN (-9223372036854775807LL - 1) |
| @@ -113,10 +120,16 @@ typedef unsigned long long uintmax_t; · 41 unmodified lines | ||
| 113 | 120 | #define UINT_FAST64_MAX UINT64_MAX |
| 114 | 121 | |
| 115 | 122 | /* 7.18.2.4 Limits of integer types capable of holding |
| 116 | − object pointers */ | |
| 123 | + object pointers */ | |
| 124 | +#ifdef _WIN64 | |
| 125 | +#define INTPTR_MIN INT64_MIN | |
| 126 | +#define INTPTR_MAX INT64_MAX | |
| 127 | +#define UINTPTR_MAX UINT64_MAX | |
| 128 | +#else | |
| 117 | 129 | #define INTPTR_MIN INT32_MIN |
| 118 | 130 | #define INTPTR_MAX INT32_MAX |
| 119 | 131 | #define UINTPTR_MAX UINT32_MAX |
| 132 | +#endif | |
| 120 | 133 | |
| 121 | 134 | /* 7.18.2.5 Limits of greatest-width integer types */ |
| 122 | 135 | #define INTMAX_MIN INT64_MIN |
| @@ -124,25 +137,35 @@ typedef unsigned long long uintmax_t; · 1 unmodified line | ||
| 124 | 137 | #define UINTMAX_MAX UINT64_MAX |
| 125 | 138 | |
| 126 | 139 | /* 7.18.3 Limits of other integer types */ |
| 140 | +#ifdef _WIN64 | |
| 141 | +#define PTRDIFF_MIN INT64_MIN | |
| 142 | +#define PTRDIFF_MAX INT64_MAX | |
| 143 | +#else | |
| 127 | 144 | #define PTRDIFF_MIN INT32_MIN |
| 128 | 145 | #define PTRDIFF_MAX INT32_MAX |
| 146 | +#endif | |
| 129 | 147 | |
| 130 | 148 | #define SIG_ATOMIC_MIN INT32_MIN |
| 131 | 149 | #define SIG_ATOMIC_MAX INT32_MAX |
| 132 | 150 | |
| 151 | +#ifndef SIZE_MAX | |
| 152 | +#ifdef _WIN64 | |
| 153 | +#define SIZE_MAX UINT64_MAX | |
| 154 | +#else | |
| 133 | 155 | #define SIZE_MAX UINT32_MAX |
| 156 | +#endif | |
| 157 | +#endif | |
| 134 | 158 | |
| 135 | −#ifndef WCHAR_MIN /* also in wchar.h */ | |
| 159 | +#ifndef WCHAR_MIN /* also in wchar.h */ | |
| 136 | 160 | #define WCHAR_MIN 0 |
| 137 | 161 | #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */ |
| 138 | 162 | #endif |
| 139 | 163 | |
| 140 | 164 | /* |
| 141 | − * wint_t is unsigned int in __MINGW32__, | |
| 142 | − * but unsigned short in MS runtime | |
| 165 | + * wint_t is unsigned short for compatibility with MS runtime | |
| 143 | 166 | */ |
| 144 | 167 | #define WINT_MIN 0 |
| 145 | −#define WINT_MAX UINT32_MAX | |
| 168 | +#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */ | |
| 146 | 169 | |
| 147 | 170 | #endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */ |
| 148 | 171 | |
| @@ -168,16 +191,18 @@ typedef unsigned long long uintmax_t; · 19 unmodified lines | ||
| 168 | 191 | #define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val)) |
| 169 | 192 | #define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val)) |
| 170 | 193 | #define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val)) |
| 171 | −#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val)) | |
| 194 | +/* The 'trick' doesn't work in C89 for long long because, without | |
| 195 | + suffix, (val) will be evaluated as int, not intmax_t */ | |
| 196 | +#define INT64_C(val) val##LL | |
| 172 | 197 | |
| 173 | 198 | #define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val)) |
| 174 | 199 | #define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val)) |
| 175 | 200 | #define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val)) |
| 176 | −#define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val)) | |
| 201 | +#define UINT64_C(val) val##ULL | |
| 177 | 202 | |
| 178 | 203 | /* 7.18.4.2 Macros for greatest-width integer constants */ |
| 179 | −#define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val)) | |
| 180 | −#define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val)) | |
| 204 | +#define INTMAX_C(val) val##LL | |
| 205 | +#define UINTMAX_C(val) val##ULL | |
| 181 | 206 | |
| 182 | 207 | #endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */ |
| 183 | 208 | |
| @@ -1,413 +1,429 @@ | ||
| 1 | −/* | |
| 2 | − * stdio.h | |
| 3 | − * | |
| 4 | − * Definitions of types and prototypes of functions for standard input and | |
| 5 | − * output. | |
| 6 | − * | |
| 7 | − * NOTE: The file manipulation functions provided by Microsoft seem to | |
| 8 | − * work with either slash (/) or backslash (\) as the path separator. | |
| 9 | − * | |
| 10 | − * This file is part of the Mingw32 package. | |
| 11 | − * | |
| 12 | − * Contributors: | |
| 13 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 14 | − * | |
| 15 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 16 | − * | |
| 17 | − * This source code is offered for use in the public domain. You may | |
| 18 | − * use, modify or distribute it freely. | |
| 19 | − * | |
| 20 | − * This code is distributed in the hope that it will be useful but | |
| 21 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 22 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 23 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 24 | − * | |
| 25 | − * $Revision: 1.2 $ | |
| 26 | − * $Author: bellard $ | |
| 27 | − * $Date: 2005/04/17 13:14:29 $ | |
| 28 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 29 | 5 | */ |
| 6 | +#ifndef _INC_STDIO | |
| 7 | +#define _INC_STDIO | |
| 30 | 8 | |
| 31 | −#ifndef _STDIO_H_ | |
| 32 | −#define _STDIO_H_ | |
| 33 | − | |
| 34 | −/* All the headers include this file. */ | |
| 35 | 9 | #include <_mingw.h> |
| 36 | 10 | |
| 37 | −#define __need_size_t | |
| 38 | −#define __need_NULL | |
| 39 | −#define __need_wchar_t | |
| 40 | −#define __need_wint_t | |
| 41 | −#ifndef RC_INVOKED | |
| 42 | −#include <stddef.h> | |
| 43 | −#endif /* Not RC_INVOKED */ | |
| 44 | − | |
| 45 | − | |
| 46 | −/* Flags for the iobuf structure */ | |
| 47 | −#define _IOREAD 1 | |
| 48 | −#define _IOWRT 2 | |
| 49 | −#define _IORW 0x0080 /* opened as "r+w" */ | |
| 50 | − | |
| 51 | − | |
| 52 | −/* | |
| 53 | − * The three standard file pointers provided by the run time library. | |
| 54 | − * NOTE: These will go to the bit-bucket silently in GUI applications! | |
| 55 | − */ | |
| 56 | −#define STDIN_FILENO 0 | |
| 57 | −#define STDOUT_FILENO 1 | |
| 58 | −#define STDERR_FILENO 2 | |
| 59 | − | |
| 60 | −/* Returned by various functions on end of file condition or error. */ | |
| 61 | −#define EOF (-1) | |
| 62 | − | |
| 63 | −/* | |
| 64 | − * The maximum length of a file name. You should use GetVolumeInformation | |
| 65 | − * instead of this constant. But hey, this works. | |
| 66 | − * | |
| 67 | − * NOTE: This is used in the structure _finddata_t (see io.h) so changing it | |
| 68 | − * is probably not a good idea. | |
| 69 | − */ | |
| 70 | −#define FILENAME_MAX (260) | |
| 71 | − | |
| 72 | −/* | |
| 73 | − * The maximum number of files that may be open at once. I have set this to | |
| 74 | − * a conservative number. The actual value may be higher. | |
| 75 | − */ | |
| 76 | −#define FOPEN_MAX (20) | |
| 77 | − | |
| 78 | −/* After creating this many names, tmpnam and tmpfile return NULL */ | |
| 79 | −#define TMP_MAX 32767 | |
| 80 | −/* | |
| 81 | − * Tmpnam, tmpfile and, sometimes, _tempnam try to create | |
| 82 | − * temp files in the root directory of the current drive | |
| 83 | − * (not in pwd, as suggested by some older MS doc's). | |
| 84 | − * Redefining these macros does not effect the CRT functions. | |
| 85 | − */ | |
| 86 | −#define _P_tmpdir "\\" | |
| 87 | −#define _wP_tmpdir L"\\" | |
| 88 | − | |
| 89 | −/* | |
| 90 | − * The maximum size of name (including NUL) that will be put in the user | |
| 91 | − * supplied buffer caName for tmpnam. | |
| 92 | − * Inferred from the size of the static buffer returned by tmpnam | |
| 93 | − * when passed a NULL argument. May actually be smaller. | |
| 94 | − */ | |
| 95 | −#define L_tmpnam (16) | |
| 96 | − | |
| 97 | −#define _IOFBF 0x0000 | |
| 98 | −#define _IOLBF 0x0040 | |
| 99 | −#define _IONBF 0x0004 | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 100 | 12 | |
| 101 | −/* | |
| 102 | − * The buffer size as used by setbuf such that it is equivalent to | |
| 103 | − * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ). | |
| 104 | − */ | |
| 105 | −#define BUFSIZ 512 | |
| 106 | − | |
| 107 | −/* Constants for nOrigin indicating the position relative to which fseek | |
| 108 | − * sets the file position. Enclosed in ifdefs because io.h could also | |
| 109 | − * define them. (Though not anymore since io.h includes this file now.) */ | |
| 110 | −#ifndef SEEK_SET | |
| 111 | −#define SEEK_SET (0) | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 112 | 15 | #endif |
| 113 | 16 | |
| 114 | −#ifndef SEEK_CUR | |
| 115 | −#define SEEK_CUR (1) | |
| 116 | −#endif | |
| 17 | +#define BUFSIZ 512 | |
| 18 | +#define _NFILE _NSTREAM_ | |
| 19 | +#define _NSTREAM_ 512 | |
| 20 | +#define _IOB_ENTRIES 20 | |
| 21 | +#define EOF (-1) | |
| 117 | 22 | |
| 118 | −#ifndef SEEK_END | |
| 119 | −#define SEEK_END (2) | |
| 23 | +#ifndef _FILE_DEFINED | |
| 24 | + struct _iobuf { | |
| 25 | + char *_ptr; | |
| 26 | + int _cnt; | |
| 27 | + char *_base; | |
| 28 | + int _flag; | |
| 29 | + int _file; | |
| 30 | + int _charbuf; | |
| 31 | + int _bufsiz; | |
| 32 | + char *_tmpfname; | |
| 33 | + }; | |
| 34 | + typedef struct _iobuf FILE; | |
| 35 | +#define _FILE_DEFINED | |
| 120 | 36 | #endif |
| 121 | 37 | |
| 122 | − | |
| 123 | −#ifndef RC_INVOKED | |
| 124 | − | |
| 125 | −/* | |
| 126 | − * I used to include stdarg.h at this point, in order to allow for the | |
| 127 | − * functions later on in the file which use va_list. That conflicts with | |
| 128 | − * using stdio.h and varargs.h in the same file, so I do the typedef myself. | |
| 129 | − */ | |
| 130 | −#ifndef _VA_LIST | |
| 131 | −#define _VA_LIST | |
| 132 | −#if defined __GNUC__ && __GNUC__ >= 3 | |
| 133 | −typedef __builtin_va_list va_list; | |
| 38 | +#ifdef _POSIX_ | |
| 39 | +#define _P_tmpdir "/" | |
| 40 | +#define _wP_tmpdir L"/" | |
| 134 | 41 | #else |
| 135 | −typedef char* va_list; | |
| 42 | +#define _P_tmpdir "\\" | |
| 43 | +#define _wP_tmpdir L"\\" | |
| 136 | 44 | #endif |
| 137 | −#endif | |
| 138 | −/* | |
| 139 | − * The structure underlying the FILE type. | |
| 140 | − * | |
| 141 | − * I still believe that nobody in their right mind should make use of the | |
| 142 | − * internals of this structure. Provided by Pedro A. Aranda Gutiirrez | |
| 143 | − * <paag@tid.es>. | |
| 144 | − */ | |
| 145 | −#ifndef _FILE_DEFINED | |
| 146 | −#define _FILE_DEFINED | |
| 147 | −typedef struct _iobuf | |
| 148 | −{ | |
| 149 | − char* _ptr; | |
| 150 | − int _cnt; | |
| 151 | − char* _base; | |
| 152 | − int _flag; | |
| 153 | − int _file; | |
| 154 | − int _charbuf; | |
| 155 | − int _bufsiz; | |
| 156 | − char* _tmpfname; | |
| 157 | −} FILE; | |
| 158 | −#endif /* Not _FILE_DEFINED */ | |
| 159 | − | |
| 160 | − | |
| 161 | −/* | |
| 162 | − * The standard file handles | |
| 163 | − */ | |
| 164 | −#ifndef __DECLSPEC_SUPPORTED | |
| 165 | − | |
| 166 | −extern FILE (*__imp__iob)[]; /* A pointer to an array of FILE */ | |
| 167 | 45 | |
| 168 | −#define _iob (*__imp__iob) /* An array of FILE */ | |
| 46 | +#define L_tmpnam (sizeof(_P_tmpdir) + 12) | |
| 169 | 47 | |
| 170 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 48 | +#ifdef _POSIX_ | |
| 49 | +#define L_ctermid 9 | |
| 50 | +#define L_cuserid 32 | |
| 51 | +#endif | |
| 171 | 52 | |
| 172 | −__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */ | |
| 53 | +#define SEEK_CUR 1 | |
| 54 | +#define SEEK_END 2 | |
| 55 | +#define SEEK_SET 0 | |
| 173 | 56 | |
| 174 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 57 | +#define STDIN_FILENO 0 | |
| 58 | +#define STDOUT_FILENO 1 | |
| 59 | +#define STDERR_FILENO 2 | |
| 175 | 60 | |
| 176 | −#define stdin (&_iob[STDIN_FILENO]) | |
| 177 | −#define stdout (&_iob[STDOUT_FILENO]) | |
| 178 | −#define stderr (&_iob[STDERR_FILENO]) | |
| 61 | +#define FILENAME_MAX 260 | |
| 62 | +#define FOPEN_MAX 20 | |
| 63 | +#define _SYS_OPEN 20 | |
| 64 | +#define TMP_MAX 32767 | |
| 179 | 65 | |
| 66 | +#ifndef NULL | |
| 180 | 67 | #ifdef __cplusplus |
| 181 | −extern "C" { | |
| 68 | +#define NULL 0 | |
| 69 | +#else | |
| 70 | +#define NULL ((void *)0) | |
| 71 | +#endif | |
| 182 | 72 | #endif |
| 183 | 73 | |
| 184 | −/* | |
| 185 | − * File Operations | |
| 186 | − */ | |
| 187 | −FILE* fopen (const char*, const char*); | |
| 188 | −FILE* freopen (const char*, const char*, FILE*); | |
| 189 | −int fflush (FILE*); | |
| 190 | −int fclose (FILE*); | |
| 191 | −/* MS puts remove & rename (but not wide versions) in io.h also */ | |
| 192 | −int remove (const char*); | |
| 193 | −int rename (const char*, const char*); | |
| 194 | −FILE* tmpfile (void); | |
| 195 | −char* tmpnam (char*); | |
| 196 | −char* _tempnam (const char*, const char*); | |
| 197 | − | |
| 198 | −#ifndef NO_OLDNAMES | |
| 199 | −char* tempnam (const char*, const char*); | |
| 74 | +#ifndef _OFF_T_DEFINED | |
| 75 | +#define _OFF_T_DEFINED | |
| 76 | +#ifndef _OFF_T_ | |
| 77 | +#define _OFF_T_ | |
| 78 | + typedef long _off_t; | |
| 79 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 80 | + typedef long off_t; | |
| 81 | +#endif | |
| 82 | +#endif | |
| 200 | 83 | #endif |
| 201 | 84 | |
| 202 | −int setvbuf (FILE*, char*, int, size_t); | |
| 85 | +#ifndef _OFF64_T_DEFINED | |
| 86 | +#define _OFF64_T_DEFINED | |
| 87 | + typedef long long _off64_t; | |
| 88 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 89 | + typedef long long off64_t; | |
| 90 | +#endif | |
| 91 | +#endif | |
| 203 | 92 | |
| 204 | −void setbuf (FILE*, char*); | |
| 93 | +#ifndef _STDIO_DEFINED | |
| 94 | +#ifdef _WIN64 | |
| 95 | + _CRTIMP FILE *__cdecl __iob_func(void); | |
| 96 | +#else | |
| 97 | +#ifdef _MSVCRT_ | |
| 98 | +extern FILE _iob[]; /* A pointer to an array of FILE */ | |
| 99 | +#define __iob_func() (_iob) | |
| 100 | +#else | |
| 101 | +extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ | |
| 102 | +#define __iob_func() (*_imp___iob) | |
| 103 | +#define _iob __iob_func() | |
| 104 | +#endif | |
| 105 | +#endif | |
| 106 | +#endif | |
| 205 | 107 | |
| 206 | −/* | |
| 207 | − * Formatted Output | |
| 208 | − */ | |
| 108 | +#ifndef _FPOS_T_DEFINED | |
| 109 | +#define _FPOS_T_DEFINED | |
| 110 | +#undef _FPOSOFF | |
| 209 | 111 | |
| 210 | −int fprintf (FILE*, const char*, ...); | |
| 211 | −int printf (const char*, ...); | |
| 212 | −int sprintf (char*, const char*, ...); | |
| 213 | −int _snprintf (char*, size_t, const char*, ...); | |
| 214 | −int vfprintf (FILE*, const char*, va_list); | |
| 215 | −int vprintf (const char*, va_list); | |
| 216 | −int vsprintf (char*, const char*, va_list); | |
| 217 | −int _vsnprintf (char*, size_t, const char*, va_list); | |
| 112 | +#if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64 | |
| 113 | + typedef __int64 fpos_t; | |
| 114 | +#define _FPOSOFF(fp) ((long)(fp)) | |
| 115 | +#else | |
| 116 | + typedef long long fpos_t; | |
| 117 | +#define _FPOSOFF(fp) ((long)(fp)) | |
| 118 | +#endif | |
| 218 | 119 | |
| 219 | −#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 220 | −int snprintf(char* s, size_t n, const char* format, ...); | |
| 221 | −extern inline int vsnprintf (char* s, size_t n, const char* format, | |
| 222 | − va_list arg) | |
| 223 | − { return _vsnprintf ( s, n, format, arg); } | |
| 224 | 120 | #endif |
| 225 | 121 | |
| 226 | −/* | |
| 227 | − * Formatted Input | |
| 228 | − */ | |
| 122 | +#ifndef _STDSTREAM_DEFINED | |
| 123 | +#define _STDSTREAM_DEFINED | |
| 229 | 124 | |
| 230 | −int fscanf (FILE*, const char*, ...); | |
| 231 | −int scanf (const char*, ...); | |
| 232 | −int sscanf (const char*, const char*, ...); | |
| 233 | −/* | |
| 234 | − * Character Input and Output Functions | |
| 235 | − */ | |
| 125 | +#define stdin (&__iob_func()[0]) | |
| 126 | +#define stdout (&__iob_func()[1]) | |
| 127 | +#define stderr (&__iob_func()[2]) | |
| 128 | +#endif | |
| 236 | 129 | |
| 237 | −int fgetc (FILE*); | |
| 238 | −char* fgets (char*, int, FILE*); | |
| 239 | −int fputc (int, FILE*); | |
| 240 | −int fputs (const char*, FILE*); | |
| 241 | −int getc (FILE*); | |
| 242 | −int getchar (void); | |
| 243 | −char* gets (char*); | |
| 244 | −int putc (int, FILE*); | |
| 245 | −int putchar (int); | |
| 246 | −int puts (const char*); | |
| 247 | −int ungetc (int, FILE*); | |
| 248 | − | |
| 249 | −/* | |
| 250 | − * Direct Input and Output Functions | |
| 251 | − */ | |
| 130 | +#define _IOREAD 0x0001 | |
| 131 | +#define _IOWRT 0x0002 | |
| 252 | 132 | |
| 253 | −size_t fread (void*, size_t, size_t, FILE*); | |
| 254 | −size_t fwrite (const void*, size_t, size_t, FILE*); | |
| 133 | +#define _IOFBF 0x0000 | |
| 134 | +#define _IOLBF 0x0040 | |
| 135 | +#define _IONBF 0x0004 | |
| 255 | 136 | |
| 256 | −/* | |
| 257 | − * File Positioning Functions | |
| 258 | − */ | |
| 137 | +#define _IOMYBUF 0x0008 | |
| 138 | +#define _IOEOF 0x0010 | |
| 139 | +#define _IOERR 0x0020 | |
| 140 | +#define _IOSTRG 0x0040 | |
| 141 | +#define _IORW 0x0080 | |
| 142 | +#ifdef _POSIX_ | |
| 143 | +#define _IOAPPEND 0x0200 | |
| 144 | +#endif | |
| 259 | 145 | |
| 260 | −int fseek (FILE*, long, int); | |
| 261 | −long ftell (FILE*); | |
| 262 | −void rewind (FILE*); | |
| 146 | +#define _TWO_DIGIT_EXPONENT 0x1 | |
| 263 | 147 | |
| 264 | −#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */ | |
| 265 | −/* | |
| 266 | − * Workaround for limitations on win9x where a file contents are | |
| 267 | − * not zero'd out if you seek past the end and then write. | |
| 268 | − */ | |
| 148 | +#ifndef _STDIO_DEFINED | |
| 269 | 149 | |
| 270 | −int __mingw_fseek (FILE *, long, int); | |
| 271 | −int __mingw_fwrite (const void*, size_t, size_t, FILE*); | |
| 272 | −#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence) | |
| 273 | −#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp) | |
| 274 | −#endif /* __USE_MINGW_FSEEK */ | |
| 275 | − | |
| 276 | − | |
| 277 | −/* | |
| 278 | − * An opaque data type used for storing file positions... The contents of | |
| 279 | − * this type are unknown, but we (the compiler) need to know the size | |
| 280 | − * because the programmer using fgetpos and fsetpos will be setting aside | |
| 281 | − * storage for fpos_t structres. Actually I tested using a byte array and | |
| 282 | − * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL). | |
| 283 | − * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in | |
| 284 | − * MSVCRT however, and for now `long long' will do. | |
| 285 | − */ | |
| 286 | −#ifdef __MSVCRT__ | |
| 287 | −typedef long long fpos_t; | |
| 150 | + _CRTIMP int __cdecl _filbuf(FILE *_File); | |
| 151 | + _CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File); | |
| 152 | +#ifdef _POSIX_ | |
| 153 | + _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode); | |
| 288 | 154 | #else |
| 289 | −typedef long fpos_t; | |
| 155 | + _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); | |
| 290 | 156 | #endif |
| 291 | − | |
| 292 | −int fgetpos (FILE*, fpos_t*); | |
| 293 | −int fsetpos (FILE*, const fpos_t*); | |
| 294 | − | |
| 295 | −/* | |
| 296 | − * Error Functions | |
| 297 | − */ | |
| 298 | − | |
| 299 | −void clearerr (FILE*); | |
| 300 | −int feof (FILE*); | |
| 301 | −int ferror (FILE*); | |
| 302 | −void perror (const char*); | |
| 303 | − | |
| 304 | − | |
| 305 | −#ifndef __STRICT_ANSI__ | |
| 306 | −/* | |
| 307 | − * Pipes | |
| 308 | − */ | |
| 309 | −FILE* _popen (const char*, const char*); | |
| 310 | −int _pclose (FILE*); | |
| 311 | − | |
| 157 | + void __cdecl clearerr(FILE *_File); | |
| 158 | + int __cdecl fclose(FILE *_File); | |
| 159 | + _CRTIMP int __cdecl _fcloseall(void); | |
| 160 | +#ifdef _POSIX_ | |
| 161 | + FILE *__cdecl fdopen(int _FileHandle,const char *_Mode); | |
| 162 | +#else | |
| 163 | + _CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode); | |
| 164 | +#endif | |
| 165 | + int __cdecl feof(FILE *_File); | |
| 166 | + int __cdecl ferror(FILE *_File); | |
| 167 | + int __cdecl fflush(FILE *_File); | |
| 168 | + int __cdecl fgetc(FILE *_File); | |
| 169 | + _CRTIMP int __cdecl _fgetchar(void); | |
| 170 | + int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos); | |
| 171 | + char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File); | |
| 172 | +#ifdef _POSIX_ | |
| 173 | + int __cdecl fileno(FILE *_File); | |
| 174 | +#else | |
| 175 | + _CRTIMP int __cdecl _fileno(FILE *_File); | |
| 176 | +#endif | |
| 177 | + _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix); | |
| 178 | + _CRTIMP int __cdecl _flushall(void); | |
| 179 | + FILE *__cdecl fopen(const char *_Filename,const char *_Mode); | |
| 180 | + FILE *fopen64(const char *filename,const char *mode); | |
| 181 | + int __cdecl fprintf(FILE *_File,const char *_Format,...); | |
| 182 | + int __cdecl fputc(int _Ch,FILE *_File); | |
| 183 | + _CRTIMP int __cdecl _fputchar(int _Ch); | |
| 184 | + int __cdecl fputs(const char *_Str,FILE *_File); | |
| 185 | + size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File); | |
| 186 | + FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File); | |
| 187 | + int __cdecl fscanf(FILE *_File,const char *_Format,...); | |
| 188 | + int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos); | |
| 189 | + int __cdecl fseek(FILE *_File,long _Offset,int _Origin); | |
| 190 | + int fseeko64(FILE* stream, _off64_t offset, int whence); | |
| 191 | + long __cdecl ftell(FILE *_File); | |
| 192 | + _off64_t ftello64(FILE * stream); | |
| 193 | + int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); | |
| 194 | + __int64 __cdecl _ftelli64(FILE *_File); | |
| 195 | + size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File); | |
| 196 | + int __cdecl getc(FILE *_File); | |
| 197 | + int __cdecl getchar(void); | |
| 198 | + _CRTIMP int __cdecl _getmaxstdio(void); | |
| 199 | + char *__cdecl gets(char *_Buffer); | |
| 200 | + int __cdecl _getw(FILE *_File); | |
| 201 | +#ifndef _CRT_PERROR_DEFINED | |
| 202 | +#define _CRT_PERROR_DEFINED | |
| 203 | + void __cdecl perror(const char *_ErrMsg); | |
| 204 | +#endif | |
| 205 | + _CRTIMP int __cdecl _pclose(FILE *_File); | |
| 206 | + _CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode); | |
| 207 | +#if !defined(NO_OLDNAMES) && !defined(popen) | |
| 208 | +#define popen _popen | |
| 209 | +#define pclose _pclose | |
| 210 | +#endif | |
| 211 | + int __cdecl printf(const char *_Format,...); | |
| 212 | + int __cdecl putc(int _Ch,FILE *_File); | |
| 213 | + int __cdecl putchar(int _Ch); | |
| 214 | + int __cdecl puts(const char *_Str); | |
| 215 | + _CRTIMP int __cdecl _putw(int _Word,FILE *_File); | |
| 216 | +#ifndef _CRT_DIRECTORY_DEFINED | |
| 217 | +#define _CRT_DIRECTORY_DEFINED | |
| 218 | + int __cdecl remove(const char *_Filename); | |
| 219 | + int __cdecl rename(const char *_OldFilename,const char *_NewFilename); | |
| 220 | + _CRTIMP int __cdecl _unlink(const char *_Filename); | |
| 312 | 221 | #ifndef NO_OLDNAMES |
| 313 | −FILE* popen (const char*, const char*); | |
| 314 | −int pclose (FILE*); | |
| 222 | + int __cdecl unlink(const char *_Filename); | |
| 223 | +#endif | |
| 224 | +#endif | |
| 225 | + void __cdecl rewind(FILE *_File); | |
| 226 | + _CRTIMP int __cdecl _rmtmp(void); | |
| 227 | + int __cdecl scanf(const char *_Format,...); | |
| 228 | + void __cdecl setbuf(FILE *_File,char *_Buffer); | |
| 229 | + _CRTIMP int __cdecl _setmaxstdio(int _Max); | |
| 230 | + _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format); | |
| 231 | + _CRTIMP unsigned int __cdecl _get_output_format(void); | |
| 232 | + int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size); | |
| 233 | + _CRTIMP int __cdecl _scprintf(const char *_Format,...); | |
| 234 | + int __cdecl sscanf(const char *_Src,const char *_Format,...); | |
| 235 | + _CRTIMP int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...); | |
| 236 | + FILE *__cdecl tmpfile(void); | |
| 237 | + char *__cdecl tmpnam(char *_Buffer); | |
| 238 | + int __cdecl ungetc(int _Ch,FILE *_File); | |
| 239 | + int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList); | |
| 240 | + int __cdecl vprintf(const char *_Format,va_list _ArgList); | |
| 241 | + /* Make sure macros are not defined. */ | |
| 242 | +#pragma push_macro("vsnprintf") | |
| 243 | +#pragma push_macro("snprintf") | |
| 244 | + #undef vsnprintf | |
| 245 | + #undef snprintf | |
| 246 | + extern | |
| 247 | + __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3))) | |
| 248 | + int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 249 | + extern | |
| 250 | + __attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3))) | |
| 251 | + int __mingw_snprintf(char* s, size_t n, const char* format, ...); | |
| 252 | + int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); | |
| 253 | + _CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...); | |
| 254 | + _CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args); | |
| 255 | + int __cdecl sprintf(char *_Dest,const char *_Format,...); | |
| 256 | + int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args); | |
| 257 | +#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 258 | + int __cdecl snprintf(char* s, size_t n, const char* format, ...); | |
| 259 | + __CRT_INLINE int __cdecl vsnprintf (char* s, size_t n, const char* format,va_list arg) { | |
| 260 | + return _vsnprintf ( s, n, format, arg); | |
| 261 | + } | |
| 262 | + int __cdecl vscanf(const char * Format, va_list argp); | |
| 263 | + int __cdecl vfscanf (FILE * fp, const char * Format,va_list argp); | |
| 264 | + int __cdecl vsscanf (const char * _Str,const char * Format,va_list argp); | |
| 315 | 265 | #endif |
| 266 | +/* Restore may prior defined macros snprintf/vsnprintf. */ | |
| 267 | +#pragma pop_macro("snprintf") | |
| 268 | +#pragma pop_macro("vsnprintf") | |
| 269 | +/* Check if vsnprintf and snprintf are defaulting to gnu-style. */ | |
| 270 | + #if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF | |
| 271 | + #ifndef vsnprint | |
| 272 | + #define vsnprintf __mingw_vsnprintf | |
| 273 | + #endif | |
| 274 | + #ifndef snprintf | |
| 275 | + #define snprintf __mingw_snprintf | |
| 276 | + #endif | |
| 277 | + #endif | |
| 278 | + _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList); | |
| 279 | + _CRTIMP int __cdecl _set_printf_count_output(int _Value); | |
| 280 | + _CRTIMP int __cdecl _get_printf_count_output(void); | |
| 316 | 281 | |
| 317 | −/* | |
| 318 | − * Other Non ANSI functions | |
| 319 | − */ | |
| 320 | −int _flushall (void); | |
| 321 | −int _fgetchar (void); | |
| 322 | −int _fputchar (int); | |
| 323 | −FILE* _fdopen (int, const char*); | |
| 324 | −int _fileno (FILE*); | |
| 282 | +#ifndef _WSTDIO_DEFINED | |
| 325 | 283 | |
| 326 | −#ifndef _NO_OLDNAMES | |
| 327 | −int fgetchar (void); | |
| 328 | −int fputchar (int); | |
| 329 | −FILE* fdopen (int, const char*); | |
| 330 | −int fileno (FILE*); | |
| 331 | −#endif /* Not _NO_OLDNAMES */ | |
| 284 | +#ifndef WEOF | |
| 285 | +#define WEOF (wint_t)(0xFFFF) | |
| 286 | +#endif | |
| 332 | 287 | |
| 333 | −#endif /* Not __STRICT_ANSI__ */ | |
| 288 | +#ifdef _POSIX_ | |
| 289 | + _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode); | |
| 290 | +#else | |
| 291 | + _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); | |
| 292 | +#endif | |
| 293 | + wint_t __cdecl fgetwc(FILE *_File); | |
| 294 | + _CRTIMP wint_t __cdecl _fgetwchar(void); | |
| 295 | + wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File); | |
| 296 | + _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch); | |
| 297 | + wint_t __cdecl getwc(FILE *_File); | |
| 298 | + wint_t __cdecl getwchar(void); | |
| 299 | + wint_t __cdecl putwc(wchar_t _Ch,FILE *_File); | |
| 300 | + wint_t __cdecl putwchar(wchar_t _Ch); | |
| 301 | + wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File); | |
| 302 | + wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File); | |
| 303 | + int __cdecl fputws(const wchar_t *_Str,FILE *_File); | |
| 304 | + _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String); | |
| 305 | + _CRTIMP int __cdecl _putws(const wchar_t *_Str); | |
| 306 | + int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...); | |
| 307 | + int __cdecl wprintf(const wchar_t *_Format,...); | |
| 308 | + _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...); | |
| 309 | + int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| 310 | + int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 311 | + _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...); | |
| 312 | + _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list); | |
| 313 | + _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...); | |
| 314 | + _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); | |
| 315 | + _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...); | |
| 316 | + _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args); | |
| 317 | +#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 318 | + int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); | |
| 319 | + __CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); } | |
| 320 | + int __cdecl vwscanf (const wchar_t *, va_list); | |
| 321 | + int __cdecl vfwscanf (FILE *,const wchar_t *,va_list); | |
| 322 | + int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list); | |
| 323 | +#endif | |
| 324 | + _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...); | |
| 325 | + _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args); | |
| 334 | 326 | |
| 335 | −/* Wide versions */ | |
| 327 | +#ifndef RC_INVOKED | |
| 328 | +#include <vadefs.h> | |
| 329 | +#endif | |
| 336 | 330 | |
| 337 | −#ifndef _WSTDIO_DEFINED | |
| 338 | −/* also in wchar.h - keep in sync */ | |
| 339 | −int fwprintf (FILE*, const wchar_t*, ...); | |
| 340 | −int wprintf (const wchar_t*, ...); | |
| 341 | −int swprintf (wchar_t*, const wchar_t*, ...); | |
| 342 | −int _snwprintf (wchar_t*, size_t, const wchar_t*, ...); | |
| 343 | −int vfwprintf (FILE*, const wchar_t*, va_list); | |
| 344 | −int vwprintf (const wchar_t*, va_list); | |
| 345 | −int vswprintf (wchar_t*, const wchar_t*, va_list); | |
| 346 | −int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list); | |
| 347 | −int fwscanf (FILE*, const wchar_t*, ...); | |
| 348 | −int wscanf (const wchar_t*, ...); | |
| 349 | −int swscanf (const wchar_t*, const wchar_t*, ...); | |
| 350 | −wint_t fgetwc (FILE*); | |
| 351 | −wint_t fputwc (wchar_t, FILE*); | |
| 352 | −wint_t ungetwc (wchar_t, FILE*); | |
| 353 | −#ifdef __MSVCRT__ | |
| 354 | −wchar_t* fgetws (wchar_t*, int, FILE*); | |
| 355 | −int fputws (const wchar_t*, FILE*); | |
| 356 | −wint_t getwc (FILE*); | |
| 357 | −wint_t getwchar (void); | |
| 358 | −wchar_t* _getws (wchar_t*); | |
| 359 | −wint_t putwc (wint_t, FILE*); | |
| 360 | −int _putws (const wchar_t*); | |
| 361 | −wint_t putwchar (wint_t); | |
| 362 | −FILE* _wfopen (const wchar_t*, const wchar_t*); | |
| 363 | −FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*); | |
| 364 | −FILE* _wfsopen (const wchar_t*, const wchar_t*, int); | |
| 365 | −wchar_t* _wtmpnam (wchar_t*); | |
| 366 | −wchar_t* _wtempnam (const wchar_t*, const wchar_t*); | |
| 367 | −int _wrename (const wchar_t*, const wchar_t*); | |
| 368 | −int _wremove (const wchar_t*); | |
| 369 | −void _wperror (const wchar_t*); | |
| 370 | −FILE* _wpopen (const wchar_t*, const wchar_t*); | |
| 371 | −#endif /* __MSVCRT__ */ | |
| 331 | +#ifdef _CRT_NON_CONFORMING_SWPRINTFS | |
| 332 | +#ifndef __cplusplus | |
| 333 | +#define swprintf _swprintf | |
| 334 | +#define vswprintf _vswprintf | |
| 335 | +#define _swprintf_l __swprintf_l | |
| 336 | +#define _vswprintf_l __vswprintf_l | |
| 337 | +#endif | |
| 338 | +#endif | |
| 372 | 339 | |
| 373 | −#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 374 | −int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...); | |
| 375 | −extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, | |
| 376 | − va_list arg) | |
| 377 | − { return _vsnwprintf ( s, n, format, arg); } | |
| 340 | + _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); | |
| 341 | + _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 342 | + int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...); | |
| 343 | + int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...); | |
| 344 | + _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); | |
| 345 | + int __cdecl wscanf(const wchar_t *_Format,...); | |
| 346 | + _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode); | |
| 347 | + _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode); | |
| 348 | + _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); | |
| 349 | +#ifndef _CRT_WPERROR_DEFINED | |
| 350 | +#define _CRT_WPERROR_DEFINED | |
| 351 | + _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); | |
| 352 | +#endif | |
| 353 | + _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode); | |
| 354 | +#if !defined(NO_OLDNAMES) && !defined(wpopen) | |
| 355 | +#define wpopen _wpopen | |
| 378 | 356 | #endif |
| 357 | + _CRTIMP int __cdecl _wremove(const wchar_t *_Filename); | |
| 358 | + _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer); | |
| 359 | + _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File); | |
| 360 | + _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File); | |
| 361 | + _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File); | |
| 379 | 362 | |
| 380 | −#define _WSTDIO_DEFINED | |
| 381 | −#endif /* _WSTDIO_DEFINED */ | |
| 363 | +#undef _CRT_GETPUTWCHAR_NOINLINE | |
| 382 | 364 | |
| 383 | −#ifndef __STRICT_ANSI__ | |
| 384 | −#ifdef __MSVCRT__ | |
| 385 | −#ifndef NO_OLDNAMES | |
| 386 | −FILE* wpopen (const wchar_t*, const wchar_t*); | |
| 387 | −#endif /* not NO_OLDNAMES */ | |
| 388 | −#endif /* MSVCRT runtime */ | |
| 365 | +#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) | |
| 366 | +#define getwchar() fgetwc(stdin) | |
| 367 | +#define putwchar(_c) fputwc((_c),stdout) | |
| 368 | +#else | |
| 369 | + __CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); } | |
| 370 | + __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); } | |
| 371 | +#endif | |
| 389 | 372 | |
| 390 | −/* | |
| 391 | − * Other Non ANSI wide functions | |
| 392 | − */ | |
| 393 | −wint_t _fgetwchar (void); | |
| 394 | −wint_t _fputwchar (wint_t); | |
| 395 | −int _getw (FILE*); | |
| 396 | −int _putw (int, FILE*); | |
| 373 | +#define getwc(_stm) fgetwc(_stm) | |
| 374 | +#define putwc(_c,_stm) fputwc(_c,_stm) | |
| 375 | +#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm) | |
| 376 | +#define _getwc_nolock(_stm) _fgetwc_nolock(_stm) | |
| 377 | + | |
| 378 | +#define _WSTDIO_DEFINED | |
| 379 | +#endif | |
| 397 | 380 | |
| 398 | −#ifndef _NO_OLDNAMES | |
| 399 | −wint_t fgetwchar (void); | |
| 400 | −wint_t fputwchar (wint_t); | |
| 401 | −int getw (FILE*); | |
| 402 | −int putw (int, FILE*); | |
| 403 | −#endif /* Not _NO_OLDNAMES */ | |
| 381 | +#define _STDIO_DEFINED | |
| 382 | +#endif | |
| 404 | 383 | |
| 405 | −#endif /* __STRICT_ANSI */ | |
| 384 | +#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream)) | |
| 385 | +#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) | |
| 386 | +#define _getc_nolock(_stream) _fgetc_nolock(_stream) | |
| 387 | +#define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream) | |
| 388 | +#define _getchar_nolock() _getc_nolock(stdin) | |
| 389 | +#define _putchar_nolock(_c) _putc_nolock((_c),stdout) | |
| 390 | +#define _getwchar_nolock() _getwc_nolock(stdin) | |
| 391 | +#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout) | |
| 392 | + | |
| 393 | + _CRTIMP void __cdecl _lock_file(FILE *_File); | |
| 394 | + _CRTIMP void __cdecl _unlock_file(FILE *_File); | |
| 395 | + _CRTIMP int __cdecl _fclose_nolock(FILE *_File); | |
| 396 | + _CRTIMP int __cdecl _fflush_nolock(FILE *_File); | |
| 397 | + _CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File); | |
| 398 | + _CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin); | |
| 399 | + _CRTIMP long __cdecl _ftell_nolock(FILE *_File); | |
| 400 | + _CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin); | |
| 401 | + _CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File); | |
| 402 | + _CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File); | |
| 403 | + _CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File); | |
| 404 | + | |
| 405 | +#if !defined(NO_OLDNAMES) || !defined(_POSIX) | |
| 406 | +#define P_tmpdir _P_tmpdir | |
| 407 | +#define SYS_OPEN _SYS_OPEN | |
| 408 | + | |
| 409 | + char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix); | |
| 410 | + int __cdecl fcloseall(void); | |
| 411 | + FILE *__cdecl fdopen(int _FileHandle,const char *_Format); | |
| 412 | + int __cdecl fgetchar(void); | |
| 413 | + int __cdecl fileno(FILE *_File); | |
| 414 | + int __cdecl flushall(void); | |
| 415 | + int __cdecl fputchar(int _Ch); | |
| 416 | + int __cdecl getw(FILE *_File); | |
| 417 | + int __cdecl putw(int _Ch,FILE *_File); | |
| 418 | + int __cdecl rmtmp(void); | |
| 419 | +#endif | |
| 406 | 420 | |
| 407 | 421 | #ifdef __cplusplus |
| 408 | 422 | } |
| 409 | 423 | #endif |
| 410 | 424 | |
| 411 | −#endif /* Not RC_INVOKED */ | |
| 425 | +#pragma pack(pop) | |
| 426 | + | |
| 427 | +#include <sec_api/stdio_s.h> | |
| 412 | 428 | |
| 413 | −#endif /* _STDIO_H_ */ | |
| 429 | +#endif | |
| @@ -1,482 +1,580 @@ | ||
| 1 | −/* | |
| 2 | − * stdlib.h | |
| 3 | − * | |
| 4 | − * Definitions for common types, variables, and functions. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_STDLIB | |
| 7 | +#define _INC_STDLIB | |
| 26 | 8 | |
| 27 | −#ifndef _STDLIB_H_ | |
| 28 | −#define _STDLIB_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 10 | +#include <limits.h> | |
| 32 | 11 | |
| 12 | +#pragma pack(push,_CRT_PACKING) | |
| 33 | 13 | |
| 34 | −#define __need_size_t | |
| 35 | −#define __need_wchar_t | |
| 36 | −#define __need_NULL | |
| 37 | −#ifndef RC_INVOKED | |
| 38 | −#include <stddef.h> | |
| 39 | −#endif /* RC_INVOKED */ | |
| 40 | − | |
| 41 | −/* | |
| 42 | − * RAND_MAX is the maximum value that may be returned by rand. | |
| 43 | − * The minimum is zero. | |
| 44 | − */ | |
| 45 | −#define RAND_MAX 0x7FFF | |
| 46 | − | |
| 47 | −/* | |
| 48 | − * These values may be used as exit status codes. | |
| 49 | − */ | |
| 50 | −#define EXIT_SUCCESS 0 | |
| 51 | −#define EXIT_FAILURE 1 | |
| 52 | − | |
| 53 | −/* | |
| 54 | − * Definitions for path name functions. | |
| 55 | − * NOTE: All of these values have simply been chosen to be conservatively high. | |
| 56 | − * Remember that with long file names we can no longer depend on | |
| 57 | − * extensions being short. | |
| 58 | − */ | |
| 59 | −#ifndef __STRICT_ANSI__ | |
| 60 | − | |
| 61 | −#ifndef MAX_PATH | |
| 62 | −#define MAX_PATH (260) | |
| 14 | +#ifdef __cplusplus | |
| 15 | +extern "C" { | |
| 63 | 16 | #endif |
| 64 | 17 | |
| 65 | −#define _MAX_PATH MAX_PATH | |
| 66 | −#define _MAX_DRIVE (3) | |
| 67 | −#define _MAX_DIR 256 | |
| 68 | −#define _MAX_FNAME 256 | |
| 69 | −#define _MAX_EXT 256 | |
| 18 | +#ifndef NULL | |
| 19 | +#ifdef __cplusplus | |
| 20 | +#define NULL 0 | |
| 21 | +#else | |
| 22 | +#define NULL ((void *)0) | |
| 23 | +#endif | |
| 24 | +#endif | |
| 70 | 25 | |
| 71 | −#endif /* Not __STRICT_ANSI__ */ | |
| 26 | +#define EXIT_SUCCESS 0 | |
| 27 | +#define EXIT_FAILURE 1 | |
| 72 | 28 | |
| 29 | +#ifndef _ONEXIT_T_DEFINED | |
| 30 | +#define _ONEXIT_T_DEFINED | |
| 73 | 31 | |
| 74 | −#ifndef RC_INVOKED | |
| 32 | + typedef int (__cdecl *_onexit_t)(void); | |
| 75 | 33 | |
| 76 | −#ifdef __cplusplus | |
| 77 | −extern "C" { | |
| 34 | +#ifndef NO_OLDNAMES | |
| 35 | +#define onexit_t _onexit_t | |
| 36 | +#endif | |
| 78 | 37 | #endif |
| 79 | 38 | |
| 80 | −/* | |
| 81 | − * This seems like a convenient place to declare these variables, which | |
| 82 | − * give programs using WinMain (or main for that matter) access to main-ish | |
| 83 | − * argc and argv. environ is a pointer to a table of environment variables. | |
| 84 | − * NOTE: Strings in _argv and environ are ANSI strings. | |
| 85 | − */ | |
| 86 | −extern int _argc; | |
| 87 | −extern char** _argv; | |
| 39 | +#ifndef _DIV_T_DEFINED | |
| 40 | +#define _DIV_T_DEFINED | |
| 88 | 41 | |
| 89 | −/* imports from runtime dll of the above variables */ | |
| 90 | −#ifdef __MSVCRT__ | |
| 42 | + typedef struct _div_t { | |
| 43 | + int quot; | |
| 44 | + int rem; | |
| 45 | + } div_t; | |
| 91 | 46 | |
| 92 | −extern int* __p___argc(void); | |
| 93 | −extern char*** __p___argv(void); | |
| 94 | −extern wchar_t*** __p___wargv(void); | |
| 47 | + typedef struct _ldiv_t { | |
| 48 | + long quot; | |
| 49 | + long rem; | |
| 50 | + } ldiv_t; | |
| 51 | +#endif | |
| 95 | 52 | |
| 96 | −#define __argc (*__p___argc()) | |
| 97 | −#define __argv (*__p___argv()) | |
| 98 | −#define __wargv (*__p___wargv()) | |
| 53 | +#ifndef _CRT_DOUBLE_DEC | |
| 54 | +#define _CRT_DOUBLE_DEC | |
| 99 | 55 | |
| 100 | −#else /* !MSVCRT */ | |
| 56 | +#pragma pack(4) | |
| 57 | + typedef struct { | |
| 58 | + unsigned char ld[10]; | |
| 59 | + } _LDOUBLE; | |
| 60 | +#pragma pack() | |
| 101 | 61 | |
| 102 | −#ifndef __DECLSPEC_SUPPORTED | |
| 62 | +#define _PTR_LD(x) ((unsigned char *)(&(x)->ld)) | |
| 103 | 63 | |
| 104 | −extern int* __imp___argc_dll; | |
| 105 | −extern char*** __imp___argv_dll; | |
| 106 | −#define __argc (*__imp___argc_dll) | |
| 107 | −#define __argv (*__imp___argv_dll) | |
| 64 | + typedef struct { | |
| 65 | + double x; | |
| 66 | + } _CRT_DOUBLE; | |
| 108 | 67 | |
| 109 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 68 | + typedef struct { | |
| 69 | + float f; | |
| 70 | + } _CRT_FLOAT; | |
| 110 | 71 | |
| 111 | −__MINGW_IMPORT int __argc_dll; | |
| 112 | −__MINGW_IMPORT char** __argv_dll; | |
| 113 | −#define __argc __argc_dll | |
| 114 | −#define __argv __argv_dll | |
| 72 | +#pragma push_macro("long") | |
| 73 | +#undef long | |
| 115 | 74 | |
| 116 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 75 | + typedef struct { | |
| 76 | + long double x; | |
| 77 | + } _LONGDOUBLE; | |
| 117 | 78 | |
| 118 | −#endif /* __MSVCRT */ | |
| 79 | +#pragma pop_macro("long") | |
| 119 | 80 | |
| 120 | −/* | |
| 121 | − * Also defined in ctype.h. | |
| 122 | − */ | |
| 81 | +#pragma pack(4) | |
| 82 | + typedef struct { | |
| 83 | + unsigned char ld12[12]; | |
| 84 | + } _LDBL12; | |
| 85 | +#pragma pack() | |
| 86 | +#endif | |
| 123 | 87 | |
| 124 | −#ifndef MB_CUR_MAX | |
| 125 | −# ifdef __MSVCRT__ | |
| 126 | −# define MB_CUR_MAX __mb_cur_max | |
| 127 | − __MINGW_IMPORT int __mb_cur_max; | |
| 128 | −# else /* not __MSVCRT */ | |
| 129 | −# define MB_CUR_MAX __mb_cur_max_dll | |
| 130 | − __MINGW_IMPORT int __mb_cur_max_dll; | |
| 131 | −# endif /* not __MSVCRT */ | |
| 132 | −#endif /* MB_CUR_MAX */ | |
| 133 | − | |
| 134 | −/* | |
| 135 | − * MS likes to declare errno in stdlib.h as well. | |
| 136 | − */ | |
| 88 | +#define RAND_MAX 0x7fff | |
| 137 | 89 | |
| 138 | −#ifdef _UWIN | |
| 139 | −#undef errno | |
| 140 | −extern int errno; | |
| 90 | +#ifndef MB_CUR_MAX | |
| 91 | +#define MB_CUR_MAX ___mb_cur_max_func() | |
| 92 | +#ifndef __mb_cur_max | |
| 93 | +#ifdef _MSVCRT_ | |
| 94 | + extern int __mb_cur_max; | |
| 141 | 95 | #else |
| 142 | −int* _errno(void); | |
| 143 | −#define errno (*_errno()) | |
| 96 | +#define __mb_cur_max (*_imp____mb_cur_max) | |
| 97 | + extern int *_imp____mb_cur_max; | |
| 98 | +#endif | |
| 99 | +#endif | |
| 100 | +#ifdef _MSVCRT_ | |
| 101 | + extern int __mbcur_max; | |
| 102 | +#define ___mb_cur_max_func() (__mb_cur_max) | |
| 103 | +#else | |
| 104 | + extern int* _imp____mbcur_max; | |
| 105 | +#define ___mb_cur_max_func() (*_imp____mb_cur_max) | |
| 106 | +#endif | |
| 144 | 107 | #endif |
| 145 | −int* __doserrno(void); | |
| 146 | −#define _doserrno (*__doserrno()) | |
| 147 | − | |
| 148 | −/* | |
| 149 | − * Use environ from the DLL, not as a global. | |
| 150 | − */ | |
| 151 | − | |
| 152 | −#ifdef __MSVCRT__ | |
| 153 | − extern char *** __p__environ(void); | |
| 154 | − extern wchar_t *** __p__wenviron(void); | |
| 155 | −# define _environ (*__p__environ()) | |
| 156 | −# define _wenviron (*__p__wenviron()) | |
| 157 | −#else /* ! __MSVCRT__ */ | |
| 158 | −# ifndef __DECLSPEC_SUPPORTED | |
| 159 | − extern char *** __imp__environ_dll; | |
| 160 | −# define _environ (*__imp__environ_dll) | |
| 161 | −# else /* __DECLSPEC_SUPPORTED */ | |
| 162 | − __MINGW_IMPORT char ** _environ_dll; | |
| 163 | −# define _environ _environ_dll | |
| 164 | −# endif /* __DECLSPEC_SUPPORTED */ | |
| 165 | −#endif /* ! __MSVCRT__ */ | |
| 166 | 108 | |
| 167 | −#define environ _environ | |
| 109 | +#define __max(a,b) (((a) > (b)) ? (a) : (b)) | |
| 110 | +#define __min(a,b) (((a) < (b)) ? (a) : (b)) | |
| 168 | 111 | |
| 169 | −#ifdef __MSVCRT__ | |
| 170 | −/* One of the MSVCRTxx libraries */ | |
| 171 | − | |
| 172 | −#ifndef __DECLSPEC_SUPPORTED | |
| 173 | − extern int* __imp__sys_nerr; | |
| 174 | −# define sys_nerr (*__imp__sys_nerr) | |
| 175 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 176 | − __MINGW_IMPORT int _sys_nerr; | |
| 177 | −# ifndef _UWIN | |
| 178 | −# define sys_nerr _sys_nerr | |
| 179 | −# endif /* _UWIN */ | |
| 180 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 181 | − | |
| 182 | −#else /* ! __MSVCRT__ */ | |
| 183 | − | |
| 184 | −/* CRTDLL run time library */ | |
| 185 | − | |
| 186 | −#ifndef __DECLSPEC_SUPPORTED | |
| 187 | − extern int* __imp__sys_nerr_dll; | |
| 188 | −# define sys_nerr (*__imp__sys_nerr_dll) | |
| 189 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 190 | − __MINGW_IMPORT int _sys_nerr_dll; | |
| 191 | −# define sys_nerr _sys_nerr_dll | |
| 192 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 193 | − | |
| 194 | −#endif /* ! __MSVCRT__ */ | |
| 195 | − | |
| 196 | −#ifndef __DECLSPEC_SUPPORTED | |
| 197 | −extern char*** __imp__sys_errlist; | |
| 198 | −#define sys_errlist (*__imp__sys_errlist) | |
| 199 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 200 | −__MINGW_IMPORT char* _sys_errlist[]; | |
| 201 | −#ifndef _UWIN | |
| 202 | −#define sys_errlist _sys_errlist | |
| 203 | −#endif /* _UWIN */ | |
| 204 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 205 | − | |
| 206 | −/* | |
| 207 | − * OS version and such constants. | |
| 208 | − */ | |
| 209 | −#ifndef __STRICT_ANSI__ | |
| 112 | +#define _MAX_PATH 260 | |
| 113 | +#define _MAX_DRIVE 3 | |
| 114 | +#define _MAX_DIR 256 | |
| 115 | +#define _MAX_FNAME 256 | |
| 116 | +#define _MAX_EXT 256 | |
| 210 | 117 | |
| 211 | −#ifdef __MSVCRT__ | |
| 212 | −/* msvcrtxx.dll */ | |
| 118 | +#define _OUT_TO_DEFAULT 0 | |
| 119 | +#define _OUT_TO_STDERR 1 | |
| 120 | +#define _OUT_TO_MSGBOX 2 | |
| 121 | +#define _REPORT_ERRMODE 3 | |
| 213 | 122 | |
| 214 | −extern unsigned int* __p__osver(void); | |
| 215 | −extern unsigned int* __p__winver(void); | |
| 216 | −extern unsigned int* __p__winmajor(void); | |
| 217 | −extern unsigned int* __p__winminor(void); | |
| 123 | +#define _WRITE_ABORT_MSG 0x1 | |
| 124 | +#define _CALL_REPORTFAULT 0x2 | |
| 218 | 125 | |
| 219 | −#define _osver (*__p__osver()) | |
| 220 | −#define _winver (*__p__winver()) | |
| 221 | −#define _winmajor (*__p__winmajor()) | |
| 222 | −#define _winminor (*__p__winminor()) | |
| 126 | +#define _MAX_ENV 32767 | |
| 223 | 127 | |
| 224 | −#else | |
| 225 | −/* Not msvcrtxx.dll, thus crtdll.dll */ | |
| 226 | − | |
| 227 | −#ifndef __DECLSPEC_SUPPORTED | |
| 228 | − | |
| 229 | −extern unsigned int* _imp___osver_dll; | |
| 230 | −extern unsigned int* _imp___winver_dll; | |
| 231 | −extern unsigned int* _imp___winmajor_dll; | |
| 232 | −extern unsigned int* _imp___winminor_dll; | |
| 233 | − | |
| 234 | −#define _osver (*_imp___osver_dll) | |
| 235 | −#define _winver (*_imp___winver_dll) | |
| 236 | −#define _winmajor (*_imp___winmajor_dll) | |
| 237 | −#define _winminor (*_imp___winminor_dll) | |
| 238 | − | |
| 239 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 240 | − | |
| 241 | −__MINGW_IMPORT unsigned int _osver_dll; | |
| 242 | −__MINGW_IMPORT unsigned int _winver_dll; | |
| 243 | −__MINGW_IMPORT unsigned int _winmajor_dll; | |
| 244 | −__MINGW_IMPORT unsigned int _winminor_dll; | |
| 245 | − | |
| 246 | −#define _osver _osver_dll | |
| 247 | −#define _winver _winver_dll | |
| 248 | −#define _winmajor _winmajor_dll | |
| 249 | −#define _winminor _winminor_dll | |
| 250 | − | |
| 251 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 252 | − | |
| 253 | −#endif | |
| 254 | − | |
| 255 | −#if defined __MSVCRT__ | |
| 256 | −/* although the _pgmptr is exported as DATA, | |
| 257 | − * be safe and use the access function __p__pgmptr() to get it. */ | |
| 258 | −char** __p__pgmptr(void); | |
| 259 | −#define _pgmptr (*__p__pgmptr()) | |
| 260 | −wchar_t** __p__wpgmptr(void); | |
| 261 | −#define _wpgmptr (*__p__wpgmptr()) | |
| 262 | −#else /* ! __MSVCRT__ */ | |
| 263 | −# ifndef __DECLSPEC_SUPPORTED | |
| 264 | − extern char** __imp__pgmptr_dll; | |
| 265 | −# define _pgmptr (*__imp__pgmptr_dll) | |
| 266 | −# else /* __DECLSPEC_SUPPORTED */ | |
| 267 | − __MINGW_IMPORT char* _pgmptr_dll; | |
| 268 | −# define _pgmptr _pgmptr_dll | |
| 269 | −# endif /* __DECLSPEC_SUPPORTED */ | |
| 270 | −/* no wide version in CRTDLL */ | |
| 271 | −#endif /* __MSVCRT__ */ | |
| 272 | − | |
| 273 | −#endif /* Not __STRICT_ANSI__ */ | |
| 274 | − | |
| 275 | −#ifdef __GNUC__ | |
| 276 | −#define _ATTRIB_NORETURN __attribute__ ((noreturn)) | |
| 277 | −#else /* Not __GNUC__ */ | |
| 278 | −#define _ATTRIB_NORETURN | |
| 279 | −#endif /* __GNUC__ */ | |
| 280 | − | |
| 281 | −double atof (const char*); | |
| 282 | −int atoi (const char*); | |
| 283 | −long atol (const char*); | |
| 284 | −int _wtoi (const wchar_t *); | |
| 285 | −long _wtol (const wchar_t *); | |
| 286 | − | |
| 287 | −double strtod (const char*, char**); | |
| 288 | −#if !defined __NO_ISOCEXT /* extern stubs in static libmingwex.a */ | |
| 289 | −extern __inline__ float strtof (const char *nptr, char **endptr) | |
| 290 | − { return (strtod (nptr, endptr));} | |
| 291 | −#endif /* __NO_ISOCEXT */ | |
| 128 | + typedef void (__cdecl *_purecall_handler)(void); | |
| 292 | 129 | |
| 293 | −long strtol (const char*, char**, int); | |
| 294 | −unsigned long strtoul (const char*, char**, int); | |
| 130 | + _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler); | |
| 131 | + _CRTIMP _purecall_handler __cdecl _get_purecall_handler(void); | |
| 295 | 132 | |
| 296 | −#ifndef _WSTDLIB_DEFINED | |
| 297 | −/* also declared in wchar.h */ | |
| 298 | −double wcstod (const wchar_t*, wchar_t**); | |
| 299 | −#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ | |
| 300 | −extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr) | |
| 301 | −{ return (wcstod(nptr, endptr)); } | |
| 302 | −#endif /* __NO_ISOCEXT */ | |
| 133 | + typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); | |
| 134 | + _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler); | |
| 135 | + _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void); | |
| 303 | 136 | |
| 304 | −long wcstol (const wchar_t*, wchar_t**, int); | |
| 305 | −unsigned long wcstoul (const wchar_t*, wchar_t**, int); | |
| 306 | −#define _WSTDLIB_DEFINED | |
| 137 | +#ifndef _CRT_ERRNO_DEFINED | |
| 138 | +#define _CRT_ERRNO_DEFINED | |
| 139 | + _CRTIMP extern int *__cdecl _errno(void); | |
| 140 | +#define errno (*_errno()) | |
| 141 | + errno_t __cdecl _set_errno(int _Value); | |
| 142 | + errno_t __cdecl _get_errno(int *_Value); | |
| 143 | +#endif | |
| 144 | + _CRTIMP unsigned long *__cdecl __doserrno(void); | |
| 145 | +#define _doserrno (*__doserrno()) | |
| 146 | + errno_t __cdecl _set_doserrno(unsigned long _Value); | |
| 147 | + errno_t __cdecl _get_doserrno(unsigned long *_Value); | |
| 148 | +#ifdef _MSVCRT_ | |
| 149 | + extern char *_sys_errlist[]; | |
| 150 | + extern int _sys_nerr; | |
| 151 | +#else | |
| 152 | + _CRTIMP char *_sys_errlist[1]; | |
| 153 | + _CRTIMP int _sys_nerr; | |
| 154 | +#endif | |
| 155 | +#if (defined(_X86_) && !defined(__x86_64)) | |
| 156 | + _CRTIMP int *__cdecl __p___argc(void); | |
| 157 | + _CRTIMP char ***__cdecl __p___argv(void); | |
| 158 | + _CRTIMP wchar_t ***__cdecl __p___wargv(void); | |
| 159 | + _CRTIMP char ***__cdecl __p__environ(void); | |
| 160 | + _CRTIMP wchar_t ***__cdecl __p__wenviron(void); | |
| 161 | + _CRTIMP char **__cdecl __p__pgmptr(void); | |
| 162 | + _CRTIMP wchar_t **__cdecl __p__wpgmptr(void); | |
| 163 | +#endif | |
| 164 | +#ifndef __argc | |
| 165 | +#ifdef _MSVCRT_ | |
| 166 | + extern int __argc; | |
| 167 | +#else | |
| 168 | +#define __argc (*_imp____argc) | |
| 169 | + extern int *_imp____argc; | |
| 170 | +#endif | |
| 171 | +#endif | |
| 172 | +#ifndef __argv | |
| 173 | +#ifdef _MSVCRT_ | |
| 174 | + extern char **__argv; | |
| 175 | +#else | |
| 176 | +#define __argv (*_imp____argv) | |
| 177 | + extern char ***_imp____argv; | |
| 178 | +#endif | |
| 179 | +#endif | |
| 180 | +#ifndef __wargv | |
| 181 | +#ifdef _MSVCRT_ | |
| 182 | + extern wchar_t **__wargv; | |
| 183 | +#else | |
| 184 | +#define __wargv (*_imp____wargv) | |
| 185 | + extern wchar_t ***_imp____wargv; | |
| 186 | +#endif | |
| 307 | 187 | #endif |
| 308 | 188 | |
| 309 | −size_t wcstombs (char*, const wchar_t*, size_t); | |
| 310 | −int wctomb (char*, wchar_t); | |
| 311 | − | |
| 312 | −int mblen (const char*, size_t); | |
| 313 | −size_t mbstowcs (wchar_t*, const char*, size_t); | |
| 314 | −int mbtowc (wchar_t*, const char*, size_t); | |
| 189 | +#ifdef _POSIX_ | |
| 190 | + extern char **environ; | |
| 191 | +#else | |
| 192 | +#ifndef _environ | |
| 193 | +#ifdef _MSVCRT_ | |
| 194 | + extern char **_environ; | |
| 195 | +#else | |
| 196 | +#define _environ (*_imp___environ) | |
| 197 | + extern char ***_imp___environ; | |
| 198 | +#endif | |
| 199 | +#endif | |
| 315 | 200 | |
| 316 | −int rand (void); | |
| 317 | −void srand (unsigned int); | |
| 201 | +#ifndef _wenviron | |
| 202 | +#ifdef _MSVCRT_ | |
| 203 | + extern wchar_t **_wenviron; | |
| 204 | +#else | |
| 205 | +#define _wenviron (*_imp___wenviron) | |
| 206 | + extern wchar_t ***_imp___wenviron; | |
| 207 | +#endif | |
| 208 | +#endif | |
| 209 | +#endif | |
| 210 | +#ifndef _pgmptr | |
| 211 | +#ifdef _MSVCRT_ | |
| 212 | + extern char *_pgmptr; | |
| 213 | +#else | |
| 214 | +#define _pgmptr (*_imp___pgmptr) | |
| 215 | + extern char **_imp___pgmptr; | |
| 216 | +#endif | |
| 217 | +#endif | |
| 318 | 218 | |
| 319 | −void* calloc (size_t, size_t); | |
| 320 | −void* malloc (size_t); | |
| 321 | −void* realloc (void*, size_t); | |
| 322 | −void free (void*); | |
| 219 | +#ifndef _wpgmptr | |
| 220 | +#ifdef _MSVCRT_ | |
| 221 | + extern wchar_t *_wpgmptr; | |
| 222 | +#else | |
| 223 | +#define _wpgmptr (*_imp___wpgmptr) | |
| 224 | + extern wchar_t **_imp___wpgmptr; | |
| 225 | +#endif | |
| 226 | +#endif | |
| 227 | + errno_t __cdecl _get_pgmptr(char **_Value); | |
| 228 | + errno_t __cdecl _get_wpgmptr(wchar_t **_Value); | |
| 229 | +#ifndef _fmode | |
| 230 | +#ifdef _MSVCRT_ | |
| 231 | + extern int _fmode; | |
| 232 | +#else | |
| 233 | +#define _fmode (*_imp___fmode) | |
| 234 | + extern int *_imp___fmode; | |
| 235 | +#endif | |
| 236 | +#endif | |
| 237 | + _CRTIMP errno_t __cdecl _set_fmode(int _Mode); | |
| 238 | + _CRTIMP errno_t __cdecl _get_fmode(int *_PMode); | |
| 323 | 239 | |
| 324 | −void abort (void) _ATTRIB_NORETURN; | |
| 325 | −void exit (int) _ATTRIB_NORETURN; | |
| 326 | −int atexit (void (*)(void)); | |
| 240 | +#ifndef _osplatform | |
| 241 | +#ifdef _MSVCRT_ | |
| 242 | + extern unsigned int _osplatform; | |
| 243 | +#else | |
| 244 | +#define _osplatform (*_imp___osplatform) | |
| 245 | + extern unsigned int *_imp___osplatform; | |
| 246 | +#endif | |
| 247 | +#endif | |
| 327 | 248 | |
| 328 | −int system (const char*); | |
| 329 | −char* getenv (const char*); | |
| 249 | +#ifndef _osver | |
| 250 | +#ifdef _MSVCRT_ | |
| 251 | + extern unsigned int _osver; | |
| 252 | +#else | |
| 253 | +#define _osver (*_imp___osver) | |
| 254 | + extern unsigned int *_imp___osver; | |
| 255 | +#endif | |
| 256 | +#endif | |
| 330 | 257 | |
| 331 | −void* bsearch (const void*, const void*, size_t, size_t, | |
| 332 | − int (*)(const void*, const void*)); | |
| 333 | −void qsort (const void*, size_t, size_t, | |
| 334 | − int (*)(const void*, const void*)); | |
| 258 | +#ifndef _winver | |
| 259 | +#ifdef _MSVCRT_ | |
| 260 | + extern unsigned int _winver; | |
| 261 | +#else | |
| 262 | +#define _winver (*_imp___winver) | |
| 263 | + extern unsigned int *_imp___winver; | |
| 264 | +#endif | |
| 265 | +#endif | |
| 335 | 266 | |
| 336 | −int abs (int); | |
| 337 | −long labs (long); | |
| 267 | +#ifndef _winmajor | |
| 268 | +#ifdef _MSVCRT_ | |
| 269 | + extern unsigned int _winmajor; | |
| 270 | +#else | |
| 271 | +#define _winmajor (*_imp___winmajor) | |
| 272 | + extern unsigned int *_imp___winmajor; | |
| 273 | +#endif | |
| 274 | +#endif | |
| 338 | 275 | |
| 339 | −/* | |
| 340 | − * div_t and ldiv_t are structures used to return the results of div and | |
| 341 | − * ldiv. | |
| 342 | − * | |
| 343 | − * NOTE: div and ldiv appear not to work correctly unless | |
| 344 | − * -fno-pcc-struct-return is specified. This is included in the | |
| 345 | − * mingw32 specs file. | |
| 346 | − */ | |
| 347 | −typedef struct { int quot, rem; } div_t; | |
| 348 | −typedef struct { long quot, rem; } ldiv_t; | |
| 276 | +#ifndef _winminor | |
| 277 | +#ifdef _MSVCRT_ | |
| 278 | + extern unsigned int _winminor; | |
| 279 | +#else | |
| 280 | +#define _winminor (*_imp___winminor) | |
| 281 | + extern unsigned int *_imp___winminor; | |
| 282 | +#endif | |
| 283 | +#endif | |
| 349 | 284 | |
| 350 | −div_t div (int, int); | |
| 351 | −ldiv_t ldiv (long, long); | |
| 285 | + errno_t __cdecl _get_osplatform(unsigned int *_Value); | |
| 286 | + errno_t __cdecl _get_osver(unsigned int *_Value); | |
| 287 | + errno_t __cdecl _get_winver(unsigned int *_Value); | |
| 288 | + errno_t __cdecl _get_winmajor(unsigned int *_Value); | |
| 289 | + errno_t __cdecl _get_winminor(unsigned int *_Value); | |
| 290 | +#ifndef _countof | |
| 291 | +#ifndef __cplusplus | |
| 292 | +#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0])) | |
| 293 | +#else | |
| 294 | + extern "C++" { | |
| 295 | + template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; | |
| 296 | +#define _countof(_Array) sizeof(*__countof_helper(_Array)) | |
| 297 | + } | |
| 298 | +#endif | |
| 299 | +#endif | |
| 352 | 300 | |
| 353 | −#ifndef __STRICT_ANSI__ | |
| 301 | +#ifndef _CRT_TERMINATE_DEFINED | |
| 302 | +#define _CRT_TERMINATE_DEFINED | |
| 303 | + void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 304 | + _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN; | |
| 305 | +#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ | |
| 306 | + /* C99 function name */ | |
| 307 | + void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN; | |
| 308 | + __CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status) | |
| 309 | + { _exit(status); } | |
| 310 | +#endif | |
| 354 | 311 | |
| 355 | −/* | |
| 356 | − * NOTE: Officially the three following functions are obsolete. The Win32 API | |
| 357 | − * functions SetErrorMode, Beep and Sleep are their replacements. | |
| 358 | − */ | |
| 359 | −void _beep (unsigned int, unsigned int); | |
| 360 | −void _seterrormode (int); | |
| 361 | −void _sleep (unsigned long); | |
| 312 | +#pragma push_macro("abort") | |
| 313 | +#undef abort | |
| 314 | + void __cdecl __declspec(noreturn) abort(void); | |
| 315 | +#pragma pop_macro("abort") | |
| 362 | 316 | |
| 363 | −void _exit (int) _ATTRIB_NORETURN; | |
| 364 | −#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ | |
| 365 | −/* C99 function name */ | |
| 366 | −void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */ | |
| 367 | −extern __inline__ void _Exit(int status) | |
| 368 | − { _exit(status); } | |
| 369 | 317 | #endif |
| 370 | −/* _onexit is MS extension. Use atexit for portability. */ | |
| 371 | −typedef int (* _onexit_t)(void); | |
| 372 | −_onexit_t _onexit( _onexit_t ); | |
| 373 | 318 | |
| 374 | −int _putenv (const char*); | |
| 375 | −void _searchenv (const char*, const char*, char*); | |
| 319 | + _CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask); | |
| 376 | 320 | |
| 321 | +#ifndef _CRT_ABS_DEFINED | |
| 322 | +#define _CRT_ABS_DEFINED | |
| 323 | + int __cdecl abs(int _X); | |
| 324 | + long __cdecl labs(long _X); | |
| 325 | +#endif | |
| 377 | 326 | |
| 378 | −char* _ecvt (double, int, int*, int*); | |
| 379 | −char* _fcvt (double, int, int*, int*); | |
| 380 | −char* _gcvt (double, int, char*); | |
| 327 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 328 | + __int64 __cdecl _abs64(__int64); | |
| 329 | +#endif | |
| 330 | + int __cdecl atexit(void (__cdecl *)(void)); | |
| 331 | +#ifndef _CRT_ATOF_DEFINED | |
| 332 | +#define _CRT_ATOF_DEFINED | |
| 333 | + double __cdecl atof(const char *_String); | |
| 334 | + double __cdecl _atof_l(const char *_String,_locale_t _Locale); | |
| 335 | +#endif | |
| 336 | + int __cdecl atoi(const char *_Str); | |
| 337 | + _CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale); | |
| 338 | + long __cdecl atol(const char *_Str); | |
| 339 | + _CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale); | |
| 340 | +#ifndef _CRT_ALGO_DEFINED | |
| 341 | +#define _CRT_ALGO_DEFINED | |
| 342 | + void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *)); | |
| 343 | + void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *)); | |
| 344 | +#endif | |
| 345 | + unsigned short __cdecl _byteswap_ushort(unsigned short _Short); | |
| 346 | + /*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */ | |
| 347 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 348 | + unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64); | |
| 349 | +#endif | |
| 350 | + div_t __cdecl div(int _Numerator,int _Denominator); | |
| 351 | + char *__cdecl getenv(const char *_VarName); | |
| 352 | + _CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix); | |
| 353 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 354 | + _CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix); | |
| 355 | + _CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix); | |
| 356 | + _CRTIMP __int64 __cdecl _atoi64(const char *_String); | |
| 357 | + _CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale); | |
| 358 | + _CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix); | |
| 359 | + _CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); | |
| 360 | + _CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix); | |
| 361 | + _CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); | |
| 362 | +#endif | |
| 363 | + ldiv_t __cdecl ldiv(long _Numerator,long _Denominator); | |
| 364 | + _CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix); | |
| 365 | + int __cdecl mblen(const char *_Ch,size_t _MaxCount); | |
| 366 | + _CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale); | |
| 367 | + _CRTIMP size_t __cdecl _mbstrlen(const char *_Str); | |
| 368 | + _CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale); | |
| 369 | + _CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount); | |
| 370 | + _CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale); | |
| 371 | + int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes); | |
| 372 | + _CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale); | |
| 373 | + size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount); | |
| 374 | + _CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale); | |
| 375 | + int __cdecl rand(void); | |
| 376 | + _CRTIMP int __cdecl _set_error_mode(int _Mode); | |
| 377 | + void __cdecl srand(unsigned int _Seed); | |
| 378 | + double __cdecl strtod(const char *_Str,char **_EndPtr); | |
| 379 | + float __cdecl strtof(const char *nptr, char **endptr); | |
| 380 | +#if !defined __NO_ISOCEXT /* in libmingwex.a */ | |
| 381 | + float __cdecl strtof (const char * __restrict__, char ** __restrict__); | |
| 382 | + long double __cdecl strtold(const char * __restrict__, char ** __restrict__); | |
| 383 | +#endif /* __NO_ISOCEXT */ | |
| 384 | + _CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale); | |
| 385 | + long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix); | |
| 386 | + _CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale); | |
| 387 | + unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix); | |
| 388 | + _CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale); | |
| 389 | +#ifndef _CRT_SYSTEM_DEFINED | |
| 390 | +#define _CRT_SYSTEM_DEFINED | |
| 391 | + int __cdecl system(const char *_Command); | |
| 392 | +#endif | |
| 393 | + _CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix); | |
| 394 | + int __cdecl wctomb(char *_MbCh,wchar_t _WCh); | |
| 395 | + _CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale); | |
| 396 | + size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount); | |
| 397 | + _CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale); | |
| 398 | + | |
| 399 | +#ifndef _CRT_ALLOCATION_DEFINED | |
| 400 | +#define _CRT_ALLOCATION_DEFINED | |
| 401 | + void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); | |
| 402 | + void __cdecl free(void *_Memory); | |
| 403 | + void *__cdecl malloc(size_t _Size); | |
| 404 | + void *__cdecl realloc(void *_Memory,size_t _NewSize); | |
| 405 | + _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size); | |
| 406 | + //_CRTIMP void __cdecl _aligned_free(void *_Memory); | |
| 407 | + //_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); | |
| 408 | + _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); | |
| 409 | + _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); | |
| 410 | + _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); | |
| 411 | + _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); | |
| 412 | + _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); | |
| 413 | +#endif | |
| 381 | 414 | |
| 382 | −void _makepath (char*, const char*, const char*, const char*, const char*); | |
| 383 | −void _splitpath (const char*, char*, char*, char*, char*); | |
| 384 | −char* _fullpath (char*, const char*, size_t); | |
| 415 | +#ifndef _WSTDLIB_DEFINED | |
| 416 | +#define _WSTDLIB_DEFINED | |
| 385 | 417 | |
| 418 | + _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix); | |
| 419 | + _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix); | |
| 420 | + _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix); | |
| 421 | + double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr); | |
| 422 | + float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr); | |
| 423 | +#if !defined __NO_ISOCEXT /* in libmingwex.a */ | |
| 424 | + float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__); | |
| 425 | + long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); | |
| 426 | +#endif /* __NO_ISOCEXT */ | |
| 427 | + _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale); | |
| 428 | + long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 429 | + _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 430 | + unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 431 | + _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 432 | + _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName); | |
| 433 | +#ifndef _CRT_WSYSTEM_DEFINED | |
| 434 | +#define _CRT_WSYSTEM_DEFINED | |
| 435 | + _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); | |
| 436 | +#endif | |
| 437 | + _CRTIMP double __cdecl _wtof(const wchar_t *_Str); | |
| 438 | + _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale); | |
| 439 | + _CRTIMP int __cdecl _wtoi(const wchar_t *_Str); | |
| 440 | + _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale); | |
| 441 | + _CRTIMP long __cdecl _wtol(const wchar_t *_Str); | |
| 442 | + _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale); | |
| 443 | + | |
| 444 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 445 | + _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix); | |
| 446 | + _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix); | |
| 447 | + _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str); | |
| 448 | + _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale); | |
| 449 | + _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 450 | + _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 451 | + _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 452 | + _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 453 | +#endif | |
| 454 | +#endif | |
| 386 | 455 | |
| 387 | −char* _itoa (int, char*, int); | |
| 388 | −char* _ltoa (long, char*, int); | |
| 389 | −char* _ultoa(unsigned long, char*, int); | |
| 390 | −wchar_t* _itow (int, wchar_t*, int); | |
| 391 | −wchar_t* _ltow (long, wchar_t*, int); | |
| 392 | −wchar_t* _ultow (unsigned long, wchar_t*, int); | |
| 456 | +#ifndef _POSIX_ | |
| 457 | +#define _CVTBUFSIZE (309+40) | |
| 458 | + _CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes); | |
| 459 | + _CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign); | |
| 460 | + _CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); | |
| 461 | + _CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf); | |
| 462 | + _CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str); | |
| 463 | + _CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str); | |
| 464 | + _CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str); | |
| 465 | + _CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale); | |
| 466 | + _CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale); | |
| 467 | + _CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale); | |
| 468 | + unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift); | |
| 469 | + unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift); | |
| 470 | + _CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); | |
| 471 | + _onexit_t __cdecl _onexit(_onexit_t _Func); | |
| 472 | + | |
| 473 | +#ifndef _CRT_PERROR_DEFINED | |
| 474 | +#define _CRT_PERROR_DEFINED | |
| 475 | + void __cdecl perror(const char *_ErrMsg); | |
| 476 | +#endif | |
| 477 | + _CRTIMP int __cdecl _putenv(const char *_EnvString); | |
| 478 | + unsigned int __cdecl _rotl(unsigned int _Val,int _Shift); | |
| 479 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 480 | + unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift); | |
| 481 | +#endif | |
| 482 | + unsigned int __cdecl _rotr(unsigned int _Val,int _Shift); | |
| 483 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 484 | + unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift); | |
| 485 | +#endif | |
| 486 | + _CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath); | |
| 487 | + _CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext); | |
| 488 | + _CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes); | |
| 489 | + | |
| 490 | +#ifndef _WSTDLIBP_DEFINED | |
| 491 | +#define _WSTDLIBP_DEFINED | |
| 492 | + _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); | |
| 493 | + _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); | |
| 494 | +#ifndef _CRT_WPERROR_DEFINED | |
| 495 | +#define _CRT_WPERROR_DEFINED | |
| 496 | + _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); | |
| 497 | +#endif | |
| 498 | + _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString); | |
| 499 | + _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath); | |
| 500 | + _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext); | |
| 501 | +#endif | |
| 393 | 502 | |
| 394 | −#ifdef __MSVCRT__ | |
| 395 | −__int64 _atoi64(const char *); | |
| 396 | −char* _i64toa(__int64, char *, int); | |
| 397 | −char* _ui64toa(unsigned __int64, char *, int); | |
| 398 | −__int64 _wtoi64(const wchar_t *); | |
| 399 | −wchar_t* _i64tow(__int64, wchar_t *, int); | |
| 400 | −wchar_t* _ui64tow(unsigned __int64, wchar_t *, int); | |
| 503 | + _CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED; | |
| 504 | + /* Not to be confused with _set_error_mode (int). */ | |
| 505 | + _CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED; | |
| 506 | + _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED; | |
| 507 | +#endif | |
| 401 | 508 | |
| 402 | −wchar_t* _wgetenv(const wchar_t*); | |
| 403 | −int _wputenv(const wchar_t*); | |
| 404 | −void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); | |
| 405 | −void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); | |
| 406 | −void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); | |
| 407 | −wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t); | |
| 509 | +#ifndef NO_OLDNAMES | |
| 510 | +#ifndef _POSIX_ | |
| 511 | +#if 0 | |
| 512 | +#ifndef __cplusplus | |
| 513 | +#ifndef NOMINMAX | |
| 514 | +#ifndef max | |
| 515 | +#define max(a,b) (((a) > (b)) ? (a) : (b)) | |
| 516 | +#endif | |
| 517 | +#ifndef min | |
| 518 | +#define min(a,b) (((a) < (b)) ? (a) : (b)) | |
| 519 | +#endif | |
| 520 | +#endif | |
| 521 | +#endif | |
| 408 | 522 | #endif |
| 409 | 523 | |
| 410 | −#ifndef _NO_OLDNAMES | |
| 524 | +#define sys_errlist _sys_errlist | |
| 525 | +#define sys_nerr _sys_nerr | |
| 526 | +#define environ _environ | |
| 527 | + char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign); | |
| 528 | + char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); | |
| 529 | + char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf); | |
| 530 | + char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix); | |
| 531 | + char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix); | |
| 532 | + int __cdecl putenv(const char *_EnvString); | |
| 533 | + void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes); | |
| 534 | + char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix); | |
| 535 | + onexit_t __cdecl onexit(onexit_t _Func); | |
| 536 | +#endif | |
| 537 | +#endif | |
| 411 | 538 | |
| 412 | −int putenv (const char*); | |
| 413 | −void searchenv (const char*, const char*, char*); | |
| 539 | +#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */ | |
| 414 | 540 | |
| 415 | −char* itoa (int, char*, int); | |
| 416 | −char* ltoa (long, char*, int); | |
| 541 | + typedef struct { long long quot, rem; } lldiv_t; | |
| 417 | 542 | |
| 418 | −#ifndef _UWIN | |
| 419 | −char* ecvt (double, int, int*, int*); | |
| 420 | −char* fcvt (double, int, int*, int*); | |
| 421 | −char* gcvt (double, int, char*); | |
| 422 | −#endif /* _UWIN */ | |
| 423 | −#endif /* Not _NO_OLDNAMES */ | |
| 543 | + lldiv_t __cdecl lldiv(long long, long long); | |
| 424 | 544 | |
| 425 | −#endif /* Not __STRICT_ANSI__ */ | |
| 545 | + __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); } | |
| 426 | 546 | |
| 427 | −/* C99 names */ | |
| 547 | + long long __cdecl strtoll(const char* __restrict__, char** __restrict, int); | |
| 548 | + unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int); | |
| 428 | 549 | |
| 429 | −#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */ | |
| 550 | + /* these are stubs for MS _i64 versions */ | |
| 551 | + long long __cdecl atoll (const char *); | |
| 430 | 552 | |
| 431 | −typedef struct { long long quot, rem; } lldiv_t; | |
| 432 | − | |
| 433 | −lldiv_t lldiv (long long, long long); | |
| 434 | − | |
| 435 | −extern __inline__ long long llabs(long long _j) | |
| 436 | − {return (_j >= 0 ? _j : -_j);} | |
| 437 | − | |
| 438 | −long long strtoll (const char* __restrict__, char** __restrict, int); | |
| 439 | −unsigned long long strtoull (const char* __restrict__, char** __restrict__, int); | |
| 440 | − | |
| 441 | −#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */ | |
| 442 | −long long atoll (const char *); | |
| 443 | − | |
| 444 | −#if !defined (__STRICT_ANSI__) | |
| 445 | −long long wtoll(const wchar_t *); | |
| 446 | −char* lltoa(long long, char *, int); | |
| 447 | −char* ulltoa(unsigned long long , char *, int); | |
| 448 | −wchar_t* lltow(long long, wchar_t *, int); | |
| 449 | −wchar_t* ulltow(unsigned long long, wchar_t *, int); | |
| 450 | − | |
| 451 | − /* inline using non-ansi functions */ | |
| 452 | −extern __inline__ long long atoll (const char * _c) | |
| 453 | − { return _atoi64 (_c); } | |
| 454 | −extern __inline__ char* lltoa(long long _n, char * _c, int _i) | |
| 455 | − { return _i64toa (_n, _c, _i); } | |
| 456 | −extern __inline__ char* ulltoa(unsigned long long _n, char * _c, int _i) | |
| 457 | − { return _ui64toa (_n, _c, _i); } | |
| 458 | −extern __inline__ long long wtoll(const wchar_t * _w) | |
| 459 | − { return _wtoi64 (_w); } | |
| 460 | −extern __inline__ wchar_t* lltow(long long _n, wchar_t * _w, int _i) | |
| 461 | − { return _i64tow (_n, _w, _i); } | |
| 462 | −extern __inline__ wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i) | |
| 463 | − { return _ui64tow (_n, _w, _i); } | |
| 553 | +#ifndef __STRICT_ANSI__ | |
| 554 | + long long __cdecl wtoll (const wchar_t *); | |
| 555 | + char *__cdecl lltoa (long long, char *, int); | |
| 556 | + char *__cdecl ulltoa (unsigned long long , char *, int); | |
| 557 | + wchar_t *__cdecl lltow (long long, wchar_t *, int); | |
| 558 | + wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int); | |
| 559 | + | |
| 560 | + /* __CRT_INLINE using non-ansi functions */ | |
| 561 | + __CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); } | |
| 562 | + __CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); } | |
| 563 | + __CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); } | |
| 564 | + __CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); } | |
| 565 | + __CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); } | |
| 566 | + __CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); } | |
| 464 | 567 | #endif /* (__STRICT_ANSI__) */ |
| 465 | 568 | |
| 466 | −#endif /* __MSVCRT__ */ | |
| 467 | − | |
| 468 | 569 | #endif /* !__NO_ISOCEXT */ |
| 469 | 570 | |
| 470 | −/* | |
| 471 | − * Undefine the no return attribute used in some function definitions | |
| 472 | − */ | |
| 473 | −#undef _ATTRIB_NORETURN | |
| 474 | − | |
| 475 | 571 | #ifdef __cplusplus |
| 476 | 572 | } |
| 477 | 573 | #endif |
| 478 | 574 | |
| 479 | −#endif /* Not RC_INVOKED */ | |
| 575 | +#pragma pack(pop) | |
| 480 | 576 | |
| 481 | −#endif /* Not _STDLIB_H_ */ | |
| 577 | +#include <sec_api/stdlib_s.h> | |
| 578 | +#include <malloc.h> | |
| 482 | 579 | |
| 580 | +#endif | |
| @@ -1,206 +1,164 @@ | ||
| 1 | −/* | |
| 2 | − * string.h | |
| 3 | − * | |
| 4 | − * Definitions for memory and string functions. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_STRING | |
| 7 | +#define _INC_STRING | |
| 26 | 8 | |
| 27 | −#ifndef _STRING_H_ | |
| 28 | −#define _STRING_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −/* | |
| 34 | − * Define size_t, wchar_t and NULL | |
| 35 | − */ | |
| 36 | −#define __need_size_t | |
| 37 | −#define __need_wchar_t | |
| 38 | −#define __need_NULL | |
| 39 | −#ifndef RC_INVOKED | |
| 40 | −#include <stddef.h> | |
| 41 | −#endif /* Not RC_INVOKED */ | |
| 42 | − | |
| 43 | −#ifndef RC_INVOKED | |
| 44 | − | |
| 45 | 11 | #ifdef __cplusplus |
| 46 | 12 | extern "C" { |
| 47 | 13 | #endif |
| 48 | 14 | |
| 49 | −/* | |
| 50 | − * Prototypes of the ANSI Standard C library string functions. | |
| 51 | − */ | |
| 52 | −void* memchr (const void*, int, size_t); | |
| 53 | −int memcmp (const void*, const void*, size_t); | |
| 54 | −void* memcpy (void*, const void*, size_t); | |
| 55 | −void* memmove (void*, const void*, size_t); | |
| 56 | −void* memset (void*, int, size_t); | |
| 57 | −char* strcat (char*, const char*); | |
| 58 | −char* strchr (const char*, int); | |
| 59 | −int strcmp (const char*, const char*); | |
| 60 | −int strcoll (const char*, const char*); /* Compare using locale */ | |
| 61 | −char* strcpy (char*, const char*); | |
| 62 | −size_t strcspn (const char*, const char*); | |
| 63 | −char* strerror (int); /* NOTE: NOT an old name wrapper. */ | |
| 64 | −char* _strerror (const char *); | |
| 65 | −size_t strlen (const char*); | |
| 66 | −char* strncat (char*, const char*, size_t); | |
| 67 | −int strncmp (const char*, const char*, size_t); | |
| 68 | −char* strncpy (char*, const char*, size_t); | |
| 69 | −char* strpbrk (const char*, const char*); | |
| 70 | −char* strrchr (const char*, int); | |
| 71 | −size_t strspn (const char*, const char*); | |
| 72 | −char* strstr (const char*, const char*); | |
| 73 | −char* strtok (char*, const char*); | |
| 74 | −size_t strxfrm (char*, const char*, size_t); | |
| 75 | − | |
| 76 | −#ifndef __STRICT_ANSI__ | |
| 77 | −/* | |
| 78 | − * Extra non-ANSI functions provided by the CRTDLL library | |
| 79 | − */ | |
| 80 | −void* _memccpy (void*, const void*, int, size_t); | |
| 81 | −int _memicmp (const void*, const void*, size_t); | |
| 82 | −char* _strdup (const char*); | |
| 83 | −int _strcmpi (const char*, const char*); | |
| 84 | −int _stricmp (const char*, const char*); | |
| 85 | −int _stricoll (const char*, const char*); | |
| 86 | −char* _strlwr (char*); | |
| 87 | −int _strnicmp (const char*, const char*, size_t); | |
| 88 | −char* _strnset (char*, int, size_t); | |
| 89 | −char* _strrev (char*); | |
| 90 | −char* _strset (char*, int); | |
| 91 | −char* _strupr (char*); | |
| 92 | −void _swab (const char*, char*, size_t); | |
| 93 | − | |
| 94 | −/* | |
| 95 | − * Multi-byte character functions | |
| 96 | − */ | |
| 97 | −unsigned char* _mbschr (unsigned char*, unsigned char*); | |
| 98 | −unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t); | |
| 99 | −unsigned char* _mbstok (unsigned char*, unsigned char*); | |
| 100 | − | |
| 101 | −#ifdef __MSVCRT__ | |
| 102 | −int _strncoll(const char*, const char*, size_t); | |
| 103 | −int _strnicoll(const char*, const char*, size_t); | |
| 15 | +#ifndef _NLSCMP_DEFINED | |
| 16 | +#define _NLSCMP_DEFINED | |
| 17 | +#define _NLSCMPERROR 2147483647 | |
| 104 | 18 | #endif |
| 105 | 19 | |
| 106 | −#endif /* Not __STRICT_ANSI__ */ | |
| 107 | − | |
| 108 | −/* | |
| 109 | − * Unicode versions of the standard calls. | |
| 110 | − */ | |
| 111 | −wchar_t* wcscat (wchar_t*, const wchar_t*); | |
| 112 | −wchar_t* wcschr (const wchar_t*, wchar_t); | |
| 113 | −int wcscmp (const wchar_t*, const wchar_t*); | |
| 114 | −int wcscoll (const wchar_t*, const wchar_t*); | |
| 115 | −wchar_t* wcscpy (wchar_t*, const wchar_t*); | |
| 116 | −size_t wcscspn (const wchar_t*, const wchar_t*); | |
| 117 | −/* Note: No wcserror in CRTDLL. */ | |
| 118 | −size_t wcslen (const wchar_t*); | |
| 119 | −wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t); | |
| 120 | −int wcsncmp(const wchar_t*, const wchar_t*, size_t); | |
| 121 | −wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t); | |
| 122 | −wchar_t* wcspbrk(const wchar_t*, const wchar_t*); | |
| 123 | −wchar_t* wcsrchr(const wchar_t*, wchar_t); | |
| 124 | −size_t wcsspn(const wchar_t*, const wchar_t*); | |
| 125 | −wchar_t* wcsstr(const wchar_t*, const wchar_t*); | |
| 126 | −wchar_t* wcstok(wchar_t*, const wchar_t*); | |
| 127 | −size_t wcsxfrm(wchar_t*, const wchar_t*, size_t); | |
| 128 | − | |
| 129 | −#ifndef __STRICT_ANSI__ | |
| 130 | −/* | |
| 131 | − * Unicode versions of non-ANSI functions provided by CRTDLL. | |
| 132 | − */ | |
| 133 | − | |
| 134 | −/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */ | |
| 135 | −#define _wcscmpi _wcsicmp | |
| 136 | − | |
| 137 | −wchar_t* _wcsdup (wchar_t*); | |
| 138 | −int _wcsicmp (const wchar_t*, const wchar_t*); | |
| 139 | −int _wcsicoll (const wchar_t*, const wchar_t*); | |
| 140 | −wchar_t* _wcslwr (wchar_t*); | |
| 141 | −int _wcsnicmp (const wchar_t*, const wchar_t*, size_t); | |
| 142 | −wchar_t* _wcsnset (wchar_t*, wchar_t, size_t); | |
| 143 | −wchar_t* _wcsrev (wchar_t*); | |
| 144 | −wchar_t* _wcsset (wchar_t*, wchar_t); | |
| 145 | −wchar_t* _wcsupr (wchar_t*); | |
| 146 | − | |
| 147 | −#ifdef __MSVCRT__ | |
| 148 | −int _wcsncoll(const wchar_t*, const wchar_t*, size_t); | |
| 149 | −int _wcsnicoll(const wchar_t*, const wchar_t*, size_t); | |
| 20 | +#ifndef NULL | |
| 21 | +#ifdef __cplusplus | |
| 22 | +#define NULL 0 | |
| 23 | +#else | |
| 24 | +#define NULL ((void *)0) | |
| 25 | +#endif | |
| 150 | 26 | #endif |
| 151 | 27 | |
| 28 | +#define _WConst_return _CONST_RETURN | |
| 29 | + | |
| 30 | +#ifndef _CRT_MEMORY_DEFINED | |
| 31 | +#define _CRT_MEMORY_DEFINED | |
| 32 | + _CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount); | |
| 33 | + _CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount); | |
| 34 | + _CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 35 | + _CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale); | |
| 36 | + int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 37 | + void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size); | |
| 38 | + void *__cdecl memset(void *_Dst,int _Val,size_t _Size); | |
| 39 | +#ifndef NO_OLDNAMES | |
| 40 | + void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size); | |
| 41 | + int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size); | |
| 42 | +#endif | |
| 43 | +#endif | |
| 44 | + char *__cdecl _strset(char *_Str,int _Val); | |
| 45 | + char *__cdecl strcpy(char *_Dest,const char *_Source); | |
| 46 | + char *__cdecl strcat(char *_Dest,const char *_Source); | |
| 47 | + int __cdecl strcmp(const char *_Str1,const char *_Str2); | |
| 48 | + size_t __cdecl strlen(const char *_Str); | |
| 49 | +#if 0 | |
| 50 | + size_t __cdecl strnlen(const char *_Str,size_t _MaxCount); | |
| 51 | +#endif | |
| 52 | + void *__cdecl memmove(void *_Dst,const void *_Src,size_t _Size); | |
| 53 | + _CRTIMP char *__cdecl _strdup(const char *_Src); | |
| 54 | + _CONST_RETURN char *__cdecl strchr(const char *_Str,int _Val); | |
| 55 | + _CRTIMP int __cdecl _stricmp(const char *_Str1,const char *_Str2); | |
| 56 | + _CRTIMP int __cdecl _strcmpi(const char *_Str1,const char *_Str2); | |
| 57 | + _CRTIMP int __cdecl _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 58 | + int __cdecl strcoll(const char *_Str1,const char *_Str2); | |
| 59 | + _CRTIMP int __cdecl _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 60 | + _CRTIMP int __cdecl _stricoll(const char *_Str1,const char *_Str2); | |
| 61 | + _CRTIMP int __cdecl _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 62 | + _CRTIMP int __cdecl _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 63 | + _CRTIMP int __cdecl _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 64 | + _CRTIMP int __cdecl _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 65 | + _CRTIMP int __cdecl _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 66 | + size_t __cdecl strcspn(const char *_Str,const char *_Control); | |
| 67 | + _CRTIMP char *__cdecl _strerror(const char *_ErrMsg); | |
| 68 | + char *__cdecl strerror(int); | |
| 69 | + _CRTIMP char *__cdecl _strlwr(char *_String); | |
| 70 | + char *strlwr_l(char *_String,_locale_t _Locale); | |
| 71 | + char *__cdecl strncat(char *_Dest,const char *_Source,size_t _Count); | |
| 72 | + int __cdecl strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 73 | + _CRTIMP int __cdecl _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 74 | + _CRTIMP int __cdecl _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 75 | + char *strncpy(char *_Dest,const char *_Source,size_t _Count); | |
| 76 | + _CRTIMP char *__cdecl _strnset(char *_Str,int _Val,size_t _MaxCount); | |
| 77 | + _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char *_Control); | |
| 78 | + _CONST_RETURN char *__cdecl strrchr(const char *_Str,int _Ch); | |
| 79 | + _CRTIMP char *__cdecl _strrev(char *_Str); | |
| 80 | + size_t __cdecl strspn(const char *_Str,const char *_Control); | |
| 81 | + _CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr); | |
| 82 | + char *__cdecl strtok(char *_Str,const char *_Delim); | |
| 83 | + _CRTIMP char *__cdecl _strupr(char *_String); | |
| 84 | + _CRTIMP char *_strupr_l(char *_String,_locale_t _Locale); | |
| 85 | + size_t __cdecl strxfrm(char *_Dst,const char *_Src,size_t _MaxCount); | |
| 86 | + _CRTIMP size_t __cdecl _strxfrm_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 87 | + | |
| 88 | +#ifndef NO_OLDNAMES | |
| 89 | + char *__cdecl strdup(const char *_Src); | |
| 90 | + int __cdecl strcmpi(const char *_Str1,const char *_Str2); | |
| 91 | + int __cdecl stricmp(const char *_Str1,const char *_Str2); | |
| 92 | + char *__cdecl strlwr(char *_Str); | |
| 93 | + int __cdecl strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount); | |
| 94 | + __CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); } | |
| 95 | + __CRT_INLINE int __cdecl strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); } | |
| 96 | + char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount); | |
| 97 | + char *__cdecl strrev(char *_Str); | |
| 98 | + char *__cdecl strset(char *_Str,int _Val); | |
| 99 | + char *__cdecl strupr(char *_Str); | |
| 100 | +#endif | |
| 152 | 101 | |
| 153 | −#endif /* Not __STRICT_ANSI__ */ | |
| 154 | − | |
| 155 | − | |
| 156 | −#ifndef __STRICT_ANSI__ | |
| 157 | −#ifndef _NO_OLDNAMES | |
| 158 | − | |
| 159 | −/* | |
| 160 | − * Non-underscored versions of non-ANSI functions. They live in liboldnames.a | |
| 161 | − * and provide a little extra portability. Also a few extra UNIX-isms like | |
| 162 | − * strcasecmp. | |
| 163 | − */ | |
| 164 | − | |
| 165 | −void* memccpy (void*, const void*, int, size_t); | |
| 166 | −int memicmp (const void*, const void*, size_t); | |
| 167 | −char* strdup (const char*); | |
| 168 | −int strcmpi (const char*, const char*); | |
| 169 | −int stricmp (const char*, const char*); | |
| 170 | −int strcasecmp (const char*, const char*); | |
| 171 | −int stricoll (const char*, const char*); | |
| 172 | −char* strlwr (char*); | |
| 173 | −int strnicmp (const char*, const char*, size_t); | |
| 174 | −int strncasecmp (const char*, const char*, size_t); | |
| 175 | −char* strnset (char*, int, size_t); | |
| 176 | −char* strrev (char*); | |
| 177 | −char* strset (char*, int); | |
| 178 | −char* strupr (char*); | |
| 179 | −#ifndef _UWIN | |
| 180 | −void swab (const char*, char*, size_t); | |
| 181 | −#endif /* _UWIN */ | |
| 182 | − | |
| 183 | −/* NOTE: There is no _wcscmpi, but this is for compatibility. */ | |
| 184 | −int wcscmpi (const wchar_t*, const wchar_t*); | |
| 185 | −wchar_t* wcsdup (wchar_t*); | |
| 186 | −int wcsicmp (const wchar_t*, const wchar_t*); | |
| 187 | −int wcsicoll (const wchar_t*, const wchar_t*); | |
| 188 | −wchar_t* wcslwr (wchar_t*); | |
| 189 | −int wcsnicmp (const wchar_t*, const wchar_t*, size_t); | |
| 190 | −wchar_t* wcsnset (wchar_t*, wchar_t, size_t); | |
| 191 | −wchar_t* wcsrev (wchar_t*); | |
| 192 | −wchar_t* wcsset (wchar_t*, wchar_t); | |
| 193 | −wchar_t* wcsupr (wchar_t*); | |
| 194 | − | |
| 195 | −#endif /* Not _NO_OLDNAMES */ | |
| 196 | −#endif /* Not strict ANSI */ | |
| 197 | − | |
| 102 | +#ifndef _WSTRING_DEFINED | |
| 103 | +#define _WSTRING_DEFINED | |
| 104 | + | |
| 105 | + _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str); | |
| 106 | + wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source); | |
| 107 | + _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch); | |
| 108 | + int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 109 | + wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source); | |
| 110 | + size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control); | |
| 111 | + size_t __cdecl wcslen(const wchar_t *_Str); | |
| 112 | + size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount); | |
| 113 | + wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count); | |
| 114 | + int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 115 | + wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count); | |
| 116 | + _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control); | |
| 117 | + _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch); | |
| 118 | + size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control); | |
| 119 | + _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr); | |
| 120 | + wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim); | |
| 121 | + _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum); | |
| 122 | + _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str); | |
| 123 | + _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 124 | + _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 125 | + _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 126 | + _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 127 | + _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount); | |
| 128 | + _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str); | |
| 129 | + _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val); | |
| 130 | + _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String); | |
| 131 | + _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale); | |
| 132 | + _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String); | |
| 133 | + _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale); | |
| 134 | + size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount); | |
| 135 | + _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 136 | + int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 137 | + _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 138 | + _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 139 | + _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 140 | + _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 141 | + _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 142 | + _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 143 | + _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 144 | + | |
| 145 | +#ifndef NO_OLDNAMES | |
| 146 | + wchar_t *__cdecl wcsdup(const wchar_t *_Str); | |
| 147 | +#define wcswcs wcsstr | |
| 148 | + int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 149 | + int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 150 | + wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount); | |
| 151 | + wchar_t *__cdecl wcsrev(wchar_t *_Str); | |
| 152 | + wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val); | |
| 153 | + wchar_t *__cdecl wcslwr(wchar_t *_Str); | |
| 154 | + wchar_t *__cdecl wcsupr(wchar_t *_Str); | |
| 155 | + int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 156 | +#endif | |
| 157 | +#endif | |
| 198 | 158 | |
| 199 | 159 | #ifdef __cplusplus |
| 200 | 160 | } |
| 201 | 161 | #endif |
| 202 | 162 | |
| 203 | −#endif /* Not RC_INVOKED */ | |
| 204 | − | |
| 205 | −#endif /* Not _STRING_H_ */ | |
| 206 | − | |
| 163 | +#include <sec_api/string_s.h> | |
| 164 | +#endif | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * This file is part of the Mingw32 package. |
| 3 | 8 | * |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * This file is part of the Mingw32 package. |
| 3 | 8 | * |
| @@ -1,52 +1,30 @@ | ||
| 1 | −/* | |
| 2 | − * locking.h | |
| 3 | − * | |
| 4 | − * Constants for the mode parameter of the locking function. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_LOCKING | |
| 7 | +#define _INC_LOCKING | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 28 | − | |
| 29 | −#ifndef _LOCKING_H_ | |
| 30 | −#define _LOCKING_H_ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 31 | 12 | |
| 32 | 13 | /* All the headers include this file. */ |
| 33 | 14 | #include <_mingw.h> |
| 34 | 15 | |
| 35 | −#define _LK_UNLCK 0 /* Unlock */ | |
| 36 | −#define _LK_LOCK 1 /* Lock */ | |
| 37 | −#define _LK_NBLCK 2 /* Non-blocking lock */ | |
| 38 | −#define _LK_RLCK 3 /* Lock for read only */ | |
| 39 | −#define _LK_NBRLCK 4 /* Non-blocking lock for read only */ | |
| 16 | +#define _LK_UNLCK 0 | |
| 17 | +#define _LK_LOCK 1 | |
| 18 | +#define _LK_NBLCK 2 | |
| 19 | +#define _LK_RLCK 3 | |
| 20 | +#define _LK_NBRLCK 4 | |
| 40 | 21 | |
| 41 | 22 | #ifndef NO_OLDNAMES |
| 42 | −#define LK_UNLCK _LK_UNLCK | |
| 43 | −#define LK_LOCK _LK_LOCK | |
| 44 | −#define LK_NBLCK _LK_NBLCK | |
| 45 | −#define LK_RLCK _LK_RLCK | |
| 46 | −#define LK_NBRLCK _LK_NBRLCK | |
| 47 | −#endif /* Not NO_OLDNAMES */ | |
| 48 | − | |
| 49 | −#endif /* Not _LOCKING_H_ */ | |
| 50 | − | |
| 51 | −#endif /* Not __STRICT_ANSI__ */ | |
| 52 | − | |
| 23 | +#define LK_UNLCK _LK_UNLCK | |
| 24 | +#define LK_LOCK _LK_LOCK | |
| 25 | +#define LK_NBLCK _LK_NBLCK | |
| 26 | +#define LK_RLCK _LK_RLCK | |
| 27 | +#define LK_NBRLCK _LK_NBRLCK | |
| 28 | +#endif | |
| 29 | + | |
| 30 | +#endif | |
| @@ -1,139 +1,106 @@ | ||
| 1 | −/* | |
| 2 | − * stat.h | |
| 3 | − * | |
| 4 | − * Symbolic constants for opening and creating files, also stat, fstat and | |
| 5 | − * chmod functions. | |
| 6 | − * | |
| 7 | − * This file is part of the Mingw32 package. | |
| 8 | − * | |
| 9 | − * Contributors: | |
| 10 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 6 | +#ifndef _INC_STAT | |
| 7 | +#define _INC_STAT | |
| 27 | 8 | |
| 28 | −#ifndef __STRICT_ANSI__ | |
| 29 | − | |
| 30 | −#ifndef _STAT_H_ | |
| 31 | −#define _STAT_H_ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 32 | 12 | |
| 33 | −/* All the headers include this file. */ | |
| 34 | 13 | #include <_mingw.h> |
| 14 | +#include <io.h> | |
| 35 | 15 | |
| 36 | −#define __need_size_t | |
| 37 | −#define __need_wchar_t | |
| 38 | −#ifndef RC_INVOKED | |
| 39 | −#include <stddef.h> | |
| 40 | −#endif /* Not RC_INVOKED */ | |
| 16 | +#pragma pack(push,_CRT_PACKING) | |
| 41 | 17 | |
| 42 | −#include <sys/types.h> | |
| 18 | +#ifdef __cplusplus | |
| 19 | +extern "C" { | |
| 20 | +#endif | |
| 43 | 21 | |
| 44 | −/* | |
| 45 | − * Constants for the stat st_mode member. | |
| 46 | − */ | |
| 47 | −#define _S_IFIFO 0x1000 /* FIFO */ | |
| 48 | −#define _S_IFCHR 0x2000 /* Character */ | |
| 49 | −#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */ | |
| 50 | −#define _S_IFDIR 0x4000 /* Directory */ | |
| 51 | −#define _S_IFREG 0x8000 /* Regular */ | |
| 22 | +#ifndef _CRTIMP | |
| 23 | +#define _CRTIMP __declspec(dllimport) | |
| 24 | +#endif | |
| 52 | 25 | |
| 53 | −#define _S_IFMT 0xF000 /* File type mask */ | |
| 26 | +#include <sys/types.h> | |
| 54 | 27 | |
| 55 | −#define _S_IEXEC 0x0040 | |
| 56 | −#define _S_IWRITE 0x0080 | |
| 57 | −#define _S_IREAD 0x0100 | |
| 28 | +#ifdef _USE_32BIT_TIME_T | |
| 29 | +#ifdef _WIN64 | |
| 30 | +#undef _USE_32BIT_TIME_T | |
| 31 | +#endif | |
| 32 | +#else | |
| 33 | +#if _INTEGRAL_MAX_BITS < 64 | |
| 34 | +#define _USE_32BIT_TIME_T | |
| 35 | +#endif | |
| 36 | +#endif | |
| 58 | 37 | |
| 59 | −#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC) | |
| 60 | −#define _S_IXUSR _S_IEXEC | |
| 61 | −#define _S_IWUSR _S_IWRITE | |
| 62 | −#define _S_IRUSR _S_IREAD | |
| 38 | +#ifndef _TIME32_T_DEFINED | |
| 39 | + typedef long __time32_t; | |
| 40 | +#define _TIME32_T_DEFINED | |
| 41 | +#endif | |
| 63 | 42 | |
| 64 | −#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) | |
| 65 | −#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO) | |
| 66 | −#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR) | |
| 67 | −#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK) | |
| 68 | −#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) | |
| 43 | +#ifndef _TIME64_T_DEFINED | |
| 44 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 45 | + typedef __int64 __time64_t; | |
| 46 | +#endif | |
| 47 | +#define _TIME64_T_DEFINED | |
| 48 | +#endif | |
| 69 | 49 | |
| 70 | −#ifndef _NO_OLDNAMES | |
| 50 | +#ifndef _TIME_T_DEFINED | |
| 51 | +#ifdef _USE_32BIT_TIME_T | |
| 52 | + typedef __time32_t time_t; | |
| 53 | +#else | |
| 54 | + typedef __time64_t time_t; | |
| 55 | +#endif | |
| 56 | +#define _TIME_T_DEFINED | |
| 57 | +#endif | |
| 71 | 58 | |
| 72 | −#define S_IFIFO _S_IFIFO | |
| 73 | −#define S_IFCHR _S_IFCHR | |
| 74 | −#define S_IFBLK _S_IFBLK | |
| 75 | −#define S_IFDIR _S_IFDIR | |
| 76 | −#define S_IFREG _S_IFREG | |
| 77 | −#define S_IFMT _S_IFMT | |
| 78 | −#define S_IEXEC _S_IEXEC | |
| 79 | −#define S_IWRITE _S_IWRITE | |
| 80 | −#define S_IREAD _S_IREAD | |
| 81 | −#define S_IRWXU _S_IRWXU | |
| 82 | −#define S_IXUSR _S_IXUSR | |
| 83 | −#define S_IWUSR _S_IWUSR | |
| 84 | −#define S_IRUSR _S_IRUSR | |
| 59 | +#ifndef _WCHAR_T_DEFINED | |
| 60 | + typedef unsigned short wchar_t; | |
| 61 | +#define _WCHAR_T_DEFINED | |
| 62 | +#endif | |
| 85 | 63 | |
| 86 | −#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | |
| 87 | −#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | |
| 88 | −#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | |
| 89 | −#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | |
| 90 | −#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | |
| 64 | +#ifndef _STAT_DEFINED | |
| 91 | 65 | |
| 92 | −#endif /* Not _NO_OLDNAMES */ | |
| 66 | +#ifdef _USE_32BIT_TIME_T | |
| 67 | +#ifndef _WIN64 | |
| 68 | +#define _fstat32 _fstat | |
| 69 | +#define _stat32 _stat | |
| 70 | +#define _wstat32 _wstat | |
| 71 | +#else | |
| 72 | +#define _fstat _fstat32 | |
| 73 | +#define _stat _stat32 | |
| 74 | +#define _wstat _wstat32 | |
| 75 | +#endif | |
| 76 | +#define _fstati64 _fstat32i64 | |
| 77 | +#define _stati64 _stat32i64 | |
| 78 | +#define _wstati64 _wstat32i64 | |
| 79 | +#else | |
| 80 | +#define _fstat _fstat64i32 | |
| 81 | +#define _fstati64 _fstat64 | |
| 82 | +#define _stat _stat64i32 | |
| 83 | +#define _stati64 _stat64 | |
| 84 | +#define _wstat _wstat64i32 | |
| 85 | +#define _wstati64 _wstat64 | |
| 86 | +#endif | |
| 93 | 87 | |
| 94 | −#ifndef RC_INVOKED | |
| 88 | + struct _stat32 { | |
| 89 | + _dev_t st_dev; | |
| 90 | + _ino_t st_ino; | |
| 91 | + unsigned short st_mode; | |
| 92 | + short st_nlink; | |
| 93 | + short st_uid; | |
| 94 | + short st_gid; | |
| 95 | + _dev_t st_rdev; | |
| 96 | + _off_t st_size; | |
| 97 | + __time32_t st_atime; | |
| 98 | + __time32_t st_mtime; | |
| 99 | + __time32_t st_ctime; | |
| 100 | + }; | |
| 95 | 101 | |
| 96 | −#ifndef _STAT_DEFINED | |
| 97 | −/* | |
| 98 | − * The structure manipulated and returned by stat and fstat. | |
| 99 | − * | |
| 100 | − * NOTE: If called on a directory the values in the time fields are not only | |
| 101 | − * invalid, they will cause localtime et. al. to return NULL. And calling | |
| 102 | − * asctime with a NULL pointer causes an Invalid Page Fault. So watch it! | |
| 103 | − */ | |
| 104 | −struct _stat | |
| 105 | −{ | |
| 106 | − _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ | |
| 107 | − _ino_t st_ino; /* Always zero ? */ | |
| 108 | − _mode_t st_mode; /* See above constants */ | |
| 109 | − short st_nlink; /* Number of links. */ | |
| 110 | − short st_uid; /* User: Maybe significant on NT ? */ | |
| 111 | − short st_gid; /* Group: Ditto */ | |
| 112 | − _dev_t st_rdev; /* Seems useless (not even filled in) */ | |
| 113 | − _off_t st_size; /* File size in bytes */ | |
| 114 | − time_t st_atime; /* Accessed date (always 00:00 hrs local | |
| 115 | − * on FAT) */ | |
| 116 | − time_t st_mtime; /* Modified time */ | |
| 117 | − time_t st_ctime; /* Creation time */ | |
| 118 | −}; | |
| 119 | − | |
| 120 | −struct stat | |
| 121 | −{ | |
| 122 | − _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ | |
| 123 | − _ino_t st_ino; /* Always zero ? */ | |
| 124 | − _mode_t st_mode; /* See above constants */ | |
| 125 | − short st_nlink; /* Number of links. */ | |
| 126 | − short st_uid; /* User: Maybe significant on NT ? */ | |
| 127 | − short st_gid; /* Group: Ditto */ | |
| 128 | − _dev_t st_rdev; /* Seems useless (not even filled in) */ | |
| 129 | − _off_t st_size; /* File size in bytes */ | |
| 130 | − time_t st_atime; /* Accessed date (always 00:00 hrs local | |
| 131 | − * on FAT) */ | |
| 132 | − time_t st_mtime; /* Modified time */ | |
| 133 | − time_t st_ctime; /* Creation time */ | |
| 134 | −}; | |
| 135 | −#if defined (__MSVCRT__) | |
| 136 | −struct _stati64 { | |
| 102 | +#ifndef NO_OLDNAMES | |
| 103 | + struct stat { | |
| 137 | 104 | _dev_t st_dev; |
| 138 | 105 | _ino_t st_ino; |
| 139 | 106 | unsigned short st_mode; |
| @@ -141,50 +108,181 @@ struct _stati64 { · 1 unmodified line | ||
| 141 | 108 | short st_uid; |
| 142 | 109 | short st_gid; |
| 143 | 110 | _dev_t st_rdev; |
| 144 | − __int64 st_size; | |
| 111 | + _off_t st_size; | |
| 145 | 112 | time_t st_atime; |
| 146 | 113 | time_t st_mtime; |
| 147 | 114 | time_t st_ctime; |
| 148 | −}; | |
| 149 | −#endif /* __MSVCRT__ */ | |
| 150 | −#define _STAT_DEFINED | |
| 151 | −#endif /* _STAT_DEFINED */ | |
| 115 | + }; | |
| 116 | +#endif | |
| 152 | 117 | |
| 153 | −#ifdef __cplusplus | |
| 154 | −extern "C" { | |
| 118 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 119 | + struct _stat32i64 { | |
| 120 | + _dev_t st_dev; | |
| 121 | + _ino_t st_ino; | |
| 122 | + unsigned short st_mode; | |
| 123 | + short st_nlink; | |
| 124 | + short st_uid; | |
| 125 | + short st_gid; | |
| 126 | + _dev_t st_rdev; | |
| 127 | + __int64 st_size; | |
| 128 | + __time32_t st_atime; | |
| 129 | + __time32_t st_mtime; | |
| 130 | + __time32_t st_ctime; | |
| 131 | + }; | |
| 132 | + | |
| 133 | + struct _stat64i32 { | |
| 134 | + _dev_t st_dev; | |
| 135 | + _ino_t st_ino; | |
| 136 | + unsigned short st_mode; | |
| 137 | + short st_nlink; | |
| 138 | + short st_uid; | |
| 139 | + short st_gid; | |
| 140 | + _dev_t st_rdev; | |
| 141 | + _off_t st_size; | |
| 142 | + __time64_t st_atime; | |
| 143 | + __time64_t st_mtime; | |
| 144 | + __time64_t st_ctime; | |
| 145 | + }; | |
| 146 | + | |
| 147 | + struct _stat64 { | |
| 148 | + _dev_t st_dev; | |
| 149 | + _ino_t st_ino; | |
| 150 | + unsigned short st_mode; | |
| 151 | + short st_nlink; | |
| 152 | + short st_uid; | |
| 153 | + short st_gid; | |
| 154 | + _dev_t st_rdev; | |
| 155 | + __int64 st_size; | |
| 156 | + __time64_t st_atime; | |
| 157 | + __time64_t st_mtime; | |
| 158 | + __time64_t st_ctime; | |
| 159 | + }; | |
| 160 | +#endif | |
| 161 | + | |
| 162 | +#define __stat64 _stat64 | |
| 163 | + | |
| 164 | +#define _STAT_DEFINED | |
| 155 | 165 | #endif |
| 156 | 166 | |
| 157 | −int _fstat (int, struct _stat*); | |
| 158 | −int _chmod (const char*, int); | |
| 159 | −int _stat (const char*, struct _stat*); | |
| 167 | +#define _S_IFMT 0xF000 | |
| 168 | +#define _S_IFDIR 0x4000 | |
| 169 | +#define _S_IFCHR 0x2000 | |
| 170 | +#define _S_IFIFO 0x1000 | |
| 171 | +#define _S_IFREG 0x8000 | |
| 172 | +#define _S_IREAD 0x0100 | |
| 173 | +#define _S_IWRITE 0x0080 | |
| 174 | +#define _S_IEXEC 0x0040 | |
| 175 | + | |
| 176 | + _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat); | |
| 177 | + _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat); | |
| 178 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 179 | + _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat); | |
| 180 | + _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat); | |
| 181 | + int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat); | |
| 182 | + __CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat) | |
| 183 | + { | |
| 184 | + struct _stat64 st; | |
| 185 | + int ret=_fstat64(_FileDes,&st); | |
| 186 | + _Stat->st_dev=st.st_dev; | |
| 187 | + _Stat->st_ino=st.st_ino; | |
| 188 | + _Stat->st_mode=st.st_mode; | |
| 189 | + _Stat->st_nlink=st.st_nlink; | |
| 190 | + _Stat->st_uid=st.st_uid; | |
| 191 | + _Stat->st_gid=st.st_gid; | |
| 192 | + _Stat->st_rdev=st.st_rdev; | |
| 193 | + _Stat->st_size=(_off_t) st.st_size; | |
| 194 | + _Stat->st_atime=st.st_atime; | |
| 195 | + _Stat->st_mtime=st.st_mtime; | |
| 196 | + _Stat->st_ctime=st.st_ctime; | |
| 197 | + return ret; | |
| 198 | + } | |
| 199 | + _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat); | |
| 200 | + _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat); | |
| 201 | + int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat); | |
| 202 | + __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat) | |
| 203 | + { | |
| 204 | + struct _stat64 st; | |
| 205 | + int ret=_stat64(_Name,&st); | |
| 206 | + _Stat->st_dev=st.st_dev; | |
| 207 | + _Stat->st_ino=st.st_ino; | |
| 208 | + _Stat->st_mode=st.st_mode; | |
| 209 | + _Stat->st_nlink=st.st_nlink; | |
| 210 | + _Stat->st_uid=st.st_uid; | |
| 211 | + _Stat->st_gid=st.st_gid; | |
| 212 | + _Stat->st_rdev=st.st_rdev; | |
| 213 | + _Stat->st_size=(_off_t) st.st_size; | |
| 214 | + _Stat->st_atime=st.st_atime; | |
| 215 | + _Stat->st_mtime=st.st_mtime; | |
| 216 | + _Stat->st_ctime=st.st_ctime; | |
| 217 | + return ret; | |
| 218 | + } | |
| 219 | +#endif | |
| 160 | 220 | |
| 161 | −#if defined (__MSVCRT__) | |
| 162 | −int _fstati64(int, struct _stati64 *); | |
| 163 | −int _stati64(const char *, struct _stati64 *); | |
| 164 | −#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */ | |
| 165 | −int _wstat(const wchar_t*, struct _stat*); | |
| 166 | −int _wstati64 (const wchar_t*, struct _stati64*); | |
| 221 | +#ifndef _WSTAT_DEFINED | |
| 167 | 222 | #define _WSTAT_DEFINED |
| 168 | −#endif /* _WSTAT_DEFIND */ | |
| 169 | −#endif /* __MSVCRT__ */ | |
| 223 | + _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat); | |
| 224 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 225 | + _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat); | |
| 226 | + int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat); | |
| 227 | + _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat); | |
| 228 | +#endif | |
| 229 | +#endif | |
| 170 | 230 | |
| 171 | −#ifndef _NO_OLDNAMES | |
| 231 | +#ifndef NO_OLDNAMES | |
| 232 | +#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */ | |
| 172 | 233 | |
| 173 | −/* These functions live in liboldnames.a. */ | |
| 174 | −int fstat (int, struct stat*); | |
| 175 | −int chmod (const char*, int); | |
| 176 | −int stat (const char*, struct stat*); | |
| 234 | +#define S_IFMT _S_IFMT | |
| 235 | +#define S_IFDIR _S_IFDIR | |
| 236 | +#define S_IFCHR _S_IFCHR | |
| 237 | +#define S_IFREG _S_IFREG | |
| 238 | +#define S_IREAD _S_IREAD | |
| 239 | +#define S_IWRITE _S_IWRITE | |
| 240 | +#define S_IEXEC _S_IEXEC | |
| 241 | +#define S_IFIFO _S_IFIFO | |
| 242 | +#define S_IFBLK _S_IFBLK | |
| 177 | 243 | |
| 178 | −#endif /* Not _NO_OLDNAMES */ | |
| 244 | +#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC) | |
| 245 | +#define _S_IXUSR _S_IEXEC | |
| 246 | +#define _S_IWUSR _S_IWRITE | |
| 179 | 247 | |
| 248 | +#define S_IRWXU _S_IRWXU | |
| 249 | +#define S_IXUSR _S_IXUSR | |
| 250 | +#define S_IWUSR _S_IWUSR | |
| 251 | +#define S_IRUSR _S_IRUSR | |
| 252 | +#define _S_IRUSR _S_IREAD | |
| 180 | 253 | |
| 181 | −#ifdef __cplusplus | |
| 182 | −} | |
| 183 | −#endif | |
| 254 | +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | |
| 255 | +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | |
| 256 | +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | |
| 257 | +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | |
| 258 | +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | |
| 184 | 259 | |
| 185 | −#endif /* Not RC_INVOKED */ | |
| 260 | +#endif | |
| 186 | 261 | |
| 187 | −#endif /* Not _STAT_H_ */ | |
| 262 | +#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES) | |
| 263 | +int __cdecl stat(const char *_Filename,struct stat *_Stat); | |
| 264 | +int __cdecl fstat(int _Desc,struct stat *_Stat); | |
| 265 | +int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat); | |
| 266 | +#ifdef _USE_32BIT_TIME_T | |
| 267 | +__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) { | |
| 268 | + return _fstat32(_Desc,(struct _stat32 *)_Stat); | |
| 269 | +} | |
| 270 | +__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) { | |
| 271 | + return _stat32(_Filename,(struct _stat32 *)_Stat); | |
| 272 | +} | |
| 273 | +#else | |
| 274 | +__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) { | |
| 275 | + return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat); | |
| 276 | +} | |
| 277 | +__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) { | |
| 278 | + return _stat64i32(_Filename,(struct _stat64i32 *)_Stat); | |
| 279 | +} | |
| 280 | +#endif | |
| 281 | +#endif | |
| 188 | 282 | |
| 189 | −#endif /* Not __STRICT_ANSI__ */ | |
| 283 | +#ifdef __cplusplus | |
| 284 | +} | |
| 285 | +#endif | |
| 190 | 286 | |
| 287 | +#pragma pack(pop) | |
| 288 | +#endif | |
| @@ -1,3 +1,69 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#ifndef _SYS_TIME_H_ | |
| 8 | +#define _SYS_TIME_H_ | |
| 1 | 9 | |
| 2 | 10 | #include <time.h> |
| 3 | 11 | |
| 12 | +#ifdef __cplusplus | |
| 13 | +extern "C" { | |
| 14 | +#endif | |
| 15 | + | |
| 16 | +#ifndef __STRICT_ANSI__ | |
| 17 | +#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */ | |
| 18 | +#define _TIMEVAL_DEFINED | |
| 19 | +struct timeval { | |
| 20 | + long tv_sec; | |
| 21 | + long tv_usec; | |
| 22 | +}; | |
| 23 | +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) | |
| 24 | +#define timercmp(tvp, uvp, cmp) \ | |
| 25 | + (((tvp)->tv_sec != (uvp)->tv_sec) ? \ | |
| 26 | + ((tvp)->tv_sec cmp (uvp)->tv_sec) : \ | |
| 27 | + ((tvp)->tv_usec cmp (uvp)->tv_usec)) | |
| 28 | +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 | |
| 29 | +#endif /* _TIMEVAL_DEFINED */ | |
| 30 | + | |
| 31 | +#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */ | |
| 32 | +#define _TIMEZONE_DEFINED | |
| 33 | +/* Provided for compatibility with code that assumes that | |
| 34 | + the presence of gettimeofday function implies a definition | |
| 35 | + of struct timezone. */ | |
| 36 | +struct timezone | |
| 37 | +{ | |
| 38 | + int tz_minuteswest; /* of Greenwich */ | |
| 39 | + int tz_dsttime; /* type of dst correction to apply */ | |
| 40 | +}; | |
| 41 | + | |
| 42 | + extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z); | |
| 43 | + | |
| 44 | +#endif | |
| 45 | + | |
| 46 | +/* | |
| 47 | + Implementation as per: | |
| 48 | + The Open Group Base Specifications, Issue 6 | |
| 49 | + IEEE Std 1003.1, 2004 Edition | |
| 50 | + | |
| 51 | + The timezone pointer arg is ignored. Errors are ignored. | |
| 52 | +*/ | |
| 53 | +#ifndef _GETTIMEOFDAY_DEFINED | |
| 54 | +#define _GETTIMEOFDAY_DEFINED | |
| 55 | +int __cdecl gettimeofday(struct timeval *__restrict__, | |
| 56 | + void *__restrict__ /* tzp (unused) */); | |
| 57 | +#endif | |
| 58 | + | |
| 59 | +#endif /* __STRICT_ANSI__ */ | |
| 60 | + | |
| 61 | +#ifdef __cplusplus | |
| 62 | +} | |
| 63 | +#endif | |
| 64 | + | |
| 65 | +/* Adding timespec definition. */ | |
| 66 | +#include <sys/timeb.h> | |
| 67 | + | |
| 68 | + | |
| 69 | +#endif /* _SYS_TIME_H_ */ | |
| @@ -1,82 +1,130 @@ | ||
| 1 | −/* | |
| 2 | − * timeb.h | |
| 3 | − * | |
| 4 | − * Support for the UNIX System V ftime system call. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _TIMEB_H_ | |
| 7 | +#define _TIMEB_H_ | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 9 | +#include <_mingw.h> | |
| 28 | 10 | |
| 29 | −#ifndef _TIMEB_H_ | |
| 30 | −#define _TIMEB_H_ | |
| 11 | +#ifndef _WIN32 | |
| 12 | +#error Only Win32 target is supported! | |
| 13 | +#endif | |
| 31 | 14 | |
| 32 | −/* All the headers include this file. */ | |
| 33 | −#include <_mingw.h> | |
| 15 | +#pragma pack(push,_CRT_PACKING) | |
| 34 | 16 | |
| 35 | −#ifndef RC_INVOKED | |
| 17 | +#ifdef __cplusplus | |
| 18 | +extern "C" { | |
| 19 | +#endif | |
| 36 | 20 | |
| 37 | −/* | |
| 38 | − * TODO: Structure not tested. | |
| 39 | − */ | |
| 40 | −struct _timeb | |
| 41 | −{ | |
| 42 | − long time; | |
| 43 | − short millitm; | |
| 44 | − short timezone; | |
| 45 | − short dstflag; | |
| 46 | −}; | |
| 21 | +#ifndef _CRTIMP | |
| 22 | +#define _CRTIMP __declspec(dllimport) | |
| 23 | +#endif | |
| 47 | 24 | |
| 48 | −#ifndef _NO_OLDNAMES | |
| 49 | −/* | |
| 50 | − * TODO: Structure not tested. | |
| 51 | − */ | |
| 52 | −struct timeb | |
| 53 | −{ | |
| 54 | − long time; | |
| 55 | − short millitm; | |
| 56 | − short timezone; | |
| 57 | − short dstflag; | |
| 58 | −}; | |
| 25 | +#ifdef _USE_32BIT_TIME_T | |
| 26 | +#ifdef _WIN64 | |
| 27 | +#undef _USE_32BIT_TIME_T | |
| 28 | +#endif | |
| 29 | +#else | |
| 30 | +#if _INTEGRAL_MAX_BITS < 64 | |
| 31 | +#define _USE_32BIT_TIME_T | |
| 32 | +#endif | |
| 59 | 33 | #endif |
| 60 | 34 | |
| 35 | +#ifndef _TIME32_T_DEFINED | |
| 36 | + typedef long __time32_t; | |
| 37 | +#define _TIME32_T_DEFINED | |
| 38 | +#endif | |
| 61 | 39 | |
| 62 | −#ifdef __cplusplus | |
| 63 | −extern "C" { | |
| 40 | +#ifndef _TIME64_T_DEFINED | |
| 41 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 42 | + typedef __int64 __time64_t; | |
| 43 | +#endif | |
| 44 | +#define _TIME64_T_DEFINED | |
| 64 | 45 | #endif |
| 65 | 46 | |
| 66 | −/* TODO: Not tested. */ | |
| 67 | −void _ftime (struct _timeb*); | |
| 47 | +#ifndef _TIME_T_DEFINED | |
| 48 | +#ifdef _USE_32BIT_TIME_T | |
| 49 | + typedef __time32_t time_t; | |
| 50 | +#else | |
| 51 | + typedef __time64_t time_t; | |
| 52 | +#endif | |
| 53 | +#define _TIME_T_DEFINED | |
| 54 | +#endif | |
| 68 | 55 | |
| 69 | −#ifndef _NO_OLDNAMES | |
| 70 | −void ftime (struct timeb*); | |
| 71 | −#endif /* Not _NO_OLDNAMES */ | |
| 56 | +#ifndef _TIMEB_DEFINED | |
| 57 | +#define _TIMEB_DEFINED | |
| 72 | 58 | |
| 73 | −#ifdef __cplusplus | |
| 74 | −} | |
| 59 | + struct __timeb32 { | |
| 60 | + __time32_t time; | |
| 61 | + unsigned short millitm; | |
| 62 | + short timezone; | |
| 63 | + short dstflag; | |
| 64 | + }; | |
| 65 | + | |
| 66 | +#ifndef NO_OLDNAMES | |
| 67 | + struct timeb { | |
| 68 | + time_t time; | |
| 69 | + unsigned short millitm; | |
| 70 | + short timezone; | |
| 71 | + short dstflag; | |
| 72 | + }; | |
| 75 | 73 | #endif |
| 76 | 74 | |
| 77 | −#endif /* Not RC_INVOKED */ | |
| 75 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 76 | + struct __timeb64 { | |
| 77 | + __time64_t time; | |
| 78 | + unsigned short millitm; | |
| 79 | + short timezone; | |
| 80 | + short dstflag; | |
| 81 | + }; | |
| 82 | +#endif | |
| 83 | + | |
| 84 | +#ifdef _USE_32BIT_TIME_T | |
| 85 | +#define _timeb __timeb32 | |
| 86 | +#define _ftime _ftime32 | |
| 87 | +#else | |
| 88 | +#define _timeb __timeb64 | |
| 89 | +#define _ftime _ftime64 | |
| 90 | +#endif | |
| 91 | +#endif | |
| 92 | + | |
| 93 | + _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time); | |
| 94 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 95 | + _CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time); | |
| 96 | +#endif | |
| 78 | 97 | |
| 79 | −#endif /* Not _TIMEB_H_ */ | |
| 98 | +#ifndef _TIMESPEC_DEFINED | |
| 99 | +#define _TIMESPEC_DEFINED | |
| 100 | +struct timespec { | |
| 101 | + time_t tv_sec; /* Seconds */ | |
| 102 | + long tv_nsec; /* Nanoseconds */ | |
| 103 | +}; | |
| 80 | 104 | |
| 81 | −#endif /* Not __STRICT_ANSI__ */ | |
| 105 | +struct itimerspec { | |
| 106 | + struct timespec it_interval; /* Timer period */ | |
| 107 | + struct timespec it_value; /* Timer expiration */ | |
| 108 | +}; | |
| 109 | +#endif | |
| 82 | 110 | |
| 111 | +#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES) | |
| 112 | +#ifdef _USE_32BIT_TIME_T | |
| 113 | +__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) { | |
| 114 | + _ftime32((struct __timeb32 *)_Tmb); | |
| 115 | +} | |
| 116 | +#else | |
| 117 | +__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) { | |
| 118 | + _ftime64((struct __timeb64 *)_Tmb); | |
| 119 | +} | |
| 120 | +#endif | |
| 121 | +#endif | |
| 122 | + | |
| 123 | +#ifdef __cplusplus | |
| 124 | +} | |
| 125 | +#endif | |
| 126 | + | |
| 127 | +#pragma pack(pop) | |
| 128 | + | |
| 129 | +#include <sec_api/sys/timeb_s.h> | |
| 130 | +#endif | |
| @@ -1,118 +1,116 @@ | ||
| 1 | −/* | |
| 2 | − * types.h | |
| 3 | − * | |
| 4 | − * The definition of constants, data types and global variables. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * Lots of types supplied by Pedro A. Aranda <paag@tid.es> | |
| 11 | − * | |
| 12 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 13 | − * | |
| 14 | − * This source code is offered for use in the public domain. You may | |
| 15 | − * use, modify or distribute it freely. | |
| 16 | − * | |
| 17 | − * This code is distributed in the hope that it will be useful but | |
| 18 | − * WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 19 | − * DISCLAIMED. This includes but is not limited to warrenties of | |
| 20 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 21 | − * | |
| 22 | − * $Revision: 1.2 $ | |
| 23 | − * $Author: bellard $ | |
| 24 | − * $Date: 2005/04/17 13:14:29 $ | |
| 25 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 26 | 5 | */ |
| 6 | +#ifndef _INC_TYPES | |
| 7 | +#define _INC_TYPES | |
| 27 | 8 | |
| 28 | −#ifndef _TYPES_H_ | |
| 29 | −#define _TYPES_H_ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 30 | 12 | |
| 31 | −/* All the headers include this file. */ | |
| 32 | 13 | #include <_mingw.h> |
| 33 | 14 | |
| 34 | −#define __need_wchar_t | |
| 35 | −#define __need_size_t | |
| 36 | −#define __need_ptrdiff_t | |
| 37 | −#ifndef RC_INVOKED | |
| 38 | −#include <stddef.h> | |
| 39 | −#endif /* Not RC_INVOKED */ | |
| 40 | − | |
| 41 | −#ifndef RC_INVOKED | |
| 42 | − | |
| 43 | −#ifndef _TIME_T_DEFINED | |
| 44 | −typedef long time_t; | |
| 45 | −#define _TIME_T_DEFINED | |
| 15 | +#ifdef _USE_32BIT_TIME_T | |
| 16 | +#ifdef _WIN64 | |
| 17 | +#undef _USE_32BIT_TIME_T | |
| 18 | +#endif | |
| 19 | +#else | |
| 20 | +#if _INTEGRAL_MAX_BITS < 64 | |
| 21 | +#define _USE_32BIT_TIME_T | |
| 22 | +#endif | |
| 46 | 23 | #endif |
| 47 | 24 | |
| 48 | − | |
| 49 | −#ifndef __STRICT_ANSI__ | |
| 50 | − | |
| 51 | −#ifndef _OFF_T_ | |
| 52 | −#define _OFF_T_ | |
| 53 | −typedef long _off_t; | |
| 54 | − | |
| 55 | −#ifndef _NO_OLDNAMES | |
| 56 | −typedef _off_t off_t; | |
| 25 | +#ifndef _TIME32_T_DEFINED | |
| 26 | +#define _TIME32_T_DEFINED | |
| 27 | +typedef long __time32_t; | |
| 57 | 28 | #endif |
| 58 | −#endif /* Not _OFF_T_ */ | |
| 59 | 29 | |
| 30 | +#ifndef _TIME64_T_DEFINED | |
| 31 | +#define _TIME64_T_DEFINED | |
| 32 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 33 | +typedef __int64 __time64_t; | |
| 34 | +#endif | |
| 35 | +#endif | |
| 60 | 36 | |
| 61 | −#ifndef _DEV_T_ | |
| 62 | −#define _DEV_T_ | |
| 63 | −#ifdef __MSVCRT__ | |
| 64 | −typedef unsigned int _dev_t; | |
| 37 | +#ifndef _TIME_T_DEFINED | |
| 38 | +#define _TIME_T_DEFINED | |
| 39 | +#ifdef _USE_32BIT_TIME_T | |
| 40 | +typedef __time32_t time_t; | |
| 65 | 41 | #else |
| 66 | −typedef short _dev_t; | |
| 42 | +typedef __time64_t time_t; | |
| 67 | 43 | #endif |
| 68 | − | |
| 69 | −#ifndef _NO_OLDNAMES | |
| 70 | −typedef _dev_t dev_t; | |
| 71 | 44 | #endif |
| 72 | −#endif /* Not _DEV_T_ */ | |
| 73 | − | |
| 74 | 45 | |
| 75 | −#ifndef _INO_T_ | |
| 76 | −#define _INO_T_ | |
| 77 | −typedef short _ino_t; | |
| 78 | − | |
| 79 | −#ifndef _NO_OLDNAMES | |
| 80 | −typedef _ino_t ino_t; | |
| 46 | +#ifndef _INO_T_DEFINED | |
| 47 | +#define _INO_T_DEFINED | |
| 48 | +typedef unsigned short _ino_t; | |
| 49 | +#ifndef NO_OLDNAMES | |
| 50 | +typedef unsigned short ino_t; | |
| 51 | +#endif | |
| 81 | 52 | #endif |
| 82 | −#endif /* Not _INO_T_ */ | |
| 83 | 53 | |
| 54 | +#ifndef _DEV_T_DEFINED | |
| 55 | +#define _DEV_T_DEFINED | |
| 56 | +typedef unsigned int _dev_t; | |
| 57 | +#ifndef NO_OLDNAMES | |
| 58 | +typedef unsigned int dev_t; | |
| 59 | +#endif | |
| 60 | +#endif | |
| 84 | 61 | |
| 85 | 62 | #ifndef _PID_T_ |
| 86 | 63 | #define _PID_T_ |
| 64 | +#ifndef _WIN64 | |
| 87 | 65 | typedef int _pid_t; |
| 66 | +#else | |
| 67 | +typedef __int64 _pid_t; | |
| 68 | +#endif | |
| 88 | 69 | |
| 89 | −#ifndef _NO_OLDNAMES | |
| 70 | +#ifndef NO_OLDNAMES | |
| 90 | 71 | typedef _pid_t pid_t; |
| 91 | 72 | #endif |
| 92 | 73 | #endif /* Not _PID_T_ */ |
| 93 | 74 | |
| 94 | − | |
| 95 | 75 | #ifndef _MODE_T_ |
| 96 | 76 | #define _MODE_T_ |
| 97 | 77 | typedef unsigned short _mode_t; |
| 98 | 78 | |
| 99 | −#ifndef _NO_OLDNAMES | |
| 79 | +#ifndef NO_OLDNAMES | |
| 100 | 80 | typedef _mode_t mode_t; |
| 101 | 81 | #endif |
| 102 | 82 | #endif /* Not _MODE_T_ */ |
| 103 | 83 | |
| 104 | − | |
| 105 | −#ifndef _SIGSET_T_ | |
| 106 | −#define _SIGSET_T_ | |
| 107 | −typedef int _sigset_t; | |
| 108 | − | |
| 109 | −#ifndef _NO_OLDNAMES | |
| 110 | −typedef _sigset_t sigset_t; | |
| 84 | +#ifndef _OFF_T_DEFINED | |
| 85 | +#define _OFF_T_DEFINED | |
| 86 | +#ifndef _OFF_T_ | |
| 87 | +#define _OFF_T_ | |
| 88 | + typedef long _off_t; | |
| 89 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 90 | + typedef long off_t; | |
| 91 | +#endif | |
| 92 | +#endif | |
| 111 | 93 | #endif |
| 112 | −#endif /* Not _SIGSET_T_ */ | |
| 113 | 94 | |
| 114 | −#endif /* Not __STRICT_ANSI__ */ | |
| 95 | +#ifndef _OFF64_T_DEFINED | |
| 96 | +#define _OFF64_T_DEFINED | |
| 97 | + typedef long long _off64_t; | |
| 98 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 99 | + typedef long long off64_t; | |
| 100 | +#endif | |
| 101 | +#endif | |
| 115 | 102 | |
| 116 | −#endif /* Not RC_INVOKED */ | |
| 103 | +#ifndef _TIMESPEC_DEFINED | |
| 104 | +#define _TIMESPEC_DEFINED | |
| 105 | +struct timespec { | |
| 106 | + time_t tv_sec; /* Seconds */ | |
| 107 | + long tv_nsec; /* Nanoseconds */ | |
| 108 | +}; | |
| 109 | + | |
| 110 | +struct itimerspec { | |
| 111 | + struct timespec it_interval; /* Timer period */ | |
| 112 | + struct timespec it_value; /* Timer expiration */ | |
| 113 | +}; | |
| 114 | +#endif | |
| 117 | 115 | |
| 118 | −#endif /* Not _TYPES_H_ */ | |
| 116 | +#endif | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * This file is part of the Mingw32 package. |
| 3 | 8 | * |
| @@ -1,89 +1,144 @@ | ||
| 1 | −/* | |
| 2 | − * utime.h | |
| 3 | − * | |
| 4 | − * Support for the utime function. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_UTIME | |
| 7 | +#define _INC_UTIME | |
| 26 | 8 | |
| 27 | −#ifndef __STRICT_ANSI__ | |
| 28 | − | |
| 29 | −#ifndef _UTIME_H_ | |
| 30 | −#define _UTIME_H_ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 31 | 12 | |
| 32 | −/* All the headers include this file. */ | |
| 33 | 13 | #include <_mingw.h> |
| 34 | 14 | |
| 35 | −#define __need_wchar_t | |
| 36 | −#define __need_size_t | |
| 37 | −#ifndef RC_INVOKED | |
| 38 | −#include <stddef.h> | |
| 39 | −#endif /* Not RC_INVOKED */ | |
| 40 | −#include <sys/types.h> | |
| 15 | +#pragma pack(push,_CRT_PACKING) | |
| 41 | 16 | |
| 42 | −#ifndef RC_INVOKED | |
| 17 | +#ifdef __cplusplus | |
| 18 | +extern "C" { | |
| 19 | +#endif | |
| 43 | 20 | |
| 44 | −/* | |
| 45 | − * Structure used by _utime function. | |
| 46 | − */ | |
| 47 | −struct _utimbuf | |
| 48 | −{ | |
| 49 | − time_t actime; /* Access time */ | |
| 50 | − time_t modtime; /* Modification time */ | |
| 51 | −}; | |
| 21 | +#ifndef _CRTIMP | |
| 22 | +#define _CRTIMP __declspec(dllimport) | |
| 23 | +#endif | |
| 52 | 24 | |
| 25 | +#ifndef _WCHAR_T_DEFINED | |
| 26 | + typedef unsigned short wchar_t; | |
| 27 | +#define _WCHAR_T_DEFINED | |
| 28 | +#endif | |
| 53 | 29 | |
| 54 | −#ifndef _NO_OLDNAMES | |
| 55 | −/* NOTE: Must be the same as _utimbuf above. */ | |
| 56 | −struct utimbuf | |
| 57 | −{ | |
| 58 | − time_t actime; | |
| 59 | − time_t modtime; | |
| 60 | −}; | |
| 61 | −#endif /* Not _NO_OLDNAMES */ | |
| 30 | +#ifdef _USE_32BIT_TIME_T | |
| 31 | +#ifdef _WIN64 | |
| 32 | +#undef _USE_32BIT_TIME_T | |
| 33 | +#endif | |
| 34 | +#else | |
| 35 | +#if _INTEGRAL_MAX_BITS < 64 | |
| 36 | +#define _USE_32BIT_TIME_T | |
| 37 | +#endif | |
| 38 | +#endif | |
| 62 | 39 | |
| 40 | +#ifndef _TIME32_T_DEFINED | |
| 41 | +#define _TIME32_T_DEFINED | |
| 42 | + typedef long __time32_t; | |
| 43 | +#endif | |
| 63 | 44 | |
| 64 | −#ifdef __cplusplus | |
| 65 | −extern "C" { | |
| 45 | +#ifndef _TIME64_T_DEFINED | |
| 46 | +#define _TIME64_T_DEFINED | |
| 47 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 48 | + typedef __int64 __time64_t; | |
| 49 | +#endif | |
| 50 | +#endif | |
| 51 | + | |
| 52 | +#ifndef _TIME_T_DEFINED | |
| 53 | +#define _TIME_T_DEFINED | |
| 54 | +#ifdef _USE_32BIT_TIME_T | |
| 55 | + typedef __time32_t time_t; | |
| 56 | +#else | |
| 57 | + typedef __time64_t time_t; | |
| 58 | +#endif | |
| 66 | 59 | #endif |
| 67 | 60 | |
| 68 | −int _utime (const char*, struct _utimbuf*); | |
| 69 | −int _futime (int, struct _utimbuf*); | |
| 61 | +#ifndef _UTIMBUF_DEFINED | |
| 62 | +#define _UTIMBUF_DEFINED | |
| 70 | 63 | |
| 71 | −/* The wide character version, only available for MSVCRT versions of the | |
| 72 | − * C runtime library. */ | |
| 73 | −#ifdef __MSVCRT__ | |
| 74 | −int _wutime (const wchar_t*, struct _utimbuf*); | |
| 75 | −#endif /* MSVCRT runtime */ | |
| 76 | −#ifndef _NO_OLDNAMES | |
| 77 | −int utime (const char*, struct utimbuf*); | |
| 78 | −#endif /* Not _NO_OLDNAMES */ | |
| 64 | + struct _utimbuf { | |
| 65 | + time_t actime; | |
| 66 | + time_t modtime; | |
| 67 | + }; | |
| 79 | 68 | |
| 80 | −#ifdef __cplusplus | |
| 81 | −} | |
| 69 | + struct __utimbuf32 { | |
| 70 | + __time32_t actime; | |
| 71 | + __time32_t modtime; | |
| 72 | + }; | |
| 73 | + | |
| 74 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 75 | + struct __utimbuf64 { | |
| 76 | + __time64_t actime; | |
| 77 | + __time64_t modtime; | |
| 78 | + }; | |
| 82 | 79 | #endif |
| 83 | 80 | |
| 84 | −#endif /* Not RC_INVOKED */ | |
| 81 | +#ifndef NO_OLDNAMES | |
| 82 | + struct utimbuf { | |
| 83 | + time_t actime; | |
| 84 | + time_t modtime; | |
| 85 | + }; | |
| 85 | 86 | |
| 86 | −#endif /* Not _UTIME_H_ */ | |
| 87 | + struct utimbuf32 { | |
| 88 | + __time32_t actime; | |
| 89 | + __time32_t modtime; | |
| 90 | + }; | |
| 91 | +#endif | |
| 92 | +#endif | |
| 87 | 93 | |
| 88 | −#endif /* Not __STRICT_ANSI__ */ | |
| 94 | + _CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time); | |
| 95 | + _CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time); | |
| 96 | + _CRTIMP int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Time); | |
| 97 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 98 | + _CRTIMP int __cdecl _utime64(const char *_Filename,struct __utimbuf64 *_Time); | |
| 99 | + _CRTIMP int __cdecl _futime64(int _FileDes,struct __utimbuf64 *_Time); | |
| 100 | + _CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time); | |
| 101 | +#endif | |
| 102 | + | |
| 103 | +#ifndef RC_INVOKED | |
| 104 | +#ifdef _USE_32BIT_TIME_T | |
| 105 | +__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) { | |
| 106 | + return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf); | |
| 107 | +} | |
| 108 | +__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) { | |
| 109 | + return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf); | |
| 110 | +} | |
| 111 | +__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) { | |
| 112 | + return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf); | |
| 113 | +} | |
| 114 | +#else | |
| 115 | +__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) { | |
| 116 | + return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf); | |
| 117 | +} | |
| 118 | +__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) { | |
| 119 | + return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf); | |
| 120 | +} | |
| 121 | +__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) { | |
| 122 | + return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf); | |
| 123 | +} | |
| 124 | +#endif | |
| 89 | 125 | |
| 126 | +#ifndef NO_OLDNAMES | |
| 127 | +#ifdef _USE_32BIT_TIME_T | |
| 128 | +__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) { | |
| 129 | + return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf); | |
| 130 | +} | |
| 131 | +#else | |
| 132 | +__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) { | |
| 133 | + return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf); | |
| 134 | +} | |
| 135 | +#endif | |
| 136 | +#endif | |
| 137 | +#endif | |
| 138 | + | |
| 139 | +#ifdef __cplusplus | |
| 140 | +} | |
| 141 | +#endif | |
| 142 | + | |
| 143 | +#pragma pack(pop) | |
| 144 | +#endif | |
| @@ -1,367 +1,1102 @@ | ||
| 1 | −/* | |
| 2 | − * tchar.h | |
| 3 | − * | |
| 4 | − * Unicode mapping layer for the standard C library. By including this | |
| 5 | − * file and using the 't' names for string functions | |
| 6 | − * (eg. _tprintf) you can make code which can be easily adapted to both | |
| 7 | − * Unicode and non-unicode environments. In a unicode enabled compile define | |
| 8 | − * _UNICODE before including tchar.h, otherwise the standard non-unicode | |
| 9 | − * library functions will be used. | |
| 10 | − * | |
| 11 | − * Note that you still need to include string.h or stdlib.h etc. to define | |
| 12 | − * the appropriate functions. Also note that there are several defines | |
| 13 | − * included for non-ANSI functions which are commonly available (but using | |
| 14 | − * the convention of prepending an underscore to non-ANSI library function | |
| 15 | − * names). | |
| 16 | − * | |
| 17 | − * This file is part of the Mingw32 package. | |
| 18 | − * | |
| 19 | − * Contributors: | |
| 20 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 21 | − * | |
| 22 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 23 | − * | |
| 24 | − * This source code is offered for use in the public domain. You may | |
| 25 | − * use, modify or distribute it freely. | |
| 26 | − * | |
| 27 | − * This code is distributed in the hope that it will be useful but | |
| 28 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 29 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 30 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 31 | − * | |
| 32 | − * $Revision: 1.2 $ | |
| 33 | − * $Author: bellard $ | |
| 34 | − * $Date: 2005/04/17 13:14:29 $ | |
| 35 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 36 | 5 | */ |
| 6 | +#include <_mingw.h> | |
| 37 | 7 | |
| 38 | −#ifndef _TCHAR_H_ | |
| 39 | −#define _TCHAR_H_ | |
| 8 | +#ifndef _INC_TCHAR | |
| 9 | +#define _INC_TCHAR | |
| 40 | 10 | |
| 41 | −/* All the headers include this file. */ | |
| 42 | −#include <_mingw.h> | |
| 11 | +#ifdef _STRSAFE_H_INCLUDED_ | |
| 12 | +#error Need to include strsafe.h after tchar.h | |
| 13 | +#endif | |
| 43 | 14 | |
| 44 | −/* | |
| 45 | − * NOTE: This tests _UNICODE, which is different from the UNICODE define | |
| 46 | − * used to differentiate Win32 API calls. | |
| 47 | − */ | |
| 48 | −#ifdef _UNICODE | |
| 15 | +#ifdef __cplusplus | |
| 16 | +extern "C" { | |
| 17 | +#endif | |
| 49 | 18 | |
| 19 | +#define _ftcscat _tcscat | |
| 20 | +#define _ftcschr _tcschr | |
| 21 | +#define _ftcscpy _tcscpy | |
| 22 | +#define _ftcscspn _tcscspn | |
| 23 | +#define _ftcslen _tcslen | |
| 24 | +#define _ftcsncat _tcsncat | |
| 25 | +#define _ftcsncpy _tcsncpy | |
| 26 | +#define _ftcspbrk _tcspbrk | |
| 27 | +#define _ftcsrchr _tcsrchr | |
| 28 | +#define _ftcsspn _tcsspn | |
| 29 | +#define _ftcsstr _tcsstr | |
| 30 | +#define _ftcstok _tcstok | |
| 31 | + | |
| 32 | +#define _ftcsdup _tcsdup | |
| 33 | +#define _ftcsnset _tcsnset | |
| 34 | +#define _ftcsrev _tcsrev | |
| 35 | +#define _ftcsset _tcsset | |
| 36 | + | |
| 37 | +#define _ftcscmp _tcscmp | |
| 38 | +#define _ftcsicmp _tcsicmp | |
| 39 | +#define _ftcsnccmp _tcsnccmp | |
| 40 | +#define _ftcsncmp _tcsncmp | |
| 41 | +#define _ftcsncicmp _tcsncicmp | |
| 42 | +#define _ftcsnicmp _tcsnicmp | |
| 43 | + | |
| 44 | +#define _ftcscoll _tcscoll | |
| 45 | +#define _ftcsicoll _tcsicoll | |
| 46 | +#define _ftcsnccoll _tcsnccoll | |
| 47 | +#define _ftcsncoll _tcsncoll | |
| 48 | +#define _ftcsncicoll _tcsncicoll | |
| 49 | +#define _ftcsnicoll _tcsnicoll | |
| 50 | + | |
| 51 | +#define _ftcsclen _tcsclen | |
| 52 | +#define _ftcsnccat _tcsnccat | |
| 53 | +#define _ftcsnccpy _tcsnccpy | |
| 54 | +#define _ftcsncset _tcsncset | |
| 55 | + | |
| 56 | +#define _ftcsdec _tcsdec | |
| 57 | +#define _ftcsinc _tcsinc | |
| 58 | +#define _ftcsnbcnt _tcsnbcnt | |
| 59 | +#define _ftcsnccnt _tcsnccnt | |
| 60 | +#define _ftcsnextc _tcsnextc | |
| 61 | +#define _ftcsninc _tcsninc | |
| 62 | +#define _ftcsspnp _tcsspnp | |
| 63 | + | |
| 64 | +#define _ftcslwr _tcslwr | |
| 65 | +#define _ftcsupr _tcsupr | |
| 66 | + | |
| 67 | +#define _ftclen _tclen | |
| 68 | +#define _ftccpy _tccpy | |
| 69 | +#define _ftccmp _tccmp | |
| 70 | + | |
| 71 | +#ifndef _CONST_RETURN | |
| 72 | +#ifdef __cplusplus | |
| 73 | +#define _CONST_RETURN const | |
| 74 | +#define _CRT_CONST_CORRECT_OVERLOADS | |
| 75 | +#else | |
| 76 | +#define _CONST_RETURN | |
| 77 | +#endif | |
| 78 | +#endif | |
| 79 | + | |
| 80 | +#define _WConst_return _CONST_RETURN | |
| 81 | + | |
| 82 | +#ifdef _UNICODE | |
| 83 | + | |
| 84 | +#ifdef __cplusplus | |
| 85 | +} | |
| 86 | +#endif | |
| 87 | + | |
| 88 | +#include <wchar.h> | |
| 89 | + | |
| 90 | +#ifdef __cplusplus | |
| 91 | +extern "C" { | |
| 92 | +#endif | |
| 93 | + | |
| 94 | +#ifndef _WCTYPE_T_DEFINED | |
| 95 | +#define _WCTYPE_T_DEFINED | |
| 96 | + typedef unsigned short wint_t; | |
| 97 | + typedef unsigned short wctype_t; | |
| 98 | +#endif | |
| 99 | + | |
| 100 | +#ifndef __TCHAR_DEFINED | |
| 101 | +#define __TCHAR_DEFINED | |
| 102 | + typedef wchar_t _TCHAR; | |
| 103 | + typedef wchar_t _TSCHAR; | |
| 104 | + typedef wchar_t _TUCHAR; | |
| 105 | + typedef wchar_t _TXCHAR; | |
| 106 | + typedef wint_t _TINT; | |
| 107 | +#endif | |
| 50 | 108 | |
| 51 | −/* | |
| 52 | − * Use TCHAR instead of char or wchar_t. It will be appropriately translated | |
| 53 | − * if _UNICODE is correctly defined (or not). | |
| 54 | − */ | |
| 55 | 109 | #ifndef _TCHAR_DEFINED |
| 56 | −#ifndef RC_INVOKED | |
| 57 | −typedef wchar_t TCHAR; | |
| 58 | −typedef wchar_t _TCHAR; | |
| 59 | −#endif /* Not RC_INVOKED */ | |
| 60 | 110 | #define _TCHAR_DEFINED |
| 111 | +#ifndef NO_OLDNAMES | |
| 112 | + typedef wchar_t TCHAR; | |
| 113 | +#endif | |
| 61 | 114 | #endif |
| 62 | 115 | |
| 116 | +#define _TEOF WEOF | |
| 63 | 117 | |
| 64 | −/* | |
| 65 | − * __TEXT is a private macro whose specific use is to force the expansion of a | |
| 66 | − * macro passed as an argument to the macros _T or _TEXT. DO NOT use this | |
| 67 | − * macro within your programs. It's name and function could change without | |
| 68 | − * notice. | |
| 69 | − */ | |
| 70 | −#define __TEXT(x) L##x | |
| 118 | +#define __T(x) L##x | |
| 71 | 119 | |
| 72 | −/* for porting from other Windows compilers */ | |
| 73 | −#if 0 // no wide startup module | |
| 74 | −#define _tmain wmain | |
| 75 | −#define _tWinMain wWinMain | |
| 76 | −#define _tenviron _wenviron | |
| 77 | −#define __targv __wargv | |
| 78 | −#endif | |
| 120 | +#define _tmain wmain | |
| 121 | +#define _tWinMain wWinMain | |
| 122 | +#define _tenviron _wenviron | |
| 123 | +#define __targv __wargv | |
| 79 | 124 | |
| 80 | −/* | |
| 81 | − * Unicode functions | |
| 82 | − */ | |
| 83 | −#define _tprintf wprintf | |
| 84 | −#define _ftprintf fwprintf | |
| 85 | −#define _stprintf swprintf | |
| 86 | −#define _sntprintf _snwprintf | |
| 87 | −#define _vtprintf vwprintf | |
| 88 | −#define _vftprintf vfwprintf | |
| 89 | −#define _vstprintf vswprintf | |
| 90 | −#define _vsntprintf _vsnwprintf | |
| 91 | −#define _tscanf wscanf | |
| 92 | −#define _ftscanf fwscanf | |
| 93 | −#define _stscanf swscanf | |
| 94 | −#define _fgettc fgetwc | |
| 95 | −#define _fgettchar _fgetwchar | |
| 96 | −#define _fgetts fgetws | |
| 97 | −#define _fputtc fputwc | |
| 98 | −#define _fputtchar _fputwchar | |
| 99 | −#define _fputts fputws | |
| 100 | −#define _gettc getwc | |
| 101 | −#define _getts getws | |
| 102 | −#define _puttc putwc | |
| 103 | −#define _putts putws | |
| 104 | −#define _ungettc ungetwc | |
| 105 | −#define _tcstod wcstod | |
| 106 | −#define _tcstol wcstol | |
| 107 | −#define _tcstoul wcstoul | |
| 108 | −#define _itot _itow | |
| 109 | −#define _ltot _ltow | |
| 110 | −#define _ultot _ultow | |
| 111 | −#define _ttoi _wtoi | |
| 112 | −#define _ttol _wtol | |
| 113 | −#define _tcscat wcscat | |
| 114 | −#define _tcschr wcschr | |
| 115 | −#define _tcscmp wcscmp | |
| 116 | −#define _tcscpy wcscpy | |
| 117 | −#define _tcscspn wcscspn | |
| 118 | −#define _tcslen wcslen | |
| 119 | −#define _tcsncat wcsncat | |
| 120 | −#define _tcsncmp wcsncmp | |
| 121 | −#define _tcsncpy wcsncpy | |
| 122 | −#define _tcspbrk wcspbrk | |
| 123 | −#define _tcsrchr wcsrchr | |
| 124 | −#define _tcsspn wcsspn | |
| 125 | −#define _tcsstr wcsstr | |
| 126 | −#define _tcstok wcstok | |
| 127 | −#define _tcsdup _wcsdup | |
| 128 | −#define _tcsicmp _wcsicmp | |
| 129 | −#define _tcsnicmp _wcsnicmp | |
| 130 | −#define _tcsnset _wcsnset | |
| 131 | −#define _tcsrev _wcsrev | |
| 132 | −#define _tcsset _wcsset | |
| 133 | −#define _tcslwr _wcslwr | |
| 134 | −#define _tcsupr _wcsupr | |
| 135 | −#define _tcsxfrm wcsxfrm | |
| 136 | −#define _tcscoll wcscoll | |
| 137 | −#define _tcsicoll _wcsicoll | |
| 138 | −#define _istalpha iswalpha | |
| 139 | −#define _istupper iswupper | |
| 140 | −#define _istlower iswlower | |
| 141 | −#define _istdigit iswdigit | |
| 142 | −#define _istxdigit iswxdigit | |
| 143 | −#define _istspace iswspace | |
| 144 | −#define _istpunct iswpunct | |
| 145 | −#define _istalnum iswalnum | |
| 146 | −#define _istprint iswprint | |
| 147 | −#define _istgraph iswgraph | |
| 148 | −#define _istcntrl iswcntrl | |
| 149 | −#define _istascii iswascii | |
| 150 | −#define _totupper towupper | |
| 151 | −#define _totlower towlower | |
| 152 | −#define _tcsftime wcsftime | |
| 153 | −/* Macro functions */ | |
| 154 | −#define _tcsdec _wcsdec | |
| 155 | −#define _tcsinc _wcsinc | |
| 156 | −#define _tcsnbcnt _wcsncnt | |
| 157 | −#define _tcsnccnt _wcsncnt | |
| 158 | −#define _tcsnextc _wcsnextc | |
| 159 | −#define _tcsninc _wcsninc | |
| 160 | −#define _tcsspnp _wcsspnp | |
| 161 | −#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1) | |
| 162 | −#define _wcsinc(_wcs) ((_wcs)+1) | |
| 163 | −#define _wcsnextc(_wcs) ((unsigned int) *(_wcs)) | |
| 164 | −#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc))) | |
| 165 | −#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs)) | |
| 166 | −#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL) | |
| 167 | − | |
| 168 | −#if 1 // defined __MSVCRT__ | |
| 169 | −/* | |
| 170 | − * These wide functions not in crtdll.dll. | |
| 171 | − * Define macros anyway so that _wfoo rather than _tfoo is undefined | |
| 172 | − */ | |
| 173 | −#define _ttoi64 _wtoi64 | |
| 174 | −#define _i64tot _i64tow | |
| 175 | −#define _ui64tot _ui64tow | |
| 176 | −#define _tasctime _wasctime | |
| 177 | −#define _tctime _wctime | |
| 178 | −#define _tstrdate _wstrdate | |
| 179 | −#define _tstrtime _wstrtime | |
| 180 | −#define _tutime _wutime | |
| 181 | −#define _tcsnccoll _wcsncoll | |
| 182 | −#define _tcsncoll _wcsncoll | |
| 125 | +#define _tprintf wprintf | |
| 126 | +#define _tprintf_l _wprintf_l | |
| 127 | +#define _tprintf_p _wprintf_p | |
| 128 | +#define _tprintf_p_l _wprintf_p_l | |
| 129 | +#define _tcprintf _cwprintf | |
| 130 | +#define _tcprintf_l _cwprintf_l | |
| 131 | +#define _tcprintf_p _cwprintf_p | |
| 132 | +#define _tcprintf_p_l _cwprintf_p_l | |
| 133 | +#define _vtcprintf _vcwprintf | |
| 134 | +#define _vtcprintf_l _vcwprintf_l | |
| 135 | +#define _vtcprintf_p _vcwprintf_p | |
| 136 | +#define _vtcprintf_p_l _vcwprintf_p_l | |
| 137 | +#define _ftprintf fwprintf | |
| 138 | +#define _ftprintf_l _fwprintf_l | |
| 139 | +#define _ftprintf_p _fwprintf_p | |
| 140 | +#define _ftprintf_p_l _fwprintf_p_l | |
| 141 | +#define _stprintf swprintf | |
| 142 | +#define _stprintf_l __swprintf_l | |
| 143 | +#define _stprintf_p _swprintf_p | |
| 144 | +#define _stprintf_p_l _swprintf_p_l | |
| 145 | +#define _sctprintf _scwprintf | |
| 146 | +#define _sctprintf_l _scwprintf_l | |
| 147 | +#define _sctprintf_p _scwprintf_p | |
| 148 | +#define _sctprintf_p_l _scwprintf_p_l | |
| 149 | +#define _sntprintf _snwprintf | |
| 150 | +#define _sntprintf_l _snwprintf_l | |
| 151 | +#define _vtprintf vwprintf | |
| 152 | +#define _vtprintf_l _vwprintf_l | |
| 153 | +#define _vtprintf_p _vwprintf_p | |
| 154 | +#define _vtprintf_p_l _vwprintf_p_l | |
| 155 | +#define _vftprintf vfwprintf | |
| 156 | +#define _vftprintf_l _vfwprintf_l | |
| 157 | +#define _vftprintf_p _vfwprintf_p | |
| 158 | +#define _vftprintf_p_l _vfwprintf_p_l | |
| 159 | +#define _vstprintf vswprintf | |
| 160 | +#define _vstprintf_l _vswprintf_l | |
| 161 | +#define _vstprintf_p _vswprintf_p | |
| 162 | +#define _vstprintf_p_l _vswprintf_p_l | |
| 163 | +#define _vsctprintf _vscwprintf | |
| 164 | +#define _vsctprintf_l _vscwprintf_l | |
| 165 | +#define _vsctprintf_p _vscwprintf_p | |
| 166 | +#define _vsctprintf_p_l _vscwprintf_p_l | |
| 167 | +#define _vsntprintf _vsnwprintf | |
| 168 | +#define _vsntprintf_l _vsnwprintf_l | |
| 169 | + | |
| 170 | +#define _tscanf wscanf | |
| 171 | +#define _tscanf_l _wscanf_l | |
| 172 | +#define _tcscanf _cwscanf | |
| 173 | +#define _tcscanf_l _cwscanf_l | |
| 174 | +#define _ftscanf fwscanf | |
| 175 | +#define _ftscanf_l _fwscanf_l | |
| 176 | +#define _stscanf swscanf | |
| 177 | +#define _stscanf_l _swscanf_l | |
| 178 | +#define _sntscanf _snwscanf | |
| 179 | +#define _sntscanf_l _snwscanf_l | |
| 180 | + | |
| 181 | +#define _fgettc fgetwc | |
| 182 | +#define _fgettc_nolock _fgetwc_nolock | |
| 183 | +#define _fgettchar _fgetwchar | |
| 184 | +#define _fgetts fgetws | |
| 185 | +#define _fputtc fputwc | |
| 186 | +#define _fputtc_nolock _fputwc_nolock | |
| 187 | +#define _fputtchar _fputwchar | |
| 188 | +#define _fputts fputws | |
| 189 | +#define _cputts _cputws | |
| 190 | +#define _cgetts _cgetws | |
| 191 | +#define _gettc getwc | |
| 192 | +#define _gettc_nolock _getwc_nolock | |
| 193 | +#define _gettch _getwch | |
| 194 | +#define _gettch_nolock _getwch_nolock | |
| 195 | +#define _gettche _getwche | |
| 196 | +#define _gettche_nolock _getwche_nolock | |
| 197 | +#define _gettchar getwchar | |
| 198 | +#define _gettchar_nolock _getwchar_nolock | |
| 199 | +#define _getts _getws | |
| 200 | +#define _puttc putwc | |
| 201 | +#define _puttc_nolock _putwc_nolock | |
| 202 | +#define _puttchar putwchar | |
| 203 | +#define _puttchar_nolock _putwchar_nolock | |
| 204 | +#define _puttch _putwch | |
| 205 | +#define _puttch_nolock _putwch_nolock | |
| 206 | +#define _putts _putws | |
| 207 | +#define _ungettc ungetwc | |
| 208 | +#define _ungettc_nolock _ungetwc_nolock | |
| 209 | +#define _ungettch _ungetwch | |
| 210 | +#define _ungettch_nolock _ungetwch_nolock | |
| 211 | + | |
| 212 | +#define _tcstod wcstod | |
| 213 | +#define _tcstol wcstol | |
| 214 | +#define _tcstoul wcstoul | |
| 215 | +#define _tcstoi64 _wcstoi64 | |
| 216 | +#define _tcstoui64 _wcstoui64 | |
| 217 | +#define _tstof _wtof | |
| 218 | +#define _tstol _wtol | |
| 219 | +#define _tstoi _wtoi | |
| 220 | +#define _tstoi64 _wtoi64 | |
| 221 | +#define _tcstod_l _wcstod_l | |
| 222 | +#define _tcstol_l _wcstol_l | |
| 223 | +#define _tcstoul_l _wcstoul_l | |
| 224 | +#define _tcstoi64_l _wcstoi64_l | |
| 225 | +#define _tcstoui64_l _wcstoui64_l | |
| 226 | +#define _tstof_l _wtof_l | |
| 227 | +#define _tstol_l _wtol_l | |
| 228 | +#define _tstoi_l _wtoi_l | |
| 229 | +#define _tstoi64_l _wtoi64_l | |
| 230 | + | |
| 231 | +#define _itot _itow | |
| 232 | +#define _ltot _ltow | |
| 233 | +#define _ultot _ultow | |
| 234 | +#define _ttoi _wtoi | |
| 235 | +#define _ttol _wtol | |
| 236 | + | |
| 237 | +#define _ttoi64 _wtoi64 | |
| 238 | +#define _i64tot _i64tow | |
| 239 | +#define _ui64tot _ui64tow | |
| 240 | + | |
| 241 | +#define _tcscat wcscat | |
| 242 | +#define _tcschr wcschr | |
| 243 | +#define _tcscpy wcscpy | |
| 244 | +#define _tcscspn wcscspn | |
| 245 | +#define _tcslen wcslen | |
| 246 | +#define _tcsnlen wcsnlen | |
| 247 | +#define _tcsncat wcsncat | |
| 248 | +#define _tcsncat_l _wcsncat_l | |
| 249 | +#define _tcsncpy wcsncpy | |
| 250 | +#define _tcsncpy_l _wcsncpy_l | |
| 251 | +#define _tcspbrk wcspbrk | |
| 252 | +#define _tcsrchr wcsrchr | |
| 253 | +#define _tcsspn wcsspn | |
| 254 | +#define _tcsstr wcsstr | |
| 255 | +#define _tcstok wcstok | |
| 256 | +#define _tcstok_l _wcstok_l | |
| 257 | +#define _tcserror _wcserror | |
| 258 | +#define __tcserror __wcserror | |
| 259 | + | |
| 260 | +#define _tcsdup _wcsdup | |
| 261 | +#define _tcsnset _wcsnset | |
| 262 | +#define _tcsnset_l _wcsnset_l | |
| 263 | +#define _tcsrev _wcsrev | |
| 264 | +#define _tcsset _wcsset | |
| 265 | +#define _tcsset_l _wcsset_l | |
| 266 | + | |
| 267 | +#define _tcscmp wcscmp | |
| 268 | +#define _tcsicmp _wcsicmp | |
| 269 | +#define _tcsicmp_l _wcsicmp_l | |
| 270 | +#define _tcsnccmp wcsncmp | |
| 271 | +#define _tcsncmp wcsncmp | |
| 272 | +#define _tcsncicmp _wcsnicmp | |
| 273 | +#define _tcsncicmp_l _wcsnicmp_l | |
| 274 | +#define _tcsnicmp _wcsnicmp | |
| 275 | +#define _tcsnicmp_l _wcsnicmp_l | |
| 276 | + | |
| 277 | +#define _tcscoll wcscoll | |
| 278 | +#define _tcscoll_l _wcscoll_l | |
| 279 | +#define _tcsicoll _wcsicoll | |
| 280 | +#define _tcsicoll_l _wcsicoll_l | |
| 281 | +#define _tcsnccoll _wcsncoll | |
| 282 | +#define _tcsnccoll_l _wcsncoll_l | |
| 283 | +#define _tcsncoll _wcsncoll | |
| 284 | +#define _tcsncoll_l _wcsncoll_l | |
| 183 | 285 | #define _tcsncicoll _wcsnicoll |
| 184 | −#define _tcsnicoll _wcsnicoll | |
| 185 | −#define _taccess _waccess | |
| 186 | −#define _tchmod _wchmod | |
| 187 | −#define _tcreat _wcreat | |
| 286 | +#define _tcsncicoll_l _wcsnicoll_l | |
| 287 | +#define _tcsnicoll _wcsnicoll | |
| 288 | +#define _tcsnicoll_l _wcsnicoll_l | |
| 289 | + | |
| 290 | +#define _texecl _wexecl | |
| 291 | +#define _texecle _wexecle | |
| 292 | +#define _texeclp _wexeclp | |
| 293 | +#define _texeclpe _wexeclpe | |
| 294 | +#define _texecv _wexecv | |
| 295 | +#define _texecve _wexecve | |
| 296 | +#define _texecvp _wexecvp | |
| 297 | +#define _texecvpe _wexecvpe | |
| 298 | + | |
| 299 | +#define _tspawnl _wspawnl | |
| 300 | +#define _tspawnle _wspawnle | |
| 301 | +#define _tspawnlp _wspawnlp | |
| 302 | +#define _tspawnlpe _wspawnlpe | |
| 303 | +#define _tspawnv _wspawnv | |
| 304 | +#define _tspawnve _wspawnve | |
| 305 | +#define _tspawnvp _wspawnvp | |
| 306 | +#define _tspawnvp _wspawnvp | |
| 307 | +#define _tspawnvpe _wspawnvpe | |
| 308 | + | |
| 309 | +#define _tsystem _wsystem | |
| 310 | + | |
| 311 | +#define _tasctime _wasctime | |
| 312 | +#define _tctime _wctime | |
| 313 | +#define _tctime32 _wctime32 | |
| 314 | +#define _tctime64 _wctime64 | |
| 315 | +#define _tstrdate _wstrdate | |
| 316 | +#define _tstrtime _wstrtime | |
| 317 | +#define _tutime _wutime | |
| 318 | +#define _tutime32 _wutime32 | |
| 319 | +#define _tutime64 _wutime64 | |
| 320 | +#define _tcsftime wcsftime | |
| 321 | +#define _tcsftime_l _wcsftime_l | |
| 322 | + | |
| 323 | +#define _tchdir _wchdir | |
| 324 | +#define _tgetcwd _wgetcwd | |
| 325 | +#define _tgetdcwd _wgetdcwd | |
| 326 | +#define _tgetdcwd_nolock _wgetdcwd_nolock | |
| 327 | +#define _tmkdir _wmkdir | |
| 328 | +#define _trmdir _wrmdir | |
| 329 | + | |
| 330 | +#define _tfullpath _wfullpath | |
| 331 | +#define _tgetenv _wgetenv | |
| 332 | +#define _tmakepath _wmakepath | |
| 333 | +#define _tpgmptr _wpgmptr | |
| 334 | +#define _get_tpgmptr _get_wpgmptr | |
| 335 | +#define _tputenv _wputenv | |
| 336 | +#define _tsearchenv _wsearchenv | |
| 337 | +#define _tsplitpath _wsplitpath | |
| 338 | + | |
| 339 | +#define _tfdopen _wfdopen | |
| 340 | +#define _tfsopen _wfsopen | |
| 341 | +#define _tfopen _wfopen | |
| 342 | +#define _tfreopen _wfreopen | |
| 343 | +#define _tperror _wperror | |
| 344 | +#define _tpopen _wpopen | |
| 345 | +#define _ttempnam _wtempnam | |
| 346 | +#define _ttmpnam _wtmpnam | |
| 347 | + | |
| 348 | +#define _taccess _waccess | |
| 349 | +#define _tchmod _wchmod | |
| 350 | +#define _tcreat _wcreat | |
| 188 | 351 | #define _tfindfirst _wfindfirst |
| 189 | −#define _tfindnext _wfindnext | |
| 190 | −#define _tfopen _wfopen | |
| 191 | −#define _tgetenv _wgetenv | |
| 192 | −#define _tmktemp _wmktemp | |
| 193 | −#define _topen _wopen | |
| 194 | −#define _tremove _wremove | |
| 195 | −#define _trename _wrename | |
| 196 | −#define _tsopen _wsopen | |
| 197 | −#define _tsetlocale _wsetlocale | |
| 198 | −#define _tunlink _wunlink | |
| 199 | −#define _tfinddata_t _wfinddata_t | |
| 200 | −#define _tfindfirsti64 _wfindfirsti64 | |
| 201 | −#define _tfindnexti64 _wfindnexti64 | |
| 352 | +#define _tfindfirst32 _wfindfirst32 | |
| 353 | +#define _tfindfirst64 _wfindfirst64 | |
| 354 | +#define _tfindfirsti64 _wfindfirsti64 | |
| 355 | +#define _tfindfirst32i64 _wfindfirst32i64 | |
| 356 | +#define _tfindfirst64i32 _wfindfirst64i32 | |
| 357 | +#define _tfindnext _wfindnext | |
| 358 | +#define _tfindnext32 _wfindnext32 | |
| 359 | +#define _tfindnext64 _wfindnext64 | |
| 360 | +#define _tfindnexti64 _wfindnexti64 | |
| 361 | +#define _tfindnext32i64 _wfindnext32i64 | |
| 362 | +#define _tfindnext64i32 _wfindnext64i32 | |
| 363 | +#define _tmktemp _wmktemp | |
| 364 | +#define _topen _wopen | |
| 365 | +#define _tremove _wremove | |
| 366 | +#define _trename _wrename | |
| 367 | +#define _tsopen _wsopen | |
| 368 | +#define _tunlink _wunlink | |
| 369 | + | |
| 370 | +#define _tfinddata_t _wfinddata_t | |
| 371 | +#define _tfinddata32_t _wfinddata32_t | |
| 372 | +#define _tfinddata64_t _wfinddata64_t | |
| 202 | 373 | #define _tfinddatai64_t _wfinddatai64_t |
| 203 | −#endif /* __MSVCRT__ */ | |
| 374 | +#define _tfinddata32i64_t _wfinddata32i64_t | |
| 375 | +#define _tfinddata64i32_t _wfinddata64i32_t | |
| 204 | 376 | |
| 205 | −#else /* Not _UNICODE */ | |
| 377 | +#define _tstat _wstat | |
| 378 | +#define _tstat32 _wstat32 | |
| 379 | +#define _tstat32i64 _wstat32i64 | |
| 380 | +#define _tstat64 _wstat64 | |
| 381 | +#define _tstat64i32 _wstat64i32 | |
| 382 | +#define _tstati64 _wstati64 | |
| 206 | 383 | |
| 207 | −/* | |
| 208 | − * TCHAR, the type you should use instead of char. | |
| 209 | − */ | |
| 210 | −#ifndef _TCHAR_DEFINED | |
| 211 | −#ifndef RC_INVOKED | |
| 212 | −typedef char TCHAR; | |
| 213 | −typedef char _TCHAR; | |
| 384 | +#define _tsetlocale _wsetlocale | |
| 385 | + | |
| 386 | +#define _tcsclen wcslen | |
| 387 | +#define _tcscnlen wcsnlen | |
| 388 | +#define _tcsclen_l(_String,_Locale) wcslen(_String) | |
| 389 | +#define _tcscnlen_l(_String,_Max_count,_Locale) wcsnlen_l((_String),(_Max_count)) | |
| 390 | +#define _tcsnccat wcsncat | |
| 391 | +#define _tcsnccat_l _wcsncat_l | |
| 392 | +#define _tcsnccpy wcsncpy | |
| 393 | +#define _tcsnccpy_l _wcsncpy_l | |
| 394 | +#define _tcsncset _wcsnset | |
| 395 | + | |
| 396 | +#define _tcsdec _wcsdec | |
| 397 | +#define _tcsinc _wcsinc | |
| 398 | +#define _tcsnbcnt _wcsncnt | |
| 399 | +#define _tcsnccnt _wcsncnt | |
| 400 | +#define _tcsnextc _wcsnextc | |
| 401 | +#define _tcsninc _wcsninc | |
| 402 | +#define _tcsspnp _wcsspnp | |
| 403 | + | |
| 404 | +#define _tcslwr _wcslwr | |
| 405 | +#define _tcslwr_l _wcslwr_l | |
| 406 | +#define _tcsupr _wcsupr | |
| 407 | +#define _tcsupr_l _wcsupr_l | |
| 408 | +#define _tcsxfrm wcsxfrm | |
| 409 | +#define _tcsxfrm_l _wcsxfrm_l | |
| 410 | + | |
| 411 | +#define _tclen(_pc) (1) | |
| 412 | +#define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2))) | |
| 413 | +#define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2))) | |
| 414 | + | |
| 415 | +#define _istalnum iswalnum | |
| 416 | +#define _istalnum_l _iswalnum_l | |
| 417 | +#define _istalpha iswalpha | |
| 418 | +#define _istalpha_l _iswalpha_l | |
| 419 | +#define _istascii iswascii | |
| 420 | +#define _istcntrl iswcntrl | |
| 421 | +#define _istcntrl_l _iswcntrl_l | |
| 422 | +#define _istdigit iswdigit | |
| 423 | +#define _istdigit_l _iswdigit_l | |
| 424 | +#define _istgraph iswgraph | |
| 425 | +#define _istgraph_l _iswgraph_l | |
| 426 | +#define _istlower iswlower | |
| 427 | +#define _istlower_l _iswlower_l | |
| 428 | +#define _istprint iswprint | |
| 429 | +#define _istprint_l _iswprint_l | |
| 430 | +#define _istpunct iswpunct | |
| 431 | +#define _istpunct_l _iswpunct_l | |
| 432 | +#define _istspace iswspace | |
| 433 | +#define _istspace_l _iswspace_l | |
| 434 | +#define _istupper iswupper | |
| 435 | +#define _istupper_l _iswupper_l | |
| 436 | +#define _istxdigit iswxdigit | |
| 437 | +#define _istxdigit_l _iswxdigit_l | |
| 438 | + | |
| 439 | +#define _totupper towupper | |
| 440 | +#define _totupper_l _towupper_l | |
| 441 | +#define _totlower towlower | |
| 442 | +#define _totlower_l _towlower_l | |
| 443 | + | |
| 444 | +#define _istlegal(_Char) (1) | |
| 445 | +#define _istlead(_Char) (0) | |
| 446 | +#define _istleadbyte(_Char) (0) | |
| 447 | +#define _istleadbyte_l(_Char,_Locale) (0) | |
| 448 | + | |
| 449 | +#define _wcsdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1) | |
| 450 | +#define _wcsinc(_pc) ((_pc)+1) | |
| 451 | +#define _wcsnextc(_cpc) ((unsigned int) *(_cpc)) | |
| 452 | +#define _wcsninc(_pc,_sz) (((_pc)+(_sz))) | |
| 453 | + _CRTIMP size_t __cdecl __wcsncnt(const wchar_t *_Str,size_t _MaxCount); | |
| 454 | +#define _wcsncnt(_cpc,_sz) (__wcsncnt(_cpc,_sz)) | |
| 455 | +#define _wcsspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL)) | |
| 456 | +#define _wcsncpy_l(_Destination,_Source,_Count,_Locale) (wcsncpy(_Destination,_Source,_Count)) | |
| 457 | +#define _wcsncat_l(_Destination,_Source,_Count,_Locale) (wcsncat(_Destination,_Source,_Count)) | |
| 458 | +#define _wcstok_l(_String,_Delimiters,_Locale) (wcstok(_String,_Delimiters)) | |
| 459 | +#define _wcsnset_l(_Destination,_Value,_Count,_Locale) (_wcsnset(_Destination,_Value,_Count)) | |
| 460 | +#define _wcsset_l(_Destination,_Value,_Locale) (_wcsset(_Destination,_Value)) | |
| 461 | + | |
| 462 | + /* dirent structures and functions */ | |
| 463 | +#define _tdirent _wdirent | |
| 464 | +#define _TDIR _WDIR | |
| 465 | +#define _topendir _wopendir | |
| 466 | +#define _tclosedir _wclosedir | |
| 467 | +#define _treaddir _wreaddir | |
| 468 | +#define _trewinddir _wrewinddir | |
| 469 | +#define _ttelldir _wtelldir | |
| 470 | +#define _tseekdir _wseekdir | |
| 471 | + | |
| 472 | +#else | |
| 473 | + | |
| 474 | +#ifdef __cplusplus | |
| 475 | +} | |
| 214 | 476 | #endif |
| 215 | −#define _TCHAR_DEFINED | |
| 477 | + | |
| 478 | +#include <string.h> | |
| 479 | + | |
| 480 | +#ifdef __cplusplus | |
| 481 | +extern "C" { | |
| 216 | 482 | #endif |
| 217 | 483 | |
| 218 | −/* | |
| 219 | − * __TEXT is a private macro whose specific use is to force the expansion of a | |
| 220 | − * macro passed as an argument to the macros _T or _TEXT. DO NOT use this | |
| 221 | − * macro within your programs. It's name and function could change without | |
| 222 | − * notice. | |
| 223 | − */ | |
| 224 | −#define __TEXT(x) x | |
| 484 | +#define _TEOF EOF | |
| 225 | 485 | |
| 226 | −/* for porting from other Windows compilers */ | |
| 227 | −#define _tmain main | |
| 228 | −#define _tWinMain WinMain | |
| 229 | −#define _tenviron _environ | |
| 230 | −#define __targv __argv | |
| 486 | +#define __T(x) x | |
| 231 | 487 | |
| 232 | −/* | |
| 233 | − * Non-unicode (standard) functions | |
| 234 | − */ | |
| 488 | +#define _tmain main | |
| 489 | +#define _tWinMain WinMain | |
| 490 | +#ifdef _POSIX_ | |
| 491 | +#define _tenviron environ | |
| 492 | +#else | |
| 493 | +#define _tenviron _environ | |
| 494 | +#endif | |
| 495 | +#define __targv __argv | |
| 496 | + | |
| 497 | +#define _tprintf printf | |
| 498 | +#define _tprintf_l _printf_l | |
| 499 | +#define _tprintf_p _printf_p | |
| 500 | +#define _tprintf_p_l _printf_p_l | |
| 501 | +#define _tcprintf _cprintf | |
| 502 | +#define _tcprintf_l _cprintf_l | |
| 503 | +#define _tcprintf_p _cprintf_p | |
| 504 | +#define _tcprintf_p_l _cprintf_p_l | |
| 505 | +#define _vtcprintf _vcprintf | |
| 506 | +#define _vtcprintf_l _vcprintf_l | |
| 507 | +#define _vtcprintf_p _vcprintf_p | |
| 508 | +#define _vtcprintf_p_l _vcprintf_p_l | |
| 509 | +#define _ftprintf fprintf | |
| 510 | +#define _ftprintf_l _fprintf_l | |
| 511 | +#define _ftprintf_p _fprintf_p | |
| 512 | +#define _ftprintf_p_l _fprintf_p_l | |
| 513 | +#define _stprintf sprintf | |
| 514 | +#define _stprintf_l _sprintf_l | |
| 515 | +#define _stprintf_p _sprintf_p | |
| 516 | +#define _stprintf_p_l _sprintf_p_l | |
| 517 | +#define _sctprintf _scprintf | |
| 518 | +#define _sctprintf_l _scprintf_l | |
| 519 | +#define _sctprintf_p _scprintf_p | |
| 520 | +#define _sctprintf_p_l _scprintf_p_l | |
| 521 | +#define _sntprintf _snprintf | |
| 522 | +#define _sntprintf_l _snprintf_l | |
| 523 | +#define _vtprintf vprintf | |
| 524 | +#define _vtprintf_l _vprintf_l | |
| 525 | +#define _vtprintf_p _vprintf_p | |
| 526 | +#define _vtprintf_p_l _vprintf_p_l | |
| 527 | +#define _vftprintf vfprintf | |
| 528 | +#define _vftprintf_l _vfprintf_l | |
| 529 | +#define _vftprintf_p _vfprintf_p | |
| 530 | +#define _vftprintf_p_l _vfprintf_p_l | |
| 531 | +#define _vstprintf vsprintf | |
| 532 | +#define _vstprintf_l _vsprintf_l | |
| 533 | +#define _vstprintf_p _vsprintf_p | |
| 534 | +#define _vstprintf_p_l _vsprintf_p_l | |
| 535 | +#define _vsctprintf _vscprintf | |
| 536 | +#define _vsctprintf_l _vscprintf_l | |
| 537 | +#define _vsctprintf_p _vscprintf_p | |
| 538 | +#define _vsctprintf_p_l _vscprintf_p_l | |
| 539 | +#define _vsntprintf _vsnprintf | |
| 540 | +#define _vsntprintf_l _vsnprintf_l | |
| 541 | + | |
| 542 | +#define _tscanf scanf | |
| 543 | +#define _tscanf_l _scanf_l | |
| 544 | +#define _tcscanf _cscanf | |
| 545 | +#define _tcscanf_l _cscanf_l | |
| 546 | +#define _ftscanf fscanf | |
| 547 | +#define _ftscanf_l _fscanf_l | |
| 548 | +#define _stscanf sscanf | |
| 549 | +#define _stscanf_l _sscanf_l | |
| 550 | +#define _sntscanf _snscanf | |
| 551 | +#define _sntscanf_l _snscanf_l | |
| 552 | + | |
| 553 | +#define _fgettc fgetc | |
| 554 | +#define _fgettc_nolock _fgetc_nolock | |
| 555 | +#define _fgettchar _fgetchar | |
| 556 | +#define _fgetts fgets | |
| 557 | +#define _fputtc fputc | |
| 558 | +#define _fputtc_nolock _fputc_nolock | |
| 559 | +#define _fputtchar _fputchar | |
| 560 | +#define _fputts fputs | |
| 561 | +#define _cputts _cputs | |
| 562 | +#define _gettc getc | |
| 563 | +#define _gettc_nolock _getc_nolock | |
| 564 | +#define _gettch _getch | |
| 565 | +#define _gettch_nolock _getch_nolock | |
| 566 | +#define _gettche _getche | |
| 567 | +#define _gettche_nolock _getche_nolock | |
| 568 | +#define _gettchar getchar | |
| 569 | +#define _gettchar_nolock _getchar_nolock | |
| 570 | +#define _getts gets | |
| 571 | +#define _cgetts _cgets | |
| 572 | +#define _puttc putc | |
| 573 | +#define _puttc_nolock _putc_nolock | |
| 574 | +#define _puttchar putchar | |
| 575 | +#define _puttchar_nolock _putchar_nolock | |
| 576 | +#define _puttch _putch | |
| 577 | +#define _puttch_nolock _putch_nolock | |
| 578 | +#define _putts puts | |
| 579 | +#define _ungettc ungetc | |
| 580 | +#define _ungettc_nolock _ungetc_nolock | |
| 581 | +#define _ungettch _ungetch | |
| 582 | +#define _ungettch_nolock _ungetch_nolock | |
| 583 | + | |
| 584 | +#define _tcstod strtod | |
| 585 | +#define _tcstol strtol | |
| 586 | +#define _tcstoul strtoul | |
| 587 | +#define _tstof atof | |
| 588 | +#define _tstol atol | |
| 589 | +#define _tstoi atoi | |
| 590 | +#define _tstoi64 _atoi64 | |
| 591 | +#define _tcstod_l _strtod_l | |
| 592 | +#define _tcstol_l _strtol_l | |
| 593 | +#define _tcstoul_l _strtoul_l | |
| 594 | +#define _tstof_l _atof_l | |
| 595 | +#define _tstol_l _atol_l | |
| 596 | +#define _tstoi_l _atoi_l | |
| 597 | +#define _tstoi64_l _atoi64_l | |
| 598 | + | |
| 599 | +#define _itot _itoa | |
| 600 | +#define _ltot _ltoa | |
| 601 | +#define _ultot _ultoa | |
| 602 | +#define _ttoi atoi | |
| 603 | +#define _ttol atol | |
| 604 | + | |
| 605 | +#define _ttoi64 _atoi64 | |
| 606 | +#define _tcstoi64 _strtoi64 | |
| 607 | +#define _tcstoi64_l _strtoi64_l | |
| 608 | +#define _tcstoui64 _strtoui64 | |
| 609 | +#define _tcstoui64_l _strtoui64_l | |
| 610 | +#define _i64tot _i64toa | |
| 611 | +#define _ui64tot _ui64toa | |
| 235 | 612 | |
| 236 | −#define _tprintf printf | |
| 237 | −#define _ftprintf fprintf | |
| 238 | −#define _stprintf sprintf | |
| 239 | −#define _sntprintf _snprintf | |
| 240 | −#define _vtprintf vprintf | |
| 241 | −#define _vftprintf vfprintf | |
| 242 | −#define _vstprintf vsprintf | |
| 243 | −#define _vsntprintf _vsnprintf | |
| 244 | −#define _tscanf scanf | |
| 245 | −#define _ftscanf fscanf | |
| 246 | −#define _stscanf sscanf | |
| 247 | −#define _fgettc fgetc | |
| 248 | −#define _fgettchar _fgetchar | |
| 249 | −#define _fgetts fgets | |
| 250 | −#define _fputtc fputc | |
| 251 | −#define _fputtchar _fputchar | |
| 252 | −#define _fputts fputs | |
| 253 | −#define _tfopen fopen | |
| 254 | −#define _tgetenv getenv | |
| 255 | −#define _gettc getc | |
| 256 | −#define _getts gets | |
| 257 | −#define _puttc putc | |
| 258 | −#define _putts puts | |
| 259 | −#define _ungettc ungetc | |
| 260 | −#define _tcstod strtod | |
| 261 | −#define _tcstol strtol | |
| 262 | −#define _tcstoul strtoul | |
| 263 | −#define _itot _itoa | |
| 264 | −#define _ltot _ltoa | |
| 265 | −#define _ultot _ultoa | |
| 266 | −#define _ttoi atoi | |
| 267 | −#define _ttol atol | |
| 268 | −#define _tcscat strcat | |
| 269 | −#define _tcschr strchr | |
| 270 | −#define _tcscmp strcmp | |
| 271 | −#define _tcscpy strcpy | |
| 272 | −#define _tcscspn strcspn | |
| 273 | −#define _tcslen strlen | |
| 274 | −#define _tcsncat strncat | |
| 275 | −#define _tcsncmp strncmp | |
| 276 | −#define _tcsncpy strncpy | |
| 277 | −#define _tcspbrk strpbrk | |
| 278 | −#define _tcsrchr strrchr | |
| 279 | −#define _tcsspn strspn | |
| 280 | −#define _tcsstr strstr | |
| 281 | −#define _tcstok strtok | |
| 282 | −#define _tcsdup _strdup | |
| 283 | −#define _tcsicmp _stricmp | |
| 284 | −#define _tcsnicmp _strnicmp | |
| 285 | −#define _tcsnset _strnset | |
| 286 | −#define _tcsrev _strrev | |
| 287 | −#define _tcsset _strset | |
| 288 | −#define _tcslwr _strlwr | |
| 289 | −#define _tcsupr _strupr | |
| 290 | −#define _tcsxfrm strxfrm | |
| 291 | −#define _tcscoll strcoll | |
| 292 | −#define _tcsicoll _stricoll | |
| 293 | −#define _istalpha isalpha | |
| 294 | −#define _istupper isupper | |
| 295 | −#define _istlower islower | |
| 296 | −#define _istdigit isdigit | |
| 297 | −#define _istxdigit isxdigit | |
| 298 | −#define _istspace isspace | |
| 299 | −#define _istpunct ispunct | |
| 300 | −#define _istalnum isalnum | |
| 301 | −#define _istprint isprint | |
| 302 | −#define _istgraph isgraph | |
| 303 | −#define _istcntrl iscntrl | |
| 304 | −#define _istascii isascii | |
| 305 | −#define _totupper toupper | |
| 306 | −#define _totlower tolower | |
| 307 | −#define _tasctime asctime | |
| 308 | −#define _tctime ctime | |
| 309 | −#define _tstrdate _strdate | |
| 310 | −#define _tstrtime _strtime | |
| 311 | −#define _tutime _utime | |
| 312 | −#define _tcsftime strftime | |
| 313 | −/* Macro functions */ | |
| 314 | −#define _tcsdec _strdec | |
| 315 | −#define _tcsinc _strinc | |
| 316 | −#define _tcsnbcnt _strncnt | |
| 317 | −#define _tcsnccnt _strncnt | |
| 318 | −#define _tcsnextc _strnextc | |
| 319 | −#define _tcsninc _strninc | |
| 320 | −#define _tcsspnp _strspnp | |
| 321 | −#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1) | |
| 322 | −#define _strinc(_str) ((_str)+1) | |
| 323 | −#define _strnextc(_str) ((unsigned int) *(_str)) | |
| 324 | −#define _strninc(_str, _inc) (((_str)+(_inc))) | |
| 325 | −#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str)) | |
| 326 | −#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL) | |
| 327 | − | |
| 328 | −#define _tchmod _chmod | |
| 329 | −#define _tcreat _creat | |
| 613 | +#define _tcscat strcat | |
| 614 | +#define _tcscpy strcpy | |
| 615 | +#define _tcsdup _strdup | |
| 616 | +#define _tcslen strlen | |
| 617 | +#if 0 | |
| 618 | +#define _tcsnlen strnlen | |
| 619 | +#endif | |
| 620 | +#define _tcsxfrm strxfrm | |
| 621 | +#define _tcsxfrm_l _strxfrm_l | |
| 622 | +#define _tcserror strerror | |
| 623 | +#define __tcserror _strerror | |
| 624 | + | |
| 625 | +#define _texecl _execl | |
| 626 | +#define _texecle _execle | |
| 627 | +#define _texeclp _execlp | |
| 628 | +#define _texeclpe _execlpe | |
| 629 | +#define _texecv _execv | |
| 630 | +#define _texecve _execve | |
| 631 | +#define _texecvp _execvp | |
| 632 | +#define _texecvpe _execvpe | |
| 633 | + | |
| 634 | +#define _tspawnl _spawnl | |
| 635 | +#define _tspawnle _spawnle | |
| 636 | +#define _tspawnlp _spawnlp | |
| 637 | +#define _tspawnlpe _spawnlpe | |
| 638 | +#define _tspawnv _spawnv | |
| 639 | +#define _tspawnve _spawnve | |
| 640 | +#define _tspawnvp _spawnvp | |
| 641 | +#define _tspawnvpe _spawnvpe | |
| 642 | + | |
| 643 | +#define _tsystem system | |
| 644 | + | |
| 645 | +#define _tasctime asctime | |
| 646 | +#define _tctime ctime | |
| 647 | +#define _tctime32 _ctime32 | |
| 648 | +#define _tctime64 _ctime64 | |
| 649 | +#define _tstrdate _strdate | |
| 650 | +#define _tstrtime _strtime | |
| 651 | +#define _tutime _utime | |
| 652 | +#define _tutime32 _utime32 | |
| 653 | +#define _tutime64 _utime64 | |
| 654 | +#define _tcsftime strftime | |
| 655 | +#define _tcsftime_l _strftime_l | |
| 656 | + | |
| 657 | +#define _tchdir _chdir | |
| 658 | +#define _tgetcwd _getcwd | |
| 659 | +#define _tgetdcwd _getdcwd | |
| 660 | +#define _tgetdcwd_nolock _getdcwd_nolock | |
| 661 | +#define _tmkdir _mkdir | |
| 662 | +#define _trmdir _rmdir | |
| 663 | + | |
| 664 | +#define _tfullpath _fullpath | |
| 665 | +#define _tgetenv getenv | |
| 666 | +#define _tmakepath _makepath | |
| 667 | +#define _tpgmptr _pgmptr | |
| 668 | +#define _get_tpgmptr _get_pgmptr | |
| 669 | +#define _tputenv _putenv | |
| 670 | +#define _tsearchenv _searchenv | |
| 671 | +#define _tsplitpath _splitpath | |
| 672 | + | |
| 673 | +#ifdef _POSIX_ | |
| 674 | +#define _tfdopen fdopen | |
| 675 | +#else | |
| 676 | +#define _tfdopen _fdopen | |
| 677 | +#endif | |
| 678 | +#define _tfsopen _fsopen | |
| 679 | +#define _tfopen fopen | |
| 680 | +#define _tfreopen freopen | |
| 681 | +#define _tperror perror | |
| 682 | +#define _tpopen _popen | |
| 683 | +#define _ttempnam _tempnam | |
| 684 | +#define _ttmpnam tmpnam | |
| 685 | + | |
| 686 | +#define _tchmod _chmod | |
| 687 | +#define _tcreat _creat | |
| 330 | 688 | #define _tfindfirst _findfirst |
| 331 | −#define _tfindnext _findnext | |
| 332 | −#define _tmktemp _mktemp | |
| 333 | −#define _topen _open | |
| 334 | −#define _taccess _access | |
| 335 | −#define _tremove remove | |
| 336 | −#define _trename rename | |
| 337 | −#define _tsopen _sopen | |
| 689 | +#define _tfindfirst32 _findfirst32 | |
| 690 | +#define _tfindfirst64 _findfirst64 | |
| 691 | +#define _tfindfirsti64 _findfirsti64 | |
| 692 | +#define _tfindfirst32i64 _findfirst32i64 | |
| 693 | +#define _tfindfirst64i32 _findfirst64i32 | |
| 694 | +#define _tfindnext _findnext | |
| 695 | +#define _tfindnext32 _findnext32 | |
| 696 | +#define _tfindnext64 _findnext64 | |
| 697 | +#define _tfindnexti64 _findnexti64 | |
| 698 | +#define _tfindnext32i64 _findnext32i64 | |
| 699 | +#define _tfindnext64i32 _findnext64i32 | |
| 700 | +#define _tmktemp _mktemp | |
| 701 | + | |
| 702 | +#ifdef _POSIX_ | |
| 703 | +#define _topen open | |
| 704 | +#define _taccess access | |
| 705 | +#else | |
| 706 | +#define _topen _open | |
| 707 | +#define _taccess _access | |
| 708 | +#endif | |
| 709 | + | |
| 710 | +#define _tremove remove | |
| 711 | +#define _trename rename | |
| 712 | +#define _tsopen _sopen | |
| 713 | +#define _tunlink _unlink | |
| 714 | + | |
| 715 | +#define _tfinddata_t _finddata_t | |
| 716 | +#define _tfinddata32_t _finddata32_t | |
| 717 | +#define _tfinddata64_t __finddata64_t | |
| 718 | +#define _tfinddatai64_t _finddatai64_t | |
| 719 | +#define _tfinddata32i64_t _finddata32i64_t | |
| 720 | +#define _tfinddata64i32_t _finddata64i32_t | |
| 721 | + | |
| 722 | +#define _istascii __isascii | |
| 723 | +#define _istcntrl iscntrl | |
| 724 | +#define _istcntrl_l _iscntrl_l | |
| 725 | +#define _istxdigit isxdigit | |
| 726 | +#define _istxdigit_l _isxdigit_l | |
| 727 | + | |
| 728 | +#define _tstat _stat | |
| 729 | +#define _tstat32 _stat32 | |
| 730 | +#define _tstat32i64 _stat32i64 | |
| 731 | +#define _tstat64 _stat64 | |
| 732 | +#define _tstat64i32 _stat64i32 | |
| 733 | +#define _tstati64 _stati64 | |
| 734 | + | |
| 338 | 735 | #define _tsetlocale setlocale |
| 339 | −#define _tunlink _unlink | |
| 340 | −#define _tfinddata_t _finddata_t | |
| 341 | 736 | |
| 737 | +#ifdef _MBCS | |
| 738 | + | |
| 739 | +#ifdef __cplusplus | |
| 740 | +} | |
| 741 | +#endif | |
| 742 | + | |
| 743 | +#include <mbstring.h> | |
| 744 | + | |
| 745 | +#ifdef __cplusplus | |
| 746 | +extern "C" { | |
| 747 | +#endif | |
| 748 | + | |
| 749 | +#ifndef __TCHAR_DEFINED | |
| 750 | + typedef char _TCHAR; | |
| 751 | + typedef signed char _TSCHAR; | |
| 752 | + typedef unsigned char _TUCHAR; | |
| 753 | + typedef unsigned char _TXCHAR; | |
| 754 | + typedef unsigned int _TINT; | |
| 755 | +#define __TCHAR_DEFINED | |
| 756 | +#endif | |
| 757 | + | |
| 758 | +#ifndef _TCHAR_DEFINED | |
| 759 | +#ifndef NO_OLDNAMES | |
| 760 | + typedef char TCHAR; | |
| 761 | +#endif | |
| 762 | +#define _TCHAR_DEFINED | |
| 763 | +#endif | |
| 764 | + | |
| 765 | +#ifdef _MB_MAP_DIRECT | |
| 766 | + | |
| 767 | +#define _tcschr _mbschr | |
| 768 | +#define _tcscspn _mbscspn | |
| 769 | +#define _tcsncat _mbsnbcat | |
| 770 | +#define _tcsncat_l _mbsnbcat_l | |
| 771 | +#define _tcsncpy _mbsnbcpy | |
| 772 | +#define _tcsncpy_l _mbsnbcpy_l | |
| 773 | +#define _tcspbrk _mbspbrk | |
| 774 | +#define _tcsrchr _mbsrchr | |
| 775 | +#define _tcsspn _mbsspn | |
| 776 | +#define _tcsstr _mbsstr | |
| 777 | +#define _tcstok _mbstok | |
| 778 | +#define _tcstok_l _mbstok_l | |
| 779 | + | |
| 780 | +#define _tcsnset _mbsnbset | |
| 781 | +#define _tcsnset_l _mbsnbset_l | |
| 782 | +#define _tcsrev _mbsrev | |
| 783 | +#define _tcsset _mbsset | |
| 784 | +#define _tcsset_l _mbsset_l | |
| 785 | + | |
| 786 | +#define _tcscmp _mbscmp | |
| 787 | +#define _tcsicmp _mbsicmp | |
| 788 | +#define _tcsicmp_l _mbsicmp_l | |
| 789 | +#define _tcsnccmp _mbsncmp | |
| 790 | +#define _tcsncmp _mbsnbcmp | |
| 791 | +#define _tcsncicmp _mbsnicmp | |
| 792 | +#define _tcsncicmp_l _mbsnicmp_l | |
| 793 | +#define _tcsnicmp _mbsnbicmp | |
| 794 | +#define _tcsnicmp_l _mbsnbicmp_l | |
| 795 | + | |
| 796 | +#define _tcscoll _mbscoll | |
| 797 | +#define _tcscoll_l _mbscoll_l | |
| 798 | +#define _tcsicoll _mbsicoll | |
| 799 | +#define _tcsicoll_l _mbsicoll_l | |
| 800 | +#define _tcsnccoll _mbsncoll | |
| 801 | +#define _tcsnccoll_l _mbsncoll_l | |
| 802 | +#define _tcsncoll _mbsnbcoll | |
| 803 | +#define _tcsncoll_l _mbsnbcoll_l | |
| 804 | +#define _tcsncicoll _mbsnicoll | |
| 805 | +#define _tcsncicoll_l _mbsnicoll_l | |
| 806 | +#define _tcsnicoll _mbsnbicoll | |
| 807 | +#define _tcsnicoll_l _mbsnbicoll_l | |
| 808 | + | |
| 809 | +#define _tcsclen _mbslen | |
| 810 | +#define _tcscnlen _mbsnlen | |
| 811 | +#define _tcsclen_l _mbslen_l | |
| 812 | +#define _tcscnlen_l _mbsnlen_l | |
| 813 | +#define _tcsnccat _mbsncat | |
| 814 | +#define _tcsnccat_l _mbsncat_l | |
| 815 | +#define _tcsnccpy _mbsncpy | |
| 816 | +#define _tcsnccpy_l _mbsncpy_l | |
| 817 | +#define _tcsncset _mbsnset | |
| 818 | +#define _tcsncset_l _mbsnset_l | |
| 819 | + | |
| 820 | +#define _tcsdec _mbsdec | |
| 821 | +#define _tcsinc _mbsinc | |
| 822 | +#define _tcsnbcnt _mbsnbcnt | |
| 823 | +#define _tcsnccnt _mbsnccnt | |
| 824 | +#define _tcsnextc _mbsnextc | |
| 825 | +#define _tcsninc _mbsninc | |
| 826 | +#define _tcsspnp _mbsspnp | |
| 827 | + | |
| 828 | +#define _tcslwr _mbslwr | |
| 829 | +#define _tcslwr_l _mbslwr_l | |
| 830 | +#define _tcsupr _mbsupr | |
| 831 | +#define _tcsupr_l _mbsupr_l | |
| 832 | + | |
| 833 | +#define _tclen _mbclen | |
| 834 | +#define _tccpy _mbccpy | |
| 835 | +#define _tccpy_l _mbccpy_l | |
| 836 | +#else | |
| 342 | 837 | |
| 343 | −#if 1 // defined __MSVCRT__ | |
| 344 | −/* Not in crtdll.dll. Define macros anyway? */ | |
| 345 | −#define _ttoi64 _atoi64 | |
| 346 | −#define _i64tot _i64toa | |
| 347 | −#define _ui64tot _ui64toa | |
| 348 | −#define _tcsnccoll _strncoll | |
| 349 | −#define _tcsncoll _strncoll | |
| 838 | + _CRTIMP _CONST_RETURN char *__cdecl _tcschr(const char *_Str,unsigned int _Val); | |
| 839 | + _CRTIMP size_t __cdecl _tcscspn(const char *_Str,const char *_Control); | |
| 840 | + _CRTIMP char *__cdecl _tcsncat(char *_Dst,const char *_Src,size_t _MaxCount); | |
| 841 | + _CRTIMP char *__cdecl _tcsncat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 842 | + _CRTIMP char *__cdecl _tcsncpy(char *_Dst,const char *_Src,size_t _MaxCount); | |
| 843 | + _CRTIMP char *__cdecl _tcsncpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 844 | + _CRTIMP _CONST_RETURN char *__cdecl _tcspbrk(const char *_Str,const char *_Control); | |
| 845 | + _CRTIMP _CONST_RETURN char *__cdecl _tcsrchr(const char *_Str,unsigned int _Ch); | |
| 846 | + _CRTIMP size_t __cdecl _tcsspn(const char *_Str,const char *_Control); | |
| 847 | + _CRTIMP _CONST_RETURN char *__cdecl _tcsstr(const char *_Str,const char *_Substr); | |
| 848 | + _CRTIMP char *__cdecl _tcstok(char *_Str,const char *_Delim); | |
| 849 | + _CRTIMP char *__cdecl _tcstok_l(char *_Str,const char *_Delim,_locale_t _Locale); | |
| 850 | + _CRTIMP char *__cdecl _tcsnset(char *_Str,unsigned int _Val,size_t _MaxCount); | |
| 851 | + _CRTIMP char *__cdecl _tcsrev(char *_Str); | |
| 852 | + _CRTIMP char *__cdecl _tcsset(char *_Str,unsigned int _Val); | |
| 853 | + _CRTIMP char *__cdecl _tcsset_l(char *_Str,unsigned int _Val,_locale_t _Locale); | |
| 854 | + _CRTIMP int __cdecl _tcscmp(const char *_Str1,const char *_Str); | |
| 855 | + _CRTIMP int __cdecl _tcsicmp(const char *_Str1,const char *_Str2); | |
| 856 | + _CRTIMP int __cdecl _tcsicmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 857 | + _CRTIMP int __cdecl _tcsnccmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 858 | + _CRTIMP int __cdecl _tcsncmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 859 | + _CRTIMP int __cdecl _tcsncicmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 860 | + _CRTIMP int __cdecl _tcsncicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 861 | + _CRTIMP int __cdecl _tcsnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 862 | + _CRTIMP int __cdecl _tcsnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 863 | + _CRTIMP int __cdecl _tcscoll(const char *_Str1,const char *_Str2); | |
| 864 | + _CRTIMP int __cdecl _tcscoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 865 | + _CRTIMP int __cdecl _tcsicoll(const char *_Str1,const char *_Str2); | |
| 866 | + _CRTIMP int __cdecl _tcsicoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); | |
| 867 | + _CRTIMP int __cdecl _tcsnccoll(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 868 | + _CRTIMP int __cdecl _tcsnccoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 869 | + _CRTIMP int __cdecl _tcsncoll(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 870 | + _CRTIMP int __cdecl _tcsncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 871 | + _CRTIMP int __cdecl _tcsncicoll(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 872 | + _CRTIMP int __cdecl _tcsncicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 873 | + _CRTIMP int __cdecl _tcsnicoll(const char *_Str1,const char *_Str2,size_t _MaxCount); | |
| 874 | + _CRTIMP int __cdecl _tcsnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 875 | + _CRTIMP size_t __cdecl _tcsclen(const char *_Str); | |
| 876 | + _CRTIMP size_t __cdecl _tcscnlen(const char *_Str,size_t _MaxCount); | |
| 877 | + _CRTIMP size_t __cdecl _tcsclen_l(const char *_Str,_locale_t _Locale); | |
| 878 | + _CRTIMP size_t __cdecl _tcscnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale); | |
| 879 | + _CRTIMP char *__cdecl _tcsnccat(char *_Dst,const char *_Src,size_t _MaxCount); | |
| 880 | + _CRTIMP char *__cdecl _tcsnccat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 881 | + _CRTIMP char *__cdecl _tcsnccpy(char *_Dst,const char *_Src,size_t _MaxCount); | |
| 882 | + _CRTIMP char *__cdecl _tcsnccpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 883 | + _CRTIMP char *__cdecl _tcsncset(char *_Str,unsigned int _Val,size_t _MaxCount); | |
| 884 | + _CRTIMP char *__cdecl _tcsdec(const char *_Start,const char *_Pos); | |
| 885 | + _CRTIMP char *__cdecl _tcsinc(const char *_Ptr); | |
| 886 | + _CRTIMP size_t __cdecl _tcsnbcnt(const char *_Str,size_t _MaxCount); | |
| 887 | + _CRTIMP size_t __cdecl _tcsnccnt(const char *_Str,size_t _MaxCount); | |
| 888 | + _CRTIMP unsigned int __cdecl _tcsnextc (const char *_Str); | |
| 889 | + _CRTIMP char *__cdecl _tcsninc(const char *_Ptr,size_t _Count); | |
| 890 | + _CRTIMP char *__cdecl _tcsspnp(const char *_Str1,const char *_Str2); | |
| 891 | + _CRTIMP char *__cdecl _tcslwr(char *_Str); | |
| 892 | + _CRTIMP char *__cdecl _tcslwr_l(char *_Str,_locale_t _Locale); | |
| 893 | + _CRTIMP char *__cdecl _tcsupr(char *_Str); | |
| 894 | + _CRTIMP char *__cdecl _tcsupr_l(char *_Str,_locale_t _Locale); | |
| 895 | + _CRTIMP size_t __cdecl _tclen(const char *_Str); | |
| 896 | + _CRTIMP void __cdecl _tccpy(char *_DstCh,const char *_SrcCh); | |
| 897 | + | |
| 898 | +#ifdef __cplusplus | |
| 899 | +#ifndef _CPP_TCHAR_INLINES_DEFINED | |
| 900 | +#define _CPP_TCHAR_INLINES_DEFINED | |
| 901 | + extern "C++" { | |
| 902 | + extern inline char *__cdecl _tcschr(char *_S,unsigned int _C) { return ((char *)_tcschr((const char *)_S,_C)); } | |
| 903 | + extern inline char *__cdecl _tcspbrk(char *_S,const char *_P) { return ((char *)_tcspbrk((const char *)_S,_P)); } | |
| 904 | + extern inline char *__cdecl _tcsrchr(char *_S,unsigned int _C) { return ((char *)_tcsrchr((const char *)_S,_C)); } | |
| 905 | + extern inline char *__cdecl _tcsstr(char *_S,const char *_P) { return ((char *)_tcsstr((const char *)_S,_P)); } | |
| 906 | + } | |
| 907 | +#endif | |
| 908 | +#endif | |
| 909 | +#endif | |
| 910 | + | |
| 911 | +#define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1) | |
| 912 | + | |
| 913 | +#define _istalnum _ismbcalnum | |
| 914 | +#define _istalnum_l _ismbcalnum_l | |
| 915 | +#define _istalpha _ismbcalpha | |
| 916 | +#define _istalpha_l _ismbcalpha_l | |
| 917 | +#define _istdigit _ismbcdigit | |
| 918 | +#define _istdigit_l _ismbcdigit_l | |
| 919 | +#define _istgraph _ismbcgraph | |
| 920 | +#define _istgraph_l _ismbcgraph_l | |
| 921 | +#define _istlegal _ismbclegal | |
| 922 | +#define _istlegal_l _ismbclegal_l | |
| 923 | +#define _istlower _ismbclower | |
| 924 | +#define _istlower_l _ismbclower_l | |
| 925 | +#define _istprint _ismbcprint | |
| 926 | +#define _istprint_l _ismbcprint_l | |
| 927 | +#define _istpunct _ismbcpunct | |
| 928 | +#define _istpunct_l _ismbcpunct_l | |
| 929 | +#define _istspace _ismbcspace | |
| 930 | +#define _istspace_l _ismbcspace_l | |
| 931 | +#define _istupper _ismbcupper | |
| 932 | +#define _istupper_l _ismbcupper_l | |
| 933 | + | |
| 934 | +#define _totupper _mbctoupper | |
| 935 | +#define _totupper_l _mbctoupper_l | |
| 936 | +#define _totlower _mbctolower | |
| 937 | +#define _totlower_l _mbctolower_l | |
| 938 | + | |
| 939 | +#define _istlead _ismbblead | |
| 940 | +#define _istleadbyte isleadbyte | |
| 941 | +#define _istleadbyte_l _isleadbyte_l | |
| 942 | +#else | |
| 943 | + | |
| 944 | +#ifndef __TCHAR_DEFINED | |
| 945 | +#define __TCHAR_DEFINED | |
| 946 | + typedef char _TCHAR; | |
| 947 | + typedef signed char _TSCHAR; | |
| 948 | + typedef unsigned char _TUCHAR; | |
| 949 | + typedef char _TXCHAR; | |
| 950 | + typedef int _TINT; | |
| 951 | +#endif | |
| 952 | + | |
| 953 | +#ifndef _TCHAR_DEFINED | |
| 954 | +#define _TCHAR_DEFINED | |
| 955 | +#ifndef NO_OLDNAMES | |
| 956 | + typedef char TCHAR; | |
| 957 | +#endif | |
| 958 | +#endif | |
| 959 | + | |
| 960 | +#define _tcschr strchr | |
| 961 | +#define _tcscspn strcspn | |
| 962 | +#define _tcsncat strncat | |
| 963 | +#define _tcsncat_l _strncat_l | |
| 964 | +#define _tcsncpy strncpy | |
| 965 | +#define _tcsncpy_l _strncpy_l | |
| 966 | +#define _tcspbrk strpbrk | |
| 967 | +#define _tcsrchr strrchr | |
| 968 | +#define _tcsspn strspn | |
| 969 | +#define _tcsstr strstr | |
| 970 | +#define _tcstok strtok | |
| 971 | +#define _tcstok_l _strtok_l | |
| 972 | + | |
| 973 | +#define _tcsnset _strnset | |
| 974 | +#define _tcsnset_l _strnset_l | |
| 975 | +#define _tcsrev _strrev | |
| 976 | +#define _tcsset _strset | |
| 977 | + | |
| 978 | +#define _tcscmp strcmp | |
| 979 | +#define _tcsicmp _stricmp | |
| 980 | +#define _tcsicmp_l _stricmp_l | |
| 981 | +#define _tcsnccmp strncmp | |
| 982 | +#define _tcsncmp strncmp | |
| 983 | +#define _tcsncicmp _strnicmp | |
| 984 | +#define _tcsncicmp_l _strnicmp_l | |
| 985 | +#define _tcsnicmp _strnicmp | |
| 986 | +#define _tcsnicmp_l _strnicmp_l | |
| 987 | + | |
| 988 | +#define _tcscoll strcoll | |
| 989 | +#define _tcscoll_l _strcoll_l | |
| 990 | +#define _tcsicoll _stricoll | |
| 991 | +#define _tcsicoll_l _stricoll_l | |
| 992 | +#define _tcsnccoll _strncoll | |
| 993 | +#define _tcsnccoll_l _strncoll_l | |
| 994 | +#define _tcsncoll _strncoll | |
| 995 | +#define _tcsncoll_l _strncoll_l | |
| 350 | 996 | #define _tcsncicoll _strnicoll |
| 351 | −#define _tcsnicoll _strnicoll | |
| 352 | −#define _tfindfirsti64 _findfirsti64 | |
| 353 | −#define _tfindnexti64 _findnexti64 | |
| 354 | −#define _tfinddatai64_t _finddatai64_t | |
| 355 | −#endif /* __MSVCRT__ */ | |
| 997 | +#define _tcsncicoll_l _strnicoll_l | |
| 998 | +#define _tcsnicoll _strnicoll | |
| 999 | +#define _tcsnicoll_l _strnicoll_l | |
| 356 | 1000 | |
| 357 | −#endif /* Not _UNICODE */ | |
| 1001 | +#define _tcsclen strlen | |
| 1002 | +#define _tcscnlen strnlen | |
| 1003 | +#define _tcsclen_l(_String,_Locale) strlen(_String) | |
| 1004 | +#define _tcscnlen_l(_String,_Max_count,_Locale) strnlen_l((_String),(_Max_count)) | |
| 1005 | +#define _tcsnccat strncat | |
| 1006 | +#define _tcsnccat_l _strncat_l | |
| 1007 | +#define _tcsnccpy strncpy | |
| 1008 | +#define _tcsnccpy_l _strncpy_l | |
| 1009 | +#define _tcsncset _strnset | |
| 358 | 1010 | |
| 359 | −/* | |
| 360 | − * UNICODE a constant string when _UNICODE is defined else returns the string | |
| 361 | − * unmodified. Also defined in w32api/winnt.h. | |
| 362 | − */ | |
| 363 | −#define _TEXT(x) __TEXT(x) | |
| 364 | −#define _T(x) __TEXT(x) | |
| 1011 | +#define _tcsdec _strdec | |
| 1012 | +#define _tcsinc _strinc | |
| 1013 | +#define _tcsnbcnt _strncnt | |
| 1014 | +#define _tcsnccnt _strncnt | |
| 1015 | +#define _tcsnextc _strnextc | |
| 1016 | +#define _tcsninc _strninc | |
| 1017 | +#define _tcsspnp _strspnp | |
| 1018 | + | |
| 1019 | +#define _tcslwr _strlwr | |
| 1020 | +#define _tcslwr_l _strlwr_l | |
| 1021 | +#define _tcsupr _strupr | |
| 1022 | +#define _tcsupr_l _strupr_l | |
| 1023 | +#define _tcsxfrm strxfrm | |
| 1024 | +#define _tcsxfrm_l _strxfrm_l | |
| 1025 | + | |
| 1026 | +#define _istlead(_Char) (0) | |
| 1027 | +#define _istleadbyte(_Char) (0) | |
| 1028 | +#define _istleadbyte_l(_Char,_Locale) (0) | |
| 1029 | + | |
| 1030 | +#define _tclen(_pc) (1) | |
| 1031 | +#define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2)) | |
| 1032 | +#define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2))) | |
| 365 | 1033 | |
| 366 | −#endif /* Not _TCHAR_H_ */ | |
| 1034 | + /* dirent structures and functions */ | |
| 1035 | +#define _tdirent dirent | |
| 1036 | +#define _TDIR DIR | |
| 1037 | +#define _topendir opendir | |
| 1038 | +#define _tclosedir closedir | |
| 1039 | +#define _treaddir readdir | |
| 1040 | +#define _trewinddir rewinddir | |
| 1041 | +#define _ttelldir telldir | |
| 1042 | +#define _tseekdir seekdir | |
| 367 | 1043 | |
| 1044 | +#define _istalnum isalnum | |
| 1045 | +#define _istalnum_l _isalnum_l | |
| 1046 | +#define _istalpha isalpha | |
| 1047 | +#define _istalpha_l _isalpha_l | |
| 1048 | +#define _istdigit isdigit | |
| 1049 | +#define _istdigit_l _isdigit_l | |
| 1050 | +#define _istgraph isgraph | |
| 1051 | +#define _istgraph_l _isgraph_l | |
| 1052 | +#define _istlower islower | |
| 1053 | +#define _istlower_l _islower_l | |
| 1054 | +#define _istprint isprint | |
| 1055 | +#define _istprint_l _isprint_l | |
| 1056 | +#define _istpunct ispunct | |
| 1057 | +#define _istpunct_l _ispunct_l | |
| 1058 | +#define _istspace isspace | |
| 1059 | +#define _istspace_l _isspace_l | |
| 1060 | +#define _istupper isupper | |
| 1061 | +#define _istupper_l _isupper_l | |
| 1062 | + | |
| 1063 | +#define _totupper toupper | |
| 1064 | +#define _totupper_l _toupper_l | |
| 1065 | +#define _totlower tolower | |
| 1066 | +#define _totlower_l _tolower_l | |
| 1067 | + | |
| 1068 | +#define _istlegal(_c) (1) | |
| 1069 | + | |
| 1070 | +#ifndef NULL | |
| 1071 | +#ifdef __cplusplus | |
| 1072 | +#define NULL 0 | |
| 1073 | +#else | |
| 1074 | +#define NULL ((void *)0) | |
| 1075 | +#endif | |
| 1076 | +#endif | |
| 1077 | + | |
| 1078 | +#define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1) | |
| 1079 | +#define _strinc(_pc) ((_pc)+1) | |
| 1080 | +#define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc)) | |
| 1081 | +#define _strninc(_pc,_sz) (((_pc)+(_sz))) | |
| 1082 | + _CRTIMP size_t __cdecl __strncnt(const char *_Str,size_t _Cnt); | |
| 1083 | +#define _strncnt(_cpc,_sz) (__strncnt(_cpc,_sz)) | |
| 1084 | +#define _strspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL)) | |
| 1085 | + | |
| 1086 | +#define _strncpy_l(_Destination,_Source,_Count,_Locale) (strncpy(_Destination,_Source,_Count)) | |
| 1087 | +#define _strncat_l(_Destination,_Source,_Count,_Locale) (strncat(_Destination,_Source,_Count)) | |
| 1088 | +#define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters)) | |
| 1089 | +#define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count)) | |
| 1090 | +#define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value)) | |
| 1091 | +#endif | |
| 1092 | +#endif | |
| 1093 | + | |
| 1094 | +#define _T(x) __T(x) | |
| 1095 | +#define _TEXT(x) __T(x) | |
| 1096 | + | |
| 1097 | +#ifdef __cplusplus | |
| 1098 | +} | |
| 1099 | +#endif | |
| 1100 | + | |
| 1101 | +#include <sec_api/tchar_s.h> | |
| 1102 | +#endif | |
| @@ -1,219 +1,286 @@ | ||
| 1 | −/* | |
| 2 | − * time.h | |
| 3 | − * | |
| 4 | − * Date and time functions and types. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _TIME_H_ | |
| 7 | +#define _TIME_H_ | |
| 26 | 8 | |
| 27 | −#ifndef _TIME_H_ | |
| 28 | −#define _TIME_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −#define __need_wchar_t | |
| 34 | −#define __need_size_t | |
| 35 | −#ifndef RC_INVOKED | |
| 36 | −#include <stddef.h> | |
| 37 | −#endif /* Not RC_INVOKED */ | |
| 11 | +#ifndef _WIN32 | |
| 12 | +#error Only Win32 target is supported! | |
| 13 | +#endif | |
| 38 | 14 | |
| 39 | −/* | |
| 40 | − * Need a definition of time_t. | |
| 41 | − */ | |
| 42 | −#include <sys/types.h> | |
| 15 | +#pragma pack(push,_CRT_PACKING) | |
| 43 | 16 | |
| 44 | −/* | |
| 45 | − * Number of clock ticks per second. A clock tick is the unit by which | |
| 46 | − * processor time is measured and is returned by 'clock'. | |
| 47 | − */ | |
| 48 | −#define CLOCKS_PER_SEC ((clock_t)1000) | |
| 49 | −#define CLK_TCK CLOCKS_PER_SEC | |
| 17 | +#ifdef __cplusplus | |
| 18 | +extern "C" { | |
| 19 | +#endif | |
| 50 | 20 | |
| 21 | +#ifndef _CRTIMP | |
| 22 | +#define _CRTIMP __declspec(dllimport) | |
| 23 | +#endif | |
| 51 | 24 | |
| 52 | −#ifndef RC_INVOKED | |
| 25 | +#ifndef _WCHAR_T_DEFINED | |
| 26 | +#define _WCHAR_T_DEFINED | |
| 27 | + typedef unsigned short wchar_t; | |
| 28 | +#endif | |
| 29 | + | |
| 30 | +#ifndef _TIME32_T_DEFINED | |
| 31 | +#define _TIME32_T_DEFINED | |
| 32 | + typedef long __time32_t; | |
| 33 | +#endif | |
| 34 | + | |
| 35 | +#ifndef _TIME64_T_DEFINED | |
| 36 | +#define _TIME64_T_DEFINED | |
| 37 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 38 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 39 | + typedef int _time64_t __attribute__ ((mode (DI))); | |
| 40 | +#else | |
| 41 | + typedef __int64 __time64_t; | |
| 42 | +#endif | |
| 43 | +#endif | |
| 44 | +#endif | |
| 53 | 45 | |
| 54 | −/* | |
| 55 | − * A type for storing the current time and date. This is the number of | |
| 56 | − * seconds since midnight Jan 1, 1970. | |
| 57 | − * NOTE: Normally this is defined by the above include of sys/types.h | |
| 58 | − */ | |
| 59 | 46 | #ifndef _TIME_T_DEFINED |
| 60 | −typedef long time_t; | |
| 61 | 47 | #define _TIME_T_DEFINED |
| 48 | +#ifdef _USE_32BIT_TIME_T | |
| 49 | + typedef __time32_t time_t; | |
| 50 | +#else | |
| 51 | + typedef __time64_t time_t; | |
| 52 | +#endif | |
| 62 | 53 | #endif |
| 63 | 54 | |
| 64 | −/* | |
| 65 | − * A type for measuring processor time (in clock ticks). | |
| 66 | − */ | |
| 67 | 55 | #ifndef _CLOCK_T_DEFINED |
| 68 | −typedef long clock_t; | |
| 69 | 56 | #define _CLOCK_T_DEFINED |
| 57 | + typedef long clock_t; | |
| 70 | 58 | #endif |
| 71 | 59 | |
| 72 | − | |
| 73 | −/* | |
| 74 | − * A structure for storing all kinds of useful information about the | |
| 75 | − * current (or another) time. | |
| 76 | − */ | |
| 77 | −struct tm | |
| 78 | −{ | |
| 79 | − int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */ | |
| 80 | − int tm_min; /* Minutes: 0-59 */ | |
| 81 | − int tm_hour; /* Hours since midnight: 0-23 */ | |
| 82 | − int tm_mday; /* Day of the month: 1-31 */ | |
| 83 | − int tm_mon; /* Months *since* january: 0-11 */ | |
| 84 | − int tm_year; /* Years since 1900 */ | |
| 85 | − int tm_wday; /* Days since Sunday (0-6) */ | |
| 86 | − int tm_yday; /* Days since Jan. 1: 0-365 */ | |
| 87 | − int tm_isdst; /* +1 Daylight Savings Time, 0 No DST, | |
| 88 | − * -1 don't know */ | |
| 89 | −}; | |
| 90 | − | |
| 91 | −#ifdef __cplusplus | |
| 92 | −extern "C" { | |
| 60 | +#ifndef _SIZE_T_DEFINED | |
| 61 | +#define _SIZE_T_DEFINED | |
| 62 | +#undef size_t | |
| 63 | +#ifdef _WIN64 | |
| 64 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 65 | + typedef unsigned int size_t __attribute__ ((mode (DI))); | |
| 66 | +#else | |
| 67 | + typedef unsigned __int64 size_t; | |
| 68 | +#endif | |
| 69 | +#else | |
| 70 | + typedef unsigned int size_t; | |
| 93 | 71 | #endif |
| 94 | − | |
| 95 | −clock_t clock (void); | |
| 96 | −time_t time (time_t*); | |
| 97 | −double difftime (time_t, time_t); | |
| 98 | −time_t mktime (struct tm*); | |
| 99 | − | |
| 100 | −/* | |
| 101 | − * These functions write to and return pointers to static buffers that may | |
| 102 | − * be overwritten by other function calls. Yikes! | |
| 103 | − * | |
| 104 | − * NOTE: localtime, and perhaps the others of the four functions grouped | |
| 105 | − * below may return NULL if their argument is not 'acceptable'. Also note | |
| 106 | − * that calling asctime with a NULL pointer will produce an Invalid Page | |
| 107 | − * Fault and crap out your program. Guess how I know. Hint: stat called on | |
| 108 | − * a directory gives 'invalid' times in st_atime etc... | |
| 109 | − */ | |
| 110 | −char* asctime (const struct tm*); | |
| 111 | −char* ctime (const time_t*); | |
| 112 | −struct tm* gmtime (const time_t*); | |
| 113 | −struct tm* localtime (const time_t*); | |
| 114 | − | |
| 115 | − | |
| 116 | −size_t strftime (char*, size_t, const char*, const struct tm*); | |
| 117 | − | |
| 118 | −size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); | |
| 119 | − | |
| 120 | −#ifndef __STRICT_ANSI__ | |
| 121 | −extern void _tzset (void); | |
| 122 | − | |
| 123 | −#ifndef _NO_OLDNAMES | |
| 124 | −extern void tzset (void); | |
| 125 | 72 | #endif |
| 126 | 73 | |
| 127 | −size_t strftime(char*, size_t, const char*, const struct tm*); | |
| 128 | −char* _strdate(char*); | |
| 129 | −char* _strtime(char*); | |
| 130 | − | |
| 131 | −#endif /* Not __STRICT_ANSI__ */ | |
| 132 | − | |
| 133 | −/* | |
| 134 | − * _daylight: non zero if daylight savings time is used. | |
| 135 | − * _timezone: difference in seconds between GMT and local time. | |
| 136 | − * _tzname: standard/daylight savings time zone names (an array with two | |
| 137 | − * elements). | |
| 138 | − */ | |
| 139 | −#ifdef __MSVCRT__ | |
| 140 | − | |
| 141 | −/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */ | |
| 142 | −extern int* __p__daylight (void); | |
| 143 | −extern long* __p__timezone (void); | |
| 144 | −extern char** __p__tzname (void); | |
| 145 | − | |
| 146 | −__MINGW_IMPORT int _daylight; | |
| 147 | −__MINGW_IMPORT long _timezone; | |
| 148 | −__MINGW_IMPORT char *_tzname[2]; | |
| 149 | − | |
| 150 | −#else /* not __MSVCRT (ie. crtdll) */ | |
| 151 | − | |
| 152 | −#ifndef __DECLSPEC_SUPPORTED | |
| 153 | − | |
| 154 | −extern int* __imp__daylight_dll; | |
| 155 | −extern long* __imp__timezone_dll; | |
| 156 | −extern char** __imp__tzname; | |
| 157 | − | |
| 158 | −#define _daylight (*__imp__daylight_dll) | |
| 159 | −#define _timezone (*__imp__timezone_dll) | |
| 160 | −#define _tzname (__imp__tzname) | |
| 161 | − | |
| 162 | −#else /* __DECLSPEC_SUPPORTED */ | |
| 163 | − | |
| 164 | −__MINGW_IMPORT int _daylight_dll; | |
| 165 | −__MINGW_IMPORT long _timezone_dll; | |
| 166 | −__MINGW_IMPORT char* _tzname[2]; | |
| 74 | +#ifndef _SSIZE_T_DEFINED | |
| 75 | +#define _SSIZE_T_DEFINED | |
| 76 | +#undef ssize_t | |
| 77 | +#ifdef _WIN64 | |
| 78 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 79 | + typedef int ssize_t __attribute__ ((mode (DI))); | |
| 80 | +#else | |
| 81 | + typedef __int64 ssize_t; | |
| 82 | +#endif | |
| 83 | +#else | |
| 84 | + typedef int ssize_t; | |
| 85 | +#endif | |
| 86 | +#endif | |
| 167 | 87 | |
| 168 | −#define _daylight _daylight_dll | |
| 169 | −#define _timezone _timezone_dll | |
| 88 | +#ifndef NULL | |
| 89 | +#ifdef __cplusplus | |
| 90 | +#define NULL 0 | |
| 91 | +#else | |
| 92 | +#define NULL ((void *)0) | |
| 93 | +#endif | |
| 94 | +#endif | |
| 170 | 95 | |
| 171 | −#endif /* __DECLSPEC_SUPPORTED */ | |
| 96 | +#ifdef _USE_32BIT_TIME_T | |
| 97 | +#define _localtime32 localtime | |
| 98 | +#define _difftime32 difftime | |
| 99 | +#define _ctime32 ctime | |
| 100 | +#define _gmtime32 gmtime | |
| 101 | +#define _mktime32 mktime | |
| 102 | +#define _time32 time | |
| 103 | +#endif | |
| 172 | 104 | |
| 173 | −#endif /* not __MSVCRT__ */ | |
| 105 | +#ifndef _TM_DEFINED | |
| 106 | +#define _TM_DEFINED | |
| 107 | + struct tm { | |
| 108 | + int tm_sec; | |
| 109 | + int tm_min; | |
| 110 | + int tm_hour; | |
| 111 | + int tm_mday; | |
| 112 | + int tm_mon; | |
| 113 | + int tm_year; | |
| 114 | + int tm_wday; | |
| 115 | + int tm_yday; | |
| 116 | + int tm_isdst; | |
| 117 | + }; | |
| 118 | +#endif | |
| 174 | 119 | |
| 175 | −#ifndef _NO_OLDNAMES | |
| 120 | +#define CLOCKS_PER_SEC 1000 | |
| 121 | + | |
| 122 | +//!__TINYC__: __MINGW_IMPORT int _daylight; | |
| 123 | +//!__TINYC__: __MINGW_IMPORT long _dstbias; | |
| 124 | +//!__TINYC__: __MINGW_IMPORT long _timezone; | |
| 125 | +//!__TINYC__: __MINGW_IMPORT char * _tzname[2]; | |
| 126 | + _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight); | |
| 127 | + _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias); | |
| 128 | + _CRTIMP errno_t __cdecl _get_timezone(long *_Timezone); | |
| 129 | + _CRTIMP errno_t __cdecl _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index); | |
| 130 | + char *__cdecl asctime(const struct tm *_Tm); | |
| 131 | + _CRTIMP char *__cdecl _ctime32(const __time32_t *_Time); | |
| 132 | + clock_t __cdecl clock(void); | |
| 133 | + _CRTIMP double __cdecl _difftime32(__time32_t _Time1,__time32_t _Time2); | |
| 134 | + _CRTIMP struct tm *__cdecl _gmtime32(const __time32_t *_Time); | |
| 135 | + _CRTIMP struct tm *__cdecl _localtime32(const __time32_t *_Time); | |
| 136 | + size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,const char *_Format,const struct tm *_Tm); | |
| 137 | + _CRTIMP size_t __cdecl _strftime_l(char *_Buf,size_t _Max_size,const char *_Format,const struct tm *_Tm,_locale_t _Locale); | |
| 138 | + _CRTIMP char *__cdecl _strdate(char *_Buffer); | |
| 139 | + _CRTIMP char *__cdecl _strtime(char *_Buffer); | |
| 140 | + _CRTIMP __time32_t __cdecl _time32(__time32_t *_Time); | |
| 141 | + _CRTIMP __time32_t __cdecl _mktime32(struct tm *_Tm); | |
| 142 | + _CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm); | |
| 143 | +#if defined (_POSIX_) || defined(__GNUC__) | |
| 144 | + void __cdecl tzset(void); | |
| 145 | +#else | |
| 146 | + _CRTIMP void __cdecl _tzset(void); | |
| 147 | +#endif | |
| 176 | 148 | |
| 177 | −#ifdef __MSVCRT__ | |
| 149 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 150 | + double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2); | |
| 151 | + _CRTIMP char *__cdecl _ctime64(const __time64_t *_Time); | |
| 152 | + _CRTIMP struct tm *__cdecl _gmtime64(const __time64_t *_Time); | |
| 153 | + _CRTIMP struct tm *__cdecl _localtime64(const __time64_t *_Time); | |
| 154 | + _CRTIMP __time64_t __cdecl _mktime64(struct tm *_Tm); | |
| 155 | + _CRTIMP __time64_t __cdecl _mkgmtime64(struct tm *_Tm); | |
| 156 | + _CRTIMP __time64_t __cdecl _time64(__time64_t *_Time); | |
| 157 | +#endif | |
| 158 | + unsigned __cdecl _getsystime(struct tm *_Tm); | |
| 159 | + unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec); | |
| 160 | + | |
| 161 | +#ifndef _SIZE_T_DEFINED | |
| 162 | +#define _SIZE_T_DEFINED | |
| 163 | +#ifdef _WIN64 | |
| 164 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 165 | + typedef unsigned int size_t __attribute__ ((mode (DI))); | |
| 166 | +#else | |
| 167 | + typedef unsigned __int64 size_t; | |
| 168 | +#endif | |
| 169 | +#else | |
| 170 | + typedef unsigned long size_t; | |
| 171 | +#endif | |
| 172 | +#endif | |
| 178 | 173 | |
| 179 | −/* These go in the oldnames import library for MSVCRT. */ | |
| 180 | −__MINGW_IMPORT int daylight; | |
| 181 | −__MINGW_IMPORT long timezone; | |
| 182 | −__MINGW_IMPORT char *tzname[2]; | |
| 174 | +#ifndef _SSIZE_T_DEFINED | |
| 175 | +#define _SSIZE_T_DEFINED | |
| 176 | +#ifdef _WIN64 | |
| 177 | +#if defined(__GNUC__) && defined(__STRICT_ANSI__) | |
| 178 | + typedef int ssize_t __attribute__ ((mode (DI))); | |
| 179 | +#else | |
| 180 | + typedef __int64 ssize_t; | |
| 181 | +#endif | |
| 182 | +#else | |
| 183 | + typedef long ssize_t; | |
| 184 | +#endif | |
| 185 | +#endif | |
| 183 | 186 | |
| 184 | 187 | #ifndef _WTIME_DEFINED |
| 188 | + _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm); | |
| 189 | + _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time); | |
| 190 | + size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm); | |
| 191 | + _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale); | |
| 192 | + _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer); | |
| 193 | + _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer); | |
| 194 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 195 | + _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time); | |
| 196 | +#endif | |
| 185 | 197 | |
| 186 | −/* wide function prototypes, also declared in wchar.h */ | |
| 187 | − | |
| 188 | −wchar_t * _wasctime(const struct tm*); | |
| 189 | −wchar_t * _wctime(const time_t*); | |
| 190 | −wchar_t* _wstrdate(wchar_t*); | |
| 191 | −wchar_t* _wstrtime(wchar_t*); | |
| 198 | +#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) | |
| 199 | +#define _INC_WTIME_INL | |
| 200 | +#ifdef _USE_32BIT_TIME_T | |
| 201 | +__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); } | |
| 202 | +#else | |
| 203 | +__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); } | |
| 204 | +#endif | |
| 205 | +#endif | |
| 192 | 206 | |
| 193 | 207 | #define _WTIME_DEFINED |
| 194 | −#endif /* _WTIME_DEFINED */ | |
| 208 | +#endif | |
| 195 | 209 | |
| 210 | +#ifndef RC_INVOKED | |
| 211 | +double __cdecl difftime(time_t _Time1,time_t _Time2); | |
| 212 | +char *__cdecl ctime(const time_t *_Time); | |
| 213 | +struct tm *__cdecl gmtime(const time_t *_Time); | |
| 214 | +struct tm *__cdecl localtime(const time_t *_Time); | |
| 215 | +struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *); | |
| 216 | + | |
| 217 | +time_t __cdecl mktime(struct tm *_Tm); | |
| 218 | +time_t __cdecl _mkgmtime(struct tm *_Tm); | |
| 219 | +time_t __cdecl time(time_t *_Time); | |
| 220 | + | |
| 221 | +#ifdef _USE_32BIT_TIME_T | |
| 222 | +#if 0 | |
| 223 | +__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime32(_Time1,_Time2); } | |
| 224 | +__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime32(_Time); } | |
| 225 | +__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime32(_Time); } | |
| 226 | +__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime32(_Time); } | |
| 227 | +__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime32(_Tm); } | |
| 228 | +__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime32(_Tm); } | |
| 229 | +__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time32(_Time); } | |
| 230 | +#endif | |
| 231 | +#else | |
| 232 | +__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); } | |
| 233 | +__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime64(_Time); } | |
| 234 | +__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime64(_Time); } | |
| 235 | +__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime64(_Time); } | |
| 236 | +__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime64(_Tm); } | |
| 237 | +__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); } | |
| 238 | +__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); } | |
| 239 | +#endif | |
| 240 | +#endif | |
| 196 | 241 | |
| 197 | −#else /* not __MSVCRT__ */ | |
| 242 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 243 | +#define CLK_TCK CLOCKS_PER_SEC | |
| 198 | 244 | |
| 199 | −/* CRTDLL is royally messed up when it comes to these macros. | |
| 200 | − TODO: import and alias these via oldnames import library instead | |
| 201 | − of macros. */ | |
| 245 | + _CRTIMP extern int daylight; | |
| 246 | + _CRTIMP extern long timezone; | |
| 247 | + _CRTIMP extern char *tzname[2]; | |
| 248 | + void __cdecl tzset(void); | |
| 249 | +#endif | |
| 202 | 250 | |
| 203 | −#define daylight _daylight | |
| 204 | −/* NOTE: timezone not defined because it would conflict with sys/timeb.h. | |
| 205 | − Also, tzname used to a be macro, but now it's in moldname. */ | |
| 206 | −__MINGW_IMPORT char *tzname[2]; | |
| 251 | +#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */ | |
| 252 | +#define _TIMEVAL_DEFINED | |
| 253 | +struct timeval { | |
| 254 | + long tv_sec; | |
| 255 | + long tv_usec; | |
| 256 | +}; | |
| 257 | +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) | |
| 258 | +#define timercmp(tvp,uvp,cmp) ((tvp)->tv_sec cmp (uvp)->tv_sec || (tvp)->tv_sec==(uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) | |
| 259 | +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 | |
| 260 | +#endif /* _TIMEVAL_DEFINED */ | |
| 207 | 261 | |
| 208 | −#endif /* not __MSVCRT__ */ | |
| 262 | +#ifndef __STRICT_ANSI__ | |
| 263 | +#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */ | |
| 264 | +#define _TIMEZONE_DEFINED | |
| 265 | +struct timezone { | |
| 266 | + int tz_minuteswest; | |
| 267 | + int tz_dsttime; | |
| 268 | +}; | |
| 209 | 269 | |
| 210 | −#endif /* Not _NO_OLDNAMES */ | |
| 270 | + extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z); | |
| 271 | +#endif | |
| 272 | +#endif /* __STRICT_ANSI__ */ | |
| 211 | 273 | |
| 212 | −#ifdef __cplusplus | |
| 274 | +#ifdef __cplusplus | |
| 213 | 275 | } |
| 214 | 276 | #endif |
| 215 | 277 | |
| 216 | −#endif /* Not RC_INVOKED */ | |
| 278 | +#pragma pack(pop) | |
| 279 | + | |
| 280 | +#include <sec_api/time_s.h> | |
| 281 | + | |
| 282 | +/* Adding timespec definition. */ | |
| 283 | +#include <sys/timeb.h> | |
| 217 | 284 | |
| 218 | −#endif /* Not _TIME_H_ */ | |
| 285 | +#endif /* End _TIME_H_ */ | |
| 219 | 286 | |
| @@ -1,3 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 1 | 6 | /* |
| 2 | 7 | * This file is part of the Mingw32 package. |
| 3 | 8 | * |
| @@ -5,6 +10,31 @@ · 1 unmodified line | ||
| 5 | 10 | */ |
| 6 | 11 | |
| 7 | 12 | #ifndef __STRICT_ANSI__ |
| 13 | + | |
| 8 | 14 | #include <io.h> |
| 15 | +#include <process.h> | |
| 16 | + | |
| 17 | +#define __UNISTD_GETOPT__ | |
| 18 | +#include <getopt.h> | |
| 19 | +#undef __UNISTD_GETOPT__ | |
| 20 | + | |
| 21 | +#ifdef __cplusplus | |
| 22 | +extern "C" { | |
| 23 | +#endif | |
| 24 | + | |
| 25 | +#ifndef FTRUNCATE_DEFINED | |
| 26 | +#define FTRUNCATE_DEFINED | |
| 27 | +/* This is defined as a real library function to allow autoconf | |
| 28 | + to verify its existence. */ | |
| 29 | +int ftruncate(int, off_t); | |
| 30 | +__CRT_INLINE int ftruncate(int __fd, off_t __length) | |
| 31 | +{ | |
| 32 | + return _chsize (__fd, __length); | |
| 33 | +} | |
| 34 | +#endif | |
| 35 | + | |
| 36 | +#ifdef __cplusplus | |
| 37 | +} | |
| 9 | 38 | #endif |
| 10 | 39 | |
| 40 | +#endif | |
| @@ -0,0 +1,11 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _INC_VADEFS | |
| 7 | +#define _INC_VADEFS | |
| 8 | + | |
| 9 | +//!__TINYC__: GNUC specific stuff removed | |
| 10 | + | |
| 11 | +#endif | |
| @@ -1,11 +0,0 @@ | ||
| 1 | −#ifndef _VARARGS_H | |
| 2 | −#define _VARARGS_H | |
| 3 | − | |
| 4 | −#include <stdarg.h> | |
| 5 | − | |
| 6 | −#define va_dcl | |
| 7 | −#define va_alist __va_alist | |
| 8 | −#undef va_start | |
| 9 | −#define va_start(ap) ap = __builtin_varargs_start | |
| 10 | − | |
| 11 | −#endif | |
| @@ -1,206 +1,429 @@ | ||
| 1 | −/* | |
| 2 | − * wchar.h | |
| 3 | − * | |
| 4 | − * Defines of all functions for supporting wide characters. Actually it | |
| 5 | − * just includes all those headers, which is not a good thing to do from a | |
| 6 | − * processing time point of view, but it does mean that everything will be | |
| 7 | − * in sync. | |
| 8 | − * | |
| 9 | − * This file is part of the Mingw32 package. | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 21 | − * $Revision: 1.2 $ | |
| 22 | − * $Author: bellard $ | |
| 23 | − * $Date: 2005/04/17 13:14:29 $ | |
| 24 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 25 | 5 | */ |
| 6 | +#ifndef _INC_WCHAR | |
| 7 | +#define _INC_WCHAR | |
| 26 | 8 | |
| 27 | −#ifndef _WCHAR_H_ | |
| 28 | −#define _WCHAR_H_ | |
| 29 | − | |
| 30 | −/* All the headers include this file. */ | |
| 31 | 9 | #include <_mingw.h> |
| 32 | 10 | |
| 33 | −#include <ctype.h> | |
| 34 | −#include <stdio.h> | |
| 35 | −#include <stdlib.h> | |
| 36 | −#include <string.h> | |
| 37 | −#include <time.h> | |
| 38 | −#include <sys/types.h> | |
| 11 | +#pragma pack(push,_CRT_PACKING) | |
| 39 | 12 | |
| 40 | −#define __need_size_t | |
| 41 | −#define __need_wint_t | |
| 42 | −#define __need_wchar_t | |
| 43 | −#ifndef RC_INVOKED | |
| 44 | −#include <stddef.h> | |
| 45 | −#endif /* Not RC_INVOKED */ | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 46 | 16 | |
| 47 | −#define WCHAR_MIN 0 | |
| 48 | −#define WCHAR_MAX ((wchar_t)-1) | |
| 17 | +#define WCHAR_MIN 0 | |
| 18 | +#define WCHAR_MAX ((wchar_t) -1) /* UINT16_MAX */ | |
| 49 | 19 | |
| 50 | −#ifndef RC_INVOKED | |
| 20 | +#ifndef __GNUC_VA_LIST | |
| 21 | +#define __GNUC_VA_LIST | |
| 22 | + typedef __builtin_va_list __gnuc_va_list; | |
| 23 | +#endif | |
| 51 | 24 | |
| 52 | −#ifdef __cplusplus | |
| 53 | −extern "C" { | |
| 25 | +#ifndef _VA_LIST_DEFINED | |
| 26 | +#define _VA_LIST_DEFINED | |
| 27 | + typedef __gnuc_va_list va_list; | |
| 28 | +#endif | |
| 29 | + | |
| 30 | +#ifndef WEOF | |
| 31 | +#define WEOF (wint_t)(0xFFFF) | |
| 54 | 32 | #endif |
| 55 | 33 | |
| 56 | −#ifndef __STRICT_ANSI__ | |
| 34 | +#ifndef _FILE_DEFINED | |
| 35 | + struct _iobuf { | |
| 36 | + char *_ptr; | |
| 37 | + int _cnt; | |
| 38 | + char *_base; | |
| 39 | + int _flag; | |
| 40 | + int _file; | |
| 41 | + int _charbuf; | |
| 42 | + int _bufsiz; | |
| 43 | + char *_tmpfname; | |
| 44 | + }; | |
| 45 | + typedef struct _iobuf FILE; | |
| 46 | +#define _FILE_DEFINED | |
| 47 | +#endif | |
| 57 | 48 | |
| 58 | −#ifndef _FSIZE_T_DEFINED | |
| 59 | −typedef unsigned long _fsize_t; | |
| 49 | +#ifndef _STDIO_DEFINED | |
| 50 | +#ifdef _WIN64 | |
| 51 | + _CRTIMP FILE *__cdecl __iob_func(void); | |
| 52 | +#else | |
| 53 | +#ifdef _MSVCRT_ | |
| 54 | +extern FILE _iob[]; /* A pointer to an array of FILE */ | |
| 55 | +#define __iob_func() (_iob) | |
| 56 | +#else | |
| 57 | +extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ | |
| 58 | +#define __iob_func() (*_imp___iob) | |
| 59 | +#define _iob __iob_func() | |
| 60 | +#endif | |
| 61 | +#endif | |
| 62 | + | |
| 63 | +#define _iob __iob_func() | |
| 64 | +#endif | |
| 65 | + | |
| 66 | +#ifndef _STDSTREAM_DEFINED | |
| 67 | +#define stdin (&__iob_func()[0]) | |
| 68 | +#define stdout (&__iob_func()[1]) | |
| 69 | +#define stderr (&__iob_func()[2]) | |
| 70 | +#define _STDSTREAM_DEFINED | |
| 71 | +#endif | |
| 72 | + | |
| 73 | +#ifndef _FSIZE_T_DEFINED | |
| 74 | + typedef unsigned long _fsize_t; | |
| 60 | 75 | #define _FSIZE_T_DEFINED |
| 61 | 76 | #endif |
| 62 | 77 | |
| 63 | 78 | #ifndef _WFINDDATA_T_DEFINED |
| 64 | −struct _wfinddata_t { | |
| 65 | − unsigned attrib; | |
| 66 | − time_t time_create; /* -1 for FAT file systems */ | |
| 67 | − time_t time_access; /* -1 for FAT file systems */ | |
| 68 | − time_t time_write; | |
| 69 | − _fsize_t size; | |
| 70 | − wchar_t name[FILENAME_MAX]; /* may include spaces. */ | |
| 71 | −}; | |
| 72 | −struct _wfinddatai64_t { | |
| 73 | − unsigned attrib; | |
| 74 | − time_t time_create; | |
| 75 | − time_t time_access; | |
| 76 | − time_t time_write; | |
| 77 | − __int64 size; | |
| 78 | − wchar_t name[FILENAME_MAX]; | |
| 79 | −}; | |
| 79 | + struct _wfinddata32_t { | |
| 80 | + unsigned attrib; | |
| 81 | + __time32_t time_create; | |
| 82 | + __time32_t time_access; | |
| 83 | + __time32_t time_write; | |
| 84 | + _fsize_t size; | |
| 85 | + wchar_t name[260]; | |
| 86 | + }; | |
| 87 | + | |
| 88 | +/* #if _INTEGRAL_MAX_BITS >= 64 */ | |
| 89 | + | |
| 90 | + struct _wfinddata32i64_t { | |
| 91 | + unsigned attrib; | |
| 92 | + __time32_t time_create; | |
| 93 | + __time32_t time_access; | |
| 94 | + __time32_t time_write; | |
| 95 | + __int64 size; | |
| 96 | + wchar_t name[260]; | |
| 97 | + }; | |
| 98 | + | |
| 99 | + struct _wfinddata64i32_t { | |
| 100 | + unsigned attrib; | |
| 101 | + __time64_t time_create; | |
| 102 | + __time64_t time_access; | |
| 103 | + __time64_t time_write; | |
| 104 | + _fsize_t size; | |
| 105 | + wchar_t name[260]; | |
| 106 | + }; | |
| 107 | + | |
| 108 | + struct _wfinddata64_t { | |
| 109 | + unsigned attrib; | |
| 110 | + __time64_t time_create; | |
| 111 | + __time64_t time_access; | |
| 112 | + __time64_t time_write; | |
| 113 | + __int64 size; | |
| 114 | + wchar_t name[260]; | |
| 115 | + }; | |
| 116 | +/* #endif */ | |
| 117 | + | |
| 118 | +#ifdef _USE_32BIT_TIME_T | |
| 119 | +#define _wfinddata_t _wfinddata32_t | |
| 120 | +#define _wfinddatai64_t _wfinddata32i64_t | |
| 121 | + | |
| 122 | +#define _wfindfirst _wfindfirst32 | |
| 123 | +#define _wfindnext _wfindnext32 | |
| 124 | +#define _wfindfirsti64 _wfindfirst32i64 | |
| 125 | +#define _wfindnexti64 _wfindnext32i64 | |
| 126 | +#else | |
| 127 | +#define _wfinddata_t _wfinddata64i32_t | |
| 128 | +#define _wfinddatai64_t _wfinddata64_t | |
| 129 | + | |
| 130 | +#define _wfindfirst _wfindfirst64i32 | |
| 131 | +#define _wfindnext _wfindnext64i32 | |
| 132 | +#define _wfindfirsti64 _wfindfirst64 | |
| 133 | +#define _wfindnexti64 _wfindnext64 | |
| 134 | +#endif | |
| 135 | + | |
| 80 | 136 | #define _WFINDDATA_T_DEFINED |
| 81 | 137 | #endif |
| 82 | 138 | |
| 83 | −/* Wide character versions. Also defined in io.h. */ | |
| 84 | −/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also | |
| 85 | − applies to other wide character versions? */ | |
| 86 | −#if !defined (_WIO_DEFINED) | |
| 87 | −#if defined (__MSVCRT__) | |
| 88 | −int _waccess (const wchar_t*, int); | |
| 89 | −int _wchmod (const wchar_t*, int); | |
| 90 | −int _wcreat (const wchar_t*, int); | |
| 91 | −long _wfindfirst (wchar_t*, struct _wfinddata_t *); | |
| 92 | −int _wfindnext (long, struct _wfinddata_t *); | |
| 93 | −int _wunlink (const wchar_t*); | |
| 94 | −int _wopen (const wchar_t*, int, ...); | |
| 95 | −int _wsopen (const wchar_t*, int, int, ...); | |
| 96 | −wchar_t* _wmktemp (wchar_t*); | |
| 97 | −long _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*); | |
| 98 | −int _wfindnexti64 (long, struct _wfinddatai64_t*); | |
| 99 | −#endif /* defined (__MSVCRT__) */ | |
| 100 | −#define _WIO_DEFINED | |
| 101 | −#endif /* _WIO_DEFINED */ | |
| 139 | +#ifndef NULL | |
| 140 | +#ifdef __cplusplus | |
| 141 | +#define NULL 0 | |
| 142 | +#else | |
| 143 | +#define NULL ((void *)0) | |
| 144 | +#endif | |
| 145 | +#endif | |
| 102 | 146 | |
| 103 | −#ifndef _WSTDIO_DEFINED | |
| 104 | −/* also in stdio.h - keep in sync */ | |
| 105 | −int fwprintf (FILE*, const wchar_t*, ...); | |
| 106 | −int wprintf (const wchar_t*, ...); | |
| 107 | −int swprintf (wchar_t*, const wchar_t*, ...); | |
| 108 | −int _snwprintf (wchar_t*, size_t, const wchar_t*, ...); | |
| 109 | −int vfwprintf (FILE*, const wchar_t*, va_list); | |
| 110 | −int vwprintf (const wchar_t*, va_list); | |
| 111 | −int vswprintf (wchar_t*, const wchar_t*, va_list); | |
| 112 | −int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list); | |
| 113 | −int fwscanf (FILE*, const wchar_t*, ...); | |
| 114 | −int wscanf (const wchar_t*, ...); | |
| 115 | −int swscanf (const wchar_t*, const wchar_t*, ...); | |
| 116 | −wint_t fgetwc (FILE*); | |
| 117 | −wint_t fputwc (wchar_t, FILE*); | |
| 118 | −wint_t ungetwc (wchar_t, FILE*); | |
| 147 | +#ifndef _CONST_RETURN | |
| 148 | +#define _CONST_RETURN | |
| 149 | +#endif | |
| 119 | 150 | |
| 120 | −#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 121 | −int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...); | |
| 122 | −extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, | |
| 123 | − va_list arg) | |
| 124 | − { return _vsnwprintf ( s, n, format, arg); } | |
| 125 | −#endif | |
| 126 | − | |
| 127 | −#ifdef __MSVCRT__ | |
| 128 | −wchar_t* fgetws (wchar_t*, int, FILE*); | |
| 129 | −int fputws (const wchar_t*, FILE*); | |
| 130 | −wint_t getwc (FILE*); | |
| 131 | −wint_t getwchar (void); | |
| 132 | −wchar_t* _getws (wchar_t*); | |
| 133 | −wint_t putwc (wint_t, FILE*); | |
| 134 | −int _putws (const wchar_t*); | |
| 135 | −wint_t putwchar (wint_t); | |
| 136 | − | |
| 137 | −FILE* _wfopen (const wchar_t*, const wchar_t*); | |
| 138 | −FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*); | |
| 139 | −FILE* _wfsopen (const wchar_t*, const wchar_t*, int); | |
| 140 | −wchar_t* _wtmpnam (wchar_t*); | |
| 141 | −wchar_t* _wtempnam (const wchar_t*, const wchar_t*); | |
| 142 | −int _wrename (const wchar_t*, const wchar_t*); | |
| 143 | −int _wremove (const wchar_t*) | |
| 144 | − | |
| 145 | −FILE* _wpopen (const wchar_t*, const wchar_t*) | |
| 146 | −void _wperror (const wchar_t*); | |
| 147 | −#endif /* __MSVCRT__ */ | |
| 148 | −#define _WSTDIO_DEFINED | |
| 149 | −#endif /* _WSTDIO_DEFINED */ | |
| 151 | +#define _WConst_return _CONST_RETURN | |
| 152 | + | |
| 153 | +#ifndef _CRT_CTYPEDATA_DEFINED | |
| 154 | +#define _CRT_CTYPEDATA_DEFINED | |
| 155 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 156 | + | |
| 157 | +#ifndef __PCTYPE_FUNC | |
| 158 | +#define __PCTYPE_FUNC __pctype_func() | |
| 159 | +#ifdef _MSVCRT_ | |
| 160 | +#define __pctype_func() (_pctype) | |
| 161 | +#else | |
| 162 | +#define __pctype_func() (*_imp___pctype) | |
| 163 | +#endif | |
| 164 | +#endif | |
| 165 | + | |
| 166 | +#ifndef _pctype | |
| 167 | +#ifdef _MSVCRT_ | |
| 168 | + extern unsigned short *_pctype; | |
| 169 | +#else | |
| 170 | + extern unsigned short **_imp___pctype; | |
| 171 | +#define _pctype (*_imp___pctype) | |
| 172 | +#endif | |
| 173 | +#endif | |
| 174 | +#endif | |
| 175 | +#endif | |
| 176 | + | |
| 177 | +#ifndef _CRT_WCTYPEDATA_DEFINED | |
| 178 | +#define _CRT_WCTYPEDATA_DEFINED | |
| 179 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 180 | +#ifndef _wctype | |
| 181 | +#ifdef _MSVCRT_ | |
| 182 | + extern unsigned short *_wctype; | |
| 183 | +#else | |
| 184 | + extern unsigned short **_imp___wctype; | |
| 185 | +#define _wctype (*_imp___wctype) | |
| 186 | +#endif | |
| 187 | +#endif | |
| 188 | + | |
| 189 | +#ifdef _MSVCRT_ | |
| 190 | +#define __pwctype_func() (_pwctype) | |
| 191 | +#else | |
| 192 | +#define __pwctype_func() (*_imp___pwctype) | |
| 193 | +#endif | |
| 194 | + | |
| 195 | +#ifndef _pwctype | |
| 196 | +#ifdef _MSVCRT_ | |
| 197 | + extern unsigned short *_pwctype; | |
| 198 | +#else | |
| 199 | + extern unsigned short **_imp___pwctype; | |
| 200 | +#define _pwctype (*_imp___pwctype) | |
| 201 | +#endif | |
| 202 | +#endif | |
| 203 | + | |
| 204 | +#endif | |
| 205 | +#endif | |
| 206 | + | |
| 207 | +#define _UPPER 0x1 | |
| 208 | +#define _LOWER 0x2 | |
| 209 | +#define _DIGIT 0x4 | |
| 210 | +#define _SPACE 0x8 | |
| 211 | + | |
| 212 | +#define _PUNCT 0x10 | |
| 213 | +#define _CONTROL 0x20 | |
| 214 | +#define _BLANK 0x40 | |
| 215 | +#define _HEX 0x80 | |
| 216 | + | |
| 217 | +#define _LEADBYTE 0x8000 | |
| 218 | +#define _ALPHA (0x0100|_UPPER|_LOWER) | |
| 219 | + | |
| 220 | +#ifndef _WCTYPE_DEFINED | |
| 221 | +#define _WCTYPE_DEFINED | |
| 222 | + | |
| 223 | + int __cdecl iswalpha(wint_t _C); | |
| 224 | + _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale); | |
| 225 | + int __cdecl iswupper(wint_t _C); | |
| 226 | + _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale); | |
| 227 | + int __cdecl iswlower(wint_t _C); | |
| 228 | + _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale); | |
| 229 | + int __cdecl iswdigit(wint_t _C); | |
| 230 | + _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale); | |
| 231 | + int __cdecl iswxdigit(wint_t _C); | |
| 232 | + _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale); | |
| 233 | + int __cdecl iswspace(wint_t _C); | |
| 234 | + _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale); | |
| 235 | + int __cdecl iswpunct(wint_t _C); | |
| 236 | + _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale); | |
| 237 | + int __cdecl iswalnum(wint_t _C); | |
| 238 | + _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale); | |
| 239 | + int __cdecl iswprint(wint_t _C); | |
| 240 | + _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale); | |
| 241 | + int __cdecl iswgraph(wint_t _C); | |
| 242 | + _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale); | |
| 243 | + int __cdecl iswcntrl(wint_t _C); | |
| 244 | + _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale); | |
| 245 | + int __cdecl iswascii(wint_t _C); | |
| 246 | + int __cdecl isleadbyte(int _C); | |
| 247 | + _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale); | |
| 248 | + wint_t __cdecl towupper(wint_t _C); | |
| 249 | + _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale); | |
| 250 | + wint_t __cdecl towlower(wint_t _C); | |
| 251 | + _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale); | |
| 252 | + int __cdecl iswctype(wint_t _C,wctype_t _Type); | |
| 253 | + _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale); | |
| 254 | + _CRTIMP int __cdecl __iswcsymf(wint_t _C); | |
| 255 | + _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale); | |
| 256 | + _CRTIMP int __cdecl __iswcsym(wint_t _C); | |
| 257 | + _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale); | |
| 258 | + int __cdecl is_wctype(wint_t _C,wctype_t _Type); | |
| 259 | +#endif | |
| 150 | 260 | |
| 151 | 261 | #ifndef _WDIRECT_DEFINED |
| 152 | −/* Also in direct.h */ | |
| 153 | −#ifdef __MSVCRT__ | |
| 154 | −int _wchdir (const wchar_t*); | |
| 155 | −wchar_t* _wgetcwd (wchar_t*, int); | |
| 156 | −wchar_t* _wgetdcwd (int, wchar_t*, int); | |
| 157 | −int _wmkdir (const wchar_t*); | |
| 158 | −int _wrmdir (const wchar_t*); | |
| 159 | −#endif /* __MSVCRT__ */ | |
| 160 | 262 | #define _WDIRECT_DEFINED |
| 161 | −#endif /* _WDIRECT_DEFINED */ | |
| 263 | + | |
| 264 | + _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); | |
| 265 | + _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); | |
| 266 | + wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords); | |
| 267 | + _CRTIMP int __cdecl _wchdir(const wchar_t *_Path); | |
| 268 | + _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path); | |
| 269 | + _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path); | |
| 270 | +#endif | |
| 271 | + | |
| 272 | +#ifndef _WIO_DEFINED | |
| 273 | +#define _WIO_DEFINED | |
| 274 | + | |
| 275 | + _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode); | |
| 276 | + _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode); | |
| 277 | + _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode); | |
| 278 | + _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); | |
| 279 | + _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); | |
| 280 | + _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename); | |
| 281 | + _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename); | |
| 282 | + _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName); | |
| 283 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 284 | + _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); | |
| 285 | + intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); | |
| 286 | + _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); | |
| 287 | + _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); | |
| 288 | + int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); | |
| 289 | + _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); | |
| 290 | +#endif | |
| 291 | + _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); | |
| 292 | +#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64)) | |
| 293 | + _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...); | |
| 294 | + _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...); | |
| 295 | +#else | |
| 296 | + extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0); | |
| 297 | + extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0); | |
| 298 | +#endif | |
| 299 | +#endif | |
| 300 | + | |
| 301 | +#ifndef _WLOCALE_DEFINED | |
| 302 | +#define _WLOCALE_DEFINED | |
| 303 | + _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale); | |
| 304 | +#endif | |
| 305 | + | |
| 306 | +#ifndef _WPROCESS_DEFINED | |
| 307 | +#define _WPROCESS_DEFINED | |
| 308 | + | |
| 309 | + _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 310 | + _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 311 | + _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 312 | + _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 313 | + _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 314 | + _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 315 | + _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 316 | + _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 317 | + _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 318 | + _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 319 | + _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 320 | + _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); | |
| 321 | + _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 322 | + _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 323 | + _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); | |
| 324 | + _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); | |
| 325 | +#ifndef _CRT_WSYSTEM_DEFINED | |
| 326 | +#define _CRT_WSYSTEM_DEFINED | |
| 327 | + _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); | |
| 328 | +#endif | |
| 329 | +#endif | |
| 330 | + | |
| 331 | +#ifndef _WCTYPE_INLINE_DEFINED | |
| 332 | +#undef _CRT_WCTYPE_NOINLINE | |
| 333 | +#if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE) | |
| 334 | +#define iswalpha(_c) (iswctype(_c,_ALPHA)) | |
| 335 | +#define iswupper(_c) (iswctype(_c,_UPPER)) | |
| 336 | +#define iswlower(_c) (iswctype(_c,_LOWER)) | |
| 337 | +#define iswdigit(_c) (iswctype(_c,_DIGIT)) | |
| 338 | +#define iswxdigit(_c) (iswctype(_c,_HEX)) | |
| 339 | +#define iswspace(_c) (iswctype(_c,_SPACE)) | |
| 340 | +#define iswpunct(_c) (iswctype(_c,_PUNCT)) | |
| 341 | +#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT)) | |
| 342 | +#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT)) | |
| 343 | +#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT)) | |
| 344 | +#define iswcntrl(_c) (iswctype(_c,_CONTROL)) | |
| 345 | +#define iswascii(_c) ((unsigned)(_c) < 0x80) | |
| 346 | + | |
| 347 | +#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p)) | |
| 348 | +#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p)) | |
| 349 | +#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p)) | |
| 350 | +#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p)) | |
| 351 | +#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p)) | |
| 352 | +#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p)) | |
| 353 | +#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p)) | |
| 354 | +#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p)) | |
| 355 | +#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p)) | |
| 356 | +#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p)) | |
| 357 | +#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p)) | |
| 358 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 359 | +#define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE) | |
| 360 | +#endif | |
| 361 | +#endif | |
| 362 | +#define _WCTYPE_INLINE_DEFINED | |
| 363 | +#endif | |
| 364 | + | |
| 365 | +#if !defined(_POSIX_) || defined(__GNUC__) | |
| 366 | +#ifndef _INO_T_DEFINED | |
| 367 | +#define _INO_T_DEFINED | |
| 368 | + typedef unsigned short _ino_t; | |
| 369 | +#ifndef NO_OLDNAMES | |
| 370 | + typedef unsigned short ino_t; | |
| 371 | +#endif | |
| 372 | +#endif | |
| 373 | + | |
| 374 | +#ifndef _DEV_T_DEFINED | |
| 375 | +#define _DEV_T_DEFINED | |
| 376 | + typedef unsigned int _dev_t; | |
| 377 | +#ifndef NO_OLDNAMES | |
| 378 | + typedef unsigned int dev_t; | |
| 379 | +#endif | |
| 380 | +#endif | |
| 381 | + | |
| 382 | +#ifndef _OFF_T_DEFINED | |
| 383 | +#define _OFF_T_DEFINED | |
| 384 | +#ifndef _OFF_T_ | |
| 385 | +#define _OFF_T_ | |
| 386 | + typedef long _off_t; | |
| 387 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 388 | + typedef long off_t; | |
| 389 | +#endif | |
| 390 | +#endif | |
| 391 | +#endif | |
| 392 | + | |
| 393 | +#ifndef _OFF64_T_DEFINED | |
| 394 | +#define _OFF64_T_DEFINED | |
| 395 | + typedef long long _off64_t; | |
| 396 | +#if !defined(NO_OLDNAMES) || defined(_POSIX) | |
| 397 | + typedef long long off64_t; | |
| 398 | +#endif | |
| 399 | +#endif | |
| 162 | 400 | |
| 163 | 401 | #ifndef _STAT_DEFINED |
| 164 | −/* | |
| 165 | − * The structure manipulated and returned by stat and fstat. | |
| 166 | − * | |
| 167 | − * NOTE: If called on a directory the values in the time fields are not only | |
| 168 | − * invalid, they will cause localtime et. al. to return NULL. And calling | |
| 169 | − * asctime with a NULL pointer causes an Invalid Page Fault. So watch it! | |
| 170 | − */ | |
| 171 | −struct _stat | |
| 172 | −{ | |
| 173 | − _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ | |
| 174 | − _ino_t st_ino; /* Always zero ? */ | |
| 175 | − _mode_t st_mode; /* See above constants */ | |
| 176 | − short st_nlink; /* Number of links. */ | |
| 177 | − short st_uid; /* User: Maybe significant on NT ? */ | |
| 178 | − short st_gid; /* Group: Ditto */ | |
| 179 | − _dev_t st_rdev; /* Seems useless (not even filled in) */ | |
| 180 | − _off_t st_size; /* File size in bytes */ | |
| 181 | − time_t st_atime; /* Accessed date (always 00:00 hrs local | |
| 182 | − * on FAT) */ | |
| 183 | − time_t st_mtime; /* Modified time */ | |
| 184 | − time_t st_ctime; /* Creation time */ | |
| 185 | −}; | |
| 186 | − | |
| 187 | −struct stat | |
| 188 | −{ | |
| 189 | − _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ | |
| 190 | − _ino_t st_ino; /* Always zero ? */ | |
| 191 | − _mode_t st_mode; /* See above constants */ | |
| 192 | − short st_nlink; /* Number of links. */ | |
| 193 | − short st_uid; /* User: Maybe significant on NT ? */ | |
| 194 | − short st_gid; /* Group: Ditto */ | |
| 195 | − _dev_t st_rdev; /* Seems useless (not even filled in) */ | |
| 196 | − _off_t st_size; /* File size in bytes */ | |
| 197 | − time_t st_atime; /* Accessed date (always 00:00 hrs local | |
| 198 | − * on FAT) */ | |
| 199 | − time_t st_mtime; /* Modified time */ | |
| 200 | − time_t st_ctime; /* Creation time */ | |
| 201 | −}; | |
| 202 | −#if defined (__MSVCRT__) | |
| 203 | −struct _stati64 { | |
| 402 | +#define _STAT_DEFINED | |
| 403 | + | |
| 404 | +#ifdef _USE_32BIT_TIME_T | |
| 405 | +#ifdef WIN64 | |
| 406 | +#define _fstat _fstat32 | |
| 407 | +#define _stat _stat32 | |
| 408 | +#define _wstat _wstat32 | |
| 409 | +#else | |
| 410 | +#define _fstat32 _fstat | |
| 411 | +#define _stat32 _stat | |
| 412 | +#define _wstat32 _wstat | |
| 413 | +#endif | |
| 414 | +#define _fstati64 _fstat32i64 | |
| 415 | +#define _stati64 _stat32i64 | |
| 416 | +#define _wstati64 _wstat32i64 | |
| 417 | +#else | |
| 418 | +#define _fstat _fstat64i32 | |
| 419 | +#define _fstati64 _fstat64 | |
| 420 | +#define _stat _stat64i32 | |
| 421 | +#define _stati64 _stat64 | |
| 422 | +#define _wstat _wstat64i32 | |
| 423 | +#define _wstati64 _wstat64 | |
| 424 | +#endif | |
| 425 | + | |
| 426 | + struct _stat32 { | |
| 204 | 427 | _dev_t st_dev; |
| 205 | 428 | _ino_t st_ino; |
| 206 | 429 | unsigned short st_mode; |
| @@ -208,111 +431,441 @@ struct _stati64 { · 1 unmodified line | ||
| 208 | 431 | short st_uid; |
| 209 | 432 | short st_gid; |
| 210 | 433 | _dev_t st_rdev; |
| 211 | − __int64 st_size; | |
| 434 | + _off_t st_size; | |
| 435 | + __time32_t st_atime; | |
| 436 | + __time32_t st_mtime; | |
| 437 | + __time32_t st_ctime; | |
| 438 | + }; | |
| 439 | + | |
| 440 | +#ifndef NO_OLDNAMES | |
| 441 | + struct stat { | |
| 442 | + _dev_t st_dev; | |
| 443 | + _ino_t st_ino; | |
| 444 | + unsigned short st_mode; | |
| 445 | + short st_nlink; | |
| 446 | + short st_uid; | |
| 447 | + short st_gid; | |
| 448 | + _dev_t st_rdev; | |
| 449 | + _off_t st_size; | |
| 212 | 450 | time_t st_atime; |
| 213 | 451 | time_t st_mtime; |
| 214 | 452 | time_t st_ctime; |
| 215 | − }; | |
| 216 | −#endif /* __MSVCRT__ */ | |
| 217 | −#define _STAT_DEFINED | |
| 218 | −#endif /* _STAT_DEFINED */ | |
| 219 | − | |
| 220 | −#if !defined ( _WSTAT_DEFINED) | |
| 221 | −/* also declared in sys/stat.h */ | |
| 222 | −#if defined __MSVCRT__ | |
| 223 | −int _wstat (const wchar_t*, struct _stat*); | |
| 224 | −int _wstati64 (const wchar_t*, struct _stati64*); | |
| 225 | −#endif /* __MSVCRT__ */ | |
| 453 | + }; | |
| 454 | +#endif | |
| 455 | + | |
| 456 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 457 | + | |
| 458 | + struct _stat32i64 { | |
| 459 | + _dev_t st_dev; | |
| 460 | + _ino_t st_ino; | |
| 461 | + unsigned short st_mode; | |
| 462 | + short st_nlink; | |
| 463 | + short st_uid; | |
| 464 | + short st_gid; | |
| 465 | + _dev_t st_rdev; | |
| 466 | + __int64 st_size; | |
| 467 | + __time32_t st_atime; | |
| 468 | + __time32_t st_mtime; | |
| 469 | + __time32_t st_ctime; | |
| 470 | + }; | |
| 471 | + | |
| 472 | + struct _stat64i32 { | |
| 473 | + _dev_t st_dev; | |
| 474 | + _ino_t st_ino; | |
| 475 | + unsigned short st_mode; | |
| 476 | + short st_nlink; | |
| 477 | + short st_uid; | |
| 478 | + short st_gid; | |
| 479 | + _dev_t st_rdev; | |
| 480 | + _off_t st_size; | |
| 481 | + __time64_t st_atime; | |
| 482 | + __time64_t st_mtime; | |
| 483 | + __time64_t st_ctime; | |
| 484 | + }; | |
| 485 | + | |
| 486 | + struct _stat64 { | |
| 487 | + _dev_t st_dev; | |
| 488 | + _ino_t st_ino; | |
| 489 | + unsigned short st_mode; | |
| 490 | + short st_nlink; | |
| 491 | + short st_uid; | |
| 492 | + short st_gid; | |
| 493 | + _dev_t st_rdev; | |
| 494 | + __int64 st_size; | |
| 495 | + __time64_t st_atime; | |
| 496 | + __time64_t st_mtime; | |
| 497 | + __time64_t st_ctime; | |
| 498 | + }; | |
| 499 | +#endif | |
| 500 | + | |
| 501 | +#define __stat64 _stat64 | |
| 502 | + | |
| 503 | +#endif | |
| 504 | + | |
| 505 | +#ifndef _WSTAT_DEFINED | |
| 226 | 506 | #define _WSTAT_DEFINED |
| 227 | −#endif /* ! _WSTAT_DEFIND */ | |
| 228 | 507 | |
| 229 | −#ifndef _WTIME_DEFINED | |
| 230 | −#ifdef __MSVCRT__ | |
| 231 | −/* wide function prototypes, also declared in time.h */ | |
| 232 | −wchar_t* _wasctime (const struct tm*); | |
| 233 | −wchar_t* _wctime (const time_t*); | |
| 234 | −wchar_t* _wstrdate (wchar_t*); | |
| 235 | −wchar_t* _wstrtime (wchar_t*); | |
| 236 | −#endif /* __MSVCRT__ */ | |
| 237 | −size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); | |
| 238 | −#define _WTIME_DEFINED | |
| 239 | −#endif /* _WTIME_DEFINED */ | |
| 508 | + _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat); | |
| 509 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 510 | + _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat); | |
| 511 | + int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat); | |
| 512 | + _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat); | |
| 513 | +#endif | |
| 514 | +#endif | |
| 515 | +#endif | |
| 240 | 516 | |
| 241 | −#ifndef _WLOCALE_DEFINED /* also declared in locale.h */ | |
| 242 | −wchar_t* _wsetlocale (int, const wchar_t*); | |
| 243 | −#define _WLOCALE_DEFINED | |
| 517 | +#ifndef _WCONIO_DEFINED | |
| 518 | +#define _WCONIO_DEFINED | |
| 519 | + | |
| 520 | +#ifndef WEOF | |
| 521 | +#define WEOF (wint_t)(0xFFFF) | |
| 522 | +#endif | |
| 523 | + | |
| 524 | + _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer); | |
| 525 | + _CRTIMP wint_t __cdecl _getwch(void); | |
| 526 | + _CRTIMP wint_t __cdecl _getwche(void); | |
| 527 | + _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh); | |
| 528 | + _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh); | |
| 529 | + _CRTIMP int __cdecl _cputws(const wchar_t *_String); | |
| 530 | + _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...); | |
| 531 | + _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...); | |
| 532 | + _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 533 | + _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 534 | + _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...); | |
| 535 | + _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 536 | + | |
| 537 | + _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 538 | + _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 539 | + _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 540 | + _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 541 | + wint_t __cdecl _putwch_nolock(wchar_t _WCh); | |
| 542 | + wint_t __cdecl _getwch_nolock(void); | |
| 543 | + wint_t __cdecl _getwche_nolock(void); | |
| 544 | + wint_t __cdecl _ungetwch_nolock(wint_t _WCh); | |
| 545 | +#endif | |
| 546 | + | |
| 547 | +#ifndef _WSTDIO_DEFINED | |
| 548 | +#define _WSTDIO_DEFINED | |
| 549 | + | |
| 550 | +#ifndef WEOF | |
| 551 | +#define WEOF (wint_t)(0xFFFF) | |
| 552 | +#endif | |
| 553 | + | |
| 554 | +#ifdef _POSIX_ | |
| 555 | + _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode); | |
| 556 | +#else | |
| 557 | + _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); | |
| 558 | +#endif | |
| 559 | + | |
| 560 | + wint_t __cdecl fgetwc(FILE *_File); | |
| 561 | + _CRTIMP wint_t __cdecl _fgetwchar(void); | |
| 562 | + wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File); | |
| 563 | + _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch); | |
| 564 | + wint_t __cdecl getwc(FILE *_File); | |
| 565 | + wint_t __cdecl getwchar(void); | |
| 566 | + wint_t __cdecl putwc(wchar_t _Ch,FILE *_File); | |
| 567 | + wint_t __cdecl putwchar(wchar_t _Ch); | |
| 568 | + wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File); | |
| 569 | + wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File); | |
| 570 | + int __cdecl fputws(const wchar_t *_Str,FILE *_File); | |
| 571 | + _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String); | |
| 572 | + _CRTIMP int __cdecl _putws(const wchar_t *_Str); | |
| 573 | + int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...); | |
| 574 | + int __cdecl wprintf(const wchar_t *_Format,...); | |
| 575 | + _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...); | |
| 576 | + int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| 577 | + int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 578 | + _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...); | |
| 579 | + _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list); | |
| 580 | + _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...); | |
| 581 | + _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); | |
| 582 | + _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...); | |
| 583 | + _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args); | |
| 584 | +#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ | |
| 585 | + int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...); | |
| 586 | + __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); } | |
| 587 | + int __cdecl vwscanf (const wchar_t *, va_list); | |
| 588 | + int __cdecl vfwscanf (FILE *,const wchar_t *,va_list); | |
| 589 | + int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list); | |
| 590 | +#endif | |
| 591 | + _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...); | |
| 592 | + _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...); | |
| 593 | + _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList); | |
| 594 | + _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 595 | + _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...); | |
| 596 | + _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); | |
| 597 | + _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...); | |
| 598 | + _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList); | |
| 599 | + _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 600 | + _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 601 | + _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 602 | + _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 603 | + _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 604 | + _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 605 | + _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 606 | + _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 607 | + _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 608 | + _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 609 | + _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 610 | + _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 611 | + _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 612 | + _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 613 | + _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 614 | + _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 615 | + _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 616 | + _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...); | |
| 617 | + _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args); | |
| 618 | + _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); | |
| 619 | + _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); | |
| 620 | +#ifndef RC_INVOKED | |
| 621 | +#include <vadefs.h> | |
| 622 | +#endif | |
| 623 | + | |
| 624 | +#ifdef _CRT_NON_CONFORMING_SWPRINTFS | |
| 625 | +#ifndef __cplusplus | |
| 626 | +#define swprintf _swprintf | |
| 627 | +#define vswprintf _vswprintf | |
| 628 | +#define _swprintf_l __swprintf_l | |
| 629 | +#define _vswprintf_l __vswprintf_l | |
| 630 | +#endif | |
| 631 | +#endif | |
| 632 | + | |
| 633 | + _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); | |
| 634 | + _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList); | |
| 635 | + _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); | |
| 636 | + int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...); | |
| 637 | + _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); | |
| 638 | + int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...); | |
| 639 | + _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); | |
| 640 | + _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); | |
| 641 | + _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); | |
| 642 | + int __cdecl wscanf(const wchar_t *_Format,...); | |
| 643 | + _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...); | |
| 644 | + _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode); | |
| 645 | + _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode); | |
| 646 | + _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); | |
| 647 | + | |
| 648 | +#ifndef _CRT_WPERROR_DEFINED | |
| 649 | +#define _CRT_WPERROR_DEFINED | |
| 650 | + _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); | |
| 651 | +#endif | |
| 652 | + _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode); | |
| 653 | +#if !defined(NO_OLDNAMES) && !defined(wpopen) | |
| 654 | +#define wpopen _wpopen | |
| 655 | +#endif | |
| 656 | + _CRTIMP int __cdecl _wremove(const wchar_t *_Filename); | |
| 657 | + _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer); | |
| 658 | + _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File); | |
| 659 | + _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File); | |
| 660 | + _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File); | |
| 661 | + | |
| 662 | +#undef _CRT_GETPUTWCHAR_NOINLINE | |
| 663 | + | |
| 664 | +#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) | |
| 665 | +#define getwchar() fgetwc(stdin) | |
| 666 | +#define putwchar(_c) fputwc((_c),stdout) | |
| 667 | +#else | |
| 668 | + __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); } | |
| 669 | + __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); } | |
| 670 | +#endif | |
| 671 | + | |
| 672 | +#define getwc(_stm) fgetwc(_stm) | |
| 673 | +#define putwc(_c,_stm) fputwc(_c,_stm) | |
| 674 | +#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm) | |
| 675 | +#define _getwc_nolock(_c) _fgetwc_nolock(_c) | |
| 244 | 676 | #endif |
| 245 | 677 | |
| 246 | −#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ | |
| 247 | −long wcstol (const wchar_t*, wchar_t**, int); | |
| 248 | −unsigned long wcstoul (const wchar_t*, wchar_t**, int); | |
| 249 | −double wcstod (const wchar_t*, wchar_t**); | |
| 250 | −#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ | |
| 251 | −extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr) | |
| 252 | −{ return (wcstod(nptr, endptr)); } | |
| 678 | +#ifndef _WSTDLIB_DEFINED | |
| 679 | +#define _WSTDLIB_DEFINED | |
| 680 | + | |
| 681 | + _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix); | |
| 682 | + _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix); | |
| 683 | + _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix); | |
| 684 | + double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr); | |
| 685 | + _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale); | |
| 686 | + float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr); | |
| 687 | +#if !defined __NO_ISOCEXT /* in libmingwex.a */ | |
| 688 | + float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); | |
| 689 | + long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); | |
| 253 | 690 | #endif /* __NO_ISOCEXT */ |
| 254 | −#define _WSTDLIB_DEFINED | |
| 691 | + long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 692 | + _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 693 | + unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 694 | + _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 695 | + _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName); | |
| 696 | +#ifndef _CRT_WSYSTEM_DEFINED | |
| 697 | +#define _CRT_WSYSTEM_DEFINED | |
| 698 | + _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); | |
| 699 | +#endif | |
| 700 | + _CRTIMP double __cdecl _wtof(const wchar_t *_Str); | |
| 701 | + _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale); | |
| 702 | + _CRTIMP int __cdecl _wtoi(const wchar_t *_Str); | |
| 703 | + _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale); | |
| 704 | + _CRTIMP long __cdecl _wtol(const wchar_t *_Str); | |
| 705 | + _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale); | |
| 706 | + | |
| 707 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 708 | + _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix); | |
| 709 | + _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix); | |
| 710 | + _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str); | |
| 711 | + _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale); | |
| 712 | + _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 713 | + _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 714 | + _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); | |
| 715 | + _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); | |
| 716 | +#endif | |
| 255 | 717 | #endif |
| 256 | 718 | |
| 719 | +#ifndef _POSIX_ | |
| 720 | +#ifndef _WSTDLIBP_DEFINED | |
| 721 | +#define _WSTDLIBP_DEFINED | |
| 722 | + _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); | |
| 723 | + _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); | |
| 724 | +#ifndef _CRT_WPERROR_DEFINED | |
| 725 | +#define _CRT_WPERROR_DEFINED | |
| 726 | + _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); | |
| 727 | +#endif | |
| 728 | + _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString); | |
| 729 | + _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath); | |
| 730 | + _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext); | |
| 731 | +#endif | |
| 732 | +#endif | |
| 257 | 733 | |
| 258 | −#ifndef _NO_OLDNAMES | |
| 734 | +#ifndef _WSTRING_DEFINED | |
| 735 | +#define _WSTRING_DEFINED | |
| 736 | + _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str); | |
| 737 | + wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source); | |
| 738 | + _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch); | |
| 739 | + int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 740 | + wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source); | |
| 741 | + size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control); | |
| 742 | + size_t __cdecl wcslen(const wchar_t *_Str); | |
| 743 | + size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount); | |
| 744 | + wchar_t *__cdecl wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count); | |
| 745 | + int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 746 | + wchar_t *__cdecl wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count); | |
| 747 | + _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control); | |
| 748 | + _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch); | |
| 749 | + size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control); | |
| 750 | + _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr); | |
| 751 | + wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim); | |
| 752 | + _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum); | |
| 753 | + _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str); | |
| 754 | + _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 755 | + _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 756 | + _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 757 | + _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 758 | + _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount); | |
| 759 | + _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str); | |
| 760 | + _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val); | |
| 761 | + _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String); | |
| 762 | + _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale); | |
| 763 | + _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String); | |
| 764 | + _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale); | |
| 765 | + size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount); | |
| 766 | + _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); | |
| 767 | + int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 768 | + _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 769 | + _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 770 | + _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); | |
| 771 | + _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 772 | + _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 773 | + _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 774 | + _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); | |
| 775 | + | |
| 776 | +#ifndef NO_OLDNAMES | |
| 777 | + wchar_t *__cdecl wcsdup(const wchar_t *_Str); | |
| 778 | +#define wcswcs wcsstr | |
| 779 | + int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 780 | + int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); | |
| 781 | + wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount); | |
| 782 | + wchar_t *__cdecl wcsrev(wchar_t *_Str); | |
| 783 | + wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val); | |
| 784 | + wchar_t *__cdecl wcslwr(wchar_t *_Str); | |
| 785 | + wchar_t *__cdecl wcsupr(wchar_t *_Str); | |
| 786 | + int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); | |
| 787 | +#endif | |
| 788 | +#endif | |
| 259 | 789 | |
| 260 | −/* Wide character versions. Also declared in io.h. */ | |
| 261 | −/* CHECK: Are these in the oldnames??? NO! */ | |
| 262 | −#if (0) | |
| 263 | −int waccess (const wchar_t *, int); | |
| 264 | −int wchmod (const wchar_t *, int); | |
| 265 | −int wcreat (const wchar_t *, int); | |
| 266 | −long wfindfirst (wchar_t *, struct _wfinddata_t *); | |
| 267 | −int wfindnext (long, struct _wfinddata_t *); | |
| 268 | −int wunlink (const wchar_t *); | |
| 269 | −int wrename (const wchar_t *, const wchar_t *); | |
| 270 | −int wremove (const wchar_t *); | |
| 271 | −int wopen (const wchar_t *, int, ...); | |
| 272 | −int wsopen (const wchar_t *, int, int, ...); | |
| 273 | −wchar_t* wmktemp (wchar_t *); | |
| 790 | +#ifndef _TM_DEFINED | |
| 791 | +#define _TM_DEFINED | |
| 792 | + struct tm { | |
| 793 | + int tm_sec; | |
| 794 | + int tm_min; | |
| 795 | + int tm_hour; | |
| 796 | + int tm_mday; | |
| 797 | + int tm_mon; | |
| 798 | + int tm_year; | |
| 799 | + int tm_wday; | |
| 800 | + int tm_yday; | |
| 801 | + int tm_isdst; | |
| 802 | + }; | |
| 274 | 803 | #endif |
| 275 | −#endif /* _NO_OLDNAMES */ | |
| 276 | 804 | |
| 277 | −#endif /* not __STRICT_ANSI__ */ | |
| 805 | +#ifndef _WTIME_DEFINED | |
| 806 | +#define _WTIME_DEFINED | |
| 278 | 807 | |
| 279 | −/* These are resolved by -lmsvcp60 */ | |
| 280 | −/* If you don't have msvcp60.dll in your windows system directory, you can | |
| 281 | − easily obtain it with a search from your favorite search engine. */ | |
| 282 | −typedef int mbstate_t; | |
| 283 | −typedef wchar_t _Wint_t; | |
| 808 | + _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm); | |
| 809 | + _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time); | |
| 810 | + size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm); | |
| 811 | + _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale); | |
| 812 | + _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer); | |
| 813 | + _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer); | |
| 814 | +#if _INTEGRAL_MAX_BITS >= 64 | |
| 815 | + _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time); | |
| 816 | +#endif | |
| 284 | 817 | |
| 285 | −wint_t btowc(int); | |
| 286 | −size_t mbrlen(const char *, size_t, mbstate_t *); | |
| 287 | −size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); | |
| 288 | −size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); | |
| 818 | +#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) | |
| 819 | +#define _INC_WTIME_INL | |
| 820 | +#ifdef _USE_32BIT_TIME_T | |
| 821 | +__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); } | |
| 822 | +#else | |
| 823 | +__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); } | |
| 824 | +#endif | |
| 825 | +#endif | |
| 826 | +#endif | |
| 289 | 827 | |
| 290 | −size_t wcrtomb(char *, wchar_t, mbstate_t *); | |
| 291 | −size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); | |
| 292 | −int wctob(wint_t); | |
| 828 | + typedef int mbstate_t; | |
| 829 | + typedef wchar_t _Wint_t; | |
| 293 | 830 | |
| 294 | −#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ | |
| 295 | −extern inline int fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */ | |
| 296 | −extern inline int mbsinit(const mbstate_t* ps) {return 1;} | |
| 297 | −wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n); | |
| 298 | −wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n); | |
| 299 | −int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n); | |
| 300 | −wchar_t* wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2, | |
| 301 | − size_t n); | |
| 302 | −wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n); | |
| 303 | −long long wcstoll(const wchar_t* __restrict__ nptr, | |
| 304 | − wchar_t** __restrict__ endptr, int base); | |
| 305 | −unsigned long long wcstoull(const wchar_t* __restrict__ nptr, | |
| 306 | − wchar_t ** __restrict__ endptr, int base); | |
| 831 | + wint_t __cdecl btowc(int); | |
| 832 | + size_t __cdecl mbrlen(const char *_Ch,size_t _SizeInBytes,mbstate_t *_State); | |
| 833 | + size_t __cdecl mbrtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SizeInBytes,mbstate_t *_State); | |
| 834 | + size_t __cdecl mbsrtowcs(wchar_t *_Dest,const char **_PSrc,size_t _Count,mbstate_t *_State); | |
| 835 | + size_t __cdecl wcrtomb(char *_Dest,wchar_t _Source,mbstate_t *_State); | |
| 836 | + size_t __cdecl wcsrtombs(char *_Dest,const wchar_t **_PSource,size_t _Count,mbstate_t *_State); | |
| 837 | + int __cdecl wctob(wint_t _WCh); | |
| 307 | 838 | |
| 839 | +#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ | |
| 840 | + wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n); | |
| 841 | + _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n); | |
| 842 | + int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n); | |
| 843 | + wchar_t *__cdecl wmemcpy(wchar_t *s1,const wchar_t *s2,size_t n); | |
| 844 | + wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n); | |
| 845 | + long long __cdecl wcstoll(const wchar_t *nptr,wchar_t **endptr, int base); | |
| 846 | + unsigned long long __cdecl wcstoull(const wchar_t *nptr,wchar_t **endptr, int base); | |
| 308 | 847 | #endif /* __NO_ISOCEXT */ |
| 309 | 848 | |
| 310 | − | |
| 849 | + void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount); | |
| 850 | + void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _MaxCount); | |
| 851 | + __CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); } | |
| 852 | + __CRT_INLINE int __cdecl mbsinit(const mbstate_t *_P) { return (!_P || *_P==0); } | |
| 853 | + __CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) { for (;0<_N;++_S,--_N) if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S); return (0); } | |
| 854 | + __CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) { for (; 0 < _N; ++_S1,++_S2,--_N) if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1); return (0); } | |
| 855 | + __CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t)); } | |
| 856 | + __CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); } | |
| 857 | + __CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) { | |
| 858 | + wchar_t *_Su = _S; | |
| 859 | + for (;0<_N;++_Su,--_N) { | |
| 860 | + *_Su = _C; | |
| 861 | + } | |
| 862 | + return (_S); | |
| 863 | + } | |
| 311 | 864 | #ifdef __cplusplus |
| 312 | −} /* end of extern "C" */ | |
| 865 | +} | |
| 313 | 866 | #endif |
| 314 | 867 | |
| 315 | −#endif /* Not RC_INVOKED */ | |
| 316 | − | |
| 317 | −#endif /* not _WCHAR_H_ */ | |
| 868 | +#pragma pack(pop) | |
| 318 | 869 | |
| 870 | +#include <sec_api/wchar_s.h> | |
| 871 | +#endif | |
| @@ -1,127 +1,172 @@ | ||
| 1 | −/* | |
| 2 | − * wctype.h | |
| 3 | − * | |
| 4 | − * Functions for testing wide character types and converting characters. | |
| 5 | − * | |
| 6 | − * This file is part of the Mingw32 package. | |
| 7 | − * | |
| 8 | − * Contributors: | |
| 9 | − * Created by Mumit Khan <khan@xraylith.wisc.edu> | |
| 10 | − * | |
| 11 | − * THIS SOFTWARE IS NOT COPYRIGHTED | |
| 12 | − * | |
| 13 | − * This source code is offered for use in the public domain. You may | |
| 14 | − * use, modify or distribute it freely. | |
| 15 | − * | |
| 16 | − * This code is distributed in the hope that it will be useful but | |
| 17 | − * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY | |
| 18 | − * DISCLAIMED. This includes but is not limited to warranties of | |
| 19 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 20 | − * | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 21 | 5 | */ |
| 6 | +#ifndef _INC_WCTYPE | |
| 7 | +#define _INC_WCTYPE | |
| 22 | 8 | |
| 23 | −#ifndef _WCTYPE_H_ | |
| 24 | −#define _WCTYPE_H_ | |
| 9 | +#ifndef _WIN32 | |
| 10 | +#error Only Win32 target is supported! | |
| 11 | +#endif | |
| 25 | 12 | |
| 26 | −/* All the headers include this file. */ | |
| 27 | 13 | #include <_mingw.h> |
| 28 | 14 | |
| 29 | −#define __need_wchar_t | |
| 30 | −#define __need_wint_t | |
| 31 | −#ifndef RC_INVOKED | |
| 32 | −#include <stddef.h> | |
| 33 | −#endif /* Not RC_INVOKED */ | |
| 34 | − | |
| 35 | −/* | |
| 36 | − * The following flags are used to tell iswctype and _isctype what character | |
| 37 | − * types you are looking for. | |
| 38 | − */ | |
| 39 | −#define _UPPER 0x0001 | |
| 40 | −#define _LOWER 0x0002 | |
| 41 | −#define _DIGIT 0x0004 | |
| 42 | −#define _SPACE 0x0008 | |
| 43 | −#define _PUNCT 0x0010 | |
| 44 | −#define _CONTROL 0x0020 | |
| 45 | −#define _BLANK 0x0040 | |
| 46 | −#define _HEX 0x0080 | |
| 47 | −#define _LEADBYTE 0x8000 | |
| 48 | − | |
| 49 | −#define _ALPHA 0x0103 | |
| 50 | − | |
| 51 | −#ifndef RC_INVOKED | |
| 15 | +#pragma pack(push,_CRT_PACKING) | |
| 52 | 16 | |
| 53 | 17 | #ifdef __cplusplus |
| 54 | 18 | extern "C" { |
| 55 | 19 | #endif |
| 56 | 20 | |
| 57 | −#ifndef WEOF | |
| 58 | −#define WEOF (wchar_t)(0xFFFF) | |
| 21 | +#ifndef _CRTIMP | |
| 22 | +#define _CRTIMP __declspec(dllimport) | |
| 23 | +#endif | |
| 24 | + | |
| 25 | +#ifndef _WCHAR_T_DEFINED | |
| 26 | + typedef unsigned short wchar_t; | |
| 27 | +#define _WCHAR_T_DEFINED | |
| 59 | 28 | #endif |
| 60 | 29 | |
| 61 | 30 | #ifndef _WCTYPE_T_DEFINED |
| 62 | −typedef wchar_t wctype_t; | |
| 31 | + typedef unsigned short wint_t; | |
| 32 | + typedef unsigned short wctype_t; | |
| 63 | 33 | #define _WCTYPE_T_DEFINED |
| 64 | 34 | #endif |
| 65 | 35 | |
| 66 | −/* Wide character equivalents - also in ctype.h */ | |
| 67 | −int iswalnum(wint_t); | |
| 68 | −int iswalpha(wint_t); | |
| 69 | −int iswascii(wint_t); | |
| 70 | −int iswcntrl(wint_t); | |
| 71 | −int iswctype(wint_t, wctype_t); | |
| 72 | −int is_wctype(wint_t, wctype_t); /* Obsolete! */ | |
| 73 | −int iswdigit(wint_t); | |
| 74 | −int iswgraph(wint_t); | |
| 75 | −int iswlower(wint_t); | |
| 76 | −int iswprint(wint_t); | |
| 77 | −int iswpunct(wint_t); | |
| 78 | −int iswspace(wint_t); | |
| 79 | −int iswupper(wint_t); | |
| 80 | −int iswxdigit(wint_t); | |
| 81 | − | |
| 82 | −wchar_t towlower(wchar_t); | |
| 83 | −wchar_t towupper(wchar_t); | |
| 84 | − | |
| 85 | −int isleadbyte (int); | |
| 86 | − | |
| 87 | −/* Also in ctype.h */ | |
| 88 | − | |
| 89 | −__MINGW_IMPORT unsigned short _ctype[]; | |
| 90 | −#ifdef __MSVCRT__ | |
| 91 | −__MINGW_IMPORT unsigned short* _pctype; | |
| 36 | +#ifndef WEOF | |
| 37 | +#define WEOF (wint_t)(0xFFFF) | |
| 38 | +#endif | |
| 39 | + | |
| 40 | +#ifndef _CRT_CTYPEDATA_DEFINED | |
| 41 | +#define _CRT_CTYPEDATA_DEFINED | |
| 42 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 43 | + | |
| 44 | +#ifndef __PCTYPE_FUNC | |
| 45 | +#define __PCTYPE_FUNC __pctype_func() | |
| 46 | +#ifdef _MSVCRT_ | |
| 47 | +#define __pctype_func() (_pctype) | |
| 92 | 48 | #else |
| 93 | −__MINGW_IMPORT unsigned short* _pctype_dll; | |
| 94 | −#define _pctype _pctype_dll | |
| 95 | −#endif | |
| 96 | − | |
| 97 | −#if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) | |
| 98 | −#define __WCTYPE_INLINES_DEFINED | |
| 99 | −extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} | |
| 100 | −extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} | |
| 101 | −extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);} | |
| 102 | −extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} | |
| 103 | −extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} | |
| 104 | −extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} | |
| 105 | −extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} | |
| 106 | −extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} | |
| 107 | −extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} | |
| 108 | −extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} | |
| 109 | −extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} | |
| 110 | −extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} | |
| 111 | −extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} | |
| 112 | −#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */ | |
| 113 | − | |
| 114 | − | |
| 115 | −typedef wchar_t wctrans_t; | |
| 116 | −wint_t towctrans(wint_t, wctrans_t); | |
| 117 | −wctrans_t wctrans(const char*); | |
| 118 | −wctype_t wctype(const char*); | |
| 49 | +#define __pctype_func() (*_imp___pctype) | |
| 50 | +#endif | |
| 51 | +#endif | |
| 119 | 52 | |
| 120 | −#ifdef __cplusplus | |
| 121 | −} | |
| 53 | +#ifndef _pctype | |
| 54 | +#ifdef _MSVCRT_ | |
| 55 | + extern unsigned short *_pctype; | |
| 56 | +#else | |
| 57 | + extern unsigned short **_imp___pctype; | |
| 58 | +#define _pctype (*_imp___pctype) | |
| 59 | +#endif | |
| 60 | +#endif | |
| 61 | + | |
| 62 | +#endif | |
| 122 | 63 | #endif |
| 123 | 64 | |
| 124 | −#endif /* Not RC_INVOKED */ | |
| 65 | +#ifndef _CRT_WCTYPEDATA_DEFINED | |
| 66 | +#define _CRT_WCTYPEDATA_DEFINED | |
| 67 | +#ifndef _CTYPE_DISABLE_MACROS | |
| 68 | +#ifndef _wctype | |
| 69 | +#ifdef _MSVCRT_ | |
| 70 | + extern unsigned short *_wctype; | |
| 71 | +#else | |
| 72 | + extern unsigned short **_imp___wctype; | |
| 73 | +#define _wctype (*_imp___wctype) | |
| 74 | +#endif | |
| 75 | +#endif | |
| 125 | 76 | |
| 126 | −#endif /* Not _WCTYPE_H_ */ | |
| 77 | +#ifndef _pwctype | |
| 78 | +#ifdef _MSVCRT_ | |
| 79 | + extern unsigned short *_pwctype; | |
| 80 | +#else | |
| 81 | + extern unsigned short **_imp___pwctype; | |
| 82 | +#define _pwctype (*_imp___pwctype) | |
| 83 | +#define __pwctype_func() (*_imp___pwctype) | |
| 84 | +#endif | |
| 85 | +#endif | |
| 86 | +#endif | |
| 87 | +#endif | |
| 88 | + | |
| 89 | +#define _UPPER 0x1 | |
| 90 | +#define _LOWER 0x2 | |
| 91 | +#define _DIGIT 0x4 | |
| 92 | +#define _SPACE 0x8 | |
| 93 | + | |
| 94 | +#define _PUNCT 0x10 | |
| 95 | +#define _CONTROL 0x20 | |
| 96 | +#define _BLANK 0x40 | |
| 97 | +#define _HEX 0x80 | |
| 98 | + | |
| 99 | +#define _LEADBYTE 0x8000 | |
| 100 | +#define _ALPHA (0x0100|_UPPER|_LOWER) | |
| 101 | + | |
| 102 | +#ifndef _WCTYPE_DEFINED | |
| 103 | +#define _WCTYPE_DEFINED | |
| 104 | + | |
| 105 | + int __cdecl iswalpha(wint_t); | |
| 106 | + int __cdecl iswupper(wint_t); | |
| 107 | + int __cdecl iswlower(wint_t); | |
| 108 | + int __cdecl iswdigit(wint_t); | |
| 109 | + int __cdecl iswxdigit(wint_t); | |
| 110 | + int __cdecl iswspace(wint_t); | |
| 111 | + int __cdecl iswpunct(wint_t); | |
| 112 | + int __cdecl iswalnum(wint_t); | |
| 113 | + int __cdecl iswprint(wint_t); | |
| 114 | + int __cdecl iswgraph(wint_t); | |
| 115 | + int __cdecl iswcntrl(wint_t); | |
| 116 | + int __cdecl iswascii(wint_t); | |
| 117 | + int __cdecl isleadbyte(int); | |
| 118 | + wint_t __cdecl towupper(wint_t); | |
| 119 | + wint_t __cdecl towlower(wint_t); | |
| 120 | + int __cdecl iswctype(wint_t,wctype_t); | |
| 121 | + _CRTIMP int __cdecl __iswcsymf(wint_t); | |
| 122 | + _CRTIMP int __cdecl __iswcsym(wint_t); | |
| 123 | + int __cdecl is_wctype(wint_t,wctype_t); | |
| 124 | +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) | |
| 125 | +int __cdecl isblank(int _C); | |
| 126 | +#endif | |
| 127 | +#endif | |
| 127 | 128 | |
| 129 | +#ifndef _WCTYPE_INLINE_DEFINED | |
| 130 | +#define _WCTYPE_INLINE_DEFINED | |
| 131 | +#ifndef __cplusplus | |
| 132 | +#define iswalpha(_c) (iswctype(_c,_ALPHA)) | |
| 133 | +#define iswupper(_c) (iswctype(_c,_UPPER)) | |
| 134 | +#define iswlower(_c) (iswctype(_c,_LOWER)) | |
| 135 | +#define iswdigit(_c) (iswctype(_c,_DIGIT)) | |
| 136 | +#define iswxdigit(_c) (iswctype(_c,_HEX)) | |
| 137 | +#define iswspace(_c) (iswctype(_c,_SPACE)) | |
| 138 | +#define iswpunct(_c) (iswctype(_c,_PUNCT)) | |
| 139 | +#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT)) | |
| 140 | +#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT)) | |
| 141 | +#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT)) | |
| 142 | +#define iswcntrl(_c) (iswctype(_c,_CONTROL)) | |
| 143 | +#define iswascii(_c) ((unsigned)(_c) < 0x80) | |
| 144 | +#define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE) | |
| 145 | +#else | |
| 146 | + __CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); } | |
| 147 | + __CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); } | |
| 148 | + __CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); } | |
| 149 | + __CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); } | |
| 150 | + __CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); } | |
| 151 | + __CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); } | |
| 152 | + __CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); } | |
| 153 | + __CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); } | |
| 154 | + __CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); } | |
| 155 | + __CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); } | |
| 156 | + __CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); } | |
| 157 | + __CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); } | |
| 158 | + __CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); } | |
| 159 | +#endif | |
| 160 | +#endif | |
| 161 | + | |
| 162 | + typedef wchar_t wctrans_t; | |
| 163 | + wint_t __cdecl towctrans(wint_t,wctrans_t); | |
| 164 | + wctrans_t __cdecl wctrans(const char *); | |
| 165 | + wctype_t __cdecl wctype(const char *); | |
| 166 | + | |
| 167 | +#ifdef __cplusplus | |
| 168 | +} | |
| 169 | +#endif | |
| 170 | + | |
| 171 | +#pragma pack(pop) | |
| 172 | +#endif | |
| @@ -1,119 +1,149 @@ | ||
| 1 | −#ifndef _BASETSD_H | |
| 2 | −#define _BASETSD_H | |
| 3 | −#if __GNUC__ >=3 | |
| 4 | −#pragma GCC system_header | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _BASETSD_H_ | |
| 7 | +#define _BASETSD_H_ | |
| 8 | + | |
| 9 | +#if (defined(__x86_64) || defined(__ia64__)) && !defined(RC_INVOKED) | |
| 10 | +typedef unsigned __int64 POINTER_64_INT; | |
| 11 | +#else | |
| 12 | +typedef unsigned long POINTER_64_INT; | |
| 5 | 13 | #endif |
| 6 | 14 | |
| 7 | −#ifdef __GNUC__ | |
| 8 | −#ifndef __int64 | |
| 9 | −#define __int64 long long | |
| 15 | +#define POINTER_32 | |
| 16 | +#define POINTER_64 | |
| 17 | +#define FIRMWARE_PTR | |
| 18 | + | |
| 19 | +#ifdef __cplusplus | |
| 20 | +extern "C" { | |
| 21 | +#endif | |
| 22 | + | |
| 23 | + typedef signed char INT8,*PINT8; | |
| 24 | + typedef signed short INT16,*PINT16; | |
| 25 | + typedef signed int INT32,*PINT32; | |
| 26 | + typedef signed __int64 INT64,*PINT64; | |
| 27 | + typedef unsigned char UINT8,*PUINT8; | |
| 28 | + typedef unsigned short UINT16,*PUINT16; | |
| 29 | + typedef unsigned int UINT32,*PUINT32; | |
| 30 | + typedef unsigned __int64 UINT64,*PUINT64; | |
| 31 | + typedef signed int LONG32,*PLONG32; | |
| 32 | + typedef unsigned int ULONG32,*PULONG32; | |
| 33 | + typedef unsigned int DWORD32,*PDWORD32; | |
| 34 | + | |
| 35 | +#ifndef _W64 | |
| 36 | +#define _W64 | |
| 10 | 37 | #endif |
| 38 | + | |
| 39 | +#ifdef _WIN64 | |
| 40 | + typedef __int64 INT_PTR,*PINT_PTR; | |
| 41 | + typedef unsigned __int64 UINT_PTR,*PUINT_PTR; | |
| 42 | + typedef __int64 LONG_PTR,*PLONG_PTR; | |
| 43 | + typedef unsigned __int64 ULONG_PTR,*PULONG_PTR; | |
| 44 | +#define __int3264 __int64 | |
| 45 | +#else | |
| 46 | + typedef int INT_PTR,*PINT_PTR; | |
| 47 | + typedef unsigned int UINT_PTR,*PUINT_PTR; | |
| 48 | + typedef long LONG_PTR,*PLONG_PTR; | |
| 49 | + typedef unsigned long ULONG_PTR,*PULONG_PTR; | |
| 50 | +#define __int3264 __int32 | |
| 11 | 51 | #endif |
| 12 | 52 | |
| 13 | −#if defined(_WIN64) | |
| 14 | −#define __int3264 __int64 | |
| 15 | −#define ADDRESS_TAG_BIT 0x40000000000UI64 | |
| 16 | −#else /* !_WIN64 */ | |
| 17 | −#define __int3264 __int32 | |
| 53 | +#ifdef _WIN64 | |
| 54 | +#define ADDRESS_TAG_BIT 0x40000000000ULL | |
| 55 | + typedef __int64 SHANDLE_PTR; | |
| 56 | + typedef unsigned __int64 HANDLE_PTR; | |
| 57 | + typedef unsigned int UHALF_PTR,*PUHALF_PTR; | |
| 58 | + typedef int HALF_PTR,*PHALF_PTR; | |
| 59 | + | |
| 60 | + static __inline unsigned long HandleToULong(const void *h) { return((unsigned long) (ULONG_PTR) h); } | |
| 61 | + static __inline long HandleToLong(const void *h) { return((long) (LONG_PTR) h); } | |
| 62 | + static __inline void *ULongToHandle(const unsigned long h) { return((void *) (UINT_PTR) h); } | |
| 63 | + static __inline void *LongToHandle(const long h) { return((void *) (INT_PTR) h); } | |
| 64 | + static __inline unsigned long PtrToUlong(const void *p) { return((unsigned long) (ULONG_PTR) p); } | |
| 65 | + static __inline unsigned int PtrToUint(const void *p) { return((unsigned int) (UINT_PTR) p); } | |
| 66 | + static __inline unsigned short PtrToUshort(const void *p) { return((unsigned short) (unsigned long) (ULONG_PTR) p); } | |
| 67 | + static __inline long PtrToLong(const void *p) { return((long) (LONG_PTR) p); } | |
| 68 | + static __inline int PtrToInt(const void *p) { return((int) (INT_PTR) p); } | |
| 69 | + static __inline short PtrToShort(const void *p) { return((short) (long) (LONG_PTR) p); } | |
| 70 | + static __inline void *IntToPtr(const int i) { return((void *)(INT_PTR)i); } | |
| 71 | + static __inline void *UIntToPtr(const unsigned int ui) { return((void *)(UINT_PTR)ui); } | |
| 72 | + static __inline void *LongToPtr(const long l) { return((void *)(LONG_PTR)l); } | |
| 73 | + static __inline void *ULongToPtr(const unsigned long ul) { return((void *)(ULONG_PTR)ul); } | |
| 74 | + | |
| 75 | +#define PtrToPtr64(p) ((void *) p) | |
| 76 | +#define Ptr64ToPtr(p) ((void *) p) | |
| 77 | +#define HandleToHandle64(h) (PtrToPtr64(h)) | |
| 78 | +#define Handle64ToHandle(h) (Ptr64ToPtr(h)) | |
| 79 | + | |
| 80 | + static __inline void *Ptr32ToPtr(const void *p) { return (void *)p; } | |
| 81 | + static __inline void *Handle32ToHandle(const void *h) { return((void *) h); } | |
| 82 | + static __inline void *PtrToPtr32(const void *p) { return((void *) (ULONG_PTR) p); } | |
| 83 | + | |
| 84 | +#define HandleToHandle32(h) (PtrToPtr32(h)) | |
| 85 | +#else | |
| 86 | + | |
| 18 | 87 | #define ADDRESS_TAG_BIT 0x80000000UL |
| 19 | −#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) ) | |
| 20 | −#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) ) | |
| 21 | −#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h)) | |
| 22 | −#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) ) | |
| 23 | −#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) ) | |
| 24 | −#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) ) | |
| 25 | −#define PtrToInt( p ) ((INT)(INT_PTR) (p) ) | |
| 26 | −#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) ) | |
| 27 | −#define PtrToShort( p ) ((short)(LONG_PTR)(p) ) | |
| 28 | −#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i)) | |
| 29 | −#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui)) | |
| 30 | −#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l)) | |
| 31 | −#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul)) | |
| 32 | −#endif /* !_WIN64 */ | |
| 33 | 88 | |
| 89 | + typedef unsigned short UHALF_PTR,*PUHALF_PTR; | |
| 90 | + typedef short HALF_PTR,*PHALF_PTR; | |
| 91 | + typedef long SHANDLE_PTR; | |
| 92 | + typedef unsigned long HANDLE_PTR; | |
| 93 | + | |
| 94 | +#define HandleToULong(h) ((ULONG)(ULONG_PTR)(h)) | |
| 95 | +#define HandleToLong(h) ((LONG)(LONG_PTR) (h)) | |
| 96 | +#define ULongToHandle(ul) ((HANDLE)(ULONG_PTR) (ul)) | |
| 97 | +#define LongToHandle(h) ((HANDLE)(LONG_PTR) (h)) | |
| 98 | +#define PtrToUlong(p) ((ULONG)(ULONG_PTR) (p)) | |
| 99 | +#define PtrToLong(p) ((LONG)(LONG_PTR) (p)) | |
| 100 | +#define PtrToUint(p) ((UINT)(UINT_PTR) (p)) | |
| 101 | +#define PtrToInt(p) ((INT)(INT_PTR) (p)) | |
| 102 | +#define PtrToUshort(p) ((unsigned short)(ULONG_PTR)(p)) | |
| 103 | +#define PtrToShort(p) ((short)(LONG_PTR)(p)) | |
| 104 | +#define IntToPtr(i) ((VOID *)(INT_PTR)((int)i)) | |
| 105 | +#define UIntToPtr(ui) ((VOID *)(UINT_PTR)((unsigned int)ui)) | |
| 106 | +#define LongToPtr(l) ((VOID *)(LONG_PTR)((long)l)) | |
| 107 | +#define ULongToPtr(ul) ((VOID *)(ULONG_PTR)((unsigned long)ul)) | |
| 108 | + | |
| 109 | + static __inline void *PtrToPtr64(const void *p) { return((void *) (ULONG_PTR)p); } | |
| 110 | + static __inline void *Ptr64ToPtr(const void *p) { return((void *) (ULONG_PTR) p); } | |
| 111 | + static __inline void *HandleToHandle64(const void *h) { return((void *) h); } | |
| 112 | + static __inline void *Handle64ToHandle(const void *h) { return((void *) (ULONG_PTR) h); } | |
| 113 | + | |
| 114 | +#define Ptr32ToPtr(p) ((void *) p) | |
| 115 | +#define Handle32ToHandle(h) (Ptr32ToPtr(h)) | |
| 116 | +#define PtrToPtr32(p) ((void *) p) | |
| 117 | +#define HandleToHandle32(h) (PtrToPtr32(h)) | |
| 118 | +#endif | |
| 119 | + | |
| 120 | +#define HandleToUlong(h) HandleToULong(h) | |
| 121 | +#define UlongToHandle(ul) ULongToHandle(ul) | |
| 34 | 122 | #define UlongToPtr(ul) ULongToPtr(ul) |
| 35 | 123 | #define UintToPtr(ui) UIntToPtr(ui) |
| 36 | −#define MAXUINT_PTR (~((UINT_PTR)0)) | |
| 37 | −#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1)) | |
| 38 | −#define MININT_PTR (~MAXINT_PTR) | |
| 124 | + | |
| 125 | +#define MAXUINT_PTR (~((UINT_PTR)0)) | |
| 126 | +#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1)) | |
| 127 | +#define MININT_PTR (~MAXINT_PTR) | |
| 128 | + | |
| 39 | 129 | #define MAXULONG_PTR (~((ULONG_PTR)0)) |
| 40 | −#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1)) | |
| 41 | −#define MINLONG_PTR (~MAXLONG_PTR) | |
| 130 | +#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1)) | |
| 131 | +#define MINLONG_PTR (~MAXLONG_PTR) | |
| 132 | + | |
| 42 | 133 | #define MAXUHALF_PTR ((UHALF_PTR)~0) |
| 43 | −#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1)) | |
| 44 | −#define MINHALF_PTR (~MAXHALF_PTR) | |
| 134 | +#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1)) | |
| 135 | +#define MINHALF_PTR (~MAXHALF_PTR) | |
| 136 | + | |
| 137 | + typedef ULONG_PTR SIZE_T,*PSIZE_T; | |
| 138 | + typedef LONG_PTR SSIZE_T,*PSSIZE_T; | |
| 139 | + typedef ULONG_PTR DWORD_PTR,*PDWORD_PTR; | |
| 140 | + typedef __int64 LONG64,*PLONG64; | |
| 141 | + typedef unsigned __int64 ULONG64,*PULONG64; | |
| 142 | + typedef unsigned __int64 DWORD64,*PDWORD64; | |
| 143 | + typedef ULONG_PTR KAFFINITY; | |
| 144 | + typedef KAFFINITY *PKAFFINITY; | |
| 45 | 145 | |
| 46 | −#ifndef RC_INVOKED | |
| 47 | −#ifdef __cplusplus | |
| 48 | −extern "C" { | |
| 49 | −#endif | |
| 50 | −typedef int LONG32, *PLONG32; | |
| 51 | −#ifndef XFree86Server | |
| 52 | −typedef int INT32, *PINT32; | |
| 53 | −#endif /* ndef XFree86Server */ | |
| 54 | −typedef unsigned int ULONG32, *PULONG32; | |
| 55 | −typedef unsigned int DWORD32, *PDWORD32; | |
| 56 | −typedef unsigned int UINT32, *PUINT32; | |
| 57 | − | |
| 58 | −#if defined(_WIN64) | |
| 59 | −typedef __int64 INT_PTR, *PINT_PTR; | |
| 60 | −typedef unsigned __int64 UINT_PTR, *PUINT_PTR; | |
| 61 | −typedef __int64 LONG_PTR, *PLONG_PTR; | |
| 62 | −typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; | |
| 63 | −typedef unsigned __int64 HANDLE_PTR; | |
| 64 | −typedef unsigned int UHALF_PTR, *PUHALF_PTR; | |
| 65 | −typedef int HALF_PTR, *PHALF_PTR; | |
| 66 | − | |
| 67 | −#if 0 /* TODO when WIN64 is here */ | |
| 68 | −inline unsigned long HandleToUlong(const void* h ) | |
| 69 | − { return((unsigned long) h ); } | |
| 70 | −inline long HandleToLong( const void* h ) | |
| 71 | − { return((long) h ); } | |
| 72 | −inline void* LongToHandle( const long h ) | |
| 73 | − { return((void*) (INT_PTR) h ); } | |
| 74 | −inline unsigned long PtrToUlong( const void* p) | |
| 75 | − { return((unsigned long) p ); } | |
| 76 | −inline unsigned int PtrToUint( const void* p ) | |
| 77 | − { return((unsigned int) p ); } | |
| 78 | −inline unsigned short PtrToUshort( const void* p ) | |
| 79 | − { return((unsigned short) p ); } | |
| 80 | −inline long PtrToLong( const void* p ) | |
| 81 | − { return((long) p ); } | |
| 82 | −inline int PtrToInt( const void* p ) | |
| 83 | − { return((int) p ); } | |
| 84 | −inline short PtrToShort( const void* p ) | |
| 85 | − { return((short) p ); } | |
| 86 | −inline void* IntToPtr( const int i ) | |
| 87 | − { return( (void*)(INT_PTR)i ); } | |
| 88 | −inline void* UIntToPtr(const unsigned int ui) | |
| 89 | − { return( (void*)(UINT_PTR)ui ); } | |
| 90 | −inline void* LongToPtr( const long l ) | |
| 91 | − { return( (void*)(LONG_PTR)l ); } | |
| 92 | −inline void* ULongToPtr( const unsigned long ul ) | |
| 93 | − { return( (void*)(ULONG_PTR)ul ); } | |
| 94 | −#endif /* 0_ */ | |
| 95 | − | |
| 96 | −#else /* !_WIN64 */ | |
| 97 | −typedef int INT_PTR, *PINT_PTR; | |
| 98 | −typedef unsigned int UINT_PTR, *PUINT_PTR; | |
| 99 | −typedef long LONG_PTR, *PLONG_PTR; | |
| 100 | −typedef unsigned long ULONG_PTR, *PULONG_PTR; | |
| 101 | −typedef unsigned short UHALF_PTR, *PUHALF_PTR; | |
| 102 | −typedef short HALF_PTR, *PHALF_PTR; | |
| 103 | −typedef unsigned long HANDLE_PTR; | |
| 104 | −#endif /* !_WIN64 */ | |
| 105 | − | |
| 106 | −typedef ULONG_PTR SIZE_T, *PSIZE_T; | |
| 107 | −typedef LONG_PTR SSIZE_T, *PSSIZE_T; | |
| 108 | −typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; | |
| 109 | −typedef __int64 LONG64, *PLONG64; | |
| 110 | −typedef __int64 INT64, *PINT64; | |
| 111 | −typedef unsigned __int64 ULONG64, *PULONG64; | |
| 112 | −typedef unsigned __int64 DWORD64, *PDWORD64; | |
| 113 | −typedef unsigned __int64 UINT64, *PUINT64; | |
| 114 | 146 | #ifdef __cplusplus |
| 115 | 147 | } |
| 116 | 148 | #endif |
| 117 | −#endif /* !RC_INVOKED */ | |
| 118 | − | |
| 119 | −#endif /* _BASETSD_H */ | |
| 149 | +#endif | |
| @@ -1,144 +1,85 @@ | ||
| 1 | −#ifndef _BASETYPS_H | |
| 2 | −#define _BASETYPS_H | |
| 3 | −#if __GNUC__ >=3 | |
| 4 | −#pragma GCC system_header | |
| 5 | −#endif | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !defined(_BASETYPS_H_) | |
| 7 | +#define _BASETYPS_H_ | |
| 6 | 8 | |
| 7 | −#ifndef __OBJC__ | |
| 8 | 9 | #ifdef __cplusplus |
| 9 | 10 | #define EXTERN_C extern "C" |
| 10 | 11 | #else |
| 11 | 12 | #define EXTERN_C extern |
| 12 | −#endif /* __cplusplus */ | |
| 13 | −#define STDMETHODCALLTYPE __stdcall | |
| 14 | −#define STDMETHODVCALLTYPE __cdecl | |
| 15 | −#define STDAPICALLTYPE __stdcall | |
| 16 | −#define STDAPIVCALLTYPE __cdecl | |
| 17 | −#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE | |
| 18 | −#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE | |
| 19 | −#define STDMETHODIMP HRESULT STDMETHODCALLTYPE | |
| 20 | −#define STDMETHODIMP_(t) t STDMETHODCALLTYPE | |
| 21 | −#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE | |
| 22 | −#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE | |
| 23 | −#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE | |
| 24 | −#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE | |
| 25 | −#define interface struct | |
| 26 | −#if defined(__cplusplus) && !defined(CINTERFACE) | |
| 27 | −#define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m | |
| 28 | −#define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m | |
| 29 | −#define PURE =0 | |
| 30 | −#define THIS_ | |
| 31 | −#define THIS void | |
| 32 | −/* | |
| 33 | − __attribute__((com_interface)) is obsolete in __GNUC__ >= 3 | |
| 34 | − g++ vtables are now COM-compatible by default | |
| 35 | −*/ | |
| 36 | −#if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE) | |
| 37 | −#define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i | |
| 38 | −#define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b | |
| 39 | −#else | |
| 40 | −#define DECLARE_INTERFACE(i) interface i | |
| 41 | −#define DECLARE_INTERFACE_(i,b) interface i : public b | |
| 42 | −#endif | |
| 43 | −#else | |
| 44 | −#define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m) | |
| 45 | −#define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m) | |
| 46 | −#define PURE | |
| 47 | −#define THIS_ INTERFACE *, | |
| 48 | −#define THIS INTERFACE * | |
| 49 | −#ifndef CONST_VTABLE | |
| 50 | −#define CONST_VTABLE | |
| 51 | 13 | #endif |
| 52 | −#define DECLARE_INTERFACE(i) \ | |
| 53 | −typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \ | |
| 54 | −typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \ | |
| 55 | −CONST_VTABLE struct i##Vtbl | |
| 56 | −#define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i) | |
| 57 | −#endif | |
| 58 | −#define BEGIN_INTERFACE | |
| 59 | −#define END_INTERFACE | |
| 60 | 14 | |
| 61 | −#define FWD_DECL(i) typedef interface i i | |
| 15 | +#define STDMETHODCALLTYPE WINAPI | |
| 16 | +#define STDMETHODVCALLTYPE __cdecl | |
| 17 | + | |
| 18 | +#define STDAPICALLTYPE WINAPI | |
| 19 | +#define STDAPIVCALLTYPE __cdecl | |
| 20 | + | |
| 21 | +#define STDAPI EXTERN_C HRESULT WINAPI | |
| 22 | +#define STDAPI_(type) EXTERN_C type WINAPI | |
| 23 | + | |
| 24 | +#define STDMETHODIMP HRESULT WINAPI | |
| 25 | +#define STDMETHODIMP_(type) type WINAPI | |
| 26 | + | |
| 27 | +#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE | |
| 28 | +#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE | |
| 29 | + | |
| 30 | +#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE | |
| 31 | +#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE | |
| 32 | + | |
| 62 | 33 | #if defined(__cplusplus) && !defined(CINTERFACE) |
| 63 | −#define IENUM_THIS(T) | |
| 64 | −#define IENUM_THIS_(T) | |
| 34 | + | |
| 35 | +#define __STRUCT__ struct | |
| 36 | +#define STDMETHOD(method) virtual HRESULT WINAPI method | |
| 37 | +#define STDMETHOD_(type,method) virtual type WINAPI method | |
| 38 | +#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method | |
| 39 | +#define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method | |
| 40 | +#define PURE = 0 | |
| 41 | +#define THIS_ | |
| 42 | +#define THIS void | |
| 43 | +#define DECLARE_INTERFACE(iface) __STRUCT__ iface | |
| 44 | +#define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface | |
| 65 | 45 | #else |
| 66 | −#define IENUM_THIS(T) T* | |
| 67 | −#define IENUM_THIS_(T) T*, | |
| 68 | −#endif | |
| 69 | −#define DECLARE_ENUMERATOR_(I,T) \ | |
| 70 | −DECLARE_INTERFACE_(I,IUnknown) \ | |
| 71 | −{ \ | |
| 72 | − STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \ | |
| 73 | − STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \ | |
| 74 | − STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \ | |
| 75 | − STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \ | |
| 76 | − STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \ | |
| 77 | − STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \ | |
| 78 | − STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \ | |
| 79 | −} | |
| 80 | −#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T) | |
| 81 | 46 | |
| 82 | −#endif /* __OBJC__ */ | |
| 47 | +#ifndef __OBJC__ | |
| 48 | +#define interface struct | |
| 49 | +#endif | |
| 83 | 50 | |
| 84 | −#ifndef _GUID_DEFINED /* also defined in winnt.h */ | |
| 85 | −#define _GUID_DEFINED | |
| 86 | −typedef struct _GUID | |
| 87 | −{ | |
| 88 | − unsigned long Data1; | |
| 89 | − unsigned short Data2; | |
| 90 | − unsigned short Data3; | |
| 91 | − unsigned char Data4[8]; | |
| 92 | −} GUID,*REFGUID,*LPGUID; | |
| 93 | −#endif /* _GUID_DEFINED */ | |
| 94 | −#ifndef UUID_DEFINED | |
| 95 | −#define UUID_DEFINED | |
| 96 | −typedef GUID UUID; | |
| 97 | −#endif /* UUID_DEFINED */ | |
| 98 | −typedef GUID IID; | |
| 99 | −typedef GUID CLSID; | |
| 100 | −typedef CLSID *LPCLSID; | |
| 101 | −typedef IID *LPIID; | |
| 102 | −typedef IID *REFIID; | |
| 103 | −typedef CLSID *REFCLSID; | |
| 104 | −typedef GUID FMTID; | |
| 105 | −typedef FMTID *REFFMTID; | |
| 106 | −typedef unsigned long error_status_t; | |
| 107 | −#define uuid_t UUID | |
| 108 | −typedef unsigned long PROPID; | |
| 51 | +#define STDMETHOD(method) HRESULT (WINAPI *method) | |
| 52 | +#define STDMETHOD_(type,method) type (WINAPI *method) | |
| 53 | +#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method) | |
| 54 | +#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method) | |
| 109 | 55 | |
| 110 | −#ifndef _REFGUID_DEFINED | |
| 111 | −#if defined (__cplusplus) && !defined (CINTERFACE) | |
| 112 | −#define REFGUID const GUID& | |
| 113 | −#define REFIID const IID& | |
| 114 | −#define REFCLSID const CLSID& | |
| 56 | +#define PURE | |
| 57 | +#define THIS_ INTERFACE *This, | |
| 58 | +#define THIS INTERFACE *This | |
| 59 | +#ifdef CONST_VTABLE | |
| 60 | +#define DECLARE_INTERFACE(iface) typedef struct iface { \ | |
| 61 | + const struct iface##Vtbl *lpVtbl; } iface; \ | |
| 62 | + typedef const struct iface##Vtbl iface##Vtbl; \ | |
| 63 | + const struct iface##Vtbl | |
| 115 | 64 | #else |
| 116 | −#define REFGUID const GUID* const | |
| 117 | −#define REFIID const IID* const | |
| 118 | −#define REFCLSID const CLSID* const | |
| 65 | +#define DECLARE_INTERFACE(iface) typedef struct iface { \ | |
| 66 | + struct iface##Vtbl *lpVtbl; \ | |
| 67 | + } iface; \ | |
| 68 | + typedef struct iface##Vtbl iface##Vtbl; \ | |
| 69 | + struct iface##Vtbl | |
| 119 | 70 | #endif |
| 120 | −#define _REFGUID_DEFINED | |
| 121 | −#define _REFGIID_DEFINED | |
| 122 | −#define _REFCLSID_DEFINED | |
| 71 | +#define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface) | |
| 123 | 72 | #endif |
| 124 | −#ifndef GUID_SECTION | |
| 125 | −#define GUID_SECTION ".text" | |
| 126 | −#endif | |
| 127 | −#ifdef __GNUC__ | |
| 128 | −#define GUID_SECT __attribute__ ((section (GUID_SECTION))) | |
| 129 | −#else | |
| 130 | −#define GUID_SECT | |
| 131 | −#endif | |
| 132 | −#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus)) | |
| 133 | −#define GUID_EXT EXTERN_C | |
| 134 | −#else | |
| 135 | −#define GUID_EXT | |
| 73 | + | |
| 74 | +#include <guiddef.h> | |
| 75 | + | |
| 76 | +#ifndef _ERROR_STATUS_T_DEFINED | |
| 77 | +#define _ERROR_STATUS_T_DEFINED | |
| 78 | +typedef unsigned long error_status_t; | |
| 136 | 79 | #endif |
| 137 | −#ifdef INITGUID | |
| 138 | −#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} | |
| 139 | −#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46) | |
| 140 | −#else | |
| 141 | −#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n | |
| 142 | −#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46) | |
| 80 | + | |
| 81 | +#ifndef _WCHAR_T_DEFINED | |
| 82 | +typedef unsigned short wchar_t; | |
| 83 | +#define _WCHAR_T_DEFINED | |
| 143 | 84 | #endif |
| 144 | 85 | #endif |
| @@ -0,0 +1,151 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef GUID_DEFINED | |
| 7 | +#define GUID_DEFINED | |
| 8 | +typedef struct _GUID { | |
| 9 | + unsigned long Data1; | |
| 10 | + unsigned short Data2; | |
| 11 | + unsigned short Data3; | |
| 12 | + unsigned char Data4[8 ]; | |
| 13 | +} GUID; | |
| 14 | +#endif | |
| 15 | + | |
| 16 | +#ifndef FAR | |
| 17 | +#define FAR | |
| 18 | +#endif | |
| 19 | + | |
| 20 | +#ifndef DECLSPEC_SELECTANY | |
| 21 | +#define DECLSPEC_SELECTANY __declspec(selectany) | |
| 22 | +#endif | |
| 23 | + | |
| 24 | +#ifndef EXTERN_C | |
| 25 | +#ifdef __cplusplus | |
| 26 | +#define EXTERN_C extern "C" | |
| 27 | +#else | |
| 28 | +#define EXTERN_C extern | |
| 29 | +#endif | |
| 30 | +#endif | |
| 31 | + | |
| 32 | +#ifdef DEFINE_GUID | |
| 33 | +#undef DEFINE_GUID | |
| 34 | +#endif | |
| 35 | + | |
| 36 | +#ifdef INITGUID | |
| 37 | +#ifdef __cplusplus | |
| 38 | +#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } } | |
| 39 | +#else | |
| 40 | +#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } } | |
| 41 | +#endif | |
| 42 | +#else | |
| 43 | +#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name | |
| 44 | +#endif | |
| 45 | + | |
| 46 | +#define DEFINE_OLEGUID(name,l,w1,w2) DEFINE_GUID(name,l,w1,w2,0xC0,0,0,0,0,0,0,0x46) | |
| 47 | + | |
| 48 | +#ifndef _GUIDDEF_H_ | |
| 49 | +#define _GUIDDEF_H_ | |
| 50 | + | |
| 51 | +#ifndef __LPGUID_DEFINED__ | |
| 52 | +#define __LPGUID_DEFINED__ | |
| 53 | +typedef GUID *LPGUID; | |
| 54 | +#endif | |
| 55 | + | |
| 56 | +#ifndef __LPCGUID_DEFINED__ | |
| 57 | +#define __LPCGUID_DEFINED__ | |
| 58 | +typedef const GUID *LPCGUID; | |
| 59 | +#endif | |
| 60 | + | |
| 61 | +#ifndef __IID_DEFINED__ | |
| 62 | +#define __IID_DEFINED__ | |
| 63 | + | |
| 64 | +typedef GUID IID; | |
| 65 | +typedef IID *LPIID; | |
| 66 | +#define IID_NULL GUID_NULL | |
| 67 | +#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2) | |
| 68 | +typedef GUID CLSID; | |
| 69 | +typedef CLSID *LPCLSID; | |
| 70 | +#define CLSID_NULL GUID_NULL | |
| 71 | +#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2) | |
| 72 | +typedef GUID FMTID; | |
| 73 | +typedef FMTID *LPFMTID; | |
| 74 | +#define FMTID_NULL GUID_NULL | |
| 75 | +#define IsEqualFMTID(rfmtid1,rfmtid2) IsEqualGUID(rfmtid1,rfmtid2) | |
| 76 | + | |
| 77 | +#ifdef __midl_proxy | |
| 78 | +#define __MIDL_CONST | |
| 79 | +#else | |
| 80 | +#define __MIDL_CONST const | |
| 81 | +#endif | |
| 82 | + | |
| 83 | +#ifndef _REFGUID_DEFINED | |
| 84 | +#define _REFGUID_DEFINED | |
| 85 | +#ifdef __cplusplus | |
| 86 | +#define REFGUID const GUID & | |
| 87 | +#else | |
| 88 | +#define REFGUID const GUID *__MIDL_CONST | |
| 89 | +#endif | |
| 90 | +#endif | |
| 91 | + | |
| 92 | +#ifndef _REFIID_DEFINED | |
| 93 | +#define _REFIID_DEFINED | |
| 94 | +#ifdef __cplusplus | |
| 95 | +#define REFIID const IID & | |
| 96 | +#else | |
| 97 | +#define REFIID const IID *__MIDL_CONST | |
| 98 | +#endif | |
| 99 | +#endif | |
| 100 | + | |
| 101 | +#ifndef _REFCLSID_DEFINED | |
| 102 | +#define _REFCLSID_DEFINED | |
| 103 | +#ifdef __cplusplus | |
| 104 | +#define REFCLSID const IID & | |
| 105 | +#else | |
| 106 | +#define REFCLSID const IID *__MIDL_CONST | |
| 107 | +#endif | |
| 108 | +#endif | |
| 109 | + | |
| 110 | +#ifndef _REFFMTID_DEFINED | |
| 111 | +#define _REFFMTID_DEFINED | |
| 112 | +#ifdef __cplusplus | |
| 113 | +#define REFFMTID const IID & | |
| 114 | +#else | |
| 115 | +#define REFFMTID const IID *__MIDL_CONST | |
| 116 | +#endif | |
| 117 | +#endif | |
| 118 | +#endif | |
| 119 | + | |
| 120 | +#ifndef _SYS_GUID_OPERATORS_ | |
| 121 | +#define _SYS_GUID_OPERATORS_ | |
| 122 | +#include <string.h> | |
| 123 | + | |
| 124 | +#ifdef __cplusplus | |
| 125 | +__inline int InlineIsEqualGUID(REFGUID rguid1,REFGUID rguid2) { | |
| 126 | + return (((unsigned long *) &rguid1)[0]==((unsigned long *) &rguid2)[0] && ((unsigned long *) &rguid1)[1]==((unsigned long *) &rguid2)[1] && | |
| 127 | + ((unsigned long *) &rguid1)[2]==((unsigned long *) &rguid2)[2] && ((unsigned long *) &rguid1)[3]==((unsigned long *) &rguid2)[3]); | |
| 128 | +} | |
| 129 | +__inline int IsEqualGUID(REFGUID rguid1,REFGUID rguid2) { return !memcmp(&rguid1,&rguid2,sizeof(GUID)); } | |
| 130 | +#else | |
| 131 | +#define InlineIsEqualGUID(rguid1,rguid2) (((unsigned long *) rguid1)[0]==((unsigned long *) rguid2)[0] && ((unsigned long *) rguid1)[1]==((unsigned long *) rguid2)[1] && ((unsigned long *) rguid1)[2]==((unsigned long *) rguid2)[2] && ((unsigned long *) rguid1)[3]==((unsigned long *) rguid2)[3]) | |
| 132 | +#define IsEqualGUID(rguid1,rguid2) (!memcmp(rguid1,rguid2,sizeof(GUID))) | |
| 133 | +#endif | |
| 134 | + | |
| 135 | +#ifdef __INLINE_ISEQUAL_GUID | |
| 136 | +#undef IsEqualGUID | |
| 137 | +#define IsEqualGUID(rguid1,rguid2) InlineIsEqualGUID(rguid1,rguid2) | |
| 138 | +#endif | |
| 139 | + | |
| 140 | +#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2) | |
| 141 | +#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2) | |
| 142 | + | |
| 143 | +#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_ | |
| 144 | +#define _SYS_GUID_OPERATOR_EQ_ | |
| 145 | +#ifdef __cplusplus | |
| 146 | +__inline int operator==(REFGUID guidOne,REFGUID guidOther) { return IsEqualGUID(guidOne,guidOther); } | |
| 147 | +__inline int operator!=(REFGUID guidOne,REFGUID guidOther) { return !(guidOne==guidOther); } | |
| 148 | +#endif | |
| 149 | +#endif | |
| 150 | +#endif | |
| 151 | +#endif | |
| @@ -0,0 +1,11 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef __INTRIN_H_ | |
| 7 | +#define __INTRIN_H_ | |
| 8 | + | |
| 9 | +//!__TINYC__: intrinsic stuff removed | |
| 10 | + | |
| 11 | +#endif /* end __INTRIN_H_ */ | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !(defined(lint) || defined(RC_INVOKED)) | |
| 7 | +#pragma pack(pop) | |
| 8 | +#endif | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !(defined(lint) || defined(RC_INVOKED)) | |
| 7 | +#pragma pack(push,1) | |
| 8 | +#endif | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !(defined(lint) || defined(RC_INVOKED)) | |
| 7 | +#pragma pack(push,2) | |
| 8 | +#endif | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !(defined(lint) || defined(RC_INVOKED)) | |
| 7 | +#pragma pack(push,4) | |
| 8 | +#endif | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !(defined(lint) || defined(RC_INVOKED)) | |
| 7 | +#pragma pack(push,8) | |
| 8 | +#endif | |
| @@ -0,0 +1,80 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#if !defined SENTINEL_Reason | |
| 7 | +#define SENTINEL_Reason | |
| 8 | + | |
| 9 | +#define SHTDN_REASON_FLAG_COMMENT_REQUIRED 0x01000000 | |
| 10 | +#define SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED 0x02000000 | |
| 11 | +#define SHTDN_REASON_FLAG_CLEAN_UI 0x04000000 | |
| 12 | +#define SHTDN_REASON_FLAG_DIRTY_UI 0x08000000 | |
| 13 | +#define SHTDN_REASON_FLAG_USER_DEFINED 0x40000000 | |
| 14 | +#define SHTDN_REASON_FLAG_PLANNED 0x80000000 | |
| 15 | +#define SHTDN_REASON_MAJOR_OTHER 0x00000000 | |
| 16 | +#define SHTDN_REASON_MAJOR_NONE 0x00000000 | |
| 17 | +#define SHTDN_REASON_MAJOR_HARDWARE 0x00010000 | |
| 18 | +#define SHTDN_REASON_MAJOR_OPERATINGSYSTEM 0x00020000 | |
| 19 | +#define SHTDN_REASON_MAJOR_SOFTWARE 0x00030000 | |
| 20 | +#define SHTDN_REASON_MAJOR_APPLICATION 0x00040000 | |
| 21 | +#define SHTDN_REASON_MAJOR_SYSTEM 0x00050000 | |
| 22 | +#define SHTDN_REASON_MAJOR_POWER 0x00060000 | |
| 23 | +#define SHTDN_REASON_MAJOR_LEGACY_API 0x00070000 | |
| 24 | +#define SHTDN_REASON_MINOR_OTHER 0x00000000 | |
| 25 | +#define SHTDN_REASON_MINOR_NONE 0x000000ff | |
| 26 | +#define SHTDN_REASON_MINOR_MAINTENANCE 0x00000001 | |
| 27 | +#define SHTDN_REASON_MINOR_INSTALLATION 0x00000002 | |
| 28 | +#define SHTDN_REASON_MINOR_UPGRADE 0x00000003 | |
| 29 | +#define SHTDN_REASON_MINOR_RECONFIG 0x00000004 | |
| 30 | +#define SHTDN_REASON_MINOR_HUNG 0x00000005 | |
| 31 | +#define SHTDN_REASON_MINOR_UNSTABLE 0x00000006 | |
| 32 | +#define SHTDN_REASON_MINOR_DISK 0x00000007 | |
| 33 | +#define SHTDN_REASON_MINOR_PROCESSOR 0x00000008 | |
| 34 | +#define SHTDN_REASON_MINOR_NETWORKCARD 0x00000009 | |
| 35 | +#define SHTDN_REASON_MINOR_POWER_SUPPLY 0x0000000a | |
| 36 | +#define SHTDN_REASON_MINOR_CORDUNPLUGGED 0x0000000b | |
| 37 | +#define SHTDN_REASON_MINOR_ENVIRONMENT 0x0000000c | |
| 38 | +#define SHTDN_REASON_MINOR_HARDWARE_DRIVER 0x0000000d | |
| 39 | +#define SHTDN_REASON_MINOR_OTHERDRIVER 0x0000000e | |
| 40 | +#define SHTDN_REASON_MINOR_BLUESCREEN 0x0000000F | |
| 41 | +#define SHTDN_REASON_MINOR_SERVICEPACK 0x00000010 | |
| 42 | +#define SHTDN_REASON_MINOR_HOTFIX 0x00000011 | |
| 43 | +#define SHTDN_REASON_MINOR_SECURITYFIX 0x00000012 | |
| 44 | +#define SHTDN_REASON_MINOR_SECURITY 0x00000013 | |
| 45 | +#define SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY 0x00000014 | |
| 46 | +#define SHTDN_REASON_MINOR_WMI 0x00000015 | |
| 47 | +#define SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL 0x00000016 | |
| 48 | +#define SHTDN_REASON_MINOR_HOTFIX_UNINSTALL 0x00000017 | |
| 49 | +#define SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL 0x00000018 | |
| 50 | +#define SHTDN_REASON_MINOR_MMC 0x00000019 | |
| 51 | +#define SHTDN_REASON_MINOR_SYSTEMRESTORE 0x0000001a | |
| 52 | +#define SHTDN_REASON_MINOR_TERMSRV 0x00000020 | |
| 53 | +#define SHTDN_REASON_MINOR_DC_PROMOTION 0x00000021 | |
| 54 | +#define SHTDN_REASON_MINOR_DC_DEMOTION 0x00000022 | |
| 55 | +#define SHTDN_REASON_UNKNOWN SHTDN_REASON_MINOR_NONE | |
| 56 | +#define SHTDN_REASON_LEGACY_API (SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED) | |
| 57 | +#define SHTDN_REASON_VALID_BIT_MASK 0xc0ffffff | |
| 58 | + | |
| 59 | +#define PCLEANUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_CLEAN_UI) | |
| 60 | +#define UCLEANUI (SHTDN_REASON_FLAG_CLEAN_UI) | |
| 61 | +#define PDIRTYUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_DIRTY_UI) | |
| 62 | +#define UDIRTYUI (SHTDN_REASON_FLAG_DIRTY_UI) | |
| 63 | + | |
| 64 | +#define MAX_REASON_NAME_LEN 64 | |
| 65 | +#define MAX_REASON_DESC_LEN 256 | |
| 66 | +#define MAX_REASON_BUGID_LEN 32 | |
| 67 | +#define MAX_REASON_COMMENT_LEN 512 | |
| 68 | +#define SHUTDOWN_TYPE_LEN 32 | |
| 69 | + | |
| 70 | +#define POLICY_SHOWREASONUI_NEVER 0 | |
| 71 | +#define POLICY_SHOWREASONUI_ALWAYS 1 | |
| 72 | +#define POLICY_SHOWREASONUI_WORKSTATIONONLY 2 | |
| 73 | +#define POLICY_SHOWREASONUI_SERVERONLY 3 | |
| 74 | + | |
| 75 | +#define SNAPSHOT_POLICY_NEVER 0 | |
| 76 | +#define SNAPSHOT_POLICY_ALWAYS 1 | |
| 77 | +#define SNAPSHOT_POLICY_UNPLANNED 2 | |
| 78 | + | |
| 79 | +#define MAX_NUM_REASONS 256 | |
| 80 | +#endif | |
| @@ -0,0 +1,7 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#define __specstrings | |
| @@ -0,0 +1,154 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef __STRALIGN_H_ | |
| 7 | +#define __STRALIGN_H_ | |
| 8 | + | |
| 9 | +#ifndef _STRALIGN_USE_SECURE_CRT | |
| 10 | +#define _STRALIGN_USE_SECURE_CRT 0 | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#ifdef __cplusplus | |
| 14 | +extern "C" { | |
| 15 | +#endif | |
| 16 | + | |
| 17 | +#if defined(I_X86_) | |
| 18 | +#define WSTR_ALIGNED(s) TRUE | |
| 19 | +#define ua_CharUpperW CharUpperW | |
| 20 | +#define ua_lstrcmpiW lstrcmpiW | |
| 21 | +#define ua_lstrcmpW lstrcmpW | |
| 22 | +#define ua_lstrlenW lstrlenW | |
| 23 | +#define ua_wcschr wcschr | |
| 24 | +#define ua_wcsicmp wcsicmp | |
| 25 | +#define ua_wcslen wcslen | |
| 26 | +#define ua_wcsrchr wcsrchr | |
| 27 | + static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) { return wcscpy(Destination,Source); } | |
| 28 | +#else | |
| 29 | +#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0) | |
| 30 | + | |
| 31 | + LPUWSTR WINAPI uaw_CharUpperW(LPUWSTR String); | |
| 32 | + int WINAPI uaw_lstrcmpW(PCUWSTR String1,PCUWSTR String2); | |
| 33 | + int WINAPI uaw_lstrcmpiW(PCUWSTR String1,PCUWSTR String2); | |
| 34 | + int WINAPI uaw_lstrlenW(LPCUWSTR String); | |
| 35 | + PUWSTR __cdecl uaw_wcschr(PCUWSTR String,WCHAR Character); | |
| 36 | + PUWSTR __cdecl uaw_wcscpy(PUWSTR Destination,PCUWSTR Source); | |
| 37 | + int __cdecl uaw_wcsicmp(PCUWSTR String1,PCUWSTR String2); | |
| 38 | + size_t __cdecl uaw_wcslen(PCUWSTR String); | |
| 39 | + PUWSTR __cdecl uaw_wcsrchr(PCUWSTR String,WCHAR Character); | |
| 40 | +#ifdef CharUpper | |
| 41 | + static __inline LPUWSTR ua_CharUpperW(LPUWSTR String) { | |
| 42 | + if(WSTR_ALIGNED(String)) return CharUpperW((PWSTR)String); | |
| 43 | + return uaw_CharUpperW(String); | |
| 44 | + } | |
| 45 | +#endif | |
| 46 | + | |
| 47 | +#ifdef lstrcmp | |
| 48 | + static __inline int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2) { | |
| 49 | + if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpW((LPCWSTR)String1,(LPCWSTR)String2); | |
| 50 | + return uaw_lstrcmpW(String1,String2); | |
| 51 | + } | |
| 52 | +#endif | |
| 53 | + | |
| 54 | +#ifdef lstrcmpi | |
| 55 | + static __inline int ua_lstrcmpiW(LPCUWSTR String1,LPCUWSTR String2) { | |
| 56 | + if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpiW((LPCWSTR)String1,(LPCWSTR)String2); | |
| 57 | + return uaw_lstrcmpiW(String1,String2); | |
| 58 | + } | |
| 59 | +#endif | |
| 60 | + | |
| 61 | +#ifdef lstrlen | |
| 62 | + static __inline int ua_lstrlenW(LPCUWSTR String) { | |
| 63 | + if(WSTR_ALIGNED(String)) return lstrlenW((PCWSTR)String); | |
| 64 | + return uaw_lstrlenW(String); | |
| 65 | + } | |
| 66 | +#endif | |
| 67 | + | |
| 68 | +#if defined(_WSTRING_DEFINED) | |
| 69 | +#ifdef _WConst_return | |
| 70 | + typedef _WConst_return WCHAR UNALIGNED *PUWSTR_C; | |
| 71 | +#else | |
| 72 | + typedef WCHAR UNALIGNED *PUWSTR_C; | |
| 73 | +#endif | |
| 74 | + static __inline PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) { | |
| 75 | + if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character); | |
| 76 | + return (PUWSTR_C)uaw_wcschr(String,Character); | |
| 77 | + } | |
| 78 | + static __inline PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) { | |
| 79 | + if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character); | |
| 80 | + return (PUWSTR_C)uaw_wcsrchr(String,Character); | |
| 81 | + } | |
| 82 | +#if defined(__cplusplus) && defined(_WConst_Return) | |
| 83 | + static __inline PUWSTR ua_wcschr(PUWSTR String,WCHAR Character) { | |
| 84 | + if(WSTR_ALIGNED(String)) return wcscpy((PWSTR)Destination,(PCWSTR)Source); | |
| 85 | + return uaw_wcscpy(Destination,Source); | |
| 86 | + } | |
| 87 | + static __inline PUWSTR ua_wcsrchr(PUWSTR String,WCHAR Character) { | |
| 88 | + if(WSTR_ALIGNED(String)) return wcsrchr(String,Character); | |
| 89 | + return uaw_wcsrchr((PCUWSTR)String,Character); | |
| 90 | + } | |
| 91 | +#endif | |
| 92 | + | |
| 93 | + static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) { | |
| 94 | + if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return wcscpy((PWSTR)Destination,(PCWSTR)Source); | |
| 95 | + return uaw_wcscpy(Destination,Source); | |
| 96 | + } | |
| 97 | + static __inline size_t ua_wcslen(PCUWSTR String) { | |
| 98 | + if(WSTR_ALIGNED(String)) return wcslen((PCWSTR)String); | |
| 99 | + return uaw_wcslen(String); | |
| 100 | + } | |
| 101 | +#endif | |
| 102 | + | |
| 103 | + static __inline int ua_wcsicmp(LPCUWSTR String1,LPCUWSTR String2) { | |
| 104 | + if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2); | |
| 105 | + return uaw_wcsicmp(String1,String2); | |
| 106 | + } | |
| 107 | +#endif | |
| 108 | + | |
| 109 | +#ifndef __UA_WCSLEN | |
| 110 | +#define __UA_WCSLEN ua_wcslen | |
| 111 | +#endif | |
| 112 | + | |
| 113 | +#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR)) | |
| 114 | +#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s) | |
| 115 | + | |
| 116 | +#ifdef I_X86_ | |
| 117 | +#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s)) | |
| 118 | +#else | |
| 119 | +#define WSTR_ALIGNED_STACK_COPY(d,s) { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; } | |
| 120 | +#endif | |
| 121 | + | |
| 122 | +#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s)) | |
| 123 | + | |
| 124 | +#ifndef I_X86_ | |
| 125 | +#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0) | |
| 126 | +#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t))) | |
| 127 | +#else | |
| 128 | +#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s)) | |
| 129 | +#endif | |
| 130 | + | |
| 131 | +#ifdef UNICODE | |
| 132 | +#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s) | |
| 133 | +#define TSTR_ALIGNED(x) WSTR_ALIGNED(x) | |
| 134 | +#define ua_CharUpper ua_CharUpperW | |
| 135 | +#define ua_lstrcmp ua_lstrcmpW | |
| 136 | +#define ua_lstrcmpi ua_lstrcmpiW | |
| 137 | +#define ua_lstrlen ua_lstrlenW | |
| 138 | +#define ua_tcscpy ua_wcscpy | |
| 139 | +#else | |
| 140 | +#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s) | |
| 141 | +#define TSTR_ALIGNED(x) TRUE | |
| 142 | +#define ua_CharUpper CharUpperA | |
| 143 | +#define ua_lstrcmp lstrcmpA | |
| 144 | +#define ua_lstrcmpi lstrcmpiA | |
| 145 | +#define ua_lstrlen lstrlenA | |
| 146 | +#define ua_tcscpy strcpy | |
| 147 | +#endif | |
| 148 | + | |
| 149 | +#ifdef __cplusplus | |
| 150 | +} | |
| 151 | +#endif | |
| 152 | + | |
| 153 | +#include <sec_api/stralign_s.h> | |
| 154 | +#endif | |
| @@ -0,0 +1,79 @@ | ||
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef __TVOUT__ | |
| 7 | +#define __TVOUT__ | |
| 8 | + | |
| 9 | +#include <guiddef.h> | |
| 10 | + | |
| 11 | +typedef struct _VIDEOPARAMETERS { | |
| 12 | + GUID Guid; | |
| 13 | + ULONG dwOffset; | |
| 14 | + ULONG dwCommand; | |
| 15 | + ULONG dwFlags; | |
| 16 | + ULONG dwMode; | |
| 17 | + ULONG dwTVStandard; | |
| 18 | + ULONG dwAvailableModes; | |
| 19 | + ULONG dwAvailableTVStandard; | |
| 20 | + ULONG dwFlickerFilter; | |
| 21 | + ULONG dwOverScanX; | |
| 22 | + ULONG dwOverScanY; | |
| 23 | + ULONG dwMaxUnscaledX; | |
| 24 | + ULONG dwMaxUnscaledY; | |
| 25 | + ULONG dwPositionX; | |
| 26 | + ULONG dwPositionY; | |
| 27 | + ULONG dwBrightness; | |
| 28 | + ULONG dwContrast; | |
| 29 | + ULONG dwCPType; | |
| 30 | + ULONG dwCPCommand; | |
| 31 | + ULONG dwCPStandard; | |
| 32 | + ULONG dwCPKey; | |
| 33 | + ULONG bCP_APSTriggerBits; | |
| 34 | + UCHAR bOEMCopyProtection[256]; | |
| 35 | +} VIDEOPARAMETERS,*PVIDEOPARAMETERS,*LPVIDEOPARAMETERS; | |
| 36 | + | |
| 37 | +#define VP_COMMAND_GET 0x0001 | |
| 38 | +#define VP_COMMAND_SET 0x0002 | |
| 39 | + | |
| 40 | +#define VP_FLAGS_TV_MODE 0x0001 | |
| 41 | +#define VP_FLAGS_TV_STANDARD 0x0002 | |
| 42 | +#define VP_FLAGS_FLICKER 0x0004 | |
| 43 | +#define VP_FLAGS_OVERSCAN 0x0008 | |
| 44 | +#define VP_FLAGS_MAX_UNSCALED 0x0010 | |
| 45 | +#define VP_FLAGS_POSITION 0x0020 | |
| 46 | +#define VP_FLAGS_BRIGHTNESS 0x0040 | |
| 47 | +#define VP_FLAGS_CONTRAST 0x0080 | |
| 48 | +#define VP_FLAGS_COPYPROTECT 0x0100 | |
| 49 | + | |
| 50 | +#define VP_MODE_WIN_GRAPHICS 0x0001 | |
| 51 | +#define VP_MODE_TV_PLAYBACK 0x0002 | |
| 52 | + | |
| 53 | +#define VP_TV_STANDARD_NTSC_M 0x0001 | |
| 54 | +#define VP_TV_STANDARD_NTSC_M_J 0x0002 | |
| 55 | +#define VP_TV_STANDARD_PAL_B 0x0004 | |
| 56 | +#define VP_TV_STANDARD_PAL_D 0x0008 | |
| 57 | +#define VP_TV_STANDARD_PAL_H 0x0010 | |
| 58 | +#define VP_TV_STANDARD_PAL_I 0x0020 | |
| 59 | +#define VP_TV_STANDARD_PAL_M 0x0040 | |
| 60 | +#define VP_TV_STANDARD_PAL_N 0x0080 | |
| 61 | +#define VP_TV_STANDARD_SECAM_B 0x0100 | |
| 62 | +#define VP_TV_STANDARD_SECAM_D 0x0200 | |
| 63 | +#define VP_TV_STANDARD_SECAM_G 0x0400 | |
| 64 | +#define VP_TV_STANDARD_SECAM_H 0x0800 | |
| 65 | +#define VP_TV_STANDARD_SECAM_K 0x1000 | |
| 66 | +#define VP_TV_STANDARD_SECAM_K1 0x2000 | |
| 67 | +#define VP_TV_STANDARD_SECAM_L 0x4000 | |
| 68 | +#define VP_TV_STANDARD_WIN_VGA 0x8000 | |
| 69 | +#define VP_TV_STANDARD_NTSC_433 0x00010000 | |
| 70 | +#define VP_TV_STANDARD_PAL_G 0x00020000 | |
| 71 | +#define VP_TV_STANDARD_PAL_60 0x00040000 | |
| 72 | +#define VP_TV_STANDARD_SECAM_L1 0x00080000 | |
| 73 | + | |
| 74 | +#define VP_CP_TYPE_APS_TRIGGER 0x0001 | |
| 75 | +#define VP_CP_TYPE_MACROVISION 0x0002 | |
| 76 | +#define VP_CP_CMD_ACTIVATE 0x0001 | |
| 77 | +#define VP_CP_CMD_DEACTIVATE 0x0002 | |
| 78 | +#define VP_CP_CMD_CHANGE 0x0004 | |
| 79 | +#endif | |
| @@ -1,1852 +1,2951 @@ | ||
| 1 | −#ifndef _WINBASE_H | |
| 2 | −#define _WINBASE_H | |
| 3 | −#if __GNUC__ >=3 | |
| 4 | −#pragma GCC system_header | |
| 5 | −#endif | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _WINBASE_ | |
| 7 | +#define _WINBASE_ | |
| 6 | 8 | |
| 9 | +#define WINADVAPI DECLSPEC_IMPORT | |
| 7 | 10 | #define WINBASEAPI DECLSPEC_IMPORT |
| 11 | +#define ZAWPROXYAPI DECLSPEC_IMPORT | |
| 12 | + | |
| 8 | 13 | #ifdef __cplusplus |
| 9 | 14 | extern "C" { |
| 10 | 15 | #endif |
| 11 | 16 | |
| 12 | −#define SP_SERIALCOMM 1 | |
| 13 | −#define PST_UNSPECIFIED 0 | |
| 14 | −#define PST_RS232 1 | |
| 15 | −#define PST_PARALLELPORT 2 | |
| 16 | −#define PST_RS422 3 | |
| 17 | −#define PST_RS423 4 | |
| 18 | −#define PST_RS449 5 | |
| 19 | −#define PST_MODEM 6 | |
| 20 | −#define PST_FAX 0x21 | |
| 21 | −#define PST_SCANNER 0x22 | |
| 22 | −#define PST_NETWORK_BRIDGE 0x100 | |
| 23 | −#define PST_LAT 0x101 | |
| 24 | −#define PST_TCPIP_TELNET 0x102 | |
| 25 | −#define PST_X25 0x103 | |
| 26 | −#define BAUD_075 1 | |
| 27 | −#define BAUD_110 2 | |
| 28 | −#define BAUD_134_5 4 | |
| 29 | −#define BAUD_150 8 | |
| 30 | −#define BAUD_300 16 | |
| 31 | −#define BAUD_600 32 | |
| 32 | −#define BAUD_1200 64 | |
| 33 | −#define BAUD_1800 128 | |
| 34 | −#define BAUD_2400 256 | |
| 35 | −#define BAUD_4800 512 | |
| 36 | −#define BAUD_7200 1024 | |
| 37 | −#define BAUD_9600 2048 | |
| 38 | −#define BAUD_14400 4096 | |
| 39 | −#define BAUD_19200 8192 | |
| 40 | −#define BAUD_38400 16384 | |
| 41 | −#define BAUD_56K 32768 | |
| 42 | −#define BAUD_128K 65536 | |
| 43 | −#define BAUD_115200 131072 | |
| 44 | −#define BAUD_57600 262144 | |
| 45 | −#define BAUD_USER 0x10000000 | |
| 46 | −#define PCF_DTRDSR 1 | |
| 47 | −#define PCF_RTSCTS 2 | |
| 48 | −#define PCF_RLSD 4 | |
| 49 | −#define PCF_PARITY_CHECK 8 | |
| 50 | −#define PCF_XONXOFF 16 | |
| 51 | −#define PCF_SETXCHAR 32 | |
| 52 | −#define PCF_TOTALTIMEOUTS 64 | |
| 53 | −#define PCF_INTTIMEOUTS 128 | |
| 54 | −#define PCF_SPECIALCHARS 256 | |
| 55 | −#define PCF_16BITMODE 512 | |
| 56 | −#define SP_PARITY 1 | |
| 57 | −#define SP_BAUD 2 | |
| 58 | −#define SP_DATABITS 4 | |
| 59 | −#define SP_STOPBITS 8 | |
| 60 | −#define SP_HANDSHAKING 16 | |
| 61 | −#define SP_PARITY_CHECK 32 | |
| 62 | −#define SP_RLSD 64 | |
| 63 | −#define DATABITS_5 1 | |
| 64 | −#define DATABITS_6 2 | |
| 65 | −#define DATABITS_7 4 | |
| 66 | −#define DATABITS_8 8 | |
| 67 | −#define DATABITS_16 16 | |
| 68 | −#define DATABITS_16X 32 | |
| 69 | −#define STOPBITS_10 1 | |
| 70 | −#define STOPBITS_15 2 | |
| 71 | −#define STOPBITS_20 4 | |
| 72 | −#define PARITY_NONE 256 | |
| 73 | −#define PARITY_ODD 512 | |
| 74 | −#define PARITY_EVEN 1024 | |
| 75 | −#define PARITY_MARK 2048 | |
| 76 | −#define PARITY_SPACE 4096 | |
| 77 | −#define EXCEPTION_DEBUG_EVENT 1 | |
| 78 | −#define CREATE_THREAD_DEBUG_EVENT 2 | |
| 79 | −#define CREATE_PROCESS_DEBUG_EVENT 3 | |
| 80 | −#define EXIT_THREAD_DEBUG_EVENT 4 | |
| 81 | −#define EXIT_PROCESS_DEBUG_EVENT 5 | |
| 82 | −#define LOAD_DLL_DEBUG_EVENT 6 | |
| 83 | −#define UNLOAD_DLL_DEBUG_EVENT 7 | |
| 84 | −#define OUTPUT_DEBUG_STRING_EVENT 8 | |
| 85 | −#define RIP_EVENT 9 | |
| 86 | −#define HFILE_ERROR ((HFILE)-1) | |
| 87 | −#define FILE_BEGIN 0 | |
| 88 | −#define FILE_CURRENT 1 | |
| 89 | −#define FILE_END 2 | |
| 90 | −#define INVALID_SET_FILE_POINTER ((DWORD)-1) | |
| 91 | −#define OF_READ 0 | |
| 92 | −#define OF_READWRITE 2 | |
| 93 | −#define OF_WRITE 1 | |
| 94 | −#define OF_SHARE_COMPAT 0 | |
| 95 | −#define OF_SHARE_DENY_NONE 64 | |
| 96 | −#define OF_SHARE_DENY_READ 48 | |
| 97 | −#define OF_SHARE_DENY_WRITE 32 | |
| 98 | −#define OF_SHARE_EXCLUSIVE 16 | |
| 99 | −#define OF_CANCEL 2048 | |
| 100 | −#define OF_CREATE 4096 | |
| 101 | −#define OF_DELETE 512 | |
| 102 | −#define OF_EXIST 16384 | |
| 103 | −#define OF_PARSE 256 | |
| 104 | −#define OF_PROMPT 8192 | |
| 105 | −#define OF_REOPEN 32768 | |
| 106 | −#define OF_VERIFY 1024 | |
| 107 | −#define NMPWAIT_NOWAIT 1 | |
| 108 | −#define NMPWAIT_WAIT_FOREVER (-1) | |
| 109 | −#define NMPWAIT_USE_DEFAULT_WAIT 0 | |
| 110 | −#define CE_BREAK 16 | |
| 111 | −#define CE_DNS 2048 | |
| 112 | −#define CE_FRAME 8 | |
| 113 | −#define CE_IOE 1024 | |
| 114 | −#define CE_MODE 32768 | |
| 115 | −#define CE_OOP 4096 | |
| 116 | −#define CE_OVERRUN 2 | |
| 117 | −#define CE_PTO 512 | |
| 118 | −#define CE_RXOVER 1 | |
| 119 | −#define CE_RXPARITY 4 | |
| 120 | −#define CE_TXFULL 256 | |
| 121 | −#define PROGRESS_CONTINUE 0 | |
| 122 | −#define PROGRESS_CANCEL 1 | |
| 123 | −#define PROGRESS_STOP 2 | |
| 124 | −#define PROGRESS_QUIET 3 | |
| 125 | −#define CALLBACK_CHUNK_FINISHED 0 | |
| 126 | −#define CALLBACK_STREAM_SWITCH 1 | |
| 127 | −#define COPY_FILE_FAIL_IF_EXISTS 1 | |
| 128 | −#define COPY_FILE_RESTARTABLE 2 | |
| 129 | −#define OFS_MAXPATHNAME 128 | |
| 130 | −#define DUPLICATE_CLOSE_SOURCE 1 | |
| 131 | −#define DUPLICATE_SAME_ACCESS 2 | |
| 132 | −#define FILE_MAP_ALL_ACCESS 0xf001f | |
| 133 | −#define FILE_MAP_READ 4 | |
| 134 | −#define FILE_MAP_WRITE 2 | |
| 135 | −#define FILE_MAP_COPY 1 | |
| 136 | −#define MUTEX_ALL_ACCESS 0x1f0001 | |
| 137 | −#define MUTEX_MODIFY_STATE 1 | |
| 138 | −#define SEMAPHORE_ALL_ACCESS 0x1f0003 | |
| 139 | −#define SEMAPHORE_MODIFY_STATE 2 | |
| 140 | −#define EVENT_ALL_ACCESS 0x1f0003 | |
| 141 | −#define EVENT_MODIFY_STATE 2 | |
| 142 | −#define PIPE_ACCESS_DUPLEX 3 | |
| 143 | −#define PIPE_ACCESS_INBOUND 1 | |
| 144 | −#define PIPE_ACCESS_OUTBOUND 2 | |
| 145 | −#define PIPE_TYPE_BYTE 0 | |
| 146 | −#define PIPE_TYPE_MESSAGE 4 | |
| 147 | −#define PIPE_READMODE_BYTE 0 | |
| 148 | −#define PIPE_READMODE_MESSAGE 2 | |
| 149 | −#define PIPE_WAIT 0 | |
| 150 | −#define PIPE_NOWAIT 1 | |
| 151 | −#define PIPE_CLIENT_END 0 | |
| 152 | −#define PIPE_SERVER_END 1 | |
| 17 | +#define DefineHandleTable(w) ((w),TRUE) | |
| 18 | +#define LimitEmsPages(dw) | |
| 19 | +#define SetSwapAreaSize(w) (w) | |
| 20 | +#define LockSegment(w) GlobalFix((HANDLE)(w)) | |
| 21 | +#define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) | |
| 22 | +#define GetCurrentTime() GetTickCount() | |
| 23 | + | |
| 24 | +#define Yield() | |
| 25 | + | |
| 26 | +#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) | |
| 27 | +#define INVALID_FILE_SIZE ((DWORD)0xffffffff) | |
| 28 | +#define INVALID_SET_FILE_POINTER ((DWORD)-1) | |
| 29 | +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) | |
| 30 | + | |
| 31 | +#define FILE_BEGIN 0 | |
| 32 | +#define FILE_CURRENT 1 | |
| 33 | +#define FILE_END 2 | |
| 34 | + | |
| 35 | +#define TIME_ZONE_ID_INVALID ((DWORD)0xffffffff) | |
| 36 | + | |
| 37 | +#define WAIT_FAILED ((DWORD)0xffffffff) | |
| 38 | +#define WAIT_OBJECT_0 ((STATUS_WAIT_0) + 0) | |
| 39 | +#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0) + 0) | |
| 40 | +#define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0) + 0) | |
| 41 | +#define WAIT_IO_COMPLETION STATUS_USER_APC | |
| 42 | +#define STILL_ACTIVE STATUS_PENDING | |
| 43 | +#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION | |
| 44 | +#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT | |
| 45 | +#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT | |
| 46 | +#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP | |
| 47 | +#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED | |
| 48 | +#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND | |
| 49 | +#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO | |
| 50 | +#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT | |
| 51 | +#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION | |
| 52 | +#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW | |
| 53 | +#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK | |
| 54 | +#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW | |
| 55 | +#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO | |
| 56 | +#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW | |
| 57 | +#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION | |
| 58 | +#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR | |
| 59 | +#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION | |
| 60 | +#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION | |
| 61 | +#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW | |
| 62 | +#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION | |
| 63 | +#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION | |
| 64 | +#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE | |
| 65 | +#define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK | |
| 66 | +#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT | |
| 67 | +#define MoveMemory RtlMoveMemory | |
| 68 | +#define CopyMemory RtlCopyMemory | |
| 69 | +#define FillMemory RtlFillMemory | |
| 70 | +#define ZeroMemory RtlZeroMemory | |
| 71 | +#define SecureZeroMemory RtlSecureZeroMemory | |
| 72 | + | |
| 73 | +#define FILE_FLAG_WRITE_THROUGH 0x80000000 | |
| 74 | +#define FILE_FLAG_OVERLAPPED 0x40000000 | |
| 75 | +#define FILE_FLAG_NO_BUFFERING 0x20000000 | |
| 76 | +#define FILE_FLAG_RANDOM_ACCESS 0x10000000 | |
| 77 | +#define FILE_FLAG_SEQUENTIAL_SCAN 0x8000000 | |
| 78 | +#define FILE_FLAG_DELETE_ON_CLOSE 0x4000000 | |
| 79 | +#define FILE_FLAG_BACKUP_SEMANTICS 0x2000000 | |
| 80 | +#define FILE_FLAG_POSIX_SEMANTICS 0x1000000 | |
| 81 | +#define FILE_FLAG_OPEN_REPARSE_POINT 0x200000 | |
| 82 | +#define FILE_FLAG_OPEN_NO_RECALL 0x100000 | |
| 83 | +#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x80000 | |
| 84 | + | |
| 85 | +#define CREATE_NEW 1 | |
| 86 | +#define CREATE_ALWAYS 2 | |
| 87 | +#define OPEN_EXISTING 3 | |
| 88 | +#define OPEN_ALWAYS 4 | |
| 89 | +#define TRUNCATE_EXISTING 5 | |
| 90 | + | |
| 91 | +#define PROGRESS_CONTINUE 0 | |
| 92 | +#define PROGRESS_CANCEL 1 | |
| 93 | +#define PROGRESS_STOP 2 | |
| 94 | +#define PROGRESS_QUIET 3 | |
| 95 | + | |
| 96 | +#define CALLBACK_CHUNK_FINISHED 0x0 | |
| 97 | +#define CALLBACK_STREAM_SWITCH 0x1 | |
| 98 | + | |
| 99 | +#define COPY_FILE_FAIL_IF_EXISTS 0x1 | |
| 100 | +#define COPY_FILE_RESTARTABLE 0x2 | |
| 101 | +#define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x4 | |
| 102 | +#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x8 | |
| 103 | + | |
| 104 | +#define REPLACEFILE_WRITE_THROUGH 0x1 | |
| 105 | +#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x2 | |
| 106 | + | |
| 107 | +#define PIPE_ACCESS_INBOUND 0x1 | |
| 108 | +#define PIPE_ACCESS_OUTBOUND 0x2 | |
| 109 | +#define PIPE_ACCESS_DUPLEX 0x3 | |
| 110 | + | |
| 111 | +#define PIPE_CLIENT_END 0x0 | |
| 112 | +#define PIPE_SERVER_END 0x1 | |
| 113 | + | |
| 114 | +#define PIPE_WAIT 0x0 | |
| 115 | +#define PIPE_NOWAIT 0x1 | |
| 116 | +#define PIPE_READMODE_BYTE 0x0 | |
| 117 | +#define PIPE_READMODE_MESSAGE 0x2 | |
| 118 | +#define PIPE_TYPE_BYTE 0x0 | |
| 119 | +#define PIPE_TYPE_MESSAGE 0x4 | |
| 120 | + | |
| 153 | 121 | #define PIPE_UNLIMITED_INSTANCES 255 |
| 154 | −#define CREATE_DEFAULT_ERROR_MODE 67108864 | |
| 155 | −#define DEBUG_PROCESS 1 | |
| 156 | −#define DEBUG_ONLY_THIS_PROCESS 2 | |
| 157 | −#define CREATE_SUSPENDED 4 | |
| 158 | −#define DETACHED_PROCESS 8 | |
| 159 | −#define CREATE_NEW_CONSOLE 16 | |
| 160 | −#define NORMAL_PRIORITY_CLASS 32 | |
| 161 | −#define IDLE_PRIORITY_CLASS 64 | |
| 162 | −#define HIGH_PRIORITY_CLASS 128 | |
| 163 | −#define REALTIME_PRIORITY_CLASS 256 | |
| 164 | −#define CREATE_NEW_PROCESS_GROUP 512 | |
| 165 | −#define CREATE_UNICODE_ENVIRONMENT 1024 | |
| 166 | −#define CREATE_SEPARATE_WOW_VDM 2048 | |
| 167 | −#define CREATE_SHARED_WOW_VDM 4096 | |
| 168 | −#define CREATE_FORCEDOS 8192 | |
| 122 | + | |
| 123 | +#define SECURITY_ANONYMOUS (SecurityAnonymous << 16) | |
| 124 | +#define SECURITY_IDENTIFICATION (SecurityIdentification << 16) | |
| 125 | +#define SECURITY_IMPERSONATION (SecurityImpersonation << 16) | |
| 126 | +#define SECURITY_DELEGATION (SecurityDelegation << 16) | |
| 127 | + | |
| 128 | +#define SECURITY_CONTEXT_TRACKING 0x40000 | |
| 129 | +#define SECURITY_EFFECTIVE_ONLY 0x80000 | |
| 130 | + | |
| 131 | +#define SECURITY_SQOS_PRESENT 0x100000 | |
| 132 | +#define SECURITY_VALID_SQOS_FLAGS 0x1f0000 | |
| 133 | + | |
| 134 | + typedef struct _OVERLAPPED { | |
| 135 | + ULONG_PTR Internal; | |
| 136 | + ULONG_PTR InternalHigh; | |
| 137 | + union { | |
| 138 | + struct { | |
| 139 | + DWORD Offset; | |
| 140 | + DWORD OffsetHigh; | |
| 141 | + }; | |
| 142 | + PVOID Pointer; | |
| 143 | + }; | |
| 144 | + HANDLE hEvent; | |
| 145 | + } OVERLAPPED,*LPOVERLAPPED; | |
| 146 | + | |
| 147 | + typedef struct _SECURITY_ATTRIBUTES { | |
| 148 | + DWORD nLength; | |
| 149 | + LPVOID lpSecurityDescriptor; | |
| 150 | + WINBOOL bInheritHandle; | |
| 151 | + } SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES; | |
| 152 | + | |
| 153 | + typedef struct _PROCESS_INFORMATION { | |
| 154 | + HANDLE hProcess; | |
| 155 | + HANDLE hThread; | |
| 156 | + DWORD dwProcessId; | |
| 157 | + DWORD dwThreadId; | |
| 158 | + } PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION; | |
| 159 | + | |
| 160 | +#ifndef _FILETIME_ | |
| 161 | +#define _FILETIME_ | |
| 162 | + typedef struct _FILETIME { | |
| 163 | + DWORD dwLowDateTime; | |
| 164 | + DWORD dwHighDateTime; | |
| 165 | + } FILETIME,*PFILETIME,*LPFILETIME; | |
| 166 | +#endif | |
| 167 | + | |
| 168 | + typedef struct _SYSTEMTIME { | |
| 169 | + WORD wYear; | |
| 170 | + WORD wMonth; | |
| 171 | + WORD wDayOfWeek; | |
| 172 | + WORD wDay; | |
| 173 | + WORD wHour; | |
| 174 | + WORD wMinute; | |
| 175 | + WORD wSecond; | |
| 176 | + WORD wMilliseconds; | |
| 177 | + } SYSTEMTIME,*PSYSTEMTIME,*LPSYSTEMTIME; | |
| 178 | + | |
| 179 | + typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter); | |
| 180 | + typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; | |
| 181 | + typedef VOID (WINAPI *PFIBER_START_ROUTINE)(LPVOID lpFiberParameter); | |
| 182 | + typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE; | |
| 183 | + | |
| 184 | + typedef RTL_CRITICAL_SECTION CRITICAL_SECTION; | |
| 185 | + typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION; | |
| 186 | + typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION; | |
| 187 | + typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG; | |
| 188 | + typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG; | |
| 189 | + typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG; | |
| 190 | + | |
| 191 | + WINBASEAPI PVOID WINAPI EncodePointer(PVOID Ptr); | |
| 192 | + WINBASEAPI PVOID WINAPI DecodePointer(PVOID Ptr); | |
| 193 | + WINBASEAPI PVOID WINAPI EncodeSystemPointer(PVOID Ptr); | |
| 194 | + WINBASEAPI PVOID WINAPI DecodeSystemPointer(PVOID Ptr); | |
| 195 | + | |
| 196 | +#ifdef I_X86_ | |
| 197 | + typedef PLDT_ENTRY LPLDT_ENTRY; | |
| 198 | +#else | |
| 199 | + typedef LPVOID LPLDT_ENTRY; | |
| 200 | +#endif | |
| 201 | + | |
| 202 | +#define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE | |
| 203 | +#define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS | |
| 204 | + | |
| 205 | +#define SP_SERIALCOMM ((DWORD)0x1) | |
| 206 | + | |
| 207 | +#define PST_UNSPECIFIED ((DWORD)0x0) | |
| 208 | +#define PST_RS232 ((DWORD)0x1) | |
| 209 | +#define PST_PARALLELPORT ((DWORD)0x2) | |
| 210 | +#define PST_RS422 ((DWORD)0x3) | |
| 211 | +#define PST_RS423 ((DWORD)0x4) | |
| 212 | +#define PST_RS449 ((DWORD)0x5) | |
| 213 | +#define PST_MODEM ((DWORD)0x6) | |
| 214 | +#define PST_FAX ((DWORD)0x21) | |
| 215 | +#define PST_SCANNER ((DWORD)0x22) | |
| 216 | +#define PST_NETWORK_BRIDGE ((DWORD)0x100) | |
| 217 | +#define PST_LAT ((DWORD)0x101) | |
| 218 | +#define PST_TCPIP_TELNET ((DWORD)0x102) | |
| 219 | +#define PST_X25 ((DWORD)0x103) | |
| 220 | + | |
| 221 | +#define PCF_DTRDSR ((DWORD)0x1) | |
| 222 | +#define PCF_RTSCTS ((DWORD)0x2) | |
| 223 | +#define PCF_RLSD ((DWORD)0x4) | |
| 224 | +#define PCF_PARITY_CHECK ((DWORD)0x8) | |
| 225 | +#define PCF_XONXOFF ((DWORD)0x10) | |
| 226 | +#define PCF_SETXCHAR ((DWORD)0x20) | |
| 227 | +#define PCF_TOTALTIMEOUTS ((DWORD)0x40) | |
| 228 | +#define PCF_INTTIMEOUTS ((DWORD)0x80) | |
| 229 | +#define PCF_SPECIALCHARS ((DWORD)0x100) | |
| 230 | +#define PCF_16BITMODE ((DWORD)0x200) | |
| 231 | + | |
| 232 | +#define SP_PARITY ((DWORD)0x1) | |
| 233 | +#define SP_BAUD ((DWORD)0x2) | |
| 234 | +#define SP_DATABITS ((DWORD)0x4) | |
| 235 | +#define SP_STOPBITS ((DWORD)0x8) | |
| 236 | +#define SP_HANDSHAKING ((DWORD)0x10) | |
| 237 | +#define SP_PARITY_CHECK ((DWORD)0x20) | |
| 238 | +#define SP_RLSD ((DWORD)0x40) | |
| 239 | + | |
| 240 | +#define BAUD_075 ((DWORD)0x1) | |
| 241 | +#define BAUD_110 ((DWORD)0x2) | |
| 242 | +#define BAUD_134_5 ((DWORD)0x4) | |
| 243 | +#define BAUD_150 ((DWORD)0x8) | |
| 244 | +#define BAUD_300 ((DWORD)0x10) | |
| 245 | +#define BAUD_600 ((DWORD)0x20) | |
| 246 | +#define BAUD_1200 ((DWORD)0x40) | |
| 247 | +#define BAUD_1800 ((DWORD)0x80) | |
| 248 | +#define BAUD_2400 ((DWORD)0x100) | |
| 249 | +#define BAUD_4800 ((DWORD)0x200) | |
| 250 | +#define BAUD_7200 ((DWORD)0x400) | |
| 251 | +#define BAUD_9600 ((DWORD)0x800) | |
| 252 | +#define BAUD_14400 ((DWORD)0x1000) | |
| 253 | +#define BAUD_19200 ((DWORD)0x2000) | |
| 254 | +#define BAUD_38400 ((DWORD)0x4000) | |
| 255 | +#define BAUD_56K ((DWORD)0x8000) | |
| 256 | +#define BAUD_128K ((DWORD)0x10000) | |
| 257 | +#define BAUD_115200 ((DWORD)0x20000) | |
| 258 | +#define BAUD_57600 ((DWORD)0x40000) | |
| 259 | +#define BAUD_USER ((DWORD)0x10000000) | |
| 260 | + | |
| 261 | +#define DATABITS_5 ((WORD)0x1) | |
| 262 | +#define DATABITS_6 ((WORD)0x2) | |
| 263 | +#define DATABITS_7 ((WORD)0x4) | |
| 264 | +#define DATABITS_8 ((WORD)0x8) | |
| 265 | +#define DATABITS_16 ((WORD)0x10) | |
| 266 | +#define DATABITS_16X ((WORD)0x20) | |
| 267 | + | |
| 268 | +#define STOPBITS_10 ((WORD)0x1) | |
| 269 | +#define STOPBITS_15 ((WORD)0x2) | |
| 270 | +#define STOPBITS_20 ((WORD)0x4) | |
| 271 | +#define PARITY_NONE ((WORD)0x100) | |
| 272 | +#define PARITY_ODD ((WORD)0x200) | |
| 273 | +#define PARITY_EVEN ((WORD)0x400) | |
| 274 | +#define PARITY_MARK ((WORD)0x800) | |
| 275 | +#define PARITY_SPACE ((WORD)0x1000) | |
| 276 | + | |
| 277 | + typedef struct _COMMPROP { | |
| 278 | + WORD wPacketLength; | |
| 279 | + WORD wPacketVersion; | |
| 280 | + DWORD dwServiceMask; | |
| 281 | + DWORD dwReserved1; | |
| 282 | + DWORD dwMaxTxQueue; | |
| 283 | + DWORD dwMaxRxQueue; | |
| 284 | + DWORD dwMaxBaud; | |
| 285 | + DWORD dwProvSubType; | |
| 286 | + DWORD dwProvCapabilities; | |
| 287 | + DWORD dwSettableParams; | |
| 288 | + DWORD dwSettableBaud; | |
| 289 | + WORD wSettableData; | |
| 290 | + WORD wSettableStopParity; | |
| 291 | + DWORD dwCurrentTxQueue; | |
| 292 | + DWORD dwCurrentRxQueue; | |
| 293 | + DWORD dwProvSpec1; | |
| 294 | + DWORD dwProvSpec2; | |
| 295 | + WCHAR wcProvChar[1]; | |
| 296 | + } COMMPROP,*LPCOMMPROP; | |
| 297 | + | |
| 298 | +#define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E) | |
| 299 | + | |
| 300 | + typedef struct _COMSTAT { | |
| 301 | + DWORD fCtsHold : 1; | |
| 302 | + DWORD fDsrHold : 1; | |
| 303 | + DWORD fRlsdHold : 1; | |
| 304 | + DWORD fXoffHold : 1; | |
| 305 | + DWORD fXoffSent : 1; | |
| 306 | + DWORD fEof : 1; | |
| 307 | + DWORD fTxim : 1; | |
| 308 | + DWORD fReserved : 25; | |
| 309 | + DWORD cbInQue; | |
| 310 | + DWORD cbOutQue; | |
| 311 | + } COMSTAT,*LPCOMSTAT; | |
| 312 | + | |
| 313 | +#define DTR_CONTROL_DISABLE 0x0 | |
| 314 | +#define DTR_CONTROL_ENABLE 0x1 | |
| 315 | +#define DTR_CONTROL_HANDSHAKE 0x2 | |
| 316 | + | |
| 317 | +#define RTS_CONTROL_DISABLE 0x0 | |
| 318 | +#define RTS_CONTROL_ENABLE 0x1 | |
| 319 | +#define RTS_CONTROL_HANDSHAKE 0x2 | |
| 320 | +#define RTS_CONTROL_TOGGLE 0x3 | |
| 321 | + | |
| 322 | + typedef struct _DCB { | |
| 323 | + DWORD DCBlength; | |
| 324 | + DWORD BaudRate; | |
| 325 | + DWORD fBinary: 1; | |
| 326 | + DWORD fParity: 1; | |
| 327 | + DWORD fOutxCtsFlow:1; | |
| 328 | + DWORD fOutxDsrFlow:1; | |
| 329 | + DWORD fDtrControl:2; | |
| 330 | + DWORD fDsrSensitivity:1; | |
| 331 | + DWORD fTXContinueOnXoff: 1; | |
| 332 | + DWORD fOutX: 1; | |
| 333 | + DWORD fInX: 1; | |
| 334 | + DWORD fErrorChar: 1; | |
| 335 | + DWORD fNull: 1; | |
| 336 | + DWORD fRtsControl:2; | |
| 337 | + DWORD fAbortOnError:1; | |
| 338 | + DWORD fDummy2:17; | |
| 339 | + WORD wReserved; | |
| 340 | + WORD XonLim; | |
| 341 | + WORD XoffLim; | |
| 342 | + BYTE ByteSize; | |
| 343 | + BYTE Parity; | |
| 344 | + BYTE StopBits; | |
| 345 | + char XonChar; | |
| 346 | + char XoffChar; | |
| 347 | + char ErrorChar; | |
| 348 | + char EofChar; | |
| 349 | + char EvtChar; | |
| 350 | + WORD wReserved1; | |
| 351 | + } DCB,*LPDCB; | |
| 352 | + | |
| 353 | + typedef struct _COMMTIMEOUTS { | |
| 354 | + DWORD ReadIntervalTimeout; | |
| 355 | + DWORD ReadTotalTimeoutMultiplier; | |
| 356 | + DWORD ReadTotalTimeoutConstant; | |
| 357 | + DWORD WriteTotalTimeoutMultiplier; | |
| 358 | + DWORD WriteTotalTimeoutConstant; | |
| 359 | + } COMMTIMEOUTS,*LPCOMMTIMEOUTS; | |
| 360 | + | |
| 361 | + typedef struct _COMMCONFIG { | |
| 362 | + DWORD dwSize; | |
| 363 | + WORD wVersion; | |
| 364 | + WORD wReserved; | |
| 365 | + DCB dcb; | |
| 366 | + DWORD dwProviderSubType; | |
| 367 | + DWORD dwProviderOffset; | |
| 368 | + DWORD dwProviderSize; | |
| 369 | + WCHAR wcProviderData[1]; | |
| 370 | + } COMMCONFIG,*LPCOMMCONFIG; | |
| 371 | + | |
| 372 | + typedef struct _SYSTEM_INFO { | |
| 373 | + union { | |
| 374 | + DWORD dwOemId; | |
| 375 | + struct { | |
| 376 | + WORD wProcessorArchitecture; | |
| 377 | + WORD wReserved; | |
| 378 | + }; | |
| 379 | + }; | |
| 380 | + DWORD dwPageSize; | |
| 381 | + LPVOID lpMinimumApplicationAddress; | |
| 382 | + LPVOID lpMaximumApplicationAddress; | |
| 383 | + DWORD_PTR dwActiveProcessorMask; | |
| 384 | + DWORD dwNumberOfProcessors; | |
| 385 | + DWORD dwProcessorType; | |
| 386 | + DWORD dwAllocationGranularity; | |
| 387 | + WORD wProcessorLevel; | |
| 388 | + WORD wProcessorRevision; | |
| 389 | + } SYSTEM_INFO,*LPSYSTEM_INFO; | |
| 390 | + | |
| 391 | +#define FreeModule(hLibModule) FreeLibrary((hLibModule)) | |
| 392 | +#define MakeProcInstance(lpProc,hInstance) (lpProc) | |
| 393 | +#define FreeProcInstance(lpProc) (lpProc) | |
| 394 | + | |
| 395 | +#define GMEM_FIXED 0x0 | |
| 396 | +#define GMEM_MOVEABLE 0x2 | |
| 397 | +#define GMEM_NOCOMPACT 0x10 | |
| 398 | +#define GMEM_NODISCARD 0x20 | |
| 399 | +#define GMEM_ZEROINIT 0x40 | |
| 400 | +#define GMEM_MODIFY 0x80 | |
| 401 | +#define GMEM_DISCARDABLE 0x100 | |
| 402 | +#define GMEM_NOT_BANKED 0x1000 | |
| 403 | +#define GMEM_SHARE 0x2000 | |
| 404 | +#define GMEM_DDESHARE 0x2000 | |
| 405 | +#define GMEM_NOTIFY 0x4000 | |
| 406 | +#define GMEM_LOWER GMEM_NOT_BANKED | |
| 407 | +#define GMEM_VALID_FLAGS 0x7F72 | |
| 408 | +#define GMEM_INVALID_HANDLE 0x8000 | |
| 409 | + | |
| 410 | +#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) | |
| 411 | +#define GPTR (GMEM_FIXED | GMEM_ZEROINIT) | |
| 412 | + | |
| 413 | +#define GlobalLRUNewest(h) ((HANDLE)(h)) | |
| 414 | +#define GlobalLRUOldest(h) ((HANDLE)(h)) | |
| 415 | +#define GlobalDiscard(h) GlobalReAlloc((h),0,GMEM_MOVEABLE) | |
| 416 | + | |
| 417 | +#define GMEM_DISCARDED 0x4000 | |
| 418 | +#define GMEM_LOCKCOUNT 0xff | |
| 419 | + | |
| 420 | + typedef struct _MEMORYSTATUS { | |
| 421 | + DWORD dwLength; | |
| 422 | + DWORD dwMemoryLoad; | |
| 423 | + SIZE_T dwTotalPhys; | |
| 424 | + SIZE_T dwAvailPhys; | |
| 425 | + SIZE_T dwTotalPageFile; | |
| 426 | + SIZE_T dwAvailPageFile; | |
| 427 | + SIZE_T dwTotalVirtual; | |
| 428 | + SIZE_T dwAvailVirtual; | |
| 429 | + } MEMORYSTATUS,*LPMEMORYSTATUS; | |
| 430 | + | |
| 431 | +#define LMEM_FIXED 0x0 | |
| 432 | +#define LMEM_MOVEABLE 0x2 | |
| 433 | +#define LMEM_NOCOMPACT 0x10 | |
| 434 | +#define LMEM_NODISCARD 0x20 | |
| 435 | +#define LMEM_ZEROINIT 0x40 | |
| 436 | +#define LMEM_MODIFY 0x80 | |
| 437 | +#define LMEM_DISCARDABLE 0xf00 | |
| 438 | +#define LMEM_VALID_FLAGS 0xf72 | |
| 439 | +#define LMEM_INVALID_HANDLE 0x8000 | |
| 440 | + | |
| 441 | +#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT) | |
| 442 | +#define LPTR (LMEM_FIXED | LMEM_ZEROINIT) | |
| 443 | + | |
| 444 | +#define NONZEROLHND (LMEM_MOVEABLE) | |
| 445 | +#define NONZEROLPTR (LMEM_FIXED) | |
| 446 | + | |
| 447 | +#define LocalDiscard(h) LocalReAlloc((h),0,LMEM_MOVEABLE) | |
| 448 | + | |
| 449 | +#define LMEM_DISCARDED 0x4000 | |
| 450 | +#define LMEM_LOCKCOUNT 0xff | |
| 451 | + | |
| 452 | +#define DEBUG_PROCESS 0x1 | |
| 453 | +#define DEBUG_ONLY_THIS_PROCESS 0x2 | |
| 454 | +#define CREATE_SUSPENDED 0x4 | |
| 455 | +#define DETACHED_PROCESS 0x8 | |
| 456 | +#define CREATE_NEW_CONSOLE 0x10 | |
| 457 | +#define NORMAL_PRIORITY_CLASS 0x20 | |
| 458 | +#define IDLE_PRIORITY_CLASS 0x40 | |
| 459 | +#define HIGH_PRIORITY_CLASS 0x80 | |
| 460 | +#define REALTIME_PRIORITY_CLASS 0x100 | |
| 461 | +#define CREATE_NEW_PROCESS_GROUP 0x200 | |
| 462 | +#define CREATE_UNICODE_ENVIRONMENT 0x400 | |
| 463 | +#define CREATE_SEPARATE_WOW_VDM 0x800 | |
| 464 | +#define CREATE_SHARED_WOW_VDM 0x1000 | |
| 465 | +#define CREATE_FORCEDOS 0x2000 | |
| 466 | +#define BELOW_NORMAL_PRIORITY_CLASS 0x4000 | |
| 467 | +#define ABOVE_NORMAL_PRIORITY_CLASS 0x8000 | |
| 468 | +#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x10000 | |
| 469 | + | |
| 470 | +#define CREATE_BREAKAWAY_FROM_JOB 0x1000000 | |
| 471 | +#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x2000000 | |
| 472 | + | |
| 473 | +#define CREATE_DEFAULT_ERROR_MODE 0x4000000 | |
| 169 | 474 | #define CREATE_NO_WINDOW 0x8000000 |
| 170 | −#define CONSOLE_TEXTMODE_BUFFER 1 | |
| 171 | −#define CREATE_NEW 1 | |
| 172 | −#define CREATE_ALWAYS 2 | |
| 173 | −#define OPEN_EXISTING 3 | |
| 174 | −#define OPEN_ALWAYS 4 | |
| 175 | −#define TRUNCATE_EXISTING 5 | |
| 176 | −#define FILE_FLAG_WRITE_THROUGH 0x80000000 | |
| 177 | −#define FILE_FLAG_OVERLAPPED 1073741824 | |
| 178 | −#define FILE_FLAG_NO_BUFFERING 536870912 | |
| 179 | −#define FILE_FLAG_RANDOM_ACCESS 268435456 | |
| 180 | −#define FILE_FLAG_SEQUENTIAL_SCAN 134217728 | |
| 181 | −#define FILE_FLAG_DELETE_ON_CLOSE 67108864 | |
| 182 | −#define FILE_FLAG_BACKUP_SEMANTICS 33554432 | |
| 183 | −#define FILE_FLAG_POSIX_SEMANTICS 16777216 | |
| 184 | −#define FILE_FLAG_OPEN_REPARSE_POINT 2097152 | |
| 185 | −#define FILE_FLAG_OPEN_NO_RECALL 1048576 | |
| 186 | −#define CLRDTR 6 | |
| 187 | −#define CLRRTS 4 | |
| 188 | −#define SETDTR 5 | |
| 189 | −#define SETRTS 3 | |
| 190 | −#define SETXOFF 1 | |
| 191 | −#define SETXON 2 | |
| 192 | −#define SETBREAK 8 | |
| 193 | −#define CLRBREAK 9 | |
| 194 | −#define STILL_ACTIVE 0x103 | |
| 195 | −#define FIND_FIRST_EX_CASE_SENSITIVE 1 | |
| 196 | −#define SCS_32BIT_BINARY 0 | |
| 197 | −#define SCS_DOS_BINARY 1 | |
| 198 | −#define SCS_OS216_BINARY 5 | |
| 199 | −#define SCS_PIF_BINARY 3 | |
| 200 | −#define SCS_POSIX_BINARY 4 | |
| 201 | −#define SCS_WOW_BINARY 2 | |
| 202 | −#define MAX_COMPUTERNAME_LENGTH 15 | |
| 203 | −#define HW_PROFILE_GUIDLEN 39 | |
| 204 | −#define MAX_PROFILE_LEN 80 | |
| 205 | −#define DOCKINFO_UNDOCKED 1 | |
| 206 | −#define DOCKINFO_DOCKED 2 | |
| 207 | −#define DOCKINFO_USER_SUPPLIED 4 | |
| 208 | −#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_UNDOCKED) | |
| 209 | −#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_DOCKED) | |
| 475 | + | |
| 476 | +#define PROFILE_USER 0x10000000 | |
| 477 | +#define PROFILE_KERNEL 0x20000000 | |
| 478 | +#define PROFILE_SERVER 0x40000000 | |
| 479 | + | |
| 480 | +#define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000 | |
| 481 | + | |
| 482 | +#define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN | |
| 483 | +#define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1) | |
| 484 | +#define THREAD_PRIORITY_NORMAL 0 | |
| 485 | +#define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX | |
| 486 | +#define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1) | |
| 487 | +#define THREAD_PRIORITY_ERROR_RETURN (MAXLONG) | |
| 488 | + | |
| 489 | +#define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT | |
| 490 | +#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE | |
| 491 | + | |
| 492 | +#define EXCEPTION_DEBUG_EVENT 1 | |
| 493 | +#define CREATE_THREAD_DEBUG_EVENT 2 | |
| 494 | +#define CREATE_PROCESS_DEBUG_EVENT 3 | |
| 495 | +#define EXIT_THREAD_DEBUG_EVENT 4 | |
| 496 | +#define EXIT_PROCESS_DEBUG_EVENT 5 | |
| 497 | +#define LOAD_DLL_DEBUG_EVENT 6 | |
| 498 | +#define UNLOAD_DLL_DEBUG_EVENT 7 | |
| 499 | +#define OUTPUT_DEBUG_STRING_EVENT 8 | |
| 500 | +#define RIP_EVENT 9 | |
| 501 | + | |
| 502 | + typedef struct _EXCEPTION_DEBUG_INFO { | |
| 503 | + EXCEPTION_RECORD ExceptionRecord; | |
| 504 | + DWORD dwFirstChance; | |
| 505 | + } EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO; | |
| 506 | + | |
| 507 | + typedef struct _CREATE_THREAD_DEBUG_INFO { | |
| 508 | + HANDLE hThread; | |
| 509 | + LPVOID lpThreadLocalBase; | |
| 510 | + LPTHREAD_START_ROUTINE lpStartAddress; | |
| 511 | + } CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO; | |
| 512 | + | |
| 513 | + typedef struct _CREATE_PROCESS_DEBUG_INFO { | |
| 514 | + HANDLE hFile; | |
| 515 | + HANDLE hProcess; | |
| 516 | + HANDLE hThread; | |
| 517 | + LPVOID lpBaseOfImage; | |
| 518 | + DWORD dwDebugInfoFileOffset; | |
| 519 | + DWORD nDebugInfoSize; | |
| 520 | + LPVOID lpThreadLocalBase; | |
| 521 | + LPTHREAD_START_ROUTINE lpStartAddress; | |
| 522 | + LPVOID lpImageName; | |
| 523 | + WORD fUnicode; | |
| 524 | + } CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO; | |
| 525 | + | |
| 526 | + typedef struct _EXIT_THREAD_DEBUG_INFO { | |
| 527 | + DWORD dwExitCode; | |
| 528 | + } EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO; | |
| 529 | + | |
| 530 | + typedef struct _EXIT_PROCESS_DEBUG_INFO { | |
| 531 | + DWORD dwExitCode; | |
| 532 | + } EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO; | |
| 533 | + | |
| 534 | + typedef struct _LOAD_DLL_DEBUG_INFO { | |
| 535 | + HANDLE hFile; | |
| 536 | + LPVOID lpBaseOfDll; | |
| 537 | + DWORD dwDebugInfoFileOffset; | |
| 538 | + DWORD nDebugInfoSize; | |
| 539 | + LPVOID lpImageName; | |
| 540 | + WORD fUnicode; | |
| 541 | + } LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO; | |
| 542 | + | |
| 543 | + typedef struct _UNLOAD_DLL_DEBUG_INFO { | |
| 544 | + LPVOID lpBaseOfDll; | |
| 545 | + } UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO; | |
| 546 | + | |
| 547 | + typedef struct _OUTPUT_DEBUG_STRING_INFO { | |
| 548 | + LPSTR lpDebugStringData; | |
| 549 | + WORD fUnicode; | |
| 550 | + WORD nDebugStringLength; | |
| 551 | + } OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO; | |
| 552 | + | |
| 553 | + typedef struct _RIP_INFO { | |
| 554 | + DWORD dwError; | |
| 555 | + DWORD dwType; | |
| 556 | + } RIP_INFO,*LPRIP_INFO; | |
| 557 | + | |
| 558 | + typedef struct _DEBUG_EVENT { | |
| 559 | + DWORD dwDebugEventCode; | |
| 560 | + DWORD dwProcessId; | |
| 561 | + DWORD dwThreadId; | |
| 562 | + union { | |
| 563 | + EXCEPTION_DEBUG_INFO Exception; | |
| 564 | + CREATE_THREAD_DEBUG_INFO CreateThread; | |
| 565 | + CREATE_PROCESS_DEBUG_INFO CreateProcessInfo; | |
| 566 | + EXIT_THREAD_DEBUG_INFO ExitThread; | |
| 567 | + EXIT_PROCESS_DEBUG_INFO ExitProcess; | |
| 568 | + LOAD_DLL_DEBUG_INFO LoadDll; | |
| 569 | + UNLOAD_DLL_DEBUG_INFO UnloadDll; | |
| 570 | + OUTPUT_DEBUG_STRING_INFO DebugString; | |
| 571 | + RIP_INFO RipInfo; | |
| 572 | + } u; | |
| 573 | + } DEBUG_EVENT,*LPDEBUG_EVENT; | |
| 574 | + | |
| 575 | + typedef PCONTEXT LPCONTEXT; | |
| 576 | + typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD; | |
| 577 | + typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS; | |
| 578 | + | |
| 579 | +#define DRIVE_UNKNOWN 0 | |
| 580 | +#define DRIVE_NO_ROOT_DIR 1 | |
| 210 | 581 | #define DRIVE_REMOVABLE 2 |
| 211 | 582 | #define DRIVE_FIXED 3 |
| 212 | 583 | #define DRIVE_REMOTE 4 |
| 213 | 584 | #define DRIVE_CDROM 5 |
| 214 | 585 | #define DRIVE_RAMDISK 6 |
| 215 | −#define DRIVE_UNKNOWN 0 | |
| 216 | −#define DRIVE_NO_ROOT_DIR 1 | |
| 217 | −#define FILE_TYPE_UNKNOWN 0 | |
| 218 | −#define FILE_TYPE_DISK 1 | |
| 219 | −#define FILE_TYPE_CHAR 2 | |
| 220 | −#define FILE_TYPE_PIPE 3 | |
| 586 | + | |
| 587 | +#define GetFreeSpace(w) (0x100000L) | |
| 588 | +#define FILE_TYPE_UNKNOWN 0x0 | |
| 589 | +#define FILE_TYPE_DISK 0x1 | |
| 590 | +#define FILE_TYPE_CHAR 0x2 | |
| 591 | +#define FILE_TYPE_PIPE 0x3 | |
| 221 | 592 | #define FILE_TYPE_REMOTE 0x8000 |
| 222 | −#define HANDLE_FLAG_INHERIT 1 | |
| 223 | −#define HANDLE_FLAG_PROTECT_FROM_CLOSE 2 | |
| 224 | −#define STD_INPUT_HANDLE (DWORD)(0xfffffff6) | |
| 225 | −#define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5) | |
| 226 | −#define STD_ERROR_HANDLE (DWORD)(0xfffffff4) | |
| 227 | −#define INVALID_HANDLE_VALUE (HANDLE)(-1) | |
| 228 | −#define GET_TAPE_MEDIA_INFORMATION 0 | |
| 229 | −#define GET_TAPE_DRIVE_INFORMATION 1 | |
| 230 | −#define SET_TAPE_MEDIA_INFORMATION 0 | |
| 231 | −#define SET_TAPE_DRIVE_INFORMATION 1 | |
| 232 | −#define THREAD_PRIORITY_ABOVE_NORMAL 1 | |
| 233 | −#define THREAD_PRIORITY_BELOW_NORMAL (-1) | |
| 234 | −#define THREAD_PRIORITY_HIGHEST 2 | |
| 235 | −#define THREAD_PRIORITY_IDLE (-15) | |
| 236 | −#define THREAD_PRIORITY_LOWEST (-2) | |
| 237 | −#define THREAD_PRIORITY_NORMAL 0 | |
| 238 | −#define THREAD_PRIORITY_TIME_CRITICAL 15 | |
| 239 | −#define THREAD_PRIORITY_ERROR_RETURN 2147483647 | |
| 240 | −#define TIME_ZONE_ID_UNKNOWN 0 | |
| 241 | −#define TIME_ZONE_ID_STANDARD 1 | |
| 242 | −#define TIME_ZONE_ID_DAYLIGHT 2 | |
| 243 | −#define TIME_ZONE_ID_INVALID 0xFFFFFFFF | |
| 244 | −#define FS_CASE_IS_PRESERVED 2 | |
| 245 | −#define FS_CASE_SENSITIVE 1 | |
| 246 | −#define FS_UNICODE_STORED_ON_DISK 4 | |
| 247 | −#define FS_PERSISTENT_ACLS 8 | |
| 248 | −#define FS_FILE_COMPRESSION 16 | |
| 249 | −#define FS_VOL_IS_COMPRESSED 32768 | |
| 250 | −#define GMEM_FIXED 0 | |
| 251 | −#define GMEM_MOVEABLE 2 | |
| 252 | −#define GMEM_MODIFY 128 | |
| 253 | −#define GPTR 64 | |
| 254 | −#define GHND 66 | |
| 255 | −#define GMEM_DDESHARE 8192 | |
| 256 | −#define GMEM_DISCARDABLE 256 | |
| 257 | −#define GMEM_LOWER 4096 | |
| 258 | −#define GMEM_NOCOMPACT 16 | |
| 259 | −#define GMEM_NODISCARD 32 | |
| 260 | −#define GMEM_NOT_BANKED 4096 | |
| 261 | −#define GMEM_NOTIFY 16384 | |
| 262 | −#define GMEM_SHARE 8192 | |
| 263 | −#define GMEM_ZEROINIT 64 | |
| 264 | −#define GMEM_DISCARDED 16384 | |
| 265 | −#define GMEM_INVALID_HANDLE 32768 | |
| 266 | −#define GMEM_LOCKCOUNT 255 | |
| 267 | −#define STATUS_WAIT_0 0 | |
| 268 | −#define STATUS_ABANDONED_WAIT_0 0x80 | |
| 269 | −#define STATUS_USER_APC 0xC0 | |
| 270 | −#define STATUS_TIMEOUT 0x102 | |
| 271 | −#define STATUS_PENDING 0x103 | |
| 272 | −#define STATUS_SEGMENT_NOTIFICATION 0x40000005 | |
| 273 | −#define STATUS_GUARD_PAGE_VIOLATION 0x80000001 | |
| 274 | −#define STATUS_DATATYPE_MISALIGNMENT 0x80000002 | |
| 275 | −#define STATUS_BREAKPOINT 0x80000003 | |
| 276 | −#define STATUS_SINGLE_STEP 0x80000004 | |
| 277 | −#define STATUS_ACCESS_VIOLATION 0xC0000005 | |
| 278 | −#define STATUS_IN_PAGE_ERROR 0xC0000006 | |
| 279 | −#define STATUS_INVALID_HANDLE 0xC0000008L | |
| 280 | −#define STATUS_NO_MEMORY 0xC0000017 | |
| 281 | −#define STATUS_ILLEGAL_INSTRUCTION 0xC000001D | |
| 282 | −#define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025 | |
| 283 | −#define STATUS_INVALID_DISPOSITION 0xC0000026 | |
| 284 | −#define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C | |
| 285 | −#define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D | |
| 286 | −#define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E | |
| 287 | −#define STATUS_FLOAT_INEXACT_RESULT 0xC000008F | |
| 288 | −#define STATUS_FLOAT_INVALID_OPERATION 0xC0000090 | |
| 289 | −#define STATUS_FLOAT_OVERFLOW 0xC0000091 | |
| 290 | −#define STATUS_FLOAT_STACK_CHECK 0xC0000092 | |
| 291 | −#define STATUS_FLOAT_UNDERFLOW 0xC0000093 | |
| 292 | −#define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094 | |
| 293 | −#define STATUS_INTEGER_OVERFLOW 0xC0000095 | |
| 294 | −#define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096 | |
| 295 | −#define STATUS_STACK_OVERFLOW 0xC00000FD | |
| 296 | −#define STATUS_CONTROL_C_EXIT 0xC000013A | |
| 297 | −#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION | |
| 298 | −#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT | |
| 299 | −#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT | |
| 300 | −#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP | |
| 301 | −#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED | |
| 302 | −#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND | |
| 303 | −#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO | |
| 304 | −#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT | |
| 305 | −#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION | |
| 306 | −#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW | |
| 307 | −#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK | |
| 308 | −#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW | |
| 309 | −#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO | |
| 310 | −#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW | |
| 311 | −#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION | |
| 312 | −#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR | |
| 313 | −#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION | |
| 314 | −#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION | |
| 315 | −#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW | |
| 316 | −#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION | |
| 317 | −#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION | |
| 318 | −#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE | |
| 319 | −#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT | |
| 320 | −#define PROCESS_HEAP_REGION 1 | |
| 321 | −#define PROCESS_HEAP_UNCOMMITTED_RANGE 2 | |
| 322 | −#define PROCESS_HEAP_ENTRY_BUSY 4 | |
| 323 | −#define PROCESS_HEAP_ENTRY_MOVEABLE 16 | |
| 324 | −#define PROCESS_HEAP_ENTRY_DDESHARE 32 | |
| 325 | −#define DONT_RESOLVE_DLL_REFERENCES 1 | |
| 326 | −#define LOAD_LIBRARY_AS_DATAFILE 2 | |
| 327 | −#define LOAD_WITH_ALTERED_SEARCH_PATH 8 | |
| 328 | −#define LMEM_FIXED 0 | |
| 329 | −#define LMEM_MOVEABLE 2 | |
| 330 | −#define LMEM_NONZEROLHND 2 | |
| 331 | −#define LMEM_NONZEROLPTR 0 | |
| 332 | −#define LMEM_DISCARDABLE 3840 | |
| 333 | −#define LMEM_NOCOMPACT 16 | |
| 334 | −#define LMEM_NODISCARD 32 | |
| 335 | −#define LMEM_ZEROINIT 64 | |
| 336 | −#define LMEM_DISCARDED 16384 | |
| 337 | −#define LMEM_MODIFY 128 | |
| 338 | −#define LMEM_INVALID_HANDLE 32768 | |
| 339 | −#define LMEM_LOCKCOUNT 255 | |
| 340 | −#define LPTR 64 | |
| 341 | −#define LHND 66 | |
| 342 | −#define NONZEROLHND 2 | |
| 343 | −#define NONZEROLPTR 0 | |
| 344 | −#define LOCKFILE_FAIL_IMMEDIATELY 1 | |
| 345 | −#define LOCKFILE_EXCLUSIVE_LOCK 2 | |
| 346 | −#define LOGON32_PROVIDER_DEFAULT 0 | |
| 347 | −#define LOGON32_PROVIDER_WINNT35 1 | |
| 348 | −#define LOGON32_LOGON_INTERACTIVE 2 | |
| 349 | −#define LOGON32_LOGON_BATCH 4 | |
| 350 | −#define LOGON32_LOGON_SERVICE 5 | |
| 351 | −#define MOVEFILE_REPLACE_EXISTING 1 | |
| 352 | −#define MOVEFILE_COPY_ALLOWED 2 | |
| 353 | −#define MOVEFILE_DELAY_UNTIL_REBOOT 4 | |
| 354 | −#define MOVEFILE_WRITE_THROUGH 8 | |
| 355 | −#define MAXIMUM_WAIT_OBJECTS 64 | |
| 356 | −#define MAXIMUM_SUSPEND_COUNT 0x7F | |
| 357 | −#define WAIT_OBJECT_0 0 | |
| 358 | −#define WAIT_ABANDONED_0 128 | |
| 359 | −#define WAIT_TIMEOUT 0x102 | |
| 360 | −#define WAIT_IO_COMPLETION 0xC0 | |
| 361 | −#define WAIT_ABANDONED 128 | |
| 362 | −#define WAIT_FAILED 0xFFFFFFFF | |
| 363 | −#define PURGE_TXABORT 1 | |
| 364 | −#define PURGE_RXABORT 2 | |
| 365 | −#define PURGE_TXCLEAR 4 | |
| 366 | −#define PURGE_RXCLEAR 8 | |
| 367 | −#define EVENTLOG_FORWARDS_READ 4 | |
| 368 | −#define EVENTLOG_BACKWARDS_READ 8 | |
| 369 | −#define EVENTLOG_SEEK_READ 2 | |
| 370 | −#define EVENTLOG_SEQUENTIAL_READ 1 | |
| 371 | −#define EVENTLOG_ERROR_TYPE 1 | |
| 372 | −#define EVENTLOG_WARNING_TYPE 2 | |
| 373 | −#define EVENTLOG_INFORMATION_TYPE 4 | |
| 374 | −#define EVENTLOG_AUDIT_SUCCESS 8 | |
| 375 | −#define EVENTLOG_AUDIT_FAILURE 16 | |
| 376 | −#define FORMAT_MESSAGE_ALLOCATE_BUFFER 256 | |
| 377 | −#define FORMAT_MESSAGE_IGNORE_INSERTS 512 | |
| 378 | −#define FORMAT_MESSAGE_FROM_STRING 1024 | |
| 379 | −#define FORMAT_MESSAGE_FROM_HMODULE 2048 | |
| 380 | −#define FORMAT_MESSAGE_FROM_SYSTEM 4096 | |
| 381 | −#define FORMAT_MESSAGE_ARGUMENT_ARRAY 8192 | |
| 382 | −#define FORMAT_MESSAGE_MAX_WIDTH_MASK 255 | |
| 383 | −#define EV_BREAK 64 | |
| 384 | −#define EV_CTS 8 | |
| 385 | −#define EV_DSR 16 | |
| 386 | −#define EV_ERR 128 | |
| 387 | −#define EV_EVENT1 2048 | |
| 388 | −#define EV_EVENT2 4096 | |
| 389 | −#define EV_PERR 512 | |
| 390 | −#define EV_RING 256 | |
| 391 | −#define EV_RLSD 32 | |
| 392 | −#define EV_RX80FULL 1024 | |
| 393 | −#define EV_RXCHAR 1 | |
| 394 | −#define EV_RXFLAG 2 | |
| 395 | −#define EV_TXEMPTY 4 | |
| 396 | −#define SEM_FAILCRITICALERRORS 1 | |
| 397 | −#define SEM_NOALIGNMENTFAULTEXCEPT 4 | |
| 398 | −#define SEM_NOGPFAULTERRORBOX 2 | |
| 399 | −#define SEM_NOOPENFILEERRORBOX 32768 | |
| 400 | −#define SLE_ERROR 1 | |
| 401 | −#define SLE_MINORERROR 2 | |
| 402 | −#define SLE_WARNING 3 | |
| 403 | −#define SHUTDOWN_NORETRY 1 | |
| 404 | −#define EXCEPTION_EXECUTE_HANDLER 1 | |
| 405 | −#define EXCEPTION_CONTINUE_EXECUTION (-1) | |
| 406 | −#define EXCEPTION_CONTINUE_SEARCH 0 | |
| 407 | −#define MAXINTATOM 0xC000 | |
| 408 | −#define INVALID_ATOM ((ATOM)0) | |
| 409 | −#define IGNORE 0 | |
| 410 | −#define INFINITE 0xFFFFFFFF | |
| 411 | −#define NOPARITY 0 | |
| 412 | −#define ODDPARITY 1 | |
| 413 | −#define EVENPARITY 2 | |
| 414 | −#define MARKPARITY 3 | |
| 415 | −#define SPACEPARITY 4 | |
| 416 | −#define ONESTOPBIT 0 | |
| 417 | −#define ONE5STOPBITS 1 | |
| 418 | −#define TWOSTOPBITS 2 | |
| 419 | −#define CBR_110 110 | |
| 420 | −#define CBR_300 300 | |
| 421 | −#define CBR_600 600 | |
| 422 | −#define CBR_1200 1200 | |
| 423 | −#define CBR_2400 2400 | |
| 424 | −#define CBR_4800 4800 | |
| 425 | −#define CBR_9600 9600 | |
| 426 | −#define CBR_14400 14400 | |
| 427 | −#define CBR_19200 19200 | |
| 428 | −#define CBR_38400 38400 | |
| 429 | −#define CBR_56000 56000 | |
| 430 | −#define CBR_57600 57600 | |
| 431 | −#define CBR_115200 115200 | |
| 432 | −#define CBR_128000 128000 | |
| 433 | −#define CBR_256000 256000 | |
| 434 | −#define BACKUP_INVALID 0 | |
| 435 | −#define BACKUP_DATA 1 | |
| 436 | −#define BACKUP_EA_DATA 2 | |
| 437 | −#define BACKUP_SECURITY_DATA 3 | |
| 438 | −#define BACKUP_ALTERNATE_DATA 4 | |
| 439 | −#define BACKUP_LINK 5 | |
| 440 | −#define BACKUP_PROPERTY_DATA 6 | |
| 441 | −#define BACKUP_OBJECT_ID 7 | |
| 442 | −#define BACKUP_REPARSE_DATA 8 | |
| 443 | −#define BACKUP_SPARSE_BLOCK 9 | |
| 444 | −#define STREAM_NORMAL_ATTRIBUTE 0 | |
| 445 | −#define STREAM_MODIFIED_WHEN_READ 1 | |
| 446 | −#define STREAM_CONTAINS_SECURITY 2 | |
| 447 | −#define STREAM_CONTAINS_PROPERTIES 4 | |
| 448 | −#define STARTF_USESHOWWINDOW 1 | |
| 449 | −#define STARTF_USESIZE 2 | |
| 450 | −#define STARTF_USEPOSITION 4 | |
| 451 | −#define STARTF_USECOUNTCHARS 8 | |
| 452 | −#define STARTF_USEFILLATTRIBUTE 16 | |
| 453 | −#define STARTF_RUNFULLSCREEN 32 | |
| 454 | −#define STARTF_FORCEONFEEDBACK 64 | |
| 455 | −#define STARTF_FORCEOFFFEEDBACK 128 | |
| 456 | −#define STARTF_USESTDHANDLES 256 | |
| 457 | −#define STARTF_USEHOTKEY 512 | |
| 458 | −#define TC_NORMAL 0 | |
| 459 | −#define TC_HARDERR 1 | |
| 460 | −#define TC_GP_TRAP 2 | |
| 461 | −#define TC_SIGNAL 3 | |
| 462 | −#define AC_LINE_OFFLINE 0 | |
| 463 | −#define AC_LINE_ONLINE 1 | |
| 464 | −#define AC_LINE_BACKUP_POWER 2 | |
| 465 | −#define AC_LINE_UNKNOWN 255 | |
| 466 | −#define BATTERY_FLAG_HIGH 1 | |
| 467 | −#define BATTERY_FLAG_LOW 2 | |
| 468 | −#define BATTERY_FLAG_CRITICAL 4 | |
| 469 | −#define BATTERY_FLAG_CHARGING 8 | |
| 470 | −#define BATTERY_FLAG_NO_BATTERY 128 | |
| 471 | −#define BATTERY_FLAG_UNKNOWN 255 | |
| 472 | −#define BATTERY_PERCENTAGE_UNKNOWN 255 | |
| 473 | −#define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF | |
| 474 | −#define DDD_RAW_TARGET_PATH 1 | |
| 475 | −#define DDD_REMOVE_DEFINITION 2 | |
| 476 | −#define DDD_EXACT_MATCH_ON_REMOVE 4 | |
| 477 | −#define HINSTANCE_ERROR 32 | |
| 478 | −#define MS_CTS_ON 16 | |
| 479 | −#define MS_DSR_ON 32 | |
| 480 | −#define MS_RING_ON 64 | |
| 481 | −#define MS_RLSD_ON 128 | |
| 482 | −#define PROFILE_USER 0x10000000 | |
| 483 | −#define PROFILE_KERNEL 0x20000000 | |
| 484 | −#define PROFILE_SERVER 0x40000000 | |
| 485 | −#define DTR_CONTROL_DISABLE 0 | |
| 486 | −#define DTR_CONTROL_ENABLE 1 | |
| 487 | −#define DTR_CONTROL_HANDSHAKE 2 | |
| 488 | −#define RTS_CONTROL_DISABLE 0 | |
| 489 | −#define RTS_CONTROL_ENABLE 1 | |
| 490 | −#define RTS_CONTROL_HANDSHAKE 2 | |
| 491 | −#define RTS_CONTROL_TOGGLE 3 | |
| 492 | −#define SECURITY_ANONYMOUS (SecurityAnonymous<<16) | |
| 493 | −#define SECURITY_IDENTIFICATION (SecurityIdentification<<16) | |
| 494 | −#define SECURITY_IMPERSONATION (SecurityImpersonation<<16) | |
| 495 | −#define SECURITY_DELEGATION (SecurityDelegation<<16) | |
| 496 | −#define SECURITY_CONTEXT_TRACKING 0x40000 | |
| 497 | −#define SECURITY_EFFECTIVE_ONLY 0x80000 | |
| 498 | −#define SECURITY_SQOS_PRESENT 0x100000 | |
| 499 | −#define SECURITY_VALID_SQOS_FLAGS 0x1F0000 | |
| 500 | −#define INVALID_FILE_SIZE 0xFFFFFFFF | |
| 501 | −#define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF | |
| 502 | 593 | |
| 503 | −#ifndef RC_INVOKED | |
| 504 | −typedef struct _FILETIME { | |
| 505 | − DWORD dwLowDateTime; | |
| 506 | − DWORD dwHighDateTime; | |
| 507 | −} FILETIME,*PFILETIME,*LPFILETIME; | |
| 508 | −typedef struct _BY_HANDLE_FILE_INFORMATION { | |
| 509 | − DWORD dwFileAttributes; | |
| 510 | − FILETIME ftCreationTime; | |
| 511 | − FILETIME ftLastAccessTime; | |
| 512 | − FILETIME ftLastWriteTime; | |
| 513 | − DWORD dwVolumeSerialNumber; | |
| 514 | − DWORD nFileSizeHigh; | |
| 515 | − DWORD nFileSizeLow; | |
| 516 | − DWORD nNumberOfLinks; | |
| 517 | − DWORD nFileIndexHigh; | |
| 518 | − DWORD nFileIndexLow; | |
| 519 | −} BY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION; | |
| 520 | −typedef struct _DCB { | |
| 521 | − DWORD DCBlength; | |
| 522 | − DWORD BaudRate; | |
| 523 | − DWORD fBinary:1; | |
| 524 | − DWORD fParity:1; | |
| 525 | − DWORD fOutxCtsFlow:1; | |
| 526 | − DWORD fOutxDsrFlow:1; | |
| 527 | − DWORD fDtrControl:2; | |
| 528 | − DWORD fDsrSensitivity:1; | |
| 529 | − DWORD fTXContinueOnXoff:1; | |
| 530 | − DWORD fOutX:1; | |
| 531 | − DWORD fInX:1; | |
| 532 | − DWORD fErrorChar:1; | |
| 533 | − DWORD fNull:1; | |
| 534 | − DWORD fRtsControl:2; | |
| 535 | − DWORD fAbortOnError:1; | |
| 536 | − DWORD fDummy2:17; | |
| 537 | − WORD wReserved; | |
| 538 | − WORD XonLim; | |
| 539 | − WORD XoffLim; | |
| 540 | − BYTE ByteSize; | |
| 541 | − BYTE Parity; | |
| 542 | − BYTE StopBits; | |
| 543 | − char XonChar; | |
| 544 | − char XoffChar; | |
| 545 | − char ErrorChar; | |
| 546 | − char EofChar; | |
| 547 | − char EvtChar; | |
| 548 | − WORD wReserved1; | |
| 549 | −} DCB,*LPDCB; | |
| 550 | −typedef struct _COMM_CONFIG { | |
| 551 | − DWORD dwSize; | |
| 552 | − WORD wVersion; | |
| 553 | − WORD wReserved; | |
| 554 | − DCB dcb; | |
| 555 | − DWORD dwProviderSubType; | |
| 556 | − DWORD dwProviderOffset; | |
| 557 | − DWORD dwProviderSize; | |
| 558 | − WCHAR wcProviderData[1]; | |
| 559 | −} COMMCONFIG,*LPCOMMCONFIG; | |
| 560 | −typedef struct _COMMPROP { | |
| 561 | − WORD wPacketLength; | |
| 562 | − WORD wPacketVersion; | |
| 563 | − DWORD dwServiceMask; | |
| 564 | − DWORD dwReserved1; | |
| 565 | − DWORD dwMaxTxQueue; | |
| 566 | − DWORD dwMaxRxQueue; | |
| 567 | − DWORD dwMaxBaud; | |
| 568 | − DWORD dwProvSubType; | |
| 569 | − DWORD dwProvCapabilities; | |
| 570 | − DWORD dwSettableParams; | |
| 571 | − DWORD dwSettableBaud; | |
| 572 | − WORD wSettableData; | |
| 573 | − WORD wSettableStopParity; | |
| 574 | − DWORD dwCurrentTxQueue; | |
| 575 | − DWORD dwCurrentRxQueue; | |
| 576 | − DWORD dwProvSpec1; | |
| 577 | − DWORD dwProvSpec2; | |
| 578 | − WCHAR wcProvChar[1]; | |
| 579 | −} COMMPROP,*LPCOMMPROP; | |
| 580 | −typedef struct _COMMTIMEOUTS { | |
| 581 | − DWORD ReadIntervalTimeout; | |
| 582 | − DWORD ReadTotalTimeoutMultiplier; | |
| 583 | − DWORD ReadTotalTimeoutConstant; | |
| 584 | − DWORD WriteTotalTimeoutMultiplier; | |
| 585 | − DWORD WriteTotalTimeoutConstant; | |
| 586 | −} COMMTIMEOUTS,*LPCOMMTIMEOUTS; | |
| 587 | −typedef struct _COMSTAT { | |
| 588 | − DWORD fCtsHold:1; | |
| 589 | − DWORD fDsrHold:1; | |
| 590 | − DWORD fRlsdHold:1; | |
| 591 | − DWORD fXoffHold:1; | |
| 592 | − DWORD fXoffSent:1; | |
| 593 | − DWORD fEof:1; | |
| 594 | − DWORD fTxim:1; | |
| 595 | − DWORD fReserved:25; | |
| 596 | − DWORD cbInQue; | |
| 597 | − DWORD cbOutQue; | |
| 598 | −} COMSTAT,*LPCOMSTAT; | |
| 599 | −typedef DWORD (WINAPI *LPTHREAD_START_ROUTINE)(LPVOID); | |
| 600 | −typedef struct _CREATE_PROCESS_DEBUG_INFO { | |
| 601 | − HANDLE hFile; | |
| 602 | − HANDLE hProcess; | |
| 603 | − HANDLE hThread; | |
| 604 | − LPVOID lpBaseOfImage; | |
| 605 | − DWORD dwDebugInfoFileOffset; | |
| 606 | − DWORD nDebugInfoSize; | |
| 607 | − LPVOID lpThreadLocalBase; | |
| 608 | − LPTHREAD_START_ROUTINE lpStartAddress; | |
| 609 | − LPVOID lpImageName; | |
| 610 | − WORD fUnicode; | |
| 611 | −} CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO; | |
| 612 | −typedef struct _CREATE_THREAD_DEBUG_INFO { | |
| 613 | − HANDLE hThread; | |
| 614 | − LPVOID lpThreadLocalBase; | |
| 615 | − LPTHREAD_START_ROUTINE lpStartAddress; | |
| 616 | −} CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO; | |
| 617 | −typedef struct _EXCEPTION_DEBUG_INFO { | |
| 618 | − EXCEPTION_RECORD ExceptionRecord; | |
| 619 | − DWORD dwFirstChance; | |
| 620 | −} EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO; | |
| 621 | −typedef struct _EXIT_THREAD_DEBUG_INFO { | |
| 622 | − DWORD dwExitCode; | |
| 623 | −} EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO; | |
| 624 | −typedef struct _EXIT_PROCESS_DEBUG_INFO { | |
| 625 | − DWORD dwExitCode; | |
| 626 | −} EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO; | |
| 627 | −typedef struct _LOAD_DLL_DEBUG_INFO { | |
| 628 | − HANDLE hFile; | |
| 629 | − LPVOID lpBaseOfDll; | |
| 630 | − DWORD dwDebugInfoFileOffset; | |
| 631 | − DWORD nDebugInfoSize; | |
| 632 | − LPVOID lpImageName; | |
| 633 | − WORD fUnicode; | |
| 634 | −} LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO; | |
| 635 | −typedef struct _UNLOAD_DLL_DEBUG_INFO { | |
| 636 | − LPVOID lpBaseOfDll; | |
| 637 | −} UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO; | |
| 638 | −typedef struct _OUTPUT_DEBUG_STRING_INFO { | |
| 639 | − LPSTR lpDebugStringData; | |
| 640 | − WORD fUnicode; | |
| 641 | − WORD nDebugStringLength; | |
| 642 | −} OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO; | |
| 643 | −typedef struct _RIP_INFO { | |
| 644 | − DWORD dwError; | |
| 645 | − DWORD dwType; | |
| 646 | −} RIP_INFO,*LPRIP_INFO; | |
| 647 | −typedef struct _DEBUG_EVENT { | |
| 648 | − DWORD dwDebugEventCode; | |
| 649 | − DWORD dwProcessId; | |
| 650 | − DWORD dwThreadId; | |
| 651 | − union { | |
| 652 | − EXCEPTION_DEBUG_INFO Exception; | |
| 653 | − CREATE_THREAD_DEBUG_INFO CreateThread; | |
| 654 | − CREATE_PROCESS_DEBUG_INFO CreateProcessInfo; | |
| 655 | − EXIT_THREAD_DEBUG_INFO ExitThread; | |
| 656 | − EXIT_PROCESS_DEBUG_INFO ExitProcess; | |
| 657 | − LOAD_DLL_DEBUG_INFO LoadDll; | |
| 658 | − UNLOAD_DLL_DEBUG_INFO UnloadDll; | |
| 659 | − OUTPUT_DEBUG_STRING_INFO DebugString; | |
| 660 | − RIP_INFO RipInfo; | |
| 661 | − } u; | |
| 662 | −} DEBUG_EVENT,*LPDEBUG_EVENT; | |
| 663 | −typedef struct _OVERLAPPED { | |
| 664 | − DWORD Internal; | |
| 665 | − DWORD InternalHigh; | |
| 666 | − DWORD Offset; | |
| 667 | − DWORD OffsetHigh; | |
| 668 | − HANDLE hEvent; | |
| 669 | −} OVERLAPPED,*POVERLAPPED,*LPOVERLAPPED; | |
| 670 | −typedef struct _STARTUPINFOA { | |
| 671 | − DWORD cb; | |
| 672 | − LPSTR lpReserved; | |
| 673 | − LPSTR lpDesktop; | |
| 674 | − LPSTR lpTitle; | |
| 675 | − DWORD dwX; | |
| 676 | − DWORD dwY; | |
| 677 | − DWORD dwXSize; | |
| 678 | − DWORD dwYSize; | |
| 679 | − DWORD dwXCountChars; | |
| 680 | − DWORD dwYCountChars; | |
| 681 | − DWORD dwFillAttribute; | |
| 682 | − DWORD dwFlags; | |
| 683 | − WORD wShowWindow; | |
| 684 | − WORD cbReserved2; | |
| 685 | − PBYTE lpReserved2; | |
| 686 | − HANDLE hStdInput; | |
| 687 | − HANDLE hStdOutput; | |
| 688 | − HANDLE hStdError; | |
| 689 | −} STARTUPINFOA,*LPSTARTUPINFOA; | |
| 690 | −typedef struct _STARTUPINFOW { | |
| 691 | − DWORD cb; | |
| 692 | − LPWSTR lpReserved; | |
| 693 | − LPWSTR lpDesktop; | |
| 694 | − LPWSTR lpTitle; | |
| 695 | − DWORD dwX; | |
| 696 | − DWORD dwY; | |
| 697 | − DWORD dwXSize; | |
| 698 | − DWORD dwYSize; | |
| 699 | − DWORD dwXCountChars; | |
| 700 | − DWORD dwYCountChars; | |
| 701 | − DWORD dwFillAttribute; | |
| 702 | − DWORD dwFlags; | |
| 703 | − WORD wShowWindow; | |
| 704 | − WORD cbReserved2; | |
| 705 | − PBYTE lpReserved2; | |
| 706 | − HANDLE hStdInput; | |
| 707 | − HANDLE hStdOutput; | |
| 708 | − HANDLE hStdError; | |
| 709 | −} STARTUPINFOW,*LPSTARTUPINFOW; | |
| 710 | −typedef struct _PROCESS_INFORMATION { | |
| 711 | − HANDLE hProcess; | |
| 712 | − HANDLE hThread; | |
| 713 | − DWORD dwProcessId; | |
| 714 | − DWORD dwThreadId; | |
| 715 | −} PROCESS_INFORMATION,*LPPROCESS_INFORMATION; | |
| 716 | −typedef struct _CRITICAL_SECTION_DEBUG { | |
| 717 | − WORD Type; | |
| 718 | − WORD CreatorBackTraceIndex; | |
| 719 | − struct _CRITICAL_SECTION *CriticalSection; | |
| 720 | − LIST_ENTRY ProcessLocksList; | |
| 721 | − DWORD EntryCount; | |
| 722 | − DWORD ContentionCount; | |
| 723 | − DWORD Spare [2]; | |
| 724 | −} CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG; | |
| 725 | −typedef struct _CRITICAL_SECTION { | |
| 726 | − PCRITICAL_SECTION_DEBUG DebugInfo; | |
| 727 | − LONG LockCount; | |
| 728 | − LONG RecursionCount; | |
| 729 | − HANDLE OwningThread; | |
| 730 | − HANDLE LockSemaphore; | |
| 731 | − DWORD SpinCount; | |
| 732 | −} CRITICAL_SECTION,*PCRITICAL_SECTION,*LPCRITICAL_SECTION; | |
| 733 | −typedef struct _SYSTEMTIME { | |
| 734 | − WORD wYear; | |
| 735 | − WORD wMonth; | |
| 736 | − WORD wDayOfWeek; | |
| 737 | − WORD wDay; | |
| 738 | − WORD wHour; | |
| 739 | − WORD wMinute; | |
| 740 | − WORD wSecond; | |
| 741 | − WORD wMilliseconds; | |
| 742 | −} SYSTEMTIME,*LPSYSTEMTIME; | |
| 743 | −typedef struct _WIN32_FILE_ATTRIBUTE_DATA { | |
| 744 | − DWORD dwFileAttributes; | |
| 745 | − FILETIME ftCreationTime; | |
| 746 | − FILETIME ftLastAccessTime; | |
| 747 | − FILETIME ftLastWriteTime; | |
| 748 | − DWORD nFileSizeHigh; | |
| 749 | − DWORD nFileSizeLow; | |
| 750 | −} WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA; | |
| 751 | −typedef struct _WIN32_FIND_DATAA { | |
| 752 | − DWORD dwFileAttributes; | |
| 753 | − FILETIME ftCreationTime; | |
| 754 | − FILETIME ftLastAccessTime; | |
| 755 | − FILETIME ftLastWriteTime; | |
| 756 | − DWORD nFileSizeHigh; | |
| 757 | − DWORD nFileSizeLow; | |
| 758 | − DWORD dwReserved0; | |
| 759 | − DWORD dwReserved1; | |
| 760 | − CHAR cFileName[MAX_PATH]; | |
| 761 | − CHAR cAlternateFileName[14]; | |
| 762 | −} WIN32_FIND_DATAA,*LPWIN32_FIND_DATAA; | |
| 763 | −typedef struct _WIN32_FIND_DATAW { | |
| 764 | − DWORD dwFileAttributes; | |
| 765 | − FILETIME ftCreationTime; | |
| 766 | − FILETIME ftLastAccessTime; | |
| 767 | − FILETIME ftLastWriteTime; | |
| 768 | − DWORD nFileSizeHigh; | |
| 769 | − DWORD nFileSizeLow; | |
| 770 | − DWORD dwReserved0; | |
| 771 | − DWORD dwReserved1; | |
| 772 | − WCHAR cFileName[MAX_PATH]; | |
| 773 | − WCHAR cAlternateFileName[14]; | |
| 774 | −} WIN32_FIND_DATAW,*LPWIN32_FIND_DATAW; | |
| 775 | −typedef struct _WIN32_STREAM_ID { | |
| 776 | − DWORD dwStreamId; | |
| 777 | − DWORD dwStreamAttributes; | |
| 778 | − LARGE_INTEGER Size; | |
| 779 | − DWORD dwStreamNameSize; | |
| 780 | − WCHAR cStreamName[ANYSIZE_ARRAY]; | |
| 781 | −} WIN32_STREAM_ID; | |
| 782 | −typedef enum _FINDEX_INFO_LEVELS { | |
| 783 | − FindExInfoStandard, | |
| 784 | − FindExInfoMaxInfoLevel | |
| 785 | −} FINDEX_INFO_LEVELS; | |
| 786 | −typedef enum _FINDEX_SEARCH_OPS { | |
| 787 | − FindExSearchNameMatch, | |
| 788 | − FindExSearchLimitToDirectories, | |
| 789 | − FindExSearchLimitToDevices, | |
| 790 | − FindExSearchMaxSearchOp | |
| 791 | −} FINDEX_SEARCH_OPS; | |
| 792 | −typedef enum _ACL_INFORMATION_CLASS { | |
| 793 | − AclRevisionInformation=1, | |
| 794 | − AclSizeInformation | |
| 795 | −} ACL_INFORMATION_CLASS; | |
| 796 | −typedef struct tagHW_PROFILE_INFOA { | |
| 797 | − DWORD dwDockInfo; | |
| 798 | − CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; | |
| 799 | − CHAR szHwProfileName[MAX_PROFILE_LEN]; | |
| 800 | −} HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA; | |
| 801 | −typedef struct tagHW_PROFILE_INFOW { | |
| 802 | − DWORD dwDockInfo; | |
| 803 | − WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; | |
| 804 | − WCHAR szHwProfileName[MAX_PROFILE_LEN]; | |
| 805 | −} HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW; | |
| 806 | −typedef enum _GET_FILEEX_INFO_LEVELS { | |
| 807 | − GetFileExInfoStandard, | |
| 808 | − GetFileExMaxInfoLevel | |
| 809 | −} GET_FILEEX_INFO_LEVELS; | |
| 810 | −typedef struct _SYSTEM_INFO { | |
| 811 | − _ANONYMOUS_UNION union { | |
| 812 | − DWORD dwOemId; | |
| 813 | − _ANONYMOUS_STRUCT struct { | |
| 814 | − WORD wProcessorArchitecture; | |
| 815 | − WORD wReserved; | |
| 816 | − } DUMMYSTRUCTNAME; | |
| 817 | − } DUMMYUNIONNAME; | |
| 818 | − DWORD dwPageSize; | |
| 819 | − PVOID lpMinimumApplicationAddress; | |
| 820 | − PVOID lpMaximumApplicationAddress; | |
| 821 | − DWORD dwActiveProcessorMask; | |
| 822 | − DWORD dwNumberOfProcessors; | |
| 823 | − DWORD dwProcessorType; | |
| 824 | − DWORD dwAllocationGranularity; | |
| 825 | − WORD wProcessorLevel; | |
| 826 | − WORD wProcessorRevision; | |
| 827 | −} SYSTEM_INFO,*LPSYSTEM_INFO; | |
| 828 | −typedef struct _SYSTEM_POWER_STATUS { | |
| 829 | − BYTE ACLineStatus; | |
| 830 | − BYTE BatteryFlag; | |
| 831 | − BYTE BatteryLifePercent; | |
| 832 | − BYTE Reserved1; | |
| 833 | − DWORD BatteryLifeTime; | |
| 834 | − DWORD BatteryFullLifeTime; | |
| 835 | −} SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS; | |
| 836 | −typedef struct _TIME_ZONE_INFORMATION { | |
| 837 | − LONG Bias; | |
| 838 | − WCHAR StandardName[32]; | |
| 839 | − SYSTEMTIME StandardDate; | |
| 840 | − LONG StandardBias; | |
| 841 | − WCHAR DaylightName[32]; | |
| 842 | − SYSTEMTIME DaylightDate; | |
| 843 | − LONG DaylightBias; | |
| 844 | −} TIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION; | |
| 845 | −typedef struct _MEMORYSTATUS { | |
| 846 | − DWORD dwLength; | |
| 847 | − DWORD dwMemoryLoad; | |
| 848 | − DWORD dwTotalPhys; | |
| 849 | − DWORD dwAvailPhys; | |
| 850 | − DWORD dwTotalPageFile; | |
| 851 | − DWORD dwAvailPageFile; | |
| 852 | − DWORD dwTotalVirtual; | |
| 853 | − DWORD dwAvailVirtual; | |
| 854 | −} MEMORYSTATUS,*LPMEMORYSTATUS; | |
| 855 | −typedef struct _LDT_ENTRY { | |
| 856 | − WORD LimitLow; | |
| 857 | − WORD BaseLow; | |
| 858 | − union { | |
| 859 | − struct { | |
| 860 | − BYTE BaseMid; | |
| 861 | − BYTE Flags1; | |
| 862 | − BYTE Flags2; | |
| 863 | − BYTE BaseHi; | |
| 864 | − } Bytes; | |
| 865 | − struct { | |
| 866 | − DWORD BaseMid:8; | |
| 867 | − DWORD Type:5; | |
| 868 | − DWORD Dpl:2; | |
| 869 | − DWORD Pres:1; | |
| 870 | − DWORD LimitHi:4; | |
| 871 | − DWORD Sys:1; | |
| 872 | − DWORD Reserved_0:1; | |
| 873 | − DWORD Default_Big:1; | |
| 874 | − DWORD Granularity:1; | |
| 875 | − DWORD BaseHi:8; | |
| 876 | − } Bits; | |
| 877 | − } HighWord; | |
| 878 | −} LDT_ENTRY,*PLDT_ENTRY,*LPLDT_ENTRY; | |
| 879 | −typedef struct _PROCESS_HEAP_ENTRY { | |
| 880 | − PVOID lpData; | |
| 881 | − DWORD cbData; | |
| 882 | − BYTE cbOverhead; | |
| 883 | − BYTE iRegionIndex; | |
| 884 | − WORD wFlags; | |
| 885 | − _ANONYMOUS_UNION union { | |
| 886 | − struct { | |
| 887 | − HANDLE hMem; | |
| 888 | − DWORD dwReserved[3]; | |
| 889 | − } Block; | |
| 890 | − struct { | |
| 891 | − DWORD dwCommittedSize; | |
| 892 | − DWORD dwUnCommittedSize; | |
| 893 | − LPVOID lpFirstBlock; | |
| 894 | − LPVOID lpLastBlock; | |
| 895 | − } Region; | |
| 896 | − } DUMMYUNIONNAME; | |
| 897 | −} PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY; | |
| 898 | −typedef struct _OFSTRUCT { | |
| 899 | − BYTE cBytes; | |
| 900 | − BYTE fFixedDisk; | |
| 901 | − WORD nErrCode; | |
| 902 | − WORD Reserved1; | |
| 903 | − WORD Reserved2; | |
| 904 | − CHAR szPathName[OFS_MAXPATHNAME]; | |
| 905 | −} OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT; | |
| 906 | −typedef struct _WIN_CERTIFICATE { | |
| 907 | − DWORD dwLength; | |
| 908 | − WORD wRevision; | |
| 909 | − WORD wCertificateType; | |
| 910 | − BYTE bCertificate[1]; | |
| 911 | −} WIN_CERTIFICATE, *LPWIN_CERTIFICATE; | |
| 912 | − | |
| 913 | −typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID); | |
| 914 | −typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID); | |
| 915 | −typedef BOOL(CALLBACK *ENUMRESLANGPROC)(HMODULE,LPCTSTR,LPCTSTR,WORD,LONG); | |
| 916 | −typedef BOOL(CALLBACK *ENUMRESNAMEPROC)(HMODULE,LPCTSTR,LPTSTR,LONG); | |
| 917 | −typedef BOOL(CALLBACK *ENUMRESTYPEPROC)(HMODULE,LPTSTR,LONG); | |
| 918 | −typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED); | |
| 919 | −typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS); | |
| 920 | −typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; | |
| 921 | −typedef void(APIENTRY *PAPCFUNC)(DWORD); | |
| 922 | −typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD); | |
| 923 | −#define MAKEINTATOM(i) (LPTSTR)((DWORD)((WORD)(i))) | |
| 924 | −/* Functions */ | |
| 925 | −#ifndef UNDER_CE | |
| 926 | −int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPSTR,int); | |
| 594 | +#define STD_INPUT_HANDLE ((DWORD)-10) | |
| 595 | +#define STD_OUTPUT_HANDLE ((DWORD)-11) | |
| 596 | +#define STD_ERROR_HANDLE ((DWORD)-12) | |
| 597 | + | |
| 598 | +#define NOPARITY 0 | |
| 599 | +#define ODDPARITY 1 | |
| 600 | +#define EVENPARITY 2 | |
| 601 | +#define MARKPARITY 3 | |
| 602 | +#define SPACEPARITY 4 | |
| 603 | + | |
| 604 | +#define ONESTOPBIT 0 | |
| 605 | +#define ONE5STOPBITS 1 | |
| 606 | +#define TWOSTOPBITS 2 | |
| 607 | + | |
| 608 | +#define IGNORE 0 | |
| 609 | +#define INFINITE 0xffffffff | |
| 610 | + | |
| 611 | +#define CBR_110 110 | |
| 612 | +#define CBR_300 300 | |
| 613 | +#define CBR_600 600 | |
| 614 | +#define CBR_1200 1200 | |
| 615 | +#define CBR_2400 2400 | |
| 616 | +#define CBR_4800 4800 | |
| 617 | +#define CBR_9600 9600 | |
| 618 | +#define CBR_14400 14400 | |
| 619 | +#define CBR_19200 19200 | |
| 620 | +#define CBR_38400 38400 | |
| 621 | +#define CBR_56000 56000 | |
| 622 | +#define CBR_57600 57600 | |
| 623 | +#define CBR_115200 115200 | |
| 624 | +#define CBR_128000 128000 | |
| 625 | +#define CBR_256000 256000 | |
| 626 | + | |
| 627 | +#define CE_RXOVER 0x1 | |
| 628 | +#define CE_OVERRUN 0x2 | |
| 629 | +#define CE_RXPARITY 0x4 | |
| 630 | +#define CE_FRAME 0x8 | |
| 631 | +#define CE_BREAK 0x10 | |
| 632 | +#define CE_TXFULL 0x100 | |
| 633 | +#define CE_PTO 0x200 | |
| 634 | +#define CE_IOE 0x400 | |
| 635 | +#define CE_DNS 0x800 | |
| 636 | +#define CE_OOP 0x1000 | |
| 637 | +#define CE_MODE 0x8000 | |
| 638 | + | |
| 639 | +#define IE_BADID (-1) | |
| 640 | +#define IE_OPEN (-2) | |
| 641 | +#define IE_NOPEN (-3) | |
| 642 | +#define IE_MEMORY (-4) | |
| 643 | +#define IE_DEFAULT (-5) | |
| 644 | +#define IE_HARDWARE (-10) | |
| 645 | +#define IE_BYTESIZE (-11) | |
| 646 | +#define IE_BAUDRATE (-12) | |
| 647 | + | |
| 648 | +#define EV_RXCHAR 0x1 | |
| 649 | +#define EV_RXFLAG 0x2 | |
| 650 | +#define EV_TXEMPTY 0x4 | |
| 651 | +#define EV_CTS 0x8 | |
| 652 | +#define EV_DSR 0x10 | |
| 653 | +#define EV_RLSD 0x20 | |
| 654 | +#define EV_BREAK 0x40 | |
| 655 | +#define EV_ERR 0x80 | |
| 656 | +#define EV_RING 0x100 | |
| 657 | +#define EV_PERR 0x200 | |
| 658 | +#define EV_RX80FULL 0x400 | |
| 659 | +#define EV_EVENT1 0x800 | |
| 660 | +#define EV_EVENT2 0x1000 | |
| 661 | + | |
| 662 | +#define SETXOFF 1 | |
| 663 | +#define SETXON 2 | |
| 664 | +#define SETRTS 3 | |
| 665 | +#define CLRRTS 4 | |
| 666 | +#define SETDTR 5 | |
| 667 | +#define CLRDTR 6 | |
| 668 | +#define RESETDEV 7 | |
| 669 | +#define SETBREAK 8 | |
| 670 | +#define CLRBREAK 9 | |
| 671 | + | |
| 672 | +#define PURGE_TXABORT 0x1 | |
| 673 | +#define PURGE_RXABORT 0x2 | |
| 674 | +#define PURGE_TXCLEAR 0x4 | |
| 675 | +#define PURGE_RXCLEAR 0x8 | |
| 676 | + | |
| 677 | +#define LPTx 0x80 | |
| 678 | + | |
| 679 | +#define MS_CTS_ON ((DWORD)0x10) | |
| 680 | +#define MS_DSR_ON ((DWORD)0x20) | |
| 681 | +#define MS_RING_ON ((DWORD)0x40) | |
| 682 | +#define MS_RLSD_ON ((DWORD)0x80) | |
| 683 | + | |
| 684 | +#define S_QUEUEEMPTY 0 | |
| 685 | +#define S_THRESHOLD 1 | |
| 686 | +#define S_ALLTHRESHOLD 2 | |
| 687 | + | |
| 688 | +#define S_NORMAL 0 | |
| 689 | +#define S_LEGATO 1 | |
| 690 | +#define S_STACCATO 2 | |
| 691 | + | |
| 692 | +#define S_PERIOD512 0 | |
| 693 | +#define S_PERIOD1024 1 | |
| 694 | +#define S_PERIOD2048 2 | |
| 695 | +#define S_PERIODVOICE 3 | |
| 696 | +#define S_WHITE512 4 | |
| 697 | +#define S_WHITE1024 5 | |
| 698 | +#define S_WHITE2048 6 | |
| 699 | +#define S_WHITEVOICE 7 | |
| 700 | + | |
| 701 | +#define S_SERDVNA (-1) | |
| 702 | +#define S_SEROFM (-2) | |
| 703 | +#define S_SERMACT (-3) | |
| 704 | +#define S_SERQFUL (-4) | |
| 705 | +#define S_SERBDNT (-5) | |
| 706 | +#define S_SERDLN (-6) | |
| 707 | +#define S_SERDCC (-7) | |
| 708 | +#define S_SERDTP (-8) | |
| 709 | +#define S_SERDVL (-9) | |
| 710 | +#define S_SERDMD (-10) | |
| 711 | +#define S_SERDSH (-11) | |
| 712 | +#define S_SERDPT (-12) | |
| 713 | +#define S_SERDFQ (-13) | |
| 714 | +#define S_SERDDR (-14) | |
| 715 | +#define S_SERDSR (-15) | |
| 716 | +#define S_SERDST (-16) | |
| 717 | + | |
| 718 | +#define NMPWAIT_WAIT_FOREVER 0xffffffff | |
| 719 | +#define NMPWAIT_NOWAIT 0x1 | |
| 720 | +#define NMPWAIT_USE_DEFAULT_WAIT 0x0 | |
| 721 | + | |
| 722 | +#define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES | |
| 723 | +#define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH | |
| 724 | +#define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK | |
| 725 | +#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS | |
| 726 | +#define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED | |
| 727 | +#define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION | |
| 728 | +#define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION | |
| 729 | + | |
| 730 | +#define FILE_MAP_COPY SECTION_QUERY | |
| 731 | +#define FILE_MAP_WRITE SECTION_MAP_WRITE | |
| 732 | +#define FILE_MAP_READ SECTION_MAP_READ | |
| 733 | +#define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS | |
| 734 | +#define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT | |
| 735 | + | |
| 736 | +#define OF_READ 0x0 | |
| 737 | +#define OF_WRITE 0x1 | |
| 738 | +#define OF_READWRITE 0x2 | |
| 739 | +#define OF_SHARE_COMPAT 0x0 | |
| 740 | +#define OF_SHARE_EXCLUSIVE 0x10 | |
| 741 | +#define OF_SHARE_DENY_WRITE 0x20 | |
| 742 | +#define OF_SHARE_DENY_READ 0x30 | |
| 743 | +#define OF_SHARE_DENY_NONE 0x40 | |
| 744 | +#define OF_PARSE 0x100 | |
| 745 | +#define OF_DELETE 0x200 | |
| 746 | +#define OF_VERIFY 0x400 | |
| 747 | +#define OF_CANCEL 0x800 | |
| 748 | +#define OF_CREATE 0x1000 | |
| 749 | +#define OF_PROMPT 0x2000 | |
| 750 | +#define OF_EXIST 0x4000 | |
| 751 | +#define OF_REOPEN 0x8000 | |
| 752 | + | |
| 753 | +#define OFS_MAXPATHNAME 128 | |
| 754 | + typedef struct _OFSTRUCT { | |
| 755 | + BYTE cBytes; | |
| 756 | + BYTE fFixedDisk; | |
| 757 | + WORD nErrCode; | |
| 758 | + WORD Reserved1; | |
| 759 | + WORD Reserved2; | |
| 760 | + CHAR szPathName[OFS_MAXPATHNAME]; | |
| 761 | + } OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT; | |
| 762 | + | |
| 763 | +#ifndef NOWINBASEINTERLOCK | |
| 764 | + | |
| 765 | +#ifndef _NTOS_ | |
| 766 | + | |
| 767 | +#if defined(__ia64__) && !defined(RC_INVOKED) | |
| 768 | + | |
| 769 | +#define InterlockedIncrement _InterlockedIncrement | |
| 770 | +#define InterlockedIncrementAcquire _InterlockedIncrement_acq | |
| 771 | +#define InterlockedIncrementRelease _InterlockedIncrement_rel | |
| 772 | +#define InterlockedDecrement _InterlockedDecrement | |
| 773 | +#define InterlockedDecrementAcquire _InterlockedDecrement_acq | |
| 774 | +#define InterlockedDecrementRelease _InterlockedDecrement_rel | |
| 775 | +#define InterlockedExchange _InterlockedExchange | |
| 776 | +#define InterlockedExchangeAdd _InterlockedExchangeAdd | |
| 777 | +#define InterlockedCompareExchange _InterlockedCompareExchange | |
| 778 | +#define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq | |
| 779 | +#define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel | |
| 780 | +#define InterlockedExchangePointer _InterlockedExchangePointer | |
| 781 | +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer | |
| 782 | +#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel | |
| 783 | +#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq | |
| 784 | + | |
| 785 | +#define InterlockedIncrement64 _InterlockedIncrement64 | |
| 786 | +#define InterlockedDecrement64 _InterlockedDecrement64 | |
| 787 | +#define InterlockedExchange64 _InterlockedExchange64 | |
| 788 | +#define InterlockedExchangeAcquire64 _InterlockedExchange64_acq | |
| 789 | +#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 | |
| 790 | +#define InterlockedCompareExchange64 _InterlockedCompareExchange64 | |
| 791 | +#define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq | |
| 792 | +#define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel | |
| 793 | + | |
| 794 | + LONGLONG __cdecl InterlockedIncrement64(LONGLONG volatile *Addend); | |
| 795 | + LONGLONG __cdecl InterlockedDecrement64(LONGLONG volatile *Addend); | |
| 796 | + LONG __cdecl InterlockedIncrementAcquire(LONG volatile *Addend); | |
| 797 | + LONG __cdecl InterlockedDecrementAcquire(LONG volatile *Addend); | |
| 798 | + LONG __cdecl InterlockedIncrementRelease(LONG volatile *Addend); | |
| 799 | + LONG __cdecl InterlockedDecrementRelease(LONG volatile *Addend); | |
| 800 | + LONGLONG __cdecl InterlockedExchange64 (LONGLONG volatile *Target,LONGLONG Value); | |
| 801 | + LONGLONG __cdecl InterlockedExchangeAcquire64 (LONGLONG volatile *Target,LONGLONG Value); | |
| 802 | + LONGLONG __cdecl InterlockedExchangeAdd64 (LONGLONG volatile *Addend,LONGLONG Value); | |
| 803 | + LONGLONG __cdecl InterlockedCompareExchange64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); | |
| 804 | + LONGLONG __cdecl InterlockedCompareExchangeAcquire64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); | |
| 805 | + LONGLONG __cdecl InterlockedCompareExchangeRelease64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); | |
| 806 | + LONG __cdecl InterlockedIncrement(LONG volatile *lpAddend); | |
| 807 | + LONG __cdecl InterlockedDecrement(LONG volatile *lpAddend); | |
| 808 | + LONG __cdecl InterlockedExchange(LONG volatile *Target,LONG Value); | |
| 809 | + LONG __cdecl InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); | |
| 810 | + LONG __cdecl InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand); | |
| 811 | + LONG __cdecl InterlockedCompareExchangeRelease(LONG volatile *Destination,LONG ExChange,LONG Comperand); | |
| 812 | + LONG __cdecl InterlockedCompareExchangeAcquire(LONG volatile *Destination,LONG ExChange,LONG Comperand); | |
| 813 | + PVOID __cdecl InterlockedExchangePointer(PVOID volatile *Target,PVOID Value); | |
| 814 | + PVOID __cdecl InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand); | |
| 815 | + PVOID __cdecl InterlockedCompareExchangePointerAcquire(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); | |
| 816 | + PVOID __cdecl InterlockedCompareExchangePointerRelease(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); | |
| 817 | + | |
| 818 | +#ifndef InterlockedAnd | |
| 819 | +#define InterlockedAnd InterlockedAnd_Inline | |
| 820 | + __CRT_INLINE LONG InterlockedAnd_Inline(LONG volatile *Target,LONG Set) { | |
| 821 | + LONG i; | |
| 822 | + LONG j; | |
| 823 | + j = *Target; | |
| 824 | + do { | |
| 825 | + i = j; | |
| 826 | + j = InterlockedCompareExchange(Target,i & Set,i); | |
| 827 | + } while(i!=j); | |
| 828 | + return j; | |
| 829 | + } | |
| 830 | +#endif | |
| 831 | + | |
| 832 | +#ifndef InterlockedOr | |
| 833 | +#define InterlockedOr InterlockedOr_Inline | |
| 834 | + | |
| 835 | + __CRT_INLINE LONG InterlockedOr_Inline(LONG volatile *Target,LONG Set) { | |
| 836 | + LONG i; | |
| 837 | + LONG j; | |
| 838 | + j = *Target; | |
| 839 | + do { | |
| 840 | + i = j; | |
| 841 | + j = InterlockedCompareExchange(Target,i | Set,i); | |
| 842 | + } while(i!=j); | |
| 843 | + return j; | |
| 844 | + } | |
| 845 | +#endif | |
| 846 | + | |
| 847 | +#ifndef InterlockedXor | |
| 848 | +#define InterlockedXor InterlockedXor_Inline | |
| 849 | + | |
| 850 | + __CRT_INLINE LONG InterlockedXor_Inline(LONG volatile *Target,LONG Set) { | |
| 851 | + LONG i; | |
| 852 | + LONG j; | |
| 853 | + j = *Target; | |
| 854 | + do { | |
| 855 | + i = j; | |
| 856 | + j = InterlockedCompareExchange(Target,i ^ Set,i); | |
| 857 | + } while(i!=j); | |
| 858 | + return j; | |
| 859 | + } | |
| 860 | +#endif | |
| 861 | + | |
| 862 | +#ifndef !defined (InterlockedAnd64) | |
| 863 | +#define InterlockedAnd64 InterlockedAnd64_Inline | |
| 864 | + | |
| 865 | + __CRT_INLINE LONGLONG InterlockedAnd64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 866 | + LONGLONG Old; | |
| 867 | + do { | |
| 868 | + Old = *Destination; | |
| 869 | + } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old); | |
| 870 | + return Old; | |
| 871 | + } | |
| 872 | +#endif | |
| 873 | + | |
| 874 | +#ifndef InterlockedOr64 | |
| 875 | +#define InterlockedOr64 InterlockedOr64_Inline | |
| 876 | + | |
| 877 | + __CRT_INLINE LONGLONG InterlockedOr64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 878 | + LONGLONG Old; | |
| 879 | + do { | |
| 880 | + Old = *Destination; | |
| 881 | + } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old); | |
| 882 | + return Old; | |
| 883 | + } | |
| 884 | +#endif | |
| 885 | + | |
| 886 | +#ifndef InterlockedXor64 | |
| 887 | +#define InterlockedXor64 InterlockedXor64_Inline | |
| 888 | + | |
| 889 | + __CRT_INLINE LONGLONG InterlockedXor64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 890 | + LONGLONG Old; | |
| 891 | + do { | |
| 892 | + Old = *Destination; | |
| 893 | + } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old); | |
| 894 | + return Old; | |
| 895 | + } | |
| 896 | +#endif | |
| 897 | + | |
| 898 | +#ifndef InterlockedBitTestAndSet | |
| 899 | +#define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline | |
| 900 | + | |
| 901 | + __CRT_INLINE BOOLEAN InterlockedBitTestAndSet_Inline(LONG *Base,LONG Bit) { | |
| 902 | + LONG tBit; | |
| 903 | + tBit = 1<<(Bit & (sizeof (*Base)*8-1)); | |
| 904 | + return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0); | |
| 905 | + } | |
| 906 | +#endif | |
| 907 | + | |
| 908 | +#ifndef InterlockedBitTestAndReset | |
| 909 | +#define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline | |
| 910 | + | |
| 911 | + __CRT_INLINE BOOLEAN InterlockedBitTestAndReset_Inline(LONG *Base,LONG Bit) { | |
| 912 | + LONG tBit; | |
| 913 | + tBit = 1<<(Bit & (sizeof (*Base)*8-1)); | |
| 914 | + return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)],~tBit)&tBit)!=0); | |
| 915 | + } | |
| 916 | +#endif | |
| 917 | + | |
| 918 | +#ifndef InterlockedBitTestAndComplement | |
| 919 | +#define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline | |
| 920 | + | |
| 921 | + __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement_Inline(LONG *Base,LONG Bit) { | |
| 922 | + LONG tBit; | |
| 923 | + tBit = 1<<(Bit & (sizeof (*Base)*8-1)); | |
| 924 | + return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0); | |
| 925 | + } | |
| 926 | +#endif | |
| 927 | +#elif defined(__x86_64) && !defined(RC_INVOKED) | |
| 928 | + | |
| 929 | +#define InterlockedIncrement _InterlockedIncrement | |
| 930 | +#define InterlockedIncrementAcquire InterlockedIncrement | |
| 931 | +#define InterlockedIncrementRelease InterlockedIncrement | |
| 932 | +#define InterlockedDecrement _InterlockedDecrement | |
| 933 | +#define InterlockedDecrementAcquire InterlockedDecrement | |
| 934 | +#define InterlockedDecrementRelease InterlockedDecrement | |
| 935 | +#define InterlockedExchange _InterlockedExchange | |
| 936 | +#define InterlockedExchangeAdd _InterlockedExchangeAdd | |
| 937 | +#define InterlockedCompareExchange _InterlockedCompareExchange | |
| 938 | +#define InterlockedCompareExchangeAcquire InterlockedCompareExchange | |
| 939 | +#define InterlockedCompareExchangeRelease InterlockedCompareExchange | |
| 940 | +#define InterlockedExchangePointer _InterlockedExchangePointer | |
| 941 | +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer | |
| 942 | +#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer | |
| 943 | +#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer | |
| 944 | +#define InterlockedAnd64 _InterlockedAnd64 | |
| 945 | +#define InterlockedOr64 _InterlockedOr64 | |
| 946 | +#define InterlockedXor64 _InterlockedXor64 | |
| 947 | +#define InterlockedIncrement64 _InterlockedIncrement64 | |
| 948 | +#define InterlockedDecrement64 _InterlockedDecrement64 | |
| 949 | +#define InterlockedExchange64 _InterlockedExchange64 | |
| 950 | +#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 | |
| 951 | +#define InterlockedCompareExchange64 _InterlockedCompareExchange64 | |
| 952 | +#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 | |
| 953 | +#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 | |
| 954 | + | |
| 955 | + LONG InterlockedIncrement(LONG volatile *Addend); | |
| 956 | + LONG InterlockedDecrement(LONG volatile *Addend); | |
| 957 | + LONG InterlockedExchange(LONG volatile *Target,LONG Value); | |
| 958 | + LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); | |
| 959 | + LONG InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand); | |
| 960 | + PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); | |
| 961 | + PVOID InterlockedExchangePointer(PVOID volatile *Target,PVOID Value); | |
| 962 | + LONG64 InterlockedAnd64(LONG64 volatile *Destination,LONG64 Value); | |
| 963 | + LONG64 InterlockedOr64(LONG64 volatile *Destination,LONG64 Value); | |
| 964 | + LONG64 InterlockedXor64(LONG64 volatile *Destination,LONG64 Value); | |
| 965 | + LONG64 InterlockedIncrement64(LONG64 volatile *Addend); | |
| 966 | + LONG64 InterlockedDecrement64(LONG64 volatile *Addend); | |
| 967 | + LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value); | |
| 968 | + LONG64 InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value); | |
| 969 | + LONG64 InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand); | |
| 970 | +#else | |
| 971 | + LONG InterlockedIncrement(LONG volatile *lpAddend); | |
| 972 | + LONG InterlockedDecrement(LONG volatile *lpAddend); | |
| 973 | + LONG InterlockedExchange(LONG volatile *Target,LONG Value); | |
| 974 | + | |
| 975 | +#define InterlockedExchangePointer(Target,Value) (PVOID)InterlockedExchange((PLONG)(Target),(LONG)(Value)) | |
| 976 | + | |
| 977 | + LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); | |
| 978 | + LONG InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange,LONG Comperand); | |
| 979 | + LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination,LONGLONG Exchange,LONGLONG Comperand); | |
| 980 | + | |
| 981 | + __CRT_INLINE LONGLONG InterlockedAnd64 (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 982 | + LONGLONG Old; | |
| 983 | + do { | |
| 984 | + Old = *Destination; | |
| 985 | + } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old); | |
| 986 | + return Old; | |
| 987 | + } | |
| 988 | + | |
| 989 | + __CRT_INLINE LONGLONG InterlockedOr64 (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 990 | + LONGLONG Old; | |
| 991 | + do { | |
| 992 | + Old = *Destination; | |
| 993 | + } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old); | |
| 994 | + return Old; | |
| 995 | + } | |
| 996 | + | |
| 997 | + __CRT_INLINE LONGLONG InterlockedXor64 (LONGLONG volatile *Destination,LONGLONG Value) { | |
| 998 | + LONGLONG Old; | |
| 999 | + do { | |
| 1000 | + Old = *Destination; | |
| 1001 | + } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old); | |
| 1002 | + | |
| 1003 | + return Old; | |
| 1004 | + } | |
| 1005 | + | |
| 1006 | + __CRT_INLINE LONGLONG InterlockedIncrement64(LONGLONG volatile *Addend) { | |
| 1007 | + LONGLONG Old; | |
| 1008 | + do { | |
| 1009 | + Old = *Addend; | |
| 1010 | + } while(InterlockedCompareExchange64(Addend,Old + 1,Old)!=Old); | |
| 1011 | + return Old + 1; | |
| 1012 | + } | |
| 1013 | + | |
| 1014 | + __CRT_INLINE LONGLONG InterlockedDecrement64(LONGLONG volatile *Addend) { | |
| 1015 | + LONGLONG Old; | |
| 1016 | + do { | |
| 1017 | + Old = *Addend; | |
| 1018 | + } while(InterlockedCompareExchange64(Addend,Old - 1,Old)!=Old); | |
| 1019 | + return Old - 1; | |
| 1020 | + } | |
| 1021 | + | |
| 1022 | + __CRT_INLINE LONGLONG InterlockedExchange64(LONGLONG volatile *Target,LONGLONG Value) { | |
| 1023 | + LONGLONG Old; | |
| 1024 | + do { | |
| 1025 | + Old = *Target; | |
| 1026 | + } while(InterlockedCompareExchange64(Target,Value,Old)!=Old); | |
| 1027 | + return Old; | |
| 1028 | + } | |
| 1029 | + | |
| 1030 | + __CRT_INLINE LONGLONG InterlockedExchangeAdd64(LONGLONG volatile *Addend,LONGLONG Value) { | |
| 1031 | + LONGLONG Old; | |
| 1032 | + do { | |
| 1033 | + Old = *Addend; | |
| 1034 | + } while(InterlockedCompareExchange64(Addend,Old + Value,Old)!=Old); | |
| 1035 | + return Old; | |
| 1036 | + } | |
| 1037 | + | |
| 1038 | +#ifdef __cplusplus | |
| 1039 | + __CRT_INLINE PVOID __cdecl __InlineInterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand) { | |
| 1040 | + return((PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)Destination,(LONG)(LONG_PTR)ExChange,(LONG)(LONG_PTR)Comperand)); | |
| 1041 | + } | |
| 1042 | +#define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer | |
| 927 | 1043 | #else |
| 928 | −int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPWSTR,int); | |
| 1044 | +#define InterlockedCompareExchangePointer(Destination,ExChange,Comperand)(PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)(Destination),(LONG)(LONG_PTR)(ExChange),(LONG)(LONG_PTR)(Comperand)) | |
| 929 | 1045 | #endif |
| 930 | −int APIENTRY wWinMain(HINSTANCE,HINSTANCE,LPWSTR,int); | |
| 931 | −long WINAPI _hread(HFILE,LPVOID,long); | |
| 932 | −long WINAPI _hwrite(HFILE,LPCSTR,long); | |
| 933 | −HFILE WINAPI _lclose(HFILE); | |
| 934 | −HFILE WINAPI _lcreat(LPCSTR,int); | |
| 935 | −LONG WINAPI _llseek(HFILE,LONG,int); | |
| 936 | −HFILE WINAPI _lopen(LPCSTR,int); | |
| 937 | −UINT WINAPI _lread(HFILE,LPVOID,UINT); | |
| 938 | −UINT WINAPI _lwrite(HFILE,LPCSTR,UINT); | |
| 939 | −#define AbnormalTermination() FALSE | |
| 940 | −BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,PDWORD,PDWORD,PBOOL); | |
| 941 | −BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL); | |
| 942 | −BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL); | |
| 943 | −BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID); | |
| 944 | −BOOL WINAPI AddAccessDeniedAce(PACL,DWORD,DWORD,PSID); | |
| 945 | −BOOL WINAPI AddAce(PACL,DWORD,DWORD,PVOID,DWORD); | |
| 946 | −ATOM WINAPI AddAtomA(LPCSTR); | |
| 947 | −ATOM WINAPI AddAtomW(LPCWSTR); | |
| 948 | −BOOL WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL); | |
| 949 | −BOOL WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD); | |
| 950 | −BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD); | |
| 951 | −BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID*); | |
| 952 | −BOOL WINAPI AllocateLocallyUniqueId(PLUID); | |
| 953 | −BOOL WINAPI AreAllAccessesGranted(DWORD,DWORD); | |
| 954 | −BOOL WINAPI AreAnyAccessesGranted(DWORD,DWORD); | |
| 955 | −BOOL WINAPI AreFileApisANSI(void); | |
| 956 | −BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR); | |
| 957 | −BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR); | |
| 958 | −BOOL WINAPI BackupRead(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID); | |
| 959 | −BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,PDWORD,PDWORD,PVOID); | |
| 960 | −BOOL WINAPI BackupWrite(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID); | |
| 961 | −BOOL WINAPI Beep(DWORD,DWORD); | |
| 962 | −HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL); | |
| 963 | −HANDLE WINAPI BeginUpdateResourceW(LPCWSTR,BOOL); | |
| 964 | −BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB); | |
| 965 | −BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB); | |
| 966 | −BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS); | |
| 967 | −BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS); | |
| 968 | −BOOL WINAPI CallNamedPipeA(LPCSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD); | |
| 969 | −BOOL WINAPI CallNamedPipeW(LPCWSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD); | |
| 970 | −BOOL WINAPI CancelIo(HANDLE); | |
| 971 | −BOOL WINAPI CancelWaitableTimer(HANDLE); | |
| 972 | −BOOL WINAPI ClearCommBreak(HANDLE); | |
| 973 | −BOOL WINAPI ClearCommError(HANDLE,PDWORD,LPCOMSTAT); | |
| 974 | −BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR); | |
| 975 | −BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR); | |
| 976 | −BOOL WINAPI CloseEventLog(HANDLE); | |
| 977 | −BOOL WINAPI CloseHandle(HANDLE); | |
| 978 | −BOOL WINAPI CommConfigDialogA(LPCSTR,HWND,LPCOMMCONFIG); | |
| 979 | −BOOL WINAPI CommConfigDialogW(LPCWSTR,HWND,LPCOMMCONFIG); | |
| 980 | −LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*); | |
| 981 | −BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED); | |
| 982 | −BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD); | |
| 983 | −PVOID WINAPI ConvertThreadToFiber(PVOID); | |
| 984 | −BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL); | |
| 985 | −BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL); | |
| 986 | −BOOL WINAPI CopyFileExA(LPCSTR,LPCSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD); | |
| 987 | −BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD); | |
| 988 | −#define RtlMoveMemory memmove | |
| 989 | −#define RtlCopyMemory memcpy | |
| 990 | −#define RtlFillMemory(d,l,f) memset((d), (f), (l)) | |
| 991 | −#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) | |
| 992 | −#define MoveMemory RtlMoveMemory | |
| 993 | −#define CopyMemory RtlCopyMemory | |
| 994 | −#define FillMemory RtlFillMemory | |
| 995 | −#define ZeroMemory RtlZeroMemory | |
| 996 | −BOOL WINAPI CopySid(DWORD,PSID,PSID); | |
| 997 | −BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES); | |
| 998 | −BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES); | |
| 999 | −BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES); | |
| 1000 | −BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES); | |
| 1001 | −HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR); | |
| 1002 | −HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR); | |
| 1003 | −LPVOID WINAPI CreateFiber(DWORD,LPFIBER_START_ROUTINE,LPVOID); | |
| 1004 | −HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE); | |
| 1005 | −HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE); | |
| 1006 | −HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR); | |
| 1007 | −HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR); | |
| 1008 | −HANDLE WINAPI CreateHardLinkA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES); | |
| 1009 | −HANDLE WINAPI CreateHardLinkW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES); | |
| 1010 | −HANDLE WINAPI CreateIoCompletionPort(HANDLE,HANDLE,DWORD,DWORD); | |
| 1011 | −HANDLE WINAPI CreateMailslotA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES); | |
| 1012 | −HANDLE WINAPI CreateMailslotW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES); | |
| 1013 | −HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR); | |
| 1014 | −HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR); | |
| 1015 | −HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES); | |
| 1016 | −HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES); | |
| 1017 | −BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD); | |
| 1018 | −BOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOL,HANDLE,PGENERIC_MAPPING); | |
| 1019 | −BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION); | |
| 1020 | −BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION); | |
| 1021 | −BOOL WINAPI CreateProcessAsUserA(HANDLE,LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION); | |
| 1022 | −BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION); | |
| 1023 | −HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); | |
| 1024 | −HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR); | |
| 1025 | −HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR); | |
| 1026 | −DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD); | |
| 1027 | −HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,PVOID,DWORD,PDWORD); | |
| 1028 | −HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR); | |
| 1029 | −HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR); | |
| 1030 | −BOOL WINAPI DebugActiveProcess(DWORD); | |
| 1031 | −void WINAPI DebugBreak(void); | |
| 1032 | −BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR); | |
| 1033 | −BOOL WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR); | |
| 1034 | −#define DefineHandleTable(w) ((w),TRUE) | |
| 1035 | −BOOL WINAPI DeleteAce(PACL,DWORD); | |
| 1036 | −ATOM WINAPI DeleteAtom(ATOM); | |
| 1037 | −void WINAPI DeleteCriticalSection(PCRITICAL_SECTION); | |
| 1038 | −void WINAPI DeleteFiber(PVOID); | |
| 1039 | −BOOL WINAPI DeleteFileA(LPCSTR); | |
| 1040 | −BOOL WINAPI DeleteFileW(LPCWSTR); | |
| 1041 | −BOOL WINAPI DeregisterEventSource(HANDLE); | |
| 1042 | −BOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR*); | |
| 1043 | −BOOL WINAPI DeviceIoControl(HANDLE,DWORD,PVOID,DWORD,PVOID,DWORD,PDWORD,POVERLAPPED); | |
| 1044 | −BOOL WINAPI DisableThreadLibraryCalls(HMODULE); | |
| 1045 | −BOOL WINAPI DisconnectNamedPipe(HANDLE); | |
| 1046 | −BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME); | |
| 1047 | −BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,PHANDLE,DWORD,BOOL,DWORD); | |
| 1048 | −BOOL WINAPI DuplicateToken(HANDLE,SECURITY_IMPERSONATION_LEVEL,PHANDLE); | |
| 1049 | −BOOL WINAPI DuplicateTokenEx(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE); | |
| 1050 | −BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL); | |
| 1051 | −BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL); | |
| 1052 | −void WINAPI EnterCriticalSection(LPCRITICAL_SECTION); | |
| 1053 | −BOOL WINAPI EnumResourceLanguagesA(HINSTANCE,LPCSTR,LPCSTR,ENUMRESLANGPROC,LONG); | |
| 1054 | −BOOL WINAPI EnumResourceLanguagesW(HINSTANCE,LPCWSTR,LPCWSTR,ENUMRESLANGPROC,LONG); | |
| 1055 | −BOOL WINAPI EnumResourceNamesA(HINSTANCE,LPCSTR,ENUMRESNAMEPROC,LONG); | |
| 1056 | −BOOL WINAPI EnumResourceNamesW(HINSTANCE,LPCWSTR,ENUMRESNAMEPROC,LONG); | |
| 1057 | −BOOL WINAPI EnumResourceTypesA(HINSTANCE,ENUMRESTYPEPROC,LONG); | |
| 1058 | −BOOL WINAPI EnumResourceTypesW(HINSTANCE,ENUMRESTYPEPROC,LONG); | |
| 1059 | −BOOL WINAPI EqualPrefixSid(PSID,PSID); | |
| 1060 | −BOOL WINAPI EqualSid(PSID,PSID); | |
| 1061 | −DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL); | |
| 1062 | −BOOL WINAPI EscapeCommFunction(HANDLE,DWORD); | |
| 1063 | −DECLSPEC_NORETURN void WINAPI ExitProcess(UINT); | |
| 1064 | −DECLSPEC_NORETURN void WINAPI ExitThread(DWORD); | |
| 1065 | −DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD); | |
| 1066 | −DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD); | |
| 1067 | −void WINAPI FatalAppExitA(UINT,LPCSTR); | |
| 1068 | −void WINAPI FatalAppExitW(UINT,LPCWSTR); | |
| 1069 | −void WINAPI FatalExit(int); | |
| 1070 | −BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,LPWORD,LPWORD); | |
| 1071 | −BOOL WINAPI FileTimeToLocalFileTime(FILETIME *,LPFILETIME); | |
| 1072 | −BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME); | |
| 1073 | −ATOM WINAPI FindAtomA(LPCSTR); | |
| 1074 | −ATOM WINAPI FindAtomW(LPCWSTR); | |
| 1075 | −BOOL WINAPI FindClose(HANDLE); | |
| 1076 | −BOOL WINAPI FindCloseChangeNotification(HANDLE); | |
| 1077 | −HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD); | |
| 1078 | −HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD); | |
| 1079 | −HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA); | |
| 1080 | −HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW); | |
| 1081 | −HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD); | |
| 1082 | −HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD); | |
| 1083 | −BOOL WINAPI FindFirstFreeAce(PACL,PVOID*); | |
| 1084 | −BOOL WINAPI FindNextChangeNotification(HANDLE); | |
| 1085 | −BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA); | |
| 1086 | −BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW); | |
| 1087 | −HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR); | |
| 1088 | −HRSRC WINAPI FindResourceW(HINSTANCE,LPCWSTR,LPCWSTR); | |
| 1089 | −HRSRC WINAPI FindResourceExA(HINSTANCE,LPCSTR,LPCSTR,WORD); | |
| 1090 | −HRSRC WINAPI FindResourceExW(HINSTANCE,LPCWSTR,LPCWSTR,WORD); | |
| 1091 | −BOOL WINAPI FlushFileBuffers(HANDLE); | |
| 1092 | −BOOL WINAPI FlushInstructionCache(HANDLE,PCVOID,DWORD); | |
| 1093 | −BOOL WINAPI FlushViewOfFile(PCVOID,DWORD); | |
| 1094 | −DWORD WINAPI FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*); | |
| 1095 | −DWORD WINAPI FormatMessageW(DWORD,PCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*); | |
| 1096 | −BOOL WINAPI FreeEnvironmentStringsA(LPSTR); | |
| 1097 | −BOOL WINAPI FreeEnvironmentStringsW(LPWSTR); | |
| 1098 | −BOOL WINAPI FreeLibrary(HMODULE); | |
| 1099 | −DECLSPEC_NORETURN void WINAPI FreeLibraryAndExitThread(HMODULE,DWORD); | |
| 1100 | −#define FreeModule(m) FreeLibrary(m) | |
| 1101 | −#define FreeProcInstance(p) (void)(p) | |
| 1102 | −#ifndef XFree86Server | |
| 1103 | −BOOL WINAPI FreeResource(HGLOBAL); | |
| 1104 | −#endif /* ndef XFree86Server */ | |
| 1105 | −PVOID WINAPI FreeSid(PSID); | |
| 1106 | −BOOL WINAPI GetAce(PACL,DWORD,PVOID); | |
| 1107 | −BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS); | |
| 1108 | −UINT WINAPI GetAtomNameA(ATOM,LPSTR,int); | |
| 1109 | −UINT WINAPI GetAtomNameW(ATOM,LPWSTR,int); | |
| 1110 | −BOOL WINAPI GetBinaryTypeA(LPCSTR,PDWORD); | |
| 1111 | −BOOL WINAPI GetBinaryTypeW(LPCWSTR,PDWORD); | |
| 1112 | −LPSTR WINAPI GetCommandLineA(VOID); | |
| 1113 | −LPWSTR WINAPI GetCommandLineW(VOID); | |
| 1114 | −BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,PDWORD); | |
| 1115 | −BOOL WINAPI GetCommMask(HANDLE,PDWORD); | |
| 1116 | −BOOL WINAPI GetCommModemStatus(HANDLE,PDWORD); | |
| 1117 | −BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP); | |
| 1118 | −BOOL WINAPI GetCommState(HANDLE,LPDCB); | |
| 1119 | −BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS); | |
| 1120 | −DWORD WINAPI GetCompressedFileSizeA(LPCSTR,PDWORD); | |
| 1121 | −DWORD WINAPI GetCompressedFileSizeW(LPCWSTR,PDWORD); | |
| 1122 | −BOOL WINAPI GetComputerNameA(LPSTR,PDWORD); | |
| 1123 | −BOOL WINAPI GetComputerNameW(LPWSTR,PDWORD); | |
| 1124 | −DWORD WINAPI GetCurrentDirectoryA(DWORD,LPSTR); | |
| 1125 | −DWORD WINAPI GetCurrentDirectoryW(DWORD,LPWSTR); | |
| 1126 | −BOOL WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA); | |
| 1127 | −BOOL WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW); | |
| 1128 | −HANDLE WINAPI GetCurrentProcess(void); | |
| 1129 | −DWORD WINAPI GetCurrentProcessId(void); | |
| 1130 | −HANDLE WINAPI GetCurrentThread(void); | |
| 1131 | −DWORD WINAPI GetCurrentThreadId(void); | |
| 1132 | −#define GetCurrentTime GetTickCount | |
| 1133 | −BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,PDWORD); | |
| 1134 | −BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,PDWORD); | |
| 1135 | −BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,PDWORD,PDWORD,PDWORD,PDWORD); | |
| 1136 | −BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,PDWORD,PDWORD,PDWORD,PDWORD); | |
| 1137 | −BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER); | |
| 1138 | −BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER); | |
| 1139 | −UINT WINAPI GetDriveTypeA(LPCSTR); | |
| 1140 | −UINT WINAPI GetDriveTypeW(LPCWSTR); | |
| 1141 | −LPSTR WINAPI GetEnvironmentStrings(void); | |
| 1142 | −LPSTR WINAPI GetEnvironmentStringsA(void); | |
| 1143 | −LPWSTR WINAPI GetEnvironmentStringsW(void); | |
| 1144 | −DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD); | |
| 1145 | −DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD); | |
| 1146 | −BOOL WINAPI GetExitCodeProcess(HANDLE,PDWORD); | |
| 1147 | −BOOL WINAPI GetExitCodeThread(HANDLE,PDWORD); | |
| 1148 | −DWORD WINAPI GetFileAttributesA(LPCSTR); | |
| 1149 | −DWORD WINAPI GetFileAttributesW(LPCWSTR); | |
| 1150 | −BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID); | |
| 1151 | −BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,PVOID); | |
| 1152 | −BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION); | |
| 1153 | −BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD); | |
| 1154 | −BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD); | |
| 1155 | −DWORD WINAPI GetFileSize(HANDLE,PDWORD); | |
| 1156 | −BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME); | |
| 1157 | −DWORD WINAPI GetFileType(HANDLE); | |
| 1158 | −#define GetFreeSpace(w) (0x100000L) | |
| 1159 | −DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*); | |
| 1160 | −DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*); | |
| 1161 | −BOOL WINAPI GetHandleInformation(HANDLE,PDWORD); | |
| 1162 | −BOOL WINAPI GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD); | |
| 1163 | −DWORD WINAPI GetLengthSid(PSID); | |
| 1164 | −void WINAPI GetLocalTime(LPSYSTEMTIME); | |
| 1165 | −DWORD WINAPI GetLogicalDrives(void); | |
| 1166 | −DWORD WINAPI GetLogicalDriveStringsA(DWORD,LPSTR); | |
| 1167 | −DWORD WINAPI GetLogicalDriveStringsW(DWORD,LPWSTR); | |
| 1168 | −DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD); | |
| 1169 | −DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD); | |
| 1170 | −BOOL WINAPI GetMailslotInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD); | |
| 1171 | −DWORD WINAPI GetModuleFileNameA(HINSTANCE,LPSTR,DWORD); | |
| 1172 | −DWORD WINAPI GetModuleFileNameW(HINSTANCE,LPWSTR,DWORD); | |
| 1173 | −HMODULE WINAPI GetModuleHandleA(LPCSTR); | |
| 1174 | −HMODULE WINAPI GetModuleHandleW(LPCWSTR); | |
| 1175 | −BOOL WINAPI GetNamedPipeHandleStateA(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD); | |
| 1176 | −BOOL WINAPI GetNamedPipeHandleStateW(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD); | |
| 1177 | −BOOL WINAPI GetNamedPipeInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD); | |
| 1178 | −BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD); | |
| 1179 | −BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD); | |
| 1180 | −BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,PDWORD,BOOL); | |
| 1181 | −DWORD WINAPI GetPriorityClass(HANDLE); | |
| 1182 | −BOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD); | |
| 1183 | −UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR); | |
| 1184 | −UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR); | |
| 1185 | −DWORD WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR); | |
| 1186 | −DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR); | |
| 1187 | −DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR); | |
| 1188 | −DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR); | |
| 1189 | −DWORD WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPCSTR); | |
| 1190 | −DWORD WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD,LPCWSTR); | |
| 1191 | −BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR); | |
| 1192 | −BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR); | |
| 1193 | −FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR); | |
| 1194 | −BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD); | |
| 1195 | −HANDLE WINAPI GetProcessHeap(VOID); | |
| 1196 | −DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE); | |
| 1197 | −BOOL WINAPI GetProcessPriorityBoost(HANDLE,PBOOL); | |
| 1198 | −BOOL WINAPI GetProcessShutdownParameters(PDWORD,PDWORD); | |
| 1199 | −BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME); | |
| 1200 | −DWORD WINAPI GetProcessVersion(DWORD); | |
| 1201 | −HWINSTA WINAPI GetProcessWindowStation(void); | |
| 1202 | −BOOL WINAPI GetProcessWorkingSetSize(HANDLE,PDWORD,PDWORD); | |
| 1203 | −UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT); | |
| 1204 | −UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT); | |
| 1205 | −DWORD WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD); | |
| 1206 | −DWORD WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD); | |
| 1207 | −DWORD WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD); | |
| 1208 | −DWORD WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD); | |
| 1209 | −BOOL WINAPI GetQueuedCompletionStatus(HANDLE,PDWORD,PDWORD,LPOVERLAPPED*,DWORD); | |
| 1210 | −BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,PDWORD); | |
| 1211 | −BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL); | |
| 1212 | −BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID*,LPBOOL); | |
| 1213 | −DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR); | |
| 1214 | −BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID*,LPBOOL); | |
| 1215 | −BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL); | |
| 1216 | −DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD); | |
| 1217 | −DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD); | |
| 1218 | −PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID); | |
| 1219 | −DWORD WINAPI GetSidLengthRequired(UCHAR); | |
| 1220 | −PDWORD WINAPI GetSidSubAuthority(PSID,DWORD); | |
| 1221 | −PUCHAR WINAPI GetSidSubAuthorityCount(PSID); | |
| 1222 | −VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA); | |
| 1223 | −VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW); | |
| 1224 | −HANDLE WINAPI GetStdHandle(DWORD); | |
| 1225 | −UINT WINAPI GetSystemDirectoryA(LPSTR,UINT); | |
| 1226 | −UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT); | |
| 1227 | −VOID WINAPI GetSystemInfo(LPSYSTEM_INFO); | |
| 1228 | −BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS); | |
| 1229 | −VOID WINAPI GetSystemTime(LPSYSTEMTIME); | |
| 1230 | −BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL); | |
| 1231 | −void WINAPI GetSystemTimeAsFileTime(LPFILETIME); | |
| 1232 | −DWORD WINAPI GetTapeParameters(HANDLE,DWORD,PDWORD,PVOID); | |
| 1233 | −DWORD WINAPI GetTapePosition(HANDLE,DWORD,PDWORD,PDWORD,PDWORD); | |
| 1234 | −DWORD WINAPI GetTapeStatus(HANDLE); | |
| 1235 | −UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR); | |
| 1236 | −UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR); | |
| 1237 | −DWORD WINAPI GetTempPathA(DWORD,LPSTR); | |
| 1238 | −DWORD WINAPI GetTempPathW(DWORD,LPWSTR); | |
| 1239 | −BOOL WINAPI GetThreadContext(HANDLE,LPCONTEXT); | |
| 1240 | −int WINAPI GetThreadPriority(HANDLE); | |
| 1241 | −BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL); | |
| 1242 | −BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY); | |
| 1243 | −BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME); | |
| 1244 | −DWORD WINAPI GetTickCount(void); | |
| 1245 | −DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION); | |
| 1246 | −BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD); | |
| 1247 | −BOOL WINAPI GetUserNameA (LPSTR,PDWORD); | |
| 1248 | −BOOL WINAPI GetUserNameW(LPWSTR,PDWORD); | |
| 1249 | −DWORD WINAPI GetVersion(void); | |
| 1250 | −BOOL WINAPI GetVersionExA(LPOSVERSIONINFOA); | |
| 1251 | −BOOL WINAPI GetVersionExW(LPOSVERSIONINFOW); | |
| 1252 | −BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD); | |
| 1253 | −BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD); | |
| 1254 | −UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT); | |
| 1255 | −UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT); | |
| 1256 | −DWORD WINAPI GetWindowThreadProcessId(HWND,PDWORD); | |
| 1257 | −ATOM WINAPI GlobalAddAtomA(LPCSTR); | |
| 1258 | −ATOM WINAPI GlobalAddAtomW( LPCWSTR); | |
| 1259 | −HGLOBAL WINAPI GlobalAlloc(UINT,DWORD); | |
| 1260 | −UINT WINAPI GlobalCompact(DWORD); | |
| 1261 | −ATOM WINAPI GlobalDeleteAtom(ATOM); | |
| 1262 | −HGLOBAL GlobalDiscard(HGLOBAL); | |
| 1263 | −ATOM WINAPI GlobalFindAtomA(LPCSTR); | |
| 1264 | −ATOM WINAPI GlobalFindAtomW(LPCWSTR); | |
| 1265 | −VOID WINAPI GlobalFix(HGLOBAL); | |
| 1266 | −UINT WINAPI GlobalFlags(HGLOBAL); | |
| 1267 | −HGLOBAL WINAPI GlobalFree(HGLOBAL); | |
| 1268 | −UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,int); | |
| 1269 | −UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,int); | |
| 1270 | −HGLOBAL WINAPI GlobalHandle(PCVOID); | |
| 1271 | −LPVOID WINAPI GlobalLock(HGLOBAL); | |
| 1272 | −VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS); | |
| 1273 | −HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT); | |
| 1274 | −DWORD WINAPI GlobalSize(HGLOBAL); | |
| 1275 | −VOID WINAPI GlobalUnfix(HGLOBAL); | |
| 1276 | −BOOL WINAPI GlobalUnlock(HGLOBAL); | |
| 1277 | −BOOL WINAPI GlobalUnWire(HGLOBAL); | |
| 1278 | −PVOID WINAPI GlobalWire(HGLOBAL); | |
| 1279 | −#define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING) | |
| 1280 | −PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD); | |
| 1281 | −UINT WINAPI HeapCompact(HANDLE,DWORD); | |
| 1282 | −HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD); | |
| 1283 | −BOOL WINAPI HeapDestroy(HANDLE); | |
| 1284 | −BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID); | |
| 1285 | −BOOL WINAPI HeapLock(HANDLE); | |
| 1286 | −PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD); | |
| 1287 | −DWORD WINAPI HeapSize(HANDLE,DWORD,PCVOID); | |
| 1288 | −BOOL WINAPI HeapUnlock(HANDLE); | |
| 1289 | −BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID); | |
| 1290 | −BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY); | |
| 1291 | −BOOL WINAPI ImpersonateLoggedOnUser(HANDLE); | |
| 1292 | −BOOL WINAPI ImpersonateNamedPipeClient(HANDLE); | |
| 1293 | −BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL); | |
| 1294 | −BOOL WINAPI InitAtomTable(DWORD); | |
| 1295 | −BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD); | |
| 1296 | −VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION); | |
| 1297 | −#if (_WIN32_WINNT >= 0x0403) /* Needs NT4, SP3 or later. */ | |
| 1298 | −BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD); | |
| 1299 | −DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD); | |
| 1046 | + | |
| 1047 | +#define InterlockedIncrementAcquire InterlockedIncrement | |
| 1048 | +#define InterlockedIncrementRelease InterlockedIncrement | |
| 1049 | +#define InterlockedDecrementAcquire InterlockedDecrement | |
| 1050 | +#define InterlockedDecrementRelease InterlockedDecrement | |
| 1051 | +#define InterlockedIncrementAcquire InterlockedIncrement | |
| 1052 | +#define InterlockedIncrementRelease InterlockedIncrement | |
| 1053 | +#define InterlockedCompareExchangeAcquire InterlockedCompareExchange | |
| 1054 | +#define InterlockedCompareExchangeRelease InterlockedCompareExchange | |
| 1055 | +#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 | |
| 1056 | +#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 | |
| 1057 | +#define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer | |
| 1058 | +#define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer | |
| 1300 | 1059 | #endif |
| 1301 | −BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD); | |
| 1302 | −BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE); | |
| 1303 | −LONG WINAPI InterlockedCompareExchange(LPLONG,LONG,LONG); | |
| 1304 | −/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */ | |
| 1305 | −#define InterlockedCompareExchangePointer(d,e,c) \ | |
| 1306 | − (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c)) | |
| 1307 | −LONG WINAPI InterlockedDecrement(LPLONG); | |
| 1308 | −LONG WINAPI InterlockedExchange(LPLONG,LONG); | |
| 1309 | −/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */ | |
| 1310 | −#define InterlockedExchangePointer(t,v) \ | |
| 1311 | − (PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v)) | |
| 1312 | −LONG WINAPI InterlockedExchangeAdd(PLONG,LONG); | |
| 1313 | −LONG WINAPI InterlockedIncrement(LPLONG); | |
| 1314 | −BOOL WINAPI IsBadCodePtr(FARPROC); | |
| 1315 | −BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT); | |
| 1316 | −BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT); | |
| 1317 | −BOOL WINAPI IsBadReadPtr(PCVOID,UINT); | |
| 1318 | −BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT); | |
| 1319 | −BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT); | |
| 1320 | −BOOL WINAPI IsBadWritePtr(PVOID,UINT); | |
| 1321 | −BOOL WINAPI IsDebuggerPresent(void); | |
| 1322 | −BOOL WINAPI IsProcessorFeaturePresent(DWORD); | |
| 1323 | −BOOL WINAPI IsTextUnicode(PCVOID,int,LPINT); | |
| 1324 | −BOOL WINAPI IsValidAcl(PACL); | |
| 1325 | −BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR); | |
| 1326 | −BOOL WINAPI IsValidSid(PSID); | |
| 1327 | −void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION); | |
| 1328 | −#define LimitEmsPages(n) | |
| 1329 | −HINSTANCE WINAPI LoadLibraryA(LPCSTR); | |
| 1330 | −HINSTANCE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD); | |
| 1331 | −HINSTANCE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD); | |
| 1332 | −HINSTANCE WINAPI LoadLibraryW(LPCWSTR); | |
| 1333 | −DWORD WINAPI LoadModule(LPCSTR,PVOID); | |
| 1334 | −HGLOBAL WINAPI LoadResource(HINSTANCE,HRSRC); | |
| 1335 | −HLOCAL WINAPI LocalAlloc(UINT,UINT); | |
| 1336 | −UINT WINAPI LocalCompact(UINT); | |
| 1337 | −HLOCAL LocalDiscard(HLOCAL); | |
| 1338 | −BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,LPFILETIME); | |
| 1339 | −UINT WINAPI LocalFlags(HLOCAL); | |
| 1340 | −HLOCAL WINAPI LocalFree(HLOCAL); | |
| 1341 | −HLOCAL WINAPI LocalHandle(LPCVOID); | |
| 1342 | −PVOID WINAPI LocalLock(HLOCAL); | |
| 1343 | −HLOCAL WINAPI LocalReAlloc(HLOCAL,UINT,UINT); | |
| 1344 | −UINT WINAPI LocalShrink(HLOCAL,UINT); | |
| 1345 | −UINT WINAPI LocalSize(HLOCAL); | |
| 1346 | −BOOL WINAPI LocalUnlock(HLOCAL); | |
| 1347 | −BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD); | |
| 1348 | −BOOL WINAPI LockFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPOVERLAPPED); | |
| 1349 | −PVOID WINAPI LockResource(HGLOBAL); | |
| 1350 | −#define LockSegment(w) GlobalFix((HANDLE)(w)) | |
| 1351 | −BOOL WINAPI LogonUserA(LPSTR,LPSTR,LPSTR,DWORD,DWORD,PHANDLE); | |
| 1352 | −BOOL WINAPI LogonUserW(LPWSTR,LPWSTR,LPWSTR,DWORD,DWORD,PHANDLE); | |
| 1353 | −BOOL WINAPI LookupAccountNameA(LPCSTR,LPCSTR,PSID,PDWORD,LPSTR,PDWORD,PSID_NAME_USE); | |
| 1354 | −BOOL WINAPI LookupAccountNameW(LPCWSTR,LPCWSTR,PSID,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE); | |
| 1355 | −BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,PDWORD,LPSTR,PDWORD,PSID_NAME_USE); | |
| 1356 | −BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE); | |
| 1357 | −BOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR,LPCSTR,LPSTR,PDWORD,PDWORD); | |
| 1358 | −BOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR,LPCWSTR,LPWSTR,PDWORD,PDWORD); | |
| 1359 | −BOOL WINAPI LookupPrivilegeNameA(LPCSTR,PLUID,LPSTR,PDWORD); | |
| 1360 | −BOOL WINAPI LookupPrivilegeNameW(LPCWSTR,PLUID,LPWSTR,PDWORD); | |
| 1361 | −BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID); | |
| 1362 | −BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID); | |
| 1363 | −LPSTR WINAPI lstrcatA(LPSTR,LPCSTR); | |
| 1364 | −LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR); | |
| 1365 | −int WINAPI lstrcmpA(LPCSTR,LPCSTR); | |
| 1366 | −int WINAPI lstrcmpiA(LPCSTR,LPCSTR); | |
| 1367 | −int WINAPI lstrcmpiW( LPCWSTR,LPCWSTR); | |
| 1368 | −int WINAPI lstrcmpW(LPCWSTR,LPCWSTR); | |
| 1369 | −LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR); | |
| 1370 | −LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,int); | |
| 1371 | −LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,int); | |
| 1372 | −LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR); | |
| 1373 | −int WINAPI lstrlenA(LPCSTR); | |
| 1374 | −int WINAPI lstrlenW(LPCWSTR); | |
| 1375 | −BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD); | |
| 1376 | −#define MakeProcInstance(p,i) (p) | |
| 1377 | −BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD); | |
| 1378 | −VOID WINAPI MapGenericMask(PDWORD,PGENERIC_MAPPING); | |
| 1379 | −PVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD); | |
| 1380 | −PVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,PVOID); | |
| 1381 | −BOOL WINAPI MoveFileA(LPCSTR,LPCSTR); | |
| 1382 | −BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD); | |
| 1383 | −BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD); | |
| 1384 | −BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR); | |
| 1385 | −int WINAPI MulDiv(int,int,int); | |
| 1386 | −BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE); | |
| 1387 | −BOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR,PVOID,BOOL); | |
| 1388 | −BOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR,PVOID,BOOL); | |
| 1389 | −BOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR,PVOID,BOOL); | |
| 1390 | −BOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR,PVOID,BOOL); | |
| 1391 | −BOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR,PVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL); | |
| 1392 | −BOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR,PVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL); | |
| 1393 | −BOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL); | |
| 1394 | −BOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL); | |
| 1395 | −HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR); | |
| 1396 | −HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR); | |
| 1397 | −HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR); | |
| 1398 | −HANDLE WINAPI OpenEventLogA (LPCSTR,LPCSTR); | |
| 1399 | −HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR); | |
| 1400 | −HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR); | |
| 1401 | −HFILE WINAPI OpenFile(LPCSTR,LPOFSTRUCT,UINT); | |
| 1402 | −HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR); | |
| 1403 | −HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR); | |
| 1404 | −HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR); | |
| 1405 | −HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR); | |
| 1406 | −HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD); | |
| 1407 | −BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE); | |
| 1408 | −HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR); | |
| 1409 | −HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR); | |
| 1410 | −BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE); | |
| 1411 | −HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR); | |
| 1412 | −HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR); | |
| 1413 | −void WINAPI OutputDebugStringA(LPCSTR); | |
| 1414 | −void WINAPI OutputDebugStringW(LPCWSTR); | |
| 1415 | −BOOL WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD); | |
| 1416 | −BOOL WINAPI PostQueuedCompletionStatus(HANDLE,DWORD,DWORD,LPOVERLAPPED); | |
| 1417 | −DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL); | |
| 1418 | −BOOL WINAPI PrivilegeCheck (HANDLE,PPRIVILEGE_SET,PBOOL); | |
| 1419 | −BOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR,LPCSTR,HANDLE,PPRIVILEGE_SET,BOOL); | |
| 1420 | −BOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR,LPCWSTR,HANDLE,PPRIVILEGE_SET,BOOL); | |
| 1421 | −BOOL WINAPI PulseEvent(HANDLE); | |
| 1422 | −BOOL WINAPI PurgeComm(HANDLE,DWORD); | |
| 1423 | −DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD); | |
| 1424 | −DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD); | |
| 1425 | −BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER); | |
| 1426 | −BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER); | |
| 1427 | −DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,DWORD); | |
| 1428 | −void WINAPI RaiseException(DWORD,DWORD,DWORD,const DWORD*); | |
| 1429 | −BOOL WINAPI ReadDirectoryChangesW(HANDLE,PVOID,DWORD,BOOL,DWORD,PDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); | |
| 1430 | −BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *); | |
| 1431 | −BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *); | |
| 1432 | −BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED); | |
| 1433 | −BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); | |
| 1434 | −BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,DWORD,PDWORD); | |
| 1435 | −HANDLE WINAPI RegisterEventSourceA (LPCSTR,LPCSTR); | |
| 1436 | −HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR); | |
| 1437 | −BOOL WINAPI ReleaseMutex(HANDLE); | |
| 1438 | −BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG); | |
| 1439 | −BOOL WINAPI RemoveDirectoryA(LPCSTR); | |
| 1440 | −BOOL WINAPI RemoveDirectoryW(LPCWSTR); | |
| 1441 | −BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR*,PVOID); | |
| 1442 | −BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR*,PVOID); | |
| 1443 | −BOOL WINAPI ResetEvent(HANDLE); | |
| 1444 | −DWORD WINAPI ResumeThread(HANDLE); | |
| 1445 | −BOOL WINAPI RevertToSelf(void); | |
| 1446 | −DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*); | |
| 1447 | −DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*); | |
| 1448 | −BOOL WINAPI SetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS); | |
| 1449 | −BOOL WINAPI SetCommBreak(HANDLE); | |
| 1450 | −BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD); | |
| 1451 | −BOOL WINAPI SetCommMask(HANDLE,DWORD); | |
| 1452 | −BOOL WINAPI SetCommState(HANDLE,LPDCB); | |
| 1453 | −BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS); | |
| 1454 | −BOOL WINAPI SetComputerNameA(LPCSTR); | |
| 1455 | −BOOL WINAPI SetComputerNameW(LPCWSTR); | |
| 1456 | −BOOL WINAPI SetCurrentDirectoryA(LPCSTR); | |
| 1457 | −BOOL WINAPI SetCurrentDirectoryW(LPCWSTR); | |
| 1458 | −BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD); | |
| 1459 | −BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD); | |
| 1460 | −BOOL WINAPI SetEndOfFile(HANDLE); | |
| 1461 | −BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR); | |
| 1462 | −BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR); | |
| 1463 | −UINT WINAPI SetErrorMode(UINT); | |
| 1464 | −BOOL WINAPI SetEvent(HANDLE); | |
| 1465 | −VOID WINAPI SetFileApisToANSI(void); | |
| 1466 | −VOID WINAPI SetFileApisToOEM(void); | |
| 1467 | −BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD); | |
| 1468 | −BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD); | |
| 1469 | −DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD); | |
| 1470 | −BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); | |
| 1471 | −BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); | |
| 1472 | −BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*); | |
| 1473 | −UINT WINAPI SetHandleCount(UINT); | |
| 1474 | −BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD); | |
| 1475 | −BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); | |
| 1476 | −void WINAPI SetLastError(DWORD); | |
| 1477 | −void WINAPI SetLastErrorEx(DWORD,DWORD); | |
| 1478 | −BOOL WINAPI SetLocalTime(const SYSTEMTIME*); | |
| 1479 | −BOOL WINAPI SetMailslotInfo(HANDLE,DWORD); | |
| 1480 | −BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD); | |
| 1481 | −BOOL WINAPI SetPriorityClass(HANDLE,DWORD); | |
| 1482 | −BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE); | |
| 1483 | −BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD); | |
| 1484 | −BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL); | |
| 1485 | −BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD); | |
| 1486 | −BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD); | |
| 1487 | −BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL); | |
| 1488 | −BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL); | |
| 1489 | −BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL); | |
| 1490 | −BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL); | |
| 1491 | −BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL); | |
| 1492 | −BOOL WINAPI SetStdHandle(DWORD,HANDLE); | |
| 1493 | −#define SetSwapAreaSize(w) (w) | |
| 1494 | −BOOL WINAPI SetSystemPowerState(BOOL,BOOL); | |
| 1495 | −BOOL WINAPI SetSystemTime(const SYSTEMTIME*); | |
| 1496 | −BOOL WINAPI SetSystemTimeAdjustment(DWORD,BOOL); | |
| 1497 | −DWORD WINAPI SetTapeParameters(HANDLE,DWORD,PVOID); | |
| 1498 | −DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL); | |
| 1499 | −DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD); | |
| 1500 | −BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT*); | |
| 1501 | −DWORD WINAPI SetThreadIdealProcessor(HANDLE,DWORD); | |
| 1502 | −BOOL WINAPI SetThreadPriority(HANDLE,int); | |
| 1503 | −BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL); | |
| 1504 | −BOOL WINAPI SetThreadToken (PHANDLE,HANDLE); | |
| 1505 | −BOOL WINAPI SetTimeZoneInformation(const TIME_ZONE_INFORMATION *); | |
| 1506 | −BOOL WINAPI SetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD); | |
| 1507 | −LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER); | |
| 1508 | −BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD); | |
| 1509 | −BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR); | |
| 1510 | −BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR); | |
| 1511 | −BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,PVOID,BOOL); | |
| 1512 | −BOOL WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL); | |
| 1513 | −DWORD WINAPI SizeofResource(HINSTANCE,HRSRC); | |
| 1514 | −void WINAPI Sleep(DWORD); | |
| 1515 | −DWORD WINAPI SleepEx(DWORD,BOOL); | |
| 1516 | −DWORD WINAPI SuspendThread(HANDLE); | |
| 1517 | −void WINAPI SwitchToFiber(PVOID); | |
| 1518 | −BOOL WINAPI SwitchToThread(void); | |
| 1519 | −BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME); | |
| 1520 | −BOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME); | |
| 1521 | −BOOL WINAPI TerminateProcess(HANDLE,UINT); | |
| 1522 | −BOOL WINAPI TerminateThread(HANDLE,DWORD); | |
| 1523 | −DWORD WINAPI TlsAlloc(VOID); | |
| 1524 | −BOOL WINAPI TlsFree(DWORD); | |
| 1525 | −PVOID WINAPI TlsGetValue(DWORD); | |
| 1526 | −BOOL WINAPI TlsSetValue(DWORD,PVOID); | |
| 1527 | −BOOL WINAPI TransactNamedPipe(HANDLE,PVOID,DWORD,PVOID,DWORD,PDWORD,LPOVERLAPPED); | |
| 1528 | −BOOL WINAPI TransmitCommChar(HANDLE,char); | |
| 1529 | −BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION); | |
| 1530 | −LONG WINAPI UnhandledExceptionFilter(LPEXCEPTION_POINTERS); | |
| 1531 | −BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD); | |
| 1532 | −BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED); | |
| 1533 | −#define UnlockResource(h) (h) | |
| 1534 | −#define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) | |
| 1535 | −BOOL WINAPI UnmapViewOfFile(PVOID); | |
| 1536 | −BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,PVOID,DWORD); | |
| 1537 | −BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,PVOID,DWORD); | |
| 1538 | −BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG); | |
| 1539 | −BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG); | |
| 1540 | −PVOID WINAPI VirtualAlloc(PVOID,DWORD,DWORD,DWORD); | |
| 1541 | −PVOID WINAPI VirtualAllocEx(HANDLE,PVOID,DWORD,DWORD,DWORD); | |
| 1542 | −BOOL WINAPI VirtualFree(PVOID,DWORD,DWORD); | |
| 1543 | −BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,DWORD,DWORD); | |
| 1544 | −BOOL WINAPI VirtualLock(PVOID,DWORD); | |
| 1545 | −BOOL WINAPI VirtualProtect(PVOID,DWORD,DWORD,PDWORD); | |
| 1546 | −BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,DWORD,DWORD,PDWORD); | |
| 1547 | −DWORD WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD); | |
| 1548 | −DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD); | |
| 1549 | −BOOL WINAPI VirtualUnlock(PVOID,DWORD); | |
| 1550 | −BOOL WINAPI WaitCommEvent(HANDLE,PDWORD,LPOVERLAPPED); | |
| 1551 | −BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD); | |
| 1552 | −DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD); | |
| 1553 | −DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL); | |
| 1554 | −DWORD WINAPI WaitForSingleObject(HANDLE,DWORD); | |
| 1555 | −DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL); | |
| 1556 | −BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD); | |
| 1557 | −BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD); | |
| 1558 | −BOOL WINAPI WinLoadTrustProvider(GUID*); | |
| 1559 | −BOOL WINAPI WriteFile(HANDLE,PCVOID,DWORD,PDWORD,LPOVERLAPPED); | |
| 1560 | −BOOL WINAPI WriteFileEx(HANDLE,PCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); | |
| 1561 | −BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR); | |
| 1562 | −BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR); | |
| 1563 | −BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR); | |
| 1564 | −BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR); | |
| 1565 | −BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR); | |
| 1566 | −BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR); | |
| 1567 | −BOOL WINAPI WriteProcessMemory(HANDLE,PVOID,PVOID,DWORD,PDWORD); | |
| 1568 | −BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR); | |
| 1569 | −BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR); | |
| 1570 | −BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR); | |
| 1571 | −BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR); | |
| 1572 | −DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL); | |
| 1573 | −#define Yield() | |
| 1060 | + | |
| 1061 | +#if defined(_SLIST_HEADER_) && !defined(_NTOSP_) | |
| 1062 | + WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER ListHead); | |
| 1063 | + WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER ListHead); | |
| 1064 | + WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER ListHead,PSLIST_ENTRY ListEntry); | |
| 1065 | + WINBASEAPI PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER ListHead); | |
| 1066 | + WINBASEAPI USHORT WINAPI QueryDepthSList(PSLIST_HEADER ListHead); | |
| 1067 | +#endif | |
| 1068 | +#endif | |
| 1069 | +#endif | |
| 1070 | + | |
| 1071 | + WINBASEAPI WINBOOL WINAPI FreeResource(HGLOBAL hResData); | |
| 1072 | + WINBASEAPI LPVOID WINAPI LockResource(HGLOBAL hResData); | |
| 1073 | + | |
| 1074 | +#define UnlockResource(hResData) ((hResData),0) | |
| 1075 | +#define MAXINTATOM 0xC000 | |
| 1076 | +#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i))) | |
| 1077 | +#define INVALID_ATOM ((ATOM)0) | |
| 1078 | + | |
| 1079 | + int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd); | |
| 1080 | + WINBASEAPI WINBOOL WINAPI FreeLibrary(HMODULE hLibModule); | |
| 1081 | + WINBASEAPI DECLSPEC_NORETURN VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule,DWORD dwExitCode); | |
| 1082 | + WINBASEAPI WINBOOL WINAPI DisableThreadLibraryCalls(HMODULE hLibModule); | |
| 1083 | + WINBASEAPI FARPROC WINAPI GetProcAddress(HMODULE hModule,LPCSTR lpProcName); | |
| 1084 | + WINBASEAPI DWORD WINAPI GetVersion(VOID); | |
| 1085 | + WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT uFlags,SIZE_T dwBytes); | |
| 1086 | + WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL hMem,SIZE_T dwBytes,UINT uFlags); | |
| 1087 | + WINBASEAPI SIZE_T WINAPI GlobalSize(HGLOBAL hMem); | |
| 1088 | + WINBASEAPI UINT WINAPI GlobalFlags(HGLOBAL hMem); | |
| 1089 | + WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL hMem); | |
| 1090 | + WINBASEAPI HGLOBAL WINAPI GlobalHandle(LPCVOID pMem); | |
| 1091 | + WINBASEAPI WINBOOL WINAPI GlobalUnlock(HGLOBAL hMem); | |
| 1092 | + WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL hMem); | |
| 1093 | + WINBASEAPI SIZE_T WINAPI GlobalCompact(DWORD dwMinFree); | |
| 1094 | + WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL hMem); | |
| 1095 | + WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL hMem); | |
| 1096 | + WINBASEAPI LPVOID WINAPI GlobalWire(HGLOBAL hMem); | |
| 1097 | + WINBASEAPI WINBOOL WINAPI GlobalUnWire(HGLOBAL hMem); | |
| 1098 | + WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer); | |
| 1099 | + | |
| 1100 | + typedef struct _MEMORYSTATUSEX { | |
| 1101 | + DWORD dwLength; | |
| 1102 | + DWORD dwMemoryLoad; | |
| 1103 | + DWORDLONG ullTotalPhys; | |
| 1104 | + DWORDLONG ullAvailPhys; | |
| 1105 | + DWORDLONG ullTotalPageFile; | |
| 1106 | + DWORDLONG ullAvailPageFile; | |
| 1107 | + DWORDLONG ullTotalVirtual; | |
| 1108 | + DWORDLONG ullAvailVirtual; | |
| 1109 | + DWORDLONG ullAvailExtendedVirtual; | |
| 1110 | + } MEMORYSTATUSEX,*LPMEMORYSTATUSEX; | |
| 1111 | + | |
| 1112 | + WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer); | |
| 1113 | + WINBASEAPI HLOCAL WINAPI LocalAlloc(UINT uFlags,SIZE_T uBytes); | |
| 1114 | + WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL hMem,SIZE_T uBytes,UINT uFlags); | |
| 1115 | + WINBASEAPI LPVOID WINAPI LocalLock(HLOCAL hMem); | |
| 1116 | + WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID pMem); | |
| 1117 | + WINBASEAPI WINBOOL WINAPI LocalUnlock(HLOCAL hMem); | |
| 1118 | + WINBASEAPI SIZE_T WINAPI LocalSize(HLOCAL hMem); | |
| 1119 | + WINBASEAPI UINT WINAPI LocalFlags(HLOCAL hMem); | |
| 1120 | + WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL hMem); | |
| 1121 | + WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL hMem,UINT cbNewSize); | |
| 1122 | + WINBASEAPI SIZE_T WINAPI LocalCompact(UINT uMinFree); | |
| 1123 | + WINBASEAPI WINBOOL WINAPI FlushInstructionCache(HANDLE hProcess,LPCVOID lpBaseAddress,SIZE_T dwSize); | |
| 1124 | + WINBASEAPI LPVOID WINAPI VirtualAlloc(LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect); | |
| 1125 | + WINBASEAPI WINBOOL WINAPI VirtualFree(LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType); | |
| 1126 | + WINBASEAPI WINBOOL WINAPI VirtualProtect(LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect); | |
| 1127 | + WINBASEAPI SIZE_T WINAPI VirtualQuery(LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength); | |
| 1128 | + WINBASEAPI LPVOID WINAPI VirtualAllocEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect); | |
| 1129 | + WINBASEAPI UINT WINAPI GetWriteWatch(DWORD dwFlags,PVOID lpBaseAddress,SIZE_T dwRegionSize,PVOID *lpAddresses,ULONG_PTR *lpdwCount,PULONG lpdwGranularity); | |
| 1130 | + WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID lpBaseAddress,SIZE_T dwRegionSize); | |
| 1131 | + WINBASEAPI SIZE_T WINAPI GetLargePageMinimum(VOID); | |
| 1132 | + WINBASEAPI UINT WINAPI EnumSystemFirmwareTables(DWORD FirmwareTableProviderSignature,PVOID pFirmwareTableEnumBuffer,DWORD BufferSize); | |
| 1133 | + WINBASEAPI UINT WINAPI GetSystemFirmwareTable(DWORD FirmwareTableProviderSignature,DWORD FirmwareTableID,PVOID pFirmwareTableBuffer,DWORD BufferSize); | |
| 1134 | + WINBASEAPI WINBOOL WINAPI VirtualFreeEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType); | |
| 1135 | + WINBASEAPI WINBOOL WINAPI VirtualProtectEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect); | |
| 1136 | + WINBASEAPI SIZE_T WINAPI VirtualQueryEx(HANDLE hProcess,LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength); | |
| 1137 | + WINBASEAPI HANDLE WINAPI HeapCreate(DWORD flOptions,SIZE_T dwInitialSize,SIZE_T dwMaximumSize); | |
| 1138 | + WINBASEAPI WINBOOL WINAPI HeapDestroy(HANDLE hHeap); | |
| 1139 | + WINBASEAPI LPVOID WINAPI HeapAlloc(HANDLE hHeap,DWORD dwFlags,SIZE_T dwBytes); | |
| 1140 | + WINBASEAPI LPVOID WINAPI HeapReAlloc(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem,SIZE_T dwBytes); | |
| 1141 | + WINBASEAPI WINBOOL WINAPI HeapFree(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem); | |
| 1142 | + WINBASEAPI SIZE_T WINAPI HeapSize(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem); | |
| 1143 | + WINBASEAPI WINBOOL WINAPI HeapValidate(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem); | |
| 1144 | + WINBASEAPI SIZE_T WINAPI HeapCompact(HANDLE hHeap,DWORD dwFlags); | |
| 1145 | + WINBASEAPI HANDLE WINAPI GetProcessHeap(VOID); | |
| 1146 | + WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD NumberOfHeaps,PHANDLE ProcessHeaps); | |
| 1147 | + | |
| 1148 | + typedef struct _PROCESS_HEAP_ENTRY { | |
| 1149 | + PVOID lpData; | |
| 1150 | + DWORD cbData; | |
| 1151 | + BYTE cbOverhead; | |
| 1152 | + BYTE iRegionIndex; | |
| 1153 | + WORD wFlags; | |
| 1154 | + union { | |
| 1155 | + struct { | |
| 1156 | + HANDLE hMem; | |
| 1157 | + DWORD dwReserved[3]; | |
| 1158 | + } Block; | |
| 1159 | + struct { | |
| 1160 | + DWORD dwCommittedSize; | |
| 1161 | + DWORD dwUnCommittedSize; | |
| 1162 | + LPVOID lpFirstBlock; | |
| 1163 | + LPVOID lpLastBlock; | |
| 1164 | + } Region; | |
| 1165 | + }; | |
| 1166 | + } PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY,*PPROCESS_HEAP_ENTRY; | |
| 1167 | + | |
| 1168 | +#define PROCESS_HEAP_REGION 0x1 | |
| 1169 | +#define PROCESS_HEAP_UNCOMMITTED_RANGE 0x2 | |
| 1170 | +#define PROCESS_HEAP_ENTRY_BUSY 0x4 | |
| 1171 | +#define PROCESS_HEAP_ENTRY_MOVEABLE 0x10 | |
| 1172 | +#define PROCESS_HEAP_ENTRY_DDESHARE 0x20 | |
| 1173 | + | |
| 1174 | + WINBASEAPI WINBOOL WINAPI HeapLock(HANDLE hHeap); | |
| 1175 | + WINBASEAPI WINBOOL WINAPI HeapUnlock(HANDLE hHeap); | |
| 1176 | + WINBASEAPI WINBOOL WINAPI HeapWalk(HANDLE hHeap,LPPROCESS_HEAP_ENTRY lpEntry); | |
| 1177 | + WINBASEAPI WINBOOL WINAPI HeapSetInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength); | |
| 1178 | + WINBASEAPI WINBOOL WINAPI HeapQueryInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength); | |
| 1179 | + | |
| 1180 | +#define SCS_32BIT_BINARY 0 | |
| 1181 | +#define SCS_DOS_BINARY 1 | |
| 1182 | +#define SCS_WOW_BINARY 2 | |
| 1183 | +#define SCS_PIF_BINARY 3 | |
| 1184 | +#define SCS_POSIX_BINARY 4 | |
| 1185 | +#define SCS_OS216_BINARY 5 | |
| 1186 | +#define SCS_64BIT_BINARY 6 | |
| 1187 | + | |
| 1188 | +#ifdef UNICODE | |
| 1189 | +#define GetBinaryType GetBinaryTypeW | |
| 1190 | +#define GetShortPathName GetShortPathNameW | |
| 1191 | +#define GetLongPathName GetLongPathNameW | |
| 1192 | +#define GetEnvironmentStrings GetEnvironmentStringsW | |
| 1193 | +#define SetEnvironmentStrings SetEnvironmentStringsW | |
| 1194 | +#define FreeEnvironmentStrings FreeEnvironmentStringsW | |
| 1195 | +#else | |
| 1196 | +#define GetBinaryType GetBinaryTypeA | |
| 1197 | +#define GetShortPathName GetShortPathNameA | |
| 1198 | +#define GetLongPathName GetLongPathNameA | |
| 1199 | +#define GetEnvironmentStringsA GetEnvironmentStrings | |
| 1200 | +#define SetEnvironmentStrings SetEnvironmentStringsA | |
| 1201 | +#define FreeEnvironmentStrings FreeEnvironmentStringsA | |
| 1202 | +#endif | |
| 1203 | + | |
| 1204 | +#ifdef _WIN64 | |
| 1205 | +#define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY | |
| 1206 | +#else | |
| 1207 | +#define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY | |
| 1208 | +#endif | |
| 1209 | + | |
| 1210 | + WINBASEAPI WINBOOL WINAPI GetBinaryTypeA(LPCSTR lpApplicationName,LPDWORD lpBinaryType); | |
| 1211 | + WINBASEAPI WINBOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName,LPDWORD lpBinaryType); | |
| 1212 | + WINBASEAPI DWORD WINAPI GetShortPathNameA(LPCSTR lpszLongPath,LPSTR lpszShortPath,DWORD cchBuffer); | |
| 1213 | + WINBASEAPI DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer); | |
| 1214 | + WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR lpszShortPath,LPSTR lpszLongPath,DWORD cchBuffer); | |
| 1215 | + WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR lpszShortPath,LPWSTR lpszLongPath,DWORD cchBuffer); | |
| 1216 | + WINBASEAPI WINBOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask); | |
| 1217 | + WINBASEAPI WINBOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProcessAffinityMask); | |
| 1218 | + WINBASEAPI WINBOOL WINAPI GetProcessHandleCount(HANDLE hProcess,PDWORD pdwHandleCount); | |
| 1219 | + WINBASEAPI WINBOOL WINAPI GetProcessTimes(HANDLE hProcess,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); | |
| 1220 | + WINBASEAPI WINBOOL WINAPI GetProcessIoCounters(HANDLE hProcess,PIO_COUNTERS lpIoCounters); | |
| 1221 | + WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize); | |
| 1222 | + WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSizeEx(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize,PDWORD Flags); | |
| 1223 | + WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize); | |
| 1224 | + WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize,DWORD Flags); | |
| 1225 | + WINBASEAPI HANDLE WINAPI OpenProcess(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwProcessId); | |
| 1226 | + WINBASEAPI HANDLE WINAPI GetCurrentProcess(VOID); | |
| 1227 | + WINBASEAPI DWORD WINAPI GetCurrentProcessId(VOID); | |
| 1228 | + WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitProcess(UINT uExitCode); | |
| 1229 | + WINBASEAPI WINBOOL WINAPI TerminateProcess(HANDLE hProcess,UINT uExitCode); | |
| 1230 | + WINBASEAPI WINBOOL WINAPI GetExitCodeProcess(HANDLE hProcess,LPDWORD lpExitCode); | |
| 1231 | + WINBASEAPI VOID WINAPI FatalExit(int ExitCode); | |
| 1232 | + /* WINBASEAPI LPCH WINAPI GetEnvironmentStrings(VOID); */ | |
| 1233 | + WINBASEAPI LPWCH WINAPI GetEnvironmentStringsW(VOID); | |
| 1234 | + WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsA(LPCH NewEnvironment); | |
| 1235 | + WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsW(LPWCH NewEnvironment); | |
| 1236 | + WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA(LPCH); | |
| 1237 | + WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsW(LPWCH); | |
| 1238 | + WINBASEAPI VOID WINAPI RaiseException(DWORD dwExceptionCode,DWORD dwExceptionFlags,DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments); | |
| 1239 | + WINBASEAPI LONG WINAPI UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo); | |
| 1240 | + | |
| 1241 | + typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *ExceptionInfo); | |
| 1242 | + typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; | |
| 1243 | + | |
| 1244 | + WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); | |
| 1245 | + | |
| 1246 | +#define FIBER_FLAG_FLOAT_SWITCH 0x1 | |
| 1247 | + | |
| 1248 | + WINBASEAPI LPVOID WINAPI CreateFiber(SIZE_T dwStackSize,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter); | |
| 1249 | + WINBASEAPI LPVOID WINAPI CreateFiberEx(SIZE_T dwStackCommitSize,SIZE_T dwStackReserveSize,DWORD dwFlags,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter); | |
| 1250 | + WINBASEAPI VOID WINAPI DeleteFiber(LPVOID lpFiber); | |
| 1251 | + WINBASEAPI LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter); | |
| 1252 | + WINBASEAPI LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter,DWORD dwFlags); | |
| 1253 | + WINBASEAPI WINBOOL WINAPI ConvertFiberToThread(VOID); | |
| 1254 | + WINBASEAPI VOID WINAPI SwitchToFiber(LPVOID lpFiber); | |
| 1255 | + WINBASEAPI WINBOOL WINAPI SwitchToThread(VOID); | |
| 1256 | + WINBASEAPI HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId); | |
| 1257 | + WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE hProcess,LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId); | |
| 1258 | + WINBASEAPI HANDLE WINAPI GetCurrentThread(VOID); | |
| 1259 | + WINBASEAPI DWORD WINAPI GetCurrentThreadId(VOID); | |
| 1260 | + WINBASEAPI WINBOOL WINAPI SetThreadStackGuarantee (PULONG StackSizeInBytes); | |
| 1261 | + WINBASEAPI DWORD WINAPI GetProcessIdOfThread(HANDLE Thread); | |
| 1262 | + WINBASEAPI DWORD WINAPI GetThreadId(HANDLE Thread); | |
| 1263 | + WINBASEAPI DWORD WINAPI GetProcessId(HANDLE Process); | |
| 1264 | + WINBASEAPI DWORD WINAPI GetCurrentProcessorNumber(VOID); | |
| 1265 | + WINBASEAPI DWORD_PTR WINAPI SetThreadAffinityMask(HANDLE hThread,DWORD_PTR dwThreadAffinityMask); | |
| 1266 | + WINBASEAPI DWORD WINAPI SetThreadIdealProcessor(HANDLE hThread,DWORD dwIdealProcessor); | |
| 1267 | + WINBASEAPI WINBOOL WINAPI SetProcessPriorityBoost(HANDLE hProcess,WINBOOL bDisablePriorityBoost); | |
| 1268 | + WINBASEAPI WINBOOL WINAPI GetProcessPriorityBoost(HANDLE hProcess,PBOOL pDisablePriorityBoost); | |
| 1269 | + WINBASEAPI WINBOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency); | |
| 1270 | + WINBASEAPI WINBOOL WINAPI IsSystemResumeAutomatic(VOID); | |
| 1271 | + WINBASEAPI HANDLE WINAPI OpenThread(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwThreadId); | |
| 1272 | + WINBASEAPI WINBOOL WINAPI SetThreadPriority(HANDLE hThread,int nPriority); | |
| 1273 | + WINBASEAPI WINBOOL WINAPI SetThreadPriorityBoost(HANDLE hThread,WINBOOL bDisablePriorityBoost); | |
| 1274 | + WINBASEAPI WINBOOL WINAPI GetThreadPriorityBoost(HANDLE hThread,PBOOL pDisablePriorityBoost); | |
| 1275 | + WINBASEAPI int WINAPI GetThreadPriority(HANDLE hThread); | |
| 1276 | + WINBASEAPI WINBOOL WINAPI GetThreadTimes(HANDLE hThread,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); | |
| 1277 | + WINBASEAPI WINBOOL WINAPI GetThreadIOPendingFlag(HANDLE hThread,PBOOL lpIOIsPending); | |
| 1278 | + WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitThread(DWORD dwExitCode); | |
| 1279 | + WINBASEAPI WINBOOL WINAPI TerminateThread(HANDLE hThread,DWORD dwExitCode); | |
| 1280 | + WINBASEAPI WINBOOL WINAPI GetExitCodeThread(HANDLE hThread,LPDWORD lpExitCode); | |
| 1281 | + WINBASEAPI WINBOOL WINAPI GetThreadSelectorEntry(HANDLE hThread,DWORD dwSelector,LPLDT_ENTRY lpSelectorEntry); | |
| 1282 | + WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE esFlags); | |
| 1283 | + WINBASEAPI DWORD WINAPI GetLastError(VOID); | |
| 1284 | + WINBASEAPI VOID WINAPI SetLastError(DWORD dwErrCode); | |
| 1285 | + | |
| 1286 | +#ifndef RC_INVOKED | |
| 1287 | +#ifdef WINBASE_DECLARE_RESTORE_LAST_ERROR | |
| 1288 | + WINBASEAPI VOID WINAPI RestoreLastError(DWORD dwErrCode); | |
| 1289 | + | |
| 1290 | + typedef VOID (WINAPI *PRESTORE_LAST_ERROR)(DWORD); | |
| 1291 | + | |
| 1292 | +#define RESTORE_LAST_ERROR_NAME_A "RestoreLastError" | |
| 1293 | +#define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError" | |
| 1294 | +#define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError") | |
| 1295 | +#endif | |
| 1296 | +#endif | |
| 1297 | + | |
| 1298 | +#define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal)!=STATUS_PENDING) | |
| 1299 | + | |
| 1300 | + WINBASEAPI WINBOOL WINAPI GetOverlappedResult(HANDLE hFile,LPOVERLAPPED lpOverlapped,LPDWORD lpNumberOfBytesTransferred,WINBOOL bWait); | |
| 1301 | + WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE FileHandle,HANDLE ExistingCompletionPort,ULONG_PTR CompletionKey,DWORD NumberOfConcurrentThreads); | |
| 1302 | + WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatus(HANDLE CompletionPort,LPDWORD lpNumberOfBytesTransferred,PULONG_PTR lpCompletionKey,LPOVERLAPPED *lpOverlapped,DWORD dwMilliseconds); | |
| 1303 | + WINBASEAPI WINBOOL WINAPI PostQueuedCompletionStatus(HANDLE CompletionPort,DWORD dwNumberOfBytesTransferred,ULONG_PTR dwCompletionKey,LPOVERLAPPED lpOverlapped); | |
| 1304 | + | |
| 1305 | +#define SEM_FAILCRITICALERRORS 0x1 | |
| 1306 | +#define SEM_NOGPFAULTERRORBOX 0x2 | |
| 1307 | +#define SEM_NOALIGNMENTFAULTEXCEPT 0x4 | |
| 1308 | +#define SEM_NOOPENFILEERRORBOX 0x8000 | |
| 1309 | + | |
| 1310 | + WINBASEAPI UINT WINAPI SetErrorMode(UINT uMode); | |
| 1311 | + WINBASEAPI WINBOOL WINAPI ReadProcessMemory(HANDLE hProcess,LPCVOID lpBaseAddress,LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead); | |
| 1312 | + WINBASEAPI WINBOOL WINAPI WriteProcessMemory(HANDLE hProcess,LPVOID lpBaseAddress,LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesWritten); | |
| 1313 | + WINBASEAPI WINBOOL WINAPI GetThreadContext(HANDLE hThread,LPCONTEXT lpContext); | |
| 1314 | + WINBASEAPI WINBOOL WINAPI SetThreadContext(HANDLE hThread,CONST CONTEXT *lpContext); | |
| 1315 | + WINBASEAPI DWORD WINAPI SuspendThread(HANDLE hThread); | |
| 1316 | + WINBASEAPI DWORD WINAPI ResumeThread(HANDLE hThread); | |
| 1317 | + | |
| 1318 | + typedef VOID (WINAPI *PAPCFUNC)(ULONG_PTR dwParam); | |
| 1319 | + | |
| 1320 | + WINBASEAPI DWORD WINAPI QueueUserAPC(PAPCFUNC pfnAPC,HANDLE hThread,ULONG_PTR dwData); | |
| 1321 | + WINBASEAPI WINBOOL WINAPI IsDebuggerPresent(VOID); | |
| 1322 | + WINBASEAPI WINBOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess,PBOOL pbDebuggerPresent); | |
| 1323 | + WINBASEAPI VOID WINAPI DebugBreak(VOID); | |
| 1324 | + WINBASEAPI WINBOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent,DWORD dwMilliseconds); | |
| 1325 | + WINBASEAPI WINBOOL WINAPI ContinueDebugEvent(DWORD dwProcessId,DWORD dwThreadId,DWORD dwContinueStatus); | |
| 1326 | + WINBASEAPI WINBOOL WINAPI DebugActiveProcess(DWORD dwProcessId); | |
| 1327 | + WINBASEAPI WINBOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId); | |
| 1328 | + WINBASEAPI WINBOOL WINAPI DebugSetProcessKillOnExit(WINBOOL KillOnExit); | |
| 1329 | + WINBASEAPI WINBOOL WINAPI DebugBreakProcess(HANDLE Process); | |
| 1330 | + WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection); | |
| 1331 | + WINBASEAPI VOID WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); | |
| 1332 | + WINBASEAPI VOID WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection); | |
| 1333 | + WINBASEAPI WINBOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount); | |
| 1334 | + WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount); | |
| 1335 | + WINBASEAPI WINBOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); | |
| 1336 | + WINBASEAPI VOID WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection); | |
| 1337 | + WINBASEAPI WINBOOL WINAPI SetEvent(HANDLE hEvent); | |
| 1338 | + WINBASEAPI WINBOOL WINAPI ResetEvent(HANDLE hEvent); | |
| 1339 | + WINBASEAPI WINBOOL WINAPI PulseEvent(HANDLE hEvent); | |
| 1340 | + WINBASEAPI WINBOOL WINAPI ReleaseSemaphore(HANDLE hSemaphore,LONG lReleaseCount,LPLONG lpPreviousCount); | |
| 1341 | + WINBASEAPI WINBOOL WINAPI ReleaseMutex(HANDLE hMutex); | |
| 1342 | + WINBASEAPI DWORD WINAPI WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds); | |
| 1343 | + WINBASEAPI DWORD WINAPI WaitForMultipleObjects(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds); | |
| 1344 | + WINBASEAPI VOID WINAPI Sleep(DWORD dwMilliseconds); | |
| 1345 | + WINBASEAPI HGLOBAL WINAPI LoadResource(HMODULE hModule,HRSRC hResInfo); | |
| 1346 | + WINBASEAPI DWORD WINAPI SizeofResource(HMODULE hModule,HRSRC hResInfo); | |
| 1347 | + WINBASEAPI ATOM WINAPI GlobalDeleteAtom(ATOM nAtom); | |
| 1348 | + WINBASEAPI WINBOOL WINAPI InitAtomTable(DWORD nSize); | |
| 1349 | + WINBASEAPI ATOM WINAPI DeleteAtom(ATOM nAtom); | |
| 1350 | + WINBASEAPI UINT WINAPI SetHandleCount(UINT uNumber); | |
| 1351 | + WINBASEAPI DWORD WINAPI GetLogicalDrives(VOID); | |
| 1352 | + WINBASEAPI WINBOOL WINAPI LockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh); | |
| 1353 | + WINBASEAPI WINBOOL WINAPI UnlockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh); | |
| 1354 | + WINBASEAPI WINBOOL WINAPI LockFileEx(HANDLE hFile,DWORD dwFlags,DWORD dwReserved,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh,LPOVERLAPPED lpOverlapped); | |
| 1355 | + | |
| 1356 | +#define LOCKFILE_FAIL_IMMEDIATELY 0x1 | |
| 1357 | +#define LOCKFILE_EXCLUSIVE_LOCK 0x2 | |
| 1358 | + | |
| 1359 | + WINBASEAPI WINBOOL WINAPI UnlockFileEx(HANDLE hFile,DWORD dwReserved,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh,LPOVERLAPPED lpOverlapped); | |
| 1360 | + | |
| 1361 | + typedef struct _BY_HANDLE_FILE_INFORMATION { | |
| 1362 | + DWORD dwFileAttributes; | |
| 1363 | + FILETIME ftCreationTime; | |
| 1364 | + FILETIME ftLastAccessTime; | |
| 1365 | + FILETIME ftLastWriteTime; | |
| 1366 | + DWORD dwVolumeSerialNumber; | |
| 1367 | + DWORD nFileSizeHigh; | |
| 1368 | + DWORD nFileSizeLow; | |
| 1369 | + DWORD nNumberOfLinks; | |
| 1370 | + DWORD nFileIndexHigh; | |
| 1371 | + DWORD nFileIndexLow; | |
| 1372 | + } BY_HANDLE_FILE_INFORMATION,*PBY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION; | |
| 1373 | + | |
| 1374 | +#ifdef UNICODE | |
| 1375 | +#define SetFileShortName SetFileShortNameW | |
| 1376 | +#else | |
| 1377 | +#define SetFileShortName SetFileShortNameA | |
| 1378 | +#endif | |
| 1379 | + | |
| 1380 | + WINBASEAPI WINBOOL WINAPI GetFileInformationByHandle(HANDLE hFile,LPBY_HANDLE_FILE_INFORMATION lpFileInformation); | |
| 1381 | + WINBASEAPI DWORD WINAPI GetFileType(HANDLE hFile); | |
| 1382 | + WINBASEAPI DWORD WINAPI GetFileSize(HANDLE hFile,LPDWORD lpFileSizeHigh); | |
| 1383 | + WINBASEAPI WINBOOL WINAPI GetFileSizeEx(HANDLE hFile,PLARGE_INTEGER lpFileSize); | |
| 1384 | + WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD nStdHandle); | |
| 1385 | + WINBASEAPI WINBOOL WINAPI SetStdHandle(DWORD nStdHandle,HANDLE hHandle); | |
| 1386 | + WINBASEAPI WINBOOL WINAPI WriteFile(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,LPOVERLAPPED lpOverlapped); | |
| 1387 | + WINBASEAPI WINBOOL WINAPI ReadFile(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped); | |
| 1388 | + WINBASEAPI WINBOOL WINAPI FlushFileBuffers(HANDLE hFile); | |
| 1389 | + WINBASEAPI WINBOOL WINAPI DeviceIoControl(HANDLE hDevice,DWORD dwIoControlCode,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped); | |
| 1390 | + WINBASEAPI WINBOOL WINAPI RequestDeviceWakeup(HANDLE hDevice); | |
| 1391 | + WINBASEAPI WINBOOL WINAPI CancelDeviceWakeupRequest(HANDLE hDevice); | |
| 1392 | + WINBASEAPI WINBOOL WINAPI GetDevicePowerState(HANDLE hDevice,WINBOOL *pfOn); | |
| 1393 | + WINBASEAPI WINBOOL WINAPI SetMessageWaitingIndicator(HANDLE hMsgIndicator,ULONG ulMsgCount); | |
| 1394 | + WINBASEAPI WINBOOL WINAPI SetEndOfFile(HANDLE hFile); | |
| 1395 | + WINBASEAPI DWORD WINAPI SetFilePointer(HANDLE hFile,LONG lDistanceToMove,PLONG lpDistanceToMoveHigh,DWORD dwMoveMethod); | |
| 1396 | + WINBASEAPI WINBOOL WINAPI SetFilePointerEx(HANDLE hFile,LARGE_INTEGER liDistanceToMove,PLARGE_INTEGER lpNewFilePointer,DWORD dwMoveMethod); | |
| 1397 | + WINBASEAPI WINBOOL WINAPI FindClose(HANDLE hFindFile); | |
| 1398 | + WINBASEAPI WINBOOL WINAPI GetFileTime(HANDLE hFile,LPFILETIME lpCreationTime,LPFILETIME lpLastAccessTime,LPFILETIME lpLastWriteTime); | |
| 1399 | + WINBASEAPI WINBOOL WINAPI SetFileTime(HANDLE hFile,CONST FILETIME *lpCreationTime,CONST FILETIME *lpLastAccessTime,CONST FILETIME *lpLastWriteTime); | |
| 1400 | + WINBASEAPI WINBOOL WINAPI SetFileValidData(HANDLE hFile,LONGLONG ValidDataLength); | |
| 1401 | + WINBASEAPI WINBOOL WINAPI SetFileShortNameA(HANDLE hFile,LPCSTR lpShortName); | |
| 1402 | + WINBASEAPI WINBOOL WINAPI SetFileShortNameW(HANDLE hFile,LPCWSTR lpShortName); | |
| 1403 | + WINBASEAPI WINBOOL WINAPI CloseHandle(HANDLE hObject); | |
| 1404 | + WINBASEAPI WINBOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle,HANDLE hSourceHandle,HANDLE hTargetProcessHandle,LPHANDLE lpTargetHandle,DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwOptions); | |
| 1405 | + WINBASEAPI WINBOOL WINAPI GetHandleInformation(HANDLE hObject,LPDWORD lpdwFlags); | |
| 1406 | + WINBASEAPI WINBOOL WINAPI SetHandleInformation(HANDLE hObject,DWORD dwMask,DWORD dwFlags); | |
| 1407 | + | |
| 1408 | +#define HANDLE_FLAG_INHERIT 0x1 | |
| 1409 | +#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x2 | |
| 1410 | + | |
| 1411 | +#define HINSTANCE_ERROR 32 | |
| 1412 | + | |
| 1413 | + WINBASEAPI DWORD WINAPI LoadModule(LPCSTR lpModuleName,LPVOID lpParameterBlock); | |
| 1414 | + WINBASEAPI UINT WINAPI WinExec(LPCSTR lpCmdLine,UINT uCmdShow); | |
| 1415 | + WINBASEAPI WINBOOL WINAPI ClearCommBreak(HANDLE hFile); | |
| 1416 | + WINBASEAPI WINBOOL WINAPI ClearCommError(HANDLE hFile,LPDWORD lpErrors,LPCOMSTAT lpStat); | |
| 1417 | + WINBASEAPI WINBOOL WINAPI SetupComm(HANDLE hFile,DWORD dwInQueue,DWORD dwOutQueue); | |
| 1418 | + WINBASEAPI WINBOOL WINAPI EscapeCommFunction(HANDLE hFile,DWORD dwFunc); | |
| 1419 | + WINBASEAPI WINBOOL WINAPI GetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); | |
| 1420 | + WINBASEAPI WINBOOL WINAPI GetCommMask(HANDLE hFile,LPDWORD lpEvtMask); | |
| 1421 | + WINBASEAPI WINBOOL WINAPI GetCommProperties(HANDLE hFile,LPCOMMPROP lpCommProp); | |
| 1422 | + WINBASEAPI WINBOOL WINAPI GetCommModemStatus(HANDLE hFile,LPDWORD lpModemStat); | |
| 1423 | + WINBASEAPI WINBOOL WINAPI GetCommState(HANDLE hFile,LPDCB lpDCB); | |
| 1424 | + WINBASEAPI WINBOOL WINAPI GetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts); | |
| 1425 | + WINBASEAPI WINBOOL WINAPI PurgeComm(HANDLE hFile,DWORD dwFlags); | |
| 1426 | + WINBASEAPI WINBOOL WINAPI SetCommBreak(HANDLE hFile); | |
| 1427 | + WINBASEAPI WINBOOL WINAPI SetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,DWORD dwSize); | |
| 1428 | + WINBASEAPI WINBOOL WINAPI SetCommMask(HANDLE hFile,DWORD dwEvtMask); | |
| 1429 | + WINBASEAPI WINBOOL WINAPI SetCommState(HANDLE hFile,LPDCB lpDCB); | |
| 1430 | + WINBASEAPI WINBOOL WINAPI SetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts); | |
| 1431 | + WINBASEAPI WINBOOL WINAPI TransmitCommChar(HANDLE hFile,char cChar); | |
| 1432 | + WINBASEAPI WINBOOL WINAPI WaitCommEvent(HANDLE hFile,LPDWORD lpEvtMask,LPOVERLAPPED lpOverlapped); | |
| 1433 | + WINBASEAPI DWORD WINAPI SetTapePosition(HANDLE hDevice,DWORD dwPositionMethod,DWORD dwPartition,DWORD dwOffsetLow,DWORD dwOffsetHigh,WINBOOL bImmediate); | |
| 1434 | + WINBASEAPI DWORD WINAPI GetTapePosition(HANDLE hDevice,DWORD dwPositionType,LPDWORD lpdwPartition,LPDWORD lpdwOffsetLow,LPDWORD lpdwOffsetHigh); | |
| 1435 | + WINBASEAPI DWORD WINAPI PrepareTape(HANDLE hDevice,DWORD dwOperation,WINBOOL bImmediate); | |
| 1436 | + WINBASEAPI DWORD WINAPI EraseTape(HANDLE hDevice,DWORD dwEraseType,WINBOOL bImmediate); | |
| 1437 | + WINBASEAPI DWORD WINAPI CreateTapePartition(HANDLE hDevice,DWORD dwPartitionMethod,DWORD dwCount,DWORD dwSize); | |
| 1438 | + WINBASEAPI DWORD WINAPI WriteTapemark(HANDLE hDevice,DWORD dwTapemarkType,DWORD dwTapemarkCount,WINBOOL bImmediate); | |
| 1439 | + WINBASEAPI DWORD WINAPI GetTapeStatus(HANDLE hDevice); | |
| 1440 | + WINBASEAPI DWORD WINAPI GetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPDWORD lpdwSize,LPVOID lpTapeInformation); | |
| 1441 | + | |
| 1442 | +#define GET_TAPE_MEDIA_INFORMATION 0 | |
| 1443 | +#define GET_TAPE_DRIVE_INFORMATION 1 | |
| 1444 | + | |
| 1445 | + WINBASEAPI DWORD WINAPI SetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPVOID lpTapeInformation); | |
| 1446 | + | |
| 1447 | +#define SET_TAPE_MEDIA_INFORMATION 0 | |
| 1448 | +#define SET_TAPE_DRIVE_INFORMATION 1 | |
| 1449 | + | |
| 1450 | + WINBASEAPI WINBOOL WINAPI Beep(DWORD dwFreq,DWORD dwDuration); | |
| 1451 | + WINBASEAPI int WINAPI MulDiv(int nNumber,int nNumerator,int nDenominator); | |
| 1452 | + WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime); | |
| 1453 | + WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime); | |
| 1454 | + WINBASEAPI WINBOOL WINAPI SetSystemTime(CONST SYSTEMTIME *lpSystemTime); | |
| 1455 | + WINBASEAPI VOID WINAPI GetLocalTime(LPSYSTEMTIME lpSystemTime); | |
| 1456 | + WINBASEAPI WINBOOL WINAPI SetLocalTime(CONST SYSTEMTIME *lpSystemTime); | |
| 1457 | + WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo); | |
| 1458 | + WINBASEAPI WINBOOL WINAPI SetSystemFileCacheSize(SIZE_T MinimumFileCacheSize,SIZE_T MaximumFileCacheSize,DWORD Flags); | |
| 1459 | + WINBASEAPI WINBOOL WINAPI GetSystemFileCacheSize(PSIZE_T lpMinimumFileCacheSize,PSIZE_T lpMaximumFileCacheSize,PDWORD lpFlags); | |
| 1460 | + WINBASEAPI WINBOOL WINAPI GetSystemRegistryQuota(PDWORD pdwQuotaAllowed,PDWORD pdwQuotaUsed); | |
| 1461 | + WINBOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); | |
| 1462 | + WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo); | |
| 1463 | + WINBASEAPI WINBOOL WINAPI IsProcessorFeaturePresent(DWORD ProcessorFeature); | |
| 1464 | + | |
| 1465 | + typedef struct _TIME_ZONE_INFORMATION { | |
| 1466 | + LONG Bias; | |
| 1467 | + WCHAR StandardName[32]; | |
| 1468 | + SYSTEMTIME StandardDate; | |
| 1469 | + LONG StandardBias; | |
| 1470 | + WCHAR DaylightName[32]; | |
| 1471 | + SYSTEMTIME DaylightDate; | |
| 1472 | + LONG DaylightBias; | |
| 1473 | + } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION; | |
| 1474 | + | |
| 1475 | +#ifdef UNICODE | |
| 1476 | +#define FormatMessage FormatMessageW | |
| 1477 | +#else | |
| 1478 | +#define FormatMessage FormatMessageA | |
| 1479 | +#endif | |
| 1480 | + | |
| 1481 | + WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpUniversalTime,LPSYSTEMTIME lpLocalTime); | |
| 1482 | + WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpLocalTime,LPSYSTEMTIME lpUniversalTime); | |
| 1483 | + WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation); | |
| 1484 | + WINBASEAPI WINBOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation); | |
| 1485 | + WINBASEAPI WINBOOL WINAPI SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime,LPFILETIME lpFileTime); | |
| 1486 | + WINBASEAPI WINBOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *lpFileTime,LPFILETIME lpLocalFileTime); | |
| 1487 | + WINBASEAPI WINBOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *lpLocalFileTime,LPFILETIME lpFileTime); | |
| 1488 | + WINBASEAPI WINBOOL WINAPI FileTimeToSystemTime(CONST FILETIME *lpFileTime,LPSYSTEMTIME lpSystemTime); | |
| 1489 | + WINBASEAPI LONG WINAPI CompareFileTime(CONST FILETIME *lpFileTime1,CONST FILETIME *lpFileTime2); | |
| 1490 | + WINBASEAPI WINBOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *lpFileTime,LPWORD lpFatDate,LPWORD lpFatTime); | |
| 1491 | + WINBASEAPI WINBOOL WINAPI DosDateTimeToFileTime(WORD wFatDate,WORD wFatTime,LPFILETIME lpFileTime); | |
| 1492 | + WINBASEAPI DWORD WINAPI GetTickCount(VOID); | |
| 1493 | + WINBASEAPI WINBOOL WINAPI SetSystemTimeAdjustment(DWORD dwTimeAdjustment,WINBOOL bTimeAdjustmentDisabled); | |
| 1494 | + WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment(PDWORD lpTimeAdjustment,PDWORD lpTimeIncrement,PBOOL lpTimeAdjustmentDisabled); | |
| 1495 | + WINBASEAPI DWORD WINAPI FormatMessageA(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPSTR lpBuffer,DWORD nSize,va_list *Arguments); | |
| 1496 | + WINBASEAPI DWORD WINAPI FormatMessageW(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPWSTR lpBuffer,DWORD nSize,va_list *Arguments); | |
| 1497 | + | |
| 1498 | +#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x100 | |
| 1499 | +#define FORMAT_MESSAGE_IGNORE_INSERTS 0x200 | |
| 1500 | +#define FORMAT_MESSAGE_FROM_STRING 0x400 | |
| 1501 | +#define FORMAT_MESSAGE_FROM_HMODULE 0x800 | |
| 1502 | +#define FORMAT_MESSAGE_FROM_SYSTEM 0x1000 | |
| 1503 | +#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x2000 | |
| 1504 | +#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0xff | |
| 1574 | 1505 | |
| 1575 | 1506 | #ifdef UNICODE |
| 1576 | −typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO; | |
| 1577 | −typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA; | |
| 1578 | −typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO; | |
| 1579 | −#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW | |
| 1580 | −#define AddAtom AddAtomW | |
| 1581 | −#define BackupEventLog BackupEventLogW | |
| 1582 | −#define BeginUpdateResource BeginUpdateResourceW | |
| 1583 | −#define BuildCommDCB BuildCommDCBW | |
| 1584 | −#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW | |
| 1585 | −#define CallNamedPipe CallNamedPipeW | |
| 1586 | −#define ClearEventLog ClearEventLogW | |
| 1587 | −#define CommConfigDialog CommConfigDialogW | |
| 1588 | −#define CopyFile CopyFileW | |
| 1589 | −#define CopyFileEx CopyFileExW | |
| 1590 | −#define CreateDirectory CreateDirectoryW | |
| 1591 | −#define CreateDirectoryEx CreateDirectoryExW | |
| 1592 | −#define CreateEvent CreateEventW | |
| 1593 | −#define CreateFile CreateFileW | |
| 1594 | −#define CreateFileMapping CreateFileMappingW | |
| 1595 | −#define CreateHardLink CreateHardLinkW | |
| 1596 | 1507 | #define CreateMailslot CreateMailslotW |
| 1508 | +#define EncryptFile EncryptFileW | |
| 1509 | +#define DecryptFile DecryptFileW | |
| 1510 | +#define FileEncryptionStatus FileEncryptionStatusW | |
| 1511 | +#else | |
| 1512 | +#define CreateMailslot CreateMailslotA | |
| 1513 | +#define EncryptFile EncryptFileA | |
| 1514 | +#define DecryptFile DecryptFileA | |
| 1515 | +#define FileEncryptionStatus FileEncryptionStatusA | |
| 1516 | +#endif | |
| 1517 | + | |
| 1518 | + WINBASEAPI WINBOOL WINAPI CreatePipe(PHANDLE hReadPipe,PHANDLE hWritePipe,LPSECURITY_ATTRIBUTES lpPipeAttributes,DWORD nSize); | |
| 1519 | + WINBASEAPI WINBOOL WINAPI ConnectNamedPipe(HANDLE hNamedPipe,LPOVERLAPPED lpOverlapped); | |
| 1520 | + WINBASEAPI WINBOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe); | |
| 1521 | + WINBASEAPI WINBOOL WINAPI SetNamedPipeHandleState(HANDLE hNamedPipe,LPDWORD lpMode,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout); | |
| 1522 | + WINBASEAPI WINBOOL WINAPI GetNamedPipeInfo(HANDLE hNamedPipe,LPDWORD lpFlags,LPDWORD lpOutBufferSize,LPDWORD lpInBufferSize,LPDWORD lpMaxInstances); | |
| 1523 | + WINBASEAPI WINBOOL WINAPI PeekNamedPipe(HANDLE hNamedPipe,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesRead,LPDWORD lpTotalBytesAvail,LPDWORD lpBytesLeftThisMessage); | |
| 1524 | + WINBASEAPI WINBOOL WINAPI TransactNamedPipe(HANDLE hNamedPipe,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,LPOVERLAPPED lpOverlapped); | |
| 1525 | + WINBASEAPI HANDLE WINAPI CreateMailslotA(LPCSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 1526 | + WINBASEAPI HANDLE WINAPI CreateMailslotW(LPCWSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 1527 | + WINBASEAPI WINBOOL WINAPI GetMailslotInfo(HANDLE hMailslot,LPDWORD lpMaxMessageSize,LPDWORD lpNextSize,LPDWORD lpMessageCount,LPDWORD lpReadTimeout); | |
| 1528 | + WINBASEAPI WINBOOL WINAPI SetMailslotInfo(HANDLE hMailslot,DWORD lReadTimeout); | |
| 1529 | + WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap); | |
| 1530 | + WINBASEAPI WINBOOL WINAPI FlushViewOfFile(LPCVOID lpBaseAddress,SIZE_T dwNumberOfBytesToFlush); | |
| 1531 | + WINBASEAPI WINBOOL WINAPI UnmapViewOfFile(LPCVOID lpBaseAddress); | |
| 1532 | + WINADVAPI WINBOOL WINAPI EncryptFileA(LPCSTR lpFileName); | |
| 1533 | + WINADVAPI WINBOOL WINAPI EncryptFileW(LPCWSTR lpFileName); | |
| 1534 | + WINADVAPI WINBOOL WINAPI DecryptFileA(LPCSTR lpFileName,DWORD dwReserved); | |
| 1535 | + WINADVAPI WINBOOL WINAPI DecryptFileW(LPCWSTR lpFileName,DWORD dwReserved); | |
| 1536 | + | |
| 1537 | +#define FILE_ENCRYPTABLE 0 | |
| 1538 | +#define FILE_IS_ENCRYPTED 1 | |
| 1539 | +#define FILE_SYSTEM_ATTR 2 | |
| 1540 | +#define FILE_ROOT_DIR 3 | |
| 1541 | +#define FILE_SYSTEM_DIR 4 | |
| 1542 | +#define FILE_UNKNOWN 5 | |
| 1543 | +#define FILE_SYSTEM_NOT_SUPPORT 6 | |
| 1544 | +#define FILE_USER_DISALLOWED 7 | |
| 1545 | +#define FILE_READ_ONLY 8 | |
| 1546 | +#define FILE_DIR_DISALLOWED 9 | |
| 1547 | + | |
| 1548 | + WINADVAPI WINBOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName,LPDWORD lpStatus); | |
| 1549 | + WINADVAPI WINBOOL WINAPI FileEncryptionStatusW(LPCWSTR lpFileName,LPDWORD lpStatus); | |
| 1550 | + | |
| 1551 | +#define EFS_USE_RECOVERY_KEYS (0x1) | |
| 1552 | + | |
| 1553 | + typedef DWORD (WINAPI *PFE_EXPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,ULONG ulLength); | |
| 1554 | + typedef DWORD (WINAPI *PFE_IMPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,PULONG ulLength); | |
| 1555 | + | |
| 1556 | +#define CREATE_FOR_IMPORT (1) | |
| 1557 | +#define CREATE_FOR_DIR (2) | |
| 1558 | +#define OVERWRITE_HIDDEN (4) | |
| 1559 | + | |
| 1560 | +#ifdef UNICODE | |
| 1561 | +#define OpenEncryptedFileRaw OpenEncryptedFileRawW | |
| 1562 | +#define lstrcmp lstrcmpW | |
| 1563 | +#define lstrcmpi lstrcmpiW | |
| 1564 | +#define lstrcpyn lstrcpynW | |
| 1565 | +#define lstrcpy lstrcpyW | |
| 1566 | +#define lstrcat lstrcatW | |
| 1567 | +#define lstrlen lstrlenW | |
| 1568 | +#else | |
| 1569 | +#define OpenEncryptedFileRaw OpenEncryptedFileRawA | |
| 1570 | +#define lstrcmp lstrcmpA | |
| 1571 | +#define lstrcmpi lstrcmpiA | |
| 1572 | +#define lstrcpyn lstrcpynA | |
| 1573 | +#define lstrcpy lstrcpyA | |
| 1574 | +#define lstrcat lstrcatA | |
| 1575 | +#define lstrlen lstrlenA | |
| 1576 | +#endif | |
| 1577 | + | |
| 1578 | + WINADVAPI DWORD WINAPI OpenEncryptedFileRawA(LPCSTR lpFileName,ULONG ulFlags,PVOID *pvContext); | |
| 1579 | + WINADVAPI DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR lpFileName,ULONG ulFlags,PVOID *pvContext); | |
| 1580 | + WINADVAPI DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC pfExportCallback,PVOID pvCallbackContext,PVOID pvContext); | |
| 1581 | + WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC pfImportCallback,PVOID pvCallbackContext,PVOID pvContext); | |
| 1582 | + WINADVAPI VOID WINAPI CloseEncryptedFileRaw(PVOID pvContext); | |
| 1583 | + WINBASEAPI int WINAPI lstrcmpA(LPCSTR lpString1,LPCSTR lpString2); | |
| 1584 | + WINBASEAPI int WINAPI lstrcmpW(LPCWSTR lpString1,LPCWSTR lpString2); | |
| 1585 | + WINBASEAPI int WINAPI lstrcmpiA(LPCSTR lpString1,LPCSTR lpString2); | |
| 1586 | + WINBASEAPI int WINAPI lstrcmpiW(LPCWSTR lpString1,LPCWSTR lpString2); | |
| 1587 | + WINBASEAPI LPSTR WINAPI lstrcpynA(LPSTR lpString1,LPCSTR lpString2,int iMaxLength); | |
| 1588 | + WINBASEAPI LPWSTR WINAPI lstrcpynW(LPWSTR lpString1,LPCWSTR lpString2,int iMaxLength); | |
| 1589 | + WINBASEAPI LPSTR WINAPI lstrcpyA(LPSTR lpString1,LPCSTR lpString2); | |
| 1590 | + WINBASEAPI LPWSTR WINAPI lstrcpyW(LPWSTR lpString1,LPCWSTR lpString2); | |
| 1591 | + WINBASEAPI LPSTR WINAPI lstrcatA(LPSTR lpString1,LPCSTR lpString2); | |
| 1592 | + WINBASEAPI LPWSTR WINAPI lstrcatW(LPWSTR lpString1,LPCWSTR lpString2); | |
| 1593 | + WINBASEAPI int WINAPI lstrlenA(LPCSTR lpString); | |
| 1594 | + WINBASEAPI int WINAPI lstrlenW(LPCWSTR lpString); | |
| 1595 | + WINBASEAPI HFILE WINAPI OpenFile(LPCSTR lpFileName,LPOFSTRUCT lpReOpenBuff,UINT uStyle); | |
| 1596 | + WINBASEAPI HFILE WINAPI _lopen(LPCSTR lpPathName,int iReadWrite); | |
| 1597 | + WINBASEAPI HFILE WINAPI _lcreat(LPCSTR lpPathName,int iAttribute); | |
| 1598 | + WINBASEAPI UINT WINAPI _lread(HFILE hFile,LPVOID lpBuffer,UINT uBytes); | |
| 1599 | + WINBASEAPI UINT WINAPI _lwrite(HFILE hFile,LPCCH lpBuffer,UINT uBytes); | |
| 1600 | + WINBASEAPI long WINAPI _hread(HFILE hFile,LPVOID lpBuffer,long lBytes); | |
| 1601 | + WINBASEAPI long WINAPI _hwrite(HFILE hFile,LPCCH lpBuffer,long lBytes); | |
| 1602 | + WINBASEAPI HFILE WINAPI _lclose(HFILE hFile); | |
| 1603 | + WINBASEAPI LONG WINAPI _llseek(HFILE hFile,LONG lOffset,int iOrigin); | |
| 1604 | + WINADVAPI WINBOOL WINAPI IsTextUnicode(CONST VOID *lpv,int iSize,LPINT lpiResult); | |
| 1605 | + | |
| 1606 | +#define FLS_OUT_OF_INDEXES ((DWORD)0xffffffff) | |
| 1607 | + | |
| 1608 | + WINBASEAPI DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION lpCallback); | |
| 1609 | + WINBASEAPI PVOID WINAPI FlsGetValue(DWORD dwFlsIndex); | |
| 1610 | + WINBASEAPI WINBOOL WINAPI FlsSetValue(DWORD dwFlsIndex,PVOID lpFlsData); | |
| 1611 | + WINBASEAPI WINBOOL WINAPI FlsFree(DWORD dwFlsIndex); | |
| 1612 | + | |
| 1613 | +#define TLS_OUT_OF_INDEXES ((DWORD)0xffffffff) | |
| 1614 | + | |
| 1615 | + WINBASEAPI DWORD WINAPI TlsAlloc(VOID); | |
| 1616 | + WINBASEAPI LPVOID WINAPI TlsGetValue(DWORD dwTlsIndex); | |
| 1617 | + WINBASEAPI WINBOOL WINAPI TlsSetValue(DWORD dwTlsIndex,LPVOID lpTlsValue); | |
| 1618 | + WINBASEAPI WINBOOL WINAPI TlsFree(DWORD dwTlsIndex); | |
| 1619 | + | |
| 1620 | + typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,DWORD dwNumberOfBytesTransfered,LPOVERLAPPED lpOverlapped); | |
| 1621 | + | |
| 1622 | + WINBASEAPI DWORD WINAPI SleepEx(DWORD dwMilliseconds,WINBOOL bAlertable); | |
| 1623 | + WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE hHandle,DWORD dwMilliseconds,WINBOOL bAlertable); | |
| 1624 | + WINBASEAPI DWORD WINAPI WaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds,WINBOOL bAlertable); | |
| 1625 | + WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE hObjectToSignal,HANDLE hObjectToWaitOn,DWORD dwMilliseconds,WINBOOL bAlertable); | |
| 1626 | + WINBASEAPI WINBOOL WINAPI ReadFileEx(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); | |
| 1627 | + WINBASEAPI WINBOOL WINAPI WriteFileEx(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); | |
| 1628 | + WINBASEAPI WINBOOL WINAPI BackupRead(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext); | |
| 1629 | + WINBASEAPI WINBOOL WINAPI BackupSeek(HANDLE hFile,DWORD dwLowBytesToSeek,DWORD dwHighBytesToSeek,LPDWORD lpdwLowByteSeeked,LPDWORD lpdwHighByteSeeked,LPVOID *lpContext); | |
| 1630 | + WINBASEAPI WINBOOL WINAPI BackupWrite(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext); | |
| 1631 | + | |
| 1632 | + typedef struct _WIN32_STREAM_ID { | |
| 1633 | + DWORD dwStreamId; | |
| 1634 | + DWORD dwStreamAttributes; | |
| 1635 | + LARGE_INTEGER Size; | |
| 1636 | + DWORD dwStreamNameSize; | |
| 1637 | + WCHAR cStreamName[ANYSIZE_ARRAY]; | |
| 1638 | + } WIN32_STREAM_ID,*LPWIN32_STREAM_ID; | |
| 1639 | + | |
| 1640 | +#define BACKUP_INVALID 0x0 | |
| 1641 | +#define BACKUP_DATA 0x1 | |
| 1642 | +#define BACKUP_EA_DATA 0x2 | |
| 1643 | +#define BACKUP_SECURITY_DATA 0x3 | |
| 1644 | +#define BACKUP_ALTERNATE_DATA 0x4 | |
| 1645 | +#define BACKUP_LINK 0x5 | |
| 1646 | +#define BACKUP_PROPERTY_DATA 0x6 | |
| 1647 | +#define BACKUP_OBJECT_ID 0x7 | |
| 1648 | +#define BACKUP_REPARSE_DATA 0x8 | |
| 1649 | +#define BACKUP_SPARSE_BLOCK 0x9 | |
| 1650 | + | |
| 1651 | +#define STREAM_NORMAL_ATTRIBUTE 0x0 | |
| 1652 | +#define STREAM_MODIFIED_WHEN_READ 0x1 | |
| 1653 | +#define STREAM_CONTAINS_SECURITY 0x2 | |
| 1654 | +#define STREAM_CONTAINS_PROPERTIES 0x4 | |
| 1655 | +#define STREAM_SPARSE_ATTRIBUTE 0x8 | |
| 1656 | + | |
| 1657 | + WINBASEAPI WINBOOL WINAPI ReadFileScatter(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToRead,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped); | |
| 1658 | + WINBASEAPI WINBOOL WINAPI WriteFileGather(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToWrite,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped); | |
| 1659 | + | |
| 1660 | +#define STARTF_USESHOWWINDOW 0x1 | |
| 1661 | +#define STARTF_USESIZE 0x2 | |
| 1662 | +#define STARTF_USEPOSITION 0x4 | |
| 1663 | +#define STARTF_USECOUNTCHARS 0x8 | |
| 1664 | +#define STARTF_USEFILLATTRIBUTE 0x10 | |
| 1665 | +#define STARTF_RUNFULLSCREEN 0x20 | |
| 1666 | +#define STARTF_FORCEONFEEDBACK 0x40 | |
| 1667 | +#define STARTF_FORCEOFFFEEDBACK 0x80 | |
| 1668 | +#define STARTF_USESTDHANDLES 0x100 | |
| 1669 | + | |
| 1670 | +#define STARTF_USEHOTKEY 0x200 | |
| 1671 | + | |
| 1672 | + typedef struct _STARTUPINFOA { | |
| 1673 | + DWORD cb; | |
| 1674 | + LPSTR lpReserved; | |
| 1675 | + LPSTR lpDesktop; | |
| 1676 | + LPSTR lpTitle; | |
| 1677 | + DWORD dwX; | |
| 1678 | + DWORD dwY; | |
| 1679 | + DWORD dwXSize; | |
| 1680 | + DWORD dwYSize; | |
| 1681 | + DWORD dwXCountChars; | |
| 1682 | + DWORD dwYCountChars; | |
| 1683 | + DWORD dwFillAttribute; | |
| 1684 | + DWORD dwFlags; | |
| 1685 | + WORD wShowWindow; | |
| 1686 | + WORD cbReserved2; | |
| 1687 | + LPBYTE lpReserved2; | |
| 1688 | + HANDLE hStdInput; | |
| 1689 | + HANDLE hStdOutput; | |
| 1690 | + HANDLE hStdError; | |
| 1691 | + } STARTUPINFOA,*LPSTARTUPINFOA; | |
| 1692 | + | |
| 1693 | + typedef struct _STARTUPINFOW { | |
| 1694 | + DWORD cb; | |
| 1695 | + LPWSTR lpReserved; | |
| 1696 | + LPWSTR lpDesktop; | |
| 1697 | + LPWSTR lpTitle; | |
| 1698 | + DWORD dwX; | |
| 1699 | + DWORD dwY; | |
| 1700 | + DWORD dwXSize; | |
| 1701 | + DWORD dwYSize; | |
| 1702 | + DWORD dwXCountChars; | |
| 1703 | + DWORD dwYCountChars; | |
| 1704 | + DWORD dwFillAttribute; | |
| 1705 | + DWORD dwFlags; | |
| 1706 | + WORD wShowWindow; | |
| 1707 | + WORD cbReserved2; | |
| 1708 | + LPBYTE lpReserved2; | |
| 1709 | + HANDLE hStdInput; | |
| 1710 | + HANDLE hStdOutput; | |
| 1711 | + HANDLE hStdError; | |
| 1712 | + } STARTUPINFOW,*LPSTARTUPINFOW; | |
| 1713 | + | |
| 1714 | +#ifdef UNICODE | |
| 1715 | + typedef STARTUPINFOW STARTUPINFO; | |
| 1716 | + typedef LPSTARTUPINFOW LPSTARTUPINFO; | |
| 1717 | +#else | |
| 1718 | + typedef STARTUPINFOA STARTUPINFO; | |
| 1719 | + typedef LPSTARTUPINFOA LPSTARTUPINFO; | |
| 1720 | +#endif | |
| 1721 | + | |
| 1722 | +#define SHUTDOWN_NORETRY 0x1 | |
| 1723 | + | |
| 1724 | + typedef struct _WIN32_FIND_DATAA { | |
| 1725 | + DWORD dwFileAttributes; | |
| 1726 | + FILETIME ftCreationTime; | |
| 1727 | + FILETIME ftLastAccessTime; | |
| 1728 | + FILETIME ftLastWriteTime; | |
| 1729 | + DWORD nFileSizeHigh; | |
| 1730 | + DWORD nFileSizeLow; | |
| 1731 | + DWORD dwReserved0; | |
| 1732 | + DWORD dwReserved1; | |
| 1733 | + CHAR cFileName[MAX_PATH]; | |
| 1734 | + CHAR cAlternateFileName[14]; | |
| 1735 | + } WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA; | |
| 1736 | + | |
| 1737 | + typedef struct _WIN32_FIND_DATAW { | |
| 1738 | + DWORD dwFileAttributes; | |
| 1739 | + FILETIME ftCreationTime; | |
| 1740 | + FILETIME ftLastAccessTime; | |
| 1741 | + FILETIME ftLastWriteTime; | |
| 1742 | + DWORD nFileSizeHigh; | |
| 1743 | + DWORD nFileSizeLow; | |
| 1744 | + DWORD dwReserved0; | |
| 1745 | + DWORD dwReserved1; | |
| 1746 | + WCHAR cFileName[MAX_PATH]; | |
| 1747 | + WCHAR cAlternateFileName[14]; | |
| 1748 | + } WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW; | |
| 1749 | + | |
| 1750 | +#ifdef UNICODE | |
| 1751 | + typedef WIN32_FIND_DATAW WIN32_FIND_DATA; | |
| 1752 | + typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA; | |
| 1753 | + typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA; | |
| 1754 | +#else | |
| 1755 | + typedef WIN32_FIND_DATAA WIN32_FIND_DATA; | |
| 1756 | + typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA; | |
| 1757 | + typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA; | |
| 1758 | +#endif | |
| 1759 | + | |
| 1760 | + typedef struct _WIN32_FILE_ATTRIBUTE_DATA { | |
| 1761 | + DWORD dwFileAttributes; | |
| 1762 | + FILETIME ftCreationTime; | |
| 1763 | + FILETIME ftLastAccessTime; | |
| 1764 | + FILETIME ftLastWriteTime; | |
| 1765 | + DWORD nFileSizeHigh; | |
| 1766 | + DWORD nFileSizeLow; | |
| 1767 | + } WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA; | |
| 1768 | + | |
| 1769 | +#ifdef UNICODE | |
| 1597 | 1770 | #define CreateMutex CreateMutexW |
| 1598 | −#define CreateNamedPipe CreateNamedPipeW | |
| 1599 | −#define CreateProcess CreateProcessW | |
| 1600 | −#define CreateProcessAsUser CreateProcessAsUserW | |
| 1771 | +#define OpenMutex OpenMutexW | |
| 1772 | +#define CreateEvent CreateEventW | |
| 1773 | +#define OpenEvent OpenEventW | |
| 1601 | 1774 | #define CreateSemaphore CreateSemaphoreW |
| 1775 | +#define OpenSemaphore OpenSemaphoreW | |
| 1776 | +#else | |
| 1777 | +#define CreateMutex CreateMutexA | |
| 1778 | +#define OpenMutex OpenMutexA | |
| 1779 | +#define CreateEvent CreateEventA | |
| 1780 | +#define OpenEvent OpenEventA | |
| 1781 | +#define CreateSemaphore CreateSemaphoreA | |
| 1782 | +#define OpenSemaphore OpenSemaphoreA | |
| 1783 | +#endif | |
| 1784 | + | |
| 1785 | + WINBASEAPI HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCSTR lpName); | |
| 1786 | + WINBASEAPI HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCWSTR lpName); | |
| 1787 | + WINBASEAPI HANDLE WINAPI OpenMutexA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); | |
| 1788 | + WINBASEAPI HANDLE WINAPI OpenMutexW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); | |
| 1789 | + WINBASEAPI HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCSTR lpName); | |
| 1790 | + WINBASEAPI HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCWSTR lpName); | |
| 1791 | + WINBASEAPI HANDLE WINAPI OpenEventA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); | |
| 1792 | + WINBASEAPI HANDLE WINAPI OpenEventW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); | |
| 1793 | + WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCSTR lpName); | |
| 1794 | + WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCWSTR lpName); | |
| 1795 | + WINBASEAPI HANDLE WINAPI OpenSemaphoreA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); | |
| 1796 | + WINBASEAPI HANDLE WINAPI OpenSemaphoreW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); | |
| 1797 | + | |
| 1798 | + typedef VOID (WINAPI *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue); | |
| 1799 | + | |
| 1800 | +#ifdef UNICODE | |
| 1602 | 1801 | #define CreateWaitableTimer CreateWaitableTimerW |
| 1603 | −#define DefineDosDevice DefineDosDeviceW | |
| 1604 | −#define DeleteFile DeleteFileW | |
| 1605 | −#define EndUpdateResource EndUpdateResourceW | |
| 1606 | −#define EnumResourceLanguages EnumResourceLanguagesW | |
| 1607 | −#define EnumResourceNames EnumResourceNamesW | |
| 1608 | −#define EnumResourceTypes EnumResourceTypesW | |
| 1609 | −#define ExpandEnvironmentStrings ExpandEnvironmentStringsW | |
| 1802 | +#define OpenWaitableTimer OpenWaitableTimerW | |
| 1803 | +#define CreateFileMapping CreateFileMappingW | |
| 1804 | +#define OpenFileMapping OpenFileMappingW | |
| 1805 | +#define GetLogicalDriveStrings GetLogicalDriveStringsW | |
| 1806 | +#define LoadLibrary LoadLibraryW | |
| 1807 | +#define LoadLibraryEx LoadLibraryExW | |
| 1808 | +#define GetModuleFileName GetModuleFileNameW | |
| 1809 | +#define GetModuleHandle GetModuleHandleW | |
| 1810 | +#else | |
| 1811 | +#define CreateWaitableTimer CreateWaitableTimerA | |
| 1812 | +#define OpenWaitableTimer OpenWaitableTimerA | |
| 1813 | +#define CreateFileMapping CreateFileMappingA | |
| 1814 | +#define OpenFileMapping OpenFileMappingA | |
| 1815 | +#define GetLogicalDriveStrings GetLogicalDriveStringsA | |
| 1816 | +#define LoadLibrary LoadLibraryA | |
| 1817 | +#define LoadLibraryEx LoadLibraryExA | |
| 1818 | +#define GetModuleFileName GetModuleFileNameA | |
| 1819 | +#define GetModuleHandle GetModuleHandleA | |
| 1820 | +#endif | |
| 1821 | + | |
| 1822 | + WINBASEAPI HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCSTR lpTimerName); | |
| 1823 | + WINBASEAPI HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCWSTR lpTimerName); | |
| 1824 | + WINBASEAPI HANDLE WINAPI OpenWaitableTimerA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpTimerName); | |
| 1825 | + WINBASEAPI HANDLE WINAPI OpenWaitableTimerW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpTimerName); | |
| 1826 | + WINBASEAPI WINBOOL WINAPI SetWaitableTimer(HANDLE hTimer,const LARGE_INTEGER *lpDueTime,LONG lPeriod,PTIMERAPCROUTINE pfnCompletionRoutine,LPVOID lpArgToCompletionRoutine,WINBOOL fResume); | |
| 1827 | + WINBASEAPI WINBOOL WINAPI CancelWaitableTimer(HANDLE hTimer); | |
| 1828 | + WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCSTR lpName); | |
| 1829 | + WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCWSTR lpName); | |
| 1830 | + WINBASEAPI HANDLE WINAPI OpenFileMappingA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); | |
| 1831 | + WINBASEAPI HANDLE WINAPI OpenFileMappingW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); | |
| 1832 | + WINBASEAPI DWORD WINAPI GetLogicalDriveStringsA(DWORD nBufferLength,LPSTR lpBuffer); | |
| 1833 | + WINBASEAPI DWORD WINAPI GetLogicalDriveStringsW(DWORD nBufferLength,LPWSTR lpBuffer); | |
| 1834 | + | |
| 1835 | + typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE { | |
| 1836 | + LowMemoryResourceNotification,HighMemoryResourceNotification | |
| 1837 | + } MEMORY_RESOURCE_NOTIFICATION_TYPE; | |
| 1838 | + | |
| 1839 | + WINBASEAPI HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType); | |
| 1840 | + WINBASEAPI WINBOOL WINAPI QueryMemoryResourceNotification(HANDLE ResourceNotificationHandle,PBOOL ResourceState); | |
| 1841 | + WINBASEAPI HMODULE WINAPI LoadLibraryA(LPCSTR lpLibFileName); | |
| 1842 | + WINBASEAPI HMODULE WINAPI LoadLibraryW(LPCWSTR lpLibFileName); | |
| 1843 | + WINBASEAPI HMODULE WINAPI LoadLibraryExA(LPCSTR lpLibFileName,HANDLE hFile,DWORD dwFlags); | |
| 1844 | + WINBASEAPI HMODULE WINAPI LoadLibraryExW(LPCWSTR lpLibFileName,HANDLE hFile,DWORD dwFlags); | |
| 1845 | + | |
| 1846 | +#define DONT_RESOLVE_DLL_REFERENCES 0x1 | |
| 1847 | +#define LOAD_LIBRARY_AS_DATAFILE 0x2 | |
| 1848 | +#define LOAD_WITH_ALTERED_SEARCH_PATH 0x8 | |
| 1849 | +#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10 | |
| 1850 | +#define LOAD_LINRARY_AS_IMAGE_RESOURCE 0x20 | |
| 1851 | +#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40 | |
| 1852 | + | |
| 1853 | + WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE hModule,LPCH lpFilename,DWORD nSize); | |
| 1854 | + WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE hModule,LPWCH lpFilename,DWORD nSize); | |
| 1855 | + WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR lpModuleName); | |
| 1856 | + WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName); | |
| 1857 | + | |
| 1858 | +#ifndef RC_INVOKED | |
| 1859 | +#define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1) | |
| 1860 | +#define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2) | |
| 1861 | +#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4) | |
| 1862 | + | |
| 1863 | + typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXA)(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule); | |
| 1864 | + typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXW)(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule); | |
| 1865 | + | |
| 1866 | +#ifdef UNICODE | |
| 1867 | +#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXW | |
| 1868 | +#define GetModuleHandleEx GetModuleHandleExW | |
| 1869 | +#else | |
| 1870 | +#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXA | |
| 1871 | +#define GetModuleHandleEx GetModuleHandleExA | |
| 1872 | +#endif | |
| 1873 | + | |
| 1874 | + WINBASEAPI WINBOOL WINAPI GetModuleHandleExA(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule); | |
| 1875 | + WINBASEAPI WINBOOL WINAPI GetModuleHandleExW(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule); | |
| 1876 | +#endif | |
| 1877 | + | |
| 1878 | +#ifdef UNICODE | |
| 1879 | +#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW | |
| 1880 | +#define CreateProcess CreateProcessW | |
| 1610 | 1881 | #define FatalAppExit FatalAppExitW |
| 1611 | −#define FindAtom FindAtomW | |
| 1612 | −#define FindFirstChangeNotification FindFirstChangeNotificationW | |
| 1613 | −#define FindFirstFile FindFirstFileW | |
| 1614 | −#define FindFirstFileEx FindFirstFileExW | |
| 1615 | −#define FindNextFile FindNextFileW | |
| 1882 | +#define GetStartupInfo GetStartupInfoW | |
| 1883 | +#define GetCommandLine GetCommandLineW | |
| 1884 | +#define GetEnvironmentVariable GetEnvironmentVariableW | |
| 1885 | +#define SetEnvironmentVariable SetEnvironmentVariableW | |
| 1886 | +#define ExpandEnvironmentStrings ExpandEnvironmentStringsW | |
| 1887 | +#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW | |
| 1888 | +#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW | |
| 1889 | +#define OutputDebugString OutputDebugStringW | |
| 1616 | 1890 | #define FindResource FindResourceW |
| 1617 | 1891 | #define FindResourceEx FindResourceExW |
| 1618 | −#define FormatMessage FormatMessageW | |
| 1619 | −#define FreeEnvironmentStrings FreeEnvironmentStringsW | |
| 1892 | +#else | |
| 1893 | +#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA | |
| 1894 | +#define CreateProcess CreateProcessA | |
| 1895 | +#define FatalAppExit FatalAppExitA | |
| 1896 | +#define GetStartupInfo GetStartupInfoA | |
| 1897 | +#define GetCommandLine GetCommandLineA | |
| 1898 | +#define GetEnvironmentVariable GetEnvironmentVariableA | |
| 1899 | +#define SetEnvironmentVariable SetEnvironmentVariableA | |
| 1900 | +#define ExpandEnvironmentStrings ExpandEnvironmentStringsA | |
| 1901 | +#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA | |
| 1902 | +#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA | |
| 1903 | +#define OutputDebugString OutputDebugStringA | |
| 1904 | +#define FindResource FindResourceA | |
| 1905 | +#define FindResourceEx FindResourceExA | |
| 1906 | +#endif | |
| 1907 | + | |
| 1908 | + WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA(LPCSTR ExeName); | |
| 1909 | + WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR ExeName); | |
| 1910 | + WINBASEAPI WINBOOL WINAPI CreateProcessA(LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 1911 | + WINBASEAPI WINBOOL WINAPI CreateProcessW(LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 1912 | + WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameA(LPCSTR lpDnsFQHostname,ULONG ulFlags); | |
| 1913 | + WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameW(LPCWSTR lpDnsFQHostname,ULONG ulFlags); | |
| 1914 | + WINBASEAPI WINBOOL WINAPI SetProcessShutdownParameters(DWORD dwLevel,DWORD dwFlags); | |
| 1915 | + WINBASEAPI WINBOOL WINAPI GetProcessShutdownParameters(LPDWORD lpdwLevel,LPDWORD lpdwFlags); | |
| 1916 | + WINBASEAPI DWORD WINAPI GetProcessVersion(DWORD ProcessId); | |
| 1917 | + WINBASEAPI VOID WINAPI FatalAppExitA(UINT uAction,LPCSTR lpMessageText); | |
| 1918 | + WINBASEAPI VOID WINAPI FatalAppExitW(UINT uAction,LPCWSTR lpMessageText); | |
| 1919 | + WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo); | |
| 1920 | + WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo); | |
| 1921 | + WINBASEAPI LPSTR WINAPI GetCommandLineA(VOID); | |
| 1922 | + WINBASEAPI LPWSTR WINAPI GetCommandLineW(VOID); | |
| 1923 | + WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR lpName,LPSTR lpBuffer,DWORD nSize); | |
| 1924 | + WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR lpName,LPWSTR lpBuffer,DWORD nSize); | |
| 1925 | + WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableA(LPCSTR lpName,LPCSTR lpValue); | |
| 1926 | + WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpValue); | |
| 1927 | + WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR lpSrc,LPSTR lpDst,DWORD nSize); | |
| 1928 | + WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR lpSrc,LPWSTR lpDst,DWORD nSize); | |
| 1929 | + WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pBuffer,DWORD nSize); | |
| 1930 | + WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pBuffer,DWORD nSize); | |
| 1931 | + WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pValue,DWORD nSize); | |
| 1932 | + WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pValue,DWORD nSize); | |
| 1933 | + WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString); | |
| 1934 | + WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString); | |
| 1935 | + WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE hModule,LPCSTR lpName,LPCSTR lpType); | |
| 1936 | + WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule,LPCWSTR lpName,LPCWSTR lpType); | |
| 1937 | + WINBASEAPI HRSRC WINAPI FindResourceExA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage); | |
| 1938 | + WINBASEAPI HRSRC WINAPI FindResourceExW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage); | |
| 1939 | + | |
| 1940 | +#ifdef UNICODE | |
| 1941 | +#define ENUMRESTYPEPROC ENUMRESTYPEPROCW | |
| 1942 | +#define ENUMRESNAMEPROC ENUMRESNAMEPROCW | |
| 1943 | +#define ENUMRESLANGPROC ENUMRESLANGPROCW | |
| 1944 | +#define EnumResourceTypes EnumResourceTypesW | |
| 1945 | +#define EnumResourceNames EnumResourceNamesW | |
| 1946 | +#define EnumResourceLanguages EnumResourceLanguagesW | |
| 1947 | +#define BeginUpdateResource BeginUpdateResourceW | |
| 1948 | +#define UpdateResource UpdateResourceW | |
| 1949 | +#define EndUpdateResource EndUpdateResourceW | |
| 1950 | +#define GlobalAddAtom GlobalAddAtomW | |
| 1951 | +#define GlobalFindAtom GlobalFindAtomW | |
| 1952 | +#define GlobalGetAtomName GlobalGetAtomNameW | |
| 1953 | +#define AddAtom AddAtomW | |
| 1954 | +#define FindAtom FindAtomW | |
| 1620 | 1955 | #define GetAtomName GetAtomNameW |
| 1621 | −#define GetBinaryType GetBinaryTypeW | |
| 1622 | −#define GetCommandLine GetCommandLineW | |
| 1623 | −#define GetCompressedFileSize GetCompressedFileSizeW | |
| 1624 | −#define GetComputerName GetComputerNameW | |
| 1625 | −#define GetCurrentDirectory GetCurrentDirectoryW | |
| 1626 | −#define GetDefaultCommConfig GetDefaultCommConfigW | |
| 1627 | −#define GetDiskFreeSpace GetDiskFreeSpaceW | |
| 1628 | −#define GetDiskFreeSpaceEx GetDiskFreeSpaceExW | |
| 1629 | −#define GetDriveType GetDriveTypeW | |
| 1630 | −#define GetEnvironmentStrings GetEnvironmentStringsW | |
| 1631 | −#define GetEnvironmentVariable GetEnvironmentVariableW | |
| 1632 | −#define GetFileAttributes GetFileAttributesW | |
| 1633 | −#define GetFileSecurity GetFileSecurityW | |
| 1634 | −#define GetFileAttributesEx GetFileAttributesExW | |
| 1635 | −#define GetFullPathName GetFullPathNameW | |
| 1636 | −#define GetLogicalDriveStrings GetLogicalDriveStringsW | |
| 1637 | −#define GetLongPathName GetLongPathNameW | |
| 1638 | −#define GetModuleFileName GetModuleFileNameW | |
| 1639 | −#define GetModuleHandle GetModuleHandleW | |
| 1640 | −#define GetNamedPipeHandleState GetNamedPipeHandleStateW | |
| 1956 | +#define GetProfileInt GetProfileIntW | |
| 1957 | +#define GetProfileString GetProfileStringW | |
| 1958 | +#define WriteProfileString WriteProfileStringW | |
| 1959 | +#define GetProfileSection GetProfileSectionW | |
| 1960 | +#define WriteProfileSection WriteProfileSectionW | |
| 1641 | 1961 | #define GetPrivateProfileInt GetPrivateProfileIntW |
| 1962 | +#define GetPrivateProfileString GetPrivateProfileStringW | |
| 1963 | +#define WritePrivateProfileString WritePrivateProfileStringW | |
| 1642 | 1964 | #define GetPrivateProfileSection GetPrivateProfileSectionW |
| 1965 | +#define WritePrivateProfileSection WritePrivateProfileSectionW | |
| 1643 | 1966 | #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW |
| 1644 | −#define GetPrivateProfileString GetPrivateProfileStringW | |
| 1645 | 1967 | #define GetPrivateProfileStruct GetPrivateProfileStructW |
| 1646 | −#define GetProfileInt GetProfileIntW | |
| 1647 | −#define GetProfileSection GetProfileSectionW | |
| 1648 | −#define GetProfileString GetProfileStringW | |
| 1649 | −#define GetShortPathName GetShortPathNameW | |
| 1650 | −#define GetStartupInfo GetStartupInfoW | |
| 1968 | +#define WritePrivateProfileStruct WritePrivateProfileStructW | |
| 1969 | +#define GetDriveType GetDriveTypeW | |
| 1651 | 1970 | #define GetSystemDirectory GetSystemDirectoryW |
| 1652 | −#define GetTempFileName GetTempFileNameW | |
| 1653 | 1971 | #define GetTempPath GetTempPathW |
| 1654 | −#define GetUserName GetUserNameW | |
| 1655 | −#define GetVersionEx GetVersionExW | |
| 1656 | −#define GetVolumeInformation GetVolumeInformationW | |
| 1972 | +#define GetTempFileName GetTempFileNameW | |
| 1657 | 1973 | #define GetWindowsDirectory GetWindowsDirectoryW |
| 1658 | −#define GlobalAddAtom GlobalAddAtomW | |
| 1659 | −#define GlobalFindAtom GlobalFindAtomW | |
| 1660 | −#define GlobalGetAtomName GlobalGetAtomNameW | |
| 1661 | −#define IsBadStringPtr IsBadStringPtrW | |
| 1662 | −#define LoadLibrary LoadLibraryW | |
| 1663 | −#define LoadLibraryEx LoadLibraryExW | |
| 1664 | −#define LogonUser LogonUserW | |
| 1665 | −#define LookupAccountName LookupAccountNameW | |
| 1666 | −#define LookupAccountSid LookupAccountSidW | |
| 1667 | −#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW | |
| 1668 | −#define LookupPrivilegeName LookupPrivilegeNameW | |
| 1669 | −#define LookupPrivilegeValue LookupPrivilegeValueW | |
| 1670 | −#define lstrcat lstrcatW | |
| 1671 | −#define lstrcmp lstrcmpW | |
| 1672 | −#define lstrcmpi lstrcmpiW | |
| 1673 | −#define lstrcpy lstrcpyW | |
| 1674 | −#define lstrcpyn lstrcpynW | |
| 1675 | −#define lstrlen lstrlenW | |
| 1974 | +#define GetSystemWindowsDirectory GetSystemWindowsDirectoryW | |
| 1975 | +#define AddLocalAlternateComputerName AddLocalAlternateComputerNameW | |
| 1976 | +#else | |
| 1977 | +#define ENUMRESTYPEPROC ENUMRESTYPEPROCA | |
| 1978 | +#define ENUMRESNAMEPROC ENUMRESNAMEPROCA | |
| 1979 | +#define ENUMRESLANGPROC ENUMRESLANGPROCA | |
| 1980 | +#define EnumResourceTypes EnumResourceTypesA | |
| 1981 | +#define EnumResourceNames EnumResourceNamesA | |
| 1982 | +#define EnumResourceLanguages EnumResourceLanguagesA | |
| 1983 | +#define BeginUpdateResource BeginUpdateResourceA | |
| 1984 | +#define UpdateResource UpdateResourceA | |
| 1985 | +#define EndUpdateResource EndUpdateResourceA | |
| 1986 | +#define GlobalAddAtom GlobalAddAtomA | |
| 1987 | +#define GlobalFindAtom GlobalFindAtomA | |
| 1988 | +#define GlobalGetAtomName GlobalGetAtomNameA | |
| 1989 | +#define AddAtom AddAtomA | |
| 1990 | +#define FindAtom FindAtomA | |
| 1991 | +#define GetAtomName GetAtomNameA | |
| 1992 | +#define GetProfileInt GetProfileIntA | |
| 1993 | +#define GetProfileString GetProfileStringA | |
| 1994 | +#define WriteProfileString WriteProfileStringA | |
| 1995 | +#define GetProfileSection GetProfileSectionA | |
| 1996 | +#define WriteProfileSection WriteProfileSectionA | |
| 1997 | +#define GetPrivateProfileInt GetPrivateProfileIntA | |
| 1998 | +#define GetPrivateProfileString GetPrivateProfileStringA | |
| 1999 | +#define WritePrivateProfileString WritePrivateProfileStringA | |
| 2000 | +#define GetPrivateProfileSection GetPrivateProfileSectionA | |
| 2001 | +#define WritePrivateProfileSection WritePrivateProfileSectionA | |
| 2002 | +#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA | |
| 2003 | +#define GetPrivateProfileStruct GetPrivateProfileStructA | |
| 2004 | +#define WritePrivateProfileStruct WritePrivateProfileStructA | |
| 2005 | +#define GetDriveType GetDriveTypeA | |
| 2006 | +#define GetSystemDirectory GetSystemDirectoryA | |
| 2007 | +#define GetTempPath GetTempPathA | |
| 2008 | +#define GetTempFileName GetTempFileNameA | |
| 2009 | +#define GetWindowsDirectory GetWindowsDirectoryA | |
| 2010 | +#define GetSystemWindowsDirectory GetSystemWindowsDirectoryA | |
| 2011 | +#define AddLocalAlternateComputerName AddLocalAlternateComputerNameA | |
| 2012 | +#endif | |
| 2013 | + | |
| 2014 | + typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE hModule,LPSTR lpType,LONG_PTR lParam); | |
| 2015 | + typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE hModule,LPWSTR lpType,LONG_PTR lParam); | |
| 2016 | + typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE hModule,LPCSTR lpType,LPSTR lpName,LONG_PTR lParam); | |
| 2017 | + typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE hModule,LPCWSTR lpType,LPWSTR lpName,LONG_PTR lParam); | |
| 2018 | + typedef WINBOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LONG_PTR lParam); | |
| 2019 | + typedef WINBOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LONG_PTR lParam); | |
| 2020 | + | |
| 2021 | + WINBASEAPI WINBOOL WINAPI EnumResourceTypesA(HMODULE hModule,ENUMRESTYPEPROCA lpEnumFunc,LONG_PTR lParam); | |
| 2022 | + WINBASEAPI WINBOOL WINAPI EnumResourceTypesW(HMODULE hModule,ENUMRESTYPEPROCW lpEnumFunc,LONG_PTR lParam); | |
| 2023 | + WINBASEAPI WINBOOL WINAPI EnumResourceNamesA(HMODULE hModule,LPCSTR lpType,ENUMRESNAMEPROCA lpEnumFunc,LONG_PTR lParam); | |
| 2024 | + WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule,LPCWSTR lpType,ENUMRESNAMEPROCW lpEnumFunc,LONG_PTR lParam); | |
| 2025 | + WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam); | |
| 2026 | + WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,ENUMRESLANGPROCW lpEnumFunc,LONG_PTR lParam); | |
| 2027 | + WINBASEAPI HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName,WINBOOL bDeleteExistingResources); | |
| 2028 | + WINBASEAPI HANDLE WINAPI BeginUpdateResourceW(LPCWSTR pFileName,WINBOOL bDeleteExistingResources); | |
| 2029 | + WINBASEAPI WINBOOL WINAPI UpdateResourceA(HANDLE hUpdate,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb); | |
| 2030 | + WINBASEAPI WINBOOL WINAPI UpdateResourceW(HANDLE hUpdate,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb); | |
| 2031 | + WINBASEAPI WINBOOL WINAPI EndUpdateResourceA(HANDLE hUpdate,WINBOOL fDiscard); | |
| 2032 | + WINBASEAPI WINBOOL WINAPI EndUpdateResourceW(HANDLE hUpdate,WINBOOL fDiscard); | |
| 2033 | + WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR lpString); | |
| 2034 | + WINBASEAPI ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString); | |
| 2035 | + WINBASEAPI ATOM WINAPI GlobalFindAtomA(LPCSTR lpString); | |
| 2036 | + WINBASEAPI ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString); | |
| 2037 | + WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize); | |
| 2038 | + WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize); | |
| 2039 | + WINBASEAPI ATOM WINAPI AddAtomA(LPCSTR lpString); | |
| 2040 | + WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR lpString); | |
| 2041 | + WINBASEAPI ATOM WINAPI FindAtomA(LPCSTR lpString); | |
| 2042 | + WINBASEAPI ATOM WINAPI FindAtomW(LPCWSTR lpString); | |
| 2043 | + WINBASEAPI UINT WINAPI GetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize); | |
| 2044 | + WINBASEAPI UINT WINAPI GetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize); | |
| 2045 | + WINBASEAPI UINT WINAPI GetProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault); | |
| 2046 | + WINBASEAPI UINT WINAPI GetProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault); | |
| 2047 | + WINBASEAPI DWORD WINAPI GetProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize); | |
| 2048 | + WINBASEAPI DWORD WINAPI GetProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize); | |
| 2049 | + WINBASEAPI WINBOOL WINAPI WriteProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString); | |
| 2050 | + WINBASEAPI WINBOOL WINAPI WriteProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString); | |
| 2051 | + WINBASEAPI DWORD WINAPI GetProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize); | |
| 2052 | + WINBASEAPI DWORD WINAPI GetProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize); | |
| 2053 | + WINBASEAPI WINBOOL WINAPI WriteProfileSectionA(LPCSTR lpAppName,LPCSTR lpString); | |
| 2054 | + WINBASEAPI WINBOOL WINAPI WriteProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString); | |
| 2055 | + WINBASEAPI UINT WINAPI GetPrivateProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault,LPCSTR lpFileName); | |
| 2056 | + WINBASEAPI UINT WINAPI GetPrivateProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault,LPCWSTR lpFileName); | |
| 2057 | + WINBASEAPI DWORD WINAPI GetPrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName); | |
| 2058 | + WINBASEAPI DWORD WINAPI GetPrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName); | |
| 2059 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString,LPCSTR lpFileName); | |
| 2060 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString,LPCWSTR lpFileName); | |
| 2061 | + WINBASEAPI DWORD WINAPI GetPrivateProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName); | |
| 2062 | + WINBASEAPI DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName); | |
| 2063 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionA(LPCSTR lpAppName,LPCSTR lpString,LPCSTR lpFileName); | |
| 2064 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString,LPCWSTR lpFileName); | |
| 2065 | + WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR lpszReturnBuffer,DWORD nSize,LPCSTR lpFileName); | |
| 2066 | + WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR lpszReturnBuffer,DWORD nSize,LPCWSTR lpFileName); | |
| 2067 | + WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile); | |
| 2068 | + WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile); | |
| 2069 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile); | |
| 2070 | + WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile); | |
| 2071 | + WINBASEAPI UINT WINAPI GetDriveTypeA(LPCSTR lpRootPathName); | |
| 2072 | + WINBASEAPI UINT WINAPI GetDriveTypeW(LPCWSTR lpRootPathName); | |
| 2073 | + WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR lpBuffer,UINT uSize); | |
| 2074 | + WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR lpBuffer,UINT uSize); | |
| 2075 | + WINBASEAPI DWORD WINAPI GetTempPathA(DWORD nBufferLength,LPSTR lpBuffer); | |
| 2076 | + WINBASEAPI DWORD WINAPI GetTempPathW(DWORD nBufferLength,LPWSTR lpBuffer); | |
| 2077 | + WINBASEAPI UINT WINAPI GetTempFileNameA(LPCSTR lpPathName,LPCSTR lpPrefixString,UINT uUnique,LPSTR lpTempFileName); | |
| 2078 | + WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR lpPathName,LPCWSTR lpPrefixString,UINT uUnique,LPWSTR lpTempFileName); | |
| 2079 | + WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR lpBuffer,UINT uSize); | |
| 2080 | + WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize); | |
| 2081 | + WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR lpBuffer,UINT uSize); | |
| 2082 | + WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize); | |
| 2083 | + | |
| 2084 | +#ifndef RC_INVOKED | |
| 2085 | +#ifdef UNICODE | |
| 2086 | +#define GetSystemWow64Directory GetSystemWow64DirectoryW | |
| 2087 | +#else | |
| 2088 | +#define GetSystemWow64Directory GetSystemWow64DirectoryA | |
| 2089 | +#endif | |
| 2090 | + | |
| 2091 | + WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR lpBuffer,UINT uSize); | |
| 2092 | + WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR lpBuffer,UINT uSize); | |
| 2093 | + WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN Wow64FsEnableRedirection); | |
| 2094 | + WINBASEAPI WINBOOL WINAPI Wow64DisableWow64FsRedirection(PVOID *OldValue); | |
| 2095 | + WINBASEAPI WINBOOL WINAPI Wow64RevertWow64FsRedirection(PVOID OlValue); | |
| 2096 | + | |
| 2097 | + typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_A)(LPSTR lpBuffer,UINT uSize); | |
| 2098 | + typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_W)(LPWSTR lpBuffer,UINT uSize); | |
| 2099 | + | |
| 2100 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA" | |
| 2101 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA" | |
| 2102 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA") | |
| 2103 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW" | |
| 2104 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW" | |
| 2105 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW") | |
| 2106 | + | |
| 2107 | +#ifdef UNICODE | |
| 2108 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A | |
| 2109 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W | |
| 2110 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T | |
| 2111 | +#else | |
| 2112 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A | |
| 2113 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W | |
| 2114 | +#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T | |
| 2115 | +#endif | |
| 2116 | +#endif | |
| 2117 | + | |
| 2118 | +#ifdef UNICODE | |
| 2119 | +#define SetCurrentDirectory SetCurrentDirectoryW | |
| 2120 | +#define GetCurrentDirectory GetCurrentDirectoryW | |
| 2121 | +#define SetDllDirectory SetDllDirectoryW | |
| 2122 | +#define GetDllDirectory GetDllDirectoryW | |
| 2123 | +#define GetDiskFreeSpace GetDiskFreeSpaceW | |
| 2124 | +#define GetDiskFreeSpaceEx GetDiskFreeSpaceExW | |
| 2125 | +#define CreateDirectory CreateDirectoryW | |
| 2126 | +#define CreateDirectoryEx CreateDirectoryExW | |
| 2127 | +#define RemoveDirectory RemoveDirectoryW | |
| 2128 | +#define GetFullPathName GetFullPathNameW | |
| 2129 | +#define DefineDosDevice DefineDosDeviceW | |
| 2130 | +#define QueryDosDevice QueryDosDeviceW | |
| 2131 | +#define CreateFile CreateFileW | |
| 2132 | +#define SetFileAttributes SetFileAttributesW | |
| 2133 | +#define GetFileAttributes GetFileAttributesW | |
| 2134 | +#else | |
| 2135 | +#define SetCurrentDirectory SetCurrentDirectoryA | |
| 2136 | +#define GetCurrentDirectory GetCurrentDirectoryA | |
| 2137 | +#define SetDllDirectory SetDllDirectoryA | |
| 2138 | +#define GetDllDirectory GetDllDirectoryA | |
| 2139 | +#define GetDiskFreeSpace GetDiskFreeSpaceA | |
| 2140 | +#define GetDiskFreeSpaceEx GetDiskFreeSpaceExA | |
| 2141 | +#define CreateDirectory CreateDirectoryA | |
| 2142 | +#define CreateDirectoryEx CreateDirectoryExA | |
| 2143 | +#define RemoveDirectory RemoveDirectoryA | |
| 2144 | +#define GetFullPathName GetFullPathNameA | |
| 2145 | +#define DefineDosDevice DefineDosDeviceA | |
| 2146 | +#define QueryDosDevice QueryDosDeviceA | |
| 2147 | +#define CreateFile CreateFileA | |
| 2148 | +#define SetFileAttributes SetFileAttributesA | |
| 2149 | +#define GetFileAttributes GetFileAttributesA | |
| 2150 | +#endif | |
| 2151 | + | |
| 2152 | + WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryA(LPCSTR lpPathName); | |
| 2153 | + WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryW(LPCWSTR lpPathName); | |
| 2154 | + WINBASEAPI DWORD WINAPI GetCurrentDirectoryA(DWORD nBufferLength,LPSTR lpBuffer); | |
| 2155 | + WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer); | |
| 2156 | + WINBASEAPI WINBOOL WINAPI SetDllDirectoryA(LPCSTR lpPathName); | |
| 2157 | + WINBASEAPI WINBOOL WINAPI SetDllDirectoryW(LPCWSTR lpPathName); | |
| 2158 | + WINBASEAPI DWORD WINAPI GetDllDirectoryA(DWORD nBufferLength,LPSTR lpBuffer); | |
| 2159 | + WINBASEAPI DWORD WINAPI GetDllDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer); | |
| 2160 | + WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceA(LPCSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters); | |
| 2161 | + WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceW(LPCWSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters); | |
| 2162 | + WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExA(LPCSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes); | |
| 2163 | + WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes); | |
| 2164 | + WINBASEAPI WINBOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2165 | + WINBASEAPI WINBOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2166 | + WINBASEAPI WINBOOL WINAPI CreateDirectoryExA(LPCSTR lpTemplateDirectory,LPCSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2167 | + WINBASEAPI WINBOOL WINAPI CreateDirectoryExW(LPCWSTR lpTemplateDirectory,LPCWSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2168 | + WINBASEAPI WINBOOL WINAPI RemoveDirectoryA(LPCSTR lpPathName); | |
| 2169 | + WINBASEAPI WINBOOL WINAPI RemoveDirectoryW(LPCWSTR lpPathName); | |
| 2170 | + WINBASEAPI DWORD WINAPI GetFullPathNameA(LPCSTR lpFileName,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart); | |
| 2171 | + WINBASEAPI DWORD WINAPI GetFullPathNameW(LPCWSTR lpFileName,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart); | |
| 2172 | + | |
| 2173 | +#define DDD_RAW_TARGET_PATH 0x1 | |
| 2174 | +#define DDD_REMOVE_DEFINITION 0x2 | |
| 2175 | +#define DDD_EXACT_MATCH_ON_REMOVE 0x4 | |
| 2176 | +#define DDD_NO_BROADCAST_SYSTEM 0x8 | |
| 2177 | +#define DDD_LUID_BROADCAST_DRIVE 0x10 | |
| 2178 | + | |
| 2179 | + WINBASEAPI WINBOOL WINAPI DefineDosDeviceA(DWORD dwFlags,LPCSTR lpDeviceName,LPCSTR lpTargetPath); | |
| 2180 | + WINBASEAPI WINBOOL WINAPI DefineDosDeviceW(DWORD dwFlags,LPCWSTR lpDeviceName,LPCWSTR lpTargetPath); | |
| 2181 | + WINBASEAPI DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName,LPSTR lpTargetPath,DWORD ucchMax); | |
| 2182 | + WINBASEAPI DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName,LPWSTR lpTargetPath,DWORD ucchMax); | |
| 2183 | + | |
| 2184 | +#define EXPAND_LOCAL_DRIVES | |
| 2185 | + | |
| 2186 | + WINBASEAPI HANDLE WINAPI CreateFileA(LPCSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile); | |
| 2187 | + WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile); | |
| 2188 | + WINBASEAPI HANDLE WINAPI ReOpenFile(HANDLE hOriginalFile,DWORD dwDesiredAccess,DWORD dwShareMode,DWORD dwFlagsAndAttributes); | |
| 2189 | + WINBASEAPI WINBOOL WINAPI SetFileAttributesA(LPCSTR lpFileName,DWORD dwFileAttributes); | |
| 2190 | + WINBASEAPI WINBOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName,DWORD dwFileAttributes); | |
| 2191 | + WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName); | |
| 2192 | + WINBASEAPI DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName); | |
| 2193 | + | |
| 2194 | + typedef enum _GET_FILEEX_INFO_LEVELS { | |
| 2195 | + GetFileExInfoStandard,GetFileExMaxInfoLevel | |
| 2196 | + } GET_FILEEX_INFO_LEVELS; | |
| 2197 | + | |
| 2198 | +#ifdef UNICODE | |
| 2199 | +#define GetFileAttributesEx GetFileAttributesExW | |
| 2200 | +#define GetCompressedFileSize GetCompressedFileSizeW | |
| 2201 | +#define DeleteFile DeleteFileW | |
| 2202 | +#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W | |
| 2203 | +#else | |
| 2204 | +#define GetFileAttributesEx GetFileAttributesExA | |
| 2205 | +#define GetCompressedFileSize GetCompressedFileSizeA | |
| 2206 | +#define DeleteFile DeleteFileA | |
| 2207 | +#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A | |
| 2208 | +#endif | |
| 2209 | + | |
| 2210 | + WINBASEAPI WINBOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation); | |
| 2211 | + WINBASEAPI WINBOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation); | |
| 2212 | + WINBASEAPI DWORD WINAPI GetCompressedFileSizeA(LPCSTR lpFileName,LPDWORD lpFileSizeHigh); | |
| 2213 | + WINBASEAPI DWORD WINAPI GetCompressedFileSizeW(LPCWSTR lpFileName,LPDWORD lpFileSizeHigh); | |
| 2214 | + WINBASEAPI WINBOOL WINAPI DeleteFileA(LPCSTR lpFileName); | |
| 2215 | + WINBASEAPI WINBOOL WINAPI DeleteFileW(LPCWSTR lpFileName); | |
| 2216 | + WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal); | |
| 2217 | + WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal); | |
| 2218 | + | |
| 2219 | + typedef enum _FINDEX_INFO_LEVELS { | |
| 2220 | + FindExInfoStandard,FindExInfoMaxInfoLevel | |
| 2221 | + } FINDEX_INFO_LEVELS; | |
| 2222 | + | |
| 2223 | + typedef enum _FINDEX_SEARCH_OPS { | |
| 2224 | + FindExSearchNameMatch,FindExSearchLimitToDirectories,FindExSearchLimitToDevices,FindExSearchMaxSearchOp | |
| 2225 | + } FINDEX_SEARCH_OPS; | |
| 2226 | + | |
| 2227 | +#define FIND_FIRST_EX_CASE_SENSITIVE 0x1 | |
| 2228 | + | |
| 2229 | +#ifdef UNICODE | |
| 2230 | +#define FindFirstFileEx FindFirstFileExW | |
| 2231 | +#define FindFirstFile FindFirstFileW | |
| 2232 | +#define FindNextFile FindNextFileW | |
| 2233 | +#define SearchPath SearchPathW | |
| 2234 | +#define CopyFile CopyFileW | |
| 2235 | +#define CopyFileEx CopyFileExW | |
| 1676 | 2236 | #define MoveFile MoveFileW |
| 1677 | 2237 | #define MoveFileEx MoveFileExW |
| 1678 | −#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW | |
| 1679 | −#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW | |
| 1680 | −#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW | |
| 1681 | −#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW | |
| 1682 | −#define OpenBackupEventLog OpenBackupEventLogW | |
| 1683 | −#define OpenEvent OpenEventW | |
| 2238 | +#define MoveFileWithProgress MoveFileWithProgressW | |
| 2239 | +#define ReplaceFile ReplaceFileW | |
| 2240 | +#define CreateHardLink CreateHardLinkW | |
| 2241 | +#define CreateNamedPipe CreateNamedPipeW | |
| 2242 | +#define GetNamedPipeHandleState GetNamedPipeHandleStateW | |
| 2243 | +#define CallNamedPipe CallNamedPipeW | |
| 2244 | +#define WaitNamedPipe WaitNamedPipeW | |
| 2245 | +#define SetVolumeLabel SetVolumeLabelW | |
| 2246 | +#define GetVolumeInformation GetVolumeInformationW | |
| 2247 | +#define ClearEventLog ClearEventLogW | |
| 2248 | +#define BackupEventLog BackupEventLogW | |
| 1684 | 2249 | #define OpenEventLog OpenEventLogW |
| 1685 | −#define OpenFileMapping OpenFileMappingW | |
| 1686 | −#define OpenMutex OpenMutexW | |
| 1687 | −#define OpenSemaphore OpenSemaphoreW | |
| 1688 | −#define OutputDebugString OutputDebugStringW | |
| 1689 | −#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW | |
| 1690 | −#define QueryDosDevice QueryDosDeviceW | |
| 1691 | −#define ReadEventLog ReadEventLogW | |
| 1692 | 2250 | #define RegisterEventSource RegisterEventSourceW |
| 1693 | −#define RemoveDirectory RemoveDirectoryW | |
| 2251 | +#define OpenBackupEventLog OpenBackupEventLogW | |
| 2252 | +#define ReadEventLog ReadEventLogW | |
| 1694 | 2253 | #define ReportEvent ReportEventW |
| 1695 | −#define SearchPath SearchPathW | |
| 1696 | −#define SetComputerName SetComputerNameW | |
| 1697 | −#define SetCurrentDirectory SetCurrentDirectoryW | |
| 1698 | −#define SetDefaultCommConfig SetDefaultCommConfigW | |
| 1699 | −#define SetEnvironmentVariable SetEnvironmentVariableW | |
| 1700 | −#define SetFileAttributes SetFileAttributesW | |
| 2254 | +#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW | |
| 2255 | +#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW | |
| 2256 | +#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmW | |
| 2257 | +#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleW | |
| 2258 | +#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW | |
| 2259 | +#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW | |
| 2260 | +#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW | |
| 2261 | +#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW | |
| 2262 | +#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW | |
| 1701 | 2263 | #define SetFileSecurity SetFileSecurityW |
| 1702 | −#define SetVolumeLabel SetVolumeLabelW | |
| 1703 | −#define UpdateResource UpdateResourceW | |
| 1704 | −#define VerifyVersionInfo VerifyVersionInfoW | |
| 1705 | −#define WaitNamedPipe WaitNamedPipeW | |
| 1706 | −#define WritePrivateProfileSection WritePrivateProfileSectionW | |
| 1707 | −#define WritePrivateProfileString WritePrivateProfileStringW | |
| 1708 | −#define WritePrivateProfileStruct WritePrivateProfileStructW | |
| 1709 | −#define WriteProfileSection WriteProfileSectionW | |
| 1710 | −#define WriteProfileString WriteProfileStringW | |
| 1711 | −#else | |
| 1712 | −typedef STARTUPINFOA STARTUPINFO,*LPSTARTUPINFO; | |
| 1713 | −typedef WIN32_FIND_DATAA WIN32_FIND_DATA,*LPWIN32_FIND_DATA; | |
| 1714 | −typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO; | |
| 1715 | −#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA | |
| 1716 | −#define AddAtom AddAtomA | |
| 1717 | −#define BackupEventLog BackupEventLogA | |
| 1718 | −#define BeginUpdateResource BeginUpdateResourceA | |
| 1719 | −#define BuildCommDCB BuildCommDCBA | |
| 1720 | −#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA | |
| 1721 | −#define CallNamedPipe CallNamedPipeA | |
| 1722 | −#define ClearEventLog ClearEventLogA | |
| 1723 | −#define CommConfigDialog CommConfigDialogA | |
| 2264 | +#define GetFileSecurity GetFileSecurityW | |
| 2265 | +#define FindFirstChangeNotification FindFirstChangeNotificationW | |
| 2266 | +#define IsBadStringPtr IsBadStringPtrW | |
| 2267 | +#define LookupAccountSid LookupAccountSidW | |
| 2268 | +#define LookupAccountName LookupAccountNameW | |
| 2269 | +#define LookupPrivilegeValue LookupPrivilegeValueW | |
| 2270 | +#define LookupPrivilegeName LookupPrivilegeNameW | |
| 2271 | +#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW | |
| 2272 | +#define BuildCommDCB BuildCommDCBW | |
| 2273 | +#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW | |
| 2274 | +#define CommConfigDialog CommConfigDialogW | |
| 2275 | +#define GetDefaultCommConfig GetDefaultCommConfigW | |
| 2276 | +#define SetDefaultCommConfig SetDefaultCommConfigW | |
| 2277 | +#define GetComputerName GetComputerNameW | |
| 2278 | +#define SetComputerName SetComputerNameW | |
| 2279 | +#define GetComputerNameEx GetComputerNameExW | |
| 2280 | +#define SetComputerNameEx SetComputerNameExW | |
| 2281 | +#define DnsHostnameToComputerName DnsHostnameToComputerNameW | |
| 2282 | +#define GetUserName GetUserNameW | |
| 2283 | +#else | |
| 2284 | +#define FindFirstFileEx FindFirstFileExA | |
| 2285 | +#define FindFirstFile FindFirstFileA | |
| 2286 | +#define FindNextFile FindNextFileA | |
| 2287 | +#define SearchPath SearchPathA | |
| 1724 | 2288 | #define CopyFile CopyFileA |
| 1725 | 2289 | #define CopyFileEx CopyFileExA |
| 1726 | −#define CreateDirectory CreateDirectoryA | |
| 1727 | −#define CreateDirectoryEx CreateDirectoryExA | |
| 1728 | −#define CreateEvent CreateEventA | |
| 1729 | −#define CreateFile CreateFileA | |
| 1730 | −#define CreateFileMapping CreateFileMappingA | |
| 2290 | +#define MoveFile MoveFileA | |
| 2291 | +#define MoveFileEx MoveFileExA | |
| 2292 | +#define MoveFileWithProgress MoveFileWithProgressA | |
| 2293 | +#define ReplaceFile ReplaceFileA | |
| 1731 | 2294 | #define CreateHardLink CreateHardLinkA |
| 1732 | −#define CreateMailslot CreateMailslotA | |
| 1733 | −#define CreateMutex CreateMutexA | |
| 1734 | 2295 | #define CreateNamedPipe CreateNamedPipeA |
| 1735 | −#define CreateProcess CreateProcessA | |
| 1736 | −#define CreateProcessAsUser CreateProcessAsUserA | |
| 1737 | −#define CreateSemaphore CreateSemaphoreA | |
| 1738 | −#define CreateWaitableTimer CreateWaitableTimerA | |
| 1739 | −#define DefineDosDevice DefineDosDeviceA | |
| 1740 | −#define DeleteFile DeleteFileA | |
| 1741 | −#define EndUpdateResource EndUpdateResourceA | |
| 1742 | −#define EnumResourceLanguages EnumResourceLanguagesA | |
| 1743 | −#define EnumResourceNames EnumResourceNamesA | |
| 1744 | −#define EnumResourceTypes EnumResourceTypesA | |
| 1745 | −#define ExpandEnvironmentStrings ExpandEnvironmentStringsA | |
| 1746 | −#define FatalAppExit FatalAppExitA | |
| 1747 | −#define FindAtom FindAtomA | |
| 1748 | −#define FindFirstChangeNotification FindFirstChangeNotificationA | |
| 1749 | −#define FindFirstFile FindFirstFileA | |
| 1750 | −#define FindFirstFileEx FindFirstFileExW | |
| 1751 | −#define FindNextFile FindNextFileA | |
| 1752 | −#define FindResource FindResourceA | |
| 1753 | −#define FindResourceEx FindResourceExA | |
| 1754 | −#define FormatMessage FormatMessageA | |
| 1755 | −#define FreeEnvironmentStrings FreeEnvironmentStringsA | |
| 1756 | −#define GetAtomName GetAtomNameA | |
| 1757 | −#define GetBinaryType GetBinaryTypeA | |
| 1758 | −#define GetCommandLine GetCommandLineA | |
| 1759 | −#define GetComputerName GetComputerNameA | |
| 1760 | −#define GetCompressedFileSize GetCompressedFileSizeA | |
| 1761 | −#define GetCurrentDirectory GetCurrentDirectoryA | |
| 1762 | −#define GetDefaultCommConfig GetDefaultCommConfigA | |
| 1763 | −#define GetDiskFreeSpace GetDiskFreeSpaceA | |
| 1764 | −#define GetDiskFreeSpaceEx GetDiskFreeSpaceExA | |
| 1765 | −#define GetDriveType GetDriveTypeA | |
| 1766 | −#define GetEnvironmentStringsA GetEnvironmentStrings | |
| 1767 | −#define GetEnvironmentVariable GetEnvironmentVariableA | |
| 1768 | −#define GetFileAttributes GetFileAttributesA | |
| 1769 | −#define GetFileSecurity GetFileSecurityA | |
| 1770 | −#define GetFileAttributesEx GetFileAttributesExA | |
| 1771 | −#define GetFullPathName GetFullPathNameA | |
| 1772 | −#define GetLogicalDriveStrings GetLogicalDriveStringsA | |
| 1773 | −#define GetLongPathName GetLongPathNameA | |
| 1774 | 2296 | #define GetNamedPipeHandleState GetNamedPipeHandleStateA |
| 1775 | −#define GetModuleHandle GetModuleHandleA | |
| 1776 | −#define GetModuleFileName GetModuleFileNameA | |
| 1777 | −#define GetPrivateProfileInt GetPrivateProfileIntA | |
| 1778 | −#define GetPrivateProfileSection GetPrivateProfileSectionA | |
| 1779 | −#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA | |
| 1780 | −#define GetPrivateProfileString GetPrivateProfileStringA | |
| 1781 | −#define GetPrivateProfileStruct GetPrivateProfileStructA | |
| 1782 | −#define GetProfileInt GetProfileIntA | |
| 1783 | −#define GetProfileSection GetProfileSectionA | |
| 1784 | −#define GetProfileString GetProfileStringA | |
| 1785 | −#define GetShortPathName GetShortPathNameA | |
| 1786 | −#define GetStartupInfo GetStartupInfoA | |
| 1787 | −#define GetSystemDirectory GetSystemDirectoryA | |
| 1788 | −#define GetTempFileName GetTempFileNameA | |
| 1789 | −#define GetTempPath GetTempPathA | |
| 1790 | −#define GetUserName GetUserNameA | |
| 1791 | −#define GetVersionEx GetVersionExA | |
| 2297 | +#define CallNamedPipe CallNamedPipeA | |
| 2298 | +#define WaitNamedPipe WaitNamedPipeA | |
| 2299 | +#define SetVolumeLabel SetVolumeLabelA | |
| 1792 | 2300 | #define GetVolumeInformation GetVolumeInformationA |
| 1793 | −#define GetWindowsDirectory GetWindowsDirectoryA | |
| 1794 | −#define GlobalAddAtom GlobalAddAtomA | |
| 1795 | −#define GlobalFindAtom GlobalFindAtomA | |
| 1796 | −#define GlobalGetAtomName GlobalGetAtomNameA | |
| 1797 | −#define IsBadStringPtr IsBadStringPtrA | |
| 1798 | −#define LoadLibrary LoadLibraryA | |
| 1799 | −#define LoadLibraryEx LoadLibraryExA | |
| 1800 | −#define LogonUser LogonUserA | |
| 1801 | −#define LookupAccountName LookupAccountNameA | |
| 1802 | −#define LookupAccountSid LookupAccountSidA | |
| 1803 | −#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA | |
| 1804 | −#define LookupPrivilegeName LookupPrivilegeNameA | |
| 1805 | −#define LookupPrivilegeValue LookupPrivilegeValueA | |
| 1806 | −#define lstrcat lstrcatA | |
| 1807 | −#define lstrcmp lstrcmpA | |
| 1808 | −#define lstrcmpi lstrcmpiA | |
| 1809 | −#define lstrcpy lstrcpyA | |
| 1810 | −#define lstrcpyn lstrcpynA | |
| 1811 | −#define lstrlen lstrlenA | |
| 1812 | −#define MoveFile MoveFileA | |
| 1813 | −#define MoveFileEx MoveFileExA | |
| 1814 | −#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA | |
| 1815 | −#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA | |
| 1816 | −#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA | |
| 1817 | −#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA | |
| 1818 | −#define OpenBackupEventLog OpenBackupEventLogA | |
| 1819 | −#define OpenEvent OpenEventA | |
| 2301 | +#define ClearEventLog ClearEventLogA | |
| 2302 | +#define BackupEventLog BackupEventLogA | |
| 1820 | 2303 | #define OpenEventLog OpenEventLogA |
| 1821 | −#define OpenFileMapping OpenFileMappingA | |
| 1822 | −#define OpenMutex OpenMutexA | |
| 1823 | −#define OpenSemaphore OpenSemaphoreA | |
| 1824 | −#define OutputDebugString OutputDebugStringA | |
| 1825 | −#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA | |
| 1826 | −#define QueryDosDevice QueryDosDeviceA | |
| 1827 | −#define ReadEventLog ReadEventLogA | |
| 1828 | 2304 | #define RegisterEventSource RegisterEventSourceA |
| 1829 | −#define RemoveDirectory RemoveDirectoryA | |
| 2305 | +#define OpenBackupEventLog OpenBackupEventLogA | |
| 2306 | +#define ReadEventLog ReadEventLogA | |
| 1830 | 2307 | #define ReportEvent ReportEventA |
| 1831 | −#define SearchPath SearchPathA | |
| 1832 | −#define SetComputerName SetComputerNameA | |
| 1833 | −#define SetCurrentDirectory SetCurrentDirectoryA | |
| 1834 | −#define SetDefaultCommConfig SetDefaultCommConfigA | |
| 1835 | −#define SetEnvironmentVariable SetEnvironmentVariableA | |
| 1836 | −#define SetFileAttributes SetFileAttributesA | |
| 2308 | +#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA | |
| 2309 | +#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA | |
| 2310 | +#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmA | |
| 2311 | +#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleA | |
| 2312 | +#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA | |
| 2313 | +#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA | |
| 2314 | +#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA | |
| 2315 | +#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA | |
| 2316 | +#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA | |
| 1837 | 2317 | #define SetFileSecurity SetFileSecurityA |
| 1838 | −#define SetVolumeLabel SetVolumeLabelA | |
| 1839 | −#define UpdateResource UpdateResourceA | |
| 2318 | +#define GetFileSecurity GetFileSecurityA | |
| 2319 | +#define FindFirstChangeNotification FindFirstChangeNotificationA | |
| 2320 | +#define IsBadStringPtr IsBadStringPtrA | |
| 2321 | +#define LookupAccountSid LookupAccountSidA | |
| 2322 | +#define LookupAccountName LookupAccountNameA | |
| 2323 | +#define LookupPrivilegeValue LookupPrivilegeValueA | |
| 2324 | +#define LookupPrivilegeName LookupPrivilegeNameA | |
| 2325 | +#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA | |
| 2326 | +#define BuildCommDCB BuildCommDCBA | |
| 2327 | +#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA | |
| 2328 | +#define CommConfigDialog CommConfigDialogA | |
| 2329 | +#define GetDefaultCommConfig GetDefaultCommConfigA | |
| 2330 | +#define SetDefaultCommConfig SetDefaultCommConfigA | |
| 2331 | +#define GetComputerName GetComputerNameA | |
| 2332 | +#define SetComputerName SetComputerNameA | |
| 2333 | +#define GetComputerNameEx GetComputerNameExA | |
| 2334 | +#define SetComputerNameEx SetComputerNameExA | |
| 2335 | +#define DnsHostnameToComputerName DnsHostnameToComputerNameA | |
| 2336 | +#define GetUserName GetUserNameA | |
| 2337 | +#endif | |
| 2338 | + | |
| 2339 | + WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags); | |
| 2340 | + WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags); | |
| 2341 | + WINBASEAPI HANDLE WINAPI FindFirstFileA(LPCSTR lpFileName,LPWIN32_FIND_DATAA lpFindFileData); | |
| 2342 | + WINBASEAPI HANDLE WINAPI FindFirstFileW(LPCWSTR lpFileName,LPWIN32_FIND_DATAW lpFindFileData); | |
| 2343 | + WINBASEAPI WINBOOL WINAPI FindNextFileA(HANDLE hFindFile,LPWIN32_FIND_DATAA lpFindFileData); | |
| 2344 | + WINBASEAPI WINBOOL WINAPI FindNextFileW(HANDLE hFindFile,LPWIN32_FIND_DATAW lpFindFileData); | |
| 2345 | + WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR lpPath,LPCSTR lpFileName,LPCSTR lpExtension,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart); | |
| 2346 | + WINBASEAPI DWORD WINAPI SearchPathW(LPCWSTR lpPath,LPCWSTR lpFileName,LPCWSTR lpExtension,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart); | |
| 2347 | + WINBASEAPI WINBOOL WINAPI CopyFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,WINBOOL bFailIfExists); | |
| 2348 | + WINBASEAPI WINBOOL WINAPI CopyFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,WINBOOL bFailIfExists); | |
| 2349 | + | |
| 2350 | + typedef DWORD (WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER TotalFileSize,LARGE_INTEGER TotalBytesTransferred,LARGE_INTEGER StreamSize,LARGE_INTEGER StreamBytesTransferred,DWORD dwStreamNumber,DWORD dwCallbackReason,HANDLE hSourceFile,HANDLE hDestinationFile,LPVOID lpData); | |
| 2351 | + | |
| 2352 | + WINBASEAPI WINBOOL WINAPI CopyFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags); | |
| 2353 | + WINBASEAPI WINBOOL WINAPI CopyFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags); | |
| 2354 | + WINBASEAPI WINBOOL WINAPI MoveFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName); | |
| 2355 | + WINBASEAPI WINBOOL WINAPI MoveFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName); | |
| 2356 | + WINBASEAPI WINBOOL WINAPI MoveFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags); | |
| 2357 | + WINBASEAPI WINBOOL WINAPI MoveFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,DWORD dwFlags); | |
| 2358 | + WINBASEAPI WINBOOL WINAPI MoveFileWithProgressA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags); | |
| 2359 | + WINBASEAPI WINBOOL WINAPI MoveFileWithProgressW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags); | |
| 2360 | + | |
| 2361 | +#define MOVEFILE_REPLACE_EXISTING 0x1 | |
| 2362 | +#define MOVEFILE_COPY_ALLOWED 0x2 | |
| 2363 | +#define MOVEFILE_DELAY_UNTIL_REBOOT 0x4 | |
| 2364 | +#define MOVEFILE_WRITE_THROUGH 0x8 | |
| 2365 | +#define MOVEFILE_CREATE_HARDLINK 0x10 | |
| 2366 | +#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x20 | |
| 2367 | + | |
| 2368 | + WINBASEAPI WINBOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,LPCSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved); | |
| 2369 | + WINBASEAPI WINBOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName,LPCWSTR lpReplacementFileName,LPCWSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved); | |
| 2370 | + WINBASEAPI WINBOOL WINAPI CreateHardLinkA(LPCSTR lpFileName,LPCSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2371 | + WINBASEAPI WINBOOL WINAPI CreateHardLinkW(LPCWSTR lpFileName,LPCWSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2372 | + | |
| 2373 | + typedef enum _STREAM_INFO_LEVELS { | |
| 2374 | + FindStreamInfoStandard,FindStreamInfoMaxInfoLevel | |
| 2375 | + } STREAM_INFO_LEVELS; | |
| 2376 | + | |
| 2377 | + typedef struct _WIN32_FIND_STREAM_DATA { | |
| 2378 | + LARGE_INTEGER StreamSize; | |
| 2379 | + WCHAR cStreamName[MAX_PATH + 36]; | |
| 2380 | + } WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA; | |
| 2381 | + | |
| 2382 | + HANDLE WINAPI FindFirstStreamW(LPCWSTR lpFileName,STREAM_INFO_LEVELS InfoLevel,LPVOID lpFindStreamData,DWORD dwFlags); | |
| 2383 | + WINBOOL WINAPI FindNextStreamW(HANDLE hFindStream,LPVOID lpFindStreamData); | |
| 2384 | + WINBASEAPI HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2385 | + WINBASEAPI HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes); | |
| 2386 | + WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateA(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPSTR lpUserName,DWORD nMaxUserNameSize); | |
| 2387 | + WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateW(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPWSTR lpUserName,DWORD nMaxUserNameSize); | |
| 2388 | + WINBASEAPI WINBOOL WINAPI CallNamedPipeA(LPCSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut); | |
| 2389 | + WINBASEAPI WINBOOL WINAPI CallNamedPipeW(LPCWSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut); | |
| 2390 | + WINBASEAPI WINBOOL WINAPI WaitNamedPipeA(LPCSTR lpNamedPipeName,DWORD nTimeOut); | |
| 2391 | + WINBASEAPI WINBOOL WINAPI WaitNamedPipeW(LPCWSTR lpNamedPipeName,DWORD nTimeOut); | |
| 2392 | + WINBASEAPI WINBOOL WINAPI SetVolumeLabelA(LPCSTR lpRootPathName,LPCSTR lpVolumeName); | |
| 2393 | + WINBASEAPI WINBOOL WINAPI SetVolumeLabelW(LPCWSTR lpRootPathName,LPCWSTR lpVolumeName); | |
| 2394 | + WINBASEAPI VOID WINAPI SetFileApisToOEM(VOID); | |
| 2395 | + WINBASEAPI VOID WINAPI SetFileApisToANSI(VOID); | |
| 2396 | + WINBASEAPI WINBOOL WINAPI AreFileApisANSI(VOID); | |
| 2397 | + WINBASEAPI WINBOOL WINAPI GetVolumeInformationA(LPCSTR lpRootPathName,LPSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize); | |
| 2398 | + WINBASEAPI WINBOOL WINAPI GetVolumeInformationW(LPCWSTR lpRootPathName,LPWSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPWSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize); | |
| 2399 | + WINBASEAPI WINBOOL WINAPI CancelIo(HANDLE hFile); | |
| 2400 | + WINADVAPI WINBOOL WINAPI ClearEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName); | |
| 2401 | + WINADVAPI WINBOOL WINAPI ClearEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName); | |
| 2402 | + WINADVAPI WINBOOL WINAPI BackupEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName); | |
| 2403 | + WINADVAPI WINBOOL WINAPI BackupEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName); | |
| 2404 | + WINADVAPI WINBOOL WINAPI CloseEventLog(HANDLE hEventLog); | |
| 2405 | + WINADVAPI WINBOOL WINAPI DeregisterEventSource(HANDLE hEventLog); | |
| 2406 | + WINADVAPI WINBOOL WINAPI NotifyChangeEventLog(HANDLE hEventLog,HANDLE hEvent); | |
| 2407 | + WINADVAPI WINBOOL WINAPI GetNumberOfEventLogRecords(HANDLE hEventLog,PDWORD NumberOfRecords); | |
| 2408 | + WINADVAPI WINBOOL WINAPI GetOldestEventLogRecord(HANDLE hEventLog,PDWORD OldestRecord); | |
| 2409 | + WINADVAPI HANDLE WINAPI OpenEventLogA(LPCSTR lpUNCServerName,LPCSTR lpSourceName); | |
| 2410 | + WINADVAPI HANDLE WINAPI OpenEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName); | |
| 2411 | + WINADVAPI HANDLE WINAPI RegisterEventSourceA(LPCSTR lpUNCServerName,LPCSTR lpSourceName); | |
| 2412 | + WINADVAPI HANDLE WINAPI RegisterEventSourceW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName); | |
| 2413 | + WINADVAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR lpUNCServerName,LPCSTR lpFileName); | |
| 2414 | + WINADVAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpFileName); | |
| 2415 | + WINADVAPI WINBOOL WINAPI ReadEventLogA(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded); | |
| 2416 | + WINADVAPI WINBOOL WINAPI ReadEventLogW(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded); | |
| 2417 | + WINADVAPI WINBOOL WINAPI ReportEventA(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCSTR *lpStrings,LPVOID lpRawData); | |
| 2418 | + WINADVAPI WINBOOL WINAPI ReportEventW(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCWSTR *lpStrings,LPVOID lpRawData); | |
| 2419 | + | |
| 2420 | +#define EVENTLOG_FULL_INFO 0 | |
| 2421 | + | |
| 2422 | + typedef struct _EVENTLOG_FULL_INFORMATION { | |
| 2423 | + DWORD dwFull; | |
| 2424 | + } EVENTLOG_FULL_INFORMATION,*LPEVENTLOG_FULL_INFORMATION; | |
| 2425 | + | |
| 2426 | + WINADVAPI WINBOOL WINAPI GetEventLogInformation(HANDLE hEventLog,DWORD dwInfoLevel,LPVOID lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded); | |
| 2427 | + WINADVAPI WINBOOL WINAPI DuplicateToken(HANDLE ExistingTokenHandle,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,PHANDLE DuplicateTokenHandle); | |
| 2428 | + WINADVAPI WINBOOL WINAPI GetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); | |
| 2429 | + WINADVAPI WINBOOL WINAPI ImpersonateNamedPipeClient(HANDLE hNamedPipe); | |
| 2430 | + WINADVAPI WINBOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); | |
| 2431 | + WINADVAPI WINBOOL WINAPI RevertToSelf(VOID); | |
| 2432 | + WINADVAPI WINBOOL WINAPI SetThreadToken (PHANDLE Thread,HANDLE Token); | |
| 2433 | + WINADVAPI WINBOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus); | |
| 2434 | + WINADVAPI WINBOOL WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus); | |
| 2435 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultList(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccessList,LPDWORD AccessStatusList); | |
| 2436 | + WINADVAPI WINBOOL WINAPI OpenProcessToken(HANDLE ProcessHandle,DWORD DesiredAccess,PHANDLE TokenHandle); | |
| 2437 | + WINADVAPI WINBOOL WINAPI OpenThreadToken(HANDLE ThreadHandle,DWORD DesiredAccess,WINBOOL OpenAsSelf,PHANDLE TokenHandle); | |
| 2438 | + WINADVAPI WINBOOL WINAPI GetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength,PDWORD ReturnLength); | |
| 2439 | + WINADVAPI WINBOOL WINAPI SetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength); | |
| 2440 | + WINADVAPI WINBOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle,WINBOOL DisableAllPrivileges,PTOKEN_PRIVILEGES NewState,DWORD BufferLength,PTOKEN_PRIVILEGES PreviousState,PDWORD ReturnLength); | |
| 2441 | + WINADVAPI WINBOOL WINAPI AdjustTokenGroups(HANDLE TokenHandle,WINBOOL ResetToDefault,PTOKEN_GROUPS NewState,DWORD BufferLength,PTOKEN_GROUPS PreviousState,PDWORD ReturnLength); | |
| 2442 | + WINADVAPI WINBOOL WINAPI PrivilegeCheck(HANDLE ClientToken,PPRIVILEGE_SET RequiredPrivileges,LPBOOL pfResult); | |
| 2443 | + WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); | |
| 2444 | + WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); | |
| 2445 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); | |
| 2446 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); | |
| 2447 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); | |
| 2448 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); | |
| 2449 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); | |
| 2450 | + WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); | |
| 2451 | + WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose); | |
| 2452 | + WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose); | |
| 2453 | + WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); | |
| 2454 | + WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); | |
| 2455 | + WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); | |
| 2456 | + WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); | |
| 2457 | + WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); | |
| 2458 | + WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); | |
| 2459 | + WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR SubsystemName,LPCSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); | |
| 2460 | + WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR SubsystemName,LPCWSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); | |
| 2461 | + WINADVAPI WINBOOL WINAPI IsWellKnownSid(PSID pSid,WELL_KNOWN_SID_TYPE WellKnownSidType); | |
| 2462 | + WINADVAPI WINBOOL WINAPI CreateWellKnownSid(WELL_KNOWN_SID_TYPE WellKnownSidType,PSID DomainSid,PSID pSid,DWORD *cbSid); | |
| 2463 | + WINADVAPI WINBOOL WINAPI EqualDomainSid(PSID pSid1,PSID pSid2,WINBOOL *pfEqual); | |
| 2464 | + WINADVAPI WINBOOL WINAPI GetWindowsAccountDomainSid(PSID pSid,PSID pDomainSid,DWORD *cbDomainSid); | |
| 2465 | + WINADVAPI WINBOOL WINAPI IsValidSid(PSID pSid); | |
| 2466 | + WINADVAPI WINBOOL WINAPI EqualSid(PSID pSid1,PSID pSid2); | |
| 2467 | + WINADVAPI WINBOOL WINAPI EqualPrefixSid(PSID pSid1,PSID pSid2); | |
| 2468 | + WINADVAPI DWORD WINAPI GetSidLengthRequired (UCHAR nSubAuthorityCount); | |
| 2469 | + WINADVAPI WINBOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount,DWORD nSubAuthority0,DWORD nSubAuthority1,DWORD nSubAuthority2,DWORD nSubAuthority3,DWORD nSubAuthority4,DWORD nSubAuthority5,DWORD nSubAuthority6,DWORD nSubAuthority7,PSID *pSid); | |
| 2470 | + WINADVAPI PVOID WINAPI FreeSid(PSID pSid); | |
| 2471 | + WINADVAPI WINBOOL WINAPI InitializeSid(PSID Sid,PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount); | |
| 2472 | + WINADVAPI PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid); | |
| 2473 | + WINADVAPI PDWORD WINAPI GetSidSubAuthority(PSID pSid,DWORD nSubAuthority); | |
| 2474 | + WINADVAPI PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid); | |
| 2475 | + WINADVAPI DWORD WINAPI GetLengthSid(PSID pSid); | |
| 2476 | + WINADVAPI WINBOOL WINAPI CopySid(DWORD nDestinationSidLength,PSID pDestinationSid,PSID pSourceSid); | |
| 2477 | + WINADVAPI WINBOOL WINAPI AreAllAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess); | |
| 2478 | + WINADVAPI WINBOOL WINAPI AreAnyAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess); | |
| 2479 | + WINADVAPI VOID WINAPI MapGenericMask(PDWORD AccessMask,PGENERIC_MAPPING GenericMapping); | |
| 2480 | + WINADVAPI WINBOOL WINAPI IsValidAcl(PACL pAcl); | |
| 2481 | + WINADVAPI WINBOOL WINAPI InitializeAcl(PACL pAcl,DWORD nAclLength,DWORD dwAclRevision); | |
| 2482 | + WINADVAPI WINBOOL WINAPI GetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass); | |
| 2483 | + WINADVAPI WINBOOL WINAPI SetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass); | |
| 2484 | + WINADVAPI WINBOOL WINAPI AddAce(PACL pAcl,DWORD dwAceRevision,DWORD dwStartingAceIndex,LPVOID pAceList,DWORD nAceListLength); | |
| 2485 | + WINADVAPI WINBOOL WINAPI DeleteAce(PACL pAcl,DWORD dwAceIndex); | |
| 2486 | + WINADVAPI WINBOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce); | |
| 2487 | + WINADVAPI WINBOOL WINAPI AddAccessAllowedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid); | |
| 2488 | + WINADVAPI WINBOOL WINAPI AddAccessAllowedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid); | |
| 2489 | + WINADVAPI WINBOOL WINAPI AddAccessDeniedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid); | |
| 2490 | + WINADVAPI WINBOOL WINAPI AddAccessDeniedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid); | |
| 2491 | + WINADVAPI WINBOOL WINAPI AddAuditAccessAce(PACL pAcl,DWORD dwAceRevision,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); | |
| 2492 | + WINADVAPI WINBOOL WINAPI AddAuditAccessAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); | |
| 2493 | + WINADVAPI WINBOOL WINAPI AddAccessAllowedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid); | |
| 2494 | + WINADVAPI WINBOOL WINAPI AddAccessDeniedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid); | |
| 2495 | + WINADVAPI WINBOOL WINAPI AddAuditAccessObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); | |
| 2496 | + WINADVAPI WINBOOL WINAPI FindFirstFreeAce(PACL pAcl,LPVOID *pAce); | |
| 2497 | + WINADVAPI WINBOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD dwRevision); | |
| 2498 | + WINADVAPI WINBOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor); | |
| 2499 | + WINADVAPI DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor); | |
| 2500 | + WINADVAPI WINBOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSECURITY_DESCRIPTOR_CONTROL pControl,LPDWORD lpdwRevision); | |
| 2501 | + WINADVAPI WINBOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet); | |
| 2502 | + WINADVAPI WINBOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bDaclPresent,PACL pDacl,WINBOOL bDaclDefaulted); | |
| 2503 | + WINADVAPI WINBOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbDaclPresent,PACL *pDacl,LPBOOL lpbDaclDefaulted); | |
| 2504 | + WINADVAPI WINBOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bSaclPresent,PACL pSacl,WINBOOL bSaclDefaulted); | |
| 2505 | + WINADVAPI WINBOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbSaclPresent,PACL *pSacl,LPBOOL lpbSaclDefaulted); | |
| 2506 | + WINADVAPI WINBOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pOwner,WINBOOL bOwnerDefaulted); | |
| 2507 | + WINADVAPI WINBOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pOwner,LPBOOL lpbOwnerDefaulted); | |
| 2508 | + WINADVAPI WINBOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pGroup,WINBOOL bGroupDefaulted); | |
| 2509 | + WINADVAPI WINBOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pGroup,LPBOOL lpbGroupDefaulted); | |
| 2510 | + WINADVAPI DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl); | |
| 2511 | + WINADVAPI DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl); | |
| 2512 | + WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,WINBOOL IsDirectoryObject,HANDLE Token,PGENERIC_MAPPING GenericMapping); | |
| 2513 | + WINADVAPI WINBOOL WINAPI ConvertToAutoInheritPrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,PSECURITY_DESCRIPTOR *NewSecurityDescriptor,GUID *ObjectType,BOOLEAN IsDirectoryObject,PGENERIC_MAPPING GenericMapping); | |
| 2514 | + WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID *ObjectType,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping); | |
| 2515 | + WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityWithMultipleInheritance(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID **ObjectTypes,ULONG GuidCount,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping); | |
| 2516 | + WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurity (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,PGENERIC_MAPPING GenericMapping,HANDLE Token); | |
| 2517 | + WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurityEx (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,ULONG AutoInheritFlags,PGENERIC_MAPPING GenericMapping,HANDLE Token); | |
| 2518 | + WINADVAPI WINBOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ResultantDescriptor,DWORD DescriptorLength,PDWORD ReturnLength); | |
| 2519 | + WINADVAPI WINBOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor); | |
| 2520 | + WINADVAPI WINBOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferLength); | |
| 2521 | + WINADVAPI WINBOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,LPDWORD lpdwAbsoluteSecurityDescriptorSize,PACL pDacl,LPDWORD lpdwDaclSize,PACL pSacl,LPDWORD lpdwSaclSize,PSID pOwner,LPDWORD lpdwOwnerSize,PSID pPrimaryGroup,LPDWORD lpdwPrimaryGroupSize); | |
| 2522 | + WINADVAPI WINBOOL WINAPI MakeAbsoluteSD2(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferSize); | |
| 2523 | + WINADVAPI WINBOOL WINAPI SetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor); | |
| 2524 | + WINADVAPI WINBOOL WINAPI SetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor); | |
| 2525 | + WINADVAPI WINBOOL WINAPI GetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); | |
| 2526 | + WINADVAPI WINBOOL WINAPI GetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); | |
| 2527 | + WINADVAPI WINBOOL WINAPI SetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR SecurityDescriptor); | |
| 2528 | + WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter); | |
| 2529 | + WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter); | |
| 2530 | + WINBASEAPI WINBOOL WINAPI FindNextChangeNotification(HANDLE hChangeHandle); | |
| 2531 | + WINBASEAPI WINBOOL WINAPI FindCloseChangeNotification(HANDLE hChangeHandle); | |
| 2532 | + WINBASEAPI WINBOOL WINAPI ReadDirectoryChangesW(HANDLE hDirectory,LPVOID lpBuffer,DWORD nBufferLength,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); | |
| 2533 | + WINBASEAPI WINBOOL WINAPI VirtualLock(LPVOID lpAddress,SIZE_T dwSize); | |
| 2534 | + WINBASEAPI WINBOOL WINAPI VirtualUnlock(LPVOID lpAddress,SIZE_T dwSize); | |
| 2535 | + WINBASEAPI LPVOID WINAPI MapViewOfFileEx(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap,LPVOID lpBaseAddress); | |
| 2536 | + WINBASEAPI WINBOOL WINAPI SetPriorityClass(HANDLE hProcess,DWORD dwPriorityClass); | |
| 2537 | + WINBASEAPI DWORD WINAPI GetPriorityClass(HANDLE hProcess); | |
| 2538 | + WINBASEAPI WINBOOL WINAPI IsBadReadPtr(CONST VOID *lp,UINT_PTR ucb); | |
| 2539 | + WINBASEAPI WINBOOL WINAPI IsBadWritePtr(LPVOID lp,UINT_PTR ucb); | |
| 2540 | + WINBASEAPI WINBOOL WINAPI IsBadHugeReadPtr(CONST VOID *lp,UINT_PTR ucb); | |
| 2541 | + WINBASEAPI WINBOOL WINAPI IsBadHugeWritePtr(LPVOID lp,UINT_PTR ucb); | |
| 2542 | + WINBASEAPI WINBOOL WINAPI IsBadCodePtr(FARPROC lpfn); | |
| 2543 | + WINBASEAPI WINBOOL WINAPI IsBadStringPtrA(LPCSTR lpsz,UINT_PTR ucchMax); | |
| 2544 | + WINBASEAPI WINBOOL WINAPI IsBadStringPtrW(LPCWSTR lpsz,UINT_PTR ucchMax); | |
| 2545 | + WINADVAPI WINBOOL WINAPI LookupAccountSidA(LPCSTR lpSystemName,PSID Sid,LPSTR Name,LPDWORD cchName,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); | |
| 2546 | + WINADVAPI WINBOOL WINAPI LookupAccountSidW(LPCWSTR lpSystemName,PSID Sid,LPWSTR Name,LPDWORD cchName,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); | |
| 2547 | + WINADVAPI WINBOOL WINAPI LookupAccountNameA(LPCSTR lpSystemName,LPCSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); | |
| 2548 | + WINADVAPI WINBOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName,LPCWSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); | |
| 2549 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName,LPCSTR lpName,PLUID lpLuid); | |
| 2550 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName,LPCWSTR lpName,PLUID lpLuid); | |
| 2551 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeNameA(LPCSTR lpSystemName,PLUID lpLuid,LPSTR lpName,LPDWORD cchName); | |
| 2552 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeNameW(LPCWSTR lpSystemName,PLUID lpLuid,LPWSTR lpName,LPDWORD cchName); | |
| 2553 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,LPCSTR lpName,LPSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId); | |
| 2554 | + WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,LPCWSTR lpName,LPWSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId); | |
| 2555 | + WINADVAPI WINBOOL WINAPI AllocateLocallyUniqueId(PLUID Luid); | |
| 2556 | + WINBASEAPI WINBOOL WINAPI BuildCommDCBA(LPCSTR lpDef,LPDCB lpDCB); | |
| 2557 | + WINBASEAPI WINBOOL WINAPI BuildCommDCBW(LPCWSTR lpDef,LPDCB lpDCB); | |
| 2558 | + WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts); | |
| 2559 | + WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts); | |
| 2560 | + WINBASEAPI WINBOOL WINAPI CommConfigDialogA(LPCSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC); | |
| 2561 | + WINBASEAPI WINBOOL WINAPI CommConfigDialogW(LPCWSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC); | |
| 2562 | + WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); | |
| 2563 | + WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); | |
| 2564 | + WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize); | |
| 2565 | + WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize); | |
| 2566 | + | |
| 2567 | +#define MAX_COMPUTERNAME_LENGTH 15 | |
| 2568 | + | |
| 2569 | + WINBASEAPI WINBOOL WINAPI GetComputerNameA(LPSTR lpBuffer,LPDWORD nSize); | |
| 2570 | + WINBASEAPI WINBOOL WINAPI GetComputerNameW(LPWSTR lpBuffer,LPDWORD nSize); | |
| 2571 | + WINBASEAPI WINBOOL WINAPI SetComputerNameA(LPCSTR lpComputerName); | |
| 2572 | + WINBASEAPI WINBOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName); | |
| 2573 | + | |
| 2574 | + typedef enum _COMPUTER_NAME_FORMAT { | |
| 2575 | + ComputerNameNetBIOS,ComputerNameDnsHostname,ComputerNameDnsDomain,ComputerNameDnsFullyQualified,ComputerNamePhysicalNetBIOS,ComputerNamePhysicalDnsHostname,ComputerNamePhysicalDnsDomain,ComputerNamePhysicalDnsFullyQualified,ComputerNameMax | |
| 2576 | + } COMPUTER_NAME_FORMAT; | |
| 2577 | + | |
| 2578 | + WINBASEAPI WINBOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPSTR lpBuffer,LPDWORD nSize); | |
| 2579 | + WINBASEAPI WINBOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPWSTR lpBuffer,LPDWORD nSize); | |
| 2580 | + WINBASEAPI WINBOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPCSTR lpBuffer); | |
| 2581 | + WINBASEAPI WINBOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPCWSTR lpBuffer); | |
| 2582 | + WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameA(LPCSTR Hostname,LPSTR ComputerName,LPDWORD nSize); | |
| 2583 | + WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR Hostname,LPWSTR ComputerName,LPDWORD nSize); | |
| 2584 | + WINADVAPI WINBOOL WINAPI GetUserNameA(LPSTR lpBuffer,LPDWORD pcbBuffer); | |
| 2585 | + WINADVAPI WINBOOL WINAPI GetUserNameW(LPWSTR lpBuffer,LPDWORD pcbBuffer); | |
| 2586 | + | |
| 2587 | +#define LOGON32_LOGON_INTERACTIVE 2 | |
| 2588 | +#define LOGON32_LOGON_NETWORK 3 | |
| 2589 | +#define LOGON32_LOGON_BATCH 4 | |
| 2590 | +#define LOGON32_LOGON_SERVICE 5 | |
| 2591 | +#define LOGON32_LOGON_UNLOCK 7 | |
| 2592 | +#define LOGON32_LOGON_NETWORK_CLEARTEXT 8 | |
| 2593 | +#define LOGON32_LOGON_NEW_CREDENTIALS 9 | |
| 2594 | + | |
| 2595 | +#define LOGON32_PROVIDER_DEFAULT 0 | |
| 2596 | +#define LOGON32_PROVIDER_WINNT35 1 | |
| 2597 | +#define LOGON32_PROVIDER_WINNT40 2 | |
| 2598 | +#define LOGON32_PROVIDER_WINNT50 3 | |
| 2599 | + | |
| 2600 | +#ifdef UNICODE | |
| 2601 | +#define LogonUser LogonUserW | |
| 2602 | +#define LogonUserEx LogonUserExW | |
| 2603 | +#define CreateProcessAsUser CreateProcessAsUserW | |
| 2604 | +#else | |
| 2605 | +#define LogonUser LogonUserA | |
| 2606 | +#define LogonUserEx LogonUserExA | |
| 2607 | +#define CreateProcessAsUser CreateProcessAsUserA | |
| 2608 | +#endif | |
| 2609 | + | |
| 2610 | + WINADVAPI WINBOOL WINAPI LogonUserA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken); | |
| 2611 | + WINADVAPI WINBOOL WINAPI LogonUserW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken); | |
| 2612 | + WINADVAPI WINBOOL WINAPI LogonUserExA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits); | |
| 2613 | + WINADVAPI WINBOOL WINAPI LogonUserExW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits); | |
| 2614 | + WINADVAPI WINBOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken); | |
| 2615 | + WINADVAPI WINBOOL WINAPI CreateProcessAsUserA(HANDLE hToken,LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 2616 | + WINADVAPI WINBOOL WINAPI CreateProcessAsUserW(HANDLE hToken,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 2617 | + | |
| 2618 | +#define LOGON_WITH_PROFILE 0x1 | |
| 2619 | +#define LOGON_NETCREDENTIALS_ONLY 0x2 | |
| 2620 | +#define LOGON_ZERO_PASSWORD_BUFFER 0x80000000 | |
| 2621 | + | |
| 2622 | + WINADVAPI WINBOOL WINAPI CreateProcessWithLogonW(LPCWSTR lpUsername,LPCWSTR lpDomain,LPCWSTR lpPassword,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 2623 | + WINADVAPI WINBOOL WINAPI CreateProcessWithTokenW(HANDLE hToken,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); | |
| 2624 | + WINADVAPI WINBOOL WINAPI ImpersonateAnonymousToken(HANDLE ThreadHandle); | |
| 2625 | + WINADVAPI WINBOOL WINAPI DuplicateTokenEx(HANDLE hExistingToken,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpTokenAttributes,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,TOKEN_TYPE TokenType,PHANDLE phNewToken); | |
| 2626 | + WINADVAPI WINBOOL WINAPI CreateRestrictedToken(HANDLE ExistingTokenHandle,DWORD Flags,DWORD DisableSidCount,PSID_AND_ATTRIBUTES SidsToDisable,DWORD DeletePrivilegeCount,PLUID_AND_ATTRIBUTES PrivilegesToDelete,DWORD RestrictedSidCount,PSID_AND_ATTRIBUTES SidsToRestrict,PHANDLE NewTokenHandle); | |
| 2627 | + WINADVAPI WINBOOL WINAPI IsTokenRestricted(HANDLE TokenHandle); | |
| 2628 | + WINADVAPI WINBOOL WINAPI IsTokenUntrusted(HANDLE TokenHandle); | |
| 2629 | + WINADVAPI WINBOOL WINAPI CheckTokenMembership(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember); | |
| 2630 | + | |
| 2631 | + typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK; | |
| 2632 | + | |
| 2633 | + WINBASEAPI WINBOOL WINAPI RegisterWaitForSingleObject(PHANDLE phNewWaitObject,HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags); | |
| 2634 | + WINBASEAPI HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags); | |
| 2635 | + WINBASEAPI WINBOOL WINAPI UnregisterWait(HANDLE WaitHandle); | |
| 2636 | + WINBASEAPI WINBOOL WINAPI UnregisterWaitEx(HANDLE WaitHandle,HANDLE CompletionEvent); | |
| 2637 | + WINBASEAPI WINBOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,ULONG Flags); | |
| 2638 | + WINBASEAPI WINBOOL WINAPI BindIoCompletionCallback(HANDLE FileHandle,LPOVERLAPPED_COMPLETION_ROUTINE Function,ULONG Flags); | |
| 2639 | + WINBASEAPI HANDLE WINAPI CreateTimerQueue(VOID); | |
| 2640 | + WINBASEAPI WINBOOL WINAPI CreateTimerQueueTimer(PHANDLE phNewTimer,HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,ULONG Flags); | |
| 2641 | + WINBASEAPI WINBOOL WINAPI ChangeTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,ULONG DueTime,ULONG Period); | |
| 2642 | + WINBASEAPI WINBOOL WINAPI DeleteTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,HANDLE CompletionEvent); | |
| 2643 | + WINBASEAPI WINBOOL WINAPI DeleteTimerQueueEx(HANDLE TimerQueue,HANDLE CompletionEvent); | |
| 2644 | + WINBASEAPI HANDLE WINAPI SetTimerQueueTimer(HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,WINBOOL PreferIo); | |
| 2645 | + WINBASEAPI WINBOOL WINAPI CancelTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer); | |
| 2646 | + WINBASEAPI WINBOOL WINAPI DeleteTimerQueue(HANDLE TimerQueue); | |
| 2647 | + | |
| 2648 | +#define HW_PROFILE_GUIDLEN 39 | |
| 2649 | +#define MAX_PROFILE_LEN 80 | |
| 2650 | + | |
| 2651 | +#define DOCKINFO_UNDOCKED (0x1) | |
| 2652 | +#define DOCKINFO_DOCKED (0x2) | |
| 2653 | +#define DOCKINFO_USER_SUPPLIED (0x4) | |
| 2654 | +#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED) | |
| 2655 | +#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED) | |
| 2656 | + | |
| 2657 | + typedef struct tagHW_PROFILE_INFOA { | |
| 2658 | + DWORD dwDockInfo; | |
| 2659 | + CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; | |
| 2660 | + CHAR szHwProfileName[MAX_PROFILE_LEN]; | |
| 2661 | + } HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA; | |
| 2662 | + | |
| 2663 | + typedef struct tagHW_PROFILE_INFOW { | |
| 2664 | + DWORD dwDockInfo; | |
| 2665 | + WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; | |
| 2666 | + WCHAR szHwProfileName[MAX_PROFILE_LEN]; | |
| 2667 | + } HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW; | |
| 2668 | + | |
| 2669 | +#ifdef UNICODE | |
| 2670 | + typedef HW_PROFILE_INFOW HW_PROFILE_INFO; | |
| 2671 | + typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO; | |
| 2672 | +#else | |
| 2673 | + typedef HW_PROFILE_INFOA HW_PROFILE_INFO; | |
| 2674 | + typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO; | |
| 2675 | +#endif | |
| 2676 | + | |
| 2677 | +#ifdef UNICODE | |
| 2678 | +#define GetCurrentHwProfile GetCurrentHwProfileW | |
| 2679 | +#define GetVersionEx GetVersionExW | |
| 2680 | +#define VerifyVersionInfo VerifyVersionInfoW | |
| 2681 | +#else | |
| 2682 | +#define GetCurrentHwProfile GetCurrentHwProfileA | |
| 2683 | +#define GetVersionEx GetVersionExA | |
| 1840 | 2684 | #define VerifyVersionInfo VerifyVersionInfoA |
| 1841 | −#define WaitNamedPipe WaitNamedPipeA | |
| 1842 | −#define WritePrivateProfileSection WritePrivateProfileSectionA | |
| 1843 | −#define WritePrivateProfileString WritePrivateProfileStringA | |
| 1844 | −#define WritePrivateProfileStruct WritePrivateProfileStructA | |
| 1845 | −#define WriteProfileSection WriteProfileSectionA | |
| 1846 | −#define WriteProfileString WriteProfileStringA | |
| 2685 | +#endif | |
| 2686 | + | |
| 2687 | + WINADVAPI WINBOOL WINAPI GetCurrentHwProfileA (LPHW_PROFILE_INFOA lpHwProfileInfo); | |
| 2688 | + WINADVAPI WINBOOL WINAPI GetCurrentHwProfileW (LPHW_PROFILE_INFOW lpHwProfileInfo); | |
| 2689 | + WINBASEAPI WINBOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount); | |
| 2690 | + WINBASEAPI WINBOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency); | |
| 2691 | + WINBASEAPI WINBOOL WINAPI GetVersionExA(LPOSVERSIONINFOA lpVersionInformation); | |
| 2692 | + WINBASEAPI WINBOOL WINAPI GetVersionExW(LPOSVERSIONINFOW lpVersionInformation); | |
| 2693 | + WINBASEAPI WINBOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask); | |
| 2694 | + WINBASEAPI WINBOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask); | |
| 2695 | + | |
| 2696 | +#include <winerror.h> | |
| 2697 | + | |
| 2698 | +#define TC_NORMAL 0 | |
| 2699 | +#define TC_HARDERR 1 | |
| 2700 | +#define TC_GP_TRAP 2 | |
| 2701 | +#define TC_SIGNAL 3 | |
| 2702 | + | |
| 2703 | +#define AC_LINE_OFFLINE 0x0 | |
| 2704 | +#define AC_LINE_ONLINE 0x1 | |
| 2705 | +#define AC_LINE_BACKUP_POWER 0x2 | |
| 2706 | +#define AC_LINE_UNKNOWN 0xff | |
| 2707 | + | |
| 2708 | +#define BATTERY_FLAG_HIGH 0x1 | |
| 2709 | +#define BATTERY_FLAG_LOW 0x2 | |
| 2710 | +#define BATTERY_FLAG_CRITICAL 0x4 | |
| 2711 | +#define BATTERY_FLAG_CHARGING 0x8 | |
| 2712 | +#define BATTERY_FLAG_NO_BATTERY 0x80 | |
| 2713 | +#define BATTERY_FLAG_UNKNOWN 0xff | |
| 2714 | + | |
| 2715 | +#define BATTERY_PERCENTAGE_UNKNOWN 0xff | |
| 2716 | + | |
| 2717 | +#define BATTERY_LIFE_UNKNOWN 0xffffffff | |
| 2718 | + | |
| 2719 | + typedef struct _SYSTEM_POWER_STATUS { | |
| 2720 | + BYTE ACLineStatus; | |
| 2721 | + BYTE BatteryFlag; | |
| 2722 | + BYTE BatteryLifePercent; | |
| 2723 | + BYTE Reserved1; | |
| 2724 | + DWORD BatteryLifeTime; | |
| 2725 | + DWORD BatteryFullLifeTime; | |
| 2726 | + } SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS; | |
| 2727 | + | |
| 2728 | +#ifdef UNICODE | |
| 2729 | +#define CreateJobObject CreateJobObjectW | |
| 2730 | +#define OpenJobObject OpenJobObjectW | |
| 2731 | +#define FindFirstVolume FindFirstVolumeW | |
| 2732 | +#define FindNextVolume FindNextVolumeW | |
| 2733 | +#define FindFirstVolumeMountPoint FindFirstVolumeMountPointW | |
| 2734 | +#define FindNextVolumeMountPoint FindNextVolumeMountPointW | |
| 2735 | +#define SetVolumeMountPoint SetVolumeMountPointW | |
| 2736 | +#define DeleteVolumeMountPoint DeleteVolumeMountPointW | |
| 2737 | +#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW | |
| 2738 | +#define GetVolumePathName GetVolumePathNameW | |
| 2739 | +#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW | |
| 2740 | +#else | |
| 2741 | +#define CreateJobObject CreateJobObjectA | |
| 2742 | +#define OpenJobObject OpenJobObjectA | |
| 2743 | +#define FindFirstVolume FindFirstVolumeA | |
| 2744 | +#define FindNextVolume FindNextVolumeA | |
| 2745 | +#define FindFirstVolumeMountPoint FindFirstVolumeMountPointA | |
| 2746 | +#define FindNextVolumeMountPoint FindNextVolumeMountPointA | |
| 2747 | +#define SetVolumeMountPoint SetVolumeMountPointA | |
| 2748 | +#define DeleteVolumeMountPoint DeleteVolumeMountPointA | |
| 2749 | +#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA | |
| 2750 | +#define GetVolumePathName GetVolumePathNameA | |
| 2751 | +#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA | |
| 2752 | +#endif | |
| 2753 | + | |
| 2754 | + WINBOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus); | |
| 2755 | + WINBOOL WINAPI SetSystemPowerState(WINBOOL fSuspend,WINBOOL fForce); | |
| 2756 | + WINBASEAPI WINBOOL WINAPI AllocateUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray); | |
| 2757 | + WINBASEAPI WINBOOL WINAPI FreeUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray); | |
| 2758 | + WINBASEAPI WINBOOL WINAPI MapUserPhysicalPages(PVOID VirtualAddress,ULONG_PTR NumberOfPages,PULONG_PTR PageArray); | |
| 2759 | + WINBASEAPI WINBOOL WINAPI MapUserPhysicalPagesScatter(PVOID *VirtualAddresses,ULONG_PTR NumberOfPages,PULONG_PTR PageArray); | |
| 2760 | + WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCSTR lpName); | |
| 2761 | + WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCWSTR lpName); | |
| 2762 | + WINBASEAPI HANDLE WINAPI OpenJobObjectA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); | |
| 2763 | + WINBASEAPI HANDLE WINAPI OpenJobObjectW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); | |
| 2764 | + WINBASEAPI WINBOOL WINAPI AssignProcessToJobObject(HANDLE hJob,HANDLE hProcess); | |
| 2765 | + WINBASEAPI WINBOOL WINAPI TerminateJobObject(HANDLE hJob,UINT uExitCode); | |
| 2766 | + WINBASEAPI WINBOOL WINAPI QueryInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength,LPDWORD lpReturnLength); | |
| 2767 | + WINBASEAPI WINBOOL WINAPI SetInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength); | |
| 2768 | + WINBASEAPI WINBOOL WINAPI IsProcessInJob(HANDLE ProcessHandle,HANDLE JobHandle,PBOOL Result); | |
| 2769 | + WINBASEAPI WINBOOL WINAPI CreateJobSet(ULONG NumJob,PJOB_SET_ARRAY UserJobSet,ULONG Flags); | |
| 2770 | + WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler); | |
| 2771 | + WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler(PVOID Handle); | |
| 2772 | + WINBASEAPI PVOID WINAPI AddVectoredContinueHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler); | |
| 2773 | + WINBASEAPI ULONG WINAPI RemoveVectoredContinueHandler(PVOID Handle); | |
| 2774 | + WINBASEAPI HANDLE WINAPI FindFirstVolumeA(LPSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2775 | + WINBASEAPI HANDLE WINAPI FindFirstVolumeW(LPWSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2776 | + WINBASEAPI WINBOOL WINAPI FindNextVolumeA(HANDLE hFindVolume,LPSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2777 | + WINBASEAPI WINBOOL WINAPI FindNextVolumeW(HANDLE hFindVolume,LPWSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2778 | + WINBASEAPI WINBOOL WINAPI FindVolumeClose(HANDLE hFindVolume); | |
| 2779 | + WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointA(LPCSTR lpszRootPathName,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength); | |
| 2780 | + WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointW(LPCWSTR lpszRootPathName,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength); | |
| 2781 | + WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength); | |
| 2782 | + WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength); | |
| 2783 | + WINBASEAPI WINBOOL WINAPI FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint); | |
| 2784 | + WINBASEAPI WINBOOL WINAPI SetVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPCSTR lpszVolumeName); | |
| 2785 | + WINBASEAPI WINBOOL WINAPI SetVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPCWSTR lpszVolumeName); | |
| 2786 | + WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointA(LPCSTR lpszVolumeMountPoint); | |
| 2787 | + WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointW(LPCWSTR lpszVolumeMountPoint); | |
| 2788 | + WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2789 | + WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPWSTR lpszVolumeName,DWORD cchBufferLength); | |
| 2790 | + WINBASEAPI WINBOOL WINAPI GetVolumePathNameA(LPCSTR lpszFileName,LPSTR lpszVolumePathName,DWORD cchBufferLength); | |
| 2791 | + WINBASEAPI WINBOOL WINAPI GetVolumePathNameW(LPCWSTR lpszFileName,LPWSTR lpszVolumePathName,DWORD cchBufferLength); | |
| 2792 | + WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR lpszVolumeName,LPCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength); | |
| 2793 | + WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR lpszVolumeName,LPWCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength); | |
| 2794 | + | |
| 2795 | +#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x1 | |
| 2796 | +#define ACTCTX_FLAG_LANGID_VALID 0x2 | |
| 2797 | +#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x4 | |
| 2798 | +#define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x8 | |
| 2799 | +#define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x10 | |
| 2800 | +#define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x20 | |
| 2801 | +#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x40 | |
| 2802 | +#define ACTCTX_FLAG_HMODULE_VALID 0x80 | |
| 2803 | + | |
| 2804 | + typedef struct tagACTCTXA { | |
| 2805 | + ULONG cbSize; | |
| 2806 | + DWORD dwFlags; | |
| 2807 | + LPCSTR lpSource; | |
| 2808 | + USHORT wProcessorArchitecture; | |
| 2809 | + LANGID wLangId; | |
| 2810 | + LPCSTR lpAssemblyDirectory; | |
| 2811 | + LPCSTR lpResourceName; | |
| 2812 | + LPCSTR lpApplicationName; | |
| 2813 | + HMODULE hModule; | |
| 2814 | + } ACTCTXA,*PACTCTXA; | |
| 2815 | + | |
| 2816 | + typedef struct tagACTCTXW { | |
| 2817 | + ULONG cbSize; | |
| 2818 | + DWORD dwFlags; | |
| 2819 | + LPCWSTR lpSource; | |
| 2820 | + USHORT wProcessorArchitecture; | |
| 2821 | + LANGID wLangId; | |
| 2822 | + LPCWSTR lpAssemblyDirectory; | |
| 2823 | + LPCWSTR lpResourceName; | |
| 2824 | + LPCWSTR lpApplicationName; | |
| 2825 | + HMODULE hModule; | |
| 2826 | + } ACTCTXW,*PACTCTXW; | |
| 2827 | + | |
| 2828 | + typedef const ACTCTXA *PCACTCTXA; | |
| 2829 | + typedef const ACTCTXW *PCACTCTXW; | |
| 2830 | + | |
| 2831 | +#ifdef UNICODE | |
| 2832 | + typedef ACTCTXW ACTCTX; | |
| 2833 | + typedef PACTCTXW PACTCTX; | |
| 2834 | + typedef PCACTCTXW PCACTCTX; | |
| 2835 | +#else | |
| 2836 | + typedef ACTCTXA ACTCTX; | |
| 2837 | + typedef PACTCTXA PACTCTX; | |
| 2838 | + typedef PCACTCTXA PCACTCTX; | |
| 2839 | +#endif | |
| 2840 | + | |
| 2841 | +#ifdef UNICODE | |
| 2842 | +#define CreateActCtx CreateActCtxW | |
| 2843 | +#else | |
| 2844 | +#define CreateActCtx CreateActCtxA | |
| 2845 | +#endif | |
| 2846 | + | |
| 2847 | + WINBASEAPI HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx); | |
| 2848 | + WINBASEAPI HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx); | |
| 2849 | + WINBASEAPI VOID WINAPI AddRefActCtx(HANDLE hActCtx); | |
| 2850 | + WINBASEAPI VOID WINAPI ReleaseActCtx(HANDLE hActCtx); | |
| 2851 | + WINBASEAPI WINBOOL WINAPI ZombifyActCtx(HANDLE hActCtx); | |
| 2852 | + WINBASEAPI WINBOOL WINAPI ActivateActCtx(HANDLE hActCtx,ULONG_PTR *lpCookie); | |
| 2853 | + | |
| 2854 | +#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x1) | |
| 2855 | + | |
| 2856 | + WINBASEAPI WINBOOL WINAPI DeactivateActCtx(DWORD dwFlags,ULONG_PTR ulCookie); | |
| 2857 | + WINBASEAPI WINBOOL WINAPI GetCurrentActCtx(HANDLE *lphActCtx); | |
| 2858 | + | |
| 2859 | + typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 { | |
| 2860 | + ULONG cbSize; | |
| 2861 | + ULONG ulDataFormatVersion; | |
| 2862 | + PVOID lpData; | |
| 2863 | + ULONG ulLength; | |
| 2864 | + PVOID lpSectionGlobalData; | |
| 2865 | + ULONG ulSectionGlobalDataLength; | |
| 2866 | + PVOID lpSectionBase; | |
| 2867 | + ULONG ulSectionTotalLength; | |
| 2868 | + HANDLE hActCtx; | |
| 2869 | + ULONG ulAssemblyRosterIndex; | |
| 2870 | + } ACTCTX_SECTION_KEYED_DATA_2600,*PACTCTX_SECTION_KEYED_DATA_2600; | |
| 2871 | + | |
| 2872 | + typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600; | |
| 2873 | + | |
| 2874 | + typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA { | |
| 2875 | + PVOID lpInformation; | |
| 2876 | + PVOID lpSectionBase; | |
| 2877 | + ULONG ulSectionLength; | |
| 2878 | + PVOID lpSectionGlobalDataBase; | |
| 2879 | + ULONG ulSectionGlobalDataLength; | |
| 2880 | + } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA,*PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA; | |
| 2881 | + | |
| 2882 | + typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA; | |
| 2883 | + | |
| 2884 | + typedef struct tagACTCTX_SECTION_KEYED_DATA { | |
| 2885 | + ULONG cbSize; | |
| 2886 | + ULONG ulDataFormatVersion; | |
| 2887 | + PVOID lpData; | |
| 2888 | + ULONG ulLength; | |
| 2889 | + PVOID lpSectionGlobalData; | |
| 2890 | + ULONG ulSectionGlobalDataLength; | |
| 2891 | + PVOID lpSectionBase; | |
| 2892 | + ULONG ulSectionTotalLength; | |
| 2893 | + HANDLE hActCtx; | |
| 2894 | + ULONG ulAssemblyRosterIndex; | |
| 2895 | + | |
| 2896 | + ULONG ulFlags; | |
| 2897 | + ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata; | |
| 2898 | + } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA; | |
| 2899 | + | |
| 2900 | + typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA; | |
| 2901 | + | |
| 2902 | +#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x1 | |
| 2903 | +#define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS 0x2 | |
| 2904 | +#define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA 0x4 | |
| 2905 | + | |
| 2906 | +#ifdef UNICODE | |
| 2907 | +#define FindActCtxSectionString FindActCtxSectionStringW | |
| 2908 | +#else | |
| 2909 | +#define FindActCtxSectionString FindActCtxSectionStringA | |
| 2910 | +#endif | |
| 2911 | + | |
| 2912 | + WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); | |
| 2913 | + WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCWSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); | |
| 2914 | + WINBASEAPI WINBOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,const GUID *lpGuidToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); | |
| 2915 | + | |
| 2916 | +#ifndef RC_INVOKED | |
| 2917 | +#ifndef ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED | |
| 2918 | + | |
| 2919 | + typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION { | |
| 2920 | + HANDLE hActCtx; | |
| 2921 | + DWORD dwFlags; | |
| 2922 | + } ACTIVATION_CONTEXT_BASIC_INFORMATION,*PACTIVATION_CONTEXT_BASIC_INFORMATION; | |
| 2923 | + | |
| 2924 | + typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION; | |
| 2925 | + | |
| 2926 | +#define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1 | |
| 1847 | 2927 | #endif |
| 1848 | 2928 | #endif |
| 2929 | + | |
| 2930 | +#define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x4 | |
| 2931 | +#define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x8 | |
| 2932 | +#define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x10 | |
| 2933 | +#define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000 | |
| 2934 | + | |
| 2935 | + WINBASEAPI WINBOOL WINAPI QueryActCtxW(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired); | |
| 2936 | + | |
| 2937 | + typedef WINBOOL (WINAPI *PQUERYACTCTXW_FUNC)(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired); | |
| 2938 | + | |
| 2939 | + WINBASEAPI WINBOOL WINAPI ProcessIdToSessionId(DWORD dwProcessId,DWORD *pSessionId); | |
| 2940 | + WINBASEAPI DWORD WINAPI WTSGetActiveConsoleSessionId(); | |
| 2941 | + WINBASEAPI WINBOOL WINAPI IsWow64Process(HANDLE hProcess,PBOOL Wow64Process); | |
| 2942 | + WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,PDWORD ReturnedLength); | |
| 2943 | + WINBASEAPI WINBOOL WINAPI GetNumaHighestNodeNumber(PULONG HighestNodeNumber); | |
| 2944 | + WINBASEAPI WINBOOL WINAPI GetNumaProcessorNode(UCHAR Processor,PUCHAR NodeNumber); | |
| 2945 | + WINBASEAPI WINBOOL WINAPI GetNumaNodeProcessorMask(UCHAR Node,PULONGLONG ProcessorMask); | |
| 2946 | + WINBASEAPI WINBOOL WINAPI GetNumaAvailableMemoryNode(UCHAR Node,PULONGLONG AvailableBytes); | |
| 2947 | + | |
| 1849 | 2948 | #ifdef __cplusplus |
| 1850 | 2949 | } |
| 1851 | 2950 | #endif |
| 1852 | −#endif /* _WINBASE_H */ | |
| 2951 | +#endif | |
| @@ -1,206 +1,300 @@ | ||
| 1 | −#ifndef _WINCON_H | |
| 2 | −#define _WINCON_H | |
| 3 | −#if __GNUC__ >=3 | |
| 4 | −#pragma GCC system_header | |
| 5 | −#endif | |
| 6 | − | |
| 1 | +/** | |
| 2 | + * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | + * This file is part of the w64 mingw-runtime package. | |
| 4 | + * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 | + */ | |
| 6 | +#ifndef _WINCON_ | |
| 7 | +#define _WINCON_ | |
| 7 | 8 | |
| 8 | 9 | #ifdef __cplusplus |
| 9 | 10 | extern "C" { |
| 10 | 11 | #endif |
| 11 | 12 | |
| 12 | −#define FOREGROUND_BLUE 1 | |
| 13 | −#define FOREGROUND_GREEN 2 | |
| 14 | −#define FOREGROUND_RED 4 | |
| 15 | −#define FOREGROUND_INTENSITY 8 | |
| 16 | −#define BACKGROUND_BLUE 16 | |
| 17 | −#define BACKGROUND_GREEN 32 | |
| 18 | −#define BACKGROUND_RED 64 | |
| 19 | −#define BACKGROUND_INTENSITY 128 | |
| 13 | + typedef struct _COORD { | |
| 14 | + SHORT X; | |
| 15 | + SHORT Y; | |
| 16 | + } COORD,*PCOORD; | |
| 17 | + | |
| 18 | + typedef struct _SMALL_RECT { | |
| 19 | + SHORT Left; | |
| 20 | + SHORT Top; | |
| 21 | + SHORT Right; | |
| 22 | + SHORT Bottom; | |
| 23 | + } SMALL_RECT,*PSMALL_RECT; | |
| 24 | + | |
| 25 | + typedef struct _KEY_EVENT_RECORD { | |
| 26 | + WINBOOL bKeyDown; | |
| 27 | + WORD wRepeatCount; | |
| 28 | + WORD wVirtualKeyCode; | |
| 29 | + WORD wVirtualScanCode; | |
| 30 | + union { | |
| 31 | + WCHAR UnicodeChar; | |
| 32 | + CHAR AsciiChar; | |
| 33 | + } uChar; | |
| 34 | + DWORD dwControlKeyState; | |
| 35 | + } KEY_EVENT_RECORD,*PKEY_EVENT_RECORD; | |
| 36 | + | |
| 37 | +#define RIGHT_ALT_PRESSED 0x1 | |
| 38 | +#define LEFT_ALT_PRESSED 0x2 | |
| 39 | +#define RIGHT_CTRL_PRESSED 0x4 | |
| 40 | +#define LEFT_CTRL_PRESSED 0x8 | |
| 41 | +#define SHIFT_PRESSED 0x10 | |
| 42 | +#define NUMLOCK_ON 0x20 | |
| 43 | +#define SCROLLLOCK_ON 0x40 | |
| 44 | +#define CAPSLOCK_ON 0x80 | |
| 45 | +#define ENHANCED_KEY 0x100 | |
| 46 | +#define NLS_DBCSCHAR 0x10000 | |
| 47 | +#define NLS_ALPHANUMERIC 0x0 | |
| 48 | +#define NLS_KATAKANA 0x20000 | |
| 49 | +#define NLS_HIRAGANA 0x40000 | |
| 50 | +#define NLS_ROMAN 0x400000 | |
| 51 | +#define NLS_IME_CONVERSION 0x800000 | |
| 52 | +#define NLS_IME_DISABLE 0x20000000 | |
| 53 | + | |
| 54 | + typedef struct _MOUSE_EVENT_RECORD { | |
| 55 | + COORD dwMousePosition; | |
| 56 | + DWORD dwButtonState; | |
| 57 | + DWORD dwControlKeyState; | |
| 58 | + DWORD dwEventFlags; | |
| 59 | + } MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD; | |
| 60 | + | |
| 61 | +#define FROM_LEFT_1ST_BUTTON_PRESSED 0x1 | |
| 62 | +#define RIGHTMOST_BUTTON_PRESSED 0x2 | |
| 63 | +#define FROM_LEFT_2ND_BUTTON_PRESSED 0x4 | |
| 64 | +#define FROM_LEFT_3RD_BUTTON_PRESSED 0x8 | |
| 65 | +#define FROM_LEFT_4TH_BUTTON_PRESSED 0x10 | |
| 66 | + | |
| 67 | +#define MOUSE_MOVED 0x1 | |
| 68 | +#define DOUBLE_CLICK 0x2 | |
| 69 | +#define MOUSE_WHEELED 0x4 | |
| 70 | + | |
| 71 | + typedef struct _WINDOW_BUFFER_SIZE_RECORD { | |
| 72 | + COORD dwSize; | |
| 73 | + } WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD; | |
| 74 | + | |
| 75 | + typedef struct _MENU_EVENT_RECORD { | |
| 76 | + UINT dwCommandId; | |
| 77 | + } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD; | |
| 78 | + | |
| 79 | + typedef struct _FOCUS_EVENT_RECORD { | |
| 80 | + WINBOOL bSetFocus; | |
| 81 | + } FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD; | |
| 82 | + | |
| 83 | + typedef struct _INPUT_RECORD { | |
| 84 | + WORD EventType; | |
| 85 | + union { | |
| 86 | + KEY_EVENT_RECORD KeyEvent; | |
| 87 | + MOUSE_EVENT_RECORD MouseEvent; | |
| 88 | + WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; | |
| 89 | + MENU_EVENT_RECORD MenuEvent; | |
| 90 | + FOCUS_EVENT_RECORD FocusEvent; | |
| 91 | + } Event; | |
| 92 | + } INPUT_RECORD,*PINPUT_RECORD; | |
| 93 | + | |
| 94 | +#define KEY_EVENT 0x1 | |
| 95 | +#define MOUSE_EVENT 0x2 | |
| 96 | +#define WINDOW_BUFFER_SIZE_EVENT 0x4 | |
| 97 | +#define MENU_EVENT 0x8 | |
| 98 | +#define FOCUS_EVENT 0x10 | |
| 99 | + | |
| 100 | + typedef struct _CHAR_INFO { | |
| 101 | + union { | |
| 102 | + WCHAR UnicodeChar; | |
| 103 | + CHAR AsciiChar; | |
| 104 | + } Char; | |
| 105 | + WORD Attributes; | |
| 106 | + } CHAR_INFO,*PCHAR_INFO; | |
| 107 | + | |
| 108 | +#define FOREGROUND_BLUE 0x1 | |
| 109 | +#define FOREGROUND_GREEN 0x2 | |
| 110 | +#define FOREGROUND_RED 0x4 | |
| 111 | +#define FOREGROUND_INTENSITY 0x8 | |
| 112 | +#define BACKGROUND_BLUE 0x10 | |
| 113 | +#define BACKGROUND_GREEN 0x20 | |
| 114 | +#define BACKGROUND_RED 0x40 | |
| 115 | +#define BACKGROUND_INTENSITY 0x80 | |
| 116 | +#define COMMON_LVB_LEADING_BYTE 0x100 | |
| 117 | +#define COMMON_LVB_TRAILING_BYTE 0x200 | |
| 118 | +#define COMMON_LVB_GRID_HORIZONTAL 0x400 | |
| 119 | +#define COMMON_LVB_GRID_LVERTICAL 0x800 | |
| 120 | +#define COMMON_LVB_GRID_RVERTICAL 0x1000 | |
| 121 | +#define COMMON_LVB_REVERSE_VIDEO 0x4000 | |
| 122 | +#define COMMON_LVB_UNDERSCORE 0x8000 | |
| 123 | + | |
| 124 | +#define COMMON_LVB_SBCSDBCS 0x300 | |
| 125 | + | |
| 126 | + typedef struct _CONSOLE_SCREEN_BUFFER_INFO { | |
| 127 | + COORD dwSize; | |
| 128 | + COORD dwCursorPosition; | |
| 129 | + WORD wAttributes; | |
| 130 | + SMALL_RECT srWindow; | |
| 131 | + COORD dwMaximumWindowSize; | |
| 132 | + } CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO; | |
| 133 | + | |
| 134 | + typedef struct _CONSOLE_CURSOR_INFO { | |
| 135 | + DWORD dwSize; | |
| 136 | + WINBOOL bVisible; | |
| 137 | + } CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO; | |
| 138 | + | |
| 139 | + typedef struct _CONSOLE_FONT_INFO { | |
| 140 | + DWORD nFont; | |
| 141 | + COORD dwFontSize; | |
| 142 | + } CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO; | |
| 143 | + | |
| 144 | + typedef struct _CONSOLE_SELECTION_INFO { | |
| 145 | + DWORD dwFlags; | |
| 146 | + COORD dwSelectionAnchor; | |
| 147 | + SMALL_RECT srSelection; | |
| 148 | + } CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO; | |
| 149 | + | |
| 150 | +#define CONSOLE_NO_SELECTION 0x0 | |
| 151 | +#define CONSOLE_SELECTION_IN_PROGRESS 0x1 | |
| 152 | +#define CONSOLE_SELECTION_NOT_EMPTY 0x2 | |
| 153 | +#define CONSOLE_MOUSE_SELECTION 0x4 | |
| 154 | +#define CONSOLE_MOUSE_DOWN 0x8 | |
| 155 | + | |
| 156 | + typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType); | |
| 157 | + | |
| 20 | 158 | #define CTRL_C_EVENT 0 |
| 21 | 159 | #define CTRL_BREAK_EVENT 1 |
| 22 | 160 | #define CTRL_CLOSE_EVENT 2 |
| 161 | + | |
| 23 | 162 | #define CTRL_LOGOFF_EVENT 5 |
| 24 | 163 | #define CTRL_SHUTDOWN_EVENT 6 |
| 25 | −#define ENABLE_LINE_INPUT 2 | |
| 26 | −#define ENABLE_ECHO_INPUT 4 | |
| 27 | −#define ENABLE_PROCESSED_INPUT 1 | |
| 28 | −#define ENABLE_WINDOW_INPUT 8 | |
| 29 | −#define ENABLE_MOUSE_INPUT 16 | |
| 30 | −#define ENABLE_PROCESSED_OUTPUT 1 | |
| 31 | −#define ENABLE_WRAP_AT_EOL_OUTPUT 2 | |
| 32 | −#define KEY_EVENT 1 | |
| 33 | −#define MOUSE_EVENT 2 | |
| 34 | −#define WINDOW_BUFFER_SIZE_EVENT 4 | |
| 35 | −#define MENU_EVENT 8 | |
| 36 | −#define FOCUS_EVENT 16 | |
| 37 | −#define CAPSLOCK_ON 128 | |
| 38 | −#define ENHANCED_KEY 256 | |
| 39 | −#define RIGHT_ALT_PRESSED 1 | |
| 40 | −#define LEFT_ALT_PRESSED 2 | |
| 41 | −#define RIGHT_CTRL_PRESSED 4 | |
| 42 | −#define LEFT_CTRL_PRESSED 8 | |
| 43 | −#define SHIFT_PRESSED 16 | |
| 44 | −#define NUMLOCK_ON 32 | |
| 45 | −#define SCROLLLOCK_ON 64 | |
| 46 | −#define FROM_LEFT_1ST_BUTTON_PRESSED 1 | |
| 47 | −#define RIGHTMOST_BUTTON_PRESSED 2 | |
| 48 | −#define FROM_LEFT_2ND_BUTTON_PRESSED 4 | |
| 49 | −#define FROM_LEFT_3RD_BUTTON_PRESSED 8 | |
| 50 | −#define FROM_LEFT_4TH_BUTTON_PRESSED 16 | |
| 51 | −#define MOUSE_MOVED 1 | |
| 52 | −#define DOUBLE_CLICK 2 | |
| 53 | −#define MOUSE_WHEELED 4 | |
| 54 | − | |
| 55 | −typedef struct _CHAR_INFO { | |
| 56 | − union { | |
| 57 | − WCHAR UnicodeChar; | |
| 58 | − CHAR AsciiChar; | |
| 59 | − } Char; | |
| 60 | − WORD Attributes; | |
| 61 | −} CHAR_INFO,*PCHAR_INFO; | |
| 62 | −typedef struct _SMALL_RECT { | |
| 63 | − SHORT Left; | |
| 64 | − SHORT Top; | |
| 65 | − SHORT Right; | |
| 66 | − SHORT Bottom; | |
| 67 | −} SMALL_RECT,*PSMALL_RECT; | |
| 68 | −typedef struct _CONSOLE_CURSOR_INFO { | |
| 69 | − DWORD dwSize; | |
| 70 | − BOOL bVisible; | |
| 71 | −} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO; | |
| 72 | −typedef struct _COORD { | |
| 73 | − SHORT X; | |
| 74 | − SHORT Y; | |
| 75 | −} COORD; | |
| 76 | −typedef struct _CONSOLE_SCREEN_BUFFER_INFO { | |
| 77 | − COORD dwSize; | |
| 78 | − COORD dwCursorPosition; | |
| 79 | − WORD wAttributes; | |
| 80 | − SMALL_RECT srWindow; | |
| 81 | − COORD dwMaximumWindowSize; | |
| 82 | −} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO; | |
| 83 | −typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD); | |
| 84 | −typedef struct _KEY_EVENT_RECORD { | |
| 85 | − BOOL bKeyDown; | |
| 86 | − WORD wRepeatCount; | |
| 87 | − WORD wVirtualKeyCode; | |
| 88 | − WORD wVirtualScanCode; | |
| 89 | − union { | |
| 90 | − WCHAR UnicodeChar; | |
| 91 | − CHAR AsciiChar; | |
| 92 | − } uChar; | |
| 93 | − DWORD dwControlKeyState; | |
| 94 | −} | |
| 95 | −#ifdef __GNUC__ | |
| 96 | −/* gcc's alignment is not what win32 expects */ | |
| 97 | − PACKED | |
| 98 | −#endif | |
| 99 | −KEY_EVENT_RECORD; | |
| 100 | − | |
| 101 | −typedef struct _MOUSE_EVENT_RECORD { | |
| 102 | − COORD dwMousePosition; | |
| 103 | − DWORD dwButtonState; | |
| 104 | − DWORD dwControlKeyState; | |
| 105 | − DWORD dwEventFlags; | |
| 106 | −} MOUSE_EVENT_RECORD; | |
| 107 | −typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD; | |
| 108 | −typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD; | |
| 109 | −typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD; | |
| 110 | −typedef struct _INPUT_RECORD { | |
| 111 | − WORD EventType; | |
| 112 | − union { | |
| 113 | − KEY_EVENT_RECORD KeyEvent; | |
| 114 | − MOUSE_EVENT_RECORD MouseEvent; | |
| 115 | − WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; | |
| 116 | − MENU_EVENT_RECORD MenuEvent; | |
| 117 | − FOCUS_EVENT_RECORD FocusEvent; | |
| 118 | − } Event; | |
| 119 | −} INPUT_RECORD,*PINPUT_RECORD; | |
| 120 | − | |
| 121 | −BOOL WINAPI AllocConsole(void); | |
| 122 | −HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID); | |
| 123 | −BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD); | |
| 124 | −BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD); | |
| 125 | −BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD); | |
| 126 | −BOOL WINAPI FlushConsoleInputBuffer(HANDLE); | |
| 127 | −BOOL WINAPI FreeConsole(void); | |
| 128 | −BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD); | |
| 129 | −UINT WINAPI GetConsoleCP(void); | |
| 130 | −BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO); | |
| 131 | −BOOL WINAPI GetConsoleMode(HANDLE,PDWORD); | |
| 132 | −UINT WINAPI GetConsoleOutputCP(void); | |
| 133 | −BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO); | |
| 134 | −DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD); | |
| 135 | −DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD); | |
| 136 | −COORD WINAPI GetLargestConsoleWindowSize(HANDLE); | |
| 137 | −BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD); | |
| 138 | −BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD); | |
| 139 | −BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD); | |
| 140 | −BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD); | |
| 141 | −BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID); | |
| 142 | −BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID); | |
| 143 | −BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD); | |
| 144 | −BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD); | |
| 145 | −BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD); | |
| 146 | −BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD); | |
| 147 | −BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD); | |
| 148 | −BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT); | |
| 149 | −BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT); | |
| 150 | −BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*); | |
| 151 | −BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*); | |
| 152 | −BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE); | |
| 153 | −BOOL WINAPI SetConsoleCP(UINT); | |
| 154 | −BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL); | |
| 155 | −BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*); | |
| 156 | −BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD); | |
| 157 | −BOOL WINAPI SetConsoleMode(HANDLE,DWORD); | |
| 158 | −BOOL WINAPI SetConsoleOutputCP(UINT); | |
| 159 | −BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD); | |
| 160 | −BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD); | |
| 161 | −BOOL WINAPI SetConsoleTitleA(LPCSTR); | |
| 162 | −BOOL WINAPI SetConsoleTitleW(LPCWSTR); | |
| 163 | −BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*); | |
| 164 | −BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID); | |
| 165 | −BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID); | |
| 166 | −BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD); | |
| 167 | −BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD); | |
| 168 | −BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT); | |
| 169 | −BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT); | |
| 170 | −BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD); | |
| 171 | −BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD); | |
| 172 | −BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD); | |
| 164 | + | |
| 165 | +#define ENABLE_PROCESSED_INPUT 0x1 | |
| 166 | +#define ENABLE_LINE_INPUT 0x2 | |
| 167 | +#define ENABLE_ECHO_INPUT 0x4 | |
| 168 | +#define ENABLE_WINDOW_INPUT 0x8 | |
| 169 | +#define ENABLE_MOUSE_INPUT 0x10 | |
| 170 | + | |
| 171 | +#define ENABLE_PROCESSED_OUTPUT 0x1 | |
| 172 | +#define ENABLE_WRAP_AT_EOL_OUTPUT 0x2 | |
| 173 | 173 | |
| 174 | 174 | #ifdef UNICODE |
| 175 | −#define FillConsoleOutputCharacter FillConsoleOutputCharacterW | |
137 more lines aren’t shown here.
This diff is large: its 478 lines aren’t shown here.
This diff is large: its 259 lines aren’t shown here.
This diff is large: its 2934 lines aren’t shown here.
This diff is large: its 6669 lines aren’t shown here.
This diff is large: its 736 lines aren’t shown here.
This diff is large: its 1149 lines aren’t shown here.
This diff is large: its 8275 lines aren’t shown here.
This diff is large: its 376 lines aren’t shown here.
This diff is large: its 661 lines aren’t shown here.
This diff is large: its 9061 lines aren’t shown here.
This diff is large: its 265 lines aren’t shown here.
This diff is large: its 1233 lines aren’t shown here.