summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2018-02-21 23:16:20 +0000
committerThomas Preud'homme <robotux@celest.fr>2018-02-21 23:16:20 +0000
commite2ccf3981d78dfeb390d22c74625b60310100abb (patch)
treefc30b3b3fe20cc005634818512dab3514acf8ef4 /win32
parent3f2e65a51523fbb98a44b71c29ae3a3fcc13854b (diff)
New upstream version 0.9.27
Diffstat (limited to 'win32')
-rwxr-xr-x[-rw-r--r--]win32/build-tcc.bat256
-rw-r--r--win32/examples/dll.c7
-rw-r--r--win32/examples/hello_dll.c17
-rw-r--r--win32/include/_mingw.h17
-rw-r--r--win32/include/assert.h5
-rw-r--r--win32/include/conio.h2
-rw-r--r--win32/include/math.h2
-rw-r--r--win32/include/stdint.h2
-rw-r--r--win32/include/tcc/tcc_libm.h4
-rw-r--r--win32/include/values.h2
-rw-r--r--win32/include/winapi/intrin.h11
-rw-r--r--win32/include/winapi/reason.h80
-rw-r--r--win32/include/winapi/specstrings.h7
-rw-r--r--win32/include/winapi/stralign.h154
-rw-r--r--win32/include/winapi/windef.h2
-rw-r--r--win32/include/winapi/windows.h6
-rw-r--r--win32/include/winapi/winnetwk.h476
-rw-r--r--win32/include/winapi/winnls.h765
-rw-r--r--win32/include/winapi/winnt.h2
-rw-r--r--win32/include/winapi/winreg.h2
-rw-r--r--win32/lib/chkstk.S4
-rw-r--r--win32/lib/crt1.c62
-rw-r--r--win32/lib/crt1w.c3
-rw-r--r--win32/lib/user32.def4
-rw-r--r--win32/lib/wincrt1.c97
-rw-r--r--win32/lib/wincrt1w.c3
-rw-r--r--win32/tcc-win32.txt330
-rw-r--r--win32/tools/tiny_impdef.c249
-rw-r--r--win32/tools/tiny_libmaker.c278
-rw-r--r--win32/vs2015/libtcc.vcxproj190
-rw-r--r--win32/vs2015/tcc.sln41
-rw-r--r--win32/vs2015/tcc.vcxproj173
32 files changed, 513 insertions, 2740 deletions
diff --git a/win32/build-tcc.bat b/win32/build-tcc.bat
index c795c19..913b068 100644..100755
--- a/win32/build-tcc.bat
+++ b/win32/build-tcc.bat
@@ -1,67 +1,189 @@
-@rem ----------------------------------------------------
-@rem batch file to build tcc using mingw gcc
-@rem ----------------------------------------------------
-
-@set /p VERSION= < ..\VERSION
-echo>..\config.h #define TCC_VERSION "%VERSION%"
-
-@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
-@if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64
-
-@set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
-@set CC=gcc -m32 -Os -s -fno-strict-aliasing
-@set P=32
-@goto tools
-
-:x86_64
-@set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
-@set CC=gcc -m64 -Os -s -fno-strict-aliasing
-@set P=64
-@goto tools
-
-:tools
-%CC% %target% tools/tiny_impdef.c -o tiny_impdef.exe
-%CC% %target% tools/tiny_libmaker.c -o tiny_libmaker.exe
-
-:libtcc
-if not exist libtcc mkdir libtcc
-copy ..\libtcc.h libtcc\libtcc.h
-%CC% %target% -shared -DLIBTCC_AS_DLL -DONE_SOURCE ../libtcc.c -o libtcc.dll -Wl,-out-implib,libtcc/libtcc.a
-tiny_impdef libtcc.dll -o libtcc/libtcc.def
-
-:tcc
-%CC% %target% ../tcc.c -o tcc.exe -ltcc -Llibtcc
-
-:copy_std_includes
-copy ..\include\*.h include
-copy ..\tcclib.h include
-copy ..\tests\libtcc_test.c examples
-
-:libtcc1.a
-.\tcc %target% -c ../lib/libtcc1.c
-.\tcc %target% -c lib/crt1.c
-.\tcc %target% -c lib/wincrt1.c
-.\tcc %target% -c lib/dllcrt1.c
-.\tcc %target% -c lib/dllmain.c
-.\tcc %target% -c lib/chkstk.S
-goto lib%P%
-
-:lib32
-.\tcc %target% -c ../lib/alloca86.S
-.\tcc %target% -c ../lib/alloca86-bt.S
-.\tcc %target% -c ../lib/bcheck.c
-tiny_libmaker lib/libtcc1.a libtcc1.o alloca86.o alloca86-bt.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o bcheck.o
-@goto the_end
-
-:lib64
-.\tcc %target% -c ../lib/alloca86_64.S
-tiny_libmaker lib/libtcc1.a libtcc1.o alloca86_64.o crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
-
-:the_end
-del *.o
-
-:makedoc
-if not exist doc md doc
-copy tcc-win32.txt doc
-echo>..\config.texi @set VERSION %VERSION%
-makeinfo --html --no-split -o doc\tcc-doc.html ../tcc-doc.texi || echo *** tcc-doc.html was not built ***
+@rem ------------------------------------------------------
+@rem batch file to build tcc using mingw, msvc or tcc itself
+@rem ------------------------------------------------------
+
+@echo off
+setlocal
+if (%1)==(-clean) goto :cleanup
+set CC=gcc
+set /p VERSION= < ..\VERSION
+set INST=
+set BIN=
+set DOC=no
+set EXES_ONLY=no
+goto :a0
+:a2
+shift
+:a3
+shift
+:a0
+if not (%1)==(-c) goto :a1
+set CC=%~2
+if (%2)==(cl) set CC=@call :cl
+goto :a2
+:a1
+if (%1)==(-t) set T=%2&& goto :a2
+if (%1)==(-v) set VERSION=%~2&& goto :a2
+if (%1)==(-i) set INST=%2&& goto :a2
+if (%1)==(-b) set BIN=%2&& goto :a2
+if (%1)==(-d) set DOC=yes&& goto :a3
+if (%1)==(-x) set EXES_ONLY=yes&& goto :a3
+if (%1)==() goto :p1
+:usage
+echo usage: build-tcc.bat [ options ... ]
+echo options:
+echo -c prog use prog (gcc/tcc/cl) to compile tcc
+echo -c "prog options" use prog with options to compile tcc
+echo -t 32/64 force 32/64 bit default target
+echo -v "version" set tcc version
+echo -i tccdir install tcc into tccdir
+echo -b bindir optionally install binaries into bindir elsewhere
+echo -d create tcc-doc.html too (needs makeinfo)
+echo -x just create the executables
+echo -clean delete all previously produced files and directories
+exit /B 1
+
+@rem ------------------------------------------------------
+@rem sub-routines
+
+:cleanup
+set LOG=echo
+%LOG% removing files:
+for %%f in (*tcc.exe libtcc.dll lib\*.a) do call :del_file %%f
+for %%f in (..\config.h ..\config.texi) do call :del_file %%f
+for %%f in (include\*.h) do @if exist ..\%%f call :del_file %%f
+for %%f in (include\tcclib.h examples\libtcc_test.c) do call :del_file %%f
+for %%f in (*.o *.obj *.def *.pdb *.lib *.exp *.ilk) do call :del_file %%f
+%LOG% removing directories:
+for %%f in (doc libtcc) do call :del_dir %%f
+%LOG% done.
+exit /B 0
+:del_file
+if exist %1 del %1 && %LOG% %1
+exit /B 0
+:del_dir
+if exist %1 rmdir /Q/S %1 && %LOG% %1
+exit /B 0
+
+:cl
+@echo off
+set CMD=cl
+:c0
+set ARG=%1
+set ARG=%ARG:.dll=.lib%
+if (%1)==(-shared) set ARG=-LD
+if (%1)==(-o) shift && set ARG=-Fe%2
+set CMD=%CMD% %ARG%
+shift
+if not (%1)==() goto :c0
+echo on
+%CMD% -O1 -W2 -Zi -MT -GS- -nologo -link -opt:ref,icf
+@exit /B %ERRORLEVEL%
+
+@rem ------------------------------------------------------
+@rem main program
+
+:p1
+if not %T%_==_ goto :p2
+set T=32
+if %PROCESSOR_ARCHITECTURE%_==AMD64_ set T=64
+if %PROCESSOR_ARCHITEW6432%_==AMD64_ set T=64
+:p2
+if "%CC:~-3%"=="gcc" set CC=%CC% -Os -s -static
+set D32=-DTCC_TARGET_PE -DTCC_TARGET_I386
+set D64=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
+set P32=i386-win32
+set P64=x86_64-win32
+if %T%==64 goto :t64
+set D=%D32%
+set DX=%D64%
+set PX=%P64%
+goto :p3
+:t64
+set D=%D64%
+set DX=%D32%
+set PX=%P32%
+goto :p3
+
+:p3
+@echo on
+
+:config.h
+echo>..\config.h #define TCC_VERSION "%VERSION%"
+echo>> ..\config.h #ifdef TCC_TARGET_X86_64
+echo>> ..\config.h #define TCC_LIBTCC1 "libtcc1-64.a"
+echo>> ..\config.h #else
+echo>> ..\config.h #define TCC_LIBTCC1 "libtcc1-32.a"
+echo>> ..\config.h #endif
+
+for %%f in (*tcc.exe *tcc.dll) do @del %%f
+
+:compiler
+%CC% -o libtcc.dll -shared ..\libtcc.c %D% -DLIBTCC_AS_DLL
+@if errorlevel 1 goto :the_end
+%CC% -o tcc.exe ..\tcc.c libtcc.dll %D% -DONE_SOURCE"=0"
+%CC% -o %PX%-tcc.exe ..\tcc.c %DX%
+
+@if (%EXES_ONLY%)==(yes) goto :files-done
+
+if not exist libtcc mkdir libtcc
+if not exist doc mkdir doc
+copy>nul ..\include\*.h include
+copy>nul ..\tcclib.h include
+copy>nul ..\libtcc.h libtcc
+copy>nul ..\tests\libtcc_test.c examples
+copy>nul tcc-win32.txt doc
+
+.\tcc -impdef libtcc.dll -o libtcc\libtcc.def
+@if errorlevel 1 goto :the_end
+
+:libtcc1.a
+@set O1=libtcc1.o crt1.o crt1w.o wincrt1.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o bcheck.o
+.\tcc -m32 -c ../lib/libtcc1.c
+.\tcc -m32 -c lib/crt1.c
+.\tcc -m32 -c lib/crt1w.c
+.\tcc -m32 -c lib/wincrt1.c
+.\tcc -m32 -c lib/wincrt1w.c
+.\tcc -m32 -c lib/dllcrt1.c
+.\tcc -m32 -c lib/dllmain.c
+.\tcc -m32 -c lib/chkstk.S
+.\tcc -m32 -w -c ../lib/bcheck.c
+.\tcc -m32 -c ../lib/alloca86.S
+.\tcc -m32 -c ../lib/alloca86-bt.S
+.\tcc -m32 -ar lib/libtcc1-32.a %O1% alloca86.o alloca86-bt.o
+@if errorlevel 1 goto :the_end
+.\tcc -m64 -c ../lib/libtcc1.c
+.\tcc -m64 -c lib/crt1.c
+.\tcc -m64 -c lib/crt1w.c
+.\tcc -m64 -c lib/wincrt1.c
+.\tcc -m64 -c lib/wincrt1w.c
+.\tcc -m64 -c lib/dllcrt1.c
+.\tcc -m64 -c lib/dllmain.c
+.\tcc -m64 -c lib/chkstk.S
+.\tcc -m64 -w -c ../lib/bcheck.c
+.\tcc -m64 -c ../lib/alloca86_64.S
+.\tcc -m64 -c ../lib/alloca86_64-bt.S
+.\tcc -m64 -ar lib/libtcc1-64.a %O1% alloca86_64.o alloca86_64-bt.o
+@if errorlevel 1 goto :the_end
+
+:tcc-doc.html
+@if not (%DOC%)==(yes) goto :doc-done
+echo>..\config.texi @set VERSION %VERSION%
+cmd /c makeinfo --html --no-split ../tcc-doc.texi -o doc/tcc-doc.html
+:doc-done
+
+:files-done
+for %%f in (*.o *.def) do @del %%f
+
+:copy-install
+@if (%INST%)==() goto :the_end
+if not exist %INST% mkdir %INST%
+@if (%BIN%)==() set BIN=%INST%
+if not exist %BIN% mkdir %BIN%
+for %%f in (*tcc.exe *tcc.dll) do @copy>nul %%f %BIN%\%%f
+@if not exist %INST%\lib mkdir %INST%\lib
+for %%f in (lib\*.a lib\*.def) do @copy>nul %%f %INST%\%%f
+for %%f in (include examples libtcc doc) do @xcopy>nul /s/i/q/y %%f %INST%\%%f
+
+:the_end
+exit /B %ERRORLEVEL%
diff --git a/win32/examples/dll.c b/win32/examples/dll.c
index 4c1d8ce..052a056 100644
--- a/win32/examples/dll.c
+++ b/win32/examples/dll.c
@@ -4,9 +4,10 @@
//
#include <windows.h>
-#define DLL_EXPORT __declspec(dllexport)
-DLL_EXPORT void HelloWorld (void)
+__declspec(dllexport) const char *hello_data = "(not set)";
+
+__declspec(dllexport) void hello_func (void)
{
- MessageBox (0, "Hello World!", "From DLL", MB_ICONINFORMATION);
+ MessageBox (0, hello_data, "From DLL", MB_ICONINFORMATION);
}
diff --git a/win32/examples/hello_dll.c b/win32/examples/hello_dll.c
index 7adba77..4813c5b 100644
--- a/win32/examples/hello_dll.c
+++ b/win32/examples/hello_dll.c
@@ -5,15 +5,16 @@
#include <windows.h>
-void HelloWorld (void);
+void hello_func (void);
+__declspec(dllimport) extern const char *hello_data;
int WINAPI WinMain(
- HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
{
- HelloWorld();
- return 0;
+ hello_data = "Hello World!";
+ hello_func();
+ return 0;
}
-
diff --git a/win32/include/_mingw.h b/win32/include/_mingw.h
index 2e565a6..2fc9798 100644
--- a/win32/include/_mingw.h
+++ b/win32/include/_mingw.h
@@ -83,8 +83,12 @@
#define _M_IX86 300 /* Visual Studio */
#define WIN32 1
#define _USE_32BIT_TIME_T
+#ifdef __arm__
+#define __TRY__
+#else
#define __TRY__ void __try__(void**), *_sehrec[6]; __try__(_sehrec);
#endif
+#endif
/* in stddef.h */
#define _SIZE_T_DEFINED
@@ -139,6 +143,18 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
#define NOSERVICE 1
#define NOMCX 1
#define NOIME 1
+#define __INTRIN_H_
+#ifndef DUMMYUNIONNAME
+# define DUMMYUNIONNAME
+# define DUMMYUNIONNAME1
+# define DUMMYUNIONNAME2
+# define DUMMYUNIONNAME3
+# define DUMMYUNIONNAME4
+# define DUMMYUNIONNAME5
+#endif
+#ifndef DUMMYSTRUCTNAME
+# define DUMMYSTRUCTNAME
+#endif
#ifndef WINVER
# define WINVER 0x0502
#endif
@@ -149,5 +165,6 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
#define __C89_NAMELESS
#define __MINGW_EXTENSION
#define WINAPI_FAMILY_PARTITION(X) 1
+#define MINGW_HAS_SECURE_API
#endif /* __MINGW_H */
diff --git a/win32/include/assert.h b/win32/include/assert.h
index c1678a3..466d457 100644
--- a/win32/include/assert.h
+++ b/win32/include/assert.h
@@ -39,14 +39,17 @@ __CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
extern "C" {
#endif
+
extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
+extern void __cdecl _assert(const char *, const char *, unsigned);
#ifdef __cplusplus
}
#endif
#ifndef assert
-#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
+//#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
+#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
#endif
#endif
diff --git a/win32/include/conio.h b/win32/include/conio.h
index 6c1dc97..39f779e 100644
--- a/win32/include/conio.h
+++ b/win32/include/conio.h
@@ -194,7 +194,7 @@ extern "C" {
}
/* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
- seperatly. */
+ separately. */
#ifdef _WIN64
__CRT_INLINE void __writecr0(unsigned __int64 Data)
diff --git a/win32/include/math.h b/win32/include/math.h
index 297184f..74add20 100644
--- a/win32/include/math.h
+++ b/win32/include/math.h
@@ -327,7 +327,7 @@ extern "C" {
#define isinf(x) (fpclassify(x) == FP_INFINITE)
/* 7.12.3.4 */
- /* We don't need to worry about trucation here:
+ /* We don't need to worry about truncation here:
A NaN stays a NaN. */
#define isnan(x) (fpclassify(x) == FP_NAN)
diff --git a/win32/include/stdint.h b/win32/include/stdint.h
index cdebf44..cde32b6 100644
--- a/win32/include/stdint.h
+++ b/win32/include/stdint.h
@@ -178,7 +178,7 @@ typedef unsigned long long uintmax_t;
/* 7.18.4.1 Macros for minimum-width integer constants
- Accoding to Douglas Gwyn <gwyn@arl.mil>:
+ According to Douglas Gwyn <gwyn@arl.mil>:
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
9899:1999 as initially published, the expansion was required
to be an integer constant of precisely matching type, which
diff --git a/win32/include/tcc/tcc_libm.h b/win32/include/tcc/tcc_libm.h
index c9a6ad1..0a62e6f 100644
--- a/win32/include/tcc/tcc_libm.h
+++ b/win32/include/tcc/tcc_libm.h
@@ -1,7 +1,7 @@
#ifndef _TCC_LIBM_H_
#define _TCC_LIBM_H_
-#include "../include/math.h"
+#include "../math.h"
/* TCC uses 8 bytes for double and long double, so effectively the l variants
* are never used. For now, they just run the normal (double) variant.
@@ -20,7 +20,7 @@
musl as a whole is licensed under the following standard MIT license:
----------------------------------------------------------------------
-Copyright © 2005-2014 Rich Felker, et al.
+Copyright © 2005-2014 Rich Felker, et al.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/win32/include/values.h b/win32/include/values.h
index 10e16a2..1cd643c 100644
--- a/win32/include/values.h
+++ b/win32/include/values.h
@@ -1,4 +1,4 @@
/*
* TODO: Nothing here yet. Should provide UNIX compatibility constants
- * comparible to those in limits.h and float.h.
+ * comparable to those in limits.h and float.h.
*/
diff --git a/win32/include/winapi/intrin.h b/win32/include/winapi/intrin.h
deleted file mode 100644
index 960a0f8..0000000
--- a/win32/include/winapi/intrin.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * 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_ */
diff --git a/win32/include/winapi/reason.h b/win32/include/winapi/reason.h
deleted file mode 100644
index 4d923e2..0000000
--- a/win32/include/winapi/reason.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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
diff --git a/win32/include/winapi/specstrings.h b/win32/include/winapi/specstrings.h
deleted file mode 100644
index 4130ed3..0000000
--- a/win32/include/winapi/specstrings.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * 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
diff --git a/win32/include/winapi/stralign.h b/win32/include/winapi/stralign.h
deleted file mode 100644
index 3812035..0000000
--- a/win32/include/winapi/stralign.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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
diff --git a/win32/include/winapi/windef.h b/win32/include/winapi/windef.h
index 3e38816..d63bdef 100644
--- a/win32/include/winapi/windef.h
+++ b/win32/include/winapi/windef.h
@@ -122,7 +122,7 @@ typedef CONST void *LPCVOID;
#include <winnt.h>
#endif
-#include <specstrings.h>
+//gr #include <specstrings.h>
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
diff --git a/win32/include/winapi/windows.h b/win32/include/winapi/windows.h
index 38c2414..2660d7f 100644
--- a/win32/include/winapi/windows.h
+++ b/win32/include/winapi/windows.h
@@ -67,11 +67,11 @@
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
-#include <winnls.h>
+//gr #include <winnls.h>
#include <wincon.h>
#include <winver.h>
#include <winreg.h>
-#include <winnetwk.h>
+//gr #include <winnetwk.h>
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
@@ -104,7 +104,7 @@
#endif
#endif
-#include <stralign.h>
+//gr #include <stralign.h>
#ifdef INC_OLE2
#include <ole2.h>
diff --git a/win32/include/winapi/winnetwk.h b/win32/include/winapi/winnetwk.h
deleted file mode 100644
index afb7f4f..0000000
--- a/win32/include/winapi/winnetwk.h
+++ /dev/null
@@ -1,476 +0,0 @@
-/**
- * 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_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 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 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
-#define WN_CANCEL ERROR_CANCELLED
-#define WN_RETRY ERROR_RETRY
-#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
-#define WN_MORE_DATA ERROR_MORE_DATA
-#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
-#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
-#define WN_BAD_USER ERROR_BAD_USERNAME
-#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
-#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
-#define WN_FUNCTION_BUSY ERROR_BUSY
-#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
-#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
-#define WN_NO_NETWORK ERROR_NO_NETWORK
-#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
-#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
-#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
-#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
-#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
-#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
-#define WN_OPEN_FILES ERROR_OPEN_FILES
-#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
-#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
-#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
-#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
-#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
-#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
-#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
-#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
-#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
-#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
-
- 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
-
-#ifdef UNICODE
-#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
-#else
-#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
-#endif
-
- DWORD WINAPI MultinetGetConnectionPerformanceA(LPNETRESOURCEA lpNetResource,LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
- DWORD WINAPI MultinetGetConnectionPerformanceW(LPNETRESOURCEW lpNetResource,LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/win32/include/winapi/winnls.h b/win32/include/winapi/winnls.h
deleted file mode 100644
index 563c643..0000000
--- a/win32/include/winapi/winnls.h
+++ /dev/null
@@ -1,765 +0,0 @@
-/**
- * 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 _WINNLS_
-#define _WINNLS_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef NONLS
-
-#define MAX_LEADBYTES 12
-#define MAX_DEFAULTCHAR 2
-
-#define MB_PRECOMPOSED 0x00000001
-#define MB_COMPOSITE 0x00000002
-#define MB_USEGLYPHCHARS 0x00000004
-#define MB_ERR_INVALID_CHARS 0x00000008
-
-#define WC_COMPOSITECHECK 0x00000200
-#define WC_DISCARDNS 0x00000010
-#define WC_SEPCHARS 0x00000020
-#define WC_DEFAULTCHAR 0x00000040
-#define WC_NO_BEST_FIT_CHARS 0x00000400
-
-#define CT_CTYPE1 0x00000001
-#define CT_CTYPE2 0x00000002
-#define CT_CTYPE3 0x00000004
-
-#define C1_UPPER 0x0001
-#define C1_LOWER 0x0002
-#define C1_DIGIT 0x0004
-#define C1_SPACE 0x0008
-#define C1_PUNCT 0x0010
-#define C1_CNTRL 0x0020
-#define C1_BLANK 0x0040
-#define C1_XDIGIT 0x0080
-#define C1_ALPHA 0x0100
-#define C1_DEFINED 0x0200
-
-#define C2_LEFTTORIGHT 0x0001
-#define C2_RIGHTTOLEFT 0x0002
-
-#define C2_EUROPENUMBER 0x0003
-#define C2_EUROPESEPARATOR 0x0004
-#define C2_EUROPETERMINATOR 0x0005
-#define C2_ARABICNUMBER 0x0006
-#define C2_COMMONSEPARATOR 0x0007
-
-#define C2_BLOCKSEPARATOR 0x0008
-#define C2_SEGMENTSEPARATOR 0x0009
-#define C2_WHITESPACE 0x000A
-#define C2_OTHERNEUTRAL 0x000B
-
-#define C2_NOTAPPLICABLE 0x0000
-
-#define C3_NONSPACING 0x0001
-#define C3_DIACRITIC 0x0002
-#define C3_VOWELMARK 0x0004
-#define C3_SYMBOL 0x0008
-
-#define C3_KATAKANA 0x0010
-#define C3_HIRAGANA 0x0020
-#define C3_HALFWIDTH 0x0040
-#define C3_FULLWIDTH 0x0080
-#define C3_IDEOGRAPH 0x0100
-#define C3_KASHIDA 0x0200
-#define C3_LEXICAL 0x0400
-
-#define C3_ALPHA 0x8000
-
-#define C3_NOTAPPLICABLE 0x0000
-
-#define NORM_IGNORECASE 0x00000001
-#define NORM_IGNORENONSPACE 0x00000002
-#define NORM_IGNORESYMBOLS 0x00000004
-
-#define NORM_IGNOREKANATYPE 0x00010000
-#define NORM_IGNOREWIDTH 0x00020000
-
-#define MAP_FOLDCZONE 0x00000010
-#define MAP_PRECOMPOSED 0x00000020
-#define MAP_COMPOSITE 0x00000040
-#define MAP_FOLDDIGITS 0x00000080
-#define MAP_EXPAND_LIGATURES 0x00002000
-
-#define LCMAP_LOWERCASE 0x00000100
-#define LCMAP_UPPERCASE 0x00000200
-#define LCMAP_SORTKEY 0x00000400
-#define LCMAP_BYTEREV 0x00000800
-
-#define LCMAP_HIRAGANA 0x00100000
-#define LCMAP_KATAKANA 0x00200000
-#define LCMAP_HALFWIDTH 0x00400000
-#define LCMAP_FULLWIDTH 0x00800000
-
-#define LCMAP_LINGUISTIC_CASING 0x01000000
-
-#define LCMAP_SIMPLIFIED_CHINESE 0x02000000
-#define LCMAP_TRADITIONAL_CHINESE 0x04000000
-
-#define LGRPID_INSTALLED 0x00000001
-#define LGRPID_SUPPORTED 0x00000002
-
-#define LCID_INSTALLED 0x00000001
-#define LCID_SUPPORTED 0x00000002
-#define LCID_ALTERNATE_SORTS 0x00000004
-
-#define CP_INSTALLED 0x00000001
-#define CP_SUPPORTED 0x00000002
-
-#define SORT_STRINGSORT 0x00001000
-
-#define CSTR_LESS_THAN 1
-#define CSTR_EQUAL 2
-#define CSTR_GREATER_THAN 3
-
-#define CP_ACP 0
-#define CP_OEMCP 1
-#define CP_MACCP 2
-#define CP_THREAD_ACP 3
-#define CP_SYMBOL 42
-
-#define CP_UTF7 65000
-#define CP_UTF8 65001
-
-#define CTRY_DEFAULT 0
-
-#define CTRY_ALBANIA 355
-#define CTRY_ALGERIA 213
-#define CTRY_ARGENTINA 54
-#define CTRY_ARMENIA 374
-#define CTRY_AUSTRALIA 61
-#define CTRY_AUSTRIA 43
-#define CTRY_AZERBAIJAN 994
-#define CTRY_BAHRAIN 973
-#define CTRY_BELARUS 375
-#define CTRY_BELGIUM 32
-#define CTRY_BELIZE 501
-#define CTRY_BOLIVIA 591
-#define CTRY_BRAZIL 55
-#define CTRY_BRUNEI_DARUSSALAM 673
-#define CTRY_BULGARIA 359
-#define CTRY_CANADA 2
-#define CTRY_CARIBBEAN 1
-#define CTRY_CHILE 56
-#define CTRY_COLOMBIA 57
-#define CTRY_COSTA_RICA 506
-#define CTRY_CROATIA 385
-#define CTRY_CZECH 420
-#define CTRY_DENMARK 45
-#define CTRY_DOMINICAN_REPUBLIC 1
-#define CTRY_ECUADOR 593
-#define CTRY_EGYPT 20
-#define CTRY_EL_SALVADOR 503
-#define CTRY_ESTONIA 372
-#define CTRY_FAEROE_ISLANDS 298
-#define CTRY_FINLAND 358
-#define CTRY_FRANCE 33
-#define CTRY_GEORGIA 995
-#define CTRY_GERMANY 49
-#define CTRY_GREECE 30
-#define CTRY_GUATEMALA 502
-#define CTRY_HONDURAS 504
-#define CTRY_HONG_KONG 852
-#define CTRY_HUNGARY 36
-#define CTRY_ICELAND 354
-#define CTRY_INDIA 91
-#define CTRY_INDONESIA 62
-#define CTRY_IRAN 981
-#define CTRY_IRAQ 964
-#define CTRY_IRELAND 353
-#define CTRY_ISRAEL 972
-#define CTRY_ITALY 39
-#define CTRY_JAMAICA 1
-#define CTRY_JAPAN 81
-#define CTRY_JORDAN 962
-#define CTRY_KAZAKSTAN 7
-#define CTRY_KENYA 254
-#define CTRY_KUWAIT 965
-#define CTRY_KYRGYZSTAN 996
-#define CTRY_LATVIA 371
-#define CTRY_LEBANON 961
-#define CTRY_LIBYA 218
-#define CTRY_LIECHTENSTEIN 41
-#define CTRY_LITHUANIA 370
-#define CTRY_LUXEMBOURG 352
-#define CTRY_MACAU 853
-#define CTRY_MACEDONIA 389
-#define CTRY_MALAYSIA 60
-#define CTRY_MALDIVES 960
-#define CTRY_MEXICO 52
-#define CTRY_MONACO 33
-#define CTRY_MONGOLIA 976
-#define CTRY_MOROCCO 212
-#define CTRY_NETHERLANDS 31
-#define CTRY_NEW_ZEALAND 64
-#define CTRY_NICARAGUA 505
-#define CTRY_NORWAY 47
-#define CTRY_OMAN 968
-#define CTRY_PAKISTAN 92
-#define CTRY_PANAMA 507
-#define CTRY_PARAGUAY 595
-#define CTRY_PERU 51
-#define CTRY_PHILIPPINES 63
-#define CTRY_POLAND 48
-#define CTRY_PORTUGAL 351
-#define CTRY_PRCHINA 86
-#define CTRY_PUERTO_RICO 1
-#define CTRY_QATAR 974
-#define CTRY_ROMANIA 40
-#define CTRY_RUSSIA 7
-#define CTRY_SAUDI_ARABIA 966
-#define CTRY_SERBIA 381
-#define CTRY_SINGAPORE 65
-#define CTRY_SLOVAK 421
-#define CTRY_SLOVENIA 386
-#define CTRY_SOUTH_AFRICA 27
-#define CTRY_SOUTH_KOREA 82
-#define CTRY_SPAIN 34
-#define CTRY_SWEDEN 46
-#define CTRY_SWITZERLAND 41
-#define CTRY_SYRIA 963
-#define CTRY_TAIWAN 886
-#define CTRY_TATARSTAN 7
-#define CTRY_THAILAND 66
-#define CTRY_TRINIDAD_Y_TOBAGO 1
-#define CTRY_TUNISIA 216
-#define CTRY_TURKEY 90
-#define CTRY_UAE 971
-#define CTRY_UKRAINE 380
-#define CTRY_UNITED_KINGDOM 44
-#define CTRY_UNITED_STATES 1
-#define CTRY_URUGUAY 598
-#define CTRY_UZBEKISTAN 7
-#define CTRY_VENEZUELA 58
-#define CTRY_VIET_NAM 84
-#define CTRY_YEMEN 967
-#define CTRY_ZIMBABWE 263
-
-#define LOCALE_NOUSEROVERRIDE 0x80000000
-#define LOCALE_USE_CP_ACP 0x40000000
-#define LOCALE_RETURN_NUMBER 0x20000000
-
-#define LOCALE_ILANGUAGE 0x00000001
-#define LOCALE_SLANGUAGE 0x00000002
-#define LOCALE_SENGLANGUAGE 0x00001001
-#define LOCALE_SABBREVLANGNAME 0x00000003
-#define LOCALE_SNATIVELANGNAME 0x00000004
-
-#define LOCALE_ICOUNTRY 0x00000005
-#define LOCALE_SCOUNTRY 0x00000006
-#define LOCALE_SENGCOUNTRY 0x00001002
-#define LOCALE_SABBREVCTRYNAME 0x00000007
-#define LOCALE_SNATIVECTRYNAME 0x00000008
-
-#define LOCALE_IDEFAULTLANGUAGE 0x00000009
-#define LOCALE_IDEFAULTCOUNTRY 0x0000000A
-#define LOCALE_IDEFAULTCODEPAGE 0x0000000B
-#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
-#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011
-
-#define LOCALE_SLIST 0x0000000C
-#define LOCALE_IMEASURE 0x0000000D
-
-#define LOCALE_SDECIMAL 0x0000000E
-#define LOCALE_STHOUSAND 0x0000000F
-#define LOCALE_SGROUPING 0x00000010
-#define LOCALE_IDIGITS 0x00000011
-#define LOCALE_ILZERO 0x00000012
-#define LOCALE_INEGNUMBER 0x00001010
-#define LOCALE_SNATIVEDIGITS 0x00000013
-
-#define LOCALE_SCURRENCY 0x00000014
-#define LOCALE_SINTLSYMBOL 0x00000015
-#define LOCALE_SMONDECIMALSEP 0x00000016
-#define LOCALE_SMONTHOUSANDSEP 0x00000017
-#define LOCALE_SMONGROUPING 0x00000018
-#define LOCALE_ICURRDIGITS 0x00000019
-#define LOCALE_IINTLCURRDIGITS 0x0000001A
-#define LOCALE_ICURRENCY 0x0000001B
-#define LOCALE_INEGCURR 0x0000001C
-
-#define LOCALE_SDATE 0x0000001D
-#define LOCALE_STIME 0x0000001E
-#define LOCALE_SSHORTDATE 0x0000001F
-#define LOCALE_SLONGDATE 0x00000020
-#define LOCALE_STIMEFORMAT 0x00001003
-#define LOCALE_IDATE 0x00000021
-#define LOCALE_ILDATE 0x00000022
-#define LOCALE_ITIME 0x00000023
-#define LOCALE_ITIMEMARKPOSN 0x00001005
-#define LOCALE_ICENTURY 0x00000024
-#define LOCALE_ITLZERO 0x00000025
-#define LOCALE_IDAYLZERO 0x00000026
-#define LOCALE_IMONLZERO 0x00000027
-#define LOCALE_S1159 0x00000028
-#define LOCALE_S2359 0x00000029
-
-#define LOCALE_ICALENDARTYPE 0x00001009
-#define LOCALE_IOPTIONALCALENDAR 0x0000100B
-#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C
-#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D
-
-#define LOCALE_SDAYNAME1 0x0000002A
-#define LOCALE_SDAYNAME2 0x0000002B
-#define LOCALE_SDAYNAME3 0x0000002C
-#define LOCALE_SDAYNAME4 0x0000002D
-#define LOCALE_SDAYNAME5 0x0000002E
-#define LOCALE_SDAYNAME6 0x0000002F
-#define LOCALE_SDAYNAME7 0x00000030
-#define LOCALE_SABBREVDAYNAME1 0x00000031
-#define LOCALE_SABBREVDAYNAME2 0x00000032
-#define LOCALE_SABBREVDAYNAME3 0x00000033
-#define LOCALE_SABBREVDAYNAME4 0x00000034
-#define LOCALE_SABBREVDAYNAME5 0x00000035
-#define LOCALE_SABBREVDAYNAME6 0x00000036
-#define LOCALE_SABBREVDAYNAME7 0x00000037
-#define LOCALE_SMONTHNAME1 0x00000038
-#define LOCALE_SMONTHNAME2 0x00000039
-#define LOCALE_SMONTHNAME3 0x0000003A
-#define LOCALE_SMONTHNAME4 0x0000003B
-#define LOCALE_SMONTHNAME5 0x0000003C
-#define LOCALE_SMONTHNAME6 0x0000003D
-#define LOCALE_SMONTHNAME7 0x0000003E
-#define LOCALE_SMONTHNAME8 0x0000003F
-#define LOCALE_SMONTHNAME9 0x00000040
-#define LOCALE_SMONTHNAME10 0x00000041
-#define LOCALE_SMONTHNAME11 0x00000042
-#define LOCALE_SMONTHNAME12 0x00000043
-#define LOCALE_SMONTHNAME13 0x0000100E
-#define LOCALE_SABBREVMONTHNAME1 0x00000044
-#define LOCALE_SABBREVMONTHNAME2 0x00000045
-#define LOCALE_SABBREVMONTHNAME3 0x00000046
-#define LOCALE_SABBREVMONTHNAME4 0x00000047
-#define LOCALE_SABBREVMONTHNAME5 0x00000048
-#define LOCALE_SABBREVMONTHNAME6 0x00000049
-#define LOCALE_SABBREVMONTHNAME7 0x0000004A
-#define LOCALE_SABBREVMONTHNAME8 0x0000004B
-#define LOCALE_SABBREVMONTHNAME9 0x0000004C
-#define LOCALE_SABBREVMONTHNAME10 0x0000004D
-#define LOCALE_SABBREVMONTHNAME11 0x0000004E
-#define LOCALE_SABBREVMONTHNAME12 0x0000004F
-#define LOCALE_SABBREVMONTHNAME13 0x0000100F
-
-#define LOCALE_SPOSITIVESIGN 0x00000050
-#define LOCALE_SNEGATIVESIGN 0x00000051
-#define LOCALE_IPOSSIGNPOSN 0x00000052
-#define LOCALE_INEGSIGNPOSN 0x00000053
-#define LOCALE_IPOSSYMPRECEDES 0x00000054
-#define LOCALE_IPOSSEPBYSPACE 0x00000055
-#define LOCALE_INEGSYMPRECEDES 0x00000056
-#define LOCALE_INEGSEPBYSPACE 0x00000057
-#define LOCALE_FONTSIGNATURE 0x00000058
-#define LOCALE_SISO639LANGNAME 0x00000059
-#define LOCALE_SISO3166CTRYNAME 0x0000005A
-
-#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012
-#define LOCALE_IPAPERSIZE 0x0000100A
-#define LOCALE_SENGCURRNAME 0x00001007
-#define LOCALE_SNATIVECURRNAME 0x00001008
-#define LOCALE_SYEARMONTH 0x00001006
-#define LOCALE_SSORTNAME 0x00001013
-#define LOCALE_IDIGITSUBSTITUTION 0x00001014
-
-#define TIME_NOMINUTESORSECONDS 0x00000001
-#define TIME_NOSECONDS 0x00000002
-#define TIME_NOTIMEMARKER 0x00000004
-#define TIME_FORCE24HOURFORMAT 0x00000008
-
-#define DATE_SHORTDATE 0x00000001
-#define DATE_LONGDATE 0x00000002
-#define DATE_USE_ALT_CALENDAR 0x00000004
-#define DATE_YEARMONTH 0x00000008
-#define DATE_LTRREADING 0x00000010
-#define DATE_RTLREADING 0x00000020
-
-#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE
-#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP
-#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER
-
-#define CAL_ICALINTVALUE 0x00000001
-#define CAL_SCALNAME 0x00000002
-#define CAL_IYEAROFFSETRANGE 0x00000003
-#define CAL_SERASTRING 0x00000004
-#define CAL_SSHORTDATE 0x00000005
-#define CAL_SLONGDATE 0x00000006
-#define CAL_SDAYNAME1 0x00000007
-#define CAL_SDAYNAME2 0x00000008
-#define CAL_SDAYNAME3 0x00000009
-#define CAL_SDAYNAME4 0x0000000a
-#define CAL_SDAYNAME5 0x0000000b
-#define CAL_SDAYNAME6 0x0000000c
-#define CAL_SDAYNAME7 0x0000000d
-#define CAL_SABBREVDAYNAME1 0x0000000e
-#define CAL_SABBREVDAYNAME2 0x0000000f
-#define CAL_SABBREVDAYNAME3 0x00000010
-#define CAL_SABBREVDAYNAME4 0x00000011
-#define CAL_SABBREVDAYNAME5 0x00000012
-#define CAL_SABBREVDAYNAME6 0x00000013
-#define CAL_SABBREVDAYNAME7 0x00000014
-#define CAL_SMONTHNAME1 0x00000015
-#define CAL_SMONTHNAME2 0x00000016
-#define CAL_SMONTHNAME3 0x00000017
-#define CAL_SMONTHNAME4 0x00000018
-#define CAL_SMONTHNAME5 0x00000019
-#define CAL_SMONTHNAME6 0x0000001a
-#define CAL_SMONTHNAME7 0x0000001b
-#define CAL_SMONTHNAME8 0x0000001c
-#define CAL_SMONTHNAME9 0x0000001d
-#define CAL_SMONTHNAME10 0x0000001e
-#define CAL_SMONTHNAME11 0x0000001f
-#define CAL_SMONTHNAME12 0x00000020
-#define CAL_SMONTHNAME13 0x00000021
-#define CAL_SABBREVMONTHNAME1 0x00000022
-#define CAL_SABBREVMONTHNAME2 0x00000023
-#define CAL_SABBREVMONTHNAME3 0x00000024
-#define CAL_SABBREVMONTHNAME4 0x00000025
-#define CAL_SABBREVMONTHNAME5 0x00000026
-#define CAL_SABBREVMONTHNAME6 0x00000027
-#define CAL_SABBREVMONTHNAME7 0x00000028
-#define CAL_SABBREVMONTHNAME8 0x00000029
-#define CAL_SABBREVMONTHNAME9 0x0000002a
-#define CAL_SABBREVMONTHNAME10 0x0000002b
-#define CAL_SABBREVMONTHNAME11 0x0000002c
-#define CAL_SABBREVMONTHNAME12 0x0000002d
-#define CAL_SABBREVMONTHNAME13 0x0000002e
-#define CAL_SYEARMONTH 0x0000002f
-#define CAL_ITWODIGITYEARMAX 0x00000030
-
-#define ENUM_ALL_CALENDARS 0xffffffff
-
-#define CAL_GREGORIAN 1
-#define CAL_GREGORIAN_US 2
-#define CAL_JAPAN 3
-#define CAL_TAIWAN 4
-#define CAL_KOREA 5
-#define CAL_HIJRI 6
-#define CAL_THAI 7
-#define CAL_HEBREW 8
-#define CAL_GREGORIAN_ME_FRENCH 9
-#define CAL_GREGORIAN_ARABIC 10
-#define CAL_GREGORIAN_XLIT_ENGLISH 11
-#define CAL_GREGORIAN_XLIT_FRENCH 12
-
-#define LGRPID_WESTERN_EUROPE 0x0001
-#define LGRPID_CENTRAL_EUROPE 0x0002
-#define LGRPID_BALTIC 0x0003
-#define LGRPID_GREEK 0x0004
-#define LGRPID_CYRILLIC 0x0005
-#define LGRPID_TURKISH 0x0006
-#define LGRPID_JAPANESE 0x0007
-#define LGRPID_KOREAN 0x0008
-#define LGRPID_TRADITIONAL_CHINESE 0x0009
-#define LGRPID_SIMPLIFIED_CHINESE 0x000a
-#define LGRPID_THAI 0x000b
-#define LGRPID_HEBREW 0x000c
-#define LGRPID_ARABIC 0x000d
-#define LGRPID_VIETNAMESE 0x000e
-#define LGRPID_INDIC 0x000f
-#define LGRPID_GEORGIAN 0x0010
-#define LGRPID_ARMENIAN 0x0011
-
- typedef DWORD LGRPID;
- typedef DWORD LCTYPE;
- typedef DWORD CALTYPE;
- typedef DWORD CALID;
-
- typedef struct _cpinfo {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
- } CPINFO,*LPCPINFO;
-
- typedef struct _cpinfoexA {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
- WCHAR UnicodeDefaultChar;
- UINT CodePage;
- CHAR CodePageName[MAX_PATH];
- } CPINFOEXA,*LPCPINFOEXA;
-
- typedef struct _cpinfoexW {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
- WCHAR UnicodeDefaultChar;
- UINT CodePage;
- WCHAR CodePageName[MAX_PATH];
- } CPINFOEXW,*LPCPINFOEXW;
-
-#ifdef UNICODE
- typedef CPINFOEXW CPINFOEX;
- typedef LPCPINFOEXW LPCPINFOEX;
-#else
- typedef CPINFOEXA CPINFOEX;
- typedef LPCPINFOEXA LPCPINFOEX;
-#endif
-
- typedef struct _numberfmtA {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPSTR lpDecimalSep;
- LPSTR lpThousandSep;
- UINT NegativeOrder;
- } NUMBERFMTA,*LPNUMBERFMTA;
-
- typedef struct _numberfmtW {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPWSTR lpDecimalSep;
- LPWSTR lpThousandSep;
- UINT NegativeOrder;
- } NUMBERFMTW,*LPNUMBERFMTW;
-
-#ifdef UNICODE
- typedef NUMBERFMTW NUMBERFMT;
- typedef LPNUMBERFMTW LPNUMBERFMT;
-#else
- typedef NUMBERFMTA NUMBERFMT;
- typedef LPNUMBERFMTA LPNUMBERFMT;
-#endif
-
- typedef struct _currencyfmtA {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPSTR lpDecimalSep;
- LPSTR lpThousandSep;
- UINT NegativeOrder;
- UINT PositiveOrder;
- LPSTR lpCurrencySymbol;
- } CURRENCYFMTA,*LPCURRENCYFMTA;
-
- typedef struct _currencyfmtW {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPWSTR lpDecimalSep;
- LPWSTR lpThousandSep;
- UINT NegativeOrder;
- UINT PositiveOrder;
- LPWSTR lpCurrencySymbol;
- } CURRENCYFMTW,*LPCURRENCYFMTW;
-
-#ifdef UNICODE
- typedef CURRENCYFMTW CURRENCYFMT;
- typedef LPCURRENCYFMTW LPCURRENCYFMT;
-#else
- typedef CURRENCYFMTA CURRENCYFMT;
- typedef LPCURRENCYFMTA LPCURRENCYFMT;
-#endif
-
- enum SYSNLS_FUNCTION {
- COMPARE_STRING = 0x0001
- };
-
- typedef DWORD NLS_FUNCTION;
-
- typedef struct _nlsversioninfo{
- DWORD dwNLSVersionInfoSize;
- DWORD dwNLSVersion;
- DWORD dwDefinedVersion;
- } NLSVERSIONINFO,*LPNLSVERSIONINFO;
-
- typedef LONG GEOID;
- typedef DWORD GEOTYPE;
- typedef DWORD GEOCLASS;
-
-#define GEOID_NOT_AVAILABLE -1
-
- enum SYSGEOTYPE {
- GEO_NATION = 0x0001,GEO_LATITUDE = 0x0002,GEO_LONGITUDE = 0x0003,GEO_ISO2 = 0x0004,GEO_ISO3 = 0x0005,GEO_RFC1766 = 0x0006,GEO_LCID = 0x0007,
- GEO_FRIENDLYNAME= 0x0008,GEO_OFFICIALNAME= 0x0009,GEO_TIMEZONES = 0x000A,GEO_OFFICIALLANGUAGES = 0x000B
- };
-
- enum SYSGEOCLASS {
- GEOCLASS_NATION = 16,GEOCLASS_REGION = 14
- };
-
- typedef WINBOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCA)(LGRPID,LPSTR,LPSTR,DWORD,LONG_PTR);
- typedef WINBOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCA)(LGRPID,LCID,LPSTR,LONG_PTR);
- typedef WINBOOL (CALLBACK *UILANGUAGE_ENUMPROCA)(LPSTR,LONG_PTR);
- typedef WINBOOL (CALLBACK *LOCALE_ENUMPROCA)(LPSTR);
- typedef WINBOOL (CALLBACK *CODEPAGE_ENUMPROCA)(LPSTR);
- typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCA)(LPSTR);
- typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCEXA)(LPSTR,CALID);
- typedef WINBOOL (CALLBACK *TIMEFMT_ENUMPROCA)(LPSTR);
- typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCA)(LPSTR);
- typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCEXA)(LPSTR,CALID);
- typedef WINBOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCW)(LGRPID,LPWSTR,LPWSTR,DWORD,LONG_PTR);
- typedef WINBOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCW)(LGRPID,LCID,LPWSTR,LONG_PTR);
- typedef WINBOOL (CALLBACK *UILANGUAGE_ENUMPROCW)(LPWSTR,LONG_PTR);
- typedef WINBOOL (CALLBACK *LOCALE_ENUMPROCW)(LPWSTR);
- typedef WINBOOL (CALLBACK *CODEPAGE_ENUMPROCW)(LPWSTR);
- typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCW)(LPWSTR);
- typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCEXW)(LPWSTR,CALID);
- typedef WINBOOL (CALLBACK *TIMEFMT_ENUMPROCW)(LPWSTR);
- typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCW)(LPWSTR);
- typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCEXW)(LPWSTR,CALID);
- typedef WINBOOL (CALLBACK *GEO_ENUMPROC)(GEOID);
-
-#ifdef UNICODE
-#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW
-#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW
-#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW
-#define LOCALE_ENUMPROC LOCALE_ENUMPROCW
-#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
-#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
-#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW
-#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
-#define CALINFO_ENUMPROC CALINFO_ENUMPROCW
-#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
-#else
-#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA
-#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA
-#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA
-#define LOCALE_ENUMPROC LOCALE_ENUMPROCA
-#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
-#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
-#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA
-#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
-#define CALINFO_ENUMPROC CALINFO_ENUMPROCA
-#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA
-#endif
-
-#ifdef UNICODE
-#define GetCPInfoEx GetCPInfoExW
-#define CompareString CompareStringW
-#define LCMapString LCMapStringW
-#define GetLocaleInfo GetLocaleInfoW
-#define SetLocaleInfo SetLocaleInfoW
-#define GetCalendarInfo GetCalendarInfoW
-#define SetCalendarInfo SetCalendarInfoW
-#define GetTimeFormat GetTimeFormatW
-#define GetDateFormat GetDateFormatW
-#define GetNumberFormat GetNumberFormatW
-#define GetCurrencyFormat GetCurrencyFormatW
-#define EnumCalendarInfo EnumCalendarInfoW
-#define EnumCalendarInfoEx EnumCalendarInfoExW
-#define EnumTimeFormats EnumTimeFormatsW
-#define EnumDateFormats EnumDateFormatsW
-#define EnumDateFormatsEx EnumDateFormatsExW
-#define GetGeoInfo GetGeoInfoW
-#define GetStringTypeEx GetStringTypeExW
-#define FoldString FoldStringW
-#define EnumSystemLanguageGroups EnumSystemLanguageGroupsW
-#define EnumLanguageGroupLocales EnumLanguageGroupLocalesW
-#define EnumUILanguages EnumUILanguagesW
-#define EnumSystemLocales EnumSystemLocalesW
-#define EnumSystemCodePages EnumSystemCodePagesW
-#else
-#define GetCPInfoEx GetCPInfoExA
-#define CompareString CompareStringA
-#define LCMapString LCMapStringA
-#define GetLocaleInfo GetLocaleInfoA
-#define SetLocaleInfo SetLocaleInfoA
-#define GetCalendarInfo GetCalendarInfoA
-#define SetCalendarInfo SetCalendarInfoA
-#define GetTimeFormat GetTimeFormatA
-#define GetDateFormat GetDateFormatA
-#define GetNumberFormat GetNumberFormatA
-#define GetCurrencyFormat GetCurrencyFormatA
-#define EnumCalendarInfo EnumCalendarInfoA
-#define EnumCalendarInfoEx EnumCalendarInfoExA
-#define EnumTimeFormats EnumTimeFormatsA
-#define EnumDateFormats EnumDateFormatsA
-#define EnumDateFormatsEx EnumDateFormatsExA
-#define GetGeoInfo GetGeoInfoA
-#define GetStringTypeEx GetStringTypeExA
-#define FoldString FoldStringA
-#define EnumSystemLanguageGroups EnumSystemLanguageGroupsA
-#define EnumLanguageGroupLocales EnumLanguageGroupLocalesA
-#define EnumUILanguages EnumUILanguagesA
-#define EnumSystemLocales EnumSystemLocalesA
-#define EnumSystemCodePages EnumSystemCodePagesA
-#endif
-
- WINBASEAPI WINBOOL WINAPI IsValidCodePage(UINT CodePage);
- WINBASEAPI UINT WINAPI GetACP(void);
- WINBASEAPI UINT WINAPI GetOEMCP(void);
- WINBASEAPI WINBOOL WINAPI GetCPInfo(UINT CodePage,LPCPINFO lpCPInfo);
- WINBASEAPI WINBOOL WINAPI GetCPInfoExA(UINT CodePage,DWORD dwFlags,LPCPINFOEXA lpCPInfoEx);
- WINBASEAPI WINBOOL WINAPI GetCPInfoExW(UINT CodePage,DWORD dwFlags,LPCPINFOEXW lpCPInfoEx);
- WINBASEAPI WINBOOL WINAPI IsDBCSLeadByte(BYTE TestChar);
- WINBASEAPI WINBOOL WINAPI IsDBCSLeadByteEx(UINT CodePage,BYTE TestChar);
- WINBASEAPI int WINAPI MultiByteToWideChar(UINT CodePage,DWORD dwFlags,LPCSTR lpMultiByteStr,int cbMultiByte,LPWSTR lpWideCharStr,int cchWideChar);
- WINBASEAPI int WINAPI WideCharToMultiByte(UINT CodePage,DWORD dwFlags,LPCWSTR lpWideCharStr,int cchWideChar,LPSTR lpMultiByteStr,int cbMultiByte,LPCSTR lpDefaultChar,LPBOOL lpUsedDefaultChar);
- WINBASEAPI int WINAPI CompareStringA(LCID Locale,DWORD dwCmpFlags,LPCSTR lpString1,int cchCount1,LPCSTR lpString2,int cchCount2);
- WINBASEAPI int WINAPI CompareStringW(LCID Locale,DWORD dwCmpFlags,LPCWSTR lpString1,int cchCount1,LPCWSTR lpString2,int cchCount2);
- WINBASEAPI int WINAPI LCMapStringA(LCID Locale,DWORD dwMapFlags,LPCSTR lpSrcStr,int cchSrc,LPSTR lpDestStr,int cchDest);
- WINBASEAPI int WINAPI LCMapStringW(LCID Locale,DWORD dwMapFlags,LPCWSTR lpSrcStr,int cchSrc,LPWSTR lpDestStr,int cchDest);
- WINBASEAPI int WINAPI GetLocaleInfoA(LCID Locale,LCTYPE LCType,LPSTR lpLCData,int cchData);
- WINBASEAPI int WINAPI GetLocaleInfoW(LCID Locale,LCTYPE LCType,LPWSTR lpLCData,int cchData);
- WINBASEAPI WINBOOL WINAPI SetLocaleInfoA(LCID Locale,LCTYPE LCType,LPCSTR lpLCData);
- WINBASEAPI WINBOOL WINAPI SetLocaleInfoW(LCID Locale,LCTYPE LCType,LPCWSTR lpLCData);
- WINBASEAPI int WINAPI GetCalendarInfoA(LCID Locale,CALID Calendar,CALTYPE CalType,LPSTR lpCalData,int cchData,LPDWORD lpValue);
- WINBASEAPI int WINAPI GetCalendarInfoW(LCID Locale,CALID Calendar,CALTYPE CalType,LPWSTR lpCalData,int cchData,LPDWORD lpValue);
- WINBASEAPI WINBOOL WINAPI SetCalendarInfoA(LCID Locale,CALID Calendar,CALTYPE CalType,LPCSTR lpCalData);
- WINBASEAPI WINBOOL WINAPI SetCalendarInfoW(LCID Locale,CALID Calendar,CALTYPE CalType,LPCWSTR lpCalData);
- WINBASEAPI int WINAPI GetTimeFormatA(LCID Locale,DWORD dwFlags,CONST SYSTEMTIME *lpTime,LPCSTR lpFormat,LPSTR lpTimeStr,int cchTime);
- WINBASEAPI int WINAPI GetTimeFormatW(LCID Locale,DWORD dwFlags,CONST SYSTEMTIME *lpTime,LPCWSTR lpFormat,LPWSTR lpTimeStr,int cchTime);
- WINBASEAPI int WINAPI GetDateFormatA(LCID Locale,DWORD dwFlags,CONST SYSTEMTIME *lpDate,LPCSTR lpFormat,LPSTR lpDateStr,int cchDate);
- WINBASEAPI int WINAPI GetDateFormatW(LCID Locale,DWORD dwFlags,CONST SYSTEMTIME *lpDate,LPCWSTR lpFormat,LPWSTR lpDateStr,int cchDate);
- WINBASEAPI int WINAPI GetNumberFormatA(LCID Locale,DWORD dwFlags,LPCSTR lpValue,CONST NUMBERFMTA *lpFormat,LPSTR lpNumberStr,int cchNumber);
- WINBASEAPI int WINAPI GetNumberFormatW(LCID Locale,DWORD dwFlags,LPCWSTR lpValue,CONST NUMBERFMTW *lpFormat,LPWSTR lpNumberStr,int cchNumber);
- WINBASEAPI int WINAPI GetCurrencyFormatA(LCID Locale,DWORD dwFlags,LPCSTR lpValue,CONST CURRENCYFMTA *lpFormat,LPSTR lpCurrencyStr,int cchCurrency);
- WINBASEAPI int WINAPI GetCurrencyFormatW(LCID Locale,DWORD dwFlags,LPCWSTR lpValue,CONST CURRENCYFMTW *lpFormat,LPWSTR lpCurrencyStr,int cchCurrency);
- WINBASEAPI WINBOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA lpCalInfoEnumProc,LCID Locale,CALID Calendar,CALTYPE CalType);
- WINBASEAPI WINBOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW lpCalInfoEnumProc,LCID Locale,CALID Calendar,CALTYPE CalType);
- WINBASEAPI WINBOOL WINAPI EnumCalendarInfoExA(CALINFO_ENUMPROCEXA lpCalInfoEnumProcEx,LCID Locale,CALID Calendar,CALTYPE CalType);
- WINBASEAPI WINBOOL WINAPI EnumCalendarInfoExW(CALINFO_ENUMPROCEXW lpCalInfoEnumProcEx,LCID Locale,CALID Calendar,CALTYPE CalType);
- WINBASEAPI WINBOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA lpTimeFmtEnumProc,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA lpDateFmtEnumProc,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW lpDateFmtEnumProc,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx,LCID Locale,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI IsValidLanguageGroup(LGRPID LanguageGroup,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI GetNLSVersion(NLS_FUNCTION Function,LCID Locale,LPNLSVERSIONINFO lpVersionInformation);
- WINBASEAPI WINBOOL WINAPI IsNLSDefinedString(NLS_FUNCTION Function,DWORD dwFlags,LPNLSVERSIONINFO lpVersionInformation,LPCWSTR lpString,INT cchStr);
- WINBASEAPI WINBOOL WINAPI IsValidLocale(LCID Locale,DWORD dwFlags);
- WINBASEAPI int WINAPI GetGeoInfoA(GEOID Location,GEOTYPE GeoType,LPSTR lpGeoData,int cchData,LANGID LangId);
- WINBASEAPI int WINAPI GetGeoInfoW(GEOID Location,GEOTYPE GeoType,LPWSTR lpGeoData,int cchData,LANGID LangId);
- WINBASEAPI WINBOOL WINAPI EnumSystemGeoID(GEOCLASS GeoClass,GEOID ParentGeoId,GEO_ENUMPROC lpGeoEnumProc);
- WINBASEAPI GEOID WINAPI GetUserGeoID(GEOCLASS GeoClass);
- WINBASEAPI WINBOOL WINAPI SetUserGeoID(GEOID GeoId);
- WINBASEAPI LCID WINAPI ConvertDefaultLocale(LCID Locale);
- WINBASEAPI LCID WINAPI GetThreadLocale(void);
- WINBASEAPI WINBOOL WINAPI SetThreadLocale(LCID Locale);
- WINBASEAPI LANGID WINAPI GetSystemDefaultUILanguage(void);
- WINBASEAPI LANGID WINAPI GetUserDefaultUILanguage(void);
- WINBASEAPI LANGID WINAPI GetSystemDefaultLangID(void);
- WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
- WINBASEAPI LCID WINAPI GetSystemDefaultLCID(void);
- WINBASEAPI LCID WINAPI GetUserDefaultLCID(void);
- WINBASEAPI WINBOOL WINAPI GetStringTypeExA(LCID Locale,DWORD dwInfoType,LPCSTR lpSrcStr,int cchSrc,LPWORD lpCharType);
- WINBASEAPI WINBOOL WINAPI GetStringTypeExW(LCID Locale,DWORD dwInfoType,LPCWSTR lpSrcStr,int cchSrc,LPWORD lpCharType);
- WINBASEAPI WINBOOL WINAPI GetStringTypeA(LCID Locale,DWORD dwInfoType,LPCSTR lpSrcStr,int cchSrc,LPWORD lpCharType);
- WINBASEAPI WINBOOL WINAPI GetStringTypeW(DWORD dwInfoType,LPCWSTR lpSrcStr,int cchSrc,LPWORD lpCharType);
- WINBASEAPI int WINAPI FoldStringA(DWORD dwMapFlags,LPCSTR lpSrcStr,int cchSrc,LPSTR lpDestStr,int cchDest);
- WINBASEAPI int WINAPI FoldStringW(DWORD dwMapFlags,LPCWSTR lpSrcStr,int cchSrc,LPWSTR lpDestStr,int cchDest);
- WINBASEAPI WINBOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA lpLanguageGroupEnumProc,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc,LGRPID LanguageGroup,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc,LGRPID LanguageGroup,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA lpUILanguageEnumProc,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW lpUILanguageEnumProc,DWORD dwFlags,LONG_PTR lParam);
- WINBASEAPI WINBOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpLocaleEnumProc,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpLocaleEnumProc,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA lpCodePageEnumProc,DWORD dwFlags);
- WINBASEAPI WINBOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc,DWORD dwFlags);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/win32/include/winapi/winnt.h b/win32/include/winapi/winnt.h
index 348d9a8..4cf685d 100644
--- a/win32/include/winapi/winnt.h
+++ b/win32/include/winapi/winnt.h
@@ -13,7 +13,7 @@ extern "C" {
#include <ctype.h>
#define ANYSIZE_ARRAY 1
-#include <specstrings.h>
+//gr #include <specstrings.h>
#define RESTRICTED_POINTER
diff --git a/win32/include/winapi/winreg.h b/win32/include/winapi/winreg.h
index 50e5ff3..f158d28 100644
--- a/win32/include/winapi/winreg.h
+++ b/win32/include/winapi/winreg.h
@@ -238,7 +238,7 @@ extern "C" {
WINADVAPI WINBOOL WINAPI AbortSystemShutdownA(LPSTR lpMachineName);
WINADVAPI WINBOOL WINAPI AbortSystemShutdownW(LPWSTR lpMachineName);
-#include <reason.h>
+//gr #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
diff --git a/win32/lib/chkstk.S b/win32/lib/chkstk.S
index 2726061..ec5c07f 100644
--- a/win32/lib/chkstk.S
+++ b/win32/lib/chkstk.S
@@ -2,7 +2,7 @@
/* chkstk86.s */
/* ---------------------------------------------- */
-#ifndef TCC_TARGET_X86_64
+#ifndef __x86_64__
/* ---------------------------------------------- */
.globl __chkstk
@@ -68,7 +68,7 @@ tinyc_getbp:
/* ---------------------------------------------- */
-#ifndef TCC_TARGET_X86_64
+#ifndef __x86_64__
/* ---------------------------------------------- */
/*
diff --git a/win32/lib/crt1.c b/win32/lib/crt1.c
index 7a2d765..0e04fc0 100644
--- a/win32/lib/crt1.c
+++ b/win32/lib/crt1.c
@@ -1,6 +1,9 @@
// =============================================
// crt1.c
+// _UNICODE for tchar.h, UNICODE for API
+#include <tchar.h>
+
#include <stdio.h>
#include <stdlib.h>
@@ -13,41 +16,64 @@
#define _PC_53 0x00010000 // 53 bits
#define _PC_64 0x00000000 // 64 bits
-typedef struct
-{
- int newmode;
-} _startupinfo;
+#ifdef _UNICODE
+#define __tgetmainargs __wgetmainargs
+#define _tstart _wstart
+#define _tmain wmain
+#define _runtmain _runwmain
+#else
+#define __tgetmainargs __getmainargs
+#define _tstart _start
+#define _tmain main
+#define _runtmain _runmain
+#endif
-int __cdecl __getmainargs(int *pargc, char ***pargv, char ***penv, int globb, _startupinfo*);
+typedef struct { int newmode; } _startupinfo;
+int __cdecl __tgetmainargs(int *pargc, _TCHAR ***pargv, _TCHAR ***penv, int globb, _startupinfo*);
void __cdecl __set_app_type(int apptype);
unsigned int __cdecl _controlfp(unsigned int new_value, unsigned int mask);
-int main(int argc, char * argv[], char * env[]);
+extern int _tmain(int argc, _TCHAR * argv[], _TCHAR * env[]);
/* Allow command-line globbing with "int _dowildcard = 1;" in the user source */
int _dowildcard;
-void _start(void)
+void _tstart(void)
{
__TRY__
- int argc, ret;
- char **argv;
- char **env;
- _startupinfo start_info;
+ _startupinfo start_info = {0};
// Sets the current application type
__set_app_type(_CONSOLE_APP);
// Set default FP precision to 53 bits (8-byte double)
- // _MCW_PC (Precision control) is not supported on
- // the ARM and x64 architectures
-#ifdef __i386
+ // _MCW_PC (Precision control) is not supported on ARM
+#if defined __i386__ || defined __x86_64__
_controlfp(_PC_53, _MCW_PC);
#endif
- start_info.newmode = 0;
- __getmainargs( &argc, &argv, &env, _dowildcard, &start_info);
- ret = main(argc, argv, env);
- exit(ret);
+ __tgetmainargs( &__argc, &__targv, &_tenviron, _dowildcard, &start_info);
+ exit(_tmain(__argc, __targv, _tenviron));
+}
+
+int _runtmain(int argc, /* as tcc passed in */ char **argv)
+{
+#ifdef UNICODE
+ _startupinfo start_info = {0};
+
+ __tgetmainargs(&__argc, &__targv, &_tenviron, _dowildcard, &start_info);
+ /* may be wrong when tcc has received wildcards (*.c) */
+ if (argc < __argc) {
+ __targv += __argc - argc;
+ __argc = argc;
+ }
+#else
+ __argc = argc;
+ __targv = argv;
+#endif
+#if defined __i386__ || defined __x86_64__
+ _controlfp(_PC_53, _MCW_PC);
+#endif
+ return _tmain(__argc, __targv, _tenviron);
}
// =============================================
diff --git a/win32/lib/crt1w.c b/win32/lib/crt1w.c
new file mode 100644
index 0000000..2b8bbc8
--- /dev/null
+++ b/win32/lib/crt1w.c
@@ -0,0 +1,3 @@
+#define _UNICODE 1
+#define UNICODE 1
+#include "crt1.c"
diff --git a/win32/lib/user32.def b/win32/lib/user32.def
index 4d2f704..a034dac 100644
--- a/win32/lib/user32.def
+++ b/win32/lib/user32.def
@@ -336,6 +336,10 @@ GetWindow
GetWindowContextHelpId
GetWindowDC
GetWindowInfo
+GetWindowLongPtrA
+GetWindowLongPtrW
+SetWindowLongPtrA
+SetWindowLongPtrW
GetWindowLongA
GetWindowLongW
GetWindowModuleFileNameA
diff --git a/win32/lib/wincrt1.c b/win32/lib/wincrt1.c
index 663fd33..ce3a63f 100644
--- a/win32/lib/wincrt1.c
+++ b/win32/lib/wincrt1.c
@@ -1,5 +1,8 @@
//+---------------------------------------------------------------------------
+// _UNICODE for tchar.h, UNICODE for API
+#include <tchar.h>
+
#include <windows.h>
#include <stdlib.h>
@@ -9,56 +12,64 @@
void __set_app_type(int);
void _controlfp(unsigned a, unsigned b);
-int _winstart(void)
-{
- __TRY__
- char *szCmd;
- STARTUPINFO startinfo;
- int fShow;
- int ret;
+#ifdef _UNICODE
+#define __tgetmainargs __wgetmainargs
+#define _twinstart _wwinstart
+#define _runtwinmain _runwwinmain
+int APIENTRY wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
+#else
+#define __tgetmainargs __getmainargs
+#define _twinstart _winstart
+#define _runtwinmain _runwinmain
+#endif
- __set_app_type(__GUI_APP);
- _controlfp(0x10000, 0x30000);
+typedef struct { int newmode; } _startupinfo;
+int __cdecl __tgetmainargs(int *pargc, _TCHAR ***pargv, _TCHAR ***penv, int globb, _startupinfo*);
- szCmd = GetCommandLine();
- if (szCmd) {
- while (' ' == *szCmd)
- szCmd++;
- if ('\"' == *szCmd) {
- while (*++szCmd)
- if ('\"' == *szCmd) {
- szCmd++;
- break;
- }
- } else {
- while (*szCmd && ' ' != *szCmd)
- szCmd++;
- }
- while (' ' == *szCmd)
- szCmd++;
- }
+static int go_winmain(TCHAR *arg1)
+{
+ STARTUPINFO si;
+ _TCHAR *szCmd, *p;
+ int fShow;
- GetStartupInfo(&startinfo);
- fShow = startinfo.wShowWindow;
- if (0 == (startinfo.dwFlags & STARTF_USESHOWWINDOW))
+ GetStartupInfo(&si);
+ if (si.dwFlags & STARTF_USESHOWWINDOW)
+ fShow = si.wShowWindow;
+ else
fShow = SW_SHOWDEFAULT;
- ret = WinMain(GetModuleHandle(NULL), NULL, szCmd, fShow);
- exit(ret);
+ szCmd = NULL, p = GetCommandLine();
+ if (arg1)
+ szCmd = _tcsstr(p, arg1);
+ if (NULL == szCmd)
+ szCmd = _tcsdup(__T(""));
+ else if (szCmd > p && szCmd[-1] == __T('"'))
+ --szCmd;
+#if defined __i386__ || defined __x86_64__
+ _controlfp(0x10000, 0x30000);
+#endif
+ return _tWinMain(GetModuleHandle(NULL), NULL, szCmd, fShow);
}
-int _runwinmain(int argc, char **argv)
+int _twinstart(void)
{
- char *szCmd, *p;
+ __TRY__
+ _startupinfo start_info_con = {0};
+ __set_app_type(__GUI_APP);
+ __tgetmainargs(&__argc, &__targv, &_tenviron, 0, &start_info_con);
+ exit(go_winmain(__argc > 1 ? __targv[1] : NULL));
+}
- p = GetCommandLine();
- szCmd = NULL;
- if (argc > 1)
- szCmd = strstr(p, argv[1]);
- if (NULL == szCmd)
- szCmd = "";
- else if (szCmd > p && szCmd[-1] == '\"')
- --szCmd;
- _controlfp(0x10000, 0x30000);
- return WinMain(GetModuleHandle(NULL), NULL, szCmd, SW_SHOWDEFAULT);
+int _runtwinmain(int argc, /* as tcc passed in */ char **argv)
+{
+#ifdef UNICODE
+ _startupinfo start_info = {0};
+ __tgetmainargs(&__argc, &__targv, &_tenviron, 0, &start_info);
+ /* may be wrong when tcc has received wildcards (*.c) */
+ if (argc < __argc)
+ __targv += __argc - argc, __argc = argc;
+#else
+ __argc = argc, __targv = argv;
+#endif
+ return go_winmain(__argc > 1 ? __targv[1] : NULL);
}
diff --git a/win32/lib/wincrt1w.c b/win32/lib/wincrt1w.c
new file mode 100644
index 0000000..a7d349e
--- /dev/null
+++ b/win32/lib/wincrt1w.c
@@ -0,0 +1,3 @@
+#define _UNICODE 1
+#define UNICODE 1
+#include "wincrt1.c"
diff --git a/win32/tcc-win32.txt b/win32/tcc-win32.txt
index da07e44..ab73007 100644
--- a/win32/tcc-win32.txt
+++ b/win32/tcc-win32.txt
@@ -1,162 +1,168 @@
-
- TinyCC
- ======
-
- This file contains specific information for usage of TinyCC
- under MS-Windows. See tcc-doc.html to have all the features.
-
-
- Installation from the binary ZIP package:
- -----------------------------------------
- Unzip the package to a directory of your choice.
-
-
- Set the system PATH:
- --------------------
- To be able to invoke the compiler from everywhere on your computer by
- just typing "tcc", please add the directory containing tcc.exe to your
- system PATH.
-
-
- Include and library search paths
- --------------------------------
- On windows, the standard "include" and "lib" directories are searched
- relatively from the location of the executables (tcc.exe, libtcc.dll).
-
-
- Examples:
- ---------
- Open a console window (DOS box) and 'cd' to the examples directory.
-
- For the 'Fibonacci' example type:
-
- tcc fib.c
-
- For the 'Hello Windows' GUI example type:
-
- tcc hello_win.c
-
- For the 'Hello DLL' example type
-
- tcc -shared dll.c
- tiny_impdef dll.dll (optional)
- tcc hello_dll.c dll.def
-
-
- Using libtcc as JIT compiler in your program
- --------------------------------------------
- Check out the 'libtcc_test' example:
-
- - Running it from source:
- tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c
-
- - Compiling with TCC:
- tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def
-
- - Compiling with MinGW:
- gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe
-
- - Compiling with MSVC:
- lib /def:libtcc\libtcc.def /out:libtcc.lib
- cl /MD examples/libtcc_test.c -I libtcc libtcc.lib
-
-
- Import Definition Files:
- ------------------------
- To link with Windows system DLLs, TCC uses import definition
- files (.def) instead of libraries.
-
- The included 'tiny_impdef' program may be used to make additional
- .def files for any DLL. For example:
-
- tiny_impdef.exe opengl32.dll
-
- Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
- the TCC commandline to link a program that uses opengl32.dll.
-
-
- Header Files:
- -------------
- The system header files (except _mingw.h) are from the MinGW
- distribution:
-
- http://www.mingw.org/
-
- From the windows headers, only a minimal set is included. If you need
- more, get MinGW's "w32api" package. Extract the files from "include"
- into your "tcc/include/winapi" directory.
-
-
- Resource Files:
- ---------------
- TCC can link windows resources in coff format as generated by MinGW's
- windres.exe. For example:
-
- windres -O coff app.rc -o appres.o
- tcc app.c appres.o -o app.exe
-
-
- Tiny Libmaker:
- --------------
- The included tiny_libmaker tool by Timovj Lahde can be used as
- 'ar' replacement to make a library from several object files:
-
- tiny_libmaker [rcs] library objectfiles ...
-
-
- Compilation from source:
- ------------------------
- * You can use the MinGW and MSYS tools available at
-
- http://www.mingw.org
-
- Untar the TCC archive and type in the MSYS shell:
-
- ./configure [--prefix installpath]
- make
- make install
-
- The default install location is c:\Program Files\tcc
-
- * Alternatively you can compile TCC with just GCC from MinGW using
-
- build-tcc.bat (from the win32 directory)
-
- To install, copy the entire contents of the win32 directory to
- where you want.
-
-
- Limitations:
- ------------
- - On the object file level, currently TCC supports only the ELF format,
- not COFF as used by MinGW and MSVC. It is not possible to exchange
- object files or libraries between TCC and these compilers. However
- libraries for TCC from objects by TCC can be made using tiny_libmaker
- or MinGW's ar.
-
- - No leading underscore is generated in the ELF symbols.
-
- - Bounds checking (option -b) is not supported on 64-bit OS.
-
-
- Documentation and License:
- --------------------------
- TCC is distributed under the GNU Lesser General Public License. (See
- COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
-
- TinyCC homepage is at:
-
- http://fabrice.bellard.free.fr/tcc/
-
-
- WinAPI Help and 3rd-party tools:
- --------------------------------
- The Windows API documentation (Win95) in a single .hlp file is
- available on the lcc-win32 site as "win32hlp.exe" or from other
- locations as "win32hlp_big.zip".
-
- A nice RAD tool to create windows resources (dialog boxes etc.) is
- "ResEd", available at the RadASM website.
-
-
- --- grischka
+
+ TinyCC
+ ======
+
+ This file contains specific information for usage of TinyCC
+ under MS-Windows. See tcc-doc.html to have all the features.
+
+
+ Installation from the binary ZIP package:
+ -----------------------------------------
+ Unzip the package to a directory of your choice.
+
+
+ Set the system PATH:
+ --------------------
+ To be able to invoke the compiler from everywhere on your computer by
+ just typing "tcc", please add the directory containing tcc.exe to your
+ system PATH.
+
+
+ Include and library search paths
+ --------------------------------
+ On windows, the standard "include" and "lib" directories are searched
+ relatively from the location of the executables (tcc.exe, libtcc.dll).
+
+
+ Examples:
+ ---------
+ Open a console window (DOS box) and 'cd' to the examples directory.
+
+ For the 'Fibonacci' example type:
+
+ tcc fib.c
+
+ For the 'Hello Windows' GUI example type:
+
+ tcc hello_win.c
+
+ For the 'Hello DLL' example type
+
+ tcc -shared dll.c
+ tcc -impdef dll.dll (optional)
+ tcc hello_dll.c dll.def
+
+
+ Using libtcc as JIT compiler in your program
+ --------------------------------------------
+ Check out the 'libtcc_test' example:
+
+ - Running it from source:
+ tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c
+
+ - Compiling with TCC:
+ tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def
+
+ - Compiling with MinGW:
+ gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe
+
+ - Compiling with MSVC:
+ lib /def:libtcc\libtcc.def /out:libtcc.lib
+ cl /MD examples/libtcc_test.c -I libtcc libtcc.lib
+
+
+ Import Definition Files:
+ ------------------------
+ To link with Windows system DLLs, TCC uses import definition
+ files (.def) instead of libraries.
+
+ The now built-in 'tiny_impdef' program may be used to make
+ additional .def files for any DLL. For example
+
+ tcc -impdef [-v] opengl32.dll [-o opengl32.def]
+
+ Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
+ the TCC commandline to link a program that uses opengl32.dll.
+
+
+ Header Files:
+ -------------
+ The system header files (except _mingw.h) are from the MinGW
+ distribution:
+
+ http://www.mingw.org/
+
+ From the windows headers, only a minimal set is included. If you need
+ more, get MinGW's "w32api" package. Extract the files from "include"
+ into your "tcc/include/winapi" directory.
+
+
+ Resource Files:
+ ---------------
+ TCC can link windows resources in coff format as generated by MinGW's
+ windres.exe. For example:
+
+ windres -O coff app.rc -o appres.o
+ tcc app.c appres.o -o app.exe
+
+
+ Tiny Libmaker:
+ --------------
+ The now built-in tiny_libmaker tool by Timovj Lahde can be used as
+ 'ar' replacement to make a library from several object files:
+
+ tcc -ar [rcsv] library objectfiles ...
+
+
+ Compilation from source:
+ ------------------------
+ * You can use the MinGW and MSYS tools available at
+ http://www.mingw.org
+ http://www.mingw-w64.org
+ http://www.msys2.org
+
+ Untar the TCC archive and type in the MSYS shell:
+ ./configure [--prefix installpath]
+ make
+ make install
+
+ The default install location is c:\Program Files\tcc
+
+ Cygwin can be used too with its mingw cross-compiler installed:
+ ./configure --cross-prefix=i686-w64-mingw32-
+ (the prefix may vary)
+
+ * Alternatively you can compile TCC with just GCC from MinGW using
+ > build-tcc.bat (from the win32 directory)
+
+ Also MSVC can be used with the "VSTools Developer Command Prompt":
+ > build-tcc.bat -c cl
+
+ or with an existing tcc (needs to be in a different directory)
+ > build-tcc.bat -c some-tcc-dir\tcc.exe
+
+ Also you can copy/install everything into another directory:
+ > build-tcc.bat -i <dir>
+
+ Limitations:
+ ------------
+ - On the object file level, currently TCC supports only the ELF format,
+ not COFF as used by MinGW and MSVC. It is not possible to exchange
+ object files or libraries between TCC and these compilers.
+
+ However libraries for TCC from objects by TCC can be made using
+ tcc -ar lib.a files.o ,,,
+
+ - No leading underscore is generated in the ELF symbols.
+
+ Documentation and License:
+ --------------------------
+ TCC is distributed under the GNU Lesser General Public License. (See
+ COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
+
+ TinyCC homepage is at:
+
+ http://fabrice.bellard.free.fr/tcc/
+
+
+ WinAPI Help and 3rd-party tools:
+ --------------------------------
+ The Windows API documentation (Win95) in a single .hlp file is
+ available on the lcc-win32 site as "win32hlp.exe" or from other
+ locations as "win32hlp_big.zip".
+
+ A nice RAD tool to create windows resources (dialog boxes etc.) is
+ "ResEd", available at the RadASM website.
+
+
+ --- grischka
diff --git a/win32/tools/tiny_impdef.c b/win32/tools/tiny_impdef.c
deleted file mode 100644
index b6debe6..0000000
--- a/win32/tools/tiny_impdef.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* -------------------------------------------------------------- */
-/*
- * tiny_impdef creates an export definition file (.def) from a dll
- * on MS-Windows. Usage: tiny_impdef library.dll [-o outputfile]"
- *
- * Copyright (c) 2005,2007 grischka
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef TINY_IMPDEF_GET_EXPORT_NAMES_ONLY
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <stdio.h>
-#include <io.h>
-#include <malloc.h>
-
-static char *get_export_names(int fd);
-#define tcc_free free
-#define tcc_realloc realloc
-
-/* extract the basename of a file */
-static char *file_basename(const char *name)
-{
- const char *p = strchr(name, 0);
- while (p > name
- && p[-1] != '/'
- && p[-1] != '\\'
- )
- --p;
- return (char*)p;
-}
-
-int main(int argc, char **argv)
-{
- int ret, v, i;
- char infile[MAX_PATH];
- char outfile[MAX_PATH];
-
- static const char *ext[] = { ".dll", ".exe", NULL };
- const char *file, **pp;
- char path[MAX_PATH], *p, *q;
- FILE *fp, *op;
-
- infile[0] = 0;
- outfile[0] = 0;
- fp = op = NULL;
- v = 0;
- ret = 1;
- p = NULL;
-
- for (i = 1; i < argc; ++i) {
- const char *a = argv[i];
- if ('-' == a[0]) {
- if (0 == strcmp(a, "-v")) {
- v = 1;
- } else if (0 == strcmp(a, "-o")) {
- if (++i == argc)
- goto usage;
- strcpy(outfile, argv[i]);
- } else
- goto usage;
- } else if (0 == infile[0])
- strcpy(infile, a);
- else
- goto usage;
- }
-
- if (0 == infile[0]) {
-usage:
- fprintf(stderr,
- "tiny_impdef: create export definition file (.def) from a dll\n"
- "Usage: tiny_impdef library.dll [-o outputfile]\n"
- );
- goto the_end;
- }
-
- if (0 == outfile[0])
- {
- strcpy(outfile, file_basename(infile));
- q = strrchr(outfile, '.');
- if (NULL == q)
- q = strchr(outfile, 0);
- strcpy(q, ".def");
- }
-
- file = infile;
-
-#ifdef _WIN32
- pp = ext;
- do if (SearchPath(NULL, file, *pp, sizeof path, path, NULL)) {
- file = path;
- break;
- } while (*pp++);
-#endif
-
- fp = fopen(file, "rb");
- if (NULL == fp) {
- fprintf(stderr, "tiny_impdef: no such file: %s\n", infile);
- goto the_end;
- }
- if (v)
- printf("--> %s\n", file);
-
- p = get_export_names(fileno(fp));
- if (NULL == p) {
- fprintf(stderr, "tiny_impdef: could not get exported function names.\n");
- goto the_end;
- }
-
- op = fopen(outfile, "w");
- if (NULL == op) {
- fprintf(stderr, "tiny_impdef: could not create output file: %s\n", outfile);
- goto the_end;
- }
-
- fprintf(op, "LIBRARY %s\n\nEXPORTS\n", file_basename(file));
- for (q = p, i = 0; *q; ++i) {
- fprintf(op, "%s\n", q);
- q += strlen(q) + 1;
- }
-
- if (v) {
- printf("<-- %s\n", outfile);
- printf("%d symbol(s) found\n", i);
- }
-
- ret = 0;
-
-the_end:
- if (p)
- free(p);
- if (fp)
- fclose(fp);
- if (op)
- fclose(op);
- return ret;
-}
-
-int read_mem(int fd, unsigned offset, void *buffer, unsigned len)
-{
- lseek(fd, offset, SEEK_SET);
- return len == read(fd, buffer, len);
-}
-
-/* -------------------------------------------------------------- */
-
-#if defined TCC_TARGET_X86_64
-# define IMAGE_FILE_MACHINE 0x8664
-#elif defined TCC_TARGET_ARM
-# define IMAGE_FILE_MACHINE 0x01C0
-#elif 1 /* defined TCC_TARGET_I386 */
-# define IMAGE_FILE_MACHINE 0x014C
-#endif
-
-/* -------------------------------------------------------------- */
-#endif
-
-static char *get_export_names(int fd)
-{
- int l, i, n, n0;
- char *p;
-
- IMAGE_SECTION_HEADER ish;
- IMAGE_EXPORT_DIRECTORY ied;
- IMAGE_DOS_HEADER dh;
- IMAGE_FILE_HEADER ih;
- DWORD sig, ref, addr, ptr, namep;
-#ifdef TCC_TARGET_X86_64
- IMAGE_OPTIONAL_HEADER64 oh;
-#else
- IMAGE_OPTIONAL_HEADER32 oh;
-#endif
- int pef_hdroffset, opt_hdroffset, sec_hdroffset;
-
- n = n0 = 0;
- p = NULL;
-
- if (!read_mem(fd, 0, &dh, sizeof dh))
- goto the_end;
- if (!read_mem(fd, dh.e_lfanew, &sig, sizeof sig))
- goto the_end;
- if (sig != 0x00004550)
- goto the_end;
- pef_hdroffset = dh.e_lfanew + sizeof sig;
- if (!read_mem(fd, pef_hdroffset, &ih, sizeof ih))
- goto the_end;
- if (IMAGE_FILE_MACHINE != ih.Machine)
- goto the_end;
- opt_hdroffset = pef_hdroffset + sizeof ih;
- sec_hdroffset = opt_hdroffset + sizeof oh;
- if (!read_mem(fd, opt_hdroffset, &oh, sizeof oh))
- goto the_end;
-
- if (IMAGE_DIRECTORY_ENTRY_EXPORT >= oh.NumberOfRvaAndSizes)
- goto the_end;
-
- addr = oh.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
- //printf("addr: %08x\n", addr);
- for (i = 0; i < ih.NumberOfSections; ++i) {
- if (!read_mem(fd, sec_hdroffset + i * sizeof ish, &ish, sizeof ish))
- goto the_end;
- //printf("vaddr: %08x\n", ish.VirtualAddress);
- if (addr >= ish.VirtualAddress && addr < ish.VirtualAddress + ish.SizeOfRawData)
- goto found;
- }
- goto the_end;
-
-found:
- ref = ish.VirtualAddress - ish.PointerToRawData;
- if (!read_mem(fd, addr - ref, &ied, sizeof ied))
- goto the_end;
-
- namep = ied.AddressOfNames - ref;
- for (i = 0; i < ied.NumberOfNames; ++i) {
- if (!read_mem(fd, namep, &ptr, sizeof ptr))
- goto the_end;
- namep += sizeof ptr;
- for (l = 0;;) {
- if (n+1 >= n0)
- p = tcc_realloc(p, n0 = n0 ? n0 * 2 : 256);
- if (!read_mem(fd, ptr - ref + l++, p + n, 1)) {
- tcc_free(p), p = NULL;
- goto the_end;
- }
- if (p[n++] == 0)
- break;
- }
- }
- if (p)
- p[n] = 0;
-the_end:
- return p;
-}
-
-/* -------------------------------------------------------------- */
diff --git a/win32/tools/tiny_libmaker.c b/win32/tools/tiny_libmaker.c
deleted file mode 100644
index a694915..0000000
--- a/win32/tools/tiny_libmaker.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * This program is for making libtcc1.a without ar
- * tiny_libmaker - tiny elf lib maker
- * usage: tiny_libmaker [lib] files...
- * Copyright (c) 2007 Timppa
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "../../elf.h"
-
-#ifdef TCC_TARGET_X86_64
-# define ELFCLASSW ELFCLASS64
-# define ElfW(type) Elf##64##_##type
-# define ELFW(type) ELF##64##_##type
-#else
-# define ELFCLASSW ELFCLASS32
-# define ElfW(type) Elf##32##_##type
-# define ELFW(type) ELF##32##_##type
-#endif
-
-#define ARMAG "!<arch>\n"
-#define ARFMAG "`\n"
-
-typedef struct ArHdr {
- char ar_name[16];
- char ar_date[12];
- char ar_uid[6];
- char ar_gid[6];
- char ar_mode[8];
- char ar_size[10];
- char ar_fmag[2];
-} ArHdr;
-
-unsigned long le2belong(unsigned long ul) {
- return ((ul & 0xFF0000)>>8)+((ul & 0xFF000000)>>24) +
- ((ul & 0xFF)<<24)+((ul & 0xFF00)<<8);
-}
-
-ArHdr arhdr = {
- "/ ",
- " ",
- "0 ",
- "0 ",
- "0 ",
- " ",
- ARFMAG
- };
-
-ArHdr arhdro = {
- " ",
- " ",
- "0 ",
- "0 ",
- "0 ",
- " ",
- ARFMAG
- };
-
-/* Returns 1 if s contains any of the chars of list, else 0 */
-int contains_any(const char *s, const char *list) {
- const char *l;
- for (; *s; s++) {
- for (l = list; *l; l++) {
- if (*s == *l)
- return 1;
- }
- }
- return 0;
-}
-
-int usage(int ret) {
- fprintf(stderr, "usage: tiny_libmaker [rcsv] lib file...\n");
- fprintf(stderr, "Always creates a new lib. [abdioptxN] are explicitly rejected.\n");
- return ret;
-}
-
-int main(int argc, char **argv)
-{
- FILE *fi, *fh = NULL, *fo = NULL;
- ElfW(Ehdr) *ehdr;
- ElfW(Shdr) *shdr;
- ElfW(Sym) *sym;
- int i, fsize, i_lib, i_obj;
- char *buf, *shstr, *symtab = NULL, *strtab = NULL;
- int symtabsize = 0;//, strtabsize = 0;
- char *anames = NULL;
- int *afpos = NULL;
- int istrlen, strpos = 0, fpos = 0, funccnt = 0, funcmax, hofs;
- char tfile[260], stmp[20];
- char *file, *name;
- int ret = 2;
- char *ops_conflict = "habdioptxN"; // unsupported but destructive if ignored.
- int verbose = 0;
-
- i_lib = 0; i_obj = 0; // will hold the index of the lib and first obj
- for (i = 1; i < argc; i++) {
- const char *a = argv[i];
- if (*a == '-' && strstr(a, "."))
- return usage(1); // -x.y is always invalid (same as gnu ar)
- if ((*a == '-') || (i == 1 && !strstr(a, "."))) { // options argument
- if (contains_any(a, ops_conflict))
- return usage(1);
- if (strstr(a, "v"))
- verbose = 1;
- } else { // lib or obj files: don't abort - keep validating all args.
- if (!i_lib) // first file is the lib
- i_lib = i;
- else if (!i_obj) // second file is the first obj
- i_obj = i;
- }
- }
- if (!i_obj) // i_obj implies also i_lib. we require both.
- return usage(1);
-
- if ((fh = fopen(argv[i_lib], "wb")) == NULL)
- {
- fprintf(stderr, "Can't open file %s \n", argv[i_lib]);
- goto the_end;
- }
-
- sprintf(tfile, "%s.tmp", argv[i_lib]);
- if ((fo = fopen(tfile, "wb+")) == NULL)
- {
- fprintf(stderr, "Can't create temporary file %s\n", tfile);
- goto the_end;
- }
-
- funcmax = 250;
- afpos = realloc(NULL, funcmax * sizeof *afpos); // 250 func
- memcpy(&arhdro.ar_mode, "100666", 6);
-
- // i_obj = first input object file
- while (i_obj < argc)
- {
- if (*argv[i_obj] == '-') { // by now, all options start with '-'
- i_obj++;
- continue;
- }
- if (verbose)
- printf("a - %s\n", argv[i_obj]);
-
- if ((fi = fopen(argv[i_obj], "rb")) == NULL)
- {
- fprintf(stderr, "Can't open file %s \n", argv[i_obj]);
- goto the_end;
- }
- fseek(fi, 0, SEEK_END);
- fsize = ftell(fi);
- fseek(fi, 0, SEEK_SET);
- buf = malloc(fsize + 1);
- fread(buf, fsize, 1, fi);
- fclose(fi);
-
- // elf header
- ehdr = (ElfW(Ehdr) *)buf;
- if (ehdr->e_ident[4] != ELFCLASSW)
- {
- fprintf(stderr, "Unsupported Elf Class: %s\n", argv[i_obj]);
- goto the_end;
- }
-
- shdr = (ElfW(Shdr) *) (buf + ehdr->e_shoff + ehdr->e_shstrndx * ehdr->e_shentsize);
- shstr = (char *)(buf + shdr->sh_offset);
- for (i = 0; i < ehdr->e_shnum; i++)
- {
- shdr = (ElfW(Shdr) *) (buf + ehdr->e_shoff + i * ehdr->e_shentsize);
- if (!shdr->sh_offset)
- continue;
- if (shdr->sh_type == SHT_SYMTAB)
- {
- symtab = (char *)(buf + shdr->sh_offset);
- symtabsize = shdr->sh_size;
- }
- if (shdr->sh_type == SHT_STRTAB)
- {
- if (!strcmp(shstr + shdr->sh_name, ".strtab"))
- {
- strtab = (char *)(buf + shdr->sh_offset);
- //strtabsize = shdr->sh_size;
- }
- }
- }
-
- if (symtab && symtabsize)
- {
- int nsym = symtabsize / sizeof(ElfW(Sym));
- //printf("symtab: info size shndx name\n");
- for (i = 1; i < nsym; i++)
- {
- sym = (ElfW(Sym) *) (symtab + i * sizeof(ElfW(Sym)));
- if (sym->st_shndx &&
- (sym->st_info == 0x10
- || sym->st_info == 0x11
- || sym->st_info == 0x12
- )) {
- //printf("symtab: %2Xh %4Xh %2Xh %s\n", sym->st_info, sym->st_size, sym->st_shndx, strtab + sym->st_name);
- istrlen = strlen(strtab + sym->st_name)+1;
- anames = realloc(anames, strpos+istrlen);
- strcpy(anames + strpos, strtab + sym->st_name);
- strpos += istrlen;
- if (++funccnt >= funcmax) {
- funcmax += 250;
- afpos = realloc(afpos, funcmax * sizeof *afpos); // 250 func more
- }
- afpos[funccnt] = fpos;
- }
- }
- }
-
- file = argv[i_obj];
- for (name = strchr(file, 0);
- name > file && name[-1] != '/' && name[-1] != '\\';
- --name);
- istrlen = strlen(name);
- if (istrlen >= sizeof(arhdro.ar_name))
- istrlen = sizeof(arhdro.ar_name) - 1;
- memset(arhdro.ar_name, ' ', sizeof(arhdro.ar_name));
- memcpy(arhdro.ar_name, name, istrlen);
- arhdro.ar_name[istrlen] = '/';
- sprintf(stmp, "%-10d", fsize);
- memcpy(&arhdro.ar_size, stmp, 10);
- fwrite(&arhdro, sizeof(arhdro), 1, fo);
- fwrite(buf, fsize, 1, fo);
- free(buf);
- i_obj++;
- fpos += (fsize + sizeof(arhdro));
- }
- hofs = 8 + sizeof(arhdr) + strpos + (funccnt+1) * sizeof(int);
- fpos = 0;
- if ((hofs & 1)) // align
- hofs++, fpos = 1;
- // write header
- fwrite("!<arch>\n", 8, 1, fh);
- sprintf(stmp, "%-10d", (int)(strpos + (funccnt+1) * sizeof(int)));
- memcpy(&arhdr.ar_size, stmp, 10);
- fwrite(&arhdr, sizeof(arhdr), 1, fh);
- afpos[0] = le2belong(funccnt);
- for (i=1; i<=funccnt; i++)
- afpos[i] = le2belong(afpos[i] + hofs);
- fwrite(afpos, (funccnt+1) * sizeof(int), 1, fh);
- fwrite(anames, strpos, 1, fh);
- if (fpos)
- fwrite("", 1, 1, fh);
- // write objects
- fseek(fo, 0, SEEK_END);
- fsize = ftell(fo);
- fseek(fo, 0, SEEK_SET);
- buf = malloc(fsize + 1);
- fread(buf, fsize, 1, fo);
- fwrite(buf, fsize, 1, fh);
- free(buf);
- ret = 0;
-the_end:
- if (anames)
- free(anames);
- if (afpos)
- free(afpos);
- if (fh)
- fclose(fh);
- if (fo)
- fclose(fo), remove(tfile);
- return ret;
-}
diff --git a/win32/vs2015/libtcc.vcxproj b/win32/vs2015/libtcc.vcxproj
deleted file mode 100644
index d8c45a4..0000000
--- a/win32/vs2015/libtcc.vcxproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{41F2DA74-9707-49A3-A466-157C7028BD79}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>libtcc</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="Shared">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\libtcc.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\arm-gen.c" />
- <ClInclude Include="..\..\arm64-gen.c" />
- <ClInclude Include="..\..\c67-gen.c" />
- <ClInclude Include="..\..\conftest.c" />
- <ClInclude Include="..\..\i386-asm.c" />
- <ClInclude Include="..\..\i386-gen.c" />
- <ClInclude Include="..\..\il-gen.c" />
- <ClInclude Include="..\..\tcc.h" />
- <ClInclude Include="..\..\tccasm.c" />
- <ClInclude Include="..\..\tcccoff.c" />
- <ClInclude Include="..\..\tccelf.c" />
- <ClInclude Include="..\..\tccgen.c" />
- <ClInclude Include="..\..\tccpe.c" />
- <ClInclude Include="..\..\tccpp.c" />
- <ClInclude Include="..\..\tccrun.c" />
- <ClInclude Include="..\..\x86_64-gen.c" />
- <ClInclude Include="..\..\coff.h" />
- <ClInclude Include="..\..\elf.h" />
- <ClInclude Include="..\..\i386-asm.h" />
- <ClInclude Include="..\..\i386-tok.h" />
- <ClInclude Include="..\..\il-opcodes.h" />
- <ClInclude Include="..\..\libtcc.h" />
- <ClInclude Include="..\..\stab.h" />
- <ClInclude Include="..\..\tcclib.h" />
- <ClInclude Include="..\..\tcctok.h" />
- <ClInclude Include="..\..\x86_64-asm.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/win32/vs2015/tcc.sln b/win32/vs2015/tcc.sln
deleted file mode 100644
index 9015cd0..0000000
--- a/win32/vs2015/tcc.sln
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25123.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcc", "tcc.vcxproj", "{6E7932A7-B123-48EB-AB39-40867AF28105}"
- ProjectSection(ProjectDependencies) = postProject
- {41F2DA74-9707-49A3-A466-157C7028BD79} = {41F2DA74-9707-49A3-A466-157C7028BD79}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtcc", "libtcc.vcxproj", "{41F2DA74-9707-49A3-A466-157C7028BD79}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.ActiveCfg = Debug|x64
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.Build.0 = Debug|x64
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.ActiveCfg = Debug|Win32
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.Build.0 = Debug|Win32
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.ActiveCfg = Release|x64
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.Build.0 = Release|x64
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.ActiveCfg = Release|Win32
- {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.Build.0 = Release|Win32
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.ActiveCfg = Debug|x64
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.Build.0 = Debug|x64
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.ActiveCfg = Debug|Win32
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.Build.0 = Debug|Win32
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.ActiveCfg = Release|x64
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.Build.0 = Release|x64
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.ActiveCfg = Release|Win32
- {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/win32/vs2015/tcc.vcxproj b/win32/vs2015/tcc.vcxproj
deleted file mode 100644
index 7417358..0000000
--- a/win32/vs2015/tcc.vcxproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{6E7932A7-B123-48EB-AB39-40867AF28105}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>tcc</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="Shared">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>Debug</AdditionalLibraryDirectories>
- <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>x64\Debug</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>Release</AdditionalLibraryDirectories>
- <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>x64\Release</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy $(TargetPath) $(SolutionDir)..</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\tcc.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\tcc.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file