aboutsummaryrefslogtreecommitdiff
path: root/win32/include/winapi/windows.h
diff options
context:
space:
mode:
authorgrischka <grischka>2009-07-18 22:06:37 +0200
committergrischka <grischka>2009-07-18 22:06:37 +0200
commitdc251a7d8d8bb4fb57773790152bfe85236f5f12 (patch)
treee8dcec8579afbe341a4af7560f0a7e559238f503 /win32/include/winapi/windows.h
parent06aed3d171839454648cebd0c58eaf4667e4979a (diff)
downloadtinycc-dc251a7d8d8bb4fb57773790152bfe85236f5f12.tar.gz
tinycc-dc251a7d8d8bb4fb57773790152bfe85236f5f12.tar.bz2
win64: use new headers from mingw
Diffstat (limited to 'win32/include/winapi/windows.h')
-rw-r--r--win32/include/winapi/windows.h211
1 files changed, 79 insertions, 132 deletions
diff --git a/win32/include/winapi/windows.h b/win32/include/winapi/windows.h
index de2cf9b..388d3f6 100644
--- a/win32/include/winapi/windows.h
+++ b/win32/include/winapi/windows.h
@@ -1,136 +1,75 @@
-/*
- windows.h - main header file for the Win32 API
-
- Written by Anders Norlander <anorland@hem2.passagen.se>
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINDOWS_
+#define _WINDOWS_
- This file is part of a free library for the Win32 API.
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
- 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.
+#include <_mingw.h>
-*/
-#ifndef _WINDOWS_H
-#define _WINDOWS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
+#ifndef _INC_WINDOWS
+#define _INC_WINDOWS
-/* translate GCC target defines to MS equivalents. Keep this synchronized
- with winnt.h. */
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
-#endif
-#if defined(_M_IX86) && !defined(_X86_)
-#define _X86_
-#elif defined(_M_ALPHA) && !defined(_ALPHA_)
-#define _ALPHA_
-#elif defined(_M_PPC) && !defined(_PPC_)
-#define _PPC_
-#elif defined(_M_MRX000) && !defined(_MIPS_)
-#define _MIPS_
-#elif defined(_M_M68K) && !defined(_68K_)
-#define _68K_
-#endif
+#if defined(RC_INVOKED) && !defined(NOWINRES)
-#ifdef RC_INVOKED
-/* winresrc.h includes the necessary headers */
#include <winresrc.h>
#else
-#ifdef __GNUC__
-#ifndef NONAMELESSUNION
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-#define _ANONYMOUS_UNION __extension__
-#define _ANONYMOUS_STRUCT __extension__
-#else
-#if defined(__cplusplus)
-#define _ANONYMOUS_UNION __extension__
-#endif /* __cplusplus */
-#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
-#endif /* NONAMELESSUNION */
-#elif defined(__WATCOMC__)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#endif /* __GNUC__/__WATCOMC__ */
+#ifdef RC_INVOKED
+#define NOATOM
+#define NOGDI
+#define NOGDICAPMASKS
+#define NOMETAFILE
+#define NOMINMAX
+#define NOMSG
+#define NOOPENFILE
+#define NORASTEROPS
+#define NOSCROLL
+#define NOSOUND
+#define NOSYSMETRICS
+#define NOTEXTMETRIC
+#define NOWH
+#define NOCOMM
+#define NOKANJI
+#define NOCRYPT
+#define NOMCX
+#endif
-#ifndef _ANONYMOUS_UNION
-#define _ANONYMOUS_UNION
-#define _UNION_NAME(x) x
-#define DUMMYUNIONNAME u
-#define DUMMYUNIONNAME2 u2
-#define DUMMYUNIONNAME3 u3
-#define DUMMYUNIONNAME4 u4
-#define DUMMYUNIONNAME5 u5
-#define DUMMYUNIONNAME6 u6
-#define DUMMYUNIONNAME7 u7
-#define DUMMYUNIONNAME8 u8
-#else
-#define _UNION_NAME(x)
-#define DUMMYUNIONNAME
-#define DUMMYUNIONNAME2
-#define DUMMYUNIONNAME3
-#define DUMMYUNIONNAME4
-#define DUMMYUNIONNAME5
-#define DUMMYUNIONNAME6
-#define DUMMYUNIONNAME7
-#define DUMMYUNIONNAME8
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
+#define I_X86_
#endif
-#ifndef _ANONYMOUS_STRUCT
-#define _ANONYMOUS_STRUCT
-#define _STRUCT_NAME(x) x
-#define DUMMYSTRUCTNAME s
-#define DUMMYSTRUCTNAME2 s2
-#define DUMMYSTRUCTNAME3 s3
-#else
-#define _STRUCT_NAME(x)
-#define DUMMYSTRUCTNAME
-#define DUMMYSTRUCTNAME2
-#define DUMMYSTRUCTNAME3
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
+#define _AMD64_
#endif
-#ifndef NO_STRICT
-#ifndef STRICT
-#define STRICT 1
+#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
+#if !defined(_IA64_)
+#define _IA64_
#endif
#endif
+#ifndef RC_INVOKED
+#include <excpt.h>
#include <stdarg.h>
+#endif
+
#include <windef.h>
-#include <wincon.h>
-#include <basetyps.h>
-#include <excpt.h>
#include <winbase.h>
-#ifndef _WINGDI_H
#include <wingdi.h>
-#endif
-#ifndef _WINUSER_H
#include <winuser.h>
-#endif
-#ifndef _WINNLS_H
#include <winnls.h>
-#endif
-#ifndef _WINVER_H
+#include <wincon.h>
#include <winver.h>
-#endif
-#ifndef _WINNETWK_H
-#include <winnetwk.h>
-#endif
-#ifndef _WINREG_H
#include <winreg.h>
-#endif
-#ifndef _WINSVC_H
-#include <winsvc.h>
-#endif
+#include <winnetwk.h>
#ifndef WIN32_LEAN_AND_MEAN
-#include <commdlg.h>
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
@@ -141,36 +80,44 @@
#include <rpc.h>
#include <shellapi.h>
#include <winperf.h>
+#include <winsock.h>
+#ifndef NOCRYPT
+#include <wincrypt.h>
+#include <winefs.h>
+#include <winscard.h>
+#endif
+
+#ifndef NOUSER
+#ifndef NOGDI
#include <winspool.h>
-#if defined(Win32_Winsock)
-#warning "The Win32_Winsock macro name is deprecated.\
- Please use __USE_W32_SOCKETS instead"
-#ifndef __USE_W32_SOCKETS
-#define __USE_W32_SOCKETS
+#ifdef INC_OLE1
+#include <ole.h>
+#else
+#include <ole2.h>
#endif
+#include <commdlg.h>
#endif
-#if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
-#if (_WIN32_WINNT >= 0x0400)
-#include <winsock2.h>
-/*
- * MS likes to include mswsock.h here as well,
- * but that can cause undefined symbols if
- * winsock2.h is included before windows.h
- */
-#else
-#include <winsock.h>
-#endif /* (_WIN32_WINNT >= 0x0400) */
#endif
-#endif /* WIN32_LEAN_AND_MEAN */
+#endif
+
+#include <stralign.h>
+
+#ifdef INC_OLE2
+#include <ole2.h>
+#endif
-#endif /* RC_INVOKED */
+#ifndef NOSERVICE
+#include <winsvc.h>
+#endif
+
+#ifndef NOMCX
+#include <mcx.h>
+#endif
-#ifdef __OBJC__
-/* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
- but undefining it causes trouble as well if a file is included after
- windows.h
-*/
-#undef BOOL
+#ifndef NOIME
+#include <imm.h>
#endif
#endif
+#endif
+#endif