win64: use new headers from mingw
This commit is contained in:
parent
06aed3d171
commit
dc251a7d8d
91 changed files with 32164 additions and 17354 deletions
4
Makefile
4
Makefile
|
@ -177,7 +177,7 @@ VPATH+=lib
|
|||
ifdef CONFIG_WIN32
|
||||
# for windows, we must use TCC because we generate ELF objects
|
||||
LIBTCC1_OBJS+=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
|
||||
LIBTCC1_CC=./tcc.exe -Bwin32 -DTCC_TARGET_PE
|
||||
LIBTCC1_CC=./tcc.exe -Bwin32 -Iinclude $(NATIVE_TARGET)
|
||||
VPATH+=win32/lib
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
|
@ -245,7 +245,7 @@ install: $(PROGS) $(LIBTCC1) libtcc.a tcc-doc.html
|
|||
$(INSTALL) -m644 $(LIBTCC1) win32/lib/*.def "$(tccdir)/lib"
|
||||
cp -r win32/include/. "$(tccdir)/include"
|
||||
cp -r win32/examples/. "$(tccdir)/examples"
|
||||
# $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include"
|
||||
$(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include"
|
||||
$(INSTALL) -m644 tcc-doc.html win32/tcc-win32.txt "$(tccdir)/doc"
|
||||
$(INSTALL) -m644 libtcc.a libtcc.h "$(tccdir)/libtcc"
|
||||
endif
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _STDARG_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
#ifndef _WIN64
|
||||
#include <stdlib.h>
|
||||
|
||||
/* GCC compatible definition of va_list. */
|
||||
|
@ -48,16 +49,21 @@ typedef struct __va_list_struct *va_list;
|
|||
*(dest) = *(src))
|
||||
#define va_end(ap) __builtin_free(ap)
|
||||
|
||||
#else
|
||||
|
||||
#else /* _WIN64 */
|
||||
typedef char *va_list;
|
||||
#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7)
|
||||
#define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7)))
|
||||
#define va_copy(dest, src) (dest) = (src)
|
||||
#define va_end(ap)
|
||||
#endif
|
||||
|
||||
#else /* __i386__ */
|
||||
typedef char *va_list;
|
||||
/* only correct for i386 */
|
||||
#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
|
||||
#define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
|
||||
#define va_copy(dest, src) (dest) = (src)
|
||||
#define va_end(ap)
|
||||
|
||||
#endif
|
||||
|
||||
/* fix a buggy dependency on GCC in libio.h */
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _VARARGS_H
|
||||
#define _VARARGS_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define va_dcl
|
||||
#define va_alist __va_alist
|
||||
#undef va_start
|
||||
#define va_start(ap) ap = __builtin_varargs_start
|
||||
#error "TinyCC no longer implements <varargs.h>."
|
||||
#error "Revise your code to use <stdarg.h>."
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* _mingw.h
|
||||
*
|
||||
* This file is for TCC-PE and not part of the Mingw32 package.
|
||||
* This file is for TinyCC and not part of the Mingw32 package.
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
|
@ -24,31 +24,93 @@
|
|||
#define __int32 long
|
||||
#define __int16 short
|
||||
#define __int8 char
|
||||
|
||||
#define __cdecl __attribute__((__cdecl__))
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#define __declspec(x) __attribute__((x))
|
||||
#define __fastcall
|
||||
|
||||
#define __MINGW32_VERSION 2.0
|
||||
#define __MINGW32_MAJOR_VERSION 2
|
||||
#define __MINGW32_MINOR_VERSION 0
|
||||
// #define __MINGW_IMPORT extern __declspec(dllimport)
|
||||
|
||||
#define __MSVCRT__ 1
|
||||
#define __MINGW_IMPORT extern
|
||||
#define _CRTIMP
|
||||
#undef _MSVCRT_
|
||||
#undef __MINGW_IMPORT
|
||||
|
||||
#define _CRTIMP extern
|
||||
#define __CRT_INLINE extern __inline__
|
||||
#define __MINGW_NOTHROW
|
||||
#define __MINGW_ATTRIB_NORETURN
|
||||
#define __MINGW_ATTRIB_DEPRECATED
|
||||
#define __GNUC_VA_LIST
|
||||
|
||||
#define _CONST_RETURN
|
||||
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
|
||||
#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
|
||||
|
||||
#define __CRT_STRINGIZE(_Value) #_Value
|
||||
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
||||
|
||||
#define __CRT_WIDE(_String) L ## _String
|
||||
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#define __stdcall
|
||||
#define _AMD64_ 1
|
||||
#define __x86_64 1
|
||||
#else
|
||||
typedef __int32 intptr_t;
|
||||
typedef unsigned __int32 uintptr_t;
|
||||
#define __stdcall __attribute__((__stdcall__))
|
||||
#define _X86_ 1
|
||||
#define WIN32 1
|
||||
|
||||
#ifndef _WINT_T
|
||||
#define _WINT_T
|
||||
typedef unsigned int wint_t;
|
||||
#endif
|
||||
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
#define _CRT_PACKING 8
|
||||
|
||||
typedef long __time32_t;
|
||||
#define _TIME32_T_DEFINED
|
||||
typedef __int64 __time64_t;
|
||||
#define _TIME64_T_DEFINED
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
|
||||
#endif
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#define _TIME_T_DEFINED
|
||||
|
||||
#define _WCTYPE_T_DEFINED
|
||||
typedef unsigned int wint_t;
|
||||
typedef unsigned short wctype_t;
|
||||
|
||||
#define _ERRCODE_DEFINED
|
||||
typedef int errno_t;
|
||||
|
||||
typedef struct threadlocaleinfostruct *pthreadlocinfo;
|
||||
typedef struct threadmbcinfostruct *pthreadmbcinfo;
|
||||
typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
|
||||
|
||||
/* for winapi */
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#define DECLSPEC_NORETURN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define DECLARE_STDCALL_P(type) __stdcall type
|
||||
#define NOSERVICE 1
|
||||
#define NOMCX 1
|
||||
#define NOIME 1
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0502
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x502
|
||||
#endif
|
||||
|
||||
/* get va_list */
|
||||
#include <stdarg.h>
|
||||
|
||||
#endif /* __MINGW_H */
|
||||
|
|
|
@ -1,71 +1,54 @@
|
|||
/*
|
||||
* assert.h
|
||||
*
|
||||
* Define the assert macro for debug output.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __ASSERT_H_
|
||||
#define __ASSERT_H_
|
||||
|
||||
#ifndef _ASSERT_H_
|
||||
#define _ASSERT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#ifdef __cplusplus
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
/*
|
||||
* If not debugging, assert does nothing.
|
||||
*/
|
||||
#define assert(x) ((void)0)
|
||||
|
||||
#else /* debugging enabled */
|
||||
|
||||
/*
|
||||
* CRTDLL nicely supplies a function which does the actual output and
|
||||
* call to abort.
|
||||
*/
|
||||
void _assert (const char*, const char*, int)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((noreturn))
|
||||
#ifndef assert
|
||||
#define assert(_Expression) ((void)0)
|
||||
#endif
|
||||
;
|
||||
#else
|
||||
|
||||
/*
|
||||
* Definition of the assert macro.
|
||||
*/
|
||||
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
|
||||
#endif /* NDEBUG */
|
||||
#ifndef _CRT_TERMINATE_DEFINED
|
||||
#define _CRT_TERMINATE_DEFINED
|
||||
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
|
||||
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#pragma push_macro("abort")
|
||||
#undef abort
|
||||
void __cdecl __declspec(noreturn) abort(void);
|
||||
#pragma pop_macro("abort")
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#ifndef assert
|
||||
#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
|
||||
#endif
|
||||
|
||||
#endif /* Not _ASSERT_H_ */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,159 +1,409 @@
|
|||
/* A conio implementation for Mingw/Dev-C++.
|
||||
*
|
||||
* Written by:
|
||||
* Hongli Lai <hongli@telekabel.nl>
|
||||
* tkorrovi <tkorrovi@altavista.net> on 2002/02/26.
|
||||
* Andrew Westcott <ajwestco@users.sourceforge.net>
|
||||
*
|
||||
* Offered for use in the public domain without any warranty.
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_CONIO
|
||||
#define _INC_CONIO
|
||||
|
||||
#ifndef _CONIO_H_
|
||||
#define _CONIO_H_
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BLINK 0
|
||||
_CRTIMP char *_cgets(char *_Buffer);
|
||||
_CRTIMP int __cdecl _cprintf(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _cputs(const char *_Str);
|
||||
_CRTIMP int __cdecl _cscanf(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _getch(void);
|
||||
_CRTIMP int __cdecl _getche(void);
|
||||
_CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _kbhit(void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BLACK,
|
||||
BLUE,
|
||||
GREEN,
|
||||
CYAN,
|
||||
RED,
|
||||
MAGENTA,
|
||||
BROWN,
|
||||
LIGHTGRAY,
|
||||
DARKGRAY,
|
||||
LIGHTBLUE,
|
||||
LIGHTGREEN,
|
||||
LIGHTCYAN,
|
||||
LIGHTRED,
|
||||
LIGHTMAGENTA,
|
||||
YELLOW,
|
||||
WHITE
|
||||
} COLORS;
|
||||
#if defined(_X86_) && !defined(__x86_64)
|
||||
int __cdecl _inp(unsigned short);
|
||||
unsigned short __cdecl _inpw(unsigned short);
|
||||
unsigned long __cdecl _inpd(unsigned short);
|
||||
int __cdecl _outp(unsigned short,int);
|
||||
unsigned short __cdecl _outpw(unsigned short,unsigned short);
|
||||
unsigned long __cdecl _outpd(unsigned short,unsigned long);
|
||||
#endif
|
||||
|
||||
_CRTIMP int __cdecl _putch(int _Ch);
|
||||
_CRTIMP int __cdecl _ungetch(int _Ch);
|
||||
_CRTIMP int __cdecl _getch_nolock(void);
|
||||
_CRTIMP int __cdecl _getche_nolock(void);
|
||||
_CRTIMP int __cdecl _putch_nolock(int _Ch);
|
||||
_CRTIMP int __cdecl _ungetch_nolock(int _Ch);
|
||||
|
||||
#define cgets _cgets
|
||||
#define cprintf _cprintf
|
||||
#define cputs _cputs
|
||||
#define cscanf _cscanf
|
||||
#define ScreenClear clrscr
|
||||
#ifndef _WCONIO_DEFINED
|
||||
#define _WCONIO_DEFINED
|
||||
|
||||
/* blinkvideo */
|
||||
#ifndef WEOF
|
||||
#define WEOF (wint_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
void clreol (void);
|
||||
void clrscr (void);
|
||||
_CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
|
||||
_CRTIMP wint_t __cdecl _getwch(void);
|
||||
_CRTIMP wint_t __cdecl _getwche(void);
|
||||
_CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
|
||||
_CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
|
||||
_CRTIMP int __cdecl _cputws(const wchar_t *_String);
|
||||
_CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
|
||||
_CRTIMP wint_t __cdecl _getwch_nolock(void);
|
||||
_CRTIMP wint_t __cdecl _getwche_nolock(void);
|
||||
_CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
|
||||
#endif
|
||||
|
||||
int _conio_gettext (int left, int top, int right, int bottom,
|
||||
char *str);
|
||||
/* _conio_kbhit */
|
||||
#ifndef NO_OLDNAMES
|
||||
char *__cdecl cgets(char *_Buffer);
|
||||
int __cdecl cprintf(const char *_Format,...);
|
||||
int __cdecl cputs(const char *_Str);
|
||||
int __cdecl cscanf(const char *_Format,...);
|
||||
int __cdecl getch(void);
|
||||
int __cdecl getche(void);
|
||||
int __cdecl kbhit(void);
|
||||
int __cdecl putch(int _Ch);
|
||||
int __cdecl ungetch(int _Ch);
|
||||
|
||||
void delline (void);
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
int __cdecl inp(unsigned short);
|
||||
unsigned short __cdecl inpw(unsigned short);
|
||||
int __cdecl outp(unsigned short,int);
|
||||
unsigned short __cdecl outpw(unsigned short,unsigned short);
|
||||
#endif
|
||||
|
||||
/* gettextinfo */
|
||||
void gotoxy(int x, int y);
|
||||
/*
|
||||
highvideo
|
||||
insline
|
||||
intensevideo
|
||||
lowvideo
|
||||
movetext
|
||||
normvideo
|
||||
*/
|
||||
/* I/O intrin functions. */
|
||||
__CRT_INLINE unsigned char __inbyte(unsigned short Port)
|
||||
{
|
||||
unsigned char value;
|
||||
__asm__ __volatile__ ("inb %w1,%b0"
|
||||
: "=a" (value)
|
||||
: "Nd" (Port));
|
||||
return value;
|
||||
}
|
||||
__CRT_INLINE unsigned short __inword(unsigned short Port)
|
||||
{
|
||||
unsigned short value;
|
||||
__asm__ __volatile__ ("inw %w1,%w0"
|
||||
: "=a" (value)
|
||||
: "Nd" (Port));
|
||||
return value;
|
||||
}
|
||||
__CRT_INLINE unsigned long __indword(unsigned short Port)
|
||||
{
|
||||
unsigned long value;
|
||||
__asm__ __volatile__ ("inl %w1,%0"
|
||||
: "=a" (value)
|
||||
: "Nd" (Port));
|
||||
return value;
|
||||
}
|
||||
__CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1"
|
||||
:
|
||||
: "a" (Data), "Nd" (Port));
|
||||
}
|
||||
__CRT_INLINE void __outword(unsigned short Port,unsigned short Data)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1"
|
||||
:
|
||||
: "a" (Data), "Nd" (Port));
|
||||
}
|
||||
__CRT_INLINE void __outdword(unsigned short Port,unsigned long Data)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1"
|
||||
:
|
||||
: "a" (Data), "Nd" (Port));
|
||||
}
|
||||
__CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; insb "
|
||||
: "=D" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
__CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; insw "
|
||||
: "=D" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
__CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; insl "
|
||||
: "=D" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
|
||||
void puttext (int left, int top, int right, int bottom, char *str);
|
||||
__CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; outsb "
|
||||
: "=S" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
__CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; outsw "
|
||||
: "=S" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
__CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cld ; rep ; outsl "
|
||||
: "=S" (Buffer), "=c" (Count)
|
||||
: "d"(Port), "0"(Buffer), "1" (Count)
|
||||
);
|
||||
}
|
||||
|
||||
// Screen Variables
|
||||
__CRT_INLINE unsigned __int64 __readcr0(void)
|
||||
{
|
||||
unsigned __int64 value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr0, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
|
||||
seperatly. */
|
||||
|
||||
#ifdef _WIN64
|
||||
__CRT_INLINE void __writecr0(unsigned __int64 Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr0"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned __int64 __readcr2(void)
|
||||
{
|
||||
unsigned __int64 value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr2, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
/* ScreenCols
|
||||
ScreenGetChar
|
||||
ScreenGetCursor
|
||||
ScreenMode
|
||||
ScreenPutChar
|
||||
ScreenPutString
|
||||
ScreenRetrieve
|
||||
ScreenRows
|
||||
ScreenSetCursor
|
||||
ScreenUpdate
|
||||
ScreenUpdateLine
|
||||
ScreenVisualBell
|
||||
_set_screen_lines */
|
||||
__CRT_INLINE void __writecr2(unsigned __int64 Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr2"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned __int64 __readcr3(void)
|
||||
{
|
||||
unsigned __int64 value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr3, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
void _setcursortype (int type);
|
||||
__CRT_INLINE void __writecr3(unsigned __int64 Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr3"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned __int64 __readcr4(void)
|
||||
{
|
||||
unsigned __int64 value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr4, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
void textattr (int _attr);
|
||||
__CRT_INLINE void __writecr4(unsigned __int64 Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr4"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned __int64 __readcr8(void)
|
||||
{
|
||||
unsigned __int64 value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr8, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
void textbackground (int color);
|
||||
__CRT_INLINE void __writecr8(unsigned __int64 Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr8"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
||||
void textcolor (int color);
|
||||
__CRT_INLINE void __writecr0(unsigned Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr0"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned long __readcr2(void)
|
||||
{
|
||||
unsigned long value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr2, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
/* textmode */
|
||||
__CRT_INLINE void __writecr2(unsigned Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr2"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned long __readcr3(void)
|
||||
{
|
||||
unsigned long value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr3, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
int wherex (void);
|
||||
__CRT_INLINE void __writecr3(unsigned Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr3"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned long __readcr4(void)
|
||||
{
|
||||
unsigned long value;
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr4, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
int wherey (void);
|
||||
__CRT_INLINE void __writecr4(unsigned Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr4"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned long __readcr8(void)
|
||||
{
|
||||
unsigned long value; __asm__ __volatile__ (
|
||||
"mov %%cr8, %[value]"
|
||||
: [value] "=q" (value));
|
||||
return value;
|
||||
}
|
||||
|
||||
/* window */
|
||||
__CRT_INLINE void __writecr8(unsigned Data)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mov %[Data], %%cr8"
|
||||
:
|
||||
: [Data] "q" (Data)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
__CRT_INLINE unsigned __int64 __readmsr(unsigned long msr)
|
||||
{
|
||||
unsigned __int64 val1, val2;
|
||||
__asm__ __volatile__(
|
||||
"rdmsr"
|
||||
: "=a" (val1), "=d" (val2)
|
||||
: "c" (msr));
|
||||
return val1 | (val2 << 32);
|
||||
}
|
||||
|
||||
__CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value)
|
||||
{
|
||||
unsigned long val1 = Value, val2 = Value >> 32;
|
||||
__asm__ __volatile__ (
|
||||
"wrmsr"
|
||||
:
|
||||
: "c" (msr), "a" (val1), "d" (val2));
|
||||
}
|
||||
|
||||
__CRT_INLINE unsigned __int64 __rdtsc(void)
|
||||
{
|
||||
unsigned __int64 val1, val2;
|
||||
__asm__ __volatile__ (
|
||||
"rdtsc"
|
||||
: "=a" (val1), "=d" (val2));
|
||||
return val1 | (val2 << 32);
|
||||
}
|
||||
|
||||
/* The code below was part of Mingw's conio.h */
|
||||
/*
|
||||
* conio.h
|
||||
*
|
||||
* Low level console I/O functions. Pretty please try to use the ANSI
|
||||
* standard ones if you are writing new code.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
char* _cgets (char*);
|
||||
int _cprintf (const char*, ...);
|
||||
int _cputs (const char*);
|
||||
int _cscanf (char*, ...);
|
||||
|
||||
int _getch (void);
|
||||
int _getche (void);
|
||||
int _kbhit (void);
|
||||
int _putch (int);
|
||||
int _ungetch (int);
|
||||
|
||||
|
||||
int getch (void);
|
||||
int getche (void);
|
||||
int kbhit (void);
|
||||
int putch (int);
|
||||
int ungetch (int);
|
||||
__CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"cpuid"
|
||||
: "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
|
||||
: "a" (InfoType));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CONIO_H_ */
|
||||
#include <sec_api/conio_s.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,232 +1,281 @@
|
|||
/*
|
||||
* ctype.h
|
||||
*
|
||||
* Functions for testing character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_CTYPE
|
||||
#define _INC_CTYPE
|
||||
|
||||
#ifndef _CTYPE_H_
|
||||
#define _CTYPE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int isalnum(int);
|
||||
int isalpha(int);
|
||||
int iscntrl(int);
|
||||
int isdigit(int);
|
||||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isprint(int);
|
||||
int ispunct(int);
|
||||
int isspace(int);
|
||||
int isupper(int);
|
||||
int isxdigit(int);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int _isctype (int, int);
|
||||
#endif
|
||||
|
||||
/* These are the ANSI versions, with correct checking of argument */
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
|
||||
/*
|
||||
* NOTE: The above are not old name type wrappers, but functions exported
|
||||
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
|
||||
* exported.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* These are the cheap non-std versions: The return values are undefined
|
||||
* if the argument is not ASCII char or is not of appropriate case
|
||||
*/
|
||||
int _tolower(int);
|
||||
int _toupper(int);
|
||||
#endif
|
||||
|
||||
/* Also defined in stdlib.h */
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else /* CRTDLL */
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use inlines here rather than macros, because macros will upset
|
||||
* C++ usage (eg, ::isalnum), and so usually get undefined
|
||||
*
|
||||
* According to standard for SB chars, these function are defined only
|
||||
* for input values representable by unsigned char or EOF.
|
||||
* Thus, there is no range test.
|
||||
* This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
|
||||
*
|
||||
* If no MB char support is needed, these can be simplified even
|
||||
* more by command line define -DMB_CUR_MAX=1. The compiler will then
|
||||
* optimise away the constant condition.
|
||||
*/
|
||||
|
||||
|
||||
#if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ ))
|
||||
/* use simple lookup if SB locale, else _isctype() */
|
||||
#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
|
||||
extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
|
||||
extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
|
||||
extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
|
||||
extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
|
||||
extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);}
|
||||
extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
|
||||
extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);}
|
||||
extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);}
|
||||
extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);}
|
||||
|
||||
/* these reproduce behaviour of lib underscored versions */
|
||||
extern __inline__ int _tolower(int c) {return ( c -'A'+'a');}
|
||||
extern __inline__ int _toupper(int c) {return ( c -'a'+'A');}
|
||||
|
||||
/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
|
||||
if we only want C-locale. */
|
||||
|
||||
#endif /* _NO_CTYPE_INLINES */
|
||||
|
||||
/* Wide character equivalents */
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#define WEOF (wint_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#ifndef _CRT_CTYPEDATA_DEFINED
|
||||
#define _CRT_CTYPEDATA_DEFINED
|
||||
#ifndef _CTYPE_DISABLE_MACROS
|
||||
|
||||
#ifndef __PCTYPE_FUNC
|
||||
#define __PCTYPE_FUNC __pctype_func()
|
||||
#ifdef _MSVCRT_
|
||||
#define __pctype_func() (_pctype)
|
||||
#else
|
||||
#define __pctype_func() (*_imp___pctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
#ifndef _pctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned short *_pctype;
|
||||
#else
|
||||
extern unsigned short **_imp___pctype;
|
||||
#define _pctype (*_imp___pctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int isleadbyte (int);
|
||||
#ifndef _CRT_WCTYPEDATA_DEFINED
|
||||
#define _CRT_WCTYPEDATA_DEFINED
|
||||
#ifndef _CTYPE_DISABLE_MACROS
|
||||
#ifndef _wctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned short *_wctype;
|
||||
#else
|
||||
extern unsigned short **_imp___wctype;
|
||||
#define _wctype (*_imp___wctype)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _MSVCRT_
|
||||
#define __pwctype_func() (_pwctype)
|
||||
#ifndef _pwctype
|
||||
extern unsigned short *_pwctype;
|
||||
#endif
|
||||
#else
|
||||
#define __pwctype_func() (*_imp___pwctype)
|
||||
#ifndef _pwctype
|
||||
extern unsigned short **_imp___pwctype;
|
||||
#define _pwctype (*_imp___pwctype)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Also in wctype.h */
|
||||
#if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
/* CRT stuff */
|
||||
#if 1
|
||||
extern const unsigned char __newclmap[];
|
||||
extern const unsigned char __newcumap[];
|
||||
extern pthreadlocinfo __ptlocinfo;
|
||||
extern pthreadmbcinfo __ptmbcinfo;
|
||||
extern int __globallocalestatus;
|
||||
extern int __locale_changed;
|
||||
extern struct threadlocaleinfostruct __initiallocinfo;
|
||||
extern _locale_tstruct __initiallocalestructinfo;
|
||||
pthreadlocinfo __cdecl __updatetlocinfo(void);
|
||||
pthreadmbcinfo __cdecl __updatetmbcinfo(void);
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int __isascii (int);
|
||||
int __toascii (int);
|
||||
int __iscsymf (int); /* Valid first character in C symbol */
|
||||
int __iscsym (int); /* Valid character in C symbol (after first) */
|
||||
#define _UPPER 0x1
|
||||
#define _LOWER 0x2
|
||||
#define _DIGIT 0x4
|
||||
#define _SPACE 0x8
|
||||
|
||||
#ifndef __NO_CTYPE_INLINES
|
||||
extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
|
||||
extern __inline__ int __toascii(int c) {return (c & 0x7F);}
|
||||
extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
|
||||
extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
|
||||
#endif /* __NO_CTYPE_INLINES */
|
||||
#define _PUNCT 0x10
|
||||
#define _CONTROL 0x20
|
||||
#define _BLANK 0x40
|
||||
#define _HEX 0x80
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int isascii (int);
|
||||
int toascii (int);
|
||||
int iscsymf (int);
|
||||
int iscsym (int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#define _LEADBYTE 0x8000
|
||||
#define _ALPHA (0x0100|_UPPER|_LOWER)
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _CTYPE_DEFINED
|
||||
#define _CTYPE_DEFINED
|
||||
|
||||
_CRTIMP int __cdecl _isctype(int _C,int _Type);
|
||||
_CRTIMP int __cdecl _isctype_l(int _C,int _Type,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isalpha(int _C);
|
||||
_CRTIMP int __cdecl _isalpha_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isupper(int _C);
|
||||
_CRTIMP int __cdecl _isupper_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl islower(int _C);
|
||||
_CRTIMP int __cdecl _islower_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isdigit(int _C);
|
||||
_CRTIMP int __cdecl _isdigit_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isxdigit(int _C);
|
||||
_CRTIMP int __cdecl _isxdigit_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isspace(int _C);
|
||||
_CRTIMP int __cdecl _isspace_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl ispunct(int _C);
|
||||
_CRTIMP int __cdecl _ispunct_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isalnum(int _C);
|
||||
_CRTIMP int __cdecl _isalnum_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isprint(int _C);
|
||||
_CRTIMP int __cdecl _isprint_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl isgraph(int _C);
|
||||
_CRTIMP int __cdecl _isgraph_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl iscntrl(int _C);
|
||||
_CRTIMP int __cdecl _iscntrl_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl toupper(int _C);
|
||||
_CRTIMP int __cdecl tolower(int _C);
|
||||
_CRTIMP int __cdecl _tolower(int _C);
|
||||
_CRTIMP int __cdecl _tolower_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _toupper(int _C);
|
||||
_CRTIMP int __cdecl _toupper_l(int _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl __isascii(int _C);
|
||||
_CRTIMP int __cdecl __toascii(int _C);
|
||||
_CRTIMP int __cdecl __iscsymf(int _C);
|
||||
_CRTIMP int __cdecl __iscsym(int _C);
|
||||
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
|
||||
int __cdecl isblank(int _C);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_DEFINED
|
||||
#define _WCTYPE_DEFINED
|
||||
|
||||
int __cdecl iswalpha(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswupper(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswlower(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswdigit(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswxdigit(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswspace(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswpunct(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswalnum(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswprint(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswgraph(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswcntrl(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswascii(wint_t _C);
|
||||
int __cdecl isleadbyte(int _C);
|
||||
_CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
|
||||
wint_t __cdecl towupper(wint_t _C);
|
||||
_CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
|
||||
wint_t __cdecl towlower(wint_t _C);
|
||||
_CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswctype(wint_t _C,wctype_t _Type);
|
||||
_CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl __iswcsymf(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl __iswcsym(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl is_wctype(wint_t _C,wctype_t _Type);
|
||||
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
|
||||
int __cdecl iswblank(wint_t _C);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CTYPE_DISABLE_MACROS
|
||||
|
||||
#ifndef MB_CUR_MAX
|
||||
#define MB_CUR_MAX ___mb_cur_max_func()
|
||||
#ifndef __mb_cur_max
|
||||
#ifdef _MSVCRT_
|
||||
extern int __mb_cur_max;
|
||||
#else
|
||||
#define __mb_cur_max (*_imp____mb_cur_max)
|
||||
extern int *_imp____mb_cur_max;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _MSVCRT_
|
||||
#define ___mb_cur_max_func() (__mb_cur_max)
|
||||
#else
|
||||
#define ___mb_cur_max_func() (*_imp____mb_cur_max)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b))
|
||||
#define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & (_Flag))
|
||||
#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))
|
||||
#define _isalpha_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA,_Locale)
|
||||
#define _isupper_l(_Char,_Locale) _ischartype_l(_Char,_UPPER,_Locale)
|
||||
#define _islower_l(_Char,_Locale) _ischartype_l(_Char,_LOWER,_Locale)
|
||||
#define _isdigit_l(_Char,_Locale) _ischartype_l(_Char,_DIGIT,_Locale)
|
||||
#define _isxdigit_l(_Char,_Locale) _ischartype_l(_Char,_HEX,_Locale)
|
||||
#define _isspace_l(_Char,_Locale) _ischartype_l(_Char,_SPACE,_Locale)
|
||||
#define _ispunct_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT,_Locale)
|
||||
#define _isalnum_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA|_DIGIT,_Locale)
|
||||
#define _isprint_l(_Char,_Locale) _ischartype_l(_Char,_BLANK|_PUNCT|_ALPHA|_DIGIT,_Locale)
|
||||
#define _isgraph_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT|_ALPHA|_DIGIT,_Locale)
|
||||
#define _iscntrl_l(_Char,_Locale) _ischartype_l(_Char,_CONTROL,_Locale)
|
||||
#define _tolower(_Char) ((_Char)-'A'+'a')
|
||||
#define _toupper(_Char) ((_Char)-'a'+'A')
|
||||
#define __isascii(_Char) ((unsigned)(_Char) < 0x80)
|
||||
#define __toascii(_Char) ((_Char) & 0x7f)
|
||||
|
||||
#ifndef _WCTYPE_INLINE_DEFINED
|
||||
#define _WCTYPE_INLINE_DEFINED
|
||||
|
||||
#undef _CRT_WCTYPE_NOINLINE
|
||||
#ifndef __cplusplus
|
||||
#define iswalpha(_c) (iswctype(_c,_ALPHA))
|
||||
#define iswupper(_c) (iswctype(_c,_UPPER))
|
||||
#define iswlower(_c) (iswctype(_c,_LOWER))
|
||||
#define iswdigit(_c) (iswctype(_c,_DIGIT))
|
||||
#define iswxdigit(_c) (iswctype(_c,_HEX))
|
||||
#define iswspace(_c) (iswctype(_c,_SPACE))
|
||||
#define iswpunct(_c) (iswctype(_c,_PUNCT))
|
||||
#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
|
||||
#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
|
||||
#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
|
||||
#define iswcntrl(_c) (iswctype(_c,_CONTROL))
|
||||
#define iswascii(_c) ((unsigned)(_c) < 0x80)
|
||||
#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
|
||||
#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
|
||||
#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
|
||||
#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
|
||||
#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
|
||||
#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
|
||||
#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
|
||||
#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
|
||||
#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
|
||||
#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
|
||||
#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __iscsymf(_c) (isalpha(_c) || ((_c)=='_'))
|
||||
#define __iscsym(_c) (isalnum(_c) || ((_c)=='_'))
|
||||
#define __iswcsymf(_c) (iswalpha(_c) || ((_c)=='_'))
|
||||
#define __iswcsym(_c) (iswalnum(_c) || ((_c)=='_'))
|
||||
#define _iscsymf_l(_c,_p) (_isalpha_l(_c,_p) || ((_c)=='_'))
|
||||
#define _iscsym_l(_c,_p) (_isalnum_l(_c,_p) || ((_c)=='_'))
|
||||
#define _iswcsymf_l(_c,_p) (_iswalpha_l(_c,_p) || ((_c)=='_'))
|
||||
#define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_'))
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#ifndef _CTYPE_DEFINED
|
||||
int __cdecl isascii(int _C);
|
||||
int __cdecl toascii(int _C);
|
||||
int __cdecl iscsymf(int _C);
|
||||
int __cdecl iscsym(int _C);
|
||||
#else
|
||||
#define isascii __isascii
|
||||
#define toascii __toascii
|
||||
#define iscsymf __iscsymf
|
||||
#define iscsym __iscsym
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _CTYPE_H_ */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* dir.h
|
||||
*
|
||||
|
|
|
@ -1,95 +1,68 @@
|
|||
/*
|
||||
* direct.h
|
||||
*
|
||||
* Functions for manipulating paths and directories (included from io.h)
|
||||
* plus functions for setting the current drive.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_DIRECT
|
||||
#define _INC_DIRECT
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRECT_H_
|
||||
#define _DIRECT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in dos.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* You really shouldn't be using these. Use the Win32 API functions instead.
|
||||
* However, it does make it easier to port older code.
|
||||
*/
|
||||
int _getdrive (void);
|
||||
unsigned long _getdrives(void);
|
||||
int _chdrive (int);
|
||||
char* _getdcwd (int, char*, int);
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
_CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
|
||||
_CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
|
||||
char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
|
||||
_CRTIMP int __cdecl _chdir(const char *_Path);
|
||||
_CRTIMP int __cdecl _mkdir(const char *_Path);
|
||||
_CRTIMP int __cdecl _rmdir(const char *_Path);
|
||||
_CRTIMP int __cdecl _chdrive(int _Drive);
|
||||
_CRTIMP int __cdecl _getdrive(void);
|
||||
_CRTIMP unsigned long __cdecl _getdrives(void);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#ifndef _GETDISKFREE_DEFINED
|
||||
#define _GETDISKFREE_DEFINED
|
||||
_CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
|
||||
#endif
|
||||
|
||||
#ifndef _WDIRECT_DEFINED
|
||||
/* wide character versions. Also in wchar.h */
|
||||
#ifdef __MSVCRT__
|
||||
int _wchdir(const wchar_t*);
|
||||
wchar_t* _wgetcwd(wchar_t*, int);
|
||||
wchar_t* _wgetdcwd(int, wchar_t*, int);
|
||||
int _wmkdir(const wchar_t*);
|
||||
int _wrmdir(const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WDIRECT_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
|
||||
_CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
|
||||
wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
|
||||
_CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
|
||||
_CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
|
||||
_CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef NO_OLDNAMES
|
||||
|
||||
#define diskfree_t _diskfree_t
|
||||
|
||||
char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes);
|
||||
int __cdecl chdir(const char *_Path);
|
||||
int __cdecl mkdir(const char *_Path);
|
||||
int __cdecl rmdir(const char *_Path);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRECT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,33 +1,18 @@
|
|||
/*
|
||||
* DIRENT.H (formerly DIRLIB.H)
|
||||
*
|
||||
* by M. J. Weinstein Released to public domain 1-Jan-89
|
||||
*
|
||||
* Because I have heard that this feature (opendir, readdir, closedir)
|
||||
* it so useful for programmers coming from UNIX or attempting to port
|
||||
* UNIX code, and because it is reasonably light weight, I have included
|
||||
* it in the Mingw32 package. I have also added an implementation of
|
||||
* rewinddir, seekdir and telldir.
|
||||
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* This code is distributed in the hope that is will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includeds but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#include <io.h>
|
||||
|
||||
|
@ -37,52 +22,103 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char* d_name; /* File name. */
|
||||
/* NOTE: The name in the dirent structure points to the name in the
|
||||
* finddata_t structure in the DIR. */
|
||||
};
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char* d_name; /* File name. */
|
||||
/* NOTE: The name in the dirent structure points to the name in the
|
||||
* finddata_t structure in the DIR. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
* dd_stat field is now int (was short in older versions).
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
long dd_handle;
|
||||
/* _findnext handle */
|
||||
long dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
short dd_stat;
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
int dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
|
||||
DIR* __cdecl opendir (const char*);
|
||||
struct dirent* __cdecl readdir (DIR*);
|
||||
int __cdecl closedir (DIR*);
|
||||
void __cdecl rewinddir (DIR*);
|
||||
long __cdecl telldir (DIR*);
|
||||
void __cdecl seekdir (DIR*, long);
|
||||
|
||||
|
||||
DIR* opendir (const char*);
|
||||
struct dirent* readdir (DIR*);
|
||||
int closedir (DIR*);
|
||||
void rewinddir (DIR*);
|
||||
long telldir (DIR*);
|
||||
void seekdir (DIR*, long);
|
||||
/* wide char versions */
|
||||
|
||||
struct _wdirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
wchar_t* d_name; /* File name. */
|
||||
/* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _wfinddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct _wdirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
long dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
int dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
wchar_t dd_name[1];
|
||||
} _WDIR;
|
||||
|
||||
|
||||
|
||||
_WDIR* __cdecl _wopendir (const wchar_t*);
|
||||
struct _wdirent* __cdecl _wreaddir (_WDIR*);
|
||||
int __cdecl _wclosedir (_WDIR*);
|
||||
void __cdecl _wrewinddir (_WDIR*);
|
||||
long __cdecl _wtelldir (_WDIR*);
|
||||
void __cdecl _wseekdir (_WDIR*, long);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -90,7 +126,10 @@ void seekdir (DIR*, long);
|
|||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* Not _DIRENT_H_ */
|
||||
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
|
|
@ -1,110 +1,55 @@
|
|||
/*
|
||||
* dos.h
|
||||
*
|
||||
* DOS-specific functions and structures.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_DOS
|
||||
#define _INC_DOS
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DOS_H_
|
||||
#define _DOS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/* For DOS file attributes */
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern unsigned int *__imp__basemajor_dll;
|
||||
extern unsigned int *__imp__baseminor_dll;
|
||||
extern unsigned int *__imp__baseversion_dll;
|
||||
extern unsigned int *__imp__osmajor_dll;
|
||||
extern unsigned int *__imp__osminor_dll;
|
||||
extern unsigned int *__imp__osmode_dll;
|
||||
|
||||
#define _basemajor (*__imp__basemajor_dll)
|
||||
#define _baseminor (*__imp__baseminor_dll)
|
||||
#define _baseversion (*__imp__baseversion_dll)
|
||||
#define _osmajor (*__imp__osmajor_dll)
|
||||
#define _osminor (*__imp__osminor_dll)
|
||||
#define _osmode (*__imp__osmode_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT unsigned int _basemajor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseminor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseversion_dll;
|
||||
__MINGW_IMPORT unsigned int _osmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _osminor_dll;
|
||||
__MINGW_IMPORT unsigned int _osmode_dll;
|
||||
|
||||
#define _basemajor _basemajor_dll
|
||||
#define _baseminor _baseminor_dll
|
||||
#define _baseversion _baseversion_dll
|
||||
#define _osmajor _osmajor_dll
|
||||
#define _osminor _osminor_dll
|
||||
#define _osmode _osmode_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in direct.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#define _A_NORMAL 0x00
|
||||
#define _A_RDONLY 0x01
|
||||
#define _A_HIDDEN 0x02
|
||||
#define _A_SYSTEM 0x04
|
||||
#define _A_SUBDIR 0x10
|
||||
#define _A_ARCH 0x20
|
||||
|
||||
#ifndef _GETDISKFREE_DEFINED
|
||||
#define _GETDISKFREE_DEFINED
|
||||
_CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
|
||||
#endif
|
||||
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
void __cdecl _disable(void);
|
||||
void __cdecl _enable(void);
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define diskfree_t _diskfree_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DOS_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,117 +1,75 @@
|
|||
/*
|
||||
* errno.h
|
||||
*
|
||||
* Error numbers and access to error reporting.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_ERRNO
|
||||
#define _INC_ERRNO
|
||||
|
||||
#ifndef _ERRNO_H_
|
||||
#define _ERRNO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Error numbers.
|
||||
* TODO: Can't be sure of some of these assignments, I guessed from the
|
||||
* names given by strerror and the defines in the Cygnus errno.h. A lot
|
||||
* of the names from the Cygnus errno.h are not represented, and a few
|
||||
* of the descriptions returned by strerror do not obviously match
|
||||
* their error naming.
|
||||
*/
|
||||
#define EPERM 1 /* Operation not permitted */
|
||||
#define ENOFILE 2 /* No such file or directory */
|
||||
#define ENOENT 2
|
||||
#define ESRCH 3 /* No such process */
|
||||
#define EINTR 4 /* Interrupted function call */
|
||||
#define EIO 5 /* Input/output error */
|
||||
#define ENXIO 6 /* No such device or address */
|
||||
#define E2BIG 7 /* Arg list too long */
|
||||
#define ENOEXEC 8 /* Exec format error */
|
||||
#define EBADF 9 /* Bad file descriptor */
|
||||
#define ECHILD 10 /* No child processes */
|
||||
#define EAGAIN 11 /* Resource temporarily unavailable */
|
||||
#define ENOMEM 12 /* Not enough space */
|
||||
#define EACCES 13 /* Permission denied */
|
||||
#define EFAULT 14 /* Bad address */
|
||||
/* 15 - Unknown Error */
|
||||
#define EBUSY 16 /* strerror reports "Resource device" */
|
||||
#define EEXIST 17 /* File exists */
|
||||
#define EXDEV 18 /* Improper link (cross-device link?) */
|
||||
#define ENODEV 19 /* No such device */
|
||||
#define ENOTDIR 20 /* Not a directory */
|
||||
#define EISDIR 21 /* Is a directory */
|
||||
#define EINVAL 22 /* Invalid argument */
|
||||
#define ENFILE 23 /* Too many open files in system */
|
||||
#define EMFILE 24 /* Too many open files */
|
||||
#define ENOTTY 25 /* Inappropriate I/O control operation */
|
||||
/* 26 - Unknown Error */
|
||||
#define EFBIG 27 /* File too large */
|
||||
#define ENOSPC 28 /* No space left on device */
|
||||
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
|
||||
#define EROFS 30 /* Read-only file system */
|
||||
#define EMLINK 31 /* Too many links */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
#define EDOM 33 /* Domain error (math functions) */
|
||||
#define ERANGE 34 /* Result too large (possibly too small) */
|
||||
/* 35 - Unknown Error */
|
||||
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
|
||||
#define EDEADLK 36
|
||||
/* 37 - Unknown Error */
|
||||
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
|
||||
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
|
||||
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
|
||||
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
|
||||
#define EILSEQ 42 /* Illegal byte sequence */
|
||||
|
||||
/*
|
||||
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
|
||||
* sockets.h header provided with windows32api-0.1.2.
|
||||
* You should go and put an #if 0 ... #endif around the whole block
|
||||
* of errors (look at the comment above them).
|
||||
*/
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
|
||||
* stdlib.h.
|
||||
*/
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#ifndef _CRT_ERRNO_DEFINED
|
||||
#define _CRT_ERRNO_DEFINED
|
||||
_CRTIMP extern int *__cdecl _errno(void);
|
||||
#define errno (*_errno())
|
||||
|
||||
errno_t __cdecl _set_errno(int _Value);
|
||||
errno_t __cdecl _get_errno(int *_Value);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EPERM 1
|
||||
#define ENOENT 2
|
||||
#define ESRCH 3
|
||||
#define EINTR 4
|
||||
#define EIO 5
|
||||
#define ENXIO 6
|
||||
#define E2BIG 7
|
||||
#define ENOEXEC 8
|
||||
#define EBADF 9
|
||||
#define ECHILD 10
|
||||
#define EAGAIN 11
|
||||
#define ENOMEM 12
|
||||
#define EACCES 13
|
||||
#define EFAULT 14
|
||||
#define EBUSY 16
|
||||
#define EEXIST 17
|
||||
#define EXDEV 18
|
||||
#define ENODEV 19
|
||||
#define ENOTDIR 20
|
||||
#define EISDIR 21
|
||||
#define ENFILE 23
|
||||
#define EMFILE 24
|
||||
#define ENOTTY 25
|
||||
#define EFBIG 27
|
||||
#define ENOSPC 28
|
||||
#define ESPIPE 29
|
||||
#define EROFS 30
|
||||
#define EMLINK 31
|
||||
#define EPIPE 32
|
||||
#define EDOM 33
|
||||
#define EDEADLK 36
|
||||
#define ENAMETOOLONG 38
|
||||
#define ENOLCK 39
|
||||
#define ENOSYS 40
|
||||
#define ENOTEMPTY 41
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
|
||||
#define _SECURECRT_ERRCODE_VALUES_DEFINED
|
||||
#define EINVAL 22
|
||||
#define ERANGE 34
|
||||
#define EILSEQ 42
|
||||
#define STRUNCATE 80
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define EDEADLOCK EDEADLK
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _ERRNO_H_ */
|
||||
#endif
|
||||
|
|
|
@ -1,20 +1,123 @@
|
|||
#ifndef _EXCPT_H
|
||||
#define _EXCPT_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_EXCPT
|
||||
#define _INC_EXCPT
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* FIXME: This will make some code compile. The programs will most
|
||||
likely crash when an exception is raised, but at least they will
|
||||
compile. */
|
||||
#ifdef __GNUC__
|
||||
#define __try
|
||||
#define __except(x) if (0) /* don't execute handler */
|
||||
#define __finally
|
||||
struct _EXCEPTION_POINTERS;
|
||||
|
||||
#define _try __try
|
||||
#define _except __except
|
||||
#define _finally __finally
|
||||
#ifndef EXCEPTION_DISPOSITION
|
||||
#define EXCEPTION_DISPOSITION int
|
||||
#endif
|
||||
#define ExceptionContinueExecution 0
|
||||
#define ExceptionContinueSearch 1
|
||||
#define ExceptionNestedException 2
|
||||
#define ExceptionCollidedUnwind 3
|
||||
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
struct _EXCEPTION_RECORD;
|
||||
struct _CONTEXT;
|
||||
|
||||
EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext);
|
||||
#elif defined(__ia64__)
|
||||
|
||||
typedef struct _EXCEPTION_POINTERS *Exception_info_ptr;
|
||||
struct _EXCEPTION_RECORD;
|
||||
struct _CONTEXT;
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
|
||||
_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);
|
||||
#elif defined(__x86_64)
|
||||
|
||||
struct _EXCEPTION_RECORD;
|
||||
struct _CONTEXT;
|
||||
#endif
|
||||
|
||||
#define GetExceptionCode _exception_code
|
||||
#define exception_code _exception_code
|
||||
#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info
|
||||
#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info
|
||||
#define AbnormalTermination _abnormal_termination
|
||||
#define abnormal_termination _abnormal_termination
|
||||
|
||||
unsigned long __cdecl _exception_code(void);
|
||||
void *__cdecl _exception_info(void);
|
||||
int __cdecl _abnormal_termination(void);
|
||||
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define EXCEPTION_CONTINUE_EXECUTION -1
|
||||
|
||||
/* CRT stuff */
|
||||
typedef void (__cdecl * _PHNDLR)(int);
|
||||
|
||||
struct _XCPT_ACTION {
|
||||
unsigned long XcptNum;
|
||||
int SigNum;
|
||||
_PHNDLR XcptAction;
|
||||
};
|
||||
|
||||
extern struct _XCPT_ACTION _XcptActTab[];
|
||||
extern int _XcptActTabCount;
|
||||
extern int _XcptActTabSize;
|
||||
extern int _First_FPE_Indx;
|
||||
extern int _Num_FPE;
|
||||
|
||||
int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
|
||||
int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
|
||||
|
||||
/*
|
||||
* The type of function that is expected as an exception handler to be
|
||||
* installed with _try1.
|
||||
*/
|
||||
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
||||
|
||||
#ifndef HAVE_NO_SEH
|
||||
/*
|
||||
* This is not entirely necessary, but it is the structure installed by
|
||||
* the _try1 primitive below.
|
||||
*/
|
||||
typedef struct _EXCEPTION_REGISTRATION {
|
||||
struct _EXCEPTION_REGISTRATION *prev;
|
||||
EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
||||
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
|
||||
|
||||
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
|
||||
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
|
||||
#endif
|
||||
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
#define __try1(pHandler) \
|
||||
__asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
|
||||
|
||||
#define __except1 \
|
||||
__asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
|
||||
: : : "%eax");
|
||||
#elif defined(__x86_64)
|
||||
#define __try1(pHandler) \
|
||||
__asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler));
|
||||
|
||||
#define __except1 \
|
||||
__asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \
|
||||
: : : "%rax");
|
||||
#else
|
||||
#define __try1(pHandler)
|
||||
#define __except1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,135 +1,52 @@
|
|||
/*
|
||||
* fcntl.h
|
||||
*
|
||||
* Access constants for _open. Note that the permissions constants are
|
||||
* in sys/stat.h (ick).
|
||||
*
|
||||
* This code is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _FCNTL_H_
|
||||
#define _FCNTL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* It appears that fcntl.h should include io.h for compatibility...
|
||||
*/
|
||||
#include <io.h>
|
||||
|
||||
/* Specifiy one of these flags to define the access mode. */
|
||||
#define _O_RDONLY 0
|
||||
#define _O_WRONLY 1
|
||||
#define _O_RDWR 2
|
||||
#ifndef _INC_FCNTL
|
||||
#define _INC_FCNTL
|
||||
|
||||
/* Mask for access mode bits in the _open flags. */
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
#define _O_RDONLY 0x0000
|
||||
#define _O_WRONLY 0x0001
|
||||
#define _O_RDWR 0x0002
|
||||
#define _O_APPEND 0x0008
|
||||
#define _O_CREAT 0x0100
|
||||
#define _O_TRUNC 0x0200
|
||||
#define _O_EXCL 0x0400
|
||||
#define _O_TEXT 0x4000
|
||||
#define _O_BINARY 0x8000
|
||||
#define _O_WTEXT 0x10000
|
||||
#define _O_U16TEXT 0x20000
|
||||
#define _O_U8TEXT 0x40000
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
|
||||
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
|
||||
#define _O_RAW _O_BINARY
|
||||
#define _O_NOINHERIT 0x0080
|
||||
#define _O_TEMPORARY 0x0040
|
||||
#define _O_SHORT_LIVED 0x1000
|
||||
|
||||
#define _O_RANDOM 0x0010
|
||||
#define _O_SEQUENTIAL 0x0020
|
||||
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
|
||||
* WARNING: Even if not created by _open! */
|
||||
#define _O_NOINHERIT 0x0080
|
||||
#define _O_SEQUENTIAL 0x0020
|
||||
#define _O_RANDOM 0x0010
|
||||
|
||||
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
|
||||
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
|
||||
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
|
||||
|
||||
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
|
||||
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
|
||||
#define _O_BINARY 0x8000 /* Input and output is not translated. */
|
||||
#define _O_RAW _O_BINARY
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* POSIX/Non-ANSI names for increased portability */
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* This variable determines the default file mode.
|
||||
* TODO: Which flags work?
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern unsigned int* __imp__fmode;
|
||||
#define _fmode (*__imp__fmode)
|
||||
#else
|
||||
/* CRTDLL */
|
||||
extern unsigned int* __imp__fmode_dll;
|
||||
#define _fmode (*__imp__fmode_dll)
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_RAW _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQUENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned int _fmode;
|
||||
#else /* ! __MSVCRT__ */
|
||||
__MINGW_IMPORT unsigned int _fmode_dll;
|
||||
#define _fmode _fmode_dll
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _setmode (int, int);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int setmode (int, int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _FCNTL_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
|
|
@ -1,31 +1,12 @@
|
|||
#ifndef _FENV_H
|
||||
#define _FENV_H
|
||||
|
||||
/*
|
||||
For now, support only for the basic abstraction of flags that are
|
||||
either set or clear. fexcept_t could be structure that holds more info
|
||||
about the fp environment.
|
||||
*/
|
||||
typedef unsigned short fexcept_t;
|
||||
|
||||
/* This 28-byte struct represents the entire floating point
|
||||
environment as stored by fnstenv or fstenv */
|
||||
typedef struct
|
||||
{
|
||||
unsigned short __control_word;
|
||||
unsigned short __unused0;
|
||||
unsigned short __status_word;
|
||||
unsigned short __unused1;
|
||||
unsigned short __tag_word;
|
||||
unsigned short __unused2;
|
||||
unsigned int __ip_offset; /* instruction pointer offset */
|
||||
unsigned short __ip_selector;
|
||||
unsigned short __opcode;
|
||||
unsigned int __data_offset;
|
||||
unsigned short __data_selector;
|
||||
unsigned short __unused3;
|
||||
} fenv_t;
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _FENV_H_
|
||||
#define _FENV_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
/* FPU status word exception flags */
|
||||
#define FE_INVALID 0x01
|
||||
|
@ -43,39 +24,81 @@ typedef struct
|
|||
#define FE_UPWARD 0x0800
|
||||
#define FE_TOWARDZERO 0x0c00
|
||||
|
||||
/* The MXCSR exception flags are the same as the
|
||||
FE flags. */
|
||||
#define __MXCSR_EXCEPT_FLAG_SHIFT 0
|
||||
|
||||
/* The default floating point environment */
|
||||
#define FE_DFL_ENV ((const fenv_t *)-1)
|
||||
|
||||
/* How much to shift FE status word exception flags
|
||||
to get MXCSR rounding flags, */
|
||||
#define __MXCSR_ROUND_FLAG_SHIFT 3
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
/*
|
||||
For now, support only for the basic abstraction of flags that are
|
||||
either set or clear. fexcept_t could be structure that holds more
|
||||
info about the fp environment.
|
||||
*/
|
||||
typedef unsigned short fexcept_t;
|
||||
|
||||
/* This 32-byte struct represents the entire floating point
|
||||
environment as stored by fnstenv or fstenv, augmented by
|
||||
the contents of the MXCSR register, as stored by stmxcsr
|
||||
(if CPU supports it). */
|
||||
typedef struct
|
||||
{
|
||||
unsigned short __control_word;
|
||||
unsigned short __unused0;
|
||||
unsigned short __status_word;
|
||||
unsigned short __unused1;
|
||||
unsigned short __tag_word;
|
||||
unsigned short __unused2;
|
||||
unsigned int __ip_offset; /* instruction pointer offset */
|
||||
unsigned short __ip_selector;
|
||||
unsigned short __opcode;
|
||||
unsigned int __data_offset;
|
||||
unsigned short __data_selector;
|
||||
unsigned short __unused3;
|
||||
unsigned int __mxcsr; /* contents of the MXCSR register */
|
||||
} fenv_t;
|
||||
|
||||
|
||||
/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
|
||||
different fp environments */
|
||||
|
||||
/* The default Intel x87 floating point environment (64-bit mantissa) */
|
||||
#define FE_PC64_ENV ((const fenv_t *)-1)
|
||||
|
||||
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
|
||||
#define FE_PC53_ENV ((const fenv_t *)-2)
|
||||
|
||||
/* The FE_DFL_ENV macro is required by standard.
|
||||
fesetenv will use the environment set at app startup.*/
|
||||
#define FE_DFL_ENV ((const fenv_t *) 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*TODO: Some of these could be inlined */
|
||||
/* 7.6.2 Exception */
|
||||
|
||||
extern int feclearexcept (int);
|
||||
extern int fegetexceptflag (fexcept_t * flagp, int excepts);
|
||||
extern int feraiseexcept (int excepts );
|
||||
extern int fesetexceptflag (const fexcept_t *, int);
|
||||
extern int fetestexcept (int excepts);
|
||||
|
||||
extern int __cdecl feclearexcept (int);
|
||||
extern int __cdecl fegetexceptflag (fexcept_t * flagp, int excepts);
|
||||
extern int __cdecl feraiseexcept (int excepts );
|
||||
extern int __cdecl fesetexceptflag (const fexcept_t *, int);
|
||||
extern int __cdecl fetestexcept (int excepts);
|
||||
|
||||
/* 7.6.3 Rounding */
|
||||
|
||||
extern int fegetround (void);
|
||||
extern int fesetround (int mode);
|
||||
|
||||
extern int __cdecl fegetround (void);
|
||||
extern int __cdecl fesetround (int mode);
|
||||
|
||||
/* 7.6.4 Environment */
|
||||
|
||||
extern int fegetenv (fenv_t * envp);
|
||||
extern int fesetenv (const fenv_t * );
|
||||
extern int feupdateenv (const fenv_t *);
|
||||
extern int feholdexcept (fenv_t *);
|
||||
extern int __cdecl fegetenv(fenv_t * envp);
|
||||
extern int __cdecl fesetenv(const fenv_t * );
|
||||
extern int __cdecl feupdateenv(const fenv_t *);
|
||||
extern int __cdecl feholdexcept(fenv_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,224 +0,0 @@
|
|||
/*
|
||||
* float.h
|
||||
*
|
||||
* Constants related to floating point arithmetic.
|
||||
*
|
||||
* Also included here are some non-ANSI bits for accessing the floating
|
||||
* point controller.
|
||||
*
|
||||
* NOTE: GCC provides float.h, and it is probably more accurate than this,
|
||||
* but it doesn't include the non-standard stuff for accessing the
|
||||
* fp controller. (TODO: Move those bits elsewhere?) Thus it is
|
||||
* probably not a good idea to use the GCC supplied version instead
|
||||
* of this header.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_GUARD 1
|
||||
#define FLT_NORMALIZE 1
|
||||
|
||||
/*
|
||||
* The characteristics of float.
|
||||
*/
|
||||
|
||||
/* The radix for floating point representation. */
|
||||
#define FLT_RADIX 2
|
||||
|
||||
/* Decimal digits of precision. */
|
||||
#define FLT_DIG 6
|
||||
|
||||
/* Smallest number such that 1+x != 1 */
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
|
||||
/* The number of base FLT_RADIX digits in the mantissa. */
|
||||
#define FLT_MANT_DIG 24
|
||||
|
||||
/* The maximum floating point number. */
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
|
||||
/* Maximum n such that FLT_RADIX^n - 1 is representable. */
|
||||
#define FLT_MAX_EXP 128
|
||||
|
||||
/* Maximum n such that 10^n is representable. */
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Minimum normalized floating-point number. */
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
|
||||
/* Minimum n such that FLT_RADIX^n is a normalized number. */
|
||||
#define FLT_MIN_EXP (-125)
|
||||
|
||||
/* Minimum n such that 10^n is a normalized number. */
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of double.
|
||||
*/
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 1.1102230246251568e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of long double.
|
||||
* NOTE: long double is the same as double.
|
||||
*/
|
||||
#define LDBL_DIG 15
|
||||
#define LDBL_EPSILON 1.1102230246251568e-16L
|
||||
#define LDBL_MANT_DIG 53
|
||||
#define LDBL_MAX 1.7976931348623157e+308L
|
||||
#define LDBL_MAX_EXP 1024
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
#define LDBL_MIN 2.2250738585072014e-308L
|
||||
#define LDBL_MIN_EXP (-1021)
|
||||
#define LDBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* Functions and definitions for controlling the FPU.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/* TODO: These constants are only valid for x86 machines */
|
||||
|
||||
/* Control word masks for unMask */
|
||||
#define _MCW_EM 0x0008001F /* Error masks */
|
||||
#define _MCW_IC 0x00040000 /* Infinity */
|
||||
#define _MCW_RC 0x00000300 /* Rounding */
|
||||
#define _MCW_PC 0x00030000 /* Precision */
|
||||
|
||||
/* Control word values for unNew (use with related unMask above) */
|
||||
#define _EM_INVALID 0x00000010
|
||||
#define _EM_DENORMAL 0x00080000
|
||||
#define _EM_ZERODIVIDE 0x00000008
|
||||
#define _EM_OVERFLOW 0x00000004
|
||||
#define _EM_UNDERFLOW 0x00000002
|
||||
#define _EM_INEXACT 0x00000001
|
||||
#define _IC_AFFINE 0x00040000
|
||||
#define _IC_PROJECTIVE 0x00000000
|
||||
#define _RC_CHOP 0x00000300
|
||||
#define _RC_UP 0x00000200
|
||||
#define _RC_DOWN 0x00000100
|
||||
#define _RC_NEAR 0x00000000
|
||||
#define _PC_24 0x00020000
|
||||
#define _PC_53 0x00010000
|
||||
#define _PC_64 0x00000000
|
||||
|
||||
/* These are also defined in Mingw math.h, needed to work around
|
||||
GCC build issues. */
|
||||
/* Return values for fpclass. */
|
||||
#ifndef __MINGW_FPCLASS_DEFINED
|
||||
#define __MINGW_FPCLASS_DEFINED 1
|
||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
||||
|
||||
/* invalid subconditions (_SW_INVALID also set) */
|
||||
#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
|
||||
#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
|
||||
#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
|
||||
#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
|
||||
|
||||
/* Floating point error signals and return codes */
|
||||
#define _FPE_INVALID 0x81
|
||||
#define _FPE_DENORMAL 0x82
|
||||
#define _FPE_ZERODIVIDE 0x83
|
||||
#define _FPE_OVERFLOW 0x84
|
||||
#define _FPE_UNDERFLOW 0x85
|
||||
#define _FPE_INEXACT 0x86
|
||||
#define _FPE_UNEMULATED 0x87
|
||||
#define _FPE_SQRTNEG 0x88
|
||||
#define _FPE_STACKOVERFLOW 0x8a
|
||||
#define _FPE_STACKUNDERFLOW 0x8b
|
||||
#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
|
||||
* i.e. change the bits in unMask to have the values they have in unNew,
|
||||
* leaving other bits unchanged. */
|
||||
unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
|
||||
unsigned int _control87 (unsigned int unNew, unsigned int unMask);
|
||||
|
||||
|
||||
unsigned int _clearfp (void); /* Clear the FPU status word */
|
||||
unsigned int _statusfp (void); /* Report the FPU status word */
|
||||
#define _clear87 _clearfp
|
||||
#define _status87 _statusfp
|
||||
|
||||
void _fpreset (void); /* Reset the FPU */
|
||||
void fpreset (void);
|
||||
|
||||
/* Global 'variable' for the current floating point error code. */
|
||||
int * __fpecode(void);
|
||||
#define _fpecode (*(__fpecode()))
|
||||
|
||||
/*
|
||||
* IEEE recommended functions
|
||||
*/
|
||||
|
||||
double _chgsign (double);
|
||||
double _copysign (double, double);
|
||||
double _logb (double);
|
||||
double _nextafter (double, double);
|
||||
double _scalb (double, long);
|
||||
|
||||
int _finite (double);
|
||||
int _fpclass (double);
|
||||
int _isnan (double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/* 7.8 Format conversion of integer types <inttypes.h> */
|
||||
|
||||
#ifndef _INTTYPES_H
|
||||
#define _INTTYPES_H
|
||||
#ifndef _INTTYPES_H_
|
||||
#define _INTTYPES_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <stdint.h>
|
||||
#define __need_wchar_t
|
||||
#include <stddef.h>
|
||||
|
@ -43,7 +49,6 @@ typedef struct {
|
|||
#define PRIdFAST64 "I64d"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIdPTR "d"
|
||||
|
||||
#define PRIi8 "i"
|
||||
#define PRIi16 "i"
|
||||
|
@ -61,7 +66,6 @@ typedef struct {
|
|||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIiMAX "I64i"
|
||||
#define PRIiPTR "i"
|
||||
|
||||
#define PRIo8 "o"
|
||||
#define PRIo16 "o"
|
||||
|
@ -80,8 +84,6 @@ typedef struct {
|
|||
|
||||
#define PRIoMAX "I64o"
|
||||
|
||||
#define PRIoPTR "o"
|
||||
|
||||
/* fprintf macros for unsigned types */
|
||||
#define PRIu8 "u"
|
||||
#define PRIu16 "u"
|
||||
|
@ -100,7 +102,6 @@ typedef struct {
|
|||
#define PRIuFAST64 "I64u"
|
||||
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIuPTR "u"
|
||||
|
||||
#define PRIx8 "x"
|
||||
#define PRIx16 "x"
|
||||
|
@ -118,7 +119,6 @@ typedef struct {
|
|||
#define PRIxFAST64 "I64x"
|
||||
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIxPTR "x"
|
||||
|
||||
#define PRIX8 "X"
|
||||
#define PRIX16 "X"
|
||||
|
@ -136,7 +136,6 @@ typedef struct {
|
|||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIXMAX "I64X"
|
||||
#define PRIXPTR "X"
|
||||
|
||||
/*
|
||||
* fscanf macros for signed int types
|
||||
|
@ -158,7 +157,6 @@ typedef struct {
|
|||
#define SCNdFAST64 "I64d"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNdPTR "d"
|
||||
|
||||
#define SCNi16 "hi"
|
||||
#define SCNi32 "i"
|
||||
|
@ -173,7 +171,6 @@ typedef struct {
|
|||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNiMAX "I64i"
|
||||
#define SCNiPTR "i"
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNo32 "o"
|
||||
|
@ -188,7 +185,6 @@ typedef struct {
|
|||
#define SCNoFAST64 "I64o"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNoPTR "o"
|
||||
|
||||
#define SCNx16 "hx"
|
||||
#define SCNx32 "x"
|
||||
|
@ -203,8 +199,6 @@ typedef struct {
|
|||
#define SCNxFAST64 "I64x"
|
||||
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNxPTR "x"
|
||||
|
||||
|
||||
/* fscanf macros for unsigned int types */
|
||||
|
||||
|
@ -221,7 +215,32 @@ typedef struct {
|
|||
#define SCNuFAST64 "I64u"
|
||||
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNuPTR "u"
|
||||
|
||||
#ifdef _WIN64
|
||||
#define PRIdPTR "I64d"
|
||||
#define PRIiPTR "I64i"
|
||||
#define PRIoPTR "I64o"
|
||||
#define PRIuPTR "I64u"
|
||||
#define PRIxPTR "I64x"
|
||||
#define PRIXPTR "I64X"
|
||||
#define SCNdPTR "I64d"
|
||||
#define SCNiPTR "I64i"
|
||||
#define SCNoPTR "I64o"
|
||||
#define SCNxPTR "I64x"
|
||||
#define SCNuPTR "I64u"
|
||||
#else
|
||||
#define PRIdPTR "d"
|
||||
#define PRIiPTR "i"
|
||||
#define PRIoPTR "o"
|
||||
#define PRIuPTR "u"
|
||||
#define PRIxPTR "x"
|
||||
#define PRIXPTR "X"
|
||||
#define SCNdPTR "d"
|
||||
#define SCNiPTR "i"
|
||||
#define SCNoPTR "o"
|
||||
#define SCNxPTR "x"
|
||||
#define SCNuPTR "u"
|
||||
#endif
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/*
|
||||
|
@ -254,19 +273,22 @@ typedef struct {
|
|||
|
||||
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
|
||||
|
||||
extern inline intmax_t imaxabs (intmax_t j)
|
||||
intmax_t __cdecl imaxabs (intmax_t j);
|
||||
__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j)
|
||||
{return (j >= 0 ? j : -j);}
|
||||
imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
|
||||
imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom);
|
||||
|
||||
/* 7.8.2 Conversion functions for greatest-width integer types */
|
||||
|
||||
intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
intmax_t __cdecl strtoimax (const char* __restrict__ nptr,
|
||||
char** __restrict__ endptr, int base);
|
||||
uintmax_t __cdecl strtoumax (const char* __restrict__ nptr,
|
||||
char** __restrict__ endptr, int base);
|
||||
|
||||
intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr,
|
||||
wchar_t** __restrict__ endptr, int base);
|
||||
uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr,
|
||||
wchar_t** __restrict__ endptr, int base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,296 +1,418 @@
|
|||
/*
|
||||
* io.h
|
||||
*
|
||||
* System level I/O functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _IO_H_
|
||||
#define _IO_H_
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _IO_H_
|
||||
#define _IO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <string.h>
|
||||
|
||||
/* We need the definition of FILE anyway... */
|
||||
#include <stdio.h>
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
/* MSVC's io.h contains the stuff from dir.h, so I will too.
|
||||
* NOTE: This also defines off_t, the file offset type, through
|
||||
* an inclusion of sys/types.h */
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _POSIX_
|
||||
|
||||
#include <sys/types.h> /* To get time_t. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Attributes of files as returned by _findfirst et al.
|
||||
*/
|
||||
#define _A_NORMAL 0x00000000
|
||||
#define _A_RDONLY 0x00000001
|
||||
#define _A_HIDDEN 0x00000002
|
||||
#define _A_SYSTEM 0x00000004
|
||||
#define _A_VOLID 0x00000008
|
||||
#define _A_SUBDIR 0x00000010
|
||||
#define _A_ARCH 0x00000020
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
_CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
#define _FSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following structure is filled in by _findfirst or _findnext when
|
||||
* they succeed in finding a match.
|
||||
*/
|
||||
struct _finddata_t
|
||||
{
|
||||
unsigned attrib; /* Attributes, see constants above. */
|
||||
time_t time_create;
|
||||
time_t time_access; /* always midnight local time */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
char name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
#ifndef _FINDDATA_T_DEFINED
|
||||
|
||||
struct _finddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
char name[FILENAME_MAX];
|
||||
};
|
||||
struct _finddata32_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
_fsize_t size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
/*#if _INTEGRAL_MAX_BITS >= 64*/
|
||||
|
||||
struct _finddata32i64_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
__int64 size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
struct _finddata64i32_t {
|
||||
unsigned attrib;
|
||||
__time64_t time_create;
|
||||
__time64_t time_access;
|
||||
__time64_t time_write;
|
||||
_fsize_t size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
struct __finddata64_t {
|
||||
unsigned attrib;
|
||||
__time64_t time_create;
|
||||
__time64_t time_access;
|
||||
__time64_t time_write;
|
||||
__int64 size;
|
||||
char name[260];
|
||||
};
|
||||
/* #endif */
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _finddata_t _finddata32_t
|
||||
#define _finddatai64_t _finddata32i64_t
|
||||
|
||||
#ifdef _WIN64
|
||||
#define _findfirst _findfirst32
|
||||
#define _findnext _findnext32
|
||||
#else
|
||||
#define _findfirst32 _findfirst
|
||||
#define _findnext32 _findnext
|
||||
#endif
|
||||
#define _findfirsti64 _findfirst32i64
|
||||
#define _findnexti64 _findnext32i64
|
||||
#else
|
||||
#define _finddata_t _finddata64i32_t
|
||||
#define _finddatai64_t __finddata64_t
|
||||
|
||||
#define _findfirst _findfirst64i32
|
||||
#define _findnext _findnext64i32
|
||||
#define _findfirsti64 _findfirst64
|
||||
#define _findnexti64 _findnext64
|
||||
#endif
|
||||
|
||||
#define _FINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
struct _wfinddata32_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
/* #if _INTEGRAL_MAX_BITS >= 64 */
|
||||
|
||||
struct _wfinddata32i64_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddata64i32_t {
|
||||
unsigned attrib;
|
||||
__time64_t time_create;
|
||||
__time64_t time_access;
|
||||
__time64_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddata64_t {
|
||||
unsigned attrib;
|
||||
__time64_t time_create;
|
||||
__time64_t time_access;
|
||||
__time64_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
/* #endif */
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _wfinddata_t _wfinddata32_t
|
||||
#define _wfinddatai64_t _wfinddata32i64_t
|
||||
|
||||
#define _wfindfirst _wfindfirst32
|
||||
#define _wfindnext _wfindnext32
|
||||
#define _wfindfirsti64 _wfindfirst32i64
|
||||
#define _wfindnexti64 _wfindnext32i64
|
||||
#else
|
||||
#define _wfinddata_t _wfinddata64i32_t
|
||||
#define _wfinddatai64_t _wfinddata64_t
|
||||
|
||||
#define _wfindfirst _wfindfirst64i32
|
||||
#define _wfindnext _wfindnext64i32
|
||||
#define _wfindfirsti64 _wfindfirst64
|
||||
#define _wfindnexti64 _wfindnext64
|
||||
#endif
|
||||
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#define _A_NORMAL 0x00
|
||||
#define _A_RDONLY 0x01
|
||||
#define _A_HIDDEN 0x02
|
||||
#define _A_SYSTEM 0x04
|
||||
#define _A_SUBDIR 0x10
|
||||
#define _A_ARCH 0x20
|
||||
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
#define _SIZE_T_DEFINED
|
||||
#undef size_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef unsigned int size_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef unsigned __int64 size_t;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Functions for searching for files. _findfirst returns -1 if no match
|
||||
* is found. Otherwise it returns a handle to be used in _findnext and
|
||||
* _findclose calls. _findnext also returns -1 if no match could be found,
|
||||
* and 0 if a match was found. Call _findclose when you are finished.
|
||||
*/
|
||||
int _findfirst (const char*, struct _finddata_t*);
|
||||
int _findnext (int, struct _finddata_t*);
|
||||
int _findclose (int);
|
||||
|
||||
int _chdir (const char*);
|
||||
char* _getcwd (char*, int);
|
||||
int _mkdir (const char*);
|
||||
char* _mktemp (char*);
|
||||
int _rmdir (const char*);
|
||||
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _filelengthi64(int);
|
||||
long _findfirsti64(const char*, struct _finddatai64_t*);
|
||||
int _findnexti64(long, struct _finddatai64_t*);
|
||||
__int64 _lseeki64(int, __int64, int);
|
||||
__int64 _telli64(int);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifndef _UWIN
|
||||
int chdir (const char*);
|
||||
char* getcwd (char*, int);
|
||||
int mkdir (const char*);
|
||||
char* mktemp (char*);
|
||||
int rmdir (const char*);
|
||||
#endif /* _UWIN */
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#ifndef _SSIZE_T_DEFINED
|
||||
#define _SSIZE_T_DEFINED
|
||||
#undef ssize_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int ssize_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 ssize_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#ifndef _OFF_T_DEFINED
|
||||
#define _OFF_T_DEFINED
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _OFF64_T_DEFINED
|
||||
#define _OFF64_T_DEFINED
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int _off64_t __attribute__ ((mode (DI)));
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef int off64_t __attribute__ ((mode (DI)));
|
||||
#endif
|
||||
#else
|
||||
typedef long long _off64_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long long off64_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* TODO: Maximum number of open handles has not been tested, I just set
|
||||
* it the same as FOPEN_MAX. */
|
||||
#define HANDLE_MAX FOPEN_MAX
|
||||
|
||||
|
||||
/* Some defines for _access nAccessMode (MS doesn't define them, but
|
||||
* it doesn't seem to hurt to add them). */
|
||||
/* Some defines for _access nAccessMode (MS doesn't define them, but
|
||||
* it doesn't seem to hurt to add them). */
|
||||
#define F_OK 0 /* Check for file existence */
|
||||
#define X_OK 1 /* Check for execute permission. */
|
||||
#define W_OK 2 /* Check for write permission */
|
||||
#define R_OK 4 /* Check for read permission */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
_CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode);
|
||||
_CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode);
|
||||
_CRTIMP int __cdecl _chsize(int _FileHandle,long _Size);
|
||||
_CRTIMP int __cdecl _close(int _FileHandle);
|
||||
_CRTIMP int __cdecl _commit(int _FileHandle);
|
||||
_CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode);
|
||||
_CRTIMP int __cdecl _dup(int _FileHandle);
|
||||
_CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst);
|
||||
_CRTIMP int __cdecl _eof(int _FileHandle);
|
||||
_CRTIMP long __cdecl _filelength(int _FileHandle);
|
||||
_CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData);
|
||||
_CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData);
|
||||
_CRTIMP int __cdecl _findclose(intptr_t _FindHandle);
|
||||
_CRTIMP int __cdecl _isatty(int _FileHandle);
|
||||
_CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes);
|
||||
_CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin);
|
||||
_off64_t lseek64(int fd,_off64_t offset, int whence);
|
||||
_CRTIMP char *__cdecl _mktemp(char *_TemplateName);
|
||||
_CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode);
|
||||
_CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef _CRT_DIRECTORY_DEFINED
|
||||
#define _CRT_DIRECTORY_DEFINED
|
||||
int __cdecl remove(const char *_Filename);
|
||||
int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
|
||||
_CRTIMP int __cdecl _unlink(const char *_Filename);
|
||||
#ifndef NO_OLDNAMES
|
||||
int __cdecl unlink(const char *_Filename);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode);
|
||||
_CRTIMP long __cdecl _tell(int _FileHandle);
|
||||
_CRTIMP int __cdecl _umask(int _Mode);
|
||||
_CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount);
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle);
|
||||
_CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData);
|
||||
_CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
|
||||
#ifdef __cplusplus
|
||||
#include <string.h>
|
||||
#endif
|
||||
intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
|
||||
__CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
|
||||
{
|
||||
struct __finddata64_t fd;
|
||||
intptr_t ret = _findfirst64(_Filename,&fd);
|
||||
_FindData->attrib=fd.attrib;
|
||||
_FindData->time_create=fd.time_create;
|
||||
_FindData->time_access=fd.time_access;
|
||||
_FindData->time_write=fd.time_write;
|
||||
_FindData->size=(_fsize_t) fd.size;
|
||||
strncpy(_FindData->name,fd.name,260);
|
||||
return ret;
|
||||
}
|
||||
_CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
|
||||
_CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
|
||||
int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
|
||||
__CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
|
||||
{
|
||||
struct __finddata64_t fd;
|
||||
int ret = _findnext64(_FindHandle,&fd);
|
||||
_FindData->attrib=fd.attrib;
|
||||
_FindData->time_create=fd.time_create;
|
||||
_FindData->time_access=fd.time_access;
|
||||
_FindData->time_write=fd.time_write;
|
||||
_FindData->size=(_fsize_t) fd.size;
|
||||
strncpy(_FindData->name,fd.name,260);
|
||||
return ret;
|
||||
}
|
||||
__int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
|
||||
__int64 __cdecl _telli64(int _FileHandle);
|
||||
#endif
|
||||
#ifndef NO_OLDNAMES
|
||||
|
||||
#ifndef _UWIN
|
||||
int __cdecl chdir (const char *);
|
||||
char *__cdecl getcwd (char *, int);
|
||||
int __cdecl mkdir (const char *);
|
||||
char *__cdecl mktemp(char *);
|
||||
int __cdecl rmdir (const char*);
|
||||
int __cdecl chmod (const char *, int);
|
||||
#endif /* _UWIN */
|
||||
|
||||
#endif /* Not NO_OLDNAMES */
|
||||
|
||||
_CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
|
||||
|
||||
#ifndef __cplusplus
|
||||
_CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...);
|
||||
_CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
|
||||
#else
|
||||
extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0);
|
||||
extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0);
|
||||
#endif
|
||||
|
||||
#ifndef _WIO_DEFINED
|
||||
#define _WIO_DEFINED
|
||||
_CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
|
||||
_CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
|
||||
_CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
|
||||
_CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
|
||||
_CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
|
||||
_CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
|
||||
_CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
|
||||
_CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
|
||||
intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
|
||||
_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
|
||||
_CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
|
||||
int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
|
||||
_CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
|
||||
|
||||
#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
|
||||
_CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
|
||||
_CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
|
||||
#else
|
||||
extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
|
||||
extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
int __cdecl __lock_fhandle(int _Filehandle);
|
||||
void __cdecl _unlock_fhandle(int _Filehandle);
|
||||
_CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle);
|
||||
_CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
int __cdecl access(const char *_Filename,int _AccessMode);
|
||||
int __cdecl chmod(const char *_Filename,int _AccessMode);
|
||||
int __cdecl chsize(int _FileHandle,long _Size);
|
||||
int __cdecl close(int _FileHandle);
|
||||
int __cdecl creat(const char *_Filename,int _PermissionMode);
|
||||
int __cdecl dup(int _FileHandle);
|
||||
int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst);
|
||||
int __cdecl eof(int _FileHandle);
|
||||
long __cdecl filelength(int _FileHandle);
|
||||
int __cdecl isatty(int _FileHandle);
|
||||
int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes);
|
||||
long __cdecl lseek(int _FileHandle,long _Offset,int _Origin);
|
||||
char *__cdecl mktemp(char *_TemplateName);
|
||||
int __cdecl open(const char *_Filename,int _OpenFlag,...);
|
||||
int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
|
||||
int __cdecl setmode(int _FileHandle,int _Mode);
|
||||
int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
|
||||
long __cdecl tell(int _FileHandle);
|
||||
int __cdecl umask(int _Mode);
|
||||
int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _access (const char*, int);
|
||||
int _chsize (int, long);
|
||||
int _close (int);
|
||||
int _commit(int);
|
||||
|
||||
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
|
||||
* the "owner write permission" bit (on FAT). */
|
||||
int _creat (const char*, unsigned);
|
||||
|
||||
int _dup (int);
|
||||
int _dup2 (int, int);
|
||||
long _filelength (int);
|
||||
int _fileno (FILE*);
|
||||
long _get_osfhandle (int);
|
||||
int _isatty (int);
|
||||
|
||||
/* In a very odd turn of events this function is excluded from those
|
||||
* files which define _STREAM_COMPAT. This is required in order to
|
||||
* build GNU libio because of a conflict with _eof in streambuf.h
|
||||
* line 107. Actually I might just be able to change the name of
|
||||
* the enum member in streambuf.h... we'll see. TODO */
|
||||
#ifndef _STREAM_COMPAT
|
||||
int _eof (int);
|
||||
/* Misc stuff */
|
||||
char *getlogin(void);
|
||||
#ifdef __USE_MINGW_ALARM
|
||||
unsigned int alarm(unsigned int seconds);
|
||||
#endif
|
||||
|
||||
/* LK_... locking commands defined in sys/locking.h. */
|
||||
int _locking (int, int, long);
|
||||
#ifdef __USE_MINGW_ACCESS
|
||||
/* Old versions of MSVCRT access() just ignored X_OK, while the version
|
||||
shipped with Vista, returns an error code. This will restore the
|
||||
old behaviour */
|
||||
static inline int __mingw_access (const char *__fname, int __mode) {
|
||||
return _access (__fname, __mode & ~X_OK);
|
||||
}
|
||||
|
||||
long _lseek (int, long, int);
|
||||
|
||||
/* Optional third argument is unsigned unPermissions. */
|
||||
int _open (const char*, int, ...);
|
||||
|
||||
int _open_osfhandle (long, int);
|
||||
int _pipe (int *, unsigned int, int);
|
||||
int _read (int, void*, unsigned int);
|
||||
|
||||
/* SH_... flags for nShFlags defined in share.h
|
||||
* Optional fourth argument is unsigned unPermissions */
|
||||
int _sopen (const char*, int, int, ...);
|
||||
|
||||
long _tell (int);
|
||||
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
|
||||
int _umask (int);
|
||||
int _unlink (const char*);
|
||||
int _write (int, const void*, unsigned int);
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Not in crtdll.dll */
|
||||
#if !defined (_WIO_DEFINED)
|
||||
#if defined (__MSVCRT__)
|
||||
int _waccess(const wchar_t*, int);
|
||||
int _wchmod(const wchar_t*, int);
|
||||
int _wcreat(const wchar_t*, int);
|
||||
long _wfindfirst(wchar_t*, struct _wfinddata_t*);
|
||||
int _wfindnext(long, struct _wfinddata_t *);
|
||||
int _wunlink(const wchar_t*);
|
||||
int _wopen(const wchar_t*, int, ...);
|
||||
int _wsopen(const wchar_t*, int, int, ...);
|
||||
wchar_t * _wmktemp(wchar_t*);
|
||||
long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
|
||||
int _wfindnexti64(long, struct _wfinddatai64_t*);
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions to improve portability.
|
||||
* These functions live in libmoldname.a.
|
||||
*/
|
||||
|
||||
#ifndef _UWIN
|
||||
int access (const char*, int);
|
||||
int chsize (int, long );
|
||||
int close (int);
|
||||
int creat (const char*, int);
|
||||
int dup (int);
|
||||
int dup2 (int, int);
|
||||
int eof (int);
|
||||
long filelength (int);
|
||||
int fileno (FILE*);
|
||||
int isatty (int);
|
||||
long lseek (int, long, int);
|
||||
int open (const char*, int, ...);
|
||||
int read (int, void*, unsigned int);
|
||||
int sopen (const char*, int, int, ...);
|
||||
long tell (int);
|
||||
int umask (int);
|
||||
int unlink (const char*);
|
||||
int write (int, const void*, unsigned int);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
|
||||
#if 0
|
||||
int waccess(const wchar_t *, int);
|
||||
int wchmod(const wchar_t *, int);
|
||||
int wcreat(const wchar_t *, int);
|
||||
long wfindfirst(wchar_t *, struct _wfinddata_t *);
|
||||
int wfindnext(long, struct _wfinddata_t *);
|
||||
int wunlink(const wchar_t *);
|
||||
int wrename(const wchar_t *, const wchar_t *);
|
||||
int wopen(const wchar_t *, int, ...);
|
||||
int wsopen(const wchar_t *, int, int, ...);
|
||||
wchar_t * wmktemp(wchar_t *);
|
||||
#define access(__f,__m) __mingw_access (__f, __m)
|
||||
#endif
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _IO_H_ not defined */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* Not strict ANSI */
|
||||
#include <sec_api/io_s.h>
|
||||
|
||||
#endif /* End _IO_H_ */
|
||||
|
||||
|
|
|
@ -1,115 +1,111 @@
|
|||
/*
|
||||
* limits.h
|
||||
*
|
||||
* Defines constants for the sizes of integral types.
|
||||
*
|
||||
* NOTE: GCC should supply a version of this header and it should be safe to
|
||||
* use that version instead of this one (maybe safer).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _LIMITS_H_
|
||||
#define _LIMITS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef _INC_LIMITS
|
||||
#define _INC_LIMITS
|
||||
|
||||
/*
|
||||
* File system limits
|
||||
*
|
||||
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
|
||||
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
|
||||
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
|
||||
* required for the NUL. TODO: Test?
|
||||
*/
|
||||
* File system limits
|
||||
*
|
||||
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
|
||||
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
|
||||
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
|
||||
* required for the NUL. TODO: Test?
|
||||
*/
|
||||
#define PATH_MAX (259)
|
||||
|
||||
/*
|
||||
* Characteristics of the char data type.
|
||||
*
|
||||
* TODO: Is MB_LEN_MAX correct?
|
||||
*/
|
||||
#define CHAR_BIT 8
|
||||
#define MB_LEN_MAX 2
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define UCHAR_MAX 0xff
|
||||
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
|
||||
#define UCHAR_MAX 255
|
||||
#define MB_LEN_MAX 5
|
||||
#define SHRT_MIN (-32768)
|
||||
#define SHRT_MAX 32767
|
||||
#define USHRT_MAX 0xffff
|
||||
#define INT_MIN (-2147483647 - 1)
|
||||
#define INT_MAX 2147483647
|
||||
#define UINT_MAX 0xffffffff
|
||||
#define LONG_MIN (-2147483647L - 1)
|
||||
#define LONG_MAX 2147483647L
|
||||
#define ULONG_MAX 0xffffffffUL
|
||||
#define LLONG_MAX 9223372036854775807ll
|
||||
#define LLONG_MIN (-9223372036854775807ll - 1)
|
||||
#define ULLONG_MAX 0xffffffffffffffffull
|
||||
|
||||
/* TODO: Is this safe? I think it might just be testing the preprocessor,
|
||||
* not the compiler itself... */
|
||||
#if ('\x80' < 0)
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#if _INTEGRAL_MAX_BITS >= 8
|
||||
#define _I8_MIN (-127 - 1)
|
||||
#define _I8_MAX 127i8
|
||||
#define _UI8_MAX 0xffu
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for ints.
|
||||
*/
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-INT_MAX-1)
|
||||
#if _INTEGRAL_MAX_BITS >= 16
|
||||
#define _I16_MIN (-32767 - 1)
|
||||
#define _I16_MAX 32767i16
|
||||
#define _UI16_MAX 0xffffu
|
||||
#endif
|
||||
|
||||
#define UINT_MAX 0xffffffff
|
||||
#if _INTEGRAL_MAX_BITS >= 32
|
||||
#define _I32_MIN (-2147483647 - 1)
|
||||
#define _I32_MAX 2147483647
|
||||
#define _UI32_MAX 0xffffffffu
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for shorts.
|
||||
*/
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-SHRT_MAX-1)
|
||||
#if defined(__GNUC__)
|
||||
#undef LONG_LONG_MAX
|
||||
#define LONG_LONG_MAX 9223372036854775807ll
|
||||
#undef LONG_LONG_MIN
|
||||
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
|
||||
#undef ULONG_LONG_MAX
|
||||
#define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull)
|
||||
#endif
|
||||
|
||||
#define USHRT_MAX 0xffff
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
#define _I64_MIN (-9223372036854775807ll - 1)
|
||||
#define _I64_MAX 9223372036854775807ll
|
||||
#define _UI64_MAX 0xffffffffffffffffull
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for longs and unsigned longs.
|
||||
*
|
||||
* TODO: This is not correct for Alphas, which have 64 bit longs.
|
||||
*/
|
||||
#define LONG_MAX 2147483647L
|
||||
#ifndef SIZE_MAX
|
||||
#ifdef _WIN64
|
||||
#define SIZE_MAX _UI64_MAX
|
||||
#else
|
||||
#define SIZE_MAX UINT_MAX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LONG_MIN (-LONG_MAX-1)
|
||||
|
||||
#define ULONG_MAX 0xffffffffUL
|
||||
|
||||
|
||||
/*
|
||||
* The GNU C compiler also allows 'long long int'
|
||||
*/
|
||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
|
||||
|
||||
#define LONG_LONG_MAX 9223372036854775807LL
|
||||
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
|
||||
|
||||
#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
|
||||
|
||||
/* ISO C9x macro names */
|
||||
#define LLONG_MAX LONG_LONG_MAX
|
||||
#define LLONG_MIN LONG_LONG_MIN
|
||||
#define ULLONG_MAX ULONG_LONG_MAX
|
||||
|
||||
#endif /* Not Strict ANSI and GNU C compiler */
|
||||
|
||||
|
||||
#endif /* not _LIMITS_H_ */
|
||||
#ifdef _POSIX_
|
||||
#define _POSIX_ARG_MAX 4096
|
||||
#define _POSIX_CHILD_MAX 6
|
||||
#define _POSIX_LINK_MAX 8
|
||||
#define _POSIX_MAX_CANON 255
|
||||
#define _POSIX_MAX_INPUT 255
|
||||
#define _POSIX_NAME_MAX 14
|
||||
#define _POSIX_NGROUPS_MAX 0
|
||||
#define _POSIX_OPEN_MAX 16
|
||||
#define _POSIX_PATH_MAX 255
|
||||
#define _POSIX_PIPE_BUF 512
|
||||
#define _POSIX_SSIZE_MAX 32767
|
||||
#define _POSIX_STREAM_MAX 8
|
||||
#define _POSIX_TZNAME_MAX 3
|
||||
#define ARG_MAX 14500
|
||||
#define LINK_MAX 1024
|
||||
#define MAX_CANON _POSIX_MAX_CANON
|
||||
#define MAX_INPUT _POSIX_MAX_INPUT
|
||||
#define NAME_MAX 255
|
||||
#define NGROUPS_MAX 16
|
||||
#define OPEN_MAX 32
|
||||
#define PATH_MAX 512
|
||||
#define PIPE_BUF _POSIX_PIPE_BUF
|
||||
#define SSIZE_MAX _POSIX_SSIZE_MAX
|
||||
#define STREAM_MAX 20
|
||||
#define TZNAME_MAX 10
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,100 +1,91 @@
|
|||
/*
|
||||
* locale.h
|
||||
*
|
||||
* Functions and types for localization (ie. changing the appearance of
|
||||
* output based on the standards of a certain country).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_LOCALE
|
||||
#define _INC_LOCALE
|
||||
|
||||
#ifndef _LOCALE_H_
|
||||
#define _LOCALE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* NOTE: I have tried to test this, but I am limited by my knowledge of
|
||||
* locale issues. The structure does not bomb if you look at the
|
||||
* values, and 'decimal_point' even seems to be correct. But the
|
||||
* rest of the values are, by default, not particularly useful
|
||||
* (read meaningless and not related to the international settings
|
||||
* of the system).
|
||||
*/
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
#define LC_MIN LC_ALL
|
||||
#define LC_MAX LC_TIME
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* The structure returned by 'localeconv'.
|
||||
*/
|
||||
struct lconv
|
||||
{
|
||||
char* decimal_point;
|
||||
char* thousands_sep;
|
||||
char* grouping;
|
||||
char* int_curr_symbol;
|
||||
char* currency_symbol;
|
||||
char* mon_decimal_point;
|
||||
char* mon_thousands_sep;
|
||||
char* mon_grouping;
|
||||
char* positive_sign;
|
||||
char* negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
char* setlocale (int, const char*);
|
||||
struct lconv* localeconv (void);
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
|
||||
# define __need_wchar_t
|
||||
# include <stddef.h>
|
||||
wchar_t* _wsetlocale(int, const wchar_t*);
|
||||
# define _WLOCALE_DEFINED
|
||||
#endif /* ndef _WLOCALE_DEFINED */
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define LC_MIN LC_ALL
|
||||
#define LC_MAX LC_TIME
|
||||
|
||||
#ifndef _LCONV_DEFINED
|
||||
#define _LCONV_DEFINED
|
||||
struct lconv {
|
||||
char *decimal_point;
|
||||
char *thousands_sep;
|
||||
char *grouping;
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol;
|
||||
char *mon_decimal_point;
|
||||
char *mon_thousands_sep;
|
||||
char *mon_grouping;
|
||||
char *positive_sign;
|
||||
char *negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef _CONFIG_LOCALE_SWT
|
||||
#define _CONFIG_LOCALE_SWT
|
||||
|
||||
#define _ENABLE_PER_THREAD_LOCALE 0x1
|
||||
#define _DISABLE_PER_THREAD_LOCALE 0x2
|
||||
#define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
|
||||
#define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
|
||||
#define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
|
||||
#define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
|
||||
|
||||
#endif
|
||||
|
||||
int __cdecl _configthreadlocale(int _Flag);
|
||||
char *__cdecl setlocale(int _Category,const char *_Locale);
|
||||
_CRTIMP struct lconv *__cdecl localeconv(void);
|
||||
_locale_t __cdecl _get_current_locale(void);
|
||||
_locale_t __cdecl _create_locale(int _Category,const char *_Locale);
|
||||
void __cdecl _free_locale(_locale_t _Locale);
|
||||
_locale_t __cdecl __get_current_locale(void);
|
||||
_locale_t __cdecl __create_locale(int _Category,const char *_Locale);
|
||||
void __cdecl __free_locale(_locale_t _Locale);
|
||||
|
||||
#ifndef _WLOCALE_DEFINED
|
||||
#define _WLOCALE_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _LOCALE_H_ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,87 +1,177 @@
|
|||
/*
|
||||
* malloc.h
|
||||
*
|
||||
* Support for programs which want to use malloc.h to get memory management
|
||||
* functions. Unless you absolutely need some of these functions and they are
|
||||
* not in the ANSI headers you should use the ANSI standard header files
|
||||
* instead.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _MALLOC_H_
|
||||
#define _MALLOC_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifndef _MM_MALLOC_H_INCLUDED
|
||||
#define _MM_MALLOC_H_INCLUDED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The structure used to walk through the heap with _heapwalk.
|
||||
*/
|
||||
typedef struct _heapinfo
|
||||
{
|
||||
int* _pentry;
|
||||
size_t _size;
|
||||
int _useflag;
|
||||
} _HEAPINFO;
|
||||
|
||||
/* Values for _heapinfo.useflag */
|
||||
#define _USEDENTRY 0
|
||||
#define _FREEENTRY 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
The _heap* memory allocation functions are supported on NT
|
||||
but not W9x. On latter, they always set errno to ENOSYS.
|
||||
*/
|
||||
int _heapwalk (_HEAPINFO*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int heapwalk (_HEAPINFO*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#ifdef _WIN64
|
||||
#define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0
|
||||
#else
|
||||
#define _HEAP_MAXREQ 0xFFFFFFE0
|
||||
#endif
|
||||
|
||||
int _heapchk (void); /* Verify heap integrety. */
|
||||
int _heapmin (void); /* Return unused heap to the OS. */
|
||||
int _heapset (unsigned int);
|
||||
#ifndef _STATIC_ASSERT
|
||||
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)]
|
||||
#endif
|
||||
|
||||
size_t _msize (void*);
|
||||
size_t _get_sbh_threshold (void);
|
||||
int _set_sbh_threshold (size_t);
|
||||
void * _expand (void*, size_t);
|
||||
/* Return codes for _heapwalk() */
|
||||
#define _HEAPEMPTY (-1)
|
||||
#define _HEAPOK (-2)
|
||||
#define _HEAPBADBEGIN (-3)
|
||||
#define _HEAPBADNODE (-4)
|
||||
#define _HEAPEND (-5)
|
||||
#define _HEAPBADPTR (-6)
|
||||
|
||||
/* Values for _heapinfo.useflag */
|
||||
#define _FREEENTRY 0
|
||||
#define _USEDENTRY 1
|
||||
|
||||
#ifndef _HEAPINFO_DEFINED
|
||||
#define _HEAPINFO_DEFINED
|
||||
/* The structure used to walk through the heap with _heapwalk. */
|
||||
typedef struct _heapinfo {
|
||||
int *_pentry;
|
||||
size_t _size;
|
||||
int _useflag;
|
||||
} _HEAPINFO;
|
||||
#endif
|
||||
|
||||
extern unsigned int _amblksiz;
|
||||
|
||||
#define _mm_free(a) _aligned_free(a)
|
||||
#define _mm_malloc(a,b) _aligned_malloc(a,b)
|
||||
|
||||
#ifndef _CRT_ALLOCATION_DEFINED
|
||||
#define _CRT_ALLOCATION_DEFINED
|
||||
void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
|
||||
void __cdecl free(void *_Memory);
|
||||
void *__cdecl malloc(size_t _Size);
|
||||
void *__cdecl realloc(void *_Memory,size_t _NewSize);
|
||||
_CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
|
||||
/* _CRTIMP void __cdecl _aligned_free(void *_Memory);
|
||||
_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); */
|
||||
_CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
_CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
|
||||
_CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
|
||||
_CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
_CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
#endif
|
||||
|
||||
#define _MAX_WAIT_MALLOC_CRT 60000
|
||||
|
||||
_CRTIMP int __cdecl _resetstkoflw (void);
|
||||
_CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue);
|
||||
|
||||
_CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize);
|
||||
_CRTIMP size_t __cdecl _msize(void *_Memory);
|
||||
#ifdef __GNUC__
|
||||
#undef _alloca
|
||||
#define _alloca(x) __builtin_alloca((x))
|
||||
#else
|
||||
void *__cdecl _alloca(size_t _Size);
|
||||
#endif
|
||||
_CRTIMP size_t __cdecl _get_sbh_threshold(void);
|
||||
_CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);
|
||||
_CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value);
|
||||
_CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value);
|
||||
_CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size);
|
||||
_CRTIMP int __cdecl _heapchk(void);
|
||||
_CRTIMP int __cdecl _heapmin(void);
|
||||
_CRTIMP int __cdecl _heapset(unsigned int _Fill);
|
||||
_CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo);
|
||||
_CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit);
|
||||
_CRTIMP intptr_t __cdecl _get_heap_handle(void);
|
||||
|
||||
#define _ALLOCA_S_THRESHOLD 1024
|
||||
#define _ALLOCA_S_STACK_MARKER 0xCCCC
|
||||
#define _ALLOCA_S_HEAP_MARKER 0xDDDD
|
||||
|
||||
#if(defined(_X86_) && !defined(__x86_64))
|
||||
#define _ALLOCA_S_MARKER_SIZE 8
|
||||
#elif defined(__ia64__) || defined(__x86_64)
|
||||
#define _ALLOCA_S_MARKER_SIZE 16
|
||||
#endif
|
||||
|
||||
#if !defined(RC_INVOKED)
|
||||
static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) {
|
||||
if(_Ptr) {
|
||||
*((unsigned int*)_Ptr) = _Marker;
|
||||
_Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE;
|
||||
}
|
||||
return _Ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef _malloca
|
||||
#define _malloca(size) \
|
||||
((((size) + _ALLOCA_S_MARKER_SIZE) <= _ALLOCA_S_THRESHOLD) ? \
|
||||
_MarkAllocaS(_alloca((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_STACK_MARKER) : \
|
||||
_MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_HEAP_MARKER))
|
||||
#undef _FREEA_INLINE
|
||||
#define _FREEA_INLINE
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#undef _freea
|
||||
static __inline void __cdecl _freea(void *_Memory) {
|
||||
unsigned int _Marker;
|
||||
if(_Memory) {
|
||||
_Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE;
|
||||
_Marker = *(unsigned int *)_Memory;
|
||||
if(_Marker==_ALLOCA_S_HEAP_MARKER) {
|
||||
free(_Memory);
|
||||
}
|
||||
#ifdef _ASSERTE
|
||||
else if(_Marker!=_ALLOCA_S_STACK_MARKER) {
|
||||
_ASSERTE(("Corrupted pointer passed to _freea",0));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#undef alloca
|
||||
#ifdef __GNUC__
|
||||
#define alloca(x) __builtin_alloca((x))
|
||||
#else
|
||||
#define alloca _alloca
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HEAPHOOK
|
||||
#ifndef _HEAPHOOK_DEFINED
|
||||
#define _HEAPHOOK_DEFINED
|
||||
typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **);
|
||||
#endif
|
||||
|
||||
_CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook);
|
||||
|
||||
#define _HEAP_MALLOC 1
|
||||
#define _HEAP_CALLOC 2
|
||||
#define _HEAP_FREE 3
|
||||
#define _HEAP_REALLOC 4
|
||||
#define _HEAP_MSIZE 5
|
||||
#define _HEAP_EXPAND 6
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#endif /* Not _MALLOC_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* _MALLOC_H_ */
|
||||
|
|
1007
win32/include/math.h
1007
win32/include/math.h
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
|
|
|
@ -1,9 +1,40 @@
|
|||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* memory.h maps to the standard string.h header.
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <string.h>
|
||||
#ifndef _INC_MEMORY
|
||||
#define _INC_MEMORY
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CONST_RETURN
|
||||
#define _CONST_RETURN
|
||||
#endif
|
||||
|
||||
#define _WConst_return _CONST_RETURN
|
||||
|
||||
#ifndef _CRT_MEMORY_DEFINED
|
||||
#define _CRT_MEMORY_DEFINED
|
||||
_CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
|
||||
_CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
_CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
|
||||
int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
|
||||
void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
|
||||
int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,158 +1,176 @@
|
|||
/*
|
||||
* process.h
|
||||
*
|
||||
* Function calls for spawning child processes.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_PROCESS
|
||||
#define _INC_PROCESS
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _PROCESS_H_
|
||||
#define _PROCESS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/* Includes a definition of _pid_t and pid_t */
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for cwait actions.
|
||||
* Obsolete for Win32.
|
||||
*/
|
||||
#define _WAIT_CHILD 0
|
||||
#define _WAIT_GRANDCHILD 1
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define WAIT_CHILD _WAIT_CHILD
|
||||
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
/*
|
||||
* Mode constants for spawn functions.
|
||||
*/
|
||||
#define _P_WAIT 0
|
||||
#define _P_NOWAIT 1
|
||||
#define _P_OVERLAY 2
|
||||
#define _OLD_P_OVERLAY _P_OVERLAY
|
||||
#define _P_NOWAITO 3
|
||||
#define _P_DETACH 4
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define P_WAIT _P_WAIT
|
||||
#define P_NOWAIT _P_NOWAIT
|
||||
#define P_OVERLAY _P_OVERLAY
|
||||
#define OLD_P_OVERLAY _OLD_P_OVERLAY
|
||||
#define P_NOWAITO _P_NOWAITO
|
||||
#define P_DETACH _P_DETACH
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef _POSIX_
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void _cexit(void);
|
||||
void _c_exit(void);
|
||||
#define _P_WAIT 0
|
||||
#define _P_NOWAIT 1
|
||||
#define _OLD_P_OVERLAY 2
|
||||
#define _P_NOWAITO 3
|
||||
#define _P_DETACH 4
|
||||
#define _P_OVERLAY 2
|
||||
|
||||
int _cwait (int*, _pid_t, int);
|
||||
#define _WAIT_CHILD 0
|
||||
#define _WAIT_GRANDCHILD 1
|
||||
|
||||
_pid_t _getpid(void);
|
||||
_CRTIMP uintptr_t __cdecl _beginthread(void (__cdecl *_StartAddress) (void *),unsigned _StackSize,void *_ArgList);
|
||||
_CRTIMP void __cdecl _endthread(void);
|
||||
_CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned _StackSize,unsigned (__stdcall *_StartAddress) (void *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr);
|
||||
_CRTIMP void __cdecl _endthreadex(unsigned _Retval);
|
||||
|
||||
int _execl (const char*, const char*, ...);
|
||||
int _execle (const char*, const char*, ...);
|
||||
int _execlp (const char*, const char*, ...);
|
||||
int _execlpe (const char*, const char*, ...);
|
||||
int _execv (const char*, char* const*);
|
||||
int _execve (const char*, char* const*, char* const*);
|
||||
int _execvp (const char*, char* const*);
|
||||
int _execvpe (const char*, char* const*, char* const*);
|
||||
#ifndef _CRT_TERMINATE_DEFINED
|
||||
#define _CRT_TERMINATE_DEFINED
|
||||
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
|
||||
int _spawnl (int, const char*, const char*, ...);
|
||||
int _spawnle (int, const char*, const char*, ...);
|
||||
int _spawnlp (int, const char*, const char*, ...);
|
||||
int _spawnlpe (int, const char*, const char*, ...);
|
||||
int _spawnv (int, const char*, char* const*);
|
||||
int _spawnve (int, const char*, char* const*, char* const*);
|
||||
int _spawnvp (int, const char*, char* const*);
|
||||
int _spawnvpe (int, const char*, char* const*, char* const*);
|
||||
#pragma push_macro("abort")
|
||||
#undef abort
|
||||
void __cdecl __declspec(noreturn) abort(void);
|
||||
#pragma pop_macro("abort")
|
||||
|
||||
/*
|
||||
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
|
||||
* They are provided by MSVCRT.
|
||||
*
|
||||
* NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
|
||||
* making for race conditions if you are not careful. Basically you have to
|
||||
* make sure that no-one is going to do *anything* with the thread handle
|
||||
* after the thread calls _endthread or returns from the thread function.
|
||||
*
|
||||
* NOTE: No old names for these functions. Use the underscore.
|
||||
*/
|
||||
unsigned long
|
||||
_beginthread (void (*)(void *), unsigned, void*);
|
||||
void _endthread (void);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
unsigned long
|
||||
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
|
||||
void*, unsigned, unsigned*);
|
||||
void _endthreadex (unsigned);
|
||||
#endif
|
||||
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
|
||||
_CRTIMP int __cdecl _getpid(void);
|
||||
_CRTIMP intptr_t __cdecl _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
|
||||
_CRTIMP intptr_t __cdecl _execl(const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _execle(const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _execlp(const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _execlpe(const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _execv(const char *_Filename,const char *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _execvp(const char *_Filename,const char *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Functions without the leading underscore, for portability. These functions
|
||||
* live in liboldnames.a.
|
||||
*/
|
||||
int cwait (int*, pid_t, int);
|
||||
pid_t getpid (void);
|
||||
int execl (const char*, const char*, ...);
|
||||
int execle (const char*, const char*, ...);
|
||||
int execlp (const char*, const char*, ...);
|
||||
int execlpe (const char*, const char*, ...);
|
||||
int execv (const char*, char* const*);
|
||||
int execve (const char*, char* const*, char* const*);
|
||||
int execvp (const char*, char* const*);
|
||||
int execvpe (const char*, char* const*, char* const*);
|
||||
int spawnl (int, const char*, const char*, ...);
|
||||
int spawnle (int, const char*, const char*, ...);
|
||||
int spawnlp (int, const char*, const char*, ...);
|
||||
int spawnlpe (int, const char*, const char*, ...);
|
||||
int spawnv (int, const char*, char* const*);
|
||||
int spawnve (int, const char*, char* const*, char* const*);
|
||||
int spawnvp (int, const char*, char* const*);
|
||||
int spawnvpe (int, const char*, char* const*, char* const*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#ifndef _CRT_SYSTEM_DEFINED
|
||||
#define _CRT_SYSTEM_DEFINED
|
||||
int __cdecl system(const char *_Command);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef _WPROCESS_DEFINED
|
||||
#define _WPROCESS_DEFINED
|
||||
_CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
|
||||
_CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
|
||||
_CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
|
||||
_CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
|
||||
#ifndef _CRT_WSYSTEM_DEFINED
|
||||
#define _CRT_WSYSTEM_DEFINED
|
||||
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void __cdecl __security_init_cookie(void);
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
void __fastcall __security_check_cookie(uintptr_t _StackCookie);
|
||||
__declspec(noreturn) void __cdecl __report_gsfailure(void);
|
||||
#else
|
||||
void __cdecl __security_check_cookie(uintptr_t _StackCookie);
|
||||
__declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie);
|
||||
#endif
|
||||
extern uintptr_t __security_cookie;
|
||||
|
||||
intptr_t __cdecl _loaddll(char *_Filename);
|
||||
int __cdecl _unloaddll(intptr_t _Handle);
|
||||
int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void);
|
||||
|
||||
#ifdef _DECL_DLLMAIN
|
||||
#ifdef _WINDOWS_
|
||||
WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
|
||||
WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
|
||||
WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
|
||||
extern WINBOOL (WINAPI *const _pRawDllMain)(HANDLE,DWORD,LPVOID);
|
||||
#else
|
||||
int __stdcall DllMain(void *_HDllHandle,unsigned _Reason,void *_Reserved);
|
||||
int __stdcall _CRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
|
||||
int __stdcall _wCRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
|
||||
extern int (__stdcall *const _pRawDllMain)(void *,unsigned,void *);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define P_WAIT _P_WAIT
|
||||
#define P_NOWAIT _P_NOWAIT
|
||||
#define P_OVERLAY _P_OVERLAY
|
||||
#define OLD_P_OVERLAY _OLD_P_OVERLAY
|
||||
#define P_NOWAITO _P_NOWAITO
|
||||
#define P_DETACH _P_DETACH
|
||||
#define WAIT_CHILD _WAIT_CHILD
|
||||
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
||||
|
||||
intptr_t __cdecl cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
|
||||
#ifdef __GNUC__
|
||||
int __cdecl execl(const char *_Filename,const char *_ArgList,...);
|
||||
int __cdecl execle(const char *_Filename,const char *_ArgList,...);
|
||||
int __cdecl execlp(const char *_Filename,const char *_ArgList,...);
|
||||
int __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
|
||||
#else
|
||||
intptr_t __cdecl execl(const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl execle(const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl execlp(const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
|
||||
#endif
|
||||
intptr_t __cdecl spawnl(int,const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl spawnle(int,const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl spawnlp(int,const char *_Filename,const char *_ArgList,...);
|
||||
intptr_t __cdecl spawnlpe(int,const char *_Filename,const char *_ArgList,...);
|
||||
int __cdecl getpid(void);
|
||||
#ifdef __GNUC__
|
||||
/* Those methods are predefined by gcc builtins to return int. So to prevent
|
||||
stupid warnings, define them in POSIX way. This is save, because those
|
||||
methods do not return in success case, so that the return value is not
|
||||
really dependent to its scalar width. */
|
||||
int __cdecl execv(const char *_Filename,char *const _ArgList[]);
|
||||
int __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
int __cdecl execvp(const char *_Filename,char *const _ArgList[]);
|
||||
int __cdecl execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
#else
|
||||
intptr_t __cdecl execv(const char *_Filename,char *const _ArgList[]);
|
||||
intptr_t __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
intptr_t __cdecl execvp(const char *_Filename,char *const _ArgList[]);
|
||||
intptr_t __cdecl execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
#endif
|
||||
intptr_t __cdecl spawnv(int,const char *_Filename,char *const _ArgList[]);
|
||||
intptr_t __cdecl spawnve(int,const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
intptr_t __cdecl spawnvp(int,const char *_Filename,char *const _ArgList[]);
|
||||
intptr_t __cdecl spawnvpe(int,const char *_Filename,char *const _ArgList[],char *const _Env[]);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _PROCESS_H_ not defined */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
42
win32/include/sec_api/conio_s.h
Normal file
42
win32/include/sec_api/conio_s.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _INC_CONIO_S
|
||||
#define _INC_CONIO_S
|
||||
|
||||
#include <conio.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _cgets_s(char *_Buffer,size_t _Size,size_t *_SizeRead);
|
||||
_CRTIMP int __cdecl _cprintf_s(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _cscanf_s(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _cscanf_s_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcprintf_s(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cprintf_s_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
|
||||
#ifndef _WCONIO_DEFINED_S
|
||||
#define _WCONIO_DEFINED_S
|
||||
_CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
|
||||
_CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
19
win32/include/sec_api/crtdbg_s.h
Normal file
19
win32/include/sec_api/crtdbg_s.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _INC_CRTDBG_S
|
||||
#define _INC_CRTDBG_S
|
||||
|
||||
#include <crtdbg.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#define _dupenv_s_dbg(ps1,size,s2,t,f,l) _dupenv_s(ps1,size,s2)
|
||||
#define _wdupenv_s_dbg(ps1,size,s2,t,f,l) _wdupenv_s(ps1,size,s2)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
33
win32/include/sec_api/io_s.h
Normal file
33
win32/include/sec_api/io_s.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_IO_S
|
||||
#define _INC_IO_S
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode);
|
||||
_CRTIMP errno_t __cdecl _chsize_s(int _FileHandle,__int64 _Size);
|
||||
_CRTIMP errno_t __cdecl _mktemp_s(char *_TemplateName,size_t _Size);
|
||||
_CRTIMP errno_t __cdecl _umask_s(int _NewMode,int *_OldMode);
|
||||
|
||||
#ifndef _WIO_S_DEFINED
|
||||
#define _WIO_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
|
||||
_CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
52
win32/include/sec_api/mbstring_s.h
Normal file
52
win32/include/sec_api/mbstring_s.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_MBSTRING_S
|
||||
#define _INC_MBSTRING_S
|
||||
|
||||
#include <mbstring.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _MBSTRING_S_DEFINED
|
||||
#define _MBSTRING_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _mbscat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
|
||||
_CRTIMP errno_t __cdecl _mbscat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbscpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
|
||||
_CRTIMP errno_t __cdecl _mbscpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbslwr_s(unsigned char *_Str,size_t _SizeInBytes);
|
||||
_CRTIMP errno_t __cdecl _mbslwr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsnbcat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsnbcat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsnbcpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsnbcpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsnbset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsnbset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsncat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsncat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsncpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsncpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsnset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _mbsnset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val);
|
||||
_CRTIMP errno_t __cdecl _mbsset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,_locale_t _Locale);
|
||||
_CRTIMP unsigned char *__cdecl _mbstok_s(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context);
|
||||
_CRTIMP unsigned char *__cdecl _mbstok_s_l(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbsupr_s(unsigned char *_Str,size_t _SizeInBytes);
|
||||
_CRTIMP errno_t __cdecl _mbsupr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _mbccpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src);
|
||||
_CRTIMP errno_t __cdecl _mbccpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src,_locale_t _Locale);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
25
win32/include/sec_api/search_s.h
Normal file
25
win32/include/sec_api/search_s.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_SEARCH_S
|
||||
#define _INC_SEARCH_S
|
||||
|
||||
#include <search.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_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);
|
||||
_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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
145
win32/include/sec_api/stdio_s.h
Normal file
145
win32/include/sec_api/stdio_s.h
Normal file
|
@ -0,0 +1,145 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STDIO_S
|
||||
#define _INC_STDIO_S
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _STDIO_S_DEFINED
|
||||
#define _STDIO_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl clearerr_s(FILE *_File);
|
||||
int __cdecl fprintf_s(FILE *_File,const char *_Format,...);
|
||||
size_t __cdecl fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
|
||||
_CRTIMP int __cdecl _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
|
||||
int __cdecl printf_s(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _scanf_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _scanf_s_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
int __cdecl vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList);
|
||||
int __cdecl vprintf_s(const char *_Format,va_list _ArgList);
|
||||
int __cdecl vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fprintf_p(FILE *_File,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _printf_p(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vprintf_p(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _scprintf_p(const char *_Format,...);
|
||||
_CRTIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _printf_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _printf_p_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _scprintf_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _scprintf_p_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _printf_s_l(const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList);
|
||||
|
||||
#ifndef _WSTDIO_S_DEFINED
|
||||
#define _WSTDIO_S_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
|
||||
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
|
||||
int __cdecl wprintf_s(const wchar_t *_Format,...);
|
||||
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
||||
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
|
||||
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_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);
|
||||
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
|
||||
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
|
||||
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
|
||||
_CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
|
||||
_CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
|
||||
_CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP size_t __cdecl _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
67
win32/include/sec_api/stdlib_s.h
Normal file
67
win32/include/sec_api/stdlib_s.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STDLIB_S
|
||||
#define _INC_STDLIB_S
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName);
|
||||
_CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
|
||||
#endif
|
||||
_CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix);
|
||||
_CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount);
|
||||
_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);
|
||||
_CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes);
|
||||
_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);
|
||||
|
||||
#ifndef _WSTDLIB_S_DEFINED
|
||||
#define _WSTDLIB_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
|
||||
_CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_
|
||||
_CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign);
|
||||
_CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
|
||||
_CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits);
|
||||
_CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
|
||||
_CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value);
|
||||
_CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes);
|
||||
_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);
|
||||
|
||||
#ifndef _WSTDLIBP_S_DEFINED
|
||||
#define _WSTDLIBP_S_DEFINED
|
||||
_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);
|
||||
_CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
|
||||
_CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
|
||||
_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);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
30
win32/include/sec_api/stralign_s.h
Normal file
30
win32/include/sec_api/stralign_s.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __STRALIGN_H_S_
|
||||
#define __STRALIGN_H_S_
|
||||
|
||||
#include <stralign.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED)
|
||||
#if defined(__cplusplus) && defined(_WConst_Return)
|
||||
static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
|
||||
if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
|
||||
return uaw_wcscpy((PCUWSTR)String,Character);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
41
win32/include/sec_api/string_s.h
Normal file
41
win32/include/sec_api/string_s.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STRING_S
|
||||
#define _INC_STRING_S
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _strset_s(char *_Dst,size_t _DstSize,int _Value);
|
||||
_CRTIMP errno_t __cdecl _strerror_s(char *_Buf,size_t _SizeInBytes,const char *_ErrMsg);
|
||||
_CRTIMP errno_t __cdecl _strlwr_s(char *_Str,size_t _Size);
|
||||
_CRTIMP errno_t __cdecl _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _strupr_s(char *_Str,size_t _Size);
|
||||
_CRTIMP errno_t __cdecl _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
|
||||
#ifndef _WSTRING_S_DEFINED
|
||||
#define _WSTRING_S_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
|
||||
_CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
|
||||
_CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
|
||||
_CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
|
||||
_CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
|
||||
_CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
|
||||
_CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
34
win32/include/sec_api/sys/timeb_s.h
Normal file
34
win32/include/sec_api/sys/timeb_s.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _TIMEB_H_S
|
||||
#define _TIMEB_H_S
|
||||
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _ftime_s _ftime32_s
|
||||
#else
|
||||
#define _ftime_s _ftime64_s
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
266
win32/include/sec_api/tchar_s.h
Normal file
266
win32/include/sec_api/tchar_s.h
Normal file
|
@ -0,0 +1,266 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_TCHAR_S
|
||||
#define _INC_TCHAR_S
|
||||
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _UNICODE
|
||||
|
||||
#define _tprintf_s wprintf_s
|
||||
#define _tprintf_s_l _wprintf_s_l
|
||||
#define _tcprintf_s _cwprintf_s
|
||||
#define _tcprintf_s_l _cwprintf_s_l
|
||||
#define _vtcprintf_s _vcwprintf_s
|
||||
#define _vtcprintf_s_l _vcwprintf_s_l
|
||||
#define _ftprintf_s fwprintf_s
|
||||
#define _ftprintf_s_l _fwprintf_s_l
|
||||
#define _stprintf_s swprintf_s
|
||||
#define _stprintf_s_l _swprintf_s_l
|
||||
#define _sntprintf_s _snwprintf_s
|
||||
#define _sntprintf_s_l _snwprintf_s_l
|
||||
#define _vtprintf_s vwprintf_s
|
||||
#define _vtprintf_s_l _vwprintf_s_l
|
||||
#define _vftprintf_s vfwprintf_s
|
||||
#define _vftprintf_s_l _vfwprintf_s_l
|
||||
#define _vstprintf_s vswprintf_s
|
||||
#define _vstprintf_s_l _vswprintf_s_l
|
||||
#define _vsntprintf_s _vsnwprintf_s
|
||||
#define _vsntprintf_s_l _vsnwprintf_s_l
|
||||
|
||||
#define _tscanf_s wscanf_s
|
||||
#define _tscanf_s_l _wscanf_s_l
|
||||
#define _tcscanf_s _cwscanf_s
|
||||
#define _tcscanf_s_l _cwscanf_s_l
|
||||
#define _ftscanf_s fwscanf_s
|
||||
#define _ftscanf_s_l _fwscanf_s_l
|
||||
#define _stscanf_s swscanf_s
|
||||
#define _stscanf_s_l _swscanf_s_l
|
||||
#define _sntscanf_s _snwscanf_s
|
||||
#define _sntscanf_s_l _snwscanf_s_l
|
||||
|
||||
#define _cgetts_s _cgetws_s
|
||||
#define _getts_s _getws_s
|
||||
|
||||
#define _itot_s _itow_s
|
||||
#define _ltot_s _ltow_s
|
||||
#define _ultot_s _ultow_s
|
||||
#define _i64tot_s _i64tow_s
|
||||
#define _ui64tot_s _ui64tow_s
|
||||
|
||||
#define _tcscat_s wcscat_s
|
||||
#define _tcscpy_s wcscpy_s
|
||||
#define _tcsncat_s wcsncat_s
|
||||
#define _tcsncat_s_l _wcsncat_s_l
|
||||
#define _tcsncpy_s wcsncpy_s
|
||||
#define _tcsncpy_s_l _wcsncpy_s_l
|
||||
#define _tcstok_s wcstok_s
|
||||
#define _tcstok_s_l _wcstok_s_l
|
||||
#define _tcserror_s _wcserror_s
|
||||
#define __tcserror_s __wcserror_s
|
||||
|
||||
#define _tcsnset_s _wcsnset_s
|
||||
#define _tcsnset_s_l _wcsnset_s_l
|
||||
#define _tcsset_s _wcsset_s
|
||||
#define _tcsset_s_l _wcsset_s_l
|
||||
|
||||
#define _tasctime_s _wasctime_s
|
||||
#define _tctime_s _wctime_s
|
||||
#define _tctime32_s _wctime32_s
|
||||
#define _tctime64_s _wctime64_s
|
||||
#define _tstrdate_s _wstrdate_s
|
||||
#define _tstrtime_s _wstrtime_s
|
||||
|
||||
#define _tgetenv_s _wgetenv_s
|
||||
#define _tdupenv_s _wdupenv_s
|
||||
#define _tmakepath_s _wmakepath_s
|
||||
#define _tputenv_s _wputenv_s
|
||||
#define _tsearchenv_s _wsearchenv_s
|
||||
#define _tsplitpath_s _wsplitpath_s
|
||||
|
||||
#define _tfopen_s _wfopen_s
|
||||
#define _tfreopen_s _wfreopen_s
|
||||
#define _ttmpnam_s _wtmpnam_s
|
||||
#define _taccess_s _waccess_s
|
||||
#define _tmktemp_s _wmktemp_s
|
||||
|
||||
#define _tcsnccat_s wcsncat_s
|
||||
#define _tcsnccat_s_l _wcsncat_s_l
|
||||
#define _tcsnccpy_s wcsncpy_s
|
||||
#define _tcsnccpy_s_l _wcsncpy_s_l
|
||||
|
||||
#define _tcslwr_s _wcslwr_s
|
||||
#define _tcslwr_s_l _wcslwr_s_l
|
||||
#define _tcsupr_s _wcsupr_s
|
||||
#define _tcsupr_s_l _wcsupr_s_l
|
||||
|
||||
#define _wcstok_s_l(_String,_Delimiters,_Current_position,_Locale) (wcstok_s(_String,_Delimiters,_Current_position))
|
||||
#define _wcsnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_wcsnset_s(_Destination,_Destination_size_chars,_Value,_Count))
|
||||
#define _wcsset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_wcsset_s(_Destination,_Destination_size_chars,_Value))
|
||||
|
||||
#else
|
||||
|
||||
#define _tprintf_s printf_s
|
||||
#define _tprintf_s_l _printf_s_l
|
||||
#define _tcprintf_s _cprintf_s
|
||||
#define _tcprintf_s_l _cprintf_s_l
|
||||
#define _vtcprintf_s _vcprintf_s
|
||||
#define _vtcprintf_s_l _vcprintf_s_l
|
||||
#define _ftprintf_s fprintf_s
|
||||
#define _ftprintf_s_l _fprintf_s_l
|
||||
#define _stprintf_s sprintf_s
|
||||
#define _stprintf_s_l _sprintf_s_l
|
||||
#define _sntprintf_s _snprintf_s
|
||||
#define _sntprintf_s_l _snprintf_s_l
|
||||
#define _vtprintf_s vprintf_s
|
||||
#define _vtprintf_s_l _vprintf_s_l
|
||||
#define _vftprintf_s vfprintf_s
|
||||
#define _vftprintf_s_l _vfprintf_s_l
|
||||
#define _vstprintf_s vsprintf_s
|
||||
#define _vstprintf_s_l _vsprintf_s_l
|
||||
#define _vsntprintf_s _vsnprintf_s
|
||||
#define _vsntprintf_s_l _vsnprintf_s_l
|
||||
#define _tscanf_s scanf_s
|
||||
#define _tscanf_s_l _scanf_s_l
|
||||
#define _tcscanf_s _cscanf_s
|
||||
#define _tcscanf_s_l _cscanf_s_l
|
||||
#define _ftscanf_s fscanf_s
|
||||
#define _ftscanf_s_l _fscanf_s_l
|
||||
#define _stscanf_s sscanf_s
|
||||
#define _stscanf_s_l _sscanf_s_l
|
||||
#define _sntscanf_s _snscanf_s
|
||||
#define _sntscanf_s_l _snscanf_s_l
|
||||
|
||||
#define _getts_s gets_s
|
||||
#define _cgetts_s _cgets_s
|
||||
#define _itot_s _itoa_s
|
||||
#define _ltot_s _ltoa_s
|
||||
#define _ultot_s _ultoa_s
|
||||
#define _i64tot_s _i64toa_s
|
||||
#define _ui64tot_s _ui64toa_s
|
||||
|
||||
#define _tcscat_s strcat_s
|
||||
#define _tcscpy_s strcpy_s
|
||||
#define _tcserror_s strerror_s
|
||||
#define __tcserror_s _strerror_s
|
||||
|
||||
#define _tasctime_s asctime_s
|
||||
#define _tctime_s ctime_s
|
||||
#define _tctime32_s _ctime32_s
|
||||
#define _tctime64_s _ctime64_s
|
||||
#define _tstrdate_s _strdate_s
|
||||
#define _tstrtime_s _strtime_s
|
||||
|
||||
#define _tgetenv_s getenv_s
|
||||
#define _tdupenv_s _dupenv_s
|
||||
#define _tmakepath_s _makepath_s
|
||||
#define _tputenv_s _putenv_s
|
||||
#define _tsearchenv_s _searchenv_s
|
||||
#define _tsplitpath_s _splitpath_s
|
||||
|
||||
#define _tfopen_s fopen_s
|
||||
#define _tfreopen_s freopen_s
|
||||
#define _ttmpnam_s tmpnam_s
|
||||
#define _tmktemp_s _mktemp_s
|
||||
|
||||
#ifndef _POSIX_
|
||||
#define _taccess_s _access_s
|
||||
#endif
|
||||
|
||||
#define _tsopen_s _sopen_s
|
||||
|
||||
#ifdef _MBCS
|
||||
|
||||
#ifdef _MB_MAP_DIRECT
|
||||
|
||||
#define _tcsncat_s _mbsnbcat_s
|
||||
#define _tcsncat_s_l _mbsnbcat_s_l
|
||||
#define _tcsncpy_s _mbsnbcpy_s
|
||||
#define _tcsncpy_s_l _mbsnbcpy_s_l
|
||||
#define _tcstok_s _mbstok_s
|
||||
#define _tcstok_s_l _mbstok_s_l
|
||||
|
||||
#define _tcsnset_s _mbsnbset_s
|
||||
#define _tcsnset_s_l _mbsnbset_s_l
|
||||
#define _tcsset_s _mbsset_s
|
||||
#define _tcsset_s_l _mbsset_s_l
|
||||
|
||||
#define _tcsnccat_s _mbsncat_s
|
||||
#define _tcsnccat_s_l _mbsncat_s_l
|
||||
#define _tcsnccpy_s _mbsncpy_s
|
||||
#define _tcsnccpy_s_l _mbsncpy_s_l
|
||||
#define _tcsncset_s _mbsnset_s
|
||||
#define _tcsncset_s_l _mbsnset_s_l
|
||||
|
||||
#define _tcslwr_s _mbslwr_s
|
||||
#define _tcslwr_s_l _mbslwr_s_l
|
||||
#define _tcsupr_s _mbsupr_s
|
||||
#define _tcsupr_s_l _mbsupr_s_l
|
||||
|
||||
#define _tccpy_s _mbccpy_s
|
||||
#define _tccpy_s_l _mbccpy_s_l
|
||||
#else
|
||||
|
||||
_CRTIMP char *__cdecl _tcsncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
|
||||
_CRTIMP char *__cdecl _tcsncat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcsncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
|
||||
_CRTIMP char *__cdecl _tcsncpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcstok_s(char *_Str,const char *_Delim,char **_Context);
|
||||
_CRTIMP char *__cdecl _tcstok_s_l(char *_Str,const char *_Delim,char **_Context,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _tcsset_s(char *_Str,size_t _SizeInChars,unsigned int _Val);
|
||||
_CRTIMP errno_t __cdecl _tcsset_s_l(char *_Str,size_t _SizeInChars,unsigned int,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcsnccat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
|
||||
_CRTIMP char *__cdecl _tcsnccat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcsnccpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
|
||||
_CRTIMP char *__cdecl _tcsnccpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcslwr_s(char *_Str,size_t _SizeInChars);
|
||||
_CRTIMP char *__cdecl _tcslwr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _tcsupr_s(char *_Str,size_t _SizeInChars);
|
||||
_CRTIMP char *__cdecl _tcsupr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define _tcsncat_s strncat_s
|
||||
#define _tcsncat_s_l _strncat_s_l
|
||||
#define _tcsncpy_s strncpy_s
|
||||
#define _tcsncpy_s_l _strncpy_s_l
|
||||
#define _tcstok_s strtok_s
|
||||
#define _tcstok_s_l _strtok_s_l
|
||||
|
||||
#define _tcsnset_s _strnset_s
|
||||
#define _tcsnset_s_l _strnset_s_l
|
||||
#define _tcsset_s _strset_s
|
||||
#define _tcsset_s _strset_s
|
||||
#define _tcsset_s_l _strset_s_l
|
||||
|
||||
#define _tcsnccat_s strncat_s
|
||||
#define _tcsnccat_s_l _strncat_s_l
|
||||
#define _tcsnccpy_s strncpy_s
|
||||
#define _tcsnccpy_s_l _strncpy_s_l
|
||||
|
||||
#define _tcslwr_s _strlwr_s
|
||||
#define _tcslwr_s_l _strlwr_s_l
|
||||
#define _tcsupr_s _strupr_s
|
||||
#define _tcsupr_s_l _strupr_s_l
|
||||
|
||||
#define _strnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_strnset_s(_Destination,_Destination_size_chars,_Value,_Count))
|
||||
#define _strset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_strset_s(_Destination,_Destination_size_chars,_Value))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
61
win32/include/sec_api/time_s.h
Normal file
61
win32/include/sec_api/time_s.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _TIME_H__S
|
||||
#define _TIME_H__S
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes);
|
||||
_CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _ctime64_s(char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _gmtime64_s(struct tm *_Tm,const __time64_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _localtime64_s(struct tm *_Tm,const __time64_t *_Time);
|
||||
#endif
|
||||
|
||||
#ifndef _WTIME_S_DEFINED
|
||||
#define _WTIME_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
|
||||
_CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
|
||||
_CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
|
||||
#endif
|
||||
|
||||
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
|
||||
#define _INC_WTIME_S_INL
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
|
||||
#else
|
||||
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); }
|
||||
#else
|
||||
__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
128
win32/include/sec_api/wchar_s.h
Normal file
128
win32/include/sec_api/wchar_s.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_WCHAR_S
|
||||
#define _INC_WCHAR_S
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#if defined(MINGW_HAS_SECURE_API)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _WIO_S_DEFINED
|
||||
#define _WIO_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
|
||||
_CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
|
||||
#endif
|
||||
|
||||
#ifndef _WCONIO_S_DEFINED
|
||||
#define _WCONIO_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
|
||||
_CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDIO_S_DEFINED
|
||||
#define _WSTDIO_S_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
|
||||
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
|
||||
int __cdecl wprintf_s(const wchar_t *_Format,...);
|
||||
int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
||||
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
||||
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
|
||||
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_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);
|
||||
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
||||
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
|
||||
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
|
||||
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDLIB_S_DEFINED
|
||||
#define _WSTDLIB_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
|
||||
_CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
_CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_
|
||||
#ifndef _WSTDLIBP_S_DEFINED
|
||||
#define _WSTDLIBP_S_DEFINED
|
||||
_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);
|
||||
_CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
|
||||
_CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
|
||||
_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);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WSTRING_S_DEFINED
|
||||
#define _WSTRING_S_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
|
||||
_CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
|
||||
_CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
|
||||
_CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
|
||||
_CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
|
||||
_CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
|
||||
_CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
|
||||
_CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
|
||||
_CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
|
||||
#endif
|
||||
|
||||
#ifndef _WTIME_S_DEFINED
|
||||
#define _WTIME_S_DEFINED
|
||||
_CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
|
||||
_CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
|
||||
_CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
|
||||
#endif
|
||||
|
||||
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
|
||||
#define _INC_WTIME_S_INL
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
|
||||
#else
|
||||
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP errno_t __cdecl mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State);
|
||||
_CRTIMP errno_t __cdecl wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State);
|
||||
_CRTIMP errno_t __cdecl wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,72 +1,160 @@
|
|||
/*
|
||||
* setjmp.h
|
||||
*
|
||||
* Declarations supporting setjmp and longjump, a method for avoiding
|
||||
* the normal function call return sequence. (Bleah!)
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_SETJMP
|
||||
#define _INC_SETJMP
|
||||
|
||||
#ifndef _SETJMP_H_
|
||||
#define _SETJMP_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The buffer used by setjmp to store the information used by longjmp
|
||||
* to perform it's evil goto-like work. The size of this buffer was
|
||||
* determined through experimentation; it's contents are a mystery.
|
||||
* NOTE: This was determined on an i386 (actually a Pentium). The
|
||||
* contents could be different on an Alpha or something else.
|
||||
*/
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
|
||||
#define _JBLEN 16
|
||||
#define _JBTYPE int
|
||||
typedef _JBTYPE jmp_buf[_JBLEN];
|
||||
|
||||
/*
|
||||
* The function provided by CRTDLL which appears to do the actual work
|
||||
* of setjmp.
|
||||
*/
|
||||
int _setjmp (jmp_buf);
|
||||
typedef struct __JUMP_BUFFER {
|
||||
unsigned long Ebp;
|
||||
unsigned long Ebx;
|
||||
unsigned long Edi;
|
||||
unsigned long Esi;
|
||||
unsigned long Esp;
|
||||
unsigned long Eip;
|
||||
unsigned long Registration;
|
||||
unsigned long TryLevel;
|
||||
unsigned long Cookie;
|
||||
unsigned long UnwindFunc;
|
||||
unsigned long UnwindData[6];
|
||||
} _JUMP_BUFFER;
|
||||
#elif defined(__ia64__)
|
||||
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
|
||||
__int64 LowPart;
|
||||
__int64 HighPart;
|
||||
} SETJMP_FLOAT128;
|
||||
|
||||
#define setjmp(x) _setjmp(x)
|
||||
#define _JBLEN 33
|
||||
typedef SETJMP_FLOAT128 _JBTYPE;
|
||||
|
||||
/*
|
||||
* Return to the last setjmp call and act as if setjmp had returned
|
||||
* nVal (which had better be non-zero!).
|
||||
*/
|
||||
void longjmp (jmp_buf, int);
|
||||
typedef struct __JUMP_BUFFER {
|
||||
|
||||
unsigned long iAReserved[6];
|
||||
|
||||
unsigned long Registration;
|
||||
unsigned long TryLevel;
|
||||
unsigned long Cookie;
|
||||
unsigned long UnwindFunc;
|
||||
|
||||
unsigned long UnwindData[6];
|
||||
|
||||
SETJMP_FLOAT128 FltS0;
|
||||
SETJMP_FLOAT128 FltS1;
|
||||
SETJMP_FLOAT128 FltS2;
|
||||
SETJMP_FLOAT128 FltS3;
|
||||
SETJMP_FLOAT128 FltS4;
|
||||
SETJMP_FLOAT128 FltS5;
|
||||
SETJMP_FLOAT128 FltS6;
|
||||
SETJMP_FLOAT128 FltS7;
|
||||
SETJMP_FLOAT128 FltS8;
|
||||
SETJMP_FLOAT128 FltS9;
|
||||
SETJMP_FLOAT128 FltS10;
|
||||
SETJMP_FLOAT128 FltS11;
|
||||
SETJMP_FLOAT128 FltS12;
|
||||
SETJMP_FLOAT128 FltS13;
|
||||
SETJMP_FLOAT128 FltS14;
|
||||
SETJMP_FLOAT128 FltS15;
|
||||
SETJMP_FLOAT128 FltS16;
|
||||
SETJMP_FLOAT128 FltS17;
|
||||
SETJMP_FLOAT128 FltS18;
|
||||
SETJMP_FLOAT128 FltS19;
|
||||
__int64 FPSR;
|
||||
__int64 StIIP;
|
||||
__int64 BrS0;
|
||||
__int64 BrS1;
|
||||
__int64 BrS2;
|
||||
__int64 BrS3;
|
||||
__int64 BrS4;
|
||||
__int64 IntS0;
|
||||
__int64 IntS1;
|
||||
__int64 IntS2;
|
||||
__int64 IntS3;
|
||||
__int64 RsBSP;
|
||||
__int64 RsPFS;
|
||||
__int64 ApUNAT;
|
||||
__int64 ApLC;
|
||||
__int64 IntSp;
|
||||
__int64 IntNats;
|
||||
__int64 Preds;
|
||||
|
||||
} _JUMP_BUFFER;
|
||||
#elif defined(__x86_64)
|
||||
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
|
||||
unsigned __int64 Part[2];
|
||||
} SETJMP_FLOAT128;
|
||||
|
||||
#define _JBLEN 16
|
||||
typedef SETJMP_FLOAT128 _JBTYPE;
|
||||
|
||||
typedef struct _JUMP_BUFFER {
|
||||
unsigned __int64 Frame;
|
||||
unsigned __int64 Rbx;
|
||||
unsigned __int64 Rsp;
|
||||
unsigned __int64 Rbp;
|
||||
unsigned __int64 Rsi;
|
||||
unsigned __int64 Rdi;
|
||||
unsigned __int64 R12;
|
||||
unsigned __int64 R13;
|
||||
unsigned __int64 R14;
|
||||
unsigned __int64 R15;
|
||||
unsigned __int64 Rip;
|
||||
unsigned __int64 Spare;
|
||||
SETJMP_FLOAT128 Xmm6;
|
||||
SETJMP_FLOAT128 Xmm7;
|
||||
SETJMP_FLOAT128 Xmm8;
|
||||
SETJMP_FLOAT128 Xmm9;
|
||||
SETJMP_FLOAT128 Xmm10;
|
||||
SETJMP_FLOAT128 Xmm11;
|
||||
SETJMP_FLOAT128 Xmm12;
|
||||
SETJMP_FLOAT128 Xmm13;
|
||||
SETJMP_FLOAT128 Xmm14;
|
||||
SETJMP_FLOAT128 Xmm15;
|
||||
} _JUMP_BUFFER;
|
||||
#endif
|
||||
#ifndef _JMP_BUF_DEFINED
|
||||
typedef _JBTYPE jmp_buf[_JBLEN];
|
||||
#define _JMP_BUF_DEFINED
|
||||
#endif
|
||||
|
||||
void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void);
|
||||
|
||||
#ifdef USE_MINGW_SETJMP_TWO_ARGS
|
||||
#ifndef _INC_SETJMPEX
|
||||
#define setjmp(BUF) _setjmp((BUF),mingw_getsp())
|
||||
int __cdecl __attribute__ ((__nothrow__)) _setjmp(jmp_buf _Buf,void *_Ctx);
|
||||
#else
|
||||
#undef setjmp
|
||||
#define setjmp(BUF) _setjmpex((BUF),mingw_getsp())
|
||||
#define setjmpex(BUF) _setjmpex((BUF),mingw_getsp())
|
||||
int __cdecl __attribute__ ((__nothrow__)) _setjmpex(jmp_buf _Buf,void *_Ctx);
|
||||
#endif
|
||||
#else
|
||||
#ifndef _INC_SETJMPEX
|
||||
#define setjmp _setjmp
|
||||
#endif
|
||||
int __cdecl __attribute__ ((__nothrow__)) setjmp(jmp_buf _Buf);
|
||||
#endif
|
||||
|
||||
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/;
|
||||
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl longjmp(jmp_buf _Buf,int _Value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _SETJMP_H_ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,44 +1,28 @@
|
|||
/*
|
||||
* share.h
|
||||
*
|
||||
* Constants for file sharing functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_SHARE
|
||||
#define _INC_SHARE
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#ifndef _SHARE_H_
|
||||
#define _SHARE_H_
|
||||
#define _SH_COMPAT 0x00
|
||||
#define _SH_DENYRW 0x10
|
||||
#define _SH_DENYWR 0x20
|
||||
#define _SH_DENYRD 0x30
|
||||
#define _SH_DENYNO 0x40
|
||||
#define _SH_SECURE 0x80
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define SH_COMPAT 0x00 /* Compatibility */
|
||||
#define SH_DENYRW 0x10 /* Deny read/write */
|
||||
#define SH_DENYWR 0x20 /* Deny write */
|
||||
#define SH_DENYRD 0x30 /* Deny read */
|
||||
#define SH_DENYNO 0x40 /* Deny nothing */
|
||||
|
||||
#endif /* Not _SHARE_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef NO_OLDNAMES
|
||||
#define SH_COMPAT _SH_COMPAT
|
||||
#define SH_DENYRW _SH_DENYRW
|
||||
#define SH_DENYWR _SH_DENYWR
|
||||
#define SH_DENYRD _SH_DENYRD
|
||||
#define SH_DENYNO _SH_DENYNO
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,111 +1,63 @@
|
|||
/*
|
||||
* signal.h
|
||||
*
|
||||
* A way to set handlers for exceptional conditions (also known as signals).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_SIGNAL
|
||||
#define _INC_SIGNAL
|
||||
|
||||
#ifndef _SIGNAL_H_
|
||||
#define _SIGNAL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* The actual signal values. Using other values with signal
|
||||
* produces a SIG_ERR return value.
|
||||
*
|
||||
* NOTE: SIGINT is produced when the user presses Ctrl-C.
|
||||
* SIGILL has not been tested.
|
||||
* SIGFPE doesn't seem to work?
|
||||
* SIGSEGV does not catch writing to a NULL pointer (that shuts down
|
||||
* your app; can you say "segmentation violation core dump"?).
|
||||
* SIGTERM comes from what kind of termination request exactly?
|
||||
* SIGBREAK is indeed produced by pressing Ctrl-Break.
|
||||
* SIGABRT is produced by calling abort.
|
||||
* TODO: The above results may be related to not installing an appropriate
|
||||
* structured exception handling frame. Results may be better if I ever
|
||||
* manage to get the SEH stuff down.
|
||||
*/
|
||||
#define SIGINT 2 /* Interactive attention */
|
||||
#define SIGILL 4 /* Illegal instruction */
|
||||
#define SIGFPE 8 /* Floating point error */
|
||||
#define SIGSEGV 11 /* Segmentation violation */
|
||||
#define SIGTERM 15 /* Termination request */
|
||||
#define SIGBREAK 21 /* Control-break */
|
||||
#define SIGABRT 22 /* Abnormal termination (abort) */
|
||||
|
||||
#define NSIG 23 /* maximum signal number + 1 */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _SIG_ATOMIC_T_DEFINED
|
||||
typedef int sig_atomic_t;
|
||||
#define _SIG_ATOMIC_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The prototypes (below) are the easy part. The hard part is figuring
|
||||
* out what signals are available and what numbers they are assigned
|
||||
* along with appropriate values of SIG_DFL and SIG_IGN.
|
||||
*/
|
||||
|
||||
/*
|
||||
* A pointer to a signal handler function. A signal handler takes a
|
||||
* single int, which is the signal it handles.
|
||||
*/
|
||||
typedef void (*__p_sig_fn_t)(int);
|
||||
|
||||
/*
|
||||
* These are special values of signal handler pointers which are
|
||||
* used to send a signal to the default handler (SIG_DFL), ignore
|
||||
* the signal (SIG_IGN), or indicate an error return (SIG_ERR).
|
||||
*/
|
||||
#define SIG_DFL ((__p_sig_fn_t) 0)
|
||||
#define SIG_IGN ((__p_sig_fn_t) 1)
|
||||
#define SIG_ERR ((__p_sig_fn_t) -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Call signal to set the signal handler for signal sig to the
|
||||
* function pointed to by handler. Returns a pointer to the
|
||||
* previous handler, or SIG_ERR if an error occurs. Initially
|
||||
* unhandled signals defined above will return SIG_DFL.
|
||||
*/
|
||||
__p_sig_fn_t signal(int, __p_sig_fn_t);
|
||||
|
||||
/*
|
||||
* Raise the signal indicated by sig. Returns non-zero on success.
|
||||
*/
|
||||
int raise (int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#ifndef _SIG_ATOMIC_T_DEFINED
|
||||
#define _SIG_ATOMIC_T_DEFINED
|
||||
typedef int sig_atomic_t;
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#define NSIG 23
|
||||
|
||||
#endif /* Not _SIGNAL_H_ */
|
||||
#define SIGHUP 1 /* hangup */
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3 /* quit */
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5 /* trace trap (not reset when caught) */
|
||||
#define SIGIOT 6 /* IOT instruction */
|
||||
#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
|
||||
#define SIGEMT 7 /* EMT instruction */
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
|
||||
#define SIGBUS 10 /* bus error */
|
||||
#define SIGSEGV 11
|
||||
#define SIGSYS 12 /* bad argument to system call */
|
||||
#define SIGPIPE 13 /* write on a pipe with no one to read it */
|
||||
#ifdef __USE_MINGW_ALARM
|
||||
#define SIGALRM 14 /* alarm clock */
|
||||
#endif
|
||||
#define SIGTERM 15
|
||||
#define SIGBREAK 21
|
||||
#define SIGABRT2 22
|
||||
|
||||
#define SIGABRT_COMPAT 6
|
||||
|
||||
typedef void (*__p_sig_fn_t)(int);
|
||||
|
||||
#define SIG_DFL (__p_sig_fn_t)0
|
||||
#define SIG_IGN (__p_sig_fn_t)1
|
||||
#define SIG_GET (__p_sig_fn_t)2
|
||||
#define SIG_SGE (__p_sig_fn_t)3
|
||||
#define SIG_ACK (__p_sig_fn_t)4
|
||||
#define SIG_ERR (__p_sig_fn_t)-1
|
||||
|
||||
extern void **__cdecl __pxcptinfoptrs(void);
|
||||
#define _pxcptinfoptrs (*__pxcptinfoptrs())
|
||||
|
||||
__p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
|
||||
int __cdecl raise(int _SigNum);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef _STDARG_H
|
||||
#define _STDARG_H
|
||||
|
||||
#ifndef _VA_LIST
|
||||
#define _VA_LIST
|
||||
typedef char *va_list;
|
||||
#endif
|
||||
|
||||
/* only correct for i386 */
|
||||
#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
|
||||
#define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
|
||||
#define va_copy(dest, src) (dest) = (src)
|
||||
#define va_end(ap)
|
||||
|
||||
/* fix a buggy dependency on GCC in libio.h */
|
||||
typedef va_list __gnuc_va_list;
|
||||
#define _VA_LIST_DEFINED
|
||||
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
#ifndef _STDBOOL_H
|
||||
#define _STDBOOL_H
|
||||
|
||||
/* ISOC99 boolean */
|
||||
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
#endif /* _STDBOOL_H */
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef _STDDEF_H
|
||||
#define _STDDEF_H
|
||||
|
||||
#define NULL ((void *)0)
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#define offsetof(type, field) ((size_t) &((type *)0)->field)
|
||||
|
||||
/* need to do that because of glibc 2.1 bug (should have a way to test
|
||||
presence of 'long long' without __GNUC__, or TCC should define
|
||||
__GNUC__ ? */
|
||||
#if !defined(__int8_t_defined) && !defined(__dietlibc__)
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int int64_t;
|
||||
#endif
|
||||
|
||||
void *alloca(size_t);
|
||||
|
||||
#endif
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/* ISO C9x 7.18 Integer types <stdint.h>
|
||||
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
|
||||
*
|
||||
|
@ -20,6 +25,12 @@
|
|||
#ifndef _STDINT_H
|
||||
#define _STDINT_H
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wint_t
|
||||
#define __need_wchar_t
|
||||
#include "stddef.h"
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
|
@ -40,9 +51,9 @@ typedef unsigned uint_least32_t;
|
|||
typedef long long int_least64_t;
|
||||
typedef unsigned long long uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types
|
||||
/* 7.18.1.3 Fastest minimum-width integer types
|
||||
* Not actually guaranteed to be fastest for all purposes
|
||||
* Here we use the exact-width types for 8 and 16-bit ints.
|
||||
* Here we use the exact-width types for 8 and 16-bit ints.
|
||||
*/
|
||||
typedef char int_fast8_t;
|
||||
typedef unsigned char uint_fast8_t;
|
||||
|
@ -53,10 +64,6 @@ typedef unsigned int uint_fast32_t;
|
|||
typedef long long int_fast64_t;
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
typedef int intptr_t;
|
||||
typedef unsigned uintptr_t;
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types */
|
||||
typedef long long intmax_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
|
@ -65,7 +72,7 @@ typedef unsigned long long uintmax_t;
|
|||
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
|
||||
|
||||
/* 7.18.2.1 Limits of exact-width integer types */
|
||||
#define INT8_MIN (-128)
|
||||
#define INT8_MIN (-128)
|
||||
#define INT16_MIN (-32768)
|
||||
#define INT32_MIN (-2147483647 - 1)
|
||||
#define INT64_MIN (-9223372036854775807LL - 1)
|
||||
|
@ -113,10 +120,16 @@ typedef unsigned long long uintmax_t;
|
|||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.4 Limits of integer types capable of holding
|
||||
object pointers */
|
||||
object pointers */
|
||||
#ifdef _WIN64
|
||||
#define INTPTR_MIN INT64_MIN
|
||||
#define INTPTR_MAX INT64_MAX
|
||||
#define UINTPTR_MAX UINT64_MAX
|
||||
#else
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#endif
|
||||
|
||||
/* 7.18.2.5 Limits of greatest-width integer types */
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
|
@ -124,25 +137,35 @@ typedef unsigned long long uintmax_t;
|
|||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.3 Limits of other integer types */
|
||||
#ifdef _WIN64
|
||||
#define PTRDIFF_MIN INT64_MIN
|
||||
#define PTRDIFF_MAX INT64_MAX
|
||||
#else
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#endif
|
||||
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#ifdef _WIN64
|
||||
#define SIZE_MAX UINT64_MAX
|
||||
#else
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WCHAR_MIN /* also in wchar.h */
|
||||
#ifndef WCHAR_MIN /* also in wchar.h */
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wint_t is unsigned int in __MINGW32__,
|
||||
* but unsigned short in MS runtime
|
||||
* wint_t is unsigned short for compatibility with MS runtime
|
||||
*/
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX UINT32_MAX
|
||||
#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
|
||||
|
||||
|
@ -168,16 +191,18 @@ typedef unsigned long long uintmax_t;
|
|||
#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
|
||||
#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
|
||||
#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
|
||||
#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val))
|
||||
/* The 'trick' doesn't work in C89 for long long because, without
|
||||
suffix, (val) will be evaluated as int, not intmax_t */
|
||||
#define INT64_C(val) val##LL
|
||||
|
||||
#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
|
||||
#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
|
||||
#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
|
||||
#define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val))
|
||||
#define UINT64_C(val) val##ULL
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants */
|
||||
#define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val))
|
||||
#define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val))
|
||||
#define INTMAX_C(val) val##LL
|
||||
#define UINTMAX_C(val) val##ULL
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
|
||||
|
||||
|
|
|
@ -1,413 +1,429 @@
|
|||
/*
|
||||
* stdio.h
|
||||
*
|
||||
* Definitions of types and prototypes of functions for standard input and
|
||||
* output.
|
||||
*
|
||||
* NOTE: The file manipulation functions provided by Microsoft seem to
|
||||
* work with either slash (/) or backslash (\) as the path separator.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STDIO
|
||||
#define _INC_STDIO
|
||||
|
||||
#ifndef _STDIO_H_
|
||||
#define _STDIO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_NULL
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/* Flags for the iobuf structure */
|
||||
#define _IOREAD 1
|
||||
#define _IOWRT 2
|
||||
#define _IORW 0x0080 /* opened as "r+w" */
|
||||
|
||||
|
||||
/*
|
||||
* The three standard file pointers provided by the run time library.
|
||||
* NOTE: These will go to the bit-bucket silently in GUI applications!
|
||||
*/
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
/* Returned by various functions on end of file condition or error. */
|
||||
#define EOF (-1)
|
||||
|
||||
/*
|
||||
* The maximum length of a file name. You should use GetVolumeInformation
|
||||
* instead of this constant. But hey, this works.
|
||||
*
|
||||
* NOTE: This is used in the structure _finddata_t (see io.h) so changing it
|
||||
* is probably not a good idea.
|
||||
*/
|
||||
#define FILENAME_MAX (260)
|
||||
|
||||
/*
|
||||
* The maximum number of files that may be open at once. I have set this to
|
||||
* a conservative number. The actual value may be higher.
|
||||
*/
|
||||
#define FOPEN_MAX (20)
|
||||
|
||||
/* After creating this many names, tmpnam and tmpfile return NULL */
|
||||
#define TMP_MAX 32767
|
||||
/*
|
||||
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
|
||||
* temp files in the root directory of the current drive
|
||||
* (not in pwd, as suggested by some older MS doc's).
|
||||
* Redefining these macros does not effect the CRT functions.
|
||||
*/
|
||||
#define _P_tmpdir "\\"
|
||||
#define _wP_tmpdir L"\\"
|
||||
|
||||
/*
|
||||
* The maximum size of name (including NUL) that will be put in the user
|
||||
* supplied buffer caName for tmpnam.
|
||||
* Inferred from the size of the static buffer returned by tmpnam
|
||||
* when passed a NULL argument. May actually be smaller.
|
||||
*/
|
||||
#define L_tmpnam (16)
|
||||
|
||||
#define _IOFBF 0x0000
|
||||
#define _IOLBF 0x0040
|
||||
#define _IONBF 0x0004
|
||||
|
||||
/*
|
||||
* The buffer size as used by setbuf such that it is equivalent to
|
||||
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
|
||||
*/
|
||||
#define BUFSIZ 512
|
||||
|
||||
/* Constants for nOrigin indicating the position relative to which fseek
|
||||
* sets the file position. Enclosed in ifdefs because io.h could also
|
||||
* define them. (Though not anymore since io.h includes this file now.) */
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET (0)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR (1)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END (2)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* I used to include stdarg.h at this point, in order to allow for the
|
||||
* functions later on in the file which use va_list. That conflicts with
|
||||
* using stdio.h and varargs.h in the same file, so I do the typedef myself.
|
||||
*/
|
||||
#ifndef _VA_LIST
|
||||
#define _VA_LIST
|
||||
#if defined __GNUC__ && __GNUC__ >= 3
|
||||
typedef __builtin_va_list va_list;
|
||||
#else
|
||||
typedef char* va_list;
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* The structure underlying the FILE type.
|
||||
*
|
||||
* I still believe that nobody in their right mind should make use of the
|
||||
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
|
||||
* <paag@tid.es>.
|
||||
*/
|
||||
#ifndef _FILE_DEFINED
|
||||
#define _FILE_DEFINED
|
||||
typedef struct _iobuf
|
||||
{
|
||||
char* _ptr;
|
||||
int _cnt;
|
||||
char* _base;
|
||||
int _flag;
|
||||
int _file;
|
||||
int _charbuf;
|
||||
int _bufsiz;
|
||||
char* _tmpfname;
|
||||
} FILE;
|
||||
#endif /* Not _FILE_DEFINED */
|
||||
|
||||
|
||||
/*
|
||||
* The standard file handles
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern FILE (*__imp__iob)[]; /* A pointer to an array of FILE */
|
||||
|
||||
#define _iob (*__imp__iob) /* An array of FILE */
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#define stdin (&_iob[STDIN_FILENO])
|
||||
#define stdout (&_iob[STDOUT_FILENO])
|
||||
#define stderr (&_iob[STDERR_FILENO])
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* File Operations
|
||||
*/
|
||||
FILE* fopen (const char*, const char*);
|
||||
FILE* freopen (const char*, const char*, FILE*);
|
||||
int fflush (FILE*);
|
||||
int fclose (FILE*);
|
||||
/* MS puts remove & rename (but not wide versions) in io.h also */
|
||||
int remove (const char*);
|
||||
int rename (const char*, const char*);
|
||||
FILE* tmpfile (void);
|
||||
char* tmpnam (char*);
|
||||
char* _tempnam (const char*, const char*);
|
||||
#define BUFSIZ 512
|
||||
#define _NFILE _NSTREAM_
|
||||
#define _NSTREAM_ 512
|
||||
#define _IOB_ENTRIES 20
|
||||
#define EOF (-1)
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
char* tempnam (const char*, const char*);
|
||||
#ifndef _FILE_DEFINED
|
||||
struct _iobuf {
|
||||
char *_ptr;
|
||||
int _cnt;
|
||||
char *_base;
|
||||
int _flag;
|
||||
int _file;
|
||||
int _charbuf;
|
||||
int _bufsiz;
|
||||
char *_tmpfname;
|
||||
};
|
||||
typedef struct _iobuf FILE;
|
||||
#define _FILE_DEFINED
|
||||
#endif
|
||||
|
||||
int setvbuf (FILE*, char*, int, size_t);
|
||||
|
||||
void setbuf (FILE*, char*);
|
||||
|
||||
/*
|
||||
* Formatted Output
|
||||
*/
|
||||
|
||||
int fprintf (FILE*, const char*, ...);
|
||||
int printf (const char*, ...);
|
||||
int sprintf (char*, const char*, ...);
|
||||
int _snprintf (char*, size_t, const char*, ...);
|
||||
int vfprintf (FILE*, const char*, va_list);
|
||||
int vprintf (const char*, va_list);
|
||||
int vsprintf (char*, const char*, va_list);
|
||||
int _vsnprintf (char*, size_t, const char*, va_list);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snprintf(char* s, size_t n, const char* format, ...);
|
||||
extern inline int vsnprintf (char* s, size_t n, const char* format,
|
||||
va_list arg)
|
||||
{ return _vsnprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Formatted Input
|
||||
*/
|
||||
|
||||
int fscanf (FILE*, const char*, ...);
|
||||
int scanf (const char*, ...);
|
||||
int sscanf (const char*, const char*, ...);
|
||||
/*
|
||||
* Character Input and Output Functions
|
||||
*/
|
||||
|
||||
int fgetc (FILE*);
|
||||
char* fgets (char*, int, FILE*);
|
||||
int fputc (int, FILE*);
|
||||
int fputs (const char*, FILE*);
|
||||
int getc (FILE*);
|
||||
int getchar (void);
|
||||
char* gets (char*);
|
||||
int putc (int, FILE*);
|
||||
int putchar (int);
|
||||
int puts (const char*);
|
||||
int ungetc (int, FILE*);
|
||||
|
||||
/*
|
||||
* Direct Input and Output Functions
|
||||
*/
|
||||
|
||||
size_t fread (void*, size_t, size_t, FILE*);
|
||||
size_t fwrite (const void*, size_t, size_t, FILE*);
|
||||
|
||||
/*
|
||||
* File Positioning Functions
|
||||
*/
|
||||
|
||||
int fseek (FILE*, long, int);
|
||||
long ftell (FILE*);
|
||||
void rewind (FILE*);
|
||||
|
||||
#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
|
||||
/*
|
||||
* Workaround for limitations on win9x where a file contents are
|
||||
* not zero'd out if you seek past the end and then write.
|
||||
*/
|
||||
|
||||
int __mingw_fseek (FILE *, long, int);
|
||||
int __mingw_fwrite (const void*, size_t, size_t, FILE*);
|
||||
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
|
||||
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
|
||||
#endif /* __USE_MINGW_FSEEK */
|
||||
|
||||
|
||||
/*
|
||||
* An opaque data type used for storing file positions... The contents of
|
||||
* this type are unknown, but we (the compiler) need to know the size
|
||||
* because the programmer using fgetpos and fsetpos will be setting aside
|
||||
* storage for fpos_t structres. Actually I tested using a byte array and
|
||||
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
|
||||
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
|
||||
* MSVCRT however, and for now `long long' will do.
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
typedef long long fpos_t;
|
||||
#ifdef _POSIX_
|
||||
#define _P_tmpdir "/"
|
||||
#define _wP_tmpdir L"/"
|
||||
#else
|
||||
typedef long fpos_t;
|
||||
#define _P_tmpdir "\\"
|
||||
#define _wP_tmpdir L"\\"
|
||||
#endif
|
||||
|
||||
int fgetpos (FILE*, fpos_t*);
|
||||
int fsetpos (FILE*, const fpos_t*);
|
||||
#define L_tmpnam (sizeof(_P_tmpdir) + 12)
|
||||
|
||||
/*
|
||||
* Error Functions
|
||||
*/
|
||||
#ifdef _POSIX_
|
||||
#define L_ctermid 9
|
||||
#define L_cuserid 32
|
||||
#endif
|
||||
|
||||
void clearerr (FILE*);
|
||||
int feof (FILE*);
|
||||
int ferror (FILE*);
|
||||
void perror (const char*);
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
#define SEEK_SET 0
|
||||
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Pipes
|
||||
*/
|
||||
FILE* _popen (const char*, const char*);
|
||||
int _pclose (FILE*);
|
||||
#define FILENAME_MAX 260
|
||||
#define FOPEN_MAX 20
|
||||
#define _SYS_OPEN 20
|
||||
#define TMP_MAX 32767
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _OFF_T_DEFINED
|
||||
#define _OFF_T_DEFINED
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _OFF64_T_DEFINED
|
||||
#define _OFF64_T_DEFINED
|
||||
typedef long long _off64_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long long off64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _STDIO_DEFINED
|
||||
#ifdef _WIN64
|
||||
_CRTIMP FILE *__cdecl __iob_func(void);
|
||||
#else
|
||||
#ifdef _MSVCRT_
|
||||
extern FILE _iob[]; /* A pointer to an array of FILE */
|
||||
#define __iob_func() (_iob)
|
||||
#else
|
||||
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
|
||||
#define __iob_func() (*_imp___iob)
|
||||
#define _iob __iob_func()
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _FPOS_T_DEFINED
|
||||
#define _FPOS_T_DEFINED
|
||||
#undef _FPOSOFF
|
||||
|
||||
#if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64
|
||||
typedef __int64 fpos_t;
|
||||
#define _FPOSOFF(fp) ((long)(fp))
|
||||
#else
|
||||
typedef long long fpos_t;
|
||||
#define _FPOSOFF(fp) ((long)(fp))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _STDSTREAM_DEFINED
|
||||
#define _STDSTREAM_DEFINED
|
||||
|
||||
#define stdin (&__iob_func()[0])
|
||||
#define stdout (&__iob_func()[1])
|
||||
#define stderr (&__iob_func()[2])
|
||||
#endif
|
||||
|
||||
#define _IOREAD 0x0001
|
||||
#define _IOWRT 0x0002
|
||||
|
||||
#define _IOFBF 0x0000
|
||||
#define _IOLBF 0x0040
|
||||
#define _IONBF 0x0004
|
||||
|
||||
#define _IOMYBUF 0x0008
|
||||
#define _IOEOF 0x0010
|
||||
#define _IOERR 0x0020
|
||||
#define _IOSTRG 0x0040
|
||||
#define _IORW 0x0080
|
||||
#ifdef _POSIX_
|
||||
#define _IOAPPEND 0x0200
|
||||
#endif
|
||||
|
||||
#define _TWO_DIGIT_EXPONENT 0x1
|
||||
|
||||
#ifndef _STDIO_DEFINED
|
||||
|
||||
_CRTIMP int __cdecl _filbuf(FILE *_File);
|
||||
_CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
|
||||
#ifdef _POSIX_
|
||||
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode);
|
||||
#else
|
||||
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
|
||||
#endif
|
||||
void __cdecl clearerr(FILE *_File);
|
||||
int __cdecl fclose(FILE *_File);
|
||||
_CRTIMP int __cdecl _fcloseall(void);
|
||||
#ifdef _POSIX_
|
||||
FILE *__cdecl fdopen(int _FileHandle,const char *_Mode);
|
||||
#else
|
||||
_CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
|
||||
#endif
|
||||
int __cdecl feof(FILE *_File);
|
||||
int __cdecl ferror(FILE *_File);
|
||||
int __cdecl fflush(FILE *_File);
|
||||
int __cdecl fgetc(FILE *_File);
|
||||
_CRTIMP int __cdecl _fgetchar(void);
|
||||
int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos);
|
||||
char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File);
|
||||
#ifdef _POSIX_
|
||||
int __cdecl fileno(FILE *_File);
|
||||
#else
|
||||
_CRTIMP int __cdecl _fileno(FILE *_File);
|
||||
#endif
|
||||
_CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
|
||||
_CRTIMP int __cdecl _flushall(void);
|
||||
FILE *__cdecl fopen(const char *_Filename,const char *_Mode);
|
||||
FILE *fopen64(const char *filename,const char *mode);
|
||||
int __cdecl fprintf(FILE *_File,const char *_Format,...);
|
||||
int __cdecl fputc(int _Ch,FILE *_File);
|
||||
_CRTIMP int __cdecl _fputchar(int _Ch);
|
||||
int __cdecl fputs(const char *_Str,FILE *_File);
|
||||
size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
|
||||
FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File);
|
||||
int __cdecl fscanf(FILE *_File,const char *_Format,...);
|
||||
int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
|
||||
int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
|
||||
int fseeko64(FILE* stream, _off64_t offset, int whence);
|
||||
long __cdecl ftell(FILE *_File);
|
||||
_off64_t ftello64(FILE * stream);
|
||||
int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
|
||||
__int64 __cdecl _ftelli64(FILE *_File);
|
||||
size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File);
|
||||
int __cdecl getc(FILE *_File);
|
||||
int __cdecl getchar(void);
|
||||
_CRTIMP int __cdecl _getmaxstdio(void);
|
||||
char *__cdecl gets(char *_Buffer);
|
||||
int __cdecl _getw(FILE *_File);
|
||||
#ifndef _CRT_PERROR_DEFINED
|
||||
#define _CRT_PERROR_DEFINED
|
||||
void __cdecl perror(const char *_ErrMsg);
|
||||
#endif
|
||||
_CRTIMP int __cdecl _pclose(FILE *_File);
|
||||
_CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
|
||||
#if !defined(NO_OLDNAMES) && !defined(popen)
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
#endif
|
||||
int __cdecl printf(const char *_Format,...);
|
||||
int __cdecl putc(int _Ch,FILE *_File);
|
||||
int __cdecl putchar(int _Ch);
|
||||
int __cdecl puts(const char *_Str);
|
||||
_CRTIMP int __cdecl _putw(int _Word,FILE *_File);
|
||||
#ifndef _CRT_DIRECTORY_DEFINED
|
||||
#define _CRT_DIRECTORY_DEFINED
|
||||
int __cdecl remove(const char *_Filename);
|
||||
int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
|
||||
_CRTIMP int __cdecl _unlink(const char *_Filename);
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* popen (const char*, const char*);
|
||||
int pclose (FILE*);
|
||||
int __cdecl unlink(const char *_Filename);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Other Non ANSI functions
|
||||
*/
|
||||
int _flushall (void);
|
||||
int _fgetchar (void);
|
||||
int _fputchar (int);
|
||||
FILE* _fdopen (int, const char*);
|
||||
int _fileno (FILE*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int fgetchar (void);
|
||||
int fputchar (int);
|
||||
FILE* fdopen (int, const char*);
|
||||
int fileno (FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* Wide versions */
|
||||
#endif
|
||||
void __cdecl rewind(FILE *_File);
|
||||
_CRTIMP int __cdecl _rmtmp(void);
|
||||
int __cdecl scanf(const char *_Format,...);
|
||||
void __cdecl setbuf(FILE *_File,char *_Buffer);
|
||||
_CRTIMP int __cdecl _setmaxstdio(int _Max);
|
||||
_CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
|
||||
_CRTIMP unsigned int __cdecl _get_output_format(void);
|
||||
int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size);
|
||||
_CRTIMP int __cdecl _scprintf(const char *_Format,...);
|
||||
int __cdecl sscanf(const char *_Src,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...);
|
||||
FILE *__cdecl tmpfile(void);
|
||||
char *__cdecl tmpnam(char *_Buffer);
|
||||
int __cdecl ungetc(int _Ch,FILE *_File);
|
||||
int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList);
|
||||
int __cdecl vprintf(const char *_Format,va_list _ArgList);
|
||||
/* Make sure macros are not defined. */
|
||||
#pragma push_macro("vsnprintf")
|
||||
#pragma push_macro("snprintf")
|
||||
#undef vsnprintf
|
||||
#undef snprintf
|
||||
extern
|
||||
__attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
|
||||
int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
extern
|
||||
__attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3)))
|
||||
int __mingw_snprintf(char* s, size_t n, const char* format, ...);
|
||||
int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...);
|
||||
_CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args);
|
||||
int __cdecl sprintf(char *_Dest,const char *_Format,...);
|
||||
int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args);
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int __cdecl snprintf(char* s, size_t n, const char* format, ...);
|
||||
__CRT_INLINE int __cdecl vsnprintf (char* s, size_t n, const char* format,va_list arg) {
|
||||
return _vsnprintf ( s, n, format, arg);
|
||||
}
|
||||
int __cdecl vscanf(const char * Format, va_list argp);
|
||||
int __cdecl vfscanf (FILE * fp, const char * Format,va_list argp);
|
||||
int __cdecl vsscanf (const char * _Str,const char * Format,va_list argp);
|
||||
#endif
|
||||
/* Restore may prior defined macros snprintf/vsnprintf. */
|
||||
#pragma pop_macro("snprintf")
|
||||
#pragma pop_macro("vsnprintf")
|
||||
/* Check if vsnprintf and snprintf are defaulting to gnu-style. */
|
||||
#if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
|
||||
#ifndef vsnprint
|
||||
#define vsnprintf __mingw_vsnprintf
|
||||
#endif
|
||||
#ifndef snprintf
|
||||
#define snprintf __mingw_snprintf
|
||||
#endif
|
||||
#endif
|
||||
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _set_printf_count_output(int _Value);
|
||||
_CRTIMP int __cdecl _get_printf_count_output(void);
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
/* also in wchar.h - keep in sync */
|
||||
int fwprintf (FILE*, const wchar_t*, ...);
|
||||
int wprintf (const wchar_t*, ...);
|
||||
int swprintf (wchar_t*, const wchar_t*, ...);
|
||||
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
||||
int vfwprintf (FILE*, const wchar_t*, va_list);
|
||||
int vwprintf (const wchar_t*, va_list);
|
||||
int vswprintf (wchar_t*, const wchar_t*, va_list);
|
||||
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
|
||||
int fwscanf (FILE*, const wchar_t*, ...);
|
||||
int wscanf (const wchar_t*, ...);
|
||||
int swscanf (const wchar_t*, const wchar_t*, ...);
|
||||
wint_t fgetwc (FILE*);
|
||||
wint_t fputwc (wchar_t, FILE*);
|
||||
wint_t ungetwc (wchar_t, FILE*);
|
||||
#ifdef __MSVCRT__
|
||||
wchar_t* fgetws (wchar_t*, int, FILE*);
|
||||
int fputws (const wchar_t*, FILE*);
|
||||
wint_t getwc (FILE*);
|
||||
wint_t getwchar (void);
|
||||
wchar_t* _getws (wchar_t*);
|
||||
wint_t putwc (wint_t, FILE*);
|
||||
int _putws (const wchar_t*);
|
||||
wint_t putwchar (wint_t);
|
||||
FILE* _wfopen (const wchar_t*, const wchar_t*);
|
||||
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
||||
FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
|
||||
wchar_t* _wtmpnam (wchar_t*);
|
||||
wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
|
||||
int _wrename (const wchar_t*, const wchar_t*);
|
||||
int _wremove (const wchar_t*);
|
||||
void _wperror (const wchar_t*);
|
||||
FILE* _wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
|
||||
va_list arg)
|
||||
{ return _vsnwprintf ( s, n, format, arg); }
|
||||
#ifndef WEOF
|
||||
#define WEOF (wint_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_
|
||||
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
|
||||
#else
|
||||
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
|
||||
#endif
|
||||
wint_t __cdecl fgetwc(FILE *_File);
|
||||
_CRTIMP wint_t __cdecl _fgetwchar(void);
|
||||
wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
|
||||
_CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
|
||||
wint_t __cdecl getwc(FILE *_File);
|
||||
wint_t __cdecl getwchar(void);
|
||||
wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
|
||||
wint_t __cdecl putwchar(wchar_t _Ch);
|
||||
wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
|
||||
wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
|
||||
int __cdecl fputws(const wchar_t *_Str,FILE *_File);
|
||||
_CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
|
||||
_CRTIMP int __cdecl _putws(const wchar_t *_Str);
|
||||
int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
|
||||
int __cdecl wprintf(const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
|
||||
int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
||||
int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
|
||||
_CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
|
||||
_CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
__CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
|
||||
int __cdecl vwscanf (const wchar_t *, va_list);
|
||||
int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
|
||||
int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
|
||||
#endif
|
||||
_CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#include <vadefs.h>
|
||||
#endif
|
||||
|
||||
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
|
||||
#ifndef __cplusplus
|
||||
#define swprintf _swprintf
|
||||
#define vswprintf _vswprintf
|
||||
#define _swprintf_l __swprintf_l
|
||||
#define _vswprintf_l __vswprintf_l
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
|
||||
_CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
|
||||
int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
|
||||
int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
|
||||
_CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
|
||||
int __cdecl wscanf(const wchar_t *_Format,...);
|
||||
_CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
|
||||
_CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
|
||||
_CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
|
||||
#ifndef _CRT_WPERROR_DEFINED
|
||||
#define _CRT_WPERROR_DEFINED
|
||||
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
|
||||
#endif
|
||||
_CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
|
||||
#if !defined(NO_OLDNAMES) && !defined(wpopen)
|
||||
#define wpopen _wpopen
|
||||
#endif
|
||||
_CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
|
||||
_CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
|
||||
_CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
|
||||
_CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
|
||||
_CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
|
||||
|
||||
#undef _CRT_GETPUTWCHAR_NOINLINE
|
||||
|
||||
#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
|
||||
#define getwchar() fgetwc(stdin)
|
||||
#define putwchar(_c) fputwc((_c),stdout)
|
||||
#else
|
||||
__CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); }
|
||||
__CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); }
|
||||
#endif
|
||||
|
||||
#define getwc(_stm) fgetwc(_stm)
|
||||
#define putwc(_c,_stm) fputwc(_c,_stm)
|
||||
#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
|
||||
#define _getwc_nolock(_stm) _fgetwc_nolock(_stm)
|
||||
|
||||
#define _WSTDIO_DEFINED
|
||||
#endif /* _WSTDIO_DEFINED */
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifdef __MSVCRT__
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* not NO_OLDNAMES */
|
||||
#endif /* MSVCRT runtime */
|
||||
#define _STDIO_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Other Non ANSI wide functions
|
||||
*/
|
||||
wint_t _fgetwchar (void);
|
||||
wint_t _fputwchar (wint_t);
|
||||
int _getw (FILE*);
|
||||
int _putw (int, FILE*);
|
||||
#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
|
||||
#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
|
||||
#define _getc_nolock(_stream) _fgetc_nolock(_stream)
|
||||
#define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream)
|
||||
#define _getchar_nolock() _getc_nolock(stdin)
|
||||
#define _putchar_nolock(_c) _putc_nolock((_c),stdout)
|
||||
#define _getwchar_nolock() _getwc_nolock(stdin)
|
||||
#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout)
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
wint_t fgetwchar (void);
|
||||
wint_t fputwchar (wint_t);
|
||||
int getw (FILE*);
|
||||
int putw (int, FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
_CRTIMP void __cdecl _lock_file(FILE *_File);
|
||||
_CRTIMP void __cdecl _unlock_file(FILE *_File);
|
||||
_CRTIMP int __cdecl _fclose_nolock(FILE *_File);
|
||||
_CRTIMP int __cdecl _fflush_nolock(FILE *_File);
|
||||
_CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
|
||||
_CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
|
||||
_CRTIMP long __cdecl _ftell_nolock(FILE *_File);
|
||||
_CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
|
||||
_CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
|
||||
_CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File);
|
||||
_CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
|
||||
|
||||
#endif /* __STRICT_ANSI */
|
||||
#if !defined(NO_OLDNAMES) || !defined(_POSIX)
|
||||
#define P_tmpdir _P_tmpdir
|
||||
#define SYS_OPEN _SYS_OPEN
|
||||
|
||||
char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix);
|
||||
int __cdecl fcloseall(void);
|
||||
FILE *__cdecl fdopen(int _FileHandle,const char *_Format);
|
||||
int __cdecl fgetchar(void);
|
||||
int __cdecl fileno(FILE *_File);
|
||||
int __cdecl flushall(void);
|
||||
int __cdecl fputchar(int _Ch);
|
||||
int __cdecl getw(FILE *_File);
|
||||
int __cdecl putw(int _Ch,FILE *_File);
|
||||
int __cdecl rmtmp(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* _STDIO_H_ */
|
||||
#include <sec_api/stdio_s.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,482 +1,580 @@
|
|||
/*
|
||||
* stdlib.h
|
||||
*
|
||||
* Definitions for common types, variables, and functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STDLIB
|
||||
#define _INC_STDLIB
|
||||
|
||||
#ifndef _STDLIB_H_
|
||||
#define _STDLIB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
/*
|
||||
* RAND_MAX is the maximum value that may be returned by rand.
|
||||
* The minimum is zero.
|
||||
*/
|
||||
#define RAND_MAX 0x7FFF
|
||||
|
||||
/*
|
||||
* These values may be used as exit status codes.
|
||||
*/
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
/*
|
||||
* Definitions for path name functions.
|
||||
* NOTE: All of these values have simply been chosen to be conservatively high.
|
||||
* Remember that with long file names we can no longer depend on
|
||||
* extensions being short.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH (260)
|
||||
#endif
|
||||
|
||||
#define _MAX_PATH MAX_PATH
|
||||
#define _MAX_DRIVE (3)
|
||||
#define _MAX_DIR 256
|
||||
#define _MAX_FNAME 256
|
||||
#define _MAX_EXT 256
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This seems like a convenient place to declare these variables, which
|
||||
* give programs using WinMain (or main for that matter) access to main-ish
|
||||
* argc and argv. environ is a pointer to a table of environment variables.
|
||||
* NOTE: Strings in _argv and environ are ANSI strings.
|
||||
*/
|
||||
extern int _argc;
|
||||
extern char** _argv;
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* imports from runtime dll of the above variables */
|
||||
#ifdef __MSVCRT__
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
extern int* __p___argc(void);
|
||||
extern char*** __p___argv(void);
|
||||
extern wchar_t*** __p___wargv(void);
|
||||
#ifndef _ONEXIT_T_DEFINED
|
||||
#define _ONEXIT_T_DEFINED
|
||||
|
||||
#define __argc (*__p___argc())
|
||||
#define __argv (*__p___argv())
|
||||
#define __wargv (*__p___wargv())
|
||||
typedef int (__cdecl *_onexit_t)(void);
|
||||
|
||||
#else /* !MSVCRT */
|
||||
#ifndef NO_OLDNAMES
|
||||
#define onexit_t _onexit_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
#ifndef _DIV_T_DEFINED
|
||||
#define _DIV_T_DEFINED
|
||||
|
||||
extern int* __imp___argc_dll;
|
||||
extern char*** __imp___argv_dll;
|
||||
#define __argc (*__imp___argc_dll)
|
||||
#define __argv (*__imp___argv_dll)
|
||||
typedef struct _div_t {
|
||||
int quot;
|
||||
int rem;
|
||||
} div_t;
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
typedef struct _ldiv_t {
|
||||
long quot;
|
||||
long rem;
|
||||
} ldiv_t;
|
||||
#endif
|
||||
|
||||
__MINGW_IMPORT int __argc_dll;
|
||||
__MINGW_IMPORT char** __argv_dll;
|
||||
#define __argc __argc_dll
|
||||
#define __argv __argv_dll
|
||||
#ifndef _CRT_DOUBLE_DEC
|
||||
#define _CRT_DOUBLE_DEC
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
#pragma pack(4)
|
||||
typedef struct {
|
||||
unsigned char ld[10];
|
||||
} _LDOUBLE;
|
||||
#pragma pack()
|
||||
|
||||
#endif /* __MSVCRT */
|
||||
#define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
|
||||
|
||||
/*
|
||||
* Also defined in ctype.h.
|
||||
*/
|
||||
typedef struct {
|
||||
double x;
|
||||
} _CRT_DOUBLE;
|
||||
|
||||
typedef struct {
|
||||
float f;
|
||||
} _CRT_FLOAT;
|
||||
|
||||
#pragma push_macro("long")
|
||||
#undef long
|
||||
|
||||
typedef struct {
|
||||
long double x;
|
||||
} _LONGDOUBLE;
|
||||
|
||||
#pragma pop_macro("long")
|
||||
|
||||
#pragma pack(4)
|
||||
typedef struct {
|
||||
unsigned char ld12[12];
|
||||
} _LDBL12;
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#define RAND_MAX 0x7fff
|
||||
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
/*
|
||||
* MS likes to declare errno in stdlib.h as well.
|
||||
*/
|
||||
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#define MB_CUR_MAX ___mb_cur_max_func()
|
||||
#ifndef __mb_cur_max
|
||||
#ifdef _MSVCRT_
|
||||
extern int __mb_cur_max;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#define __mb_cur_max (*_imp____mb_cur_max)
|
||||
extern int *_imp____mb_cur_max;
|
||||
#endif
|
||||
int* __doserrno(void);
|
||||
#define _doserrno (*__doserrno())
|
||||
|
||||
/*
|
||||
* Use environ from the DLL, not as a global.
|
||||
*/
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern char *** __p__environ(void);
|
||||
extern wchar_t *** __p__wenviron(void);
|
||||
# define _environ (*__p__environ())
|
||||
# define _wenviron (*__p__wenviron())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char *** __imp__environ_dll;
|
||||
# define _environ (*__imp__environ_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char ** _environ_dll;
|
||||
# define _environ _environ_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#define environ _environ
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* One of the MSVCRTxx libraries */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr;
|
||||
# define sys_nerr (*__imp__sys_nerr)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr;
|
||||
# ifndef _UWIN
|
||||
# define sys_nerr _sys_nerr
|
||||
# endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#else /* ! __MSVCRT__ */
|
||||
|
||||
/* CRTDLL run time library */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr_dll;
|
||||
# define sys_nerr (*__imp__sys_nerr_dll)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr_dll;
|
||||
# define sys_nerr _sys_nerr_dll
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern char*** __imp__sys_errlist;
|
||||
#define sys_errlist (*__imp__sys_errlist)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _sys_errlist[];
|
||||
#ifndef _UWIN
|
||||
#define sys_errlist _sys_errlist
|
||||
#endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
/*
|
||||
* OS version and such constants.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* msvcrtxx.dll */
|
||||
|
||||
extern unsigned int* __p__osver(void);
|
||||
extern unsigned int* __p__winver(void);
|
||||
extern unsigned int* __p__winmajor(void);
|
||||
extern unsigned int* __p__winminor(void);
|
||||
|
||||
#define _osver (*__p__osver())
|
||||
#define _winver (*__p__winver())
|
||||
#define _winmajor (*__p__winmajor())
|
||||
#define _winminor (*__p__winminor())
|
||||
|
||||
#endif
|
||||
#ifdef _MSVCRT_
|
||||
extern int __mbcur_max;
|
||||
#define ___mb_cur_max_func() (__mb_cur_max)
|
||||
#else
|
||||
/* Not msvcrtxx.dll, thus crtdll.dll */
|
||||
extern int* _imp____mbcur_max;
|
||||
#define ___mb_cur_max_func() (*_imp____mb_cur_max)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
#define __max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define __min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
extern unsigned int* _imp___osver_dll;
|
||||
extern unsigned int* _imp___winver_dll;
|
||||
extern unsigned int* _imp___winmajor_dll;
|
||||
extern unsigned int* _imp___winminor_dll;
|
||||
#define _MAX_PATH 260
|
||||
#define _MAX_DRIVE 3
|
||||
#define _MAX_DIR 256
|
||||
#define _MAX_FNAME 256
|
||||
#define _MAX_EXT 256
|
||||
|
||||
#define _osver (*_imp___osver_dll)
|
||||
#define _winver (*_imp___winver_dll)
|
||||
#define _winmajor (*_imp___winmajor_dll)
|
||||
#define _winminor (*_imp___winminor_dll)
|
||||
#define _OUT_TO_DEFAULT 0
|
||||
#define _OUT_TO_STDERR 1
|
||||
#define _OUT_TO_MSGBOX 2
|
||||
#define _REPORT_ERRMODE 3
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
#define _WRITE_ABORT_MSG 0x1
|
||||
#define _CALL_REPORTFAULT 0x2
|
||||
|
||||
__MINGW_IMPORT unsigned int _osver_dll;
|
||||
__MINGW_IMPORT unsigned int _winver_dll;
|
||||
__MINGW_IMPORT unsigned int _winmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _winminor_dll;
|
||||
#define _MAX_ENV 32767
|
||||
|
||||
#define _osver _osver_dll
|
||||
#define _winver _winver_dll
|
||||
#define _winmajor _winmajor_dll
|
||||
#define _winminor _winminor_dll
|
||||
typedef void (__cdecl *_purecall_handler)(void);
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
|
||||
_CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
|
||||
|
||||
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
|
||||
_invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
|
||||
_invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
|
||||
|
||||
#ifndef _CRT_ERRNO_DEFINED
|
||||
#define _CRT_ERRNO_DEFINED
|
||||
_CRTIMP extern int *__cdecl _errno(void);
|
||||
#define errno (*_errno())
|
||||
errno_t __cdecl _set_errno(int _Value);
|
||||
errno_t __cdecl _get_errno(int *_Value);
|
||||
#endif
|
||||
_CRTIMP unsigned long *__cdecl __doserrno(void);
|
||||
#define _doserrno (*__doserrno())
|
||||
errno_t __cdecl _set_doserrno(unsigned long _Value);
|
||||
errno_t __cdecl _get_doserrno(unsigned long *_Value);
|
||||
#ifdef _MSVCRT_
|
||||
extern char *_sys_errlist[];
|
||||
extern int _sys_nerr;
|
||||
#else
|
||||
_CRTIMP char *_sys_errlist[1];
|
||||
_CRTIMP int _sys_nerr;
|
||||
#endif
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
_CRTIMP int *__cdecl __p___argc(void);
|
||||
_CRTIMP char ***__cdecl __p___argv(void);
|
||||
_CRTIMP wchar_t ***__cdecl __p___wargv(void);
|
||||
_CRTIMP char ***__cdecl __p__environ(void);
|
||||
_CRTIMP wchar_t ***__cdecl __p__wenviron(void);
|
||||
_CRTIMP char **__cdecl __p__pgmptr(void);
|
||||
_CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
|
||||
#endif
|
||||
#ifndef __argc
|
||||
#ifdef _MSVCRT_
|
||||
extern int __argc;
|
||||
#else
|
||||
#define __argc (*_imp____argc)
|
||||
extern int *_imp____argc;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __argv
|
||||
#ifdef _MSVCRT_
|
||||
extern char **__argv;
|
||||
#else
|
||||
#define __argv (*_imp____argv)
|
||||
extern char ***_imp____argv;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __wargv
|
||||
#ifdef _MSVCRT_
|
||||
extern wchar_t **__wargv;
|
||||
#else
|
||||
#define __wargv (*_imp____wargv)
|
||||
extern wchar_t ***_imp____wargv;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_
|
||||
extern char **environ;
|
||||
#else
|
||||
#ifndef _environ
|
||||
#ifdef _MSVCRT_
|
||||
extern char **_environ;
|
||||
#else
|
||||
#define _environ (*_imp___environ)
|
||||
extern char ***_imp___environ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _wenviron
|
||||
#ifdef _MSVCRT_
|
||||
extern wchar_t **_wenviron;
|
||||
#else
|
||||
#define _wenviron (*_imp___wenviron)
|
||||
extern wchar_t ***_imp___wenviron;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _pgmptr
|
||||
#ifdef _MSVCRT_
|
||||
extern char *_pgmptr;
|
||||
#else
|
||||
#define _pgmptr (*_imp___pgmptr)
|
||||
extern char **_imp___pgmptr;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _wpgmptr
|
||||
#ifdef _MSVCRT_
|
||||
extern wchar_t *_wpgmptr;
|
||||
#else
|
||||
#define _wpgmptr (*_imp___wpgmptr)
|
||||
extern wchar_t **_imp___wpgmptr;
|
||||
#endif
|
||||
#endif
|
||||
errno_t __cdecl _get_pgmptr(char **_Value);
|
||||
errno_t __cdecl _get_wpgmptr(wchar_t **_Value);
|
||||
#ifndef _fmode
|
||||
#ifdef _MSVCRT_
|
||||
extern int _fmode;
|
||||
#else
|
||||
#define _fmode (*_imp___fmode)
|
||||
extern int *_imp___fmode;
|
||||
#endif
|
||||
#endif
|
||||
_CRTIMP errno_t __cdecl _set_fmode(int _Mode);
|
||||
_CRTIMP errno_t __cdecl _get_fmode(int *_PMode);
|
||||
|
||||
#ifndef _osplatform
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned int _osplatform;
|
||||
#else
|
||||
#define _osplatform (*_imp___osplatform)
|
||||
extern unsigned int *_imp___osplatform;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _osver
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned int _osver;
|
||||
#else
|
||||
#define _osver (*_imp___osver)
|
||||
extern unsigned int *_imp___osver;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _winver
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned int _winver;
|
||||
#else
|
||||
#define _winver (*_imp___winver)
|
||||
extern unsigned int *_imp___winver;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _winmajor
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned int _winmajor;
|
||||
#else
|
||||
#define _winmajor (*_imp___winmajor)
|
||||
extern unsigned int *_imp___winmajor;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _winminor
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned int _winminor;
|
||||
#else
|
||||
#define _winminor (*_imp___winminor)
|
||||
extern unsigned int *_imp___winminor;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
errno_t __cdecl _get_osplatform(unsigned int *_Value);
|
||||
errno_t __cdecl _get_osver(unsigned int *_Value);
|
||||
errno_t __cdecl _get_winver(unsigned int *_Value);
|
||||
errno_t __cdecl _get_winmajor(unsigned int *_Value);
|
||||
errno_t __cdecl _get_winminor(unsigned int *_Value);
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_TERMINATE_DEFINED
|
||||
#define _CRT_TERMINATE_DEFINED
|
||||
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
|
||||
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#endif
|
||||
|
||||
#pragma push_macro("abort")
|
||||
#undef abort
|
||||
void __cdecl __declspec(noreturn) abort(void);
|
||||
#pragma pop_macro("abort")
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __MSVCRT__
|
||||
/* although the _pgmptr is exported as DATA,
|
||||
* be safe and use the access function __p__pgmptr() to get it. */
|
||||
char** __p__pgmptr(void);
|
||||
#define _pgmptr (*__p__pgmptr())
|
||||
wchar_t** __p__wpgmptr(void);
|
||||
#define _wpgmptr (*__p__wpgmptr())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char** __imp__pgmptr_dll;
|
||||
# define _pgmptr (*__imp__pgmptr_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _pgmptr_dll;
|
||||
# define _pgmptr _pgmptr_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
/* no wide version in CRTDLL */
|
||||
#endif /* __MSVCRT__ */
|
||||
_CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask);
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _CRT_ABS_DEFINED
|
||||
#define _CRT_ABS_DEFINED
|
||||
int __cdecl abs(int _X);
|
||||
long __cdecl labs(long _X);
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _ATTRIB_NORETURN __attribute__ ((noreturn))
|
||||
#else /* Not __GNUC__ */
|
||||
#define _ATTRIB_NORETURN
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
double atof (const char*);
|
||||
int atoi (const char*);
|
||||
long atol (const char*);
|
||||
int _wtoi (const wchar_t *);
|
||||
long _wtol (const wchar_t *);
|
||||
|
||||
double strtod (const char*, char**);
|
||||
#if !defined __NO_ISOCEXT /* extern stubs in static libmingwex.a */
|
||||
extern __inline__ float strtof (const char *nptr, char **endptr)
|
||||
{ return (strtod (nptr, endptr));}
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
__int64 __cdecl _abs64(__int64);
|
||||
#endif
|
||||
int __cdecl atexit(void (__cdecl *)(void));
|
||||
#ifndef _CRT_ATOF_DEFINED
|
||||
#define _CRT_ATOF_DEFINED
|
||||
double __cdecl atof(const char *_String);
|
||||
double __cdecl _atof_l(const char *_String,_locale_t _Locale);
|
||||
#endif
|
||||
int __cdecl atoi(const char *_Str);
|
||||
_CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale);
|
||||
long __cdecl atol(const char *_Str);
|
||||
_CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale);
|
||||
#ifndef _CRT_ALGO_DEFINED
|
||||
#define _CRT_ALGO_DEFINED
|
||||
void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
|
||||
void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
|
||||
#endif
|
||||
unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
|
||||
/*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
|
||||
#endif
|
||||
div_t __cdecl div(int _Numerator,int _Denominator);
|
||||
char *__cdecl getenv(const char *_VarName);
|
||||
_CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix);
|
||||
_CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix);
|
||||
_CRTIMP __int64 __cdecl _atoi64(const char *_String);
|
||||
_CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale);
|
||||
_CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix);
|
||||
_CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
_CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix);
|
||||
_CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
#endif
|
||||
ldiv_t __cdecl ldiv(long _Numerator,long _Denominator);
|
||||
_CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix);
|
||||
int __cdecl mblen(const char *_Ch,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP size_t __cdecl _mbstrlen(const char *_Str);
|
||||
_CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale);
|
||||
_CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount);
|
||||
_CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
|
||||
int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes);
|
||||
_CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale);
|
||||
size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount);
|
||||
_CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale);
|
||||
int __cdecl rand(void);
|
||||
_CRTIMP int __cdecl _set_error_mode(int _Mode);
|
||||
void __cdecl srand(unsigned int _Seed);
|
||||
double __cdecl strtod(const char *_Str,char **_EndPtr);
|
||||
float __cdecl strtof(const char *nptr, char **endptr);
|
||||
#if !defined __NO_ISOCEXT /* in libmingwex.a */
|
||||
float __cdecl strtof (const char * __restrict__, char ** __restrict__);
|
||||
long double __cdecl strtold(const char * __restrict__, char ** __restrict__);
|
||||
#endif /* __NO_ISOCEXT */
|
||||
_CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale);
|
||||
long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix);
|
||||
_CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix);
|
||||
_CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
#ifndef _CRT_SYSTEM_DEFINED
|
||||
#define _CRT_SYSTEM_DEFINED
|
||||
int __cdecl system(const char *_Command);
|
||||
#endif
|
||||
_CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix);
|
||||
int __cdecl wctomb(char *_MbCh,wchar_t _WCh);
|
||||
_CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale);
|
||||
size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount);
|
||||
_CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale);
|
||||
|
||||
long strtol (const char*, char**, int);
|
||||
unsigned long strtoul (const char*, char**, int);
|
||||
#ifndef _CRT_ALLOCATION_DEFINED
|
||||
#define _CRT_ALLOCATION_DEFINED
|
||||
void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
|
||||
void __cdecl free(void *_Memory);
|
||||
void *__cdecl malloc(size_t _Size);
|
||||
void *__cdecl realloc(void *_Memory,size_t _NewSize);
|
||||
_CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
|
||||
//_CRTIMP void __cdecl _aligned_free(void *_Memory);
|
||||
//_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
|
||||
_CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
_CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
|
||||
_CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
|
||||
_CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
_CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDLIB_DEFINED
|
||||
/* also declared in wchar.h */
|
||||
double wcstod (const wchar_t*, wchar_t**);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
|
||||
{ return (wcstod(nptr, endptr)); }
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
long wcstol (const wchar_t*, wchar_t**, int);
|
||||
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
|
||||
#define _WSTDLIB_DEFINED
|
||||
|
||||
_CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
|
||||
_CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
|
||||
_CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
|
||||
double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
|
||||
float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr);
|
||||
#if !defined __NO_ISOCEXT /* in libmingwex.a */
|
||||
float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
|
||||
long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
|
||||
#endif /* __NO_ISOCEXT */
|
||||
_CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
|
||||
long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
||||
_CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
||||
_CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
_CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
|
||||
#ifndef _CRT_WSYSTEM_DEFINED
|
||||
#define _CRT_WSYSTEM_DEFINED
|
||||
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
|
||||
#endif
|
||||
_CRTIMP double __cdecl _wtof(const wchar_t *_Str);
|
||||
_CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
|
||||
_CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
|
||||
_CRTIMP long __cdecl _wtol(const wchar_t *_Str);
|
||||
_CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
|
||||
_CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
|
||||
_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
|
||||
_CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
|
||||
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
||||
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
||||
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
size_t wcstombs (char*, const wchar_t*, size_t);
|
||||
int wctomb (char*, wchar_t);
|
||||
#ifndef _POSIX_
|
||||
#define _CVTBUFSIZE (309+40)
|
||||
_CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes);
|
||||
_CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
|
||||
_CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
|
||||
_CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
|
||||
_CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str);
|
||||
_CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str);
|
||||
_CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str);
|
||||
_CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale);
|
||||
unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift);
|
||||
unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift);
|
||||
_CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
|
||||
_onexit_t __cdecl _onexit(_onexit_t _Func);
|
||||
|
||||
int mblen (const char*, size_t);
|
||||
size_t mbstowcs (wchar_t*, const char*, size_t);
|
||||
int mbtowc (wchar_t*, const char*, size_t);
|
||||
|
||||
int rand (void);
|
||||
void srand (unsigned int);
|
||||
|
||||
void* calloc (size_t, size_t);
|
||||
void* malloc (size_t);
|
||||
void* realloc (void*, size_t);
|
||||
void free (void*);
|
||||
|
||||
void abort (void) _ATTRIB_NORETURN;
|
||||
void exit (int) _ATTRIB_NORETURN;
|
||||
int atexit (void (*)(void));
|
||||
|
||||
int system (const char*);
|
||||
char* getenv (const char*);
|
||||
|
||||
void* bsearch (const void*, const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
void qsort (const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
|
||||
int abs (int);
|
||||
long labs (long);
|
||||
|
||||
/*
|
||||
* div_t and ldiv_t are structures used to return the results of div and
|
||||
* ldiv.
|
||||
*
|
||||
* NOTE: div and ldiv appear not to work correctly unless
|
||||
* -fno-pcc-struct-return is specified. This is included in the
|
||||
* mingw32 specs file.
|
||||
*/
|
||||
typedef struct { int quot, rem; } div_t;
|
||||
typedef struct { long quot, rem; } ldiv_t;
|
||||
|
||||
div_t div (int, int);
|
||||
ldiv_t ldiv (long, long);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/*
|
||||
* NOTE: Officially the three following functions are obsolete. The Win32 API
|
||||
* functions SetErrorMode, Beep and Sleep are their replacements.
|
||||
*/
|
||||
void _beep (unsigned int, unsigned int);
|
||||
void _seterrormode (int);
|
||||
void _sleep (unsigned long);
|
||||
|
||||
void _exit (int) _ATTRIB_NORETURN;
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */
|
||||
extern __inline__ void _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#ifndef _CRT_PERROR_DEFINED
|
||||
#define _CRT_PERROR_DEFINED
|
||||
void __cdecl perror(const char *_ErrMsg);
|
||||
#endif
|
||||
/* _onexit is MS extension. Use atexit for portability. */
|
||||
typedef int (* _onexit_t)(void);
|
||||
_onexit_t _onexit( _onexit_t );
|
||||
_CRTIMP int __cdecl _putenv(const char *_EnvString);
|
||||
unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
|
||||
#endif
|
||||
unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
|
||||
#endif
|
||||
_CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
|
||||
_CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);
|
||||
_CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
|
||||
|
||||
int _putenv (const char*);
|
||||
void _searchenv (const char*, const char*, char*);
|
||||
|
||||
|
||||
char* _ecvt (double, int, int*, int*);
|
||||
char* _fcvt (double, int, int*, int*);
|
||||
char* _gcvt (double, int, char*);
|
||||
|
||||
void _makepath (char*, const char*, const char*, const char*, const char*);
|
||||
void _splitpath (const char*, char*, char*, char*, char*);
|
||||
char* _fullpath (char*, const char*, size_t);
|
||||
|
||||
|
||||
char* _itoa (int, char*, int);
|
||||
char* _ltoa (long, char*, int);
|
||||
char* _ultoa(unsigned long, char*, int);
|
||||
wchar_t* _itow (int, wchar_t*, int);
|
||||
wchar_t* _ltow (long, wchar_t*, int);
|
||||
wchar_t* _ultow (unsigned long, wchar_t*, int);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _atoi64(const char *);
|
||||
char* _i64toa(__int64, char *, int);
|
||||
char* _ui64toa(unsigned __int64, char *, int);
|
||||
__int64 _wtoi64(const wchar_t *);
|
||||
wchar_t* _i64tow(__int64, wchar_t *, int);
|
||||
wchar_t* _ui64tow(unsigned __int64, wchar_t *, int);
|
||||
|
||||
wchar_t* _wgetenv(const wchar_t*);
|
||||
int _wputenv(const wchar_t*);
|
||||
void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
|
||||
void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
|
||||
void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
|
||||
wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t);
|
||||
#ifndef _WSTDLIBP_DEFINED
|
||||
#define _WSTDLIBP_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
|
||||
_CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
|
||||
#ifndef _CRT_WPERROR_DEFINED
|
||||
#define _CRT_WPERROR_DEFINED
|
||||
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
|
||||
#endif
|
||||
_CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
|
||||
_CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
|
||||
_CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
_CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
|
||||
/* Not to be confused with _set_error_mode (int). */
|
||||
_CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
|
||||
_CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
|
||||
#endif
|
||||
|
||||
int putenv (const char*);
|
||||
void searchenv (const char*, const char*, char*);
|
||||
#ifndef NO_OLDNAMES
|
||||
#ifndef _POSIX_
|
||||
#if 0
|
||||
#ifndef __cplusplus
|
||||
#ifndef NOMINMAX
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char* itoa (int, char*, int);
|
||||
char* ltoa (long, char*, int);
|
||||
|
||||
#ifndef _UWIN
|
||||
char* ecvt (double, int, int*, int*);
|
||||
char* fcvt (double, int, int*, int*);
|
||||
char* gcvt (double, int, char*);
|
||||
#endif /* _UWIN */
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* C99 names */
|
||||
#define sys_errlist _sys_errlist
|
||||
#define sys_nerr _sys_nerr
|
||||
#define environ _environ
|
||||
char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
|
||||
char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
|
||||
char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
|
||||
char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix);
|
||||
char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix);
|
||||
int __cdecl putenv(const char *_EnvString);
|
||||
void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
|
||||
char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix);
|
||||
onexit_t __cdecl onexit(onexit_t _Func);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
|
||||
|
||||
typedef struct { long long quot, rem; } lldiv_t;
|
||||
typedef struct { long long quot, rem; } lldiv_t;
|
||||
|
||||
lldiv_t lldiv (long long, long long);
|
||||
lldiv_t __cdecl lldiv(long long, long long);
|
||||
|
||||
extern __inline__ long long llabs(long long _j)
|
||||
{return (_j >= 0 ? _j : -_j);}
|
||||
__CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
|
||||
|
||||
long long strtoll (const char* __restrict__, char** __restrict, int);
|
||||
unsigned long long strtoull (const char* __restrict__, char** __restrict__, int);
|
||||
long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
|
||||
unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int);
|
||||
|
||||
#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
|
||||
long long atoll (const char *);
|
||||
/* these are stubs for MS _i64 versions */
|
||||
long long __cdecl atoll (const char *);
|
||||
|
||||
#if !defined (__STRICT_ANSI__)
|
||||
long long wtoll(const wchar_t *);
|
||||
char* lltoa(long long, char *, int);
|
||||
char* ulltoa(unsigned long long , char *, int);
|
||||
wchar_t* lltow(long long, wchar_t *, int);
|
||||
wchar_t* ulltow(unsigned long long, wchar_t *, int);
|
||||
#ifndef __STRICT_ANSI__
|
||||
long long __cdecl wtoll (const wchar_t *);
|
||||
char *__cdecl lltoa (long long, char *, int);
|
||||
char *__cdecl ulltoa (unsigned long long , char *, int);
|
||||
wchar_t *__cdecl lltow (long long, wchar_t *, int);
|
||||
wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int);
|
||||
|
||||
/* inline using non-ansi functions */
|
||||
extern __inline__ long long atoll (const char * _c)
|
||||
{ return _atoi64 (_c); }
|
||||
extern __inline__ char* lltoa(long long _n, char * _c, int _i)
|
||||
{ return _i64toa (_n, _c, _i); }
|
||||
extern __inline__ char* ulltoa(unsigned long long _n, char * _c, int _i)
|
||||
{ return _ui64toa (_n, _c, _i); }
|
||||
extern __inline__ long long wtoll(const wchar_t * _w)
|
||||
{ return _wtoi64 (_w); }
|
||||
extern __inline__ wchar_t* lltow(long long _n, wchar_t * _w, int _i)
|
||||
{ return _i64tow (_n, _w, _i); }
|
||||
extern __inline__ wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
|
||||
{ return _ui64tow (_n, _w, _i); }
|
||||
/* __CRT_INLINE using non-ansi functions */
|
||||
__CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); }
|
||||
__CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); }
|
||||
__CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); }
|
||||
__CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); }
|
||||
__CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); }
|
||||
__CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); }
|
||||
#endif /* (__STRICT_ANSI__) */
|
||||
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* !__NO_ISOCEXT */
|
||||
|
||||
/*
|
||||
* Undefine the no return attribute used in some function definitions
|
||||
*/
|
||||
#undef _ATTRIB_NORETURN
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* Not _STDLIB_H_ */
|
||||
#include <sec_api/stdlib_s.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,206 +1,164 @@
|
|||
/*
|
||||
* string.h
|
||||
*
|
||||
* Definitions for memory and string functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STRING
|
||||
#define _INC_STRING
|
||||
|
||||
#ifndef _STRING_H_
|
||||
#define _STRING_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Define size_t, wchar_t and NULL
|
||||
*/
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prototypes of the ANSI Standard C library string functions.
|
||||
*/
|
||||
void* memchr (const void*, int, size_t);
|
||||
int memcmp (const void*, const void*, size_t);
|
||||
void* memcpy (void*, const void*, size_t);
|
||||
void* memmove (void*, const void*, size_t);
|
||||
void* memset (void*, int, size_t);
|
||||
char* strcat (char*, const char*);
|
||||
char* strchr (const char*, int);
|
||||
int strcmp (const char*, const char*);
|
||||
int strcoll (const char*, const char*); /* Compare using locale */
|
||||
char* strcpy (char*, const char*);
|
||||
size_t strcspn (const char*, const char*);
|
||||
char* strerror (int); /* NOTE: NOT an old name wrapper. */
|
||||
char* _strerror (const char *);
|
||||
size_t strlen (const char*);
|
||||
char* strncat (char*, const char*, size_t);
|
||||
int strncmp (const char*, const char*, size_t);
|
||||
char* strncpy (char*, const char*, size_t);
|
||||
char* strpbrk (const char*, const char*);
|
||||
char* strrchr (const char*, int);
|
||||
size_t strspn (const char*, const char*);
|
||||
char* strstr (const char*, const char*);
|
||||
char* strtok (char*, const char*);
|
||||
size_t strxfrm (char*, const char*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Extra non-ANSI functions provided by the CRTDLL library
|
||||
*/
|
||||
void* _memccpy (void*, const void*, int, size_t);
|
||||
int _memicmp (const void*, const void*, size_t);
|
||||
char* _strdup (const char*);
|
||||
int _strcmpi (const char*, const char*);
|
||||
int _stricmp (const char*, const char*);
|
||||
int _stricoll (const char*, const char*);
|
||||
char* _strlwr (char*);
|
||||
int _strnicmp (const char*, const char*, size_t);
|
||||
char* _strnset (char*, int, size_t);
|
||||
char* _strrev (char*);
|
||||
char* _strset (char*, int);
|
||||
char* _strupr (char*);
|
||||
void _swab (const char*, char*, size_t);
|
||||
|
||||
/*
|
||||
* Multi-byte character functions
|
||||
*/
|
||||
unsigned char* _mbschr (unsigned char*, unsigned char*);
|
||||
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
|
||||
unsigned char* _mbstok (unsigned char*, unsigned char*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _strncoll(const char*, const char*, size_t);
|
||||
int _strnicoll(const char*, const char*, size_t);
|
||||
#ifndef _NLSCMP_DEFINED
|
||||
#define _NLSCMP_DEFINED
|
||||
#define _NLSCMPERROR 2147483647
|
||||
#endif
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* Unicode versions of the standard calls.
|
||||
*/
|
||||
wchar_t* wcscat (wchar_t*, const wchar_t*);
|
||||
wchar_t* wcschr (const wchar_t*, wchar_t);
|
||||
int wcscmp (const wchar_t*, const wchar_t*);
|
||||
int wcscoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcscpy (wchar_t*, const wchar_t*);
|
||||
size_t wcscspn (const wchar_t*, const wchar_t*);
|
||||
/* Note: No wcserror in CRTDLL. */
|
||||
size_t wcslen (const wchar_t*);
|
||||
wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
|
||||
int wcsncmp(const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsrchr(const wchar_t*, wchar_t);
|
||||
size_t wcsspn(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsstr(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcstok(wchar_t*, const wchar_t*);
|
||||
size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Unicode versions of non-ANSI functions provided by CRTDLL.
|
||||
*/
|
||||
|
||||
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
|
||||
#define _wcscmpi _wcsicmp
|
||||
|
||||
wchar_t* _wcsdup (wchar_t*);
|
||||
int _wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int _wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* _wcslwr (wchar_t*);
|
||||
int _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* _wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* _wcsrev (wchar_t*);
|
||||
wchar_t* _wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* _wcsupr (wchar_t*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _wcsncoll(const wchar_t*, const wchar_t*, size_t);
|
||||
int _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _WConst_return _CONST_RETURN
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _CRT_MEMORY_DEFINED
|
||||
#define _CRT_MEMORY_DEFINED
|
||||
_CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
|
||||
_CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
_CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
|
||||
int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
|
||||
void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
|
||||
#ifndef NO_OLDNAMES
|
||||
void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
|
||||
int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
|
||||
#endif
|
||||
#endif
|
||||
char *__cdecl _strset(char *_Str,int _Val);
|
||||
char *__cdecl strcpy(char *_Dest,const char *_Source);
|
||||
char *__cdecl strcat(char *_Dest,const char *_Source);
|
||||
int __cdecl strcmp(const char *_Str1,const char *_Str2);
|
||||
size_t __cdecl strlen(const char *_Str);
|
||||
#if 0
|
||||
size_t __cdecl strnlen(const char *_Str,size_t _MaxCount);
|
||||
#endif
|
||||
void *__cdecl memmove(void *_Dst,const void *_Src,size_t _Size);
|
||||
_CRTIMP char *__cdecl _strdup(const char *_Src);
|
||||
_CONST_RETURN char *__cdecl strchr(const char *_Str,int _Val);
|
||||
_CRTIMP int __cdecl _stricmp(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP int __cdecl _strcmpi(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP int __cdecl _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
|
||||
int __cdecl strcoll(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP int __cdecl _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _stricoll(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP int __cdecl _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
size_t __cdecl strcspn(const char *_Str,const char *_Control);
|
||||
_CRTIMP char *__cdecl _strerror(const char *_ErrMsg);
|
||||
char *__cdecl strerror(int);
|
||||
_CRTIMP char *__cdecl _strlwr(char *_String);
|
||||
char *strlwr_l(char *_String,_locale_t _Locale);
|
||||
char *__cdecl strncat(char *_Dest,const char *_Source,size_t _Count);
|
||||
int __cdecl strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
char *strncpy(char *_Dest,const char *_Source,size_t _Count);
|
||||
_CRTIMP char *__cdecl _strnset(char *_Str,int _Val,size_t _MaxCount);
|
||||
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char *_Control);
|
||||
_CONST_RETURN char *__cdecl strrchr(const char *_Str,int _Ch);
|
||||
_CRTIMP char *__cdecl _strrev(char *_Str);
|
||||
size_t __cdecl strspn(const char *_Str,const char *_Control);
|
||||
_CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
|
||||
char *__cdecl strtok(char *_Str,const char *_Delim);
|
||||
_CRTIMP char *__cdecl _strupr(char *_String);
|
||||
_CRTIMP char *_strupr_l(char *_String,_locale_t _Locale);
|
||||
size_t __cdecl strxfrm(char *_Dst,const char *_Src,size_t _MaxCount);
|
||||
_CRTIMP size_t __cdecl _strxfrm_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
char *__cdecl strdup(const char *_Src);
|
||||
int __cdecl strcmpi(const char *_Str1,const char *_Str2);
|
||||
int __cdecl stricmp(const char *_Str1,const char *_Str2);
|
||||
char *__cdecl strlwr(char *_Str);
|
||||
int __cdecl strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount);
|
||||
__CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
|
||||
__CRT_INLINE int __cdecl strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); }
|
||||
char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount);
|
||||
char *__cdecl strrev(char *_Str);
|
||||
char *__cdecl strset(char *_Str,int _Val);
|
||||
char *__cdecl strupr(char *_Str);
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _NO_OLDNAMES
|
||||
#ifndef _WSTRING_DEFINED
|
||||
#define _WSTRING_DEFINED
|
||||
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions. They live in liboldnames.a
|
||||
* and provide a little extra portability. Also a few extra UNIX-isms like
|
||||
* strcasecmp.
|
||||
*/
|
||||
|
||||
void* memccpy (void*, const void*, int, size_t);
|
||||
int memicmp (const void*, const void*, size_t);
|
||||
char* strdup (const char*);
|
||||
int strcmpi (const char*, const char*);
|
||||
int stricmp (const char*, const char*);
|
||||
int strcasecmp (const char*, const char*);
|
||||
int stricoll (const char*, const char*);
|
||||
char* strlwr (char*);
|
||||
int strnicmp (const char*, const char*, size_t);
|
||||
int strncasecmp (const char*, const char*, size_t);
|
||||
char* strnset (char*, int, size_t);
|
||||
char* strrev (char*);
|
||||
char* strset (char*, int);
|
||||
char* strupr (char*);
|
||||
#ifndef _UWIN
|
||||
void swab (const char*, char*, size_t);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
|
||||
int wcscmpi (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsdup (wchar_t*);
|
||||
int wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcslwr (wchar_t*);
|
||||
int wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* wcsrev (wchar_t*);
|
||||
wchar_t* wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* wcsupr (wchar_t*);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#endif /* Not strict ANSI */
|
||||
_CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
|
||||
wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
|
||||
_CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
|
||||
int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
|
||||
size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
|
||||
size_t __cdecl wcslen(const wchar_t *_Str);
|
||||
size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
|
||||
wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
|
||||
int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
|
||||
_CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
|
||||
_CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
|
||||
size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
|
||||
_CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
|
||||
wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
|
||||
_CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
|
||||
_CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
|
||||
_CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
_CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
|
||||
_CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
|
||||
_CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
|
||||
_CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
|
||||
_CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
|
||||
_CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
|
||||
_CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
|
||||
size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
|
||||
_CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
|
||||
int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
_CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
_CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
_CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
_CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
wchar_t *__cdecl wcsdup(const wchar_t *_Str);
|
||||
#define wcswcs wcsstr
|
||||
int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
|
||||
wchar_t *__cdecl wcsrev(wchar_t *_Str);
|
||||
wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
|
||||
wchar_t *__cdecl wcslwr(wchar_t *_Str);
|
||||
wchar_t *__cdecl wcsupr(wchar_t *_Str);
|
||||
int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STRING_H_ */
|
||||
|
||||
#include <sec_api/string_s.h>
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
|
|
|
@ -1,52 +1,30 @@
|
|||
/*
|
||||
* locking.h
|
||||
*
|
||||
* Constants for the mode parameter of the locking function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_LOCKING
|
||||
#define _INC_LOCKING
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _LOCKING_H_
|
||||
#define _LOCKING_H_
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define _LK_UNLCK 0 /* Unlock */
|
||||
#define _LK_LOCK 1 /* Lock */
|
||||
#define _LK_NBLCK 2 /* Non-blocking lock */
|
||||
#define _LK_RLCK 3 /* Lock for read only */
|
||||
#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
|
||||
#define _LK_UNLCK 0
|
||||
#define _LK_LOCK 1
|
||||
#define _LK_NBLCK 2
|
||||
#define _LK_RLCK 3
|
||||
#define _LK_NBRLCK 4
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define LK_UNLCK _LK_UNLCK
|
||||
#define LK_LOCK _LK_LOCK
|
||||
#define LK_NBLCK _LK_NBLCK
|
||||
#define LK_RLCK _LK_RLCK
|
||||
#define LK_NBRLCK _LK_NBRLCK
|
||||
#endif /* Not NO_OLDNAMES */
|
||||
|
||||
#endif /* Not _LOCKING_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#define LK_UNLCK _LK_UNLCK
|
||||
#define LK_LOCK _LK_LOCK
|
||||
#define LK_NBLCK _LK_NBLCK
|
||||
#define LK_RLCK _LK_RLCK
|
||||
#define LK_NBRLCK _LK_NBRLCK
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,139 +1,122 @@
|
|||
/*
|
||||
* stat.h
|
||||
*
|
||||
* Symbolic constants for opening and creating files, also stat, fstat and
|
||||
* chmod functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_STAT
|
||||
#define _INC_STAT
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#ifndef _STAT_H_
|
||||
#define _STAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <io.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for the stat st_mode member.
|
||||
*/
|
||||
#define _S_IFIFO 0x1000 /* FIFO */
|
||||
#define _S_IFCHR 0x2000 /* Character */
|
||||
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
||||
#define _S_IFDIR 0x4000 /* Directory */
|
||||
#define _S_IFREG 0x8000 /* Regular */
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _S_IFMT 0xF000 /* File type mask */
|
||||
#ifndef _TIME32_T_DEFINED
|
||||
typedef long __time32_t;
|
||||
#define _TIME32_T_DEFINED
|
||||
#endif
|
||||
|
||||
#define _S_IEXEC 0x0040
|
||||
#define _S_IWRITE 0x0080
|
||||
#define _S_IREAD 0x0100
|
||||
#ifndef _TIME64_T_DEFINED
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
typedef __int64 __time64_t;
|
||||
#endif
|
||||
#define _TIME64_T_DEFINED
|
||||
#endif
|
||||
|
||||
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
||||
#define _S_IXUSR _S_IEXEC
|
||||
#define _S_IWUSR _S_IWRITE
|
||||
#define _S_IRUSR _S_IREAD
|
||||
#ifndef _TIME_T_DEFINED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
||||
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
|
||||
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
|
||||
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#define S_IFIFO _S_IFIFO
|
||||
#define S_IFCHR _S_IFCHR
|
||||
#define S_IFBLK _S_IFBLK
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFREG _S_IFREG
|
||||
#define S_IFMT _S_IFMT
|
||||
#define S_IEXEC _S_IEXEC
|
||||
#define S_IWRITE _S_IWRITE
|
||||
#define S_IREAD _S_IREAD
|
||||
#define S_IRWXU _S_IRWXU
|
||||
#define S_IXUSR _S_IXUSR
|
||||
#define S_IWUSR _S_IWUSR
|
||||
#define S_IRUSR _S_IRUSR
|
||||
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _STAT_DEFINED
|
||||
/*
|
||||
* The structure manipulated and returned by stat and fstat.
|
||||
*
|
||||
* NOTE: If called on a directory the values in the time fields are not only
|
||||
* invalid, they will cause localtime et. al. to return NULL. And calling
|
||||
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
||||
*/
|
||||
struct _stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
|
||||
struct stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
#if defined (__MSVCRT__)
|
||||
struct _stati64 {
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifndef _WIN64
|
||||
#define _fstat32 _fstat
|
||||
#define _stat32 _stat
|
||||
#define _wstat32 _wstat
|
||||
#else
|
||||
#define _fstat _fstat32
|
||||
#define _stat _stat32
|
||||
#define _wstat _wstat32
|
||||
#endif
|
||||
#define _fstati64 _fstat32i64
|
||||
#define _stati64 _stat32i64
|
||||
#define _wstati64 _wstat32i64
|
||||
#else
|
||||
#define _fstat _fstat64i32
|
||||
#define _fstati64 _fstat64
|
||||
#define _stat _stat64i32
|
||||
#define _stati64 _stat64
|
||||
#define _wstat _wstat64i32
|
||||
#define _wstati64 _wstat64
|
||||
#endif
|
||||
|
||||
struct _stat32 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
_off_t st_size;
|
||||
__time32_t st_atime;
|
||||
__time32_t st_mtime;
|
||||
__time32_t st_ctime;
|
||||
};
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
struct stat {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
_off_t st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
struct _stat32i64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
|
@ -142,49 +125,164 @@ struct _stati64 {
|
|||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
__time32_t st_atime;
|
||||
__time32_t st_mtime;
|
||||
__time32_t st_ctime;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
struct _stat64i32 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
_off_t st_size;
|
||||
__time64_t st_atime;
|
||||
__time64_t st_mtime;
|
||||
__time64_t st_ctime;
|
||||
};
|
||||
|
||||
struct _stat64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
__time64_t st_atime;
|
||||
__time64_t st_mtime;
|
||||
__time64_t st_ctime;
|
||||
};
|
||||
#endif
|
||||
|
||||
int _fstat (int, struct _stat*);
|
||||
int _chmod (const char*, int);
|
||||
int _stat (const char*, struct _stat*);
|
||||
#define __stat64 _stat64
|
||||
|
||||
#if defined (__MSVCRT__)
|
||||
int _fstati64(int, struct _stati64 *);
|
||||
int _stati64(const char *, struct _stati64 *);
|
||||
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
|
||||
int _wstat(const wchar_t*, struct _stat*);
|
||||
int _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#define _STAT_DEFINED
|
||||
#endif
|
||||
|
||||
#define _S_IFMT 0xF000
|
||||
#define _S_IFDIR 0x4000
|
||||
#define _S_IFCHR 0x2000
|
||||
#define _S_IFIFO 0x1000
|
||||
#define _S_IFREG 0x8000
|
||||
#define _S_IREAD 0x0100
|
||||
#define _S_IWRITE 0x0080
|
||||
#define _S_IEXEC 0x0040
|
||||
|
||||
_CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
|
||||
_CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
|
||||
_CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
|
||||
int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
|
||||
__CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
|
||||
{
|
||||
struct _stat64 st;
|
||||
int ret=_fstat64(_FileDes,&st);
|
||||
_Stat->st_dev=st.st_dev;
|
||||
_Stat->st_ino=st.st_ino;
|
||||
_Stat->st_mode=st.st_mode;
|
||||
_Stat->st_nlink=st.st_nlink;
|
||||
_Stat->st_uid=st.st_uid;
|
||||
_Stat->st_gid=st.st_gid;
|
||||
_Stat->st_rdev=st.st_rdev;
|
||||
_Stat->st_size=(_off_t) st.st_size;
|
||||
_Stat->st_atime=st.st_atime;
|
||||
_Stat->st_mtime=st.st_mtime;
|
||||
_Stat->st_ctime=st.st_ctime;
|
||||
return ret;
|
||||
}
|
||||
_CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
|
||||
_CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
|
||||
int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
|
||||
__CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
|
||||
{
|
||||
struct _stat64 st;
|
||||
int ret=_stat64(_Name,&st);
|
||||
_Stat->st_dev=st.st_dev;
|
||||
_Stat->st_ino=st.st_ino;
|
||||
_Stat->st_mode=st.st_mode;
|
||||
_Stat->st_nlink=st.st_nlink;
|
||||
_Stat->st_uid=st.st_uid;
|
||||
_Stat->st_gid=st.st_gid;
|
||||
_Stat->st_rdev=st.st_rdev;
|
||||
_Stat->st_size=(_off_t) st.st_size;
|
||||
_Stat->st_atime=st.st_atime;
|
||||
_Stat->st_mtime=st.st_mtime;
|
||||
_Stat->st_ctime=st.st_ctime;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef _WSTAT_DEFINED
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* _WSTAT_DEFIND */
|
||||
#endif /* __MSVCRT__ */
|
||||
_CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
|
||||
int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
|
||||
_CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#ifndef NO_OLDNAMES
|
||||
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
||||
|
||||
/* These functions live in liboldnames.a. */
|
||||
int fstat (int, struct stat*);
|
||||
int chmod (const char*, int);
|
||||
int stat (const char*, struct stat*);
|
||||
#define S_IFMT _S_IFMT
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFCHR _S_IFCHR
|
||||
#define S_IFREG _S_IFREG
|
||||
#define S_IREAD _S_IREAD
|
||||
#define S_IWRITE _S_IWRITE
|
||||
#define S_IEXEC _S_IEXEC
|
||||
#define S_IFIFO _S_IFIFO
|
||||
#define S_IFBLK _S_IFBLK
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
||||
#define _S_IXUSR _S_IEXEC
|
||||
#define _S_IWUSR _S_IWRITE
|
||||
|
||||
#define S_IRWXU _S_IRWXU
|
||||
#define S_IXUSR _S_IXUSR
|
||||
#define S_IWUSR _S_IWUSR
|
||||
#define S_IRUSR _S_IRUSR
|
||||
#define _S_IRUSR _S_IREAD
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
|
||||
int __cdecl stat(const char *_Filename,struct stat *_Stat);
|
||||
int __cdecl fstat(int _Desc,struct stat *_Stat);
|
||||
int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
|
||||
return _fstat32(_Desc,(struct _stat32 *)_Stat);
|
||||
}
|
||||
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
|
||||
return _stat32(_Filename,(struct _stat32 *)_Stat);
|
||||
}
|
||||
#else
|
||||
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
|
||||
return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
|
||||
}
|
||||
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
|
||||
return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STAT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,69 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TIME_H_
|
||||
#define _SYS_TIME_H_
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
|
||||
#define _TIMEVAL_DEFINED
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
|
||||
#define timercmp(tvp, uvp, cmp) \
|
||||
(((tvp)->tv_sec != (uvp)->tv_sec) ? \
|
||||
((tvp)->tv_sec cmp (uvp)->tv_sec) : \
|
||||
((tvp)->tv_usec cmp (uvp)->tv_usec))
|
||||
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
|
||||
#endif /* _TIMEVAL_DEFINED */
|
||||
|
||||
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
|
||||
#define _TIMEZONE_DEFINED
|
||||
/* Provided for compatibility with code that assumes that
|
||||
the presence of gettimeofday function implies a definition
|
||||
of struct timezone. */
|
||||
struct timezone
|
||||
{
|
||||
int tz_minuteswest; /* of Greenwich */
|
||||
int tz_dsttime; /* type of dst correction to apply */
|
||||
};
|
||||
|
||||
extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
Implementation as per:
|
||||
The Open Group Base Specifications, Issue 6
|
||||
IEEE Std 1003.1, 2004 Edition
|
||||
|
||||
The timezone pointer arg is ignored. Errors are ignored.
|
||||
*/
|
||||
#ifndef _GETTIMEOFDAY_DEFINED
|
||||
#define _GETTIMEOFDAY_DEFINED
|
||||
int __cdecl gettimeofday(struct timeval *__restrict__,
|
||||
void *__restrict__ /* tzp (unused) */);
|
||||
#endif
|
||||
|
||||
#endif /* __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Adding timespec definition. */
|
||||
#include <sys/timeb.h>
|
||||
|
||||
|
||||
#endif /* _SYS_TIME_H_ */
|
||||
|
|
|
@ -1,82 +1,130 @@
|
|||
/*
|
||||
* timeb.h
|
||||
*
|
||||
* Support for the UNIX System V ftime system call.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _TIMEB_H_
|
||||
#define _TIMEB_H_
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _TIMEB_H_
|
||||
#define _TIMEB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct _timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TODO: Not tested. */
|
||||
void _ftime (struct _timeb*);
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
void ftime (struct timeb*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef _TIME32_T_DEFINED
|
||||
typedef long __time32_t;
|
||||
#define _TIME32_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _TIME64_T_DEFINED
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
typedef __int64 __time64_t;
|
||||
#endif
|
||||
#define _TIME64_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _TIMEB_DEFINED
|
||||
#define _TIMEB_DEFINED
|
||||
|
||||
struct __timeb32 {
|
||||
__time32_t time;
|
||||
unsigned short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
struct timeb {
|
||||
time_t time;
|
||||
unsigned short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
struct __timeb64 {
|
||||
__time64_t time;
|
||||
unsigned short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _timeb __timeb32
|
||||
#define _ftime _ftime32
|
||||
#else
|
||||
#define _timeb __timeb64
|
||||
#define _ftime _ftime64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
|
||||
#endif
|
||||
|
||||
#ifndef _TIMESPEC_DEFINED
|
||||
#define _TIMESPEC_DEFINED
|
||||
struct timespec {
|
||||
time_t tv_sec; /* Seconds */
|
||||
long tv_nsec; /* Nanoseconds */
|
||||
};
|
||||
|
||||
struct itimerspec {
|
||||
struct timespec it_interval; /* Timer period */
|
||||
struct timespec it_value; /* Timer expiration */
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
|
||||
_ftime32((struct __timeb32 *)_Tmb);
|
||||
}
|
||||
#else
|
||||
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
|
||||
_ftime64((struct __timeb64 *)_Tmb);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TIMEB_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#pragma pack(pop)
|
||||
|
||||
#include <sec_api/sys/timeb_s.h>
|
||||
#endif
|
||||
|
|
|
@ -1,118 +1,116 @@
|
|||
/*
|
||||
* types.h
|
||||
*
|
||||
* The definition of constants, data types and global variables.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
* Lots of types supplied by Pedro A. Aranda <paag@tid.es>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warrenties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_TYPES
|
||||
#define _INC_TYPES
|
||||
|
||||
#ifndef _TYPES_H_
|
||||
#define _TYPES_H_
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#define __need_ptrdiff_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifndef _TIME32_T_DEFINED
|
||||
#define _TIME32_T_DEFINED
|
||||
typedef long __time32_t;
|
||||
#endif
|
||||
|
||||
#ifndef _TIME64_T_DEFINED
|
||||
#define _TIME64_T_DEFINED
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
typedef __int64 __time64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _off_t off_t;
|
||||
#endif
|
||||
#endif /* Not _OFF_T_ */
|
||||
|
||||
|
||||
#ifndef _DEV_T_
|
||||
#define _DEV_T_
|
||||
#ifdef __MSVCRT__
|
||||
typedef unsigned int _dev_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef short _dev_t;
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _dev_t dev_t;
|
||||
#ifndef _INO_T_DEFINED
|
||||
#define _INO_T_DEFINED
|
||||
typedef unsigned short _ino_t;
|
||||
#ifndef NO_OLDNAMES
|
||||
typedef unsigned short ino_t;
|
||||
#endif
|
||||
#endif /* Not _DEV_T_ */
|
||||
|
||||
|
||||
#ifndef _INO_T_
|
||||
#define _INO_T_
|
||||
typedef short _ino_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _ino_t ino_t;
|
||||
#endif
|
||||
#endif /* Not _INO_T_ */
|
||||
|
||||
#ifndef _DEV_T_DEFINED
|
||||
#define _DEV_T_DEFINED
|
||||
typedef unsigned int _dev_t;
|
||||
#ifndef NO_OLDNAMES
|
||||
typedef unsigned int dev_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PID_T_
|
||||
#define _PID_T_
|
||||
#ifndef _WIN64
|
||||
typedef int _pid_t;
|
||||
#else
|
||||
typedef __int64 _pid_t;
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#ifndef NO_OLDNAMES
|
||||
typedef _pid_t pid_t;
|
||||
#endif
|
||||
#endif /* Not _PID_T_ */
|
||||
|
||||
|
||||
#ifndef _MODE_T_
|
||||
#define _MODE_T_
|
||||
typedef unsigned short _mode_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#ifndef NO_OLDNAMES
|
||||
typedef _mode_t mode_t;
|
||||
#endif
|
||||
#endif /* Not _MODE_T_ */
|
||||
|
||||
|
||||
#ifndef _SIGSET_T_
|
||||
#define _SIGSET_T_
|
||||
typedef int _sigset_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _sigset_t sigset_t;
|
||||
#ifndef _OFF_T_DEFINED
|
||||
#define _OFF_T_DEFINED
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif /* Not _SIGSET_T_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _OFF64_T_DEFINED
|
||||
#define _OFF64_T_DEFINED
|
||||
typedef long long _off64_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
typedef long long off64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#ifndef _TIMESPEC_DEFINED
|
||||
#define _TIMESPEC_DEFINED
|
||||
struct timespec {
|
||||
time_t tv_sec; /* Seconds */
|
||||
long tv_nsec; /* Nanoseconds */
|
||||
};
|
||||
|
||||
#endif /* Not _TYPES_H_ */
|
||||
struct itimerspec {
|
||||
struct timespec it_interval; /* Timer period */
|
||||
struct timespec it_value; /* Timer expiration */
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
|
|
|
@ -1,89 +1,144 @@
|
|||
/*
|
||||
* utime.h
|
||||
*
|
||||
* Support for the utime function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_UTIME
|
||||
#define _INC_UTIME
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#ifndef _UTIME_H_
|
||||
#define _UTIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
#include <sys/types.h>
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* Structure used by _utime function.
|
||||
*/
|
||||
struct _utimbuf
|
||||
{
|
||||
time_t actime; /* Access time */
|
||||
time_t modtime; /* Modification time */
|
||||
};
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/* NOTE: Must be the same as _utimbuf above. */
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _utime (const char*, struct _utimbuf*);
|
||||
int _futime (int, struct _utimbuf*);
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
/* The wide character version, only available for MSVCRT versions of the
|
||||
* C runtime library. */
|
||||
#ifdef __MSVCRT__
|
||||
int _wutime (const wchar_t*, struct _utimbuf*);
|
||||
#endif /* MSVCRT runtime */
|
||||
#ifndef _NO_OLDNAMES
|
||||
int utime (const char*, struct utimbuf*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _TIME32_T_DEFINED
|
||||
#define _TIME32_T_DEFINED
|
||||
typedef long __time32_t;
|
||||
#endif
|
||||
|
||||
#ifndef _TIME64_T_DEFINED
|
||||
#define _TIME64_T_DEFINED
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
typedef __int64 __time64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
#define _TIME_T_DEFINED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _UTIMBUF_DEFINED
|
||||
#define _UTIMBUF_DEFINED
|
||||
|
||||
struct _utimbuf {
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
|
||||
struct __utimbuf32 {
|
||||
__time32_t actime;
|
||||
__time32_t modtime;
|
||||
};
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
struct __utimbuf64 {
|
||||
__time64_t actime;
|
||||
__time64_t modtime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
struct utimbuf {
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
|
||||
struct utimbuf32 {
|
||||
__time32_t actime;
|
||||
__time32_t modtime;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time);
|
||||
_CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time);
|
||||
_CRTIMP int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Time);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP int __cdecl _utime64(const char *_Filename,struct __utimbuf64 *_Time);
|
||||
_CRTIMP int __cdecl _futime64(int _FileDes,struct __utimbuf64 *_Time);
|
||||
_CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
|
||||
#endif
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
|
||||
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
|
||||
return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
|
||||
return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
||||
}
|
||||
#else
|
||||
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
|
||||
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
|
||||
return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
|
||||
return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#ifndef NO_OLDNAMES
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
|
||||
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
||||
}
|
||||
#else
|
||||
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
|
||||
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* Not _UTIME_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,219 +1,286 @@
|
|||
/*
|
||||
* time.h
|
||||
*
|
||||
* Date and time functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* Need a definition of time_t.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Number of clock ticks per second. A clock tick is the unit by which
|
||||
* processor time is measured and is returned by 'clock'.
|
||||
*/
|
||||
#define CLOCKS_PER_SEC ((clock_t)1000)
|
||||
#define CLK_TCK CLOCKS_PER_SEC
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* A type for storing the current time and date. This is the number of
|
||||
* seconds since midnight Jan 1, 1970.
|
||||
* NOTE: Normally this is defined by the above include of sys/types.h
|
||||
*/
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A type for measuring processor time (in clock ticks).
|
||||
*/
|
||||
#ifndef _CLOCK_T_DEFINED
|
||||
typedef long clock_t;
|
||||
#define _CLOCK_T_DEFINED
|
||||
#endif
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
/*
|
||||
* A structure for storing all kinds of useful information about the
|
||||
* current (or another) time.
|
||||
*/
|
||||
struct tm
|
||||
{
|
||||
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
|
||||
int tm_min; /* Minutes: 0-59 */
|
||||
int tm_hour; /* Hours since midnight: 0-23 */
|
||||
int tm_mday; /* Day of the month: 1-31 */
|
||||
int tm_mon; /* Months *since* january: 0-11 */
|
||||
int tm_year; /* Years since 1900 */
|
||||
int tm_wday; /* Days since Sunday (0-6) */
|
||||
int tm_yday; /* Days since Jan. 1: 0-365 */
|
||||
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
|
||||
* -1 don't know */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
clock_t clock (void);
|
||||
time_t time (time_t*);
|
||||
double difftime (time_t, time_t);
|
||||
time_t mktime (struct tm*);
|
||||
|
||||
/*
|
||||
* These functions write to and return pointers to static buffers that may
|
||||
* be overwritten by other function calls. Yikes!
|
||||
*
|
||||
* NOTE: localtime, and perhaps the others of the four functions grouped
|
||||
* below may return NULL if their argument is not 'acceptable'. Also note
|
||||
* that calling asctime with a NULL pointer will produce an Invalid Page
|
||||
* Fault and crap out your program. Guess how I know. Hint: stat called on
|
||||
* a directory gives 'invalid' times in st_atime etc...
|
||||
*/
|
||||
char* asctime (const struct tm*);
|
||||
char* ctime (const time_t*);
|
||||
struct tm* gmtime (const time_t*);
|
||||
struct tm* localtime (const time_t*);
|
||||
|
||||
|
||||
size_t strftime (char*, size_t, const char*, const struct tm*);
|
||||
|
||||
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
extern void _tzset (void);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
extern void tzset (void);
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
size_t strftime(char*, size_t, const char*, const struct tm*);
|
||||
char* _strdate(char*);
|
||||
char* _strtime(char*);
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
#define _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#endif
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
#ifndef _TIME32_T_DEFINED
|
||||
#define _TIME32_T_DEFINED
|
||||
typedef long __time32_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* _daylight: non zero if daylight savings time is used.
|
||||
* _timezone: difference in seconds between GMT and local time.
|
||||
* _tzname: standard/daylight savings time zone names (an array with two
|
||||
* elements).
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
#ifndef _TIME64_T_DEFINED
|
||||
#define _TIME64_T_DEFINED
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int _time64_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 __time64_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
|
||||
extern int* __p__daylight (void);
|
||||
extern long* __p__timezone (void);
|
||||
extern char** __p__tzname (void);
|
||||
#ifndef _TIME_T_DEFINED
|
||||
#define _TIME_T_DEFINED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
typedef __time32_t time_t;
|
||||
#else
|
||||
typedef __time64_t time_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__MINGW_IMPORT int _daylight;
|
||||
__MINGW_IMPORT long _timezone;
|
||||
__MINGW_IMPORT char *_tzname[2];
|
||||
#ifndef _CLOCK_T_DEFINED
|
||||
#define _CLOCK_T_DEFINED
|
||||
typedef long clock_t;
|
||||
#endif
|
||||
|
||||
#else /* not __MSVCRT (ie. crtdll) */
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
#define _SIZE_T_DEFINED
|
||||
#undef size_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef unsigned int size_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef unsigned __int64 size_t;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
#ifndef _SSIZE_T_DEFINED
|
||||
#define _SSIZE_T_DEFINED
|
||||
#undef ssize_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int ssize_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 ssize_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int* __imp__daylight_dll;
|
||||
extern long* __imp__timezone_dll;
|
||||
extern char** __imp__tzname;
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _daylight (*__imp__daylight_dll)
|
||||
#define _timezone (*__imp__timezone_dll)
|
||||
#define _tzname (__imp__tzname)
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _localtime32 localtime
|
||||
#define _difftime32 difftime
|
||||
#define _ctime32 ctime
|
||||
#define _gmtime32 gmtime
|
||||
#define _mktime32 mktime
|
||||
#define _time32 time
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
#ifndef _TM_DEFINED
|
||||
#define _TM_DEFINED
|
||||
struct tm {
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
int tm_hour;
|
||||
int tm_mday;
|
||||
int tm_mon;
|
||||
int tm_year;
|
||||
int tm_wday;
|
||||
int tm_yday;
|
||||
int tm_isdst;
|
||||
};
|
||||
#endif
|
||||
|
||||
__MINGW_IMPORT int _daylight_dll;
|
||||
__MINGW_IMPORT long _timezone_dll;
|
||||
__MINGW_IMPORT char* _tzname[2];
|
||||
#define CLOCKS_PER_SEC 1000
|
||||
|
||||
#define _daylight _daylight_dll
|
||||
#define _timezone _timezone_dll
|
||||
//!__TINYC__: __MINGW_IMPORT int _daylight;
|
||||
//!__TINYC__: __MINGW_IMPORT long _dstbias;
|
||||
//!__TINYC__: __MINGW_IMPORT long _timezone;
|
||||
//!__TINYC__: __MINGW_IMPORT char * _tzname[2];
|
||||
_CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
|
||||
_CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
|
||||
_CRTIMP errno_t __cdecl _get_timezone(long *_Timezone);
|
||||
_CRTIMP errno_t __cdecl _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index);
|
||||
char *__cdecl asctime(const struct tm *_Tm);
|
||||
_CRTIMP char *__cdecl _ctime32(const __time32_t *_Time);
|
||||
clock_t __cdecl clock(void);
|
||||
_CRTIMP double __cdecl _difftime32(__time32_t _Time1,__time32_t _Time2);
|
||||
_CRTIMP struct tm *__cdecl _gmtime32(const __time32_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl _localtime32(const __time32_t *_Time);
|
||||
size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,const char *_Format,const struct tm *_Tm);
|
||||
_CRTIMP size_t __cdecl _strftime_l(char *_Buf,size_t _Max_size,const char *_Format,const struct tm *_Tm,_locale_t _Locale);
|
||||
_CRTIMP char *__cdecl _strdate(char *_Buffer);
|
||||
_CRTIMP char *__cdecl _strtime(char *_Buffer);
|
||||
_CRTIMP __time32_t __cdecl _time32(__time32_t *_Time);
|
||||
_CRTIMP __time32_t __cdecl _mktime32(struct tm *_Tm);
|
||||
_CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm);
|
||||
#if defined (_POSIX_) || defined(__GNUC__)
|
||||
void __cdecl tzset(void);
|
||||
#else
|
||||
_CRTIMP void __cdecl _tzset(void);
|
||||
#endif
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2);
|
||||
_CRTIMP char *__cdecl _ctime64(const __time64_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl _gmtime64(const __time64_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl _localtime64(const __time64_t *_Time);
|
||||
_CRTIMP __time64_t __cdecl _mktime64(struct tm *_Tm);
|
||||
_CRTIMP __time64_t __cdecl _mkgmtime64(struct tm *_Tm);
|
||||
_CRTIMP __time64_t __cdecl _time64(__time64_t *_Time);
|
||||
#endif
|
||||
unsigned __cdecl _getsystime(struct tm *_Tm);
|
||||
unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
#define _SIZE_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef unsigned int size_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef unsigned __int64 size_t;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
/* These go in the oldnames import library for MSVCRT. */
|
||||
__MINGW_IMPORT int daylight;
|
||||
__MINGW_IMPORT long timezone;
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
#ifndef _SSIZE_T_DEFINED
|
||||
#define _SSIZE_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int ssize_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 ssize_t;
|
||||
#endif
|
||||
#else
|
||||
typedef long ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WTIME_DEFINED
|
||||
_CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
|
||||
_CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
|
||||
size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
|
||||
_CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
|
||||
_CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
|
||||
_CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
|
||||
#endif
|
||||
|
||||
/* wide function prototypes, also declared in wchar.h */
|
||||
|
||||
wchar_t * _wasctime(const struct tm*);
|
||||
wchar_t * _wctime(const time_t*);
|
||||
wchar_t* _wstrdate(wchar_t*);
|
||||
wchar_t* _wstrtime(wchar_t*);
|
||||
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
|
||||
#define _INC_WTIME_INL
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
|
||||
#else
|
||||
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _WTIME_DEFINED
|
||||
#endif /* _WTIME_DEFINED */
|
||||
#endif
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
double __cdecl difftime(time_t _Time1,time_t _Time2);
|
||||
char *__cdecl ctime(const time_t *_Time);
|
||||
struct tm *__cdecl gmtime(const time_t *_Time);
|
||||
struct tm *__cdecl localtime(const time_t *_Time);
|
||||
struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *);
|
||||
|
||||
#else /* not __MSVCRT__ */
|
||||
time_t __cdecl mktime(struct tm *_Tm);
|
||||
time_t __cdecl _mkgmtime(struct tm *_Tm);
|
||||
time_t __cdecl time(time_t *_Time);
|
||||
|
||||
/* CRTDLL is royally messed up when it comes to these macros.
|
||||
TODO: import and alias these via oldnames import library instead
|
||||
of macros. */
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#if 0
|
||||
__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime32(_Time1,_Time2); }
|
||||
__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime32(_Time); }
|
||||
__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime32(_Time); }
|
||||
__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime32(_Time); }
|
||||
__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime32(_Tm); }
|
||||
__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime32(_Tm); }
|
||||
__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time32(_Time); }
|
||||
#endif
|
||||
#else
|
||||
__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); }
|
||||
__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime64(_Time); }
|
||||
__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime64(_Time); }
|
||||
__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime64(_Time); }
|
||||
__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime64(_Tm); }
|
||||
__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); }
|
||||
__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define daylight _daylight
|
||||
/* NOTE: timezone not defined because it would conflict with sys/timeb.h.
|
||||
Also, tzname used to a be macro, but now it's in moldname. */
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
#define CLK_TCK CLOCKS_PER_SEC
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
_CRTIMP extern int daylight;
|
||||
_CRTIMP extern long timezone;
|
||||
_CRTIMP extern char *tzname[2];
|
||||
void __cdecl tzset(void);
|
||||
#endif
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
|
||||
#define _TIMEVAL_DEFINED
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
|
||||
#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)
|
||||
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
|
||||
#endif /* _TIMEVAL_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
|
||||
#define _TIMEZONE_DEFINED
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
|
||||
extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
|
||||
#endif
|
||||
#endif /* __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* Not _TIME_H_ */
|
||||
#include <sec_api/time_s.h>
|
||||
|
||||
/* Adding timespec definition. */
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#endif /* End _TIME_H_ */
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
|
@ -5,6 +10,31 @@
|
|||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
|
||||
#define __UNISTD_GETOPT__
|
||||
#include <getopt.h>
|
||||
#undef __UNISTD_GETOPT__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef FTRUNCATE_DEFINED
|
||||
#define FTRUNCATE_DEFINED
|
||||
/* This is defined as a real library function to allow autoconf
|
||||
to verify its existence. */
|
||||
int ftruncate(int, off_t);
|
||||
__CRT_INLINE int ftruncate(int __fd, off_t __length)
|
||||
{
|
||||
return _chsize (__fd, __length);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
11
win32/include/vadefs.h
Normal file
11
win32/include/vadefs.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_VADEFS
|
||||
#define _INC_VADEFS
|
||||
|
||||
//!__TINYC__: GNUC specific stuff removed
|
||||
|
||||
#endif
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef _VARARGS_H
|
||||
#define _VARARGS_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define va_dcl
|
||||
#define va_alist __va_alist
|
||||
#undef va_start
|
||||
#define va_start(ap) ap = __builtin_varargs_start
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,127 +1,172 @@
|
|||
/*
|
||||
* wctype.h
|
||||
*
|
||||
* Functions for testing wide character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Mumit Khan <khan@xraylith.wisc.edu>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _INC_WCTYPE
|
||||
#define _INC_WCTYPE
|
||||
|
||||
#ifndef _WCTYPE_H_
|
||||
#define _WCTYPE_H_
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
typedef unsigned short wint_t;
|
||||
typedef unsigned short wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Wide character equivalents - also in ctype.h */
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
|
||||
int isleadbyte (int);
|
||||
|
||||
/* Also in ctype.h */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#ifndef WEOF
|
||||
#define WEOF (wint_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
#ifndef _CRT_CTYPEDATA_DEFINED
|
||||
#define _CRT_CTYPEDATA_DEFINED
|
||||
#ifndef _CTYPE_DISABLE_MACROS
|
||||
|
||||
#ifndef __PCTYPE_FUNC
|
||||
#define __PCTYPE_FUNC __pctype_func()
|
||||
#ifdef _MSVCRT_
|
||||
#define __pctype_func() (_pctype)
|
||||
#else
|
||||
#define __pctype_func() (*_imp___pctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef wchar_t wctrans_t;
|
||||
wint_t towctrans(wint_t, wctrans_t);
|
||||
wctrans_t wctrans(const char*);
|
||||
wctype_t wctype(const char*);
|
||||
#ifndef _pctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned short *_pctype;
|
||||
#else
|
||||
extern unsigned short **_imp___pctype;
|
||||
#define _pctype (*_imp___pctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_WCTYPEDATA_DEFINED
|
||||
#define _CRT_WCTYPEDATA_DEFINED
|
||||
#ifndef _CTYPE_DISABLE_MACROS
|
||||
#ifndef _wctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned short *_wctype;
|
||||
#else
|
||||
extern unsigned short **_imp___wctype;
|
||||
#define _wctype (*_imp___wctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _pwctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned short *_pwctype;
|
||||
#else
|
||||
extern unsigned short **_imp___pwctype;
|
||||
#define _pwctype (*_imp___pwctype)
|
||||
#define __pwctype_func() (*_imp___pwctype)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _UPPER 0x1
|
||||
#define _LOWER 0x2
|
||||
#define _DIGIT 0x4
|
||||
#define _SPACE 0x8
|
||||
|
||||
#define _PUNCT 0x10
|
||||
#define _CONTROL 0x20
|
||||
#define _BLANK 0x40
|
||||
#define _HEX 0x80
|
||||
|
||||
#define _LEADBYTE 0x8000
|
||||
#define _ALPHA (0x0100|_UPPER|_LOWER)
|
||||
|
||||
#ifndef _WCTYPE_DEFINED
|
||||
#define _WCTYPE_DEFINED
|
||||
|
||||
int __cdecl iswalpha(wint_t);
|
||||
int __cdecl iswupper(wint_t);
|
||||
int __cdecl iswlower(wint_t);
|
||||
int __cdecl iswdigit(wint_t);
|
||||
int __cdecl iswxdigit(wint_t);
|
||||
int __cdecl iswspace(wint_t);
|
||||
int __cdecl iswpunct(wint_t);
|
||||
int __cdecl iswalnum(wint_t);
|
||||
int __cdecl iswprint(wint_t);
|
||||
int __cdecl iswgraph(wint_t);
|
||||
int __cdecl iswcntrl(wint_t);
|
||||
int __cdecl iswascii(wint_t);
|
||||
int __cdecl isleadbyte(int);
|
||||
wint_t __cdecl towupper(wint_t);
|
||||
wint_t __cdecl towlower(wint_t);
|
||||
int __cdecl iswctype(wint_t,wctype_t);
|
||||
_CRTIMP int __cdecl __iswcsymf(wint_t);
|
||||
_CRTIMP int __cdecl __iswcsym(wint_t);
|
||||
int __cdecl is_wctype(wint_t,wctype_t);
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
|
||||
int __cdecl isblank(int _C);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_INLINE_DEFINED
|
||||
#define _WCTYPE_INLINE_DEFINED
|
||||
#ifndef __cplusplus
|
||||
#define iswalpha(_c) (iswctype(_c,_ALPHA))
|
||||
#define iswupper(_c) (iswctype(_c,_UPPER))
|
||||
#define iswlower(_c) (iswctype(_c,_LOWER))
|
||||
#define iswdigit(_c) (iswctype(_c,_DIGIT))
|
||||
#define iswxdigit(_c) (iswctype(_c,_HEX))
|
||||
#define iswspace(_c) (iswctype(_c,_SPACE))
|
||||
#define iswpunct(_c) (iswctype(_c,_PUNCT))
|
||||
#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
|
||||
#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
|
||||
#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
|
||||
#define iswcntrl(_c) (iswctype(_c,_CONTROL))
|
||||
#define iswascii(_c) ((unsigned)(_c) < 0x80)
|
||||
#define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
|
||||
#else
|
||||
__CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); }
|
||||
__CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); }
|
||||
__CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); }
|
||||
__CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); }
|
||||
__CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); }
|
||||
__CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); }
|
||||
__CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); }
|
||||
__CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); }
|
||||
__CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); }
|
||||
__CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); }
|
||||
__CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); }
|
||||
__CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); }
|
||||
__CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef wchar_t wctrans_t;
|
||||
wint_t __cdecl towctrans(wint_t,wctrans_t);
|
||||
wctrans_t __cdecl wctrans(const char *);
|
||||
wctype_t __cdecl wctype(const char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _WCTYPE_H_ */
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
|
|
@ -1,119 +1,149 @@
|
|||
#ifndef _BASETSD_H
|
||||
#define _BASETSD_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _BASETSD_H_
|
||||
#define _BASETSD_H_
|
||||
|
||||
#if (defined(__x86_64) || defined(__ia64__)) && !defined(RC_INVOKED)
|
||||
typedef unsigned __int64 POINTER_64_INT;
|
||||
#else
|
||||
typedef unsigned long POINTER_64_INT;
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef __int64
|
||||
#define __int64 long long
|
||||
#endif
|
||||
#endif
|
||||
#define POINTER_32
|
||||
#define POINTER_64
|
||||
#define FIRMWARE_PTR
|
||||
|
||||
#if defined(_WIN64)
|
||||
#define __int3264 __int64
|
||||
#define ADDRESS_TAG_BIT 0x40000000000UI64
|
||||
#else /* !_WIN64 */
|
||||
#define __int3264 __int32
|
||||
#define ADDRESS_TAG_BIT 0x80000000UL
|
||||
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
|
||||
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
|
||||
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
|
||||
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
|
||||
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
|
||||
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
|
||||
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
|
||||
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
|
||||
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
|
||||
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
|
||||
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
|
||||
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
|
||||
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
|
||||
#endif /* !_WIN64 */
|
||||
|
||||
#define UlongToPtr(ul) ULongToPtr(ul)
|
||||
#define UintToPtr(ui) UIntToPtr(ui)
|
||||
#define MAXUINT_PTR (~((UINT_PTR)0))
|
||||
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
||||
#define MININT_PTR (~MAXINT_PTR)
|
||||
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
||||
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
||||
#define MINLONG_PTR (~MAXLONG_PTR)
|
||||
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
||||
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
||||
#define MINHALF_PTR (~MAXHALF_PTR)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int LONG32, *PLONG32;
|
||||
#ifndef XFree86Server
|
||||
typedef int INT32, *PINT32;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef unsigned int ULONG32, *PULONG32;
|
||||
typedef unsigned int DWORD32, *PDWORD32;
|
||||
typedef unsigned int UINT32, *PUINT32;
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef __int64 INT_PTR, *PINT_PTR;
|
||||
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
|
||||
typedef __int64 LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned __int64 HANDLE_PTR;
|
||||
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
||||
typedef int HALF_PTR, *PHALF_PTR;
|
||||
typedef signed char INT8,*PINT8;
|
||||
typedef signed short INT16,*PINT16;
|
||||
typedef signed int INT32,*PINT32;
|
||||
typedef signed __int64 INT64,*PINT64;
|
||||
typedef unsigned char UINT8,*PUINT8;
|
||||
typedef unsigned short UINT16,*PUINT16;
|
||||
typedef unsigned int UINT32,*PUINT32;
|
||||
typedef unsigned __int64 UINT64,*PUINT64;
|
||||
typedef signed int LONG32,*PLONG32;
|
||||
typedef unsigned int ULONG32,*PULONG32;
|
||||
typedef unsigned int DWORD32,*PDWORD32;
|
||||
|
||||
#if 0 /* TODO when WIN64 is here */
|
||||
inline unsigned long HandleToUlong(const void* h )
|
||||
{ return((unsigned long) h ); }
|
||||
inline long HandleToLong( const void* h )
|
||||
{ return((long) h ); }
|
||||
inline void* LongToHandle( const long h )
|
||||
{ return((void*) (INT_PTR) h ); }
|
||||
inline unsigned long PtrToUlong( const void* p)
|
||||
{ return((unsigned long) p ); }
|
||||
inline unsigned int PtrToUint( const void* p )
|
||||
{ return((unsigned int) p ); }
|
||||
inline unsigned short PtrToUshort( const void* p )
|
||||
{ return((unsigned short) p ); }
|
||||
inline long PtrToLong( const void* p )
|
||||
{ return((long) p ); }
|
||||
inline int PtrToInt( const void* p )
|
||||
{ return((int) p ); }
|
||||
inline short PtrToShort( const void* p )
|
||||
{ return((short) p ); }
|
||||
inline void* IntToPtr( const int i )
|
||||
{ return( (void*)(INT_PTR)i ); }
|
||||
inline void* UIntToPtr(const unsigned int ui)
|
||||
{ return( (void*)(UINT_PTR)ui ); }
|
||||
inline void* LongToPtr( const long l )
|
||||
{ return( (void*)(LONG_PTR)l ); }
|
||||
inline void* ULongToPtr( const unsigned long ul )
|
||||
{ return( (void*)(ULONG_PTR)ul ); }
|
||||
#endif /* 0_ */
|
||||
#ifndef _W64
|
||||
#define _W64
|
||||
#endif
|
||||
|
||||
#else /* !_WIN64 */
|
||||
typedef int INT_PTR, *PINT_PTR;
|
||||
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
||||
typedef long LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
||||
typedef short HALF_PTR, *PHALF_PTR;
|
||||
typedef unsigned long HANDLE_PTR;
|
||||
#endif /* !_WIN64 */
|
||||
#ifdef _WIN64
|
||||
typedef __int64 INT_PTR,*PINT_PTR;
|
||||
typedef unsigned __int64 UINT_PTR,*PUINT_PTR;
|
||||
typedef __int64 LONG_PTR,*PLONG_PTR;
|
||||
typedef unsigned __int64 ULONG_PTR,*PULONG_PTR;
|
||||
#define __int3264 __int64
|
||||
#else
|
||||
typedef int INT_PTR,*PINT_PTR;
|
||||
typedef unsigned int UINT_PTR,*PUINT_PTR;
|
||||
typedef long LONG_PTR,*PLONG_PTR;
|
||||
typedef unsigned long ULONG_PTR,*PULONG_PTR;
|
||||
#define __int3264 __int32
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
#define ADDRESS_TAG_BIT 0x40000000000ULL
|
||||
typedef __int64 SHANDLE_PTR;
|
||||
typedef unsigned __int64 HANDLE_PTR;
|
||||
typedef unsigned int UHALF_PTR,*PUHALF_PTR;
|
||||
typedef int HALF_PTR,*PHALF_PTR;
|
||||
|
||||
static __inline unsigned long HandleToULong(const void *h) { return((unsigned long) (ULONG_PTR) h); }
|
||||
static __inline long HandleToLong(const void *h) { return((long) (LONG_PTR) h); }
|
||||
static __inline void *ULongToHandle(const unsigned long h) { return((void *) (UINT_PTR) h); }
|
||||
static __inline void *LongToHandle(const long h) { return((void *) (INT_PTR) h); }
|
||||
static __inline unsigned long PtrToUlong(const void *p) { return((unsigned long) (ULONG_PTR) p); }
|
||||
static __inline unsigned int PtrToUint(const void *p) { return((unsigned int) (UINT_PTR) p); }
|
||||
static __inline unsigned short PtrToUshort(const void *p) { return((unsigned short) (unsigned long) (ULONG_PTR) p); }
|
||||
static __inline long PtrToLong(const void *p) { return((long) (LONG_PTR) p); }
|
||||
static __inline int PtrToInt(const void *p) { return((int) (INT_PTR) p); }
|
||||
static __inline short PtrToShort(const void *p) { return((short) (long) (LONG_PTR) p); }
|
||||
static __inline void *IntToPtr(const int i) { return((void *)(INT_PTR)i); }
|
||||
static __inline void *UIntToPtr(const unsigned int ui) { return((void *)(UINT_PTR)ui); }
|
||||
static __inline void *LongToPtr(const long l) { return((void *)(LONG_PTR)l); }
|
||||
static __inline void *ULongToPtr(const unsigned long ul) { return((void *)(ULONG_PTR)ul); }
|
||||
|
||||
#define PtrToPtr64(p) ((void *) p)
|
||||
#define Ptr64ToPtr(p) ((void *) p)
|
||||
#define HandleToHandle64(h) (PtrToPtr64(h))
|
||||
#define Handle64ToHandle(h) (Ptr64ToPtr(h))
|
||||
|
||||
static __inline void *Ptr32ToPtr(const void *p) { return (void *)p; }
|
||||
static __inline void *Handle32ToHandle(const void *h) { return((void *) h); }
|
||||
static __inline void *PtrToPtr32(const void *p) { return((void *) (ULONG_PTR) p); }
|
||||
|
||||
#define HandleToHandle32(h) (PtrToPtr32(h))
|
||||
#else
|
||||
|
||||
#define ADDRESS_TAG_BIT 0x80000000UL
|
||||
|
||||
typedef unsigned short UHALF_PTR,*PUHALF_PTR;
|
||||
typedef short HALF_PTR,*PHALF_PTR;
|
||||
typedef long SHANDLE_PTR;
|
||||
typedef unsigned long HANDLE_PTR;
|
||||
|
||||
#define HandleToULong(h) ((ULONG)(ULONG_PTR)(h))
|
||||
#define HandleToLong(h) ((LONG)(LONG_PTR) (h))
|
||||
#define ULongToHandle(ul) ((HANDLE)(ULONG_PTR) (ul))
|
||||
#define LongToHandle(h) ((HANDLE)(LONG_PTR) (h))
|
||||
#define PtrToUlong(p) ((ULONG)(ULONG_PTR) (p))
|
||||
#define PtrToLong(p) ((LONG)(LONG_PTR) (p))
|
||||
#define PtrToUint(p) ((UINT)(UINT_PTR) (p))
|
||||
#define PtrToInt(p) ((INT)(INT_PTR) (p))
|
||||
#define PtrToUshort(p) ((unsigned short)(ULONG_PTR)(p))
|
||||
#define PtrToShort(p) ((short)(LONG_PTR)(p))
|
||||
#define IntToPtr(i) ((VOID *)(INT_PTR)((int)i))
|
||||
#define UIntToPtr(ui) ((VOID *)(UINT_PTR)((unsigned int)ui))
|
||||
#define LongToPtr(l) ((VOID *)(LONG_PTR)((long)l))
|
||||
#define ULongToPtr(ul) ((VOID *)(ULONG_PTR)((unsigned long)ul))
|
||||
|
||||
static __inline void *PtrToPtr64(const void *p) { return((void *) (ULONG_PTR)p); }
|
||||
static __inline void *Ptr64ToPtr(const void *p) { return((void *) (ULONG_PTR) p); }
|
||||
static __inline void *HandleToHandle64(const void *h) { return((void *) h); }
|
||||
static __inline void *Handle64ToHandle(const void *h) { return((void *) (ULONG_PTR) h); }
|
||||
|
||||
#define Ptr32ToPtr(p) ((void *) p)
|
||||
#define Handle32ToHandle(h) (Ptr32ToPtr(h))
|
||||
#define PtrToPtr32(p) ((void *) p)
|
||||
#define HandleToHandle32(h) (PtrToPtr32(h))
|
||||
#endif
|
||||
|
||||
#define HandleToUlong(h) HandleToULong(h)
|
||||
#define UlongToHandle(ul) ULongToHandle(ul)
|
||||
#define UlongToPtr(ul) ULongToPtr(ul)
|
||||
#define UintToPtr(ui) UIntToPtr(ui)
|
||||
|
||||
#define MAXUINT_PTR (~((UINT_PTR)0))
|
||||
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
||||
#define MININT_PTR (~MAXINT_PTR)
|
||||
|
||||
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
||||
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
||||
#define MINLONG_PTR (~MAXLONG_PTR)
|
||||
|
||||
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
||||
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
||||
#define MINHALF_PTR (~MAXHALF_PTR)
|
||||
|
||||
typedef ULONG_PTR SIZE_T,*PSIZE_T;
|
||||
typedef LONG_PTR SSIZE_T,*PSSIZE_T;
|
||||
typedef ULONG_PTR DWORD_PTR,*PDWORD_PTR;
|
||||
typedef __int64 LONG64,*PLONG64;
|
||||
typedef unsigned __int64 ULONG64,*PULONG64;
|
||||
typedef unsigned __int64 DWORD64,*PDWORD64;
|
||||
typedef ULONG_PTR KAFFINITY;
|
||||
typedef KAFFINITY *PKAFFINITY;
|
||||
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
|
||||
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||
typedef __int64 LONG64, *PLONG64;
|
||||
typedef __int64 INT64, *PINT64;
|
||||
typedef unsigned __int64 ULONG64, *PULONG64;
|
||||
typedef unsigned __int64 DWORD64, *PDWORD64;
|
||||
typedef unsigned __int64 UINT64, *PUINT64;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !RC_INVOKED */
|
||||
|
||||
#endif /* _BASETSD_H */
|
||||
#endif
|
||||
|
|
|
@ -1,144 +1,85 @@
|
|||
#ifndef _BASETYPS_H
|
||||
#define _BASETYPS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !defined(_BASETYPS_H_)
|
||||
#define _BASETYPS_H_
|
||||
|
||||
#ifndef __OBJC__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif /* __cplusplus */
|
||||
#define STDMETHODCALLTYPE __stdcall
|
||||
#define STDMETHODVCALLTYPE __cdecl
|
||||
#define STDAPICALLTYPE __stdcall
|
||||
#define STDAPIVCALLTYPE __cdecl
|
||||
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
|
||||
#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
|
||||
#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
|
||||
#define STDMETHODIMP_(t) t STDMETHODCALLTYPE
|
||||
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
|
||||
#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
|
||||
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
|
||||
#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
|
||||
#define interface struct
|
||||
#endif
|
||||
|
||||
#define STDMETHODCALLTYPE WINAPI
|
||||
#define STDMETHODVCALLTYPE __cdecl
|
||||
|
||||
#define STDAPICALLTYPE WINAPI
|
||||
#define STDAPIVCALLTYPE __cdecl
|
||||
|
||||
#define STDAPI EXTERN_C HRESULT WINAPI
|
||||
#define STDAPI_(type) EXTERN_C type WINAPI
|
||||
|
||||
#define STDMETHODIMP HRESULT WINAPI
|
||||
#define STDMETHODIMP_(type) type WINAPI
|
||||
|
||||
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
|
||||
#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
|
||||
|
||||
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
|
||||
#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
|
||||
#define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
|
||||
#define PURE =0
|
||||
|
||||
#define __STRUCT__ struct
|
||||
#define STDMETHOD(method) virtual HRESULT WINAPI method
|
||||
#define STDMETHOD_(type,method) virtual type WINAPI method
|
||||
#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
|
||||
#define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
|
||||
#define PURE = 0
|
||||
#define THIS_
|
||||
#define THIS void
|
||||
/*
|
||||
__attribute__((com_interface)) is obsolete in __GNUC__ >= 3
|
||||
g++ vtables are now COM-compatible by default
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
|
||||
#define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
|
||||
#define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
|
||||
#define THIS void
|
||||
#define DECLARE_INTERFACE(iface) __STRUCT__ iface
|
||||
#define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
|
||||
#else
|
||||
#define DECLARE_INTERFACE(i) interface i
|
||||
#define DECLARE_INTERFACE_(i,b) interface i : public b
|
||||
|
||||
#ifndef __OBJC__
|
||||
#define interface struct
|
||||
#endif
|
||||
#else
|
||||
#define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
|
||||
#define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
|
||||
|
||||
#define STDMETHOD(method) HRESULT (WINAPI *method)
|
||||
#define STDMETHOD_(type,method) type (WINAPI *method)
|
||||
#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
|
||||
#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
|
||||
|
||||
#define PURE
|
||||
#define THIS_ INTERFACE *,
|
||||
#define THIS INTERFACE *
|
||||
#ifndef CONST_VTABLE
|
||||
#define CONST_VTABLE
|
||||
#endif
|
||||
#define DECLARE_INTERFACE(i) \
|
||||
typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
|
||||
typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
|
||||
CONST_VTABLE struct i##Vtbl
|
||||
#define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
|
||||
#endif
|
||||
#define BEGIN_INTERFACE
|
||||
#define END_INTERFACE
|
||||
|
||||
#define FWD_DECL(i) typedef interface i i
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define IENUM_THIS(T)
|
||||
#define IENUM_THIS_(T)
|
||||
#define THIS_ INTERFACE *This,
|
||||
#define THIS INTERFACE *This
|
||||
#ifdef CONST_VTABLE
|
||||
#define DECLARE_INTERFACE(iface) typedef struct iface { \
|
||||
const struct iface##Vtbl *lpVtbl; } iface; \
|
||||
typedef const struct iface##Vtbl iface##Vtbl; \
|
||||
const struct iface##Vtbl
|
||||
#else
|
||||
#define IENUM_THIS(T) T*
|
||||
#define IENUM_THIS_(T) T*,
|
||||
#define DECLARE_INTERFACE(iface) typedef struct iface { \
|
||||
struct iface##Vtbl *lpVtbl; \
|
||||
} iface; \
|
||||
typedef struct iface##Vtbl iface##Vtbl; \
|
||||
struct iface##Vtbl
|
||||
#endif
|
||||
#define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
|
||||
#endif
|
||||
#define DECLARE_ENUMERATOR_(I,T) \
|
||||
DECLARE_INTERFACE_(I,IUnknown) \
|
||||
{ \
|
||||
STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
|
||||
STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
|
||||
STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
|
||||
STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||
}
|
||||
#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||
|
||||
#endif /* __OBJC__ */
|
||||
#include <guiddef.h>
|
||||
|
||||
#ifndef _GUID_DEFINED /* also defined in winnt.h */
|
||||
#define _GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID,*REFGUID,*LPGUID;
|
||||
#endif /* _GUID_DEFINED */
|
||||
#ifndef UUID_DEFINED
|
||||
#define UUID_DEFINED
|
||||
typedef GUID UUID;
|
||||
#endif /* UUID_DEFINED */
|
||||
typedef GUID IID;
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
typedef IID *LPIID;
|
||||
typedef IID *REFIID;
|
||||
typedef CLSID *REFCLSID;
|
||||
typedef GUID FMTID;
|
||||
typedef FMTID *REFFMTID;
|
||||
#ifndef _ERROR_STATUS_T_DEFINED
|
||||
#define _ERROR_STATUS_T_DEFINED
|
||||
typedef unsigned long error_status_t;
|
||||
#define uuid_t UUID
|
||||
typedef unsigned long PROPID;
|
||||
#endif
|
||||
|
||||
#ifndef _REFGUID_DEFINED
|
||||
#if defined (__cplusplus) && !defined (CINTERFACE)
|
||||
#define REFGUID const GUID&
|
||||
#define REFIID const IID&
|
||||
#define REFCLSID const CLSID&
|
||||
#else
|
||||
#define REFGUID const GUID* const
|
||||
#define REFIID const IID* const
|
||||
#define REFCLSID const CLSID* const
|
||||
#endif
|
||||
#define _REFGUID_DEFINED
|
||||
#define _REFGIID_DEFINED
|
||||
#define _REFCLSID_DEFINED
|
||||
#endif
|
||||
#ifndef GUID_SECTION
|
||||
#define GUID_SECTION ".text"
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
#define GUID_SECT __attribute__ ((section (GUID_SECTION)))
|
||||
#else
|
||||
#define GUID_SECT
|
||||
#endif
|
||||
#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
|
||||
#define GUID_EXT EXTERN_C
|
||||
#else
|
||||
#define GUID_EXT
|
||||
#endif
|
||||
#ifdef INITGUID
|
||||
#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}}
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#else
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
#endif
|
||||
|
|
151
win32/include/winapi/guiddef.h
Normal file
151
win32/include/winapi/guiddef.h
Normal file
|
@ -0,0 +1,151 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef GUID_DEFINED
|
||||
#define GUID_DEFINED
|
||||
typedef struct _GUID {
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8 ];
|
||||
} GUID;
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
#ifndef DECLSPEC_SELECTANY
|
||||
#define DECLSPEC_SELECTANY __declspec(selectany)
|
||||
#endif
|
||||
|
||||
#ifndef EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_GUID
|
||||
#undef DEFINE_GUID
|
||||
#endif
|
||||
|
||||
#ifdef INITGUID
|
||||
#ifdef __cplusplus
|
||||
#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 } }
|
||||
#else
|
||||
#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 } }
|
||||
#endif
|
||||
#else
|
||||
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name
|
||||
#endif
|
||||
|
||||
#define DEFINE_OLEGUID(name,l,w1,w2) DEFINE_GUID(name,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
|
||||
#ifndef _GUIDDEF_H_
|
||||
#define _GUIDDEF_H_
|
||||
|
||||
#ifndef __LPGUID_DEFINED__
|
||||
#define __LPGUID_DEFINED__
|
||||
typedef GUID *LPGUID;
|
||||
#endif
|
||||
|
||||
#ifndef __LPCGUID_DEFINED__
|
||||
#define __LPCGUID_DEFINED__
|
||||
typedef const GUID *LPCGUID;
|
||||
#endif
|
||||
|
||||
#ifndef __IID_DEFINED__
|
||||
#define __IID_DEFINED__
|
||||
|
||||
typedef GUID IID;
|
||||
typedef IID *LPIID;
|
||||
#define IID_NULL GUID_NULL
|
||||
#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
#define CLSID_NULL GUID_NULL
|
||||
#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
|
||||
typedef GUID FMTID;
|
||||
typedef FMTID *LPFMTID;
|
||||
#define FMTID_NULL GUID_NULL
|
||||
#define IsEqualFMTID(rfmtid1,rfmtid2) IsEqualGUID(rfmtid1,rfmtid2)
|
||||
|
||||
#ifdef __midl_proxy
|
||||
#define __MIDL_CONST
|
||||
#else
|
||||
#define __MIDL_CONST const
|
||||
#endif
|
||||
|
||||
#ifndef _REFGUID_DEFINED
|
||||
#define _REFGUID_DEFINED
|
||||
#ifdef __cplusplus
|
||||
#define REFGUID const GUID &
|
||||
#else
|
||||
#define REFGUID const GUID *__MIDL_CONST
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _REFIID_DEFINED
|
||||
#define _REFIID_DEFINED
|
||||
#ifdef __cplusplus
|
||||
#define REFIID const IID &
|
||||
#else
|
||||
#define REFIID const IID *__MIDL_CONST
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _REFCLSID_DEFINED
|
||||
#define _REFCLSID_DEFINED
|
||||
#ifdef __cplusplus
|
||||
#define REFCLSID const IID &
|
||||
#else
|
||||
#define REFCLSID const IID *__MIDL_CONST
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _REFFMTID_DEFINED
|
||||
#define _REFFMTID_DEFINED
|
||||
#ifdef __cplusplus
|
||||
#define REFFMTID const IID &
|
||||
#else
|
||||
#define REFFMTID const IID *__MIDL_CONST
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _SYS_GUID_OPERATORS_
|
||||
#define _SYS_GUID_OPERATORS_
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
__inline int InlineIsEqualGUID(REFGUID rguid1,REFGUID rguid2) {
|
||||
return (((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]);
|
||||
}
|
||||
__inline int IsEqualGUID(REFGUID rguid1,REFGUID rguid2) { return !memcmp(&rguid1,&rguid2,sizeof(GUID)); }
|
||||
#else
|
||||
#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])
|
||||
#define IsEqualGUID(rguid1,rguid2) (!memcmp(rguid1,rguid2,sizeof(GUID)))
|
||||
#endif
|
||||
|
||||
#ifdef __INLINE_ISEQUAL_GUID
|
||||
#undef IsEqualGUID
|
||||
#define IsEqualGUID(rguid1,rguid2) InlineIsEqualGUID(rguid1,rguid2)
|
||||
#endif
|
||||
|
||||
#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
|
||||
#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
|
||||
|
||||
#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
|
||||
#define _SYS_GUID_OPERATOR_EQ_
|
||||
#ifdef __cplusplus
|
||||
__inline int operator==(REFGUID guidOne,REFGUID guidOther) { return IsEqualGUID(guidOne,guidOther); }
|
||||
__inline int operator!=(REFGUID guidOne,REFGUID guidOther) { return !(guidOne==guidOther); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
11
win32/include/winapi/intrin.h
Normal file
11
win32/include/winapi/intrin.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __INTRIN_H_
|
||||
#define __INTRIN_H_
|
||||
|
||||
//!__TINYC__: intrinsic stuff removed
|
||||
|
||||
#endif /* end __INTRIN_H_ */
|
8
win32/include/winapi/poppack.h
Normal file
8
win32/include/winapi/poppack.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !(defined(lint) || defined(RC_INVOKED))
|
||||
#pragma pack(pop)
|
||||
#endif
|
8
win32/include/winapi/pshpack1.h
Normal file
8
win32/include/winapi/pshpack1.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !(defined(lint) || defined(RC_INVOKED))
|
||||
#pragma pack(push,1)
|
||||
#endif
|
8
win32/include/winapi/pshpack2.h
Normal file
8
win32/include/winapi/pshpack2.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !(defined(lint) || defined(RC_INVOKED))
|
||||
#pragma pack(push,2)
|
||||
#endif
|
8
win32/include/winapi/pshpack4.h
Normal file
8
win32/include/winapi/pshpack4.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !(defined(lint) || defined(RC_INVOKED))
|
||||
#pragma pack(push,4)
|
||||
#endif
|
8
win32/include/winapi/pshpack8.h
Normal file
8
win32/include/winapi/pshpack8.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !(defined(lint) || defined(RC_INVOKED))
|
||||
#pragma pack(push,8)
|
||||
#endif
|
80
win32/include/winapi/reason.h
Normal file
80
win32/include/winapi/reason.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#if !defined SENTINEL_Reason
|
||||
#define SENTINEL_Reason
|
||||
|
||||
#define SHTDN_REASON_FLAG_COMMENT_REQUIRED 0x01000000
|
||||
#define SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED 0x02000000
|
||||
#define SHTDN_REASON_FLAG_CLEAN_UI 0x04000000
|
||||
#define SHTDN_REASON_FLAG_DIRTY_UI 0x08000000
|
||||
#define SHTDN_REASON_FLAG_USER_DEFINED 0x40000000
|
||||
#define SHTDN_REASON_FLAG_PLANNED 0x80000000
|
||||
#define SHTDN_REASON_MAJOR_OTHER 0x00000000
|
||||
#define SHTDN_REASON_MAJOR_NONE 0x00000000
|
||||
#define SHTDN_REASON_MAJOR_HARDWARE 0x00010000
|
||||
#define SHTDN_REASON_MAJOR_OPERATINGSYSTEM 0x00020000
|
||||
#define SHTDN_REASON_MAJOR_SOFTWARE 0x00030000
|
||||
#define SHTDN_REASON_MAJOR_APPLICATION 0x00040000
|
||||
#define SHTDN_REASON_MAJOR_SYSTEM 0x00050000
|
||||
#define SHTDN_REASON_MAJOR_POWER 0x00060000
|
||||
#define SHTDN_REASON_MAJOR_LEGACY_API 0x00070000
|
||||
#define SHTDN_REASON_MINOR_OTHER 0x00000000
|
||||
#define SHTDN_REASON_MINOR_NONE 0x000000ff
|
||||
#define SHTDN_REASON_MINOR_MAINTENANCE 0x00000001
|
||||
#define SHTDN_REASON_MINOR_INSTALLATION 0x00000002
|
||||
#define SHTDN_REASON_MINOR_UPGRADE 0x00000003
|
||||
#define SHTDN_REASON_MINOR_RECONFIG 0x00000004
|
||||
#define SHTDN_REASON_MINOR_HUNG 0x00000005
|
||||
#define SHTDN_REASON_MINOR_UNSTABLE 0x00000006
|
||||
#define SHTDN_REASON_MINOR_DISK 0x00000007
|
||||
#define SHTDN_REASON_MINOR_PROCESSOR 0x00000008
|
||||
#define SHTDN_REASON_MINOR_NETWORKCARD 0x00000009
|
||||
#define SHTDN_REASON_MINOR_POWER_SUPPLY 0x0000000a
|
||||
#define SHTDN_REASON_MINOR_CORDUNPLUGGED 0x0000000b
|
||||
#define SHTDN_REASON_MINOR_ENVIRONMENT 0x0000000c
|
||||
#define SHTDN_REASON_MINOR_HARDWARE_DRIVER 0x0000000d
|
||||
#define SHTDN_REASON_MINOR_OTHERDRIVER 0x0000000e
|
||||
#define SHTDN_REASON_MINOR_BLUESCREEN 0x0000000F
|
||||
#define SHTDN_REASON_MINOR_SERVICEPACK 0x00000010
|
||||
#define SHTDN_REASON_MINOR_HOTFIX 0x00000011
|
||||
#define SHTDN_REASON_MINOR_SECURITYFIX 0x00000012
|
||||
#define SHTDN_REASON_MINOR_SECURITY 0x00000013
|
||||
#define SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY 0x00000014
|
||||
#define SHTDN_REASON_MINOR_WMI 0x00000015
|
||||
#define SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL 0x00000016
|
||||
#define SHTDN_REASON_MINOR_HOTFIX_UNINSTALL 0x00000017
|
||||
#define SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL 0x00000018
|
||||
#define SHTDN_REASON_MINOR_MMC 0x00000019
|
||||
#define SHTDN_REASON_MINOR_SYSTEMRESTORE 0x0000001a
|
||||
#define SHTDN_REASON_MINOR_TERMSRV 0x00000020
|
||||
#define SHTDN_REASON_MINOR_DC_PROMOTION 0x00000021
|
||||
#define SHTDN_REASON_MINOR_DC_DEMOTION 0x00000022
|
||||
#define SHTDN_REASON_UNKNOWN SHTDN_REASON_MINOR_NONE
|
||||
#define SHTDN_REASON_LEGACY_API (SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED)
|
||||
#define SHTDN_REASON_VALID_BIT_MASK 0xc0ffffff
|
||||
|
||||
#define PCLEANUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_CLEAN_UI)
|
||||
#define UCLEANUI (SHTDN_REASON_FLAG_CLEAN_UI)
|
||||
#define PDIRTYUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_DIRTY_UI)
|
||||
#define UDIRTYUI (SHTDN_REASON_FLAG_DIRTY_UI)
|
||||
|
||||
#define MAX_REASON_NAME_LEN 64
|
||||
#define MAX_REASON_DESC_LEN 256
|
||||
#define MAX_REASON_BUGID_LEN 32
|
||||
#define MAX_REASON_COMMENT_LEN 512
|
||||
#define SHUTDOWN_TYPE_LEN 32
|
||||
|
||||
#define POLICY_SHOWREASONUI_NEVER 0
|
||||
#define POLICY_SHOWREASONUI_ALWAYS 1
|
||||
#define POLICY_SHOWREASONUI_WORKSTATIONONLY 2
|
||||
#define POLICY_SHOWREASONUI_SERVERONLY 3
|
||||
|
||||
#define SNAPSHOT_POLICY_NEVER 0
|
||||
#define SNAPSHOT_POLICY_ALWAYS 1
|
||||
#define SNAPSHOT_POLICY_UNPLANNED 2
|
||||
|
||||
#define MAX_NUM_REASONS 256
|
||||
#endif
|
7
win32/include/winapi/specstrings.h
Normal file
7
win32/include/winapi/specstrings.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#define __specstrings
|
154
win32/include/winapi/stralign.h
Normal file
154
win32/include/winapi/stralign.h
Normal file
|
@ -0,0 +1,154 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __STRALIGN_H_
|
||||
#define __STRALIGN_H_
|
||||
|
||||
#ifndef _STRALIGN_USE_SECURE_CRT
|
||||
#define _STRALIGN_USE_SECURE_CRT 0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(I_X86_)
|
||||
#define WSTR_ALIGNED(s) TRUE
|
||||
#define ua_CharUpperW CharUpperW
|
||||
#define ua_lstrcmpiW lstrcmpiW
|
||||
#define ua_lstrcmpW lstrcmpW
|
||||
#define ua_lstrlenW lstrlenW
|
||||
#define ua_wcschr wcschr
|
||||
#define ua_wcsicmp wcsicmp
|
||||
#define ua_wcslen wcslen
|
||||
#define ua_wcsrchr wcsrchr
|
||||
static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) { return wcscpy(Destination,Source); }
|
||||
#else
|
||||
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0)
|
||||
|
||||
LPUWSTR WINAPI uaw_CharUpperW(LPUWSTR String);
|
||||
int WINAPI uaw_lstrcmpW(PCUWSTR String1,PCUWSTR String2);
|
||||
int WINAPI uaw_lstrcmpiW(PCUWSTR String1,PCUWSTR String2);
|
||||
int WINAPI uaw_lstrlenW(LPCUWSTR String);
|
||||
PUWSTR __cdecl uaw_wcschr(PCUWSTR String,WCHAR Character);
|
||||
PUWSTR __cdecl uaw_wcscpy(PUWSTR Destination,PCUWSTR Source);
|
||||
int __cdecl uaw_wcsicmp(PCUWSTR String1,PCUWSTR String2);
|
||||
size_t __cdecl uaw_wcslen(PCUWSTR String);
|
||||
PUWSTR __cdecl uaw_wcsrchr(PCUWSTR String,WCHAR Character);
|
||||
#ifdef CharUpper
|
||||
static __inline LPUWSTR ua_CharUpperW(LPUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return CharUpperW((PWSTR)String);
|
||||
return uaw_CharUpperW(String);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef lstrcmp
|
||||
static __inline int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpW((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_lstrcmpW(String1,String2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef lstrcmpi
|
||||
static __inline int ua_lstrcmpiW(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpiW((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_lstrcmpiW(String1,String2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef lstrlen
|
||||
static __inline int ua_lstrlenW(LPCUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return lstrlenW((PCWSTR)String);
|
||||
return uaw_lstrlenW(String);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WSTRING_DEFINED)
|
||||
#ifdef _WConst_return
|
||||
typedef _WConst_return WCHAR UNALIGNED *PUWSTR_C;
|
||||
#else
|
||||
typedef WCHAR UNALIGNED *PUWSTR_C;
|
||||
#endif
|
||||
static __inline PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character);
|
||||
return (PUWSTR_C)uaw_wcschr(String,Character);
|
||||
}
|
||||
static __inline PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character);
|
||||
return (PUWSTR_C)uaw_wcsrchr(String,Character);
|
||||
}
|
||||
#if defined(__cplusplus) && defined(_WConst_Return)
|
||||
static __inline PUWSTR ua_wcschr(PUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
||||
return uaw_wcscpy(Destination,Source);
|
||||
}
|
||||
static __inline PUWSTR ua_wcsrchr(PUWSTR String,WCHAR Character) {
|
||||
if(WSTR_ALIGNED(String)) return wcsrchr(String,Character);
|
||||
return uaw_wcsrchr((PCUWSTR)String,Character);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) {
|
||||
if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
||||
return uaw_wcscpy(Destination,Source);
|
||||
}
|
||||
static __inline size_t ua_wcslen(PCUWSTR String) {
|
||||
if(WSTR_ALIGNED(String)) return wcslen((PCWSTR)String);
|
||||
return uaw_wcslen(String);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline int ua_wcsicmp(LPCUWSTR String1,LPCUWSTR String2) {
|
||||
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2);
|
||||
return uaw_wcsicmp(String1,String2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __UA_WCSLEN
|
||||
#define __UA_WCSLEN ua_wcslen
|
||||
#endif
|
||||
|
||||
#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
|
||||
#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
|
||||
|
||||
#ifdef I_X86_
|
||||
#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
|
||||
#else
|
||||
#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; }
|
||||
#endif
|
||||
|
||||
#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
|
||||
|
||||
#ifndef I_X86_
|
||||
#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
|
||||
#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
|
||||
#else
|
||||
#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s))
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s)
|
||||
#define TSTR_ALIGNED(x) WSTR_ALIGNED(x)
|
||||
#define ua_CharUpper ua_CharUpperW
|
||||
#define ua_lstrcmp ua_lstrcmpW
|
||||
#define ua_lstrcmpi ua_lstrcmpiW
|
||||
#define ua_lstrlen ua_lstrlenW
|
||||
#define ua_tcscpy ua_wcscpy
|
||||
#else
|
||||
#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s)
|
||||
#define TSTR_ALIGNED(x) TRUE
|
||||
#define ua_CharUpper CharUpperA
|
||||
#define ua_lstrcmp lstrcmpA
|
||||
#define ua_lstrcmpi lstrcmpiA
|
||||
#define ua_lstrlen lstrlenA
|
||||
#define ua_tcscpy strcpy
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <sec_api/stralign_s.h>
|
||||
#endif
|
79
win32/include/winapi/tvout.h
Normal file
79
win32/include/winapi/tvout.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef __TVOUT__
|
||||
#define __TVOUT__
|
||||
|
||||
#include <guiddef.h>
|
||||
|
||||
typedef struct _VIDEOPARAMETERS {
|
||||
GUID Guid;
|
||||
ULONG dwOffset;
|
||||
ULONG dwCommand;
|
||||
ULONG dwFlags;
|
||||
ULONG dwMode;
|
||||
ULONG dwTVStandard;
|
||||
ULONG dwAvailableModes;
|
||||
ULONG dwAvailableTVStandard;
|
||||
ULONG dwFlickerFilter;
|
||||
ULONG dwOverScanX;
|
||||
ULONG dwOverScanY;
|
||||
ULONG dwMaxUnscaledX;
|
||||
ULONG dwMaxUnscaledY;
|
||||
ULONG dwPositionX;
|
||||
ULONG dwPositionY;
|
||||
ULONG dwBrightness;
|
||||
ULONG dwContrast;
|
||||
ULONG dwCPType;
|
||||
ULONG dwCPCommand;
|
||||
ULONG dwCPStandard;
|
||||
ULONG dwCPKey;
|
||||
ULONG bCP_APSTriggerBits;
|
||||
UCHAR bOEMCopyProtection[256];
|
||||
} VIDEOPARAMETERS,*PVIDEOPARAMETERS,*LPVIDEOPARAMETERS;
|
||||
|
||||
#define VP_COMMAND_GET 0x0001
|
||||
#define VP_COMMAND_SET 0x0002
|
||||
|
||||
#define VP_FLAGS_TV_MODE 0x0001
|
||||
#define VP_FLAGS_TV_STANDARD 0x0002
|
||||
#define VP_FLAGS_FLICKER 0x0004
|
||||
#define VP_FLAGS_OVERSCAN 0x0008
|
||||
#define VP_FLAGS_MAX_UNSCALED 0x0010
|
||||
#define VP_FLAGS_POSITION 0x0020
|
||||
#define VP_FLAGS_BRIGHTNESS 0x0040
|
||||
#define VP_FLAGS_CONTRAST 0x0080
|
||||
#define VP_FLAGS_COPYPROTECT 0x0100
|
||||
|
||||
#define VP_MODE_WIN_GRAPHICS 0x0001
|
||||
#define VP_MODE_TV_PLAYBACK 0x0002
|
||||
|
||||
#define VP_TV_STANDARD_NTSC_M 0x0001
|
||||
#define VP_TV_STANDARD_NTSC_M_J 0x0002
|
||||
#define VP_TV_STANDARD_PAL_B 0x0004
|
||||
#define VP_TV_STANDARD_PAL_D 0x0008
|
||||
#define VP_TV_STANDARD_PAL_H 0x0010
|
||||
#define VP_TV_STANDARD_PAL_I 0x0020
|
||||
#define VP_TV_STANDARD_PAL_M 0x0040
|
||||
#define VP_TV_STANDARD_PAL_N 0x0080
|
||||
#define VP_TV_STANDARD_SECAM_B 0x0100
|
||||
#define VP_TV_STANDARD_SECAM_D 0x0200
|
||||
#define VP_TV_STANDARD_SECAM_G 0x0400
|
||||
#define VP_TV_STANDARD_SECAM_H 0x0800
|
||||
#define VP_TV_STANDARD_SECAM_K 0x1000
|
||||
#define VP_TV_STANDARD_SECAM_K1 0x2000
|
||||
#define VP_TV_STANDARD_SECAM_L 0x4000
|
||||
#define VP_TV_STANDARD_WIN_VGA 0x8000
|
||||
#define VP_TV_STANDARD_NTSC_433 0x00010000
|
||||
#define VP_TV_STANDARD_PAL_G 0x00020000
|
||||
#define VP_TV_STANDARD_PAL_60 0x00040000
|
||||
#define VP_TV_STANDARD_SECAM_L1 0x00080000
|
||||
|
||||
#define VP_CP_TYPE_APS_TRIGGER 0x0001
|
||||
#define VP_CP_TYPE_MACROVISION 0x0002
|
||||
#define VP_CP_CMD_ACTIVATE 0x0001
|
||||
#define VP_CP_CMD_DEACTIVATE 0x0002
|
||||
#define VP_CP_CMD_CHANGE 0x0004
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,206 +1,300 @@
|
|||
#ifndef _WINCON_H
|
||||
#define _WINCON_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINCON_
|
||||
#define _WINCON_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FOREGROUND_BLUE 1
|
||||
#define FOREGROUND_GREEN 2
|
||||
#define FOREGROUND_RED 4
|
||||
#define FOREGROUND_INTENSITY 8
|
||||
#define BACKGROUND_BLUE 16
|
||||
#define BACKGROUND_GREEN 32
|
||||
#define BACKGROUND_RED 64
|
||||
#define BACKGROUND_INTENSITY 128
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD,*PCOORD;
|
||||
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT,*PSMALL_RECT;
|
||||
|
||||
typedef struct _KEY_EVENT_RECORD {
|
||||
WINBOOL bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
} KEY_EVENT_RECORD,*PKEY_EVENT_RECORD;
|
||||
|
||||
#define RIGHT_ALT_PRESSED 0x1
|
||||
#define LEFT_ALT_PRESSED 0x2
|
||||
#define RIGHT_CTRL_PRESSED 0x4
|
||||
#define LEFT_CTRL_PRESSED 0x8
|
||||
#define SHIFT_PRESSED 0x10
|
||||
#define NUMLOCK_ON 0x20
|
||||
#define SCROLLLOCK_ON 0x40
|
||||
#define CAPSLOCK_ON 0x80
|
||||
#define ENHANCED_KEY 0x100
|
||||
#define NLS_DBCSCHAR 0x10000
|
||||
#define NLS_ALPHANUMERIC 0x0
|
||||
#define NLS_KATAKANA 0x20000
|
||||
#define NLS_HIRAGANA 0x40000
|
||||
#define NLS_ROMAN 0x400000
|
||||
#define NLS_IME_CONVERSION 0x800000
|
||||
#define NLS_IME_DISABLE 0x20000000
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD {
|
||||
COORD dwMousePosition;
|
||||
DWORD dwButtonState;
|
||||
DWORD dwControlKeyState;
|
||||
DWORD dwEventFlags;
|
||||
} MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD;
|
||||
|
||||
#define FROM_LEFT_1ST_BUTTON_PRESSED 0x1
|
||||
#define RIGHTMOST_BUTTON_PRESSED 0x2
|
||||
#define FROM_LEFT_2ND_BUTTON_PRESSED 0x4
|
||||
#define FROM_LEFT_3RD_BUTTON_PRESSED 0x8
|
||||
#define FROM_LEFT_4TH_BUTTON_PRESSED 0x10
|
||||
|
||||
#define MOUSE_MOVED 0x1
|
||||
#define DOUBLE_CLICK 0x2
|
||||
#define MOUSE_WHEELED 0x4
|
||||
|
||||
typedef struct _WINDOW_BUFFER_SIZE_RECORD {
|
||||
COORD dwSize;
|
||||
} WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD;
|
||||
|
||||
typedef struct _MENU_EVENT_RECORD {
|
||||
UINT dwCommandId;
|
||||
} MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
|
||||
|
||||
typedef struct _FOCUS_EVENT_RECORD {
|
||||
WINBOOL bSetFocus;
|
||||
} FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD;
|
||||
|
||||
typedef struct _INPUT_RECORD {
|
||||
WORD EventType;
|
||||
union {
|
||||
KEY_EVENT_RECORD KeyEvent;
|
||||
MOUSE_EVENT_RECORD MouseEvent;
|
||||
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
|
||||
MENU_EVENT_RECORD MenuEvent;
|
||||
FOCUS_EVENT_RECORD FocusEvent;
|
||||
} Event;
|
||||
} INPUT_RECORD,*PINPUT_RECORD;
|
||||
|
||||
#define KEY_EVENT 0x1
|
||||
#define MOUSE_EVENT 0x2
|
||||
#define WINDOW_BUFFER_SIZE_EVENT 0x4
|
||||
#define MENU_EVENT 0x8
|
||||
#define FOCUS_EVENT 0x10
|
||||
|
||||
typedef struct _CHAR_INFO {
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} Char;
|
||||
WORD Attributes;
|
||||
} CHAR_INFO,*PCHAR_INFO;
|
||||
|
||||
#define FOREGROUND_BLUE 0x1
|
||||
#define FOREGROUND_GREEN 0x2
|
||||
#define FOREGROUND_RED 0x4
|
||||
#define FOREGROUND_INTENSITY 0x8
|
||||
#define BACKGROUND_BLUE 0x10
|
||||
#define BACKGROUND_GREEN 0x20
|
||||
#define BACKGROUND_RED 0x40
|
||||
#define BACKGROUND_INTENSITY 0x80
|
||||
#define COMMON_LVB_LEADING_BYTE 0x100
|
||||
#define COMMON_LVB_TRAILING_BYTE 0x200
|
||||
#define COMMON_LVB_GRID_HORIZONTAL 0x400
|
||||
#define COMMON_LVB_GRID_LVERTICAL 0x800
|
||||
#define COMMON_LVB_GRID_RVERTICAL 0x1000
|
||||
#define COMMON_LVB_REVERSE_VIDEO 0x4000
|
||||
#define COMMON_LVB_UNDERSCORE 0x8000
|
||||
|
||||
#define COMMON_LVB_SBCSDBCS 0x300
|
||||
|
||||
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
WORD wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
|
||||
|
||||
typedef struct _CONSOLE_CURSOR_INFO {
|
||||
DWORD dwSize;
|
||||
WINBOOL bVisible;
|
||||
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
|
||||
|
||||
typedef struct _CONSOLE_FONT_INFO {
|
||||
DWORD nFont;
|
||||
COORD dwFontSize;
|
||||
} CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO;
|
||||
|
||||
typedef struct _CONSOLE_SELECTION_INFO {
|
||||
DWORD dwFlags;
|
||||
COORD dwSelectionAnchor;
|
||||
SMALL_RECT srSelection;
|
||||
} CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO;
|
||||
|
||||
#define CONSOLE_NO_SELECTION 0x0
|
||||
#define CONSOLE_SELECTION_IN_PROGRESS 0x1
|
||||
#define CONSOLE_SELECTION_NOT_EMPTY 0x2
|
||||
#define CONSOLE_MOUSE_SELECTION 0x4
|
||||
#define CONSOLE_MOUSE_DOWN 0x8
|
||||
|
||||
typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType);
|
||||
|
||||
#define CTRL_C_EVENT 0
|
||||
#define CTRL_BREAK_EVENT 1
|
||||
#define CTRL_CLOSE_EVENT 2
|
||||
|
||||
#define CTRL_LOGOFF_EVENT 5
|
||||
#define CTRL_SHUTDOWN_EVENT 6
|
||||
#define ENABLE_LINE_INPUT 2
|
||||
#define ENABLE_ECHO_INPUT 4
|
||||
#define ENABLE_PROCESSED_INPUT 1
|
||||
#define ENABLE_WINDOW_INPUT 8
|
||||
#define ENABLE_MOUSE_INPUT 16
|
||||
#define ENABLE_PROCESSED_OUTPUT 1
|
||||
#define ENABLE_WRAP_AT_EOL_OUTPUT 2
|
||||
#define KEY_EVENT 1
|
||||
#define MOUSE_EVENT 2
|
||||
#define WINDOW_BUFFER_SIZE_EVENT 4
|
||||
#define MENU_EVENT 8
|
||||
#define FOCUS_EVENT 16
|
||||
#define CAPSLOCK_ON 128
|
||||
#define ENHANCED_KEY 256
|
||||
#define RIGHT_ALT_PRESSED 1
|
||||
#define LEFT_ALT_PRESSED 2
|
||||
#define RIGHT_CTRL_PRESSED 4
|
||||
#define LEFT_CTRL_PRESSED 8
|
||||
#define SHIFT_PRESSED 16
|
||||
#define NUMLOCK_ON 32
|
||||
#define SCROLLLOCK_ON 64
|
||||
#define FROM_LEFT_1ST_BUTTON_PRESSED 1
|
||||
#define RIGHTMOST_BUTTON_PRESSED 2
|
||||
#define FROM_LEFT_2ND_BUTTON_PRESSED 4
|
||||
#define FROM_LEFT_3RD_BUTTON_PRESSED 8
|
||||
#define FROM_LEFT_4TH_BUTTON_PRESSED 16
|
||||
#define MOUSE_MOVED 1
|
||||
#define DOUBLE_CLICK 2
|
||||
#define MOUSE_WHEELED 4
|
||||
|
||||
typedef struct _CHAR_INFO {
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} Char;
|
||||
WORD Attributes;
|
||||
} CHAR_INFO,*PCHAR_INFO;
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT,*PSMALL_RECT;
|
||||
typedef struct _CONSOLE_CURSOR_INFO {
|
||||
DWORD dwSize;
|
||||
BOOL bVisible;
|
||||
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
WORD wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
|
||||
typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD);
|
||||
typedef struct _KEY_EVENT_RECORD {
|
||||
BOOL bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
/* gcc's alignment is not what win32 expects */
|
||||
PACKED
|
||||
#endif
|
||||
KEY_EVENT_RECORD;
|
||||
#define ENABLE_PROCESSED_INPUT 0x1
|
||||
#define ENABLE_LINE_INPUT 0x2
|
||||
#define ENABLE_ECHO_INPUT 0x4
|
||||
#define ENABLE_WINDOW_INPUT 0x8
|
||||
#define ENABLE_MOUSE_INPUT 0x10
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD {
|
||||
COORD dwMousePosition;
|
||||
DWORD dwButtonState;
|
||||
DWORD dwControlKeyState;
|
||||
DWORD dwEventFlags;
|
||||
} MOUSE_EVENT_RECORD;
|
||||
typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
|
||||
typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
|
||||
typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
|
||||
typedef struct _INPUT_RECORD {
|
||||
WORD EventType;
|
||||
union {
|
||||
KEY_EVENT_RECORD KeyEvent;
|
||||
MOUSE_EVENT_RECORD MouseEvent;
|
||||
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
|
||||
MENU_EVENT_RECORD MenuEvent;
|
||||
FOCUS_EVENT_RECORD FocusEvent;
|
||||
} Event;
|
||||
} INPUT_RECORD,*PINPUT_RECORD;
|
||||
|
||||
BOOL WINAPI AllocConsole(void);
|
||||
HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID);
|
||||
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
|
||||
BOOL WINAPI FreeConsole(void);
|
||||
BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD);
|
||||
UINT WINAPI GetConsoleCP(void);
|
||||
BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO);
|
||||
BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
|
||||
UINT WINAPI GetConsoleOutputCP(void);
|
||||
BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO);
|
||||
DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
|
||||
DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
|
||||
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
|
||||
BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
|
||||
BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE);
|
||||
BOOL WINAPI SetConsoleCP(UINT);
|
||||
BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
|
||||
BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*);
|
||||
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
|
||||
BOOL WINAPI SetConsoleOutputCP(UINT);
|
||||
BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD);
|
||||
BOOL WINAPI SetConsoleTitleA(LPCSTR);
|
||||
BOOL WINAPI SetConsoleTitleW(LPCWSTR);
|
||||
BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*);
|
||||
BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD);
|
||||
#define ENABLE_PROCESSED_OUTPUT 0x1
|
||||
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x2
|
||||
|
||||
#ifdef UNICODE
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
|
||||
#define GetConsoleTitle GetConsoleTitleW
|
||||
#define PeekConsoleInput PeekConsoleInputW
|
||||
#define ReadConsole ReadConsoleW
|
||||
#define ReadConsoleInput ReadConsoleInputW
|
||||
#define ReadConsoleOutput ReadConsoleOutputW
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
|
||||
#define SetConsoleTitle SetConsoleTitleW
|
||||
#define WriteConsole WriteConsoleW
|
||||
#define WriteConsoleInput WriteConsoleInputW
|
||||
#define ReadConsoleOutput ReadConsoleOutputW
|
||||
#define WriteConsoleOutput WriteConsoleOutputW
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
|
||||
#define GetConsoleTitle GetConsoleTitleW
|
||||
#define SetConsoleTitle SetConsoleTitleW
|
||||
#define ReadConsole ReadConsoleW
|
||||
#define WriteConsole WriteConsoleW
|
||||
#define AddConsoleAlias AddConsoleAliasW
|
||||
#define GetConsoleAlias GetConsoleAliasW
|
||||
#define GetConsoleAliasesLength GetConsoleAliasesLengthW
|
||||
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
|
||||
#define GetConsoleAliases GetConsoleAliasesW
|
||||
#define GetConsoleAliasExes GetConsoleAliasExesW
|
||||
#else
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
|
||||
#define GetConsoleTitle GetConsoleTitleA
|
||||
#define PeekConsoleInput PeekConsoleInputA
|
||||
#define ReadConsole ReadConsoleA
|
||||
#define ReadConsoleInput ReadConsoleInputA
|
||||
#define ReadConsoleOutput ReadConsoleOutputA
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
|
||||
#define SetConsoleTitle SetConsoleTitleA
|
||||
#define WriteConsole WriteConsoleA
|
||||
#define WriteConsoleInput WriteConsoleInputA
|
||||
#define ReadConsoleOutput ReadConsoleOutputA
|
||||
#define WriteConsoleOutput WriteConsoleOutputA
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
|
||||
#define GetConsoleTitle GetConsoleTitleA
|
||||
#define SetConsoleTitle SetConsoleTitleA
|
||||
#define ReadConsole ReadConsoleA
|
||||
#define WriteConsole WriteConsoleA
|
||||
#define AddConsoleAlias AddConsoleAliasA
|
||||
#define GetConsoleAlias GetConsoleAliasA
|
||||
#define GetConsoleAliasesLength GetConsoleAliasesLengthA
|
||||
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
|
||||
#define GetConsoleAliases GetConsoleAliasesA
|
||||
#define GetConsoleAliasExes GetConsoleAliasExesA
|
||||
#endif
|
||||
|
||||
WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
|
||||
WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,LPSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE hConsoleOutput,LPWSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE hConsoleOutput,LPWORD lpAttribute,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfAttrsRead);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,LPCSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,LPCWSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE hConsoleOutput,CONST WORD *lpAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE hConsoleOutput,CHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,WCHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE hConsoleOutput,WORD wAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
|
||||
WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle,LPDWORD lpMode);
|
||||
WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput,LPDWORD lpNumberOfEvents);
|
||||
WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
|
||||
WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
|
||||
WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE hConsoleOutput,PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
|
||||
WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,WINBOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont);
|
||||
WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE hConsoleOutput,DWORD nFont);
|
||||
WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo);
|
||||
WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE hConsoleHandle,DWORD dwMode);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
|
||||
WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE hConsoleInput);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,COORD dwSize);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput,COORD dwCursorPosition);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE hConsoleOutput,CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo);
|
||||
WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
|
||||
WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE hConsoleOutput,WINBOOL bAbsolute,CONST SMALL_RECT *lpConsoleWindow);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttributes);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,WINBOOL Add);
|
||||
WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,DWORD dwProcessGroupId);
|
||||
WINBASEAPI WINBOOL WINAPI AllocConsole(VOID);
|
||||
WINBASEAPI WINBOOL WINAPI FreeConsole(VOID);
|
||||
WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD dwProcessId);
|
||||
|
||||
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
|
||||
|
||||
WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR lpConsoleTitle,DWORD nSize);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR lpConsoleTitle,DWORD nSize);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR lpConsoleTitle);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR lpConsoleTitle);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
|
||||
WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
|
||||
WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
|
||||
|
||||
#define CONSOLE_TEXTMODE_BUFFER 1
|
||||
|
||||
WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess,DWORD dwShareMode,CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,DWORD dwFlags,LPVOID lpScreenBufferData);
|
||||
WINBASEAPI UINT WINAPI GetConsoleCP(VOID);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT wCodePageID);
|
||||
WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID);
|
||||
WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT wCodePageID);
|
||||
|
||||
#define CONSOLE_FULLSCREEN 1
|
||||
#define CONSOLE_FULLSCREEN_HARDWARE 2
|
||||
|
||||
WINBASEAPI WINBOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags);
|
||||
WINBASEAPI HWND WINAPI GetConsoleWindow(VOID);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleProcessList(LPDWORD lpdwProcessList,DWORD dwProcessCount);
|
||||
WINBASEAPI WINBOOL WINAPI AddConsoleAliasA(LPSTR Source,LPSTR Target,LPSTR ExeName);
|
||||
WINBASEAPI WINBOOL WINAPI AddConsoleAliasW(LPWSTR Source,LPWSTR Target,LPWSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasA(LPSTR Source,LPSTR TargetBuffer,DWORD TargetBufferLength,LPSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasW(LPWSTR Source,LPWSTR TargetBuffer,DWORD TargetBufferLength,LPWSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthA(LPSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthW(LPWSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthA(VOID);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthW(VOID);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasesA(LPSTR AliasBuffer,DWORD AliasBufferLength,LPSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasesW(LPWSTR AliasBuffer,DWORD AliasBufferLength,LPWSTR ExeName);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasExesA(LPSTR ExeNameBuffer,DWORD ExeNameBufferLength);
|
||||
WINBASEAPI DWORD WINAPI GetConsoleAliasExesW(LPWSTR ExeNameBuffer,DWORD ExeNameBufferLength);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
#ifndef _WINDEF_H
|
||||
#define _WINDEF_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINDEF_
|
||||
#define _WINDEF_
|
||||
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -9,230 +15,277 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400
|
||||
#define WINVER 0x0502
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT WINVER
|
||||
|
||||
#ifndef BASETYPES
|
||||
#define BASETYPES
|
||||
typedef unsigned long ULONG;
|
||||
typedef ULONG *PULONG;
|
||||
typedef unsigned short USHORT;
|
||||
typedef USHORT *PUSHORT;
|
||||
typedef unsigned char UCHAR;
|
||||
typedef UCHAR *PUCHAR;
|
||||
typedef char *PSZ;
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#define _WIN32
|
||||
#endif
|
||||
#define FAR
|
||||
#define far
|
||||
#define NEAR
|
||||
#define near
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
#undef MAX_PATH
|
||||
|
||||
#define MAX_PATH 260
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef IN
|
||||
#define IN
|
||||
#endif
|
||||
|
||||
#ifndef OUT
|
||||
#define OUT
|
||||
#endif
|
||||
|
||||
#ifndef OPTIONAL
|
||||
#define OPTIONAL
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PACKED __attribute__((packed))
|
||||
#ifndef _stdcall
|
||||
#define _stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef __stdcall
|
||||
#define __stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef _cdecl
|
||||
#define _cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __cdecl
|
||||
#define __cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __declspec
|
||||
#define __declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#ifndef _declspec
|
||||
#define _declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#else
|
||||
#define PACKED
|
||||
#define _cdecl
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
#undef far
|
||||
#undef near
|
||||
#undef pascal
|
||||
#undef _pascal
|
||||
#undef __pascal
|
||||
|
||||
#define far
|
||||
#define near
|
||||
#define pascal __stdcall
|
||||
#define _pascal __stdcall
|
||||
#define __pascal __stdcall
|
||||
#define PASCAL _pascal
|
||||
#define CDECL _cdecl
|
||||
#define STDCALL __stdcall
|
||||
#define WINAPI __stdcall
|
||||
#define WINAPIV __cdecl
|
||||
#define APIENTRY __stdcall
|
||||
|
||||
#define cdecl
|
||||
#ifndef CDECL
|
||||
#define CDECL
|
||||
#endif
|
||||
#ifndef CALLBACK
|
||||
#define CALLBACK __stdcall
|
||||
#define APIPRIVATE __stdcall
|
||||
|
||||
#define DECLSPEC_IMPORT __declspec(dllimport)
|
||||
#define DECLSPEC_EXPORT __declspec(dllexport)
|
||||
#ifdef __GNUC__
|
||||
#define DECLSPEC_NORETURN __declspec(noreturn)
|
||||
#define DECLARE_STDCALL_P( type ) __stdcall type
|
||||
#elif defined(__WATCOMC__)
|
||||
#define DECLSPEC_NORETURN
|
||||
#define DECLARE_STDCALL_P( type ) type __stdcall
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
|
||||
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
|
||||
#define LOWORD(l) ((WORD)((DWORD)(l)))
|
||||
#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
|
||||
|
||||
#ifndef _export
|
||||
#define _export
|
||||
#endif
|
||||
#ifndef __export
|
||||
#define __export
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#define WINAPIV __cdecl
|
||||
#define APIENTRY WINAPI
|
||||
#define APIPRIVATE WINAPI
|
||||
#define PASCAL WINAPI
|
||||
#define WINAPI_INLINE WINAPI
|
||||
|
||||
#undef FAR
|
||||
#undef NEAR
|
||||
#define FAR
|
||||
#define NEAR
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int WINBOOL;
|
||||
#define BOOL WINBOOL
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef WINBOOL *PBOOL;
|
||||
typedef WINBOOL *LPBOOL;
|
||||
typedef BYTE *PBYTE;
|
||||
typedef BYTE *LPBYTE;
|
||||
typedef int *PINT;
|
||||
typedef int *LPINT;
|
||||
typedef WORD *PWORD;
|
||||
typedef WORD *LPWORD;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *LPVOID;
|
||||
#ifndef _LPCVOID_DEFINED
|
||||
#define _LPCVOID_DEFINED
|
||||
typedef CONST void *LPCVOID;
|
||||
#endif
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int *PUINT;
|
||||
|
||||
#ifndef NT_INCLUDED
|
||||
#include <winnt.h>
|
||||
#endif
|
||||
|
||||
#include <specstrings.h>
|
||||
|
||||
typedef UINT_PTR WPARAM;
|
||||
typedef LONG_PTR LPARAM;
|
||||
typedef LONG_PTR LRESULT;
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef NOMINMAX
|
||||
#ifndef max
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||
#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
|
||||
#define DBG_UNREFERENCED_PARAMETER(P)
|
||||
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
|
||||
#define MAKEWORD(a,b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8))
|
||||
#define MAKELONG(a,b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16))
|
||||
#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
|
||||
#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
|
||||
#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
|
||||
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
|
||||
/* FIXME: Is there a good solution to this? */
|
||||
#ifndef XFree86Server
|
||||
#ifndef __OBJC__
|
||||
typedef WINBOOL BOOL;
|
||||
#ifndef WIN_INTERNAL
|
||||
DECLARE_HANDLE (HWND);
|
||||
DECLARE_HANDLE (HHOOK);
|
||||
#ifdef WINABLE
|
||||
DECLARE_HANDLE (HEVENT);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef WORD ATOM;
|
||||
|
||||
typedef HANDLE *SPHANDLE;
|
||||
typedef HANDLE *LPHANDLE;
|
||||
typedef HANDLE HGLOBAL;
|
||||
typedef HANDLE HLOCAL;
|
||||
typedef HANDLE GLOBALHANDLE;
|
||||
typedef HANDLE LOCALHANDLE;
|
||||
#ifdef _WIN64
|
||||
typedef INT_PTR (WINAPI *FARPROC)();
|
||||
typedef INT_PTR (WINAPI *NEARPROC)();
|
||||
typedef INT_PTR (WINAPI *PROC)();
|
||||
#else
|
||||
#define BOOL WINBOOL
|
||||
typedef int (WINAPI *FARPROC)();
|
||||
typedef int (WINAPI *NEARPROC)();
|
||||
typedef int (WINAPI *PROC)();
|
||||
#endif
|
||||
typedef unsigned char BYTE;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef BOOL *PBOOL,*LPBOOL;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BYTE *PBYTE,*LPBYTE;
|
||||
typedef int *PINT,*LPINT;
|
||||
typedef WORD *PWORD,*LPWORD;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD,*LPDWORD;
|
||||
typedef void *PVOID,*LPVOID;
|
||||
typedef CONST void *PCVOID,*LPCVOID;
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT,*PUINT,*LPUINT;
|
||||
|
||||
#include <winnt.h>
|
||||
typedef void *HGDIOBJ;
|
||||
|
||||
typedef UINT WPARAM;
|
||||
typedef LONG LPARAM;
|
||||
typedef LONG LRESULT;
|
||||
#ifndef _HRESULT_DEFINED
|
||||
typedef LONG HRESULT;
|
||||
#define _HRESULT_DEFINED
|
||||
#endif
|
||||
#ifndef XFree86Server
|
||||
typedef WORD ATOM;
|
||||
#endif /* XFree86Server */
|
||||
typedef HANDLE HGLOBAL;
|
||||
typedef HANDLE HLOCAL;
|
||||
typedef HANDLE GLOBALHANDLE;
|
||||
typedef HANDLE LOCALHANDLE;
|
||||
typedef void *HGDIOBJ;
|
||||
DECLARE_HANDLE(HACCEL);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(HCOLORSPACE);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HGLRC);
|
||||
DECLARE_HANDLE(HDESK);
|
||||
DECLARE_HANDLE(HENHMETAFILE);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HKEY);
|
||||
/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
|
||||
/* #if (WINVER >= 0x0500) */
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#define HMONITOR_DECLARED 1
|
||||
DECLARE_HANDLE(HTERMINAL);
|
||||
DECLARE_HANDLE(HWINEVENTHOOK);
|
||||
/* #endif */
|
||||
typedef HKEY *PHKEY;
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
typedef HINSTANCE HMODULE;
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HRSRC);
|
||||
DECLARE_HANDLE(HSTR);
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HWINSTA);
|
||||
DECLARE_HANDLE(HKL);
|
||||
typedef int HFILE;
|
||||
typedef HICON HCURSOR;
|
||||
typedef DWORD COLORREF;
|
||||
typedef int (WINAPI *FARPROC)();
|
||||
typedef int (WINAPI *NEARPROC)();
|
||||
typedef int (WINAPI *PROC)();
|
||||
typedef struct tagRECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT,*PRECT,*LPRECT;
|
||||
typedef const RECT *LPCRECT;
|
||||
typedef struct tagRECTL {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECTL,*PRECTL,*LPRECTL;
|
||||
typedef const RECTL *LPCRECTL;
|
||||
typedef struct tagPOINT {
|
||||
LONG x;
|
||||
LONG y;
|
||||
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
|
||||
typedef struct tagSIZE {
|
||||
LONG cx;
|
||||
LONG cy;
|
||||
} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
|
||||
typedef struct tagPOINTS {
|
||||
SHORT x;
|
||||
SHORT y;
|
||||
} POINTS,*PPOINTS,*LPPOINTS;
|
||||
DECLARE_HANDLE(HKEY);
|
||||
typedef HKEY *PHKEY;
|
||||
|
||||
DECLARE_HANDLE(HACCEL);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(HCOLORSPACE);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HGLRC);
|
||||
DECLARE_HANDLE(HDESK);
|
||||
DECLARE_HANDLE(HENHMETAFILE);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
typedef HINSTANCE HMODULE;
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HRSRC);
|
||||
DECLARE_HANDLE(HSTR);
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HWINSTA);
|
||||
DECLARE_HANDLE(HKL);
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
DECLARE_HANDLE(HWINEVENTHOOK);
|
||||
DECLARE_HANDLE(HUMPD);
|
||||
|
||||
typedef int HFILE;
|
||||
typedef HICON HCURSOR;
|
||||
typedef DWORD COLORREF;
|
||||
typedef DWORD *LPCOLORREF;
|
||||
|
||||
#define HFILE_ERROR ((HFILE)-1)
|
||||
|
||||
typedef struct tagRECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT,*PRECT,*NPRECT,*LPRECT;
|
||||
|
||||
typedef const RECT *LPCRECT;
|
||||
|
||||
typedef struct _RECTL {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECTL,*PRECTL,*LPRECTL;
|
||||
|
||||
typedef const RECTL *LPCRECTL;
|
||||
|
||||
typedef struct tagPOINT {
|
||||
LONG x;
|
||||
LONG y;
|
||||
} POINT,*PPOINT,*NPPOINT,*LPPOINT;
|
||||
|
||||
typedef struct _POINTL {
|
||||
LONG x;
|
||||
LONG y;
|
||||
} POINTL,*PPOINTL;
|
||||
|
||||
typedef struct tagSIZE {
|
||||
LONG cx;
|
||||
LONG cy;
|
||||
} SIZE,*PSIZE,*LPSIZE;
|
||||
|
||||
typedef SIZE SIZEL;
|
||||
typedef SIZE *PSIZEL,*LPSIZEL;
|
||||
|
||||
typedef struct tagPOINTS {
|
||||
SHORT x;
|
||||
SHORT y;
|
||||
} POINTS,*PPOINTS,*LPPOINTS;
|
||||
|
||||
typedef struct _FILETIME {
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
} FILETIME,*PFILETIME,*LPFILETIME;
|
||||
#define _FILETIME_
|
||||
|
||||
#define DM_UPDATE 1
|
||||
#define DM_COPY 2
|
||||
#define DM_PROMPT 4
|
||||
#define DM_MODIFY 8
|
||||
|
||||
#define DM_IN_BUFFER DM_MODIFY
|
||||
#define DM_IN_PROMPT DM_PROMPT
|
||||
#define DM_OUT_BUFFER DM_COPY
|
||||
#define DM_OUT_DEFAULT DM_UPDATE
|
||||
|
||||
#define DC_FIELDS 1
|
||||
#define DC_PAPERS 2
|
||||
#define DC_PAPERSIZE 3
|
||||
#define DC_MINEXTENT 4
|
||||
#define DC_MAXEXTENT 5
|
||||
#define DC_BINS 6
|
||||
#define DC_DUPLEX 7
|
||||
#define DC_SIZE 8
|
||||
#define DC_EXTRA 9
|
||||
#define DC_VERSION 10
|
||||
#define DC_DRIVER 11
|
||||
#define DC_BINNAMES 12
|
||||
#define DC_ENUMRESOLUTIONS 13
|
||||
#define DC_FILEDEPENDENCIES 14
|
||||
#define DC_TRUETYPE 15
|
||||
#define DC_PAPERNAMES 16
|
||||
#define DC_ORIENTATION 17
|
||||
#define DC_COPIES 18
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,136 +1,75 @@
|
|||
/*
|
||||
windows.h - main header file for the Win32 API
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINDOWS_
|
||||
#define _WINDOWS_
|
||||
|
||||
Written by Anders Norlander <anorland@hem2.passagen.se>
|
||||
|
||||
This file is part of a free library for the Win32 API.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
*/
|
||||
#ifndef _WINDOWS_H
|
||||
#define _WINDOWS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0502
|
||||
#endif
|
||||
|
||||
/* translate GCC target defines to MS equivalents. Keep this synchronized
|
||||
with winnt.h. */
|
||||
#if defined(__i686__) && !defined(_M_IX86)
|
||||
#define _M_IX86 600
|
||||
#elif defined(__i586__) && !defined(_M_IX86)
|
||||
#define _M_IX86 500
|
||||
#elif defined(__i486__) && !defined(_M_IX86)
|
||||
#define _M_IX86 400
|
||||
#elif defined(__i386__) && !defined(_M_IX86)
|
||||
#define _M_IX86 300
|
||||
#endif
|
||||
#if defined(_M_IX86) && !defined(_X86_)
|
||||
#define _X86_
|
||||
#elif defined(_M_ALPHA) && !defined(_ALPHA_)
|
||||
#define _ALPHA_
|
||||
#elif defined(_M_PPC) && !defined(_PPC_)
|
||||
#define _PPC_
|
||||
#elif defined(_M_MRX000) && !defined(_MIPS_)
|
||||
#define _MIPS_
|
||||
#elif defined(_M_M68K) && !defined(_68K_)
|
||||
#define _68K_
|
||||
#endif
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef _INC_WINDOWS
|
||||
#define _INC_WINDOWS
|
||||
|
||||
#if defined(RC_INVOKED) && !defined(NOWINRES)
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
/* winresrc.h includes the necessary headers */
|
||||
#include <winresrc.h>
|
||||
#else
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef NONAMELESSUNION
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#if defined(__cplusplus)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
|
||||
#endif /* NONAMELESSUNION */
|
||||
#elif defined(__WATCOMC__)
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
|
||||
#ifndef _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _UNION_NAME(x) x
|
||||
#define DUMMYUNIONNAME u
|
||||
#define DUMMYUNIONNAME2 u2
|
||||
#define DUMMYUNIONNAME3 u3
|
||||
#define DUMMYUNIONNAME4 u4
|
||||
#define DUMMYUNIONNAME5 u5
|
||||
#define DUMMYUNIONNAME6 u6
|
||||
#define DUMMYUNIONNAME7 u7
|
||||
#define DUMMYUNIONNAME8 u8
|
||||
#else
|
||||
#define _UNION_NAME(x)
|
||||
#define DUMMYUNIONNAME
|
||||
#define DUMMYUNIONNAME2
|
||||
#define DUMMYUNIONNAME3
|
||||
#define DUMMYUNIONNAME4
|
||||
#define DUMMYUNIONNAME5
|
||||
#define DUMMYUNIONNAME6
|
||||
#define DUMMYUNIONNAME7
|
||||
#define DUMMYUNIONNAME8
|
||||
#endif
|
||||
#ifndef _ANONYMOUS_STRUCT
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#define _STRUCT_NAME(x) x
|
||||
#define DUMMYSTRUCTNAME s
|
||||
#define DUMMYSTRUCTNAME2 s2
|
||||
#define DUMMYSTRUCTNAME3 s3
|
||||
#else
|
||||
#define _STRUCT_NAME(x)
|
||||
#define DUMMYSTRUCTNAME
|
||||
#define DUMMYSTRUCTNAME2
|
||||
#define DUMMYSTRUCTNAME3
|
||||
#ifdef RC_INVOKED
|
||||
#define NOATOM
|
||||
#define NOGDI
|
||||
#define NOGDICAPMASKS
|
||||
#define NOMETAFILE
|
||||
#define NOMINMAX
|
||||
#define NOMSG
|
||||
#define NOOPENFILE
|
||||
#define NORASTEROPS
|
||||
#define NOSCROLL
|
||||
#define NOSOUND
|
||||
#define NOSYSMETRICS
|
||||
#define NOTEXTMETRIC
|
||||
#define NOWH
|
||||
#define NOCOMM
|
||||
#define NOKANJI
|
||||
#define NOCRYPT
|
||||
#define NOMCX
|
||||
#endif
|
||||
|
||||
#ifndef NO_STRICT
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
|
||||
#define I_X86_
|
||||
#endif
|
||||
|
||||
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
|
||||
#define _AMD64_
|
||||
#endif
|
||||
|
||||
#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
|
||||
#if !defined(_IA64_)
|
||||
#define _IA64_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <wincon.h>
|
||||
#include <basetyps.h>
|
||||
#ifndef RC_INVOKED
|
||||
#include <excpt.h>
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#ifndef _WINGDI_H
|
||||
#include <wingdi.h>
|
||||
#endif
|
||||
#ifndef _WINUSER_H
|
||||
#include <winuser.h>
|
||||
#endif
|
||||
#ifndef _WINNLS_H
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
#ifndef _WINVER_H
|
||||
#include <wincon.h>
|
||||
#include <winver.h>
|
||||
#endif
|
||||
#ifndef _WINNETWK_H
|
||||
#include <winnetwk.h>
|
||||
#endif
|
||||
#ifndef _WINREG_H
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
#ifndef _WINSVC_H
|
||||
#include <winsvc.h>
|
||||
#endif
|
||||
#include <winnetwk.h>
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#include <commdlg.h>
|
||||
#include <cderr.h>
|
||||
#include <dde.h>
|
||||
#include <ddeml.h>
|
||||
|
@ -141,36 +80,44 @@
|
|||
#include <rpc.h>
|
||||
#include <shellapi.h>
|
||||
#include <winperf.h>
|
||||
#include <winspool.h>
|
||||
#if defined(Win32_Winsock)
|
||||
#warning "The Win32_Winsock macro name is deprecated.\
|
||||
Please use __USE_W32_SOCKETS instead"
|
||||
#ifndef __USE_W32_SOCKETS
|
||||
#define __USE_W32_SOCKETS
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
|
||||
#if (_WIN32_WINNT >= 0x0400)
|
||||
#include <winsock2.h>
|
||||
/*
|
||||
* MS likes to include mswsock.h here as well,
|
||||
* but that can cause undefined symbols if
|
||||
* winsock2.h is included before windows.h
|
||||
*/
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif /* (_WIN32_WINNT >= 0x0400) */
|
||||
#ifndef NOCRYPT
|
||||
#include <wincrypt.h>
|
||||
#include <winefs.h>
|
||||
#include <winscard.h>
|
||||
#endif
|
||||
#endif /* WIN32_LEAN_AND_MEAN */
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
#ifndef NOUSER
|
||||
#ifndef NOGDI
|
||||
#include <winspool.h>
|
||||
#ifdef INC_OLE1
|
||||
#include <ole.h>
|
||||
#else
|
||||
#include <ole2.h>
|
||||
#endif
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
/* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
|
||||
but undefining it causes trouble as well if a file is included after
|
||||
windows.h
|
||||
*/
|
||||
#undef BOOL
|
||||
#include <stralign.h>
|
||||
|
||||
#ifdef INC_OLE2
|
||||
#include <ole2.h>
|
||||
#endif
|
||||
|
||||
#ifndef NOSERVICE
|
||||
#include <winsvc.h>
|
||||
#endif
|
||||
|
||||
#ifndef NOMCX
|
||||
#include <mcx.h>
|
||||
#endif
|
||||
|
||||
#ifndef NOIME
|
||||
#include <imm.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,108 +1,410 @@
|
|||
#ifndef _WINNETWK_H
|
||||
#define _WINNETWK_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINNETWK_
|
||||
#define _WINNETWK_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define WNNC_NET_MSNET 0x00010000
|
||||
#define WNNC_NET_LANMAN 0x00020000
|
||||
#define WNNC_NET_NETWARE 0x00030000
|
||||
#define WNNC_NET_VINES 0x00040000
|
||||
#define WNNC_NET_10NET 0x00050000
|
||||
#define WNNC_NET_LOCUS 0x00060000
|
||||
#define WNNC_NET_SUN_PC_NFS 0x00070000
|
||||
#define WNNC_NET_LANSTEP 0x00080000
|
||||
#define WNNC_NET_9TILES 0x00090000
|
||||
#define WNNC_NET_LANTASTIC 0x000A0000
|
||||
#define WNNC_NET_AS400 0x000B0000
|
||||
#define WNNC_NET_FTP_NFS 0x000C0000
|
||||
#define WNNC_NET_PATHWORKS 0x000D0000
|
||||
#define WNNC_NET_LIFENET 0x000E0000
|
||||
#define WNNC_NET_POWERLAN 0x000F0000
|
||||
#define WNNC_NET_BWNFS 0x00100000
|
||||
#define WNNC_NET_COGENT 0x00110000
|
||||
#define WNNC_NET_FARALLON 0x00120000
|
||||
#define WNNC_NET_APPLETALK 0x00130000
|
||||
#define WNNC_NET_INTERGRAPH 0x00140000
|
||||
#define WNNC_NET_SYMFONET 0x00150000
|
||||
#define WNNC_NET_CLEARCASE 0x00160000
|
||||
#define WNNC_NET_FRONTIER 0x00170000
|
||||
#define WNNC_NET_BMC 0x00180000
|
||||
#define WNNC_NET_DCE 0x00190000
|
||||
#define WNNC_NET_AVID 0x001A0000
|
||||
#define WNNC_NET_DOCUSPACE 0x001B0000
|
||||
#define WNNC_NET_MANGOSOFT 0x001C0000
|
||||
#define WNNC_NET_SERNET 0x001D0000
|
||||
#define WNNC_NET_DECORB 0x00200000
|
||||
#define WNNC_NET_PROTSTOR 0x00210000
|
||||
#define WNNC_NET_FJ_REDIR 0x00220000
|
||||
#define WNNC_NET_DISTINCT 0x00230000
|
||||
#define WNNC_NET_TWINS 0x00240000
|
||||
#define WNNC_NET_RDR2SAMPLE 0x00250000
|
||||
#define WNNC_NET_CSC 0x00260000
|
||||
#define WNNC_NET_3IN1 0x00270000
|
||||
#define WNNC_NET_EXTENDNET 0x00290000
|
||||
#define WNNC_NET_OBJECT_DIRE 0x00300000
|
||||
#define WNNC_NET_MASFAX 0x00310000
|
||||
#define WNNC_NET_HOB_NFS 0x00320000
|
||||
#define WNNC_NET_SHIVA 0x00330000
|
||||
#define WNNC_NET_IBMAL 0x00340000
|
||||
#define WNNC_CRED_MANAGER 0xFFFF0000
|
||||
|
||||
#define RESOURCE_CONNECTED 1
|
||||
#define RESOURCE_GLOBALNET 2
|
||||
#define RESOURCE_REMEMBERED 3
|
||||
#define RESOURCE_RECENT 4
|
||||
#define RESOURCE_CONTEXT 5
|
||||
#define RESOURCETYPE_ANY 0
|
||||
#define RESOURCETYPE_DISK 1
|
||||
#define RESOURCETYPE_PRINT 2
|
||||
#define RESOURCETYPE_RESERVED 8
|
||||
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
|
||||
#define RESOURCEUSAGE_CONNECTABLE 0x00000001
|
||||
#define RESOURCEUSAGE_CONTAINER 0x00000002
|
||||
#define WNNC_NET_MSNET 0x00010000
|
||||
#define WNNC_NET_LANMAN 0x00020000
|
||||
#define WNNC_NET_NETWARE 0x00030000
|
||||
#define WNNC_NET_VINES 0x00040000
|
||||
#define WNNC_NET_10NET 0x00050000
|
||||
#define WNNC_NET_LOCUS 0x00060000
|
||||
#define WNNC_NET_SUN_PC_NFS 0x00070000
|
||||
#define WNNC_NET_LANSTEP 0x00080000
|
||||
#define WNNC_NET_9TILES 0x00090000
|
||||
#define WNNC_NET_LANTASTIC 0x000A0000
|
||||
#define WNNC_NET_AS400 0x000B0000
|
||||
#define WNNC_NET_FTP_NFS 0x000C0000
|
||||
#define WNNC_NET_PATHWORKS 0x000D0000
|
||||
#define WNNC_NET_LIFENET 0x000E0000
|
||||
#define WNNC_NET_POWERLAN 0x000F0000
|
||||
#define WNNC_NET_BWNFS 0x00100000
|
||||
#define WNNC_NET_COGENT 0x00110000
|
||||
#define WNNC_NET_FARALLON 0x00120000
|
||||
#define WNNC_NET_APPLETALK 0x00130000
|
||||
#define WNNC_NET_INTERGRAPH 0x00140000
|
||||
#define WNNC_NET_SYMFONET 0x00150000
|
||||
#define WNNC_NET_CLEARCASE 0x00160000
|
||||
#define WNNC_NET_FRONTIER 0x00170000
|
||||
#define WNNC_NET_BMC 0x00180000
|
||||
#define WNNC_NET_DCE 0x00190000
|
||||
#define WNNC_NET_AVID 0x001A0000
|
||||
#define WNNC_NET_DOCUSPACE 0x001B0000
|
||||
#define WNNC_NET_MANGOSOFT 0x001C0000
|
||||
#define WNNC_NET_SERNET 0x001D0000
|
||||
#define WNNC_NET_RIVERFRONT1 0X001E0000
|
||||
#define WNNC_NET_RIVERFRONT2 0x001F0000
|
||||
#define WNNC_NET_DECORB 0x00200000
|
||||
#define WNNC_NET_PROTSTOR 0x00210000
|
||||
#define WNNC_NET_FJ_REDIR 0x00220000
|
||||
#define WNNC_NET_DISTINCT 0x00230000
|
||||
#define WNNC_NET_TWINS 0x00240000
|
||||
#define WNNC_NET_RDR2SAMPLE 0x00250000
|
||||
#define WNNC_NET_CSC 0x00260000
|
||||
#define WNNC_NET_3IN1 0x00270000
|
||||
#define WNNC_NET_EXTENDNET 0x00290000
|
||||
#define WNNC_NET_STAC 0x002A0000
|
||||
#define WNNC_NET_FOXBAT 0x002B0000
|
||||
#define WNNC_NET_YAHOO 0x002C0000
|
||||
#define WNNC_NET_EXIFS 0x002D0000
|
||||
#define WNNC_NET_DAV 0x002E0000
|
||||
#define WNNC_NET_KNOWARE 0x002F0000
|
||||
#define WNNC_NET_OBJECT_DIRE 0x00300000
|
||||
#define WNNC_NET_MASFAX 0x00310000
|
||||
#define WNNC_NET_HOB_NFS 0x00320000
|
||||
#define WNNC_NET_SHIVA 0x00330000
|
||||
#define WNNC_NET_IBMAL 0x00340000
|
||||
#define WNNC_NET_LOCK 0x00350000
|
||||
#define WNNC_NET_TERMSRV 0x00360000
|
||||
#define WNNC_NET_SRT 0x00370000
|
||||
#define WNNC_NET_QUINCY 0x00380000
|
||||
|
||||
#define WNNC_CRED_MANAGER 0xFFFF0000
|
||||
|
||||
#define RESOURCE_CONNECTED 0x00000001
|
||||
#define RESOURCE_GLOBALNET 0x00000002
|
||||
#define RESOURCE_REMEMBERED 0x00000003
|
||||
#define RESOURCE_RECENT 0x00000004
|
||||
#define RESOURCE_CONTEXT 0x00000005
|
||||
|
||||
#define RESOURCETYPE_ANY 0x00000000
|
||||
#define RESOURCETYPE_DISK 0x00000001
|
||||
#define RESOURCETYPE_PRINT 0x00000002
|
||||
#define RESOURCETYPE_RESERVED 0x00000008
|
||||
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
|
||||
|
||||
#define RESOURCEUSAGE_CONNECTABLE 0x00000001
|
||||
#define RESOURCEUSAGE_CONTAINER 0x00000002
|
||||
#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
|
||||
#define RESOURCEUSAGE_SIBLING 0x00000008
|
||||
#define RESOURCEUSAGE_ATTACHED 0x00000010
|
||||
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
|
||||
#define RESOURCEUSAGE_RESERVED 0x80000000
|
||||
#define RESOURCEDISPLAYTYPE_GENERIC 0
|
||||
#define RESOURCEDISPLAYTYPE_DOMAIN 1
|
||||
#define RESOURCEDISPLAYTYPE_SERVER 2
|
||||
#define RESOURCEDISPLAYTYPE_SHARE 3
|
||||
#define RESOURCEDISPLAYTYPE_FILE 4
|
||||
#define RESOURCEDISPLAYTYPE_GROUP 5
|
||||
#define RESOURCEDISPLAYTYPE_NETWORK 6
|
||||
#define RESOURCEDISPLAYTYPE_ROOT 7
|
||||
#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
|
||||
#define RESOURCEDISPLAYTYPE_DIRECTORY 9
|
||||
#define RESOURCEDISPLAYTYPE_TREE 10
|
||||
#define RESOURCEUSAGE_SIBLING 0x00000008
|
||||
#define RESOURCEUSAGE_ATTACHED 0x00000010
|
||||
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
|
||||
#define RESOURCEUSAGE_RESERVED 0x80000000
|
||||
|
||||
#define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
|
||||
#define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
|
||||
#define RESOURCEDISPLAYTYPE_SERVER 0x00000002
|
||||
#define RESOURCEDISPLAYTYPE_SHARE 0x00000003
|
||||
#define RESOURCEDISPLAYTYPE_FILE 0x00000004
|
||||
#define RESOURCEDISPLAYTYPE_GROUP 0x00000005
|
||||
#define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
|
||||
#define RESOURCEDISPLAYTYPE_ROOT 0x00000007
|
||||
#define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
|
||||
#define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
|
||||
#define RESOURCEDISPLAYTYPE_TREE 0x0000000A
|
||||
#define RESOURCEDISPLAYTYPE_NDSCONTAINER 0x0000000B
|
||||
|
||||
typedef struct _NETRESOURCEA {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
LPSTR lpComment;
|
||||
LPSTR lpProvider;
|
||||
}NETRESOURCEA,*LPNETRESOURCEA;
|
||||
typedef struct _NETRESOURCEW {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
LPWSTR lpComment;
|
||||
LPWSTR lpProvider;
|
||||
}NETRESOURCEW,*LPNETRESOURCEW;
|
||||
#ifdef UNICODE
|
||||
typedef NETRESOURCEW NETRESOURCE;
|
||||
typedef LPNETRESOURCEW LPNETRESOURCE;
|
||||
#else
|
||||
typedef NETRESOURCEA NETRESOURCE;
|
||||
typedef LPNETRESOURCEA LPNETRESOURCE;
|
||||
#endif
|
||||
|
||||
#define NETPROPERTY_PERSISTENT 1
|
||||
#define CONNECT_UPDATE_PROFILE 1
|
||||
#define CONNECT_UPDATE_RECENT 2
|
||||
#define CONNECT_TEMPORARY 4
|
||||
#define CONNECT_INTERACTIVE 8
|
||||
#define CONNECT_PROMPT 16
|
||||
#define CONNECT_NEED_DRIVE 32
|
||||
#define CONNECT_REFCOUNT 64
|
||||
#define CONNECT_REDIRECT 128
|
||||
#define CONNECT_LOCALDRIVE 256
|
||||
#define CONNECT_CURRENT_MEDIA 512
|
||||
#define CONNDLG_RO_PATH 1
|
||||
#define CONNDLG_CONN_POINT 2
|
||||
#define CONNDLG_USE_MRU 4
|
||||
#define CONNDLG_HIDE_BOX 8
|
||||
#define CONNDLG_PERSIST 16
|
||||
#define CONNDLG_NOT_PERSIST 32
|
||||
#define DISC_UPDATE_PROFILE 1
|
||||
#define DISC_NO_FORCE 64
|
||||
#define WNFMT_MULTILINE 1
|
||||
#define WNFMT_ABBREVIATED 2
|
||||
#define WNFMT_INENUM 16
|
||||
#define WNFMT_CONNECTION 32
|
||||
|
||||
#define CONNECT_UPDATE_PROFILE 0x00000001
|
||||
#define CONNECT_UPDATE_RECENT 0x00000002
|
||||
#define CONNECT_TEMPORARY 0x00000004
|
||||
#define CONNECT_INTERACTIVE 0x00000008
|
||||
#define CONNECT_PROMPT 0x00000010
|
||||
#define CONNECT_NEED_DRIVE 0x00000020
|
||||
#define CONNECT_REFCOUNT 0x00000040
|
||||
#define CONNECT_REDIRECT 0x00000080
|
||||
#define CONNECT_LOCALDRIVE 0x00000100
|
||||
#define CONNECT_CURRENT_MEDIA 0x00000200
|
||||
#define CONNECT_DEFERRED 0x00000400
|
||||
#define CONNECT_RESERVED 0xFF000000
|
||||
#define CONNECT_COMMANDLINE 0x00000800
|
||||
#define CONNECT_CMD_SAVECRED 0x00001000
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetAddConnection WNetAddConnectionW
|
||||
#define WNetAddConnection2 WNetAddConnection2W
|
||||
#define WNetAddConnection3 WNetAddConnection3W
|
||||
#define WNetCancelConnection WNetCancelConnectionW
|
||||
#define WNetCancelConnection2 WNetCancelConnection2W
|
||||
#define WNetGetConnection WNetGetConnectionW
|
||||
#define WNetRestoreConnection WNetRestoreConnectionW
|
||||
#define WNetUseConnection WNetUseConnectionW
|
||||
#else
|
||||
#define WNetAddConnection WNetAddConnectionA
|
||||
#define WNetAddConnection2 WNetAddConnection2A
|
||||
#define WNetAddConnection3 WNetAddConnection3A
|
||||
#define WNetCancelConnection WNetCancelConnectionA
|
||||
#define WNetCancelConnection2 WNetCancelConnection2A
|
||||
#define WNetGetConnection WNetGetConnectionA
|
||||
#define WNetRestoreConnection WNetRestoreConnectionA
|
||||
#define WNetUseConnection WNetUseConnectionA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetAddConnectionA(LPCSTR lpRemoteName,LPCSTR lpPassword,LPCSTR lpLocalName);
|
||||
DWORD WINAPI WNetAddConnectionW(LPCWSTR lpRemoteName,LPCWSTR lpPassword,LPCWSTR lpLocalName);
|
||||
DWORD WINAPI WNetAddConnection2A(LPNETRESOURCEA lpNetResource,LPCSTR lpPassword,LPCSTR lpUserName,DWORD dwFlags);
|
||||
DWORD WINAPI WNetAddConnection2W(LPNETRESOURCEW lpNetResource,LPCWSTR lpPassword,LPCWSTR lpUserName,DWORD dwFlags);
|
||||
DWORD WINAPI WNetAddConnection3A(HWND hwndOwner,LPNETRESOURCEA lpNetResource,LPCSTR lpPassword,LPCSTR lpUserName,DWORD dwFlags);
|
||||
DWORD WINAPI WNetAddConnection3W(HWND hwndOwner,LPNETRESOURCEW lpNetResource,LPCWSTR lpPassword,LPCWSTR lpUserName,DWORD dwFlags);
|
||||
DWORD WINAPI WNetCancelConnectionA(LPCSTR lpName,WINBOOL fForce);
|
||||
DWORD WINAPI WNetCancelConnectionW(LPCWSTR lpName,WINBOOL fForce);
|
||||
DWORD WINAPI WNetCancelConnection2A(LPCSTR lpName,DWORD dwFlags,WINBOOL fForce);
|
||||
DWORD WINAPI WNetCancelConnection2W(LPCWSTR lpName,DWORD dwFlags,WINBOOL fForce);
|
||||
DWORD WINAPI WNetGetConnectionA(LPCSTR lpLocalName,LPSTR lpRemoteName,LPDWORD lpnLength);
|
||||
DWORD WINAPI WNetGetConnectionW(LPCWSTR lpLocalName,LPWSTR lpRemoteName,LPDWORD lpnLength);
|
||||
DWORD WINAPI WNetRestoreConnectionA(HWND hwndParent,LPCSTR lpDevice);
|
||||
DWORD WINAPI WNetRestoreConnectionW(HWND hwndParent,LPCWSTR lpDevice);
|
||||
DWORD WINAPI WNetUseConnectionA(HWND hwndOwner,LPNETRESOURCEA lpNetResource,LPCSTR lpPassword,LPCSTR lpUserID,DWORD dwFlags,LPSTR lpAccessName,LPDWORD lpBufferSize,LPDWORD lpResult);
|
||||
DWORD WINAPI WNetUseConnectionW(HWND hwndOwner,LPNETRESOURCEW lpNetResource,LPCWSTR lpPassword,LPCWSTR lpUserID,DWORD dwFlags,LPWSTR lpAccessName,LPDWORD lpBufferSize,LPDWORD lpResult);
|
||||
DWORD WINAPI WNetConnectionDialog(HWND hwnd,DWORD dwType);
|
||||
DWORD WINAPI WNetDisconnectDialog(HWND hwnd,DWORD dwType);
|
||||
|
||||
typedef struct _CONNECTDLGSTRUCTA {
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEA lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
|
||||
|
||||
typedef struct _CONNECTDLGSTRUCTW {
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEW lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
|
||||
#ifdef UNICODE
|
||||
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT;
|
||||
typedef LPCONNECTDLGSTRUCTW LPCONNECTDLGSTRUCT;
|
||||
#else
|
||||
typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT;
|
||||
typedef LPCONNECTDLGSTRUCTA LPCONNECTDLGSTRUCT;
|
||||
#endif
|
||||
|
||||
#define CONNDLG_RO_PATH 0x00000001
|
||||
#define CONNDLG_CONN_POINT 0x00000002
|
||||
#define CONNDLG_USE_MRU 0x00000004
|
||||
#define CONNDLG_HIDE_BOX 0x00000008
|
||||
|
||||
#define CONNDLG_PERSIST 0x00000010
|
||||
#define CONNDLG_NOT_PERSIST 0x00000020
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1W
|
||||
#else
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1A
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA lpConnDlgStruct);
|
||||
DWORD WINAPI WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW lpConnDlgStruct);
|
||||
|
||||
typedef struct _DISCDLGSTRUCTA {
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
|
||||
|
||||
typedef struct _DISCDLGSTRUCTW {
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef DISCDLGSTRUCTW DISCDLGSTRUCT;
|
||||
typedef LPDISCDLGSTRUCTW LPDISCDLGSTRUCT;
|
||||
#else
|
||||
typedef DISCDLGSTRUCTA DISCDLGSTRUCT;
|
||||
typedef LPDISCDLGSTRUCTA LPDISCDLGSTRUCT;
|
||||
#endif
|
||||
|
||||
#define DISC_UPDATE_PROFILE 0x00000001
|
||||
#define DISC_NO_FORCE 0x00000040
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1W
|
||||
#define WNetOpenEnum WNetOpenEnumW
|
||||
#define WNetEnumResource WNetEnumResourceW
|
||||
#define WNetGetResourceParent WNetGetResourceParentW
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationW
|
||||
#else
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1A
|
||||
#define WNetOpenEnum WNetOpenEnumA
|
||||
#define WNetEnumResource WNetEnumResourceA
|
||||
#define WNetGetResourceParent WNetGetResourceParentA
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetDisconnectDialog1A(LPDISCDLGSTRUCTA lpConnDlgStruct);
|
||||
DWORD WINAPI WNetDisconnectDialog1W(LPDISCDLGSTRUCTW lpConnDlgStruct);
|
||||
DWORD WINAPI WNetOpenEnumA(DWORD dwScope,DWORD dwType,DWORD dwUsage,LPNETRESOURCEA lpNetResource,LPHANDLE lphEnum);
|
||||
DWORD WINAPI WNetOpenEnumW(DWORD dwScope,DWORD dwType,DWORD dwUsage,LPNETRESOURCEW lpNetResource,LPHANDLE lphEnum);
|
||||
DWORD WINAPI WNetEnumResourceA(HANDLE hEnum,LPDWORD lpcCount,LPVOID lpBuffer,LPDWORD lpBufferSize);
|
||||
DWORD WINAPI WNetEnumResourceW(HANDLE hEnum,LPDWORD lpcCount,LPVOID lpBuffer,LPDWORD lpBufferSize);
|
||||
DWORD WINAPI WNetCloseEnum(HANDLE hEnum);
|
||||
DWORD WINAPI WNetGetResourceParentA(LPNETRESOURCEA lpNetResource,LPVOID lpBuffer,LPDWORD lpcbBuffer);
|
||||
DWORD WINAPI WNetGetResourceParentW(LPNETRESOURCEW lpNetResource,LPVOID lpBuffer,LPDWORD lpcbBuffer);
|
||||
DWORD WINAPI WNetGetResourceInformationA(LPNETRESOURCEA lpNetResource,LPVOID lpBuffer,LPDWORD lpcbBuffer,LPSTR *lplpSystem);
|
||||
DWORD WINAPI WNetGetResourceInformationW(LPNETRESOURCEW lpNetResource,LPVOID lpBuffer,LPDWORD lpcbBuffer,LPWSTR *lplpSystem);
|
||||
|
||||
#define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
|
||||
#define REMOTE_NAME_INFO_LEVEL 0x00000002
|
||||
|
||||
typedef struct _UNIVERSAL_NAME_INFOA {
|
||||
LPSTR lpUniversalName;
|
||||
} UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
|
||||
|
||||
typedef struct _UNIVERSAL_NAME_INFOW {
|
||||
LPWSTR lpUniversalName;
|
||||
} UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO;
|
||||
typedef LPUNIVERSAL_NAME_INFOW LPUNIVERSAL_NAME_INFO;
|
||||
#else
|
||||
typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO;
|
||||
typedef LPUNIVERSAL_NAME_INFOA LPUNIVERSAL_NAME_INFO;
|
||||
#endif
|
||||
|
||||
typedef struct _REMOTE_NAME_INFOA {
|
||||
LPSTR lpUniversalName;
|
||||
LPSTR lpConnectionName;
|
||||
LPSTR lpRemainingPath;
|
||||
} REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
|
||||
|
||||
typedef struct _REMOTE_NAME_INFOW {
|
||||
LPWSTR lpUniversalName;
|
||||
LPWSTR lpConnectionName;
|
||||
LPWSTR lpRemainingPath;
|
||||
} REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO;
|
||||
typedef LPREMOTE_NAME_INFOW LPREMOTE_NAME_INFO;
|
||||
#else
|
||||
typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO;
|
||||
typedef LPREMOTE_NAME_INFOA LPREMOTE_NAME_INFO;
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetGetUniversalName WNetGetUniversalNameW
|
||||
#define WNetGetUser WNetGetUserW
|
||||
#define WNetGetProviderName WNetGetProviderNameW
|
||||
#else
|
||||
#define WNetGetUniversalName WNetGetUniversalNameA
|
||||
#define WNetGetUser WNetGetUserA
|
||||
#define WNetGetProviderName WNetGetProviderNameA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetGetUniversalNameA(LPCSTR lpLocalPath,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpBufferSize);
|
||||
DWORD WINAPI WNetGetUniversalNameW(LPCWSTR lpLocalPath,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpBufferSize);
|
||||
DWORD WINAPI WNetGetUserA(LPCSTR lpName,LPSTR lpUserName,LPDWORD lpnLength);
|
||||
DWORD WINAPI WNetGetUserW(LPCWSTR lpName,LPWSTR lpUserName,LPDWORD lpnLength);
|
||||
|
||||
#define WNFMT_MULTILINE 0x01
|
||||
#define WNFMT_ABBREVIATED 0x02
|
||||
#define WNFMT_INENUM 0x10
|
||||
#define WNFMT_CONNECTION 0x20
|
||||
|
||||
DWORD WINAPI WNetGetProviderNameA(DWORD dwNetType,LPSTR lpProviderName,LPDWORD lpBufferSize);
|
||||
DWORD WINAPI WNetGetProviderNameW(DWORD dwNetType,LPWSTR lpProviderName,LPDWORD lpBufferSize);
|
||||
|
||||
typedef struct _NETINFOSTRUCT {
|
||||
DWORD cbStructure;
|
||||
DWORD dwProviderVersion;
|
||||
DWORD dwStatus;
|
||||
DWORD dwCharacteristics;
|
||||
ULONG_PTR dwHandle;
|
||||
WORD wNetType;
|
||||
DWORD dwPrinters;
|
||||
DWORD dwDrives;
|
||||
} NETINFOSTRUCT,*LPNETINFOSTRUCT;
|
||||
|
||||
#define NETINFO_DLL16 0x00000001
|
||||
#define NETINFO_DISKRED 0x00000004
|
||||
#define NETINFO_PRINTERRED 0x00000008
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationW
|
||||
#else
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetGetNetworkInformationA(LPCSTR lpProvider,LPNETINFOSTRUCT lpNetInfoStruct);
|
||||
DWORD WINAPI WNetGetNetworkInformationW(LPCWSTR lpProvider,LPNETINFOSTRUCT lpNetInfoStruct);
|
||||
|
||||
typedef UINT (WINAPI *PFNGETPROFILEPATHA) (LPCSTR pszUsername,LPSTR pszBuffer,UINT cbBuffer);
|
||||
typedef UINT (WINAPI *PFNGETPROFILEPATHW) (LPCWSTR pszUsername,LPWSTR pszBuffer,UINT cbBuffer);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
|
||||
#else
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
|
||||
#endif
|
||||
|
||||
typedef UINT (WINAPI *PFNRECONCILEPROFILEA) (LPCSTR pszCentralFile,LPCSTR pszLocalFile,DWORD dwFlags);
|
||||
typedef UINT (WINAPI *PFNRECONCILEPROFILEW) (LPCWSTR pszCentralFile,LPCWSTR pszLocalFile,DWORD dwFlags);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
|
||||
#else
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
|
||||
#endif
|
||||
|
||||
#define RP_LOGON 0x01
|
||||
#define RP_INIFILE 0x02
|
||||
|
||||
typedef WINBOOL (WINAPI *PFNPROCESSPOLICIESA) (HWND hwnd,LPCSTR pszPath,LPCSTR pszUsername,LPCSTR pszComputerName,DWORD dwFlags);
|
||||
typedef WINBOOL (WINAPI *PFNPROCESSPOLICIESW) (HWND hwnd,LPCWSTR pszPath,LPCWSTR pszUsername,LPCWSTR pszComputerName,DWORD dwFlags);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
|
||||
#else
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
|
||||
#endif
|
||||
|
||||
#define PP_DISPLAYERRORS 0x01
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WNetGetLastError WNetGetLastErrorW
|
||||
#else
|
||||
#define WNetGetLastError WNetGetLastErrorA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI WNetGetLastErrorA(LPDWORD lpError,LPSTR lpErrorBuf,DWORD nErrorBufSize,LPSTR lpNameBuf,DWORD nNameBufSize);
|
||||
DWORD WINAPI WNetGetLastErrorW(LPDWORD lpError,LPWSTR lpErrorBuf,DWORD nErrorBufSize,LPWSTR lpNameBuf,DWORD nNameBufSize);
|
||||
|
||||
#define WN_SUCCESS NO_ERROR
|
||||
#define WN_NO_ERROR NO_ERROR
|
||||
#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
|
||||
|
@ -138,208 +440,36 @@ extern "C" {
|
|||
#define WN_BAD_PROFILE ERROR_BAD_PROFILE
|
||||
#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
|
||||
#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
|
||||
#define WN_CONNECTED_OTHER_PASSWORD ERROR_CONNECTED_OTHER_PASSWORD
|
||||
#define WN_CONNECTED_OTHER_PASSWORD_DEFAULT ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
|
||||
#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
|
||||
#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
|
||||
#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
|
||||
#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
|
||||
#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
|
||||
#define UNIVERSAL_NAME_INFO_LEVEL 1
|
||||
#define REMOTE_NAME_INFO_LEVEL 2
|
||||
#define NETINFO_DLL16 1
|
||||
#define NETINFO_DISKRED 4
|
||||
#define NETINFO_PRINTERRED 8
|
||||
#define RP_LOGON 1
|
||||
#define RP_INIFILE 2
|
||||
#define PP_DISPLAYERRORS 1
|
||||
#define WNCON_FORNETCARD 1
|
||||
#define WNCON_NOTROUTED 2
|
||||
#define WNCON_SLOWLINK 4
|
||||
#define WNCON_DYNAMIC 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct _NETRESOURCEA {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
LPSTR lpComment ;
|
||||
LPSTR lpProvider;
|
||||
}NETRESOURCEA,*LPNETRESOURCEA;
|
||||
typedef struct _NETRESOURCEW {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
LPWSTR lpComment ;
|
||||
LPWSTR lpProvider;
|
||||
}NETRESOURCEW,*LPNETRESOURCEW;
|
||||
typedef struct _CONNECTDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEA lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
|
||||
typedef struct _CONNECTDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEW lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
|
||||
typedef struct _DISCDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
|
||||
typedef struct _DISCDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
|
||||
typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
|
||||
typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
|
||||
typedef struct _REMOTE_NAME_INFOA {
|
||||
LPSTR lpUniversalName;
|
||||
LPSTR lpConnectionName;
|
||||
LPSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
|
||||
typedef struct _REMOTE_NAME_INFOW {
|
||||
LPWSTR lpUniversalName;
|
||||
LPWSTR lpConnectionName;
|
||||
LPWSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
|
||||
typedef struct _NETINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwProviderVersion;
|
||||
DWORD dwStatus;
|
||||
DWORD dwCharacteristics;
|
||||
DWORD dwHandle;
|
||||
WORD wNetType;
|
||||
DWORD dwPrinters;
|
||||
DWORD dwDrives;
|
||||
} NETINFOSTRUCT,*LPNETINFOSTRUCT;
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef struct _NETCONNECTINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSpeed;
|
||||
DWORD dwDelay;
|
||||
DWORD dwOptDataSize;
|
||||
} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
|
||||
typedef struct _NETCONNECTINFOSTRUCT {
|
||||
DWORD cbStructure;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSpeed;
|
||||
DWORD dwDelay;
|
||||
DWORD dwOptDataSize;
|
||||
} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
|
||||
|
||||
#define WNCON_FORNETCARD 0x00000001
|
||||
#define WNCON_NOTROUTED 0x00000002
|
||||
#define WNCON_SLOWLINK 0x00000004
|
||||
#define WNCON_DYNAMIC 0x00000008
|
||||
|
||||
DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
|
||||
DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
|
||||
DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
|
||||
DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetCloseEnum(HANDLE);
|
||||
DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPCSTR*);
|
||||
DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEA,LPVOID,LPDWORD,LPCWSTR*);
|
||||
DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
|
||||
DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
|
||||
#ifdef UNICODE
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
|
||||
typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
#define WNetEnumResource WNetEnumResourceW
|
||||
#define WNetOpenEnum WNetOpenEnumW
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationW
|
||||
#define WNetGetUniversalName WNetGetUniversalNameW
|
||||
#define WNetSetConnection WNetSetConnectionW
|
||||
#define WNetUseConnection WNetUseConnectionW
|
||||
#define WNetGetConnection WNetGetConnectionW
|
||||
#define WNetCancelConnection2 WNetCancelConnection2W
|
||||
#define WNetCancelConnection WNetCancelConnectionW
|
||||
#define WNetAddConnection3 WNetAddConnection3W
|
||||
#define WNetAddConnection2 WNetAddConnection2W
|
||||
#define WNetAddConnection WNetAddConnectionW
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1W
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1W
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationW
|
||||
#define WNetGetProviderName WNetGetProviderNameW
|
||||
#define WNetGetUser WNetGetUserW
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
|
||||
#define WNetGetLastError WNetGetLastErrorW
|
||||
#else
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
|
||||
typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
#define WNetOpenEnum WNetOpenEnumA
|
||||
#define WNetEnumResource WNetEnumResourceA
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationA
|
||||
#define WNetGetUniversalName WNetGetUniversalNameA
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1A
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1A
|
||||
#define WNetAddConnection2 WNetAddConnection2A
|
||||
#define WNetAddConnection3 WNetAddConnection3A
|
||||
#define WNetCancelConnection WNetCancelConnectionA
|
||||
#define WNetCancelConnection2 WNetCancelConnection2A
|
||||
#define WNetGetConnection WNetGetConnectionA
|
||||
#define WNetUseConnection WNetUseConnectionA
|
||||
#define WNetSetConnection WNetSetConnectionA
|
||||
#define WNetAddConnection WNetAddConnectionA
|
||||
#define WNetGetUser WNetGetUserA
|
||||
#define WNetGetProviderName WNetGetProviderNameA
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationA
|
||||
#define WNetGetLastError WNetGetLastErrorA
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DWORD WINAPI MultinetGetConnectionPerformanceA(LPNETRESOURCEA lpNetResource,LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
|
||||
DWORD WINAPI MultinetGetConnectionPerformanceW(LPNETRESOURCEW lpNetResource,LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,114 +1,129 @@
|
|||
#ifndef _WINREG_H
|
||||
#define _WINREG_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINREG_
|
||||
#define _WINREG_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
|
||||
#define HKEY_CURRENT_USER ((HKEY)0x80000001)
|
||||
#define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
|
||||
#define HKEY_USERS ((HKEY)0x80000003)
|
||||
#define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
|
||||
#define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
|
||||
#define HKEY_DYN_DATA ((HKEY)0x80000006)
|
||||
#define REG_OPTION_VOLATILE 1
|
||||
#define REG_OPTION_NON_VOLATILE 0
|
||||
#define REG_CREATED_NEW_KEY 1
|
||||
#define REG_OPENED_EXISTING_KEY 2
|
||||
#define REG_NONE 0
|
||||
#define REG_SZ 1
|
||||
#define REG_EXPAND_SZ 2
|
||||
#define REG_BINARY 3
|
||||
#define REG_DWORD 4
|
||||
#define REG_DWORD_BIG_ENDIAN 5
|
||||
#define REG_DWORD_LITTLE_ENDIAN 4
|
||||
#define REG_LINK 6
|
||||
#define REG_MULTI_SZ 7
|
||||
#define REG_RESOURCE_LIST 8
|
||||
#define REG_FULL_RESOURCE_DESCRIPTOR 9
|
||||
#define REG_RESOURCE_REQUIREMENTS_LIST 10
|
||||
#define REG_NOTIFY_CHANGE_NAME 1
|
||||
#define REG_NOTIFY_CHANGE_ATTRIBUTES 2
|
||||
#define REG_NOTIFY_CHANGE_LAST_SET 4
|
||||
#define REG_NOTIFY_CHANGE_SECURITY 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef ACCESS_MASK REGSAM;
|
||||
typedef struct value_entA {
|
||||
LPSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTA,*PVALENTA;
|
||||
typedef struct value_entW {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTW,*PVALENTW;
|
||||
BOOL WINAPI AbortSystemShutdownA(LPCSTR);
|
||||
BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
|
||||
BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
|
||||
BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
|
||||
LONG WINAPI RegCloseKey(HKEY);
|
||||
LONG WINAPI RegConnectRegistryA(LPSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegConnectRegistryW(LPWSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegDeleteValueA (HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegEnumKeyA (HKEY,DWORD,LPSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegFlushKey(HKEY);
|
||||
LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
|
||||
LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
||||
LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
|
||||
LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
|
||||
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
|
||||
LONG WINAPI RegQueryValueExA (HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
|
||||
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegRestoreKeyA (HKEY,LPCSTR,DWORD);
|
||||
LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
||||
LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0502
|
||||
#endif
|
||||
|
||||
#define RRF_RT_REG_NONE 0x00000001
|
||||
#define RRF_RT_REG_SZ 0x00000002
|
||||
#define RRF_RT_REG_EXPAND_SZ 0x00000004
|
||||
#define RRF_RT_REG_BINARY 0x00000008
|
||||
#define RRF_RT_REG_DWORD 0x00000010
|
||||
#define RRF_RT_REG_MULTI_SZ 0x00000020
|
||||
#define RRF_RT_REG_QWORD 0x00000040
|
||||
|
||||
#define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
|
||||
#define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
|
||||
#define RRF_RT_ANY 0x0000ffff
|
||||
|
||||
#define RRF_NOEXPAND 0x10000000
|
||||
#define RRF_ZEROONFAILURE 0x20000000
|
||||
|
||||
typedef ACCESS_MASK REGSAM;
|
||||
|
||||
#define HKEY_CLASSES_ROOT ((HKEY) (ULONG_PTR)((LONG)0x80000000))
|
||||
#define HKEY_CURRENT_USER ((HKEY) (ULONG_PTR)((LONG)0x80000001))
|
||||
#define HKEY_LOCAL_MACHINE ((HKEY) (ULONG_PTR)((LONG)0x80000002))
|
||||
#define HKEY_USERS ((HKEY) (ULONG_PTR)((LONG)0x80000003))
|
||||
#define HKEY_PERFORMANCE_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000004))
|
||||
#define HKEY_PERFORMANCE_TEXT ((HKEY) (ULONG_PTR)((LONG)0x80000050))
|
||||
#define HKEY_PERFORMANCE_NLSTEXT ((HKEY) (ULONG_PTR)((LONG)0x80000060))
|
||||
#define HKEY_CURRENT_CONFIG ((HKEY) (ULONG_PTR)((LONG)0x80000005))
|
||||
#define HKEY_DYN_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000006))
|
||||
|
||||
#define REG_SECURE_CONNECTION 1
|
||||
|
||||
#ifndef _PROVIDER_STRUCTS_DEFINED
|
||||
#define _PROVIDER_STRUCTS_DEFINED
|
||||
|
||||
#define PROVIDER_KEEPS_VALUE_LENGTH 0x1
|
||||
struct val_context {
|
||||
int valuelen;
|
||||
LPVOID value_context;
|
||||
LPVOID val_buff_ptr;
|
||||
};
|
||||
|
||||
typedef struct val_context *PVALCONTEXT;
|
||||
|
||||
typedef struct pvalueA {
|
||||
LPSTR pv_valuename;
|
||||
int pv_valuelen;
|
||||
LPVOID pv_value_context;
|
||||
DWORD pv_type;
|
||||
}PVALUEA,*PPVALUEA;
|
||||
|
||||
typedef struct pvalueW {
|
||||
LPWSTR pv_valuename;
|
||||
int pv_valuelen;
|
||||
LPVOID pv_value_context;
|
||||
DWORD pv_type;
|
||||
}PVALUEW,*PPVALUEW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef PVALUEW PVALUE;
|
||||
typedef PPVALUEW PPVALUE;
|
||||
#else
|
||||
typedef PVALUEA PVALUE;
|
||||
typedef PPVALUEA PPVALUE;
|
||||
#endif
|
||||
|
||||
typedef DWORD __cdecl QUERYHANDLER(LPVOID keycontext,PVALCONTEXT val_list,DWORD num_vals,LPVOID outputbuffer,DWORD *total_outlen,DWORD input_blen);
|
||||
|
||||
typedef QUERYHANDLER *PQUERYHANDLER;
|
||||
|
||||
typedef struct provider_info {
|
||||
PQUERYHANDLER pi_R0_1val;
|
||||
PQUERYHANDLER pi_R0_allvals;
|
||||
PQUERYHANDLER pi_R3_1val;
|
||||
PQUERYHANDLER pi_R3_allvals;
|
||||
DWORD pi_flags;
|
||||
LPVOID pi_key_context;
|
||||
} REG_PROVIDER;
|
||||
|
||||
typedef struct provider_info *PPROVIDER;
|
||||
|
||||
typedef struct value_entA {
|
||||
LPSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD_PTR ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTA,*PVALENTA;
|
||||
|
||||
typedef struct value_entW {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD_PTR ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTW,*PVALENTW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef VALENTW VALENT;
|
||||
typedef PVALENTW PVALENT;
|
||||
#else
|
||||
typedef VALENTA VALENT;
|
||||
typedef PVALENTA PVALENT;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define WIN31_CLASS NULL
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef VALENTW VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownW
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownW
|
||||
#define RegConnectRegistry RegConnectRegistryW
|
||||
#define RegConnectRegistryEx RegConnectRegistryExW
|
||||
#define RegCreateKey RegCreateKeyW
|
||||
#define RegCreateKeyEx RegCreateKeyExW
|
||||
#define RegDeleteKey RegDeleteKeyW
|
||||
#define RegDeleteKeyEx RegDeleteKeyExW
|
||||
#define RegDeleteValue RegDeleteValueW
|
||||
#define RegEnumKey RegEnumKeyW
|
||||
#define RegEnumKeyEx RegEnumKeyExW
|
||||
|
@ -117,8 +132,8 @@ typedef VALENTW VALENT,*PVALENT;
|
|||
#define RegOpenKey RegOpenKeyW
|
||||
#define RegOpenKeyEx RegOpenKeyExW
|
||||
#define RegQueryInfoKey RegQueryInfoKeyW
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesW
|
||||
#define RegQueryValue RegQueryValueW
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesW
|
||||
#define RegQueryValueEx RegQueryValueExW
|
||||
#define RegReplaceKey RegReplaceKeyW
|
||||
#define RegRestoreKey RegRestoreKeyW
|
||||
|
@ -126,14 +141,16 @@ typedef VALENTW VALENT,*PVALENT;
|
|||
#define RegSetValue RegSetValueW
|
||||
#define RegSetValueEx RegSetValueExW
|
||||
#define RegUnLoadKey RegUnLoadKeyW
|
||||
#define RegGetValue RegGetValueW
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownW
|
||||
#define AbortSystemShutdown AbortSystemShutdownW
|
||||
#else
|
||||
typedef VALENTA VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownA
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownA
|
||||
#define RegConnectRegistry RegConnectRegistryA
|
||||
#define RegConnectRegistryEx RegConnectRegistryExA
|
||||
#define RegCreateKey RegCreateKeyA
|
||||
#define RegCreateKeyEx RegCreateKeyExA
|
||||
#define RegDeleteKey RegDeleteKeyA
|
||||
#define RegDeleteKeyEx RegDeleteKeyExA
|
||||
#define RegDeleteValue RegDeleteValueA
|
||||
#define RegEnumKey RegEnumKeyA
|
||||
#define RegEnumKeyEx RegEnumKeyExA
|
||||
|
@ -142,8 +159,8 @@ typedef VALENTA VALENT,*PVALENT;
|
|||
#define RegOpenKey RegOpenKeyA
|
||||
#define RegOpenKeyEx RegOpenKeyExA
|
||||
#define RegQueryInfoKey RegQueryInfoKeyA
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesA
|
||||
#define RegQueryValue RegQueryValueA
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesA
|
||||
#define RegQueryValueEx RegQueryValueExA
|
||||
#define RegReplaceKey RegReplaceKeyA
|
||||
#define RegRestoreKey RegRestoreKeyA
|
||||
|
@ -151,8 +168,104 @@ typedef VALENTA VALENT,*PVALENT;
|
|||
#define RegSetValue RegSetValueA
|
||||
#define RegSetValueEx RegSetValueExA
|
||||
#define RegUnLoadKey RegUnLoadKeyA
|
||||
#define RegGetValue RegGetValueA
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownA
|
||||
#define AbortSystemShutdown AbortSystemShutdownA
|
||||
#endif
|
||||
|
||||
WINADVAPI LONG WINAPI RegCloseKey(HKEY hKey);
|
||||
WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY hKey,HKEY hNewHKey);
|
||||
WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE hToken,DWORD dwOptions,REGSAM samDesired,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM samDesired,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegDisablePredefinedCache();
|
||||
WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR lpMachineName,HKEY hKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName,HKEY hKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegConnectRegistryExA(LPCSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegConnectRegistryExW(LPCWSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegCreateKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegCreateKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD Reserved,LPSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
|
||||
WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD Reserved,LPWSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
|
||||
WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY hKey,LPCSTR lpSubKey);
|
||||
WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY hKey,LPCWSTR lpSubKey);
|
||||
WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY hKey,LPCSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
|
||||
WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
|
||||
WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY hBase);
|
||||
WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY hBase);
|
||||
WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY hBase,WINBOOL *bIsReflectionDisabled);
|
||||
WINADVAPI LONG WINAPI RegDeleteValueA(HKEY hKey,LPCSTR lpValueName);
|
||||
WINADVAPI LONG WINAPI RegDeleteValueW(HKEY hKey,LPCWSTR lpValueName);
|
||||
WINADVAPI LONG WINAPI RegEnumKeyA(HKEY hKey,DWORD dwIndex,LPSTR lpName,DWORD cchName);
|
||||
WINADVAPI LONG WINAPI RegEnumKeyW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,DWORD cchName);
|
||||
WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY hKey,DWORD dwIndex,LPSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
|
||||
WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPWSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
|
||||
WINADVAPI LONG WINAPI RegEnumValueA(HKEY hKey,DWORD dwIndex,LPSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
|
||||
WINADVAPI LONG WINAPI RegEnumValueW(HKEY hKey,DWORD dwIndex,LPWSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
|
||||
WINADVAPI LONG WINAPI RegFlushKey(HKEY hKey);
|
||||
WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,LPDWORD lpcbSecurityDescriptor);
|
||||
WINADVAPI LONG WINAPI RegLoadKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpFile);
|
||||
WINADVAPI LONG WINAPI RegLoadKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpFile);
|
||||
WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY hKey,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,HANDLE hEvent,WINBOOL fAsynchronous);
|
||||
WINADVAPI LONG WINAPI RegOpenKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegOpenKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
|
||||
WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY hKey,LPSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
|
||||
WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY hKey,LPWSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
|
||||
WINADVAPI LONG WINAPI RegQueryValueA(HKEY hKey,LPCSTR lpSubKey,LPSTR lpData,PLONG lpcbData);
|
||||
WINADVAPI LONG WINAPI RegQueryValueW(HKEY hKey,LPCWSTR lpSubKey,LPWSTR lpData,PLONG lpcbData);
|
||||
WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY hKey,PVALENTA val_list,DWORD num_vals,LPSTR lpValueBuf,LPDWORD ldwTotsize);
|
||||
WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY hKey,PVALENTW val_list,DWORD num_vals,LPWSTR lpValueBuf,LPDWORD ldwTotsize);
|
||||
WINADVAPI LONG WINAPI RegQueryValueExA(HKEY hKey,LPCSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
|
||||
WINADVAPI LONG WINAPI RegQueryValueExW(HKEY hKey,LPCWSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
|
||||
WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpNewFile,LPCSTR lpOldFile);
|
||||
WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpNewFile,LPCWSTR lpOldFile);
|
||||
WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY hKey,LPCSTR lpFile,DWORD dwFlags);
|
||||
WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY hKey,LPCWSTR lpFile,DWORD dwFlags);
|
||||
WINADVAPI LONG WINAPI RegSaveKeyA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
WINADVAPI LONG WINAPI RegSaveKeyW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
|
||||
WINADVAPI LONG WINAPI RegSetValueA(HKEY hKey,LPCSTR lpSubKey,DWORD dwType,LPCSTR lpData,DWORD cbData);
|
||||
WINADVAPI LONG WINAPI RegSetValueW(HKEY hKey,LPCWSTR lpSubKey,DWORD dwType,LPCWSTR lpData,DWORD cbData);
|
||||
WINADVAPI LONG WINAPI RegSetValueExA(HKEY hKey,LPCSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
|
||||
WINADVAPI LONG WINAPI RegSetValueExW(HKEY hKey,LPCWSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
|
||||
WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY hKey,LPCSTR lpSubKey);
|
||||
WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY hKey,LPCWSTR lpSubKey);
|
||||
WINADVAPI LONG WINAPI RegGetValueA(HKEY hkey,LPCSTR lpSubKey,LPCSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
|
||||
WINADVAPI LONG WINAPI RegGetValueW(HKEY hkey,LPCWSTR lpSubKey,LPCWSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
|
||||
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
|
||||
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
|
||||
WINADVAPI WINBOOL WINAPI AbortSystemShutdownA(LPSTR lpMachineName);
|
||||
WINADVAPI WINBOOL WINAPI AbortSystemShutdownW(LPWSTR lpMachineName);
|
||||
|
||||
#include <reason.h>
|
||||
|
||||
#define REASON_SWINSTALL SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_INSTALLATION
|
||||
#define REASON_HWINSTALL SHTDN_REASON_MAJOR_HARDWARE|SHTDN_REASON_MINOR_INSTALLATION
|
||||
#define REASON_SERVICEHANG SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_HUNG
|
||||
#define REASON_UNSTABLE SHTDN_REASON_MAJOR_SYSTEM|SHTDN_REASON_MINOR_UNSTABLE
|
||||
#define REASON_SWHWRECONF SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_RECONFIG
|
||||
#define REASON_OTHER SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER
|
||||
#define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
|
||||
#define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
|
||||
#define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
|
||||
|
||||
#define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
|
||||
|
||||
#ifdef UNICODE
|
||||
#define InitiateSystemShutdownEx InitiateSystemShutdownExW
|
||||
#define RegSaveKeyEx RegSaveKeyExW
|
||||
#else
|
||||
#define InitiateSystemShutdownEx InitiateSystemShutdownExA
|
||||
#define RegSaveKeyEx RegSaveKeyExA
|
||||
#endif
|
||||
|
||||
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
|
||||
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
|
||||
WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
|
||||
WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
|
||||
WINADVAPI LONG WINAPI Wow64Win32ApiEntry (DWORD dwFuncNumber,DWORD dwFlag,DWORD dwRes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,266 +1,321 @@
|
|||
#ifndef _WINSVC_H
|
||||
#define _WINSVC_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _WINSVC_
|
||||
#define _WINSVC_
|
||||
|
||||
#ifndef WINADVAPI
|
||||
#define WINADVAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
|
||||
|
||||
#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
|
||||
#define SERVICES_FAILED_DATABASEA "ServicesFailed"
|
||||
#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
|
||||
#define SC_GROUP_IDENTIFIERA '+'
|
||||
|
||||
#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
|
||||
#define SERVICES_FAILED_DATABASEA "ServicesFailed"
|
||||
|
||||
#define SC_GROUP_IDENTIFIERW L'+'
|
||||
#define SC_MANAGER_ALL_ACCESS 0xf003f
|
||||
#define SC_MANAGER_CONNECT 1
|
||||
#define SC_MANAGER_CREATE_SERVICE 2
|
||||
#define SC_MANAGER_ENUMERATE_SERVICE 4
|
||||
#define SC_MANAGER_LOCK 8
|
||||
#define SC_MANAGER_QUERY_LOCK_STATUS 16
|
||||
#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
|
||||
#define SERVICE_NO_CHANGE (-1)
|
||||
#define SERVICE_STOPPED 1
|
||||
#define SERVICE_START_PENDING 2
|
||||
#define SERVICE_STOP_PENDING 3
|
||||
#define SERVICE_RUNNING 4
|
||||
#define SERVICE_CONTINUE_PENDING 5
|
||||
#define SERVICE_PAUSE_PENDING 6
|
||||
#define SERVICE_PAUSED 7
|
||||
#define SERVICE_ACCEPT_STOP 1
|
||||
#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
|
||||
#define SERVICE_ACCEPT_SHUTDOWN 4
|
||||
#define SERVICE_ACCEPT_PARAMCHANGE 8
|
||||
#define SERVICE_ACCEPT_NETBINDCHANGE 16
|
||||
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
|
||||
#define SERVICE_ACCEPT_POWEREVENT 64
|
||||
#define SERVICE_ACCEPT_SESSIONCHANGE 128
|
||||
#define SERVICE_CONTROL_STOP 1
|
||||
#define SERVICE_CONTROL_PAUSE 2
|
||||
#define SERVICE_CONTROL_CONTINUE 3
|
||||
#define SERVICE_CONTROL_INTERROGATE 4
|
||||
#define SERVICE_CONTROL_SHUTDOWN 5
|
||||
#define SERVICE_CONTROL_PARAMCHANGE 6
|
||||
#define SERVICE_CONTROL_NETBINDADD 7
|
||||
#define SERVICE_CONTROL_NETBINDREMOVE 8
|
||||
#define SERVICE_CONTROL_NETBINDENABLE 9
|
||||
#define SERVICE_CONTROL_NETBINDDISABLE 10
|
||||
#define SERVICE_CONTROL_DEVICEEVENT 11
|
||||
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
|
||||
#define SERVICE_CONTROL_POWEREVENT 13
|
||||
#define SERVICE_CONTROL_SESSIONCHANGE 14
|
||||
#define SERVICE_ACTIVE 1
|
||||
#define SERVICE_INACTIVE 2
|
||||
#define SERVICE_STATE_ALL 3
|
||||
#define SERVICE_QUERY_CONFIG 1
|
||||
#define SERVICE_CHANGE_CONFIG 2
|
||||
#define SERVICE_QUERY_STATUS 4
|
||||
#define SERVICE_ENUMERATE_DEPENDENTS 8
|
||||
#define SERVICE_START 16
|
||||
#define SERVICE_STOP 32
|
||||
#define SERVICE_PAUSE_CONTINUE 64
|
||||
#define SERVICE_INTERROGATE 128
|
||||
#define SERVICE_USER_DEFINED_CONTROL 256
|
||||
#define SERVICE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS|SERVICE_ENUMERATE_DEPENDENTS|SERVICE_START|SERVICE_STOP|SERVICE_PAUSE_CONTINUE|SERVICE_INTERROGATE|SERVICE_USER_DEFINED_CONTROL)
|
||||
#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
|
||||
#define SERVICE_CONFIG_DESCRIPTION 1
|
||||
#define SERVICE_CONFIG_FAILURE_ACTIONS 2
|
||||
|
||||
typedef struct _SERVICE_STATUS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
} SERVICE_STATUS,*LPSERVICE_STATUS;
|
||||
typedef struct _SERVICE_STATUS_PROCESS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
DWORD dwProcessId;
|
||||
DWORD dwServiceFlags;
|
||||
} SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
|
||||
typedef enum _SC_STATUS_TYPE {
|
||||
SC_STATUS_PROCESS_INFO = 0
|
||||
} SC_STATUS_TYPE;
|
||||
typedef enum _SC_ENUM_TYPE {
|
||||
SC_ENUM_PROCESS_INFO = 0
|
||||
} SC_ENUM_TYPE;
|
||||
typedef struct _ENUM_SERVICE_STATUSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
|
||||
typedef struct _ENUM_SERVICE_STATUSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
|
||||
typedef struct _QUERY_SERVICE_CONFIGA {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPSTR lpBinaryPathName;
|
||||
LPSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPSTR lpDependencies;
|
||||
LPSTR lpServiceStartName;
|
||||
LPSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
|
||||
typedef struct _QUERY_SERVICE_CONFIGW {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPWSTR lpBinaryPathName;
|
||||
LPWSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPWSTR lpDependencies;
|
||||
LPWSTR lpServiceStartName;
|
||||
LPWSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSA {
|
||||
DWORD fIsLocked;
|
||||
LPSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSW {
|
||||
DWORD fIsLocked;
|
||||
LPWSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
|
||||
typedef struct _SERVICE_TABLE_ENTRYA {
|
||||
LPSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
|
||||
typedef struct _SERVICE_TABLE_ENTRYW {
|
||||
LPWSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
|
||||
DECLARE_HANDLE(SC_HANDLE);
|
||||
typedef SC_HANDLE *LPSC_HANDLE;
|
||||
typedef PVOID SC_LOCK;
|
||||
typedef DWORD SERVICE_STATUS_HANDLE;
|
||||
typedef VOID(WINAPI *LPHANDLER_FUNCTION)(DWORD);
|
||||
typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
|
||||
typedef struct _SERVICE_DESCRIPTIONA {
|
||||
LPSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
|
||||
typedef struct _SERVICE_DESCRIPTIONW {
|
||||
LPWSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
|
||||
typedef enum _SC_ACTION_TYPE {
|
||||
SC_ACTION_NONE = 0,
|
||||
SC_ACTION_RESTART = 1,
|
||||
SC_ACTION_REBOOT = 2,
|
||||
SC_ACTION_RUN_COMMAND = 3
|
||||
} SC_ACTION_TYPE;
|
||||
typedef struct _SC_ACTION {
|
||||
SC_ACTION_TYPE Type;
|
||||
DWORD Delay;
|
||||
} SC_ACTION,*LPSC_ACTION;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSA {
|
||||
DWORD dwResetPeriod;
|
||||
LPSTR lpRebootMsg;
|
||||
LPSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSW {
|
||||
DWORD dwResetPeriod;
|
||||
LPWSTR lpRebootMsg;
|
||||
LPWSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
|
||||
|
||||
BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
||||
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI CloseServiceHandle(SC_HANDLE);
|
||||
BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
|
||||
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
|
||||
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI DeleteService(SC_HANDLE);
|
||||
BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
|
||||
BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
|
||||
BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
|
||||
BOOL WINAPI NotifyBootConfigStatus(BOOL);
|
||||
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
|
||||
BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
|
||||
BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR);
|
||||
BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
|
||||
#define SC_GROUP_IDENTIFIERA '+'
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONW LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
|
||||
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
|
||||
#else
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
|
||||
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
|
||||
#endif
|
||||
|
||||
#define SERVICE_NO_CHANGE 0xffffffff
|
||||
|
||||
#define SERVICE_ACTIVE 0x00000001
|
||||
#define SERVICE_INACTIVE 0x00000002
|
||||
#define SERVICE_STATE_ALL (SERVICE_ACTIVE | SERVICE_INACTIVE)
|
||||
|
||||
#define SERVICE_CONTROL_STOP 0x00000001
|
||||
#define SERVICE_CONTROL_PAUSE 0x00000002
|
||||
#define SERVICE_CONTROL_CONTINUE 0x00000003
|
||||
#define SERVICE_CONTROL_INTERROGATE 0x00000004
|
||||
#define SERVICE_CONTROL_SHUTDOWN 0x00000005
|
||||
#define SERVICE_CONTROL_PARAMCHANGE 0x00000006
|
||||
#define SERVICE_CONTROL_NETBINDADD 0x00000007
|
||||
#define SERVICE_CONTROL_NETBINDREMOVE 0x00000008
|
||||
#define SERVICE_CONTROL_NETBINDENABLE 0x00000009
|
||||
#define SERVICE_CONTROL_NETBINDDISABLE 0x0000000A
|
||||
#define SERVICE_CONTROL_DEVICEEVENT 0x0000000B
|
||||
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 0x0000000C
|
||||
#define SERVICE_CONTROL_POWEREVENT 0x0000000D
|
||||
#define SERVICE_CONTROL_SESSIONCHANGE 0x0000000E
|
||||
|
||||
#define SERVICE_STOPPED 0x00000001
|
||||
#define SERVICE_START_PENDING 0x00000002
|
||||
#define SERVICE_STOP_PENDING 0x00000003
|
||||
#define SERVICE_RUNNING 0x00000004
|
||||
#define SERVICE_CONTINUE_PENDING 0x00000005
|
||||
#define SERVICE_PAUSE_PENDING 0x00000006
|
||||
#define SERVICE_PAUSED 0x00000007
|
||||
|
||||
#define SERVICE_ACCEPT_STOP 0x00000001
|
||||
#define SERVICE_ACCEPT_PAUSE_CONTINUE 0x00000002
|
||||
#define SERVICE_ACCEPT_SHUTDOWN 0x00000004
|
||||
#define SERVICE_ACCEPT_PARAMCHANGE 0x00000008
|
||||
#define SERVICE_ACCEPT_NETBINDCHANGE 0x00000010
|
||||
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 0x00000020
|
||||
#define SERVICE_ACCEPT_POWEREVENT 0x00000040
|
||||
#define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080
|
||||
|
||||
#define SC_MANAGER_CONNECT 0x0001
|
||||
#define SC_MANAGER_CREATE_SERVICE 0x0002
|
||||
#define SC_MANAGER_ENUMERATE_SERVICE 0x0004
|
||||
#define SC_MANAGER_LOCK 0x0008
|
||||
#define SC_MANAGER_QUERY_LOCK_STATUS 0x0010
|
||||
#define SC_MANAGER_MODIFY_BOOT_CONFIG 0x0020
|
||||
|
||||
#define SC_MANAGER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG)
|
||||
|
||||
#define SERVICE_QUERY_CONFIG 0x0001
|
||||
#define SERVICE_CHANGE_CONFIG 0x0002
|
||||
#define SERVICE_QUERY_STATUS 0x0004
|
||||
#define SERVICE_ENUMERATE_DEPENDENTS 0x0008
|
||||
#define SERVICE_START 0x0010
|
||||
#define SERVICE_STOP 0x0020
|
||||
#define SERVICE_PAUSE_CONTINUE 0x0040
|
||||
#define SERVICE_INTERROGATE 0x0080
|
||||
#define SERVICE_USER_DEFINED_CONTROL 0x0100
|
||||
|
||||
#define SERVICE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL)
|
||||
|
||||
#define SERVICE_RUNS_IN_SYSTEM_PROCESS 0x00000001
|
||||
|
||||
#define SERVICE_CONFIG_DESCRIPTION 1
|
||||
#define SERVICE_CONFIG_FAILURE_ACTIONS 2
|
||||
|
||||
typedef struct _SERVICE_DESCRIPTIONA {
|
||||
LPSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
|
||||
|
||||
typedef struct _SERVICE_DESCRIPTIONW {
|
||||
LPWSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
|
||||
#else
|
||||
typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
|
||||
#endif
|
||||
|
||||
typedef enum _SC_ACTION_TYPE {
|
||||
SC_ACTION_NONE = 0,SC_ACTION_RESTART = 1,SC_ACTION_REBOOT = 2,SC_ACTION_RUN_COMMAND = 3
|
||||
} SC_ACTION_TYPE;
|
||||
|
||||
typedef struct _SC_ACTION {
|
||||
SC_ACTION_TYPE Type;
|
||||
DWORD Delay;
|
||||
} SC_ACTION,*LPSC_ACTION;
|
||||
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSA {
|
||||
DWORD dwResetPeriod;
|
||||
LPSTR lpRebootMsg;
|
||||
LPSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION *lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
|
||||
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSW {
|
||||
DWORD dwResetPeriod;
|
||||
LPWSTR lpRebootMsg;
|
||||
LPWSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION *lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
|
||||
#else
|
||||
typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
|
||||
#endif
|
||||
|
||||
DECLARE_HANDLE(SC_HANDLE);
|
||||
typedef SC_HANDLE *LPSC_HANDLE;
|
||||
|
||||
DECLARE_HANDLE(SERVICE_STATUS_HANDLE);
|
||||
|
||||
typedef enum _SC_STATUS_TYPE {
|
||||
SC_STATUS_PROCESS_INFO = 0
|
||||
} SC_STATUS_TYPE;
|
||||
|
||||
typedef enum _SC_ENUM_TYPE {
|
||||
SC_ENUM_PROCESS_INFO = 0
|
||||
} SC_ENUM_TYPE;
|
||||
|
||||
typedef struct _SERVICE_STATUS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
} SERVICE_STATUS,*LPSERVICE_STATUS;
|
||||
|
||||
typedef struct _SERVICE_STATUS_PROCESS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
DWORD dwProcessId;
|
||||
DWORD dwServiceFlags;
|
||||
} SERVICE_STATUS_PROCESS,*LPSERVICE_STATUS_PROCESS;
|
||||
|
||||
typedef struct _ENUM_SERVICE_STATUSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
|
||||
|
||||
typedef struct _ENUM_SERVICE_STATUSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS;
|
||||
typedef LPENUM_SERVICE_STATUSW LPENUM_SERVICE_STATUS;
|
||||
#else
|
||||
typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS;
|
||||
typedef LPENUM_SERVICE_STATUSA LPENUM_SERVICE_STATUS;
|
||||
#endif
|
||||
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
|
||||
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
|
||||
#else
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
|
||||
#endif
|
||||
|
||||
typedef LPVOID SC_LOCK;
|
||||
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSA {
|
||||
DWORD fIsLocked;
|
||||
LPSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
|
||||
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSW {
|
||||
DWORD fIsLocked;
|
||||
LPWSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS;
|
||||
typedef LPQUERY_SERVICE_LOCK_STATUSW LPQUERY_SERVICE_LOCK_STATUS;
|
||||
#else
|
||||
typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS;
|
||||
typedef LPQUERY_SERVICE_LOCK_STATUSA LPQUERY_SERVICE_LOCK_STATUS;
|
||||
#endif
|
||||
|
||||
typedef struct _QUERY_SERVICE_CONFIGA {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPSTR lpBinaryPathName;
|
||||
LPSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPSTR lpDependencies;
|
||||
LPSTR lpServiceStartName;
|
||||
LPSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
|
||||
|
||||
typedef struct _QUERY_SERVICE_CONFIGW {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPWSTR lpBinaryPathName;
|
||||
LPWSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPWSTR lpDependencies;
|
||||
LPWSTR lpServiceStartName;
|
||||
LPWSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG;
|
||||
typedef LPQUERY_SERVICE_CONFIGW LPQUERY_SERVICE_CONFIG;
|
||||
#else
|
||||
typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG;
|
||||
typedef LPQUERY_SERVICE_CONFIGA LPQUERY_SERVICE_CONFIG;
|
||||
#endif
|
||||
|
||||
typedef VOID (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD dwNumServicesArgs,LPWSTR *lpServiceArgVectors);
|
||||
typedef VOID (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD dwNumServicesArgs,LPSTR *lpServiceArgVectors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define LPSERVICE_MAIN_FUNCTION LPSERVICE_MAIN_FUNCTIONW
|
||||
#else
|
||||
#define LPSERVICE_MAIN_FUNCTION LPSERVICE_MAIN_FUNCTIONA
|
||||
#endif
|
||||
|
||||
typedef struct _SERVICE_TABLE_ENTRYA {
|
||||
LPSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
|
||||
|
||||
typedef struct _SERVICE_TABLE_ENTRYW {
|
||||
LPWSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_TABLE_ENTRYW LPSERVICE_TABLE_ENTRY;
|
||||
#else
|
||||
typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_TABLE_ENTRYA LPSERVICE_TABLE_ENTRY;
|
||||
#endif
|
||||
|
||||
typedef VOID (WINAPI *LPHANDLER_FUNCTION)(DWORD dwControl);
|
||||
typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD dwControl,DWORD dwEventType,LPVOID lpEventData,LPVOID lpContext);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define ChangeServiceConfig ChangeServiceConfigW
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2W
|
||||
#define CreateService CreateServiceW
|
||||
#define EnumDependentServices EnumDependentServicesW
|
||||
#define EnumServicesStatus EnumServicesStatusW
|
||||
#define EnumServicesStatusEx EnumServicesStatusExW
|
||||
#define GetServiceDisplayName GetServiceDisplayNameW
|
||||
#define EnumServicesStatusEx EnumServicesStatusExW
|
||||
#define GetServiceKeyName GetServiceKeyNameW
|
||||
#define GetServiceDisplayName GetServiceDisplayNameW
|
||||
#define OpenSCManager OpenSCManagerW
|
||||
#define OpenService OpenServiceW
|
||||
#define QueryServiceConfig QueryServiceConfigW
|
||||
|
@ -268,31 +323,17 @@ typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
|
|||
#define QueryServiceLockStatus QueryServiceLockStatusW
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
|
||||
#define StartService StartServiceW
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
|
||||
#define StartService StartServiceW
|
||||
#else
|
||||
typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
|
||||
#define ChangeServiceConfig ChangeServiceConfigA
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2A
|
||||
#define CreateService CreateServiceA
|
||||
#define EnumDependentServices EnumDependentServicesA
|
||||
#define EnumServicesStatus EnumServicesStatusA
|
||||
#define EnumServicesStatusEx EnumServicesStatusExA
|
||||
#define GetServiceDisplayName GetServiceDisplayNameA
|
||||
#define EnumServicesStatusEx EnumServicesStatusExA
|
||||
#define GetServiceKeyName GetServiceKeyNameA
|
||||
#define GetServiceDisplayName GetServiceDisplayNameA
|
||||
#define OpenSCManager OpenSCManagerA
|
||||
#define OpenService OpenServiceA
|
||||
#define QueryServiceConfig QueryServiceConfigA
|
||||
|
@ -300,10 +341,57 @@ typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
|
|||
#define QueryServiceLockStatus QueryServiceLockStatusA
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
|
||||
#define StartService StartServiceA
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
|
||||
#define StartService StartServiceA
|
||||
#endif
|
||||
|
||||
WINADVAPI WINBOOL WINAPI ChangeServiceConfigA(SC_HANDLE hService,DWORD dwServiceType,DWORD dwStartType,DWORD dwErrorControl,LPCSTR lpBinaryPathName,LPCSTR lpLoadOrderGroup,LPDWORD lpdwTagId,LPCSTR lpDependencies,LPCSTR lpServiceStartName,LPCSTR lpPassword,LPCSTR lpDisplayName);
|
||||
WINADVAPI WINBOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService,DWORD dwServiceType,DWORD dwStartType,DWORD dwErrorControl,LPCWSTR lpBinaryPathName,LPCWSTR lpLoadOrderGroup,LPDWORD lpdwTagId,LPCWSTR lpDependencies,LPCWSTR lpServiceStartName,LPCWSTR lpPassword,LPCWSTR lpDisplayName);
|
||||
WINADVAPI WINBOOL WINAPI ChangeServiceConfig2A(SC_HANDLE hService,DWORD dwInfoLevel,LPVOID lpInfo);
|
||||
WINADVAPI WINBOOL WINAPI ChangeServiceConfig2W(SC_HANDLE hService,DWORD dwInfoLevel,LPVOID lpInfo);
|
||||
WINADVAPI WINBOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject);
|
||||
WINADVAPI WINBOOL WINAPI ControlService(SC_HANDLE hService,DWORD dwControl,LPSERVICE_STATUS lpServiceStatus);
|
||||
WINADVAPI SC_HANDLE WINAPI CreateServiceA(SC_HANDLE hSCManager,LPCSTR lpServiceName,LPCSTR lpDisplayName,DWORD dwDesiredAccess,DWORD dwServiceType,DWORD dwStartType,DWORD dwErrorControl,LPCSTR lpBinaryPathName,LPCSTR lpLoadOrderGroup,LPDWORD lpdwTagId,LPCSTR lpDependencies,LPCSTR lpServiceStartName,LPCSTR lpPassword);
|
||||
WINADVAPI SC_HANDLE WINAPI CreateServiceW(SC_HANDLE hSCManager,LPCWSTR lpServiceName,LPCWSTR lpDisplayName,DWORD dwDesiredAccess,DWORD dwServiceType,DWORD dwStartType,DWORD dwErrorControl,LPCWSTR lpBinaryPathName,LPCWSTR lpLoadOrderGroup,LPDWORD lpdwTagId,LPCWSTR lpDependencies,LPCWSTR lpServiceStartName,LPCWSTR lpPassword);
|
||||
WINADVAPI WINBOOL WINAPI DeleteService(SC_HANDLE hService);
|
||||
WINADVAPI WINBOOL WINAPI EnumDependentServicesA(SC_HANDLE hService,DWORD dwServiceState,LPENUM_SERVICE_STATUSA lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned);
|
||||
WINADVAPI WINBOOL WINAPI EnumDependentServicesW(SC_HANDLE hService,DWORD dwServiceState,LPENUM_SERVICE_STATUSW lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned);
|
||||
WINADVAPI WINBOOL WINAPI EnumServicesStatusA(SC_HANDLE hSCManager,DWORD dwServiceType,DWORD dwServiceState,LPENUM_SERVICE_STATUSA lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned,LPDWORD lpResumeHandle);
|
||||
WINADVAPI WINBOOL WINAPI EnumServicesStatusW(SC_HANDLE hSCManager,DWORD dwServiceType,DWORD dwServiceState,LPENUM_SERVICE_STATUSW lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned,LPDWORD lpResumeHandle);
|
||||
WINADVAPI WINBOOL WINAPI EnumServicesStatusExA(SC_HANDLE hSCManager,SC_ENUM_TYPE InfoLevel,DWORD dwServiceType,DWORD dwServiceState,LPBYTE lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned,LPDWORD lpResumeHandle,LPCSTR pszGroupName);
|
||||
WINADVAPI WINBOOL WINAPI EnumServicesStatusExW(SC_HANDLE hSCManager,SC_ENUM_TYPE InfoLevel,DWORD dwServiceType,DWORD dwServiceState,LPBYTE lpServices,DWORD cbBufSize,LPDWORD pcbBytesNeeded,LPDWORD lpServicesReturned,LPDWORD lpResumeHandle,LPCWSTR pszGroupName);
|
||||
WINADVAPI WINBOOL WINAPI GetServiceKeyNameA(SC_HANDLE hSCManager,LPCSTR lpDisplayName,LPSTR lpServiceName,LPDWORD lpcchBuffer);
|
||||
WINADVAPI WINBOOL WINAPI GetServiceKeyNameW(SC_HANDLE hSCManager,LPCWSTR lpDisplayName,LPWSTR lpServiceName,LPDWORD lpcchBuffer);
|
||||
WINADVAPI WINBOOL WINAPI GetServiceDisplayNameA(SC_HANDLE hSCManager,LPCSTR lpServiceName,LPSTR lpDisplayName,LPDWORD lpcchBuffer);
|
||||
WINADVAPI WINBOOL WINAPI GetServiceDisplayNameW(SC_HANDLE hSCManager,LPCWSTR lpServiceName,LPWSTR lpDisplayName,LPDWORD lpcchBuffer);
|
||||
WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE hSCManager);
|
||||
WINADVAPI WINBOOL WINAPI NotifyBootConfigStatus(WINBOOL BootAcceptable);
|
||||
WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR lpMachineName,LPCSTR lpDatabaseName,DWORD dwDesiredAccess);
|
||||
WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName,LPCWSTR lpDatabaseName,DWORD dwDesiredAccess);
|
||||
WINADVAPI SC_HANDLE WINAPI OpenServiceA(SC_HANDLE hSCManager,LPCSTR lpServiceName,DWORD dwDesiredAccess);
|
||||
WINADVAPI SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager,LPCWSTR lpServiceName,DWORD dwDesiredAccess);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceConfigA(SC_HANDLE hService,LPQUERY_SERVICE_CONFIGA lpServiceConfig,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceConfigW(SC_HANDLE hService,LPQUERY_SERVICE_CONFIGW lpServiceConfig,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceConfig2A(SC_HANDLE hService,DWORD dwInfoLevel,LPBYTE lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService,DWORD dwInfoLevel,LPBYTE lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceLockStatusA(SC_HANDLE hSCManager,LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceLockStatusW(SC_HANDLE hSCManager,LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE hService,SECURITY_INFORMATION dwSecurityInformation,PSECURITY_DESCRIPTOR lpSecurityDescriptor,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceStatus(SC_HANDLE hService,LPSERVICE_STATUS lpServiceStatus);
|
||||
WINADVAPI WINBOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService,SC_STATUS_TYPE InfoLevel,LPBYTE lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
|
||||
WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR lpServiceName,LPHANDLER_FUNCTION lpHandlerProc);
|
||||
WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName,LPHANDLER_FUNCTION lpHandlerProc);
|
||||
WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR lpServiceName,LPHANDLER_FUNCTION_EX lpHandlerProc,LPVOID lpContext);
|
||||
WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName,LPHANDLER_FUNCTION_EX lpHandlerProc,LPVOID lpContext);
|
||||
WINADVAPI WINBOOL WINAPI SetServiceObjectSecurity(SC_HANDLE hService,SECURITY_INFORMATION dwSecurityInformation,PSECURITY_DESCRIPTOR lpSecurityDescriptor);
|
||||
WINADVAPI WINBOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus,LPSERVICE_STATUS lpServiceStatus);
|
||||
WINADVAPI WINBOOL WINAPI StartServiceCtrlDispatcherA(CONST SERVICE_TABLE_ENTRYA *lpServiceStartTable);
|
||||
WINADVAPI WINBOOL WINAPI StartServiceCtrlDispatcherW(CONST SERVICE_TABLE_ENTRYW *lpServiceStartTable);
|
||||
WINADVAPI WINBOOL WINAPI StartServiceA(SC_HANDLE hService,DWORD dwNumServiceArgs,LPCSTR *lpServiceArgVectors);
|
||||
WINADVAPI WINBOOL WINAPI StartServiceW(SC_HANDLE hService,DWORD dwNumServiceArgs,LPCWSTR *lpServiceArgVectors);
|
||||
WINADVAPI WINBOOL WINAPI UnlockServiceDatabase(SC_LOCK ScLock);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _WINSVC_H */
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,124 +1,137 @@
|
|||
#ifndef _WINVER_H
|
||||
#define _WINVER_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef VER_H
|
||||
#define VER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define VS_FILE_INFO RT_VERSION
|
||||
#define VS_VERSION_INFO 1
|
||||
#define VS_USER_DEFINED 100
|
||||
#define VS_FFI_SIGNATURE 0xFEEF04BD
|
||||
#define VS_FFI_STRUCVERSION 0x10000
|
||||
#define VS_FFI_FILEFLAGSMASK 0x3F
|
||||
#define VS_FF_DEBUG 1
|
||||
#define VS_FF_PRERELEASE 2
|
||||
#define VS_FF_PATCHED 4
|
||||
#define VS_FF_PRIVATEBUILD 8
|
||||
#define VS_FF_INFOINFERRED 16
|
||||
#define VS_FF_SPECIALBUILD 32
|
||||
#define VOS_UNKNOWN 0
|
||||
#define VOS_DOS 0x10000
|
||||
#define VOS_OS216 0x20000
|
||||
#define VOS_OS232 0x30000
|
||||
#define VOS_NT 0x40000
|
||||
#define VOS__BASE 0
|
||||
#define VOS__WINDOWS16 1
|
||||
#define VOS__PM16 2
|
||||
#define VOS__PM32 3
|
||||
#define VOS__WINDOWS32 4
|
||||
#define VOS_DOS_WINDOWS16 0x10001
|
||||
#define VOS_DOS_WINDOWS32 0x10004
|
||||
#define VOS_OS216_PM16 0x20002
|
||||
#define VOS_OS232_PM32 0x30003
|
||||
#define VOS_NT_WINDOWS32 0x40004
|
||||
#define VFT_UNKNOWN 0
|
||||
#define VFT_APP 1
|
||||
#define VFT_DLL 2
|
||||
#define VFT_DRV 3
|
||||
#define VFT_FONT 4
|
||||
#define VFT_VXD 5
|
||||
#define VFT_STATIC_LIB 7
|
||||
#define VFT2_UNKNOWN 0
|
||||
#define VFT2_DRV_PRINTER 1
|
||||
#define VFT2_DRV_KEYBOARD 2
|
||||
#define VFT2_DRV_LANGUAGE 3
|
||||
#define VFT2_DRV_DISPLAY 4
|
||||
#define VFT2_DRV_MOUSE 5
|
||||
#define VFT2_DRV_NETWORK 6
|
||||
#define VFT2_DRV_SYSTEM 7
|
||||
#define VFT2_DRV_INSTALLABLE 8
|
||||
#define VFT2_DRV_SOUND 9
|
||||
#define VFT2_DRV_COMM 10
|
||||
#define VFT2_DRV_INPUTMETHOD 11
|
||||
#define VFT2_FONT_RASTER 1
|
||||
#define VFT2_FONT_VECTOR 2
|
||||
#define VFT2_FONT_TRUETYPE 3
|
||||
#define VFFF_ISSHAREDFILE 1
|
||||
#define VFF_CURNEDEST 1
|
||||
#define VFF_FILEINUSE 2
|
||||
#define VFF_BUFFTOOSMALL 4
|
||||
#define VIFF_FORCEINSTALL 1
|
||||
#define VIFF_DONTDELETEOLD 2
|
||||
#define VIF_TEMPFILE 1
|
||||
#define VIF_MISMATCH 2
|
||||
#define VIF_SRCOLD 4
|
||||
#define VIF_DIFFLANG 8
|
||||
#define VIF_DIFFCODEPG 16
|
||||
#define VIF_DIFFTYPE 32
|
||||
#define VIF_WRITEPROT 64
|
||||
#define VIF_FILEINUSE 128
|
||||
#define VIF_OUTOFSPACE 256
|
||||
#define VIF_ACCESSVIOLATION 512
|
||||
#define VIF_SHARINGVIOLATION 1024
|
||||
#define VIF_CANNOTCREATE 2048
|
||||
#define VIF_CANNOTDELETE 4096
|
||||
#define VIF_CANNOTRENAME 8192
|
||||
#define VIF_CANNOTDELETECUR 16384
|
||||
#define VIF_OUTOFMEMORY 32768
|
||||
#define VIF_CANNOTREADSRC 65536
|
||||
#define VIF_CANNOTREADDST 0x20000
|
||||
#define VIF_BUFFTOOSMALL 0x40000
|
||||
|
||||
#define VS_FFI_SIGNATURE 0xFEEF04BDL
|
||||
#define VS_FFI_STRUCVERSION 0x00010000L
|
||||
#define VS_FFI_FILEFLAGSMASK 0x0000003FL
|
||||
|
||||
#define VS_FF_DEBUG 0x00000001L
|
||||
#define VS_FF_PRERELEASE 0x00000002L
|
||||
#define VS_FF_PATCHED 0x00000004L
|
||||
#define VS_FF_PRIVATEBUILD 0x00000008L
|
||||
#define VS_FF_INFOINFERRED 0x00000010L
|
||||
#define VS_FF_SPECIALBUILD 0x00000020L
|
||||
|
||||
#define VOS_UNKNOWN 0x00000000L
|
||||
#define VOS_DOS 0x00010000L
|
||||
#define VOS_OS216 0x00020000L
|
||||
#define VOS_OS232 0x00030000L
|
||||
#define VOS_NT 0x00040000L
|
||||
#define VOS_WINCE 0x00050000L
|
||||
|
||||
#define VOS__BASE 0x00000000L
|
||||
#define VOS__WINDOWS16 0x00000001L
|
||||
#define VOS__PM16 0x00000002L
|
||||
#define VOS__PM32 0x00000003L
|
||||
#define VOS__WINDOWS32 0x00000004L
|
||||
|
||||
#define VOS_DOS_WINDOWS16 0x00010001L
|
||||
#define VOS_DOS_WINDOWS32 0x00010004L
|
||||
#define VOS_OS216_PM16 0x00020002L
|
||||
#define VOS_OS232_PM32 0x00030003L
|
||||
#define VOS_NT_WINDOWS32 0x00040004L
|
||||
|
||||
#define VFT_UNKNOWN 0x00000000L
|
||||
#define VFT_APP 0x00000001L
|
||||
#define VFT_DLL 0x00000002L
|
||||
#define VFT_DRV 0x00000003L
|
||||
#define VFT_FONT 0x00000004L
|
||||
#define VFT_VXD 0x00000005L
|
||||
#define VFT_STATIC_LIB 0x00000007L
|
||||
|
||||
#define VFT2_UNKNOWN 0x00000000L
|
||||
#define VFT2_DRV_PRINTER 0x00000001L
|
||||
#define VFT2_DRV_KEYBOARD 0x00000002L
|
||||
#define VFT2_DRV_LANGUAGE 0x00000003L
|
||||
#define VFT2_DRV_DISPLAY 0x00000004L
|
||||
#define VFT2_DRV_MOUSE 0x00000005L
|
||||
#define VFT2_DRV_NETWORK 0x00000006L
|
||||
#define VFT2_DRV_SYSTEM 0x00000007L
|
||||
#define VFT2_DRV_INSTALLABLE 0x00000008L
|
||||
#define VFT2_DRV_SOUND 0x00000009L
|
||||
#define VFT2_DRV_COMM 0x0000000AL
|
||||
#define VFT2_DRV_INPUTMETHOD 0x0000000BL
|
||||
#define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
|
||||
|
||||
#define VFT2_FONT_RASTER 0x00000001L
|
||||
#define VFT2_FONT_VECTOR 0x00000002L
|
||||
#define VFT2_FONT_TRUETYPE 0x00000003L
|
||||
|
||||
#define VFFF_ISSHAREDFILE 0x0001
|
||||
|
||||
#define VFF_CURNEDEST 0x0001
|
||||
#define VFF_FILEINUSE 0x0002
|
||||
#define VFF_BUFFTOOSMALL 0x0004
|
||||
|
||||
#define VIFF_FORCEINSTALL 0x0001
|
||||
#define VIFF_DONTDELETEOLD 0x0002
|
||||
|
||||
#define VIF_TEMPFILE 0x00000001L
|
||||
#define VIF_MISMATCH 0x00000002L
|
||||
#define VIF_SRCOLD 0x00000004L
|
||||
|
||||
#define VIF_DIFFLANG 0x00000008L
|
||||
#define VIF_DIFFCODEPG 0x00000010L
|
||||
#define VIF_DIFFTYPE 0x00000020L
|
||||
|
||||
#define VIF_WRITEPROT 0x00000040L
|
||||
#define VIF_FILEINUSE 0x00000080L
|
||||
#define VIF_OUTOFSPACE 0x00000100L
|
||||
#define VIF_ACCESSVIOLATION 0x00000200L
|
||||
#define VIF_SHARINGVIOLATION 0x00000400L
|
||||
#define VIF_CANNOTCREATE 0x00000800L
|
||||
#define VIF_CANNOTDELETE 0x00001000L
|
||||
#define VIF_CANNOTRENAME 0x00002000L
|
||||
#define VIF_CANNOTDELETECUR 0x00004000L
|
||||
#define VIF_OUTOFMEMORY 0x00008000L
|
||||
|
||||
#define VIF_CANNOTREADSRC 0x00010000L
|
||||
#define VIF_CANNOTREADDST 0x00020000L
|
||||
|
||||
#define VIF_BUFFTOOSMALL 0x00040000L
|
||||
#define VIF_CANNOTLOADLZ32 0x00080000L
|
||||
#define VIF_CANNOTLOADCABINET 0x00100000L
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct tagVS_FIXEDFILEINFO {
|
||||
DWORD dwSignature;
|
||||
DWORD dwStrucVersion;
|
||||
DWORD dwFileVersionMS;
|
||||
DWORD dwFileVersionLS;
|
||||
DWORD dwProductVersionMS;
|
||||
DWORD dwProductVersionLS;
|
||||
DWORD dwFileFlagsMask;
|
||||
DWORD dwFileFlags;
|
||||
DWORD dwFileOS;
|
||||
DWORD dwFileType;
|
||||
DWORD dwFileSubtype;
|
||||
DWORD dwFileDateMS;
|
||||
DWORD dwFileDateLS;
|
||||
} VS_FIXEDFILEINFO;
|
||||
DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT);
|
||||
DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT);
|
||||
DWORD WINAPI GetFileVersionInfoSizeA(LPSTR,PDWORD);
|
||||
DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,PVOID);
|
||||
BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,PVOID);
|
||||
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
|
||||
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
|
||||
BOOL WINAPI VerQueryValueA(PCVOID,LPSTR,PVOID*,PUINT);
|
||||
BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,PUINT);
|
||||
|
||||
typedef struct tagVS_FIXEDFILEINFO
|
||||
{
|
||||
DWORD dwSignature;
|
||||
DWORD dwStrucVersion;
|
||||
DWORD dwFileVersionMS;
|
||||
DWORD dwFileVersionLS;
|
||||
DWORD dwProductVersionMS;
|
||||
DWORD dwProductVersionLS;
|
||||
DWORD dwFileFlagsMask;
|
||||
DWORD dwFileFlags;
|
||||
DWORD dwFileOS;
|
||||
DWORD dwFileType;
|
||||
DWORD dwFileSubtype;
|
||||
DWORD dwFileDateMS;
|
||||
DWORD dwFileDateLS;
|
||||
} VS_FIXEDFILEINFO;
|
||||
|
||||
#ifdef UNICODE
|
||||
#define VerFindFile VerFindFileW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#define VerInstallFile VerInstallFileW
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeW
|
||||
#define GetFileVersionInfo GetFileVersionInfoW
|
||||
#define VerLanguageName VerLanguageNameW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#else
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#define VerFindFile VerFindFileA
|
||||
#define VerInstallFile VerInstallFileA
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeA
|
||||
|
@ -126,7 +139,21 @@ BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,PUINT);
|
|||
#define VerLanguageName VerLanguageNameA
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#endif
|
||||
|
||||
DWORD WINAPI VerFindFileA(DWORD uFlags,LPSTR szFileName,LPSTR szWinDir,LPSTR szAppDir,LPSTR szCurDir,PUINT lpuCurDirLen,LPSTR szDestDir,PUINT lpuDestDirLen);
|
||||
DWORD WINAPI VerFindFileW(DWORD uFlags,LPWSTR szFileName,LPWSTR szWinDir,LPWSTR szAppDir,LPWSTR szCurDir,PUINT lpuCurDirLen,LPWSTR szDestDir,PUINT lpuDestDirLen);
|
||||
DWORD WINAPI VerInstallFileA(DWORD uFlags,LPSTR szSrcFileName,LPSTR szDestFileName,LPSTR szSrcDir,LPSTR szDestDir,LPSTR szCurDir,LPSTR szTmpFile,PUINT lpuTmpFileLen);
|
||||
DWORD WINAPI VerInstallFileW(DWORD uFlags,LPWSTR szSrcFileName,LPWSTR szDestFileName,LPWSTR szSrcDir,LPWSTR szDestDir,LPWSTR szCurDir,LPWSTR szTmpFile,PUINT lpuTmpFileLen);
|
||||
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR lptstrFilename,LPDWORD lpdwHandle);
|
||||
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR lptstrFilename,LPDWORD lpdwHandle);
|
||||
WINBOOL WINAPI GetFileVersionInfoA(LPCSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
|
||||
WINBOOL WINAPI GetFileVersionInfoW(LPCWSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
|
||||
DWORD WINAPI VerLanguageNameA(DWORD wLang,LPSTR szLang,DWORD nSize);
|
||||
DWORD WINAPI VerLanguageNameW(DWORD wLang,LPWSTR szLang,DWORD nSize);
|
||||
WINBOOL WINAPI VerQueryValueA(const LPVOID pBlock,LPSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
|
||||
WINBOOL WINAPI VerQueryValueW(const LPVOID pBlock,LPWSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue