aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/w32api/ChangeLog31
-rw-r--r--winsup/w32api/include/accctrl.h3
-rw-r--r--winsup/w32api/include/aclapi.h3
-rw-r--r--winsup/w32api/include/basetsd.h3
-rw-r--r--winsup/w32api/include/basetyps.h5
-rw-r--r--winsup/w32api/include/cderr.h4
-rw-r--r--winsup/w32api/include/cguid.h4
-rw-r--r--winsup/w32api/include/commctrl.h4
-rw-r--r--winsup/w32api/include/commdlg.h4
-rw-r--r--winsup/w32api/include/cpl.h4
-rw-r--r--winsup/w32api/include/cplext.h4
-rw-r--r--winsup/w32api/include/custcntl.h4
-rw-r--r--winsup/w32api/include/dbt.h4
-rw-r--r--winsup/w32api/include/dde.h4
-rw-r--r--winsup/w32api/include/ddeml.h4
-rw-r--r--winsup/w32api/include/dlgs.h4
-rw-r--r--winsup/w32api/include/excpt.h3
-rw-r--r--winsup/w32api/include/httpext.h3
-rw-r--r--winsup/w32api/include/imagehlp.h3
-rw-r--r--winsup/w32api/include/imm.h4
-rw-r--r--winsup/w32api/include/initguid.h4
-rw-r--r--winsup/w32api/include/intshcut.h4
-rw-r--r--winsup/w32api/include/ipexport.h4
-rw-r--r--winsup/w32api/include/iphlpapi.h4
-rw-r--r--winsup/w32api/include/ipifcons.h4
-rw-r--r--winsup/w32api/include/iprtrmib.h4
-rw-r--r--winsup/w32api/include/iptypes.h4
-rw-r--r--winsup/w32api/include/isguids.h4
-rw-r--r--winsup/w32api/include/largeint.h3
-rw-r--r--winsup/w32api/include/lm.h3
-rw-r--r--winsup/w32api/include/lmaccess.h4
-rw-r--r--winsup/w32api/include/lmalert.h4
-rw-r--r--winsup/w32api/include/lmapibuf.h4
-rw-r--r--winsup/w32api/include/lmat.h4
-rw-r--r--winsup/w32api/include/lmaudit.h4
-rw-r--r--winsup/w32api/include/lmbrowsr.h4
-rw-r--r--winsup/w32api/include/lmchdev.h4
-rw-r--r--winsup/w32api/include/lmconfig.h4
-rw-r--r--winsup/w32api/include/lmcons.h4
-rw-r--r--winsup/w32api/include/lmerr.h4
-rw-r--r--winsup/w32api/include/lmerrlog.h4
-rw-r--r--winsup/w32api/include/lmmsg.h4
-rw-r--r--winsup/w32api/include/lmremutl.h4
-rw-r--r--winsup/w32api/include/lmrepl.h4
-rw-r--r--winsup/w32api/include/lmserver.h4
-rw-r--r--winsup/w32api/include/lmshare.h4
-rw-r--r--winsup/w32api/include/lmsname.h4
-rw-r--r--winsup/w32api/include/lmstats.h4
-rw-r--r--winsup/w32api/include/lmsvc.h4
-rw-r--r--winsup/w32api/include/lmuse.h4
-rw-r--r--winsup/w32api/include/lmuseflg.h4
-rw-r--r--winsup/w32api/include/lmwksta.h4
-rw-r--r--winsup/w32api/include/lzexpand.h4
-rw-r--r--winsup/w32api/include/mapi.h9
-rw-r--r--winsup/w32api/include/mciavi.h4
-rw-r--r--winsup/w32api/include/mcx.h4
-rw-r--r--winsup/w32api/include/mmsystem.h3
-rw-r--r--winsup/w32api/include/mswsock.h4
-rw-r--r--winsup/w32api/include/nb30.h4
-rw-r--r--winsup/w32api/include/nddeapi.h4
-rw-r--r--winsup/w32api/include/nspapi.h4
-rw-r--r--winsup/w32api/include/ntdef.h4
-rw-r--r--winsup/w32api/include/ntsecapi.h4
-rw-r--r--winsup/w32api/include/ntsecpkg.h3
-rw-r--r--winsup/w32api/include/oaidl.h4
-rw-r--r--winsup/w32api/include/objbase.h4
-rw-r--r--winsup/w32api/include/objfwd.h4
-rw-r--r--winsup/w32api/include/objidl.h3
-rw-r--r--winsup/w32api/include/odbcinst.h3
-rw-r--r--winsup/w32api/include/ole.h4
-rw-r--r--winsup/w32api/include/ole2.h4
-rw-r--r--winsup/w32api/include/ole2ver.h3
-rw-r--r--winsup/w32api/include/oleauto.h5
-rw-r--r--winsup/w32api/include/olectl.h4
-rw-r--r--winsup/w32api/include/olectlid.h4
-rw-r--r--winsup/w32api/include/oledlg.h4
-rw-r--r--winsup/w32api/include/oleidl.h3
-rw-r--r--winsup/w32api/include/pbt.h4
-rw-r--r--winsup/w32api/include/prsht.h4
-rw-r--r--winsup/w32api/include/psapi.h3
-rw-r--r--winsup/w32api/include/rapi.h3
-rw-r--r--winsup/w32api/include/ras.h3
-rw-r--r--winsup/w32api/include/raserror.h4
-rw-r--r--winsup/w32api/include/rassapi.h4
-rw-r--r--winsup/w32api/include/regstr.h4
-rw-r--r--winsup/w32api/include/richedit.h4
-rw-r--r--winsup/w32api/include/richole.h4
-rw-r--r--winsup/w32api/include/rpc.h4
-rw-r--r--winsup/w32api/include/rpcdce.h3
-rw-r--r--winsup/w32api/include/rpcdce2.h4
-rw-r--r--winsup/w32api/include/rpcdcep.h4
-rw-r--r--winsup/w32api/include/rpcndr.h4
-rw-r--r--winsup/w32api/include/rpcnsi.h4
-rw-r--r--winsup/w32api/include/rpcnsip.h4
-rw-r--r--winsup/w32api/include/rpcnterr.h4
-rw-r--r--winsup/w32api/include/rpcproxy.h4
-rw-r--r--winsup/w32api/include/schannel.h3
-rw-r--r--winsup/w32api/include/schnlsp.h4
-rw-r--r--winsup/w32api/include/scrnsave.h3
-rw-r--r--winsup/w32api/include/security.h4
-rw-r--r--winsup/w32api/include/setupapi.h3
-rw-r--r--winsup/w32api/include/shellapi.h4
-rw-r--r--winsup/w32api/include/shlguid.h4
-rw-r--r--winsup/w32api/include/shlobj.h3
-rw-r--r--winsup/w32api/include/sql.h4
-rw-r--r--winsup/w32api/include/sqlext.h4
-rw-r--r--winsup/w32api/include/sqltypes.h4
-rw-r--r--winsup/w32api/include/sqlucode.h4
-rw-r--r--winsup/w32api/include/sspi.h3
-rw-r--r--winsup/w32api/include/subauth.h4
-rw-r--r--winsup/w32api/include/tlhelp32.h4
-rw-r--r--winsup/w32api/include/unknwn.h4
-rw-r--r--winsup/w32api/include/userenv.h4
-rw-r--r--winsup/w32api/include/w32api.h3
-rw-r--r--winsup/w32api/include/winbase.h4
-rw-r--r--winsup/w32api/include/wincon.h4
-rw-r--r--winsup/w32api/include/wincrypt.h4
-rw-r--r--winsup/w32api/include/windef.h4
-rw-r--r--winsup/w32api/include/windows.h4
-rw-r--r--winsup/w32api/include/windowsx.h4
-rw-r--r--winsup/w32api/include/winerror.h4
-rw-r--r--winsup/w32api/include/wingdi.h4
-rw-r--r--winsup/w32api/include/wininet.h4
-rw-r--r--winsup/w32api/include/winioctl.h4
-rw-r--r--winsup/w32api/include/winnetwk.h4
-rw-r--r--winsup/w32api/include/winnls.h4
-rw-r--r--winsup/w32api/include/winnt.h4
-rw-r--r--winsup/w32api/include/winperf.h4
-rw-r--r--winsup/w32api/include/winreg.h4
-rw-r--r--winsup/w32api/include/winresrc.h4
-rw-r--r--winsup/w32api/include/winsock.h4
-rw-r--r--winsup/w32api/include/winsock2.h4
-rw-r--r--winsup/w32api/include/winspool.h4
-rw-r--r--winsup/w32api/include/winsvc.h4
-rw-r--r--winsup/w32api/include/winuser.h4
-rw-r--r--winsup/w32api/include/winver.h4
-rw-r--r--winsup/w32api/include/ws2tcpip.h3
-rw-r--r--winsup/w32api/include/wsnetbs.h3
-rw-r--r--winsup/w32api/include/wtypes.h4
-rw-r--r--winsup/w32api/include/zmouse.h3
140 files changed, 562 insertions, 5 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index 55740a0..07b7b7c 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,3 +1,34 @@
+2002-03-09 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/accctrl.h, aclapi.h, basetsd.h, basetyps.h, cderr.h,
+ cguid.h, commctrl.h, commdlg.h, cpl.h, cplext.h, custcntl.h,
+ dbt.h, dde.h, ddeml.h, dlgs.h, excpt.h, httpext.h, imagehlp.h,
+ imm.h, initguid.h, intshcut.h, ipexport.h, iphlpapi.h,
+ ipifcons.h, iprtrmib.h, iptypes.h, isguids.h, largeint.h, lm.h,
+ lmaccess.h, lmalert.h, lmapibuf.h, lmat.h, lmaudit.h,
+ lmbrowsr.h, lmchdev.h, lmconfig.h, lmcons.h, lmerr.h,
+ lmerrlog.h, lmmsg.h, lmremutl.h, lmrepl.h, lmserver.h,
+ lmshare.h, lmsname.h, lmstats.h, lmsvc.h, lmuse.h, lmuseflg.h,
+ lmwksta.h, lzexpand.h, mapi.h, mciavi.h, mcx.h, mmsystem.h,
+ mswsock.h, nb30.h, nddeapi.h, nspapi.h, ntdef.h, ntsecapi.h,
+ ntsecpkg.h, oaidl.h, objbase.h, objfwd.h, objidl.h, odbcinst.h,
+ ole.h, ole2.h, ole2ver.h, oleauto.h, olectl.h, olectlid.h,
+ oledlg.h, oleidl.h, pbt.h, prsht.h, psapi.h, rapi.h, ras.h,
+ raserror.h, rassapi.h, regstr.h, richedit.h, richole.h, rpc.h,
+ rpcdce.h, rpcdce2.h, rpcdcep.h, rpcndr.h, rpcnsi.h, rpcnsip.h,
+ rpcnterr.h, rpcproxy.h, schannel.h, schnlsp.h, scrnsave.h,
+ security.h, setupapi.h, shellapi.h, shlguid.h, shlobj.h, sql.h,
+ sqlext.h, sqltypes.h, sqlucode.h, sspi.h, subauth.h,
+ tlhelp32.h, unknwn.h, userenv.h, w32api.h, winbase.h, wincon.h,
+ wincrypt.h, windef.h, windows.h, windowsx.h, winerror.h,
+ wingdi.h, wininet.h, winioctl.h, winnetwk.h, winnls.h, winnt.h,
+ winperf.h, winreg.h, winresrc.h, winsock.h, winsock2.h,
+ winspool.h, winsvc.h, winuser.h, winver.h, ws2tcpip.h,
+ wsnetbs.h, wtypes.h, zmouse.h: Add #pragma GCC system_header
+ if __GNUC__ >= 3.
+ * include/mapi.h: Change header guard name to _MAPI_H for
+ consistency.
+
2002-03-08 Danny Smith <dannysmith@users.sourceforge.net>
* include/accctrl.h (_ACCCTRL_H): Correct typo.
diff --git a/winsup/w32api/include/accctrl.h b/winsup/w32api/include/accctrl.h
index a0254e5..de972f9 100644
--- a/winsup/w32api/include/accctrl.h
+++ b/winsup/w32api/include/accctrl.h
@@ -1,5 +1,8 @@
#ifndef _ACCCTRL_H
#define _ACCCTRL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/aclapi.h b/winsup/w32api/include/aclapi.h
index 7e7e629..c8f3c7b 100644
--- a/winsup/w32api/include/aclapi.h
+++ b/winsup/w32api/include/aclapi.h
@@ -1,5 +1,8 @@
#ifndef _ACLAPI_H
#define _ACLAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <windows.h>
#include <accctrl.h>
diff --git a/winsup/w32api/include/basetsd.h b/winsup/w32api/include/basetsd.h
index 1b382e2..d9c375d 100644
--- a/winsup/w32api/include/basetsd.h
+++ b/winsup/w32api/include/basetsd.h
@@ -1,5 +1,8 @@
#ifndef _BASETSD_H
#define _BASETSD_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __GNUC__
#ifndef __int64
diff --git a/winsup/w32api/include/basetyps.h b/winsup/w32api/include/basetyps.h
index ed0912c..a7bf0df 100644
--- a/winsup/w32api/include/basetyps.h
+++ b/winsup/w32api/include/basetyps.h
@@ -1,12 +1,15 @@
#ifndef _BASETYPS_H
#define _BASETYPS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifndef __OBJC__
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
-#endif
+#endif /* __cplusplus */
#define STDMETHODCALLTYPE __stdcall
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE __stdcall
diff --git a/winsup/w32api/include/cderr.h b/winsup/w32api/include/cderr.h
index f148fc4..e9a5b05 100644
--- a/winsup/w32api/include/cderr.h
+++ b/winsup/w32api/include/cderr.h
@@ -1,5 +1,9 @@
#ifndef _CDERR_H
#define _CDERR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define CDERR_DIALOGFAILURE 0xFFFF
#define CDERR_GENERALCODES 0x0000
#define CDERR_STRUCTSIZE 0x0001
diff --git a/winsup/w32api/include/cguid.h b/winsup/w32api/include/cguid.h
index 9f08f5a..a9f2f8d 100644
--- a/winsup/w32api/include/cguid.h
+++ b/winsup/w32api/include/cguid.h
@@ -1,5 +1,9 @@
#ifndef _CGUID_H
#define _CGUID_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/commctrl.h b/winsup/w32api/include/commctrl.h
index 9e3658d..98dbfaf 100644
--- a/winsup/w32api/include/commctrl.h
+++ b/winsup/w32api/include/commctrl.h
@@ -1,5 +1,9 @@
#ifndef _COMMCTRL_H
#define _COMMCTRL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <prsht.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/commdlg.h b/winsup/w32api/include/commdlg.h
index d1a4433..a3e7230 100644
--- a/winsup/w32api/include/commdlg.h
+++ b/winsup/w32api/include/commdlg.h
@@ -1,5 +1,9 @@
#ifndef _COMMDLG_H
#define _COMMDLG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/cpl.h b/winsup/w32api/include/cpl.h
index f5ce29d..67c5645 100644
--- a/winsup/w32api/include/cpl.h
+++ b/winsup/w32api/include/cpl.h
@@ -1,5 +1,9 @@
#ifndef _CPL_H
#define _CPL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/cplext.h b/winsup/w32api/include/cplext.h
index 8c2207d..2d4ff04 100644
--- a/winsup/w32api/include/cplext.h
+++ b/winsup/w32api/include/cplext.h
@@ -1,5 +1,9 @@
#ifndef _CPLEXT_H
#define _CPLEXT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define CPLPAGE_MOUSE_BUTTONS 1
#define CPLPAGE_MOUSE_PTRMOTION 2
#define CPLPAGE_KEYBOARD_SPEED 1
diff --git a/winsup/w32api/include/custcntl.h b/winsup/w32api/include/custcntl.h
index 8c3d463..8a9d5ff 100644
--- a/winsup/w32api/include/custcntl.h
+++ b/winsup/w32api/include/custcntl.h
@@ -1,5 +1,9 @@
#ifndef _CUSTCNTL_H
#define _CUSTCNTL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/dbt.h b/winsup/w32api/include/dbt.h
index 071b007..f854b84 100644
--- a/winsup/w32api/include/dbt.h
+++ b/winsup/w32api/include/dbt.h
@@ -1,5 +1,9 @@
#ifndef _DBT_H
#define _DBT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/dde.h b/winsup/w32api/include/dde.h
index 474f126..2ea73e7 100644
--- a/winsup/w32api/include/dde.h
+++ b/winsup/w32api/include/dde.h
@@ -1,5 +1,9 @@
#ifndef _DDE_H
#define _DDE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/ddeml.h b/winsup/w32api/include/ddeml.h
index 3f44c76..9419ede 100644
--- a/winsup/w32api/include/ddeml.h
+++ b/winsup/w32api/include/ddeml.h
@@ -1,5 +1,9 @@
#ifndef _DDEML_H
#define _DDEML_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/dlgs.h b/winsup/w32api/include/dlgs.h
index d26e191..82525ab 100644
--- a/winsup/w32api/include/dlgs.h
+++ b/winsup/w32api/include/dlgs.h
@@ -1,5 +1,9 @@
#ifndef _DLGS_H
#define _DLGS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/excpt.h b/winsup/w32api/include/excpt.h
index 39621a8..7746124 100644
--- a/winsup/w32api/include/excpt.h
+++ b/winsup/w32api/include/excpt.h
@@ -1,5 +1,8 @@
#ifndef _EXCPT_H
#define _EXCPT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
/* FIXME: This will make some code compile. The programs will most
likely crash when an exception is raised, but at least they will
diff --git a/winsup/w32api/include/httpext.h b/winsup/w32api/include/httpext.h
index 4b6f9e2..ddff947 100644
--- a/winsup/w32api/include/httpext.h
+++ b/winsup/w32api/include/httpext.h
@@ -10,6 +10,9 @@
#ifndef _HTTPEXT_H
#define _HTTPEXT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <windows.h>
diff --git a/winsup/w32api/include/imagehlp.h b/winsup/w32api/include/imagehlp.h
index 2a3eb6f..1f94533 100644
--- a/winsup/w32api/include/imagehlp.h
+++ b/winsup/w32api/include/imagehlp.h
@@ -17,6 +17,9 @@
#ifndef _IMAGEHLP_H
#define _IMAGEHLP_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/imm.h b/winsup/w32api/include/imm.h
index 30d9701..3602498 100644
--- a/winsup/w32api/include/imm.h
+++ b/winsup/w32api/include/imm.h
@@ -1,5 +1,9 @@
#ifndef _IMM_H
#define _IMM_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/initguid.h b/winsup/w32api/include/initguid.h
index 156d564..b024c70 100644
--- a/winsup/w32api/include/initguid.h
+++ b/winsup/w32api/include/initguid.h
@@ -1,5 +1,9 @@
#ifndef _INITGUID_H
#define _INITGUID_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifndef DEFINE_GUID
#include <basetyps.h>
#endif
diff --git a/winsup/w32api/include/intshcut.h b/winsup/w32api/include/intshcut.h
index a9d7ee0..e4c87cd 100644
--- a/winsup/w32api/include/intshcut.h
+++ b/winsup/w32api/include/intshcut.h
@@ -1,5 +1,9 @@
#ifndef _INTSHCUT_H
#define _INTSHCUT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <isguids.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/ipexport.h b/winsup/w32api/include/ipexport.h
index d2c7553..3fbf4ee 100644
--- a/winsup/w32api/include/ipexport.h
+++ b/winsup/w32api/include/ipexport.h
@@ -1,5 +1,9 @@
#ifndef _IPEXPORT_H
#define _IPEXPORT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/iphlpapi.h b/winsup/w32api/include/iphlpapi.h
index d2d112d..214c53e 100644
--- a/winsup/w32api/include/iphlpapi.h
+++ b/winsup/w32api/include/iphlpapi.h
@@ -1,5 +1,9 @@
#ifndef _IPHLPAPI_H
#define _IPHLPAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <iprtrmib.h>
#include <ipexport.h>
#include <iptypes.h>
diff --git a/winsup/w32api/include/ipifcons.h b/winsup/w32api/include/ipifcons.h
index 16ef168..eecf532 100644
--- a/winsup/w32api/include/ipifcons.h
+++ b/winsup/w32api/include/ipifcons.h
@@ -1,5 +1,9 @@
#ifndef _IPIFCONS_H
#define _IPIFCONS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define MIB_IF_ADMIN_STATUS_UP 1
#define MIB_IF_ADMIN_STATUS_DOWN 2
#define MIB_IF_ADMIN_STATUS_TESTING 3
diff --git a/winsup/w32api/include/iprtrmib.h b/winsup/w32api/include/iprtrmib.h
index c8c7bea..f897ecb 100644
--- a/winsup/w32api/include/iprtrmib.h
+++ b/winsup/w32api/include/iprtrmib.h
@@ -1,5 +1,9 @@
#ifndef _IPRTRMIB_H
#define _IPRTRMIB_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <ipifcons.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/iptypes.h b/winsup/w32api/include/iptypes.h
index 8b5e8ae..6ddded0 100644
--- a/winsup/w32api/include/iptypes.h
+++ b/winsup/w32api/include/iptypes.h
@@ -1,5 +1,9 @@
#ifndef _IPTYPES_H
#define _IPTYPES_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/isguids.h b/winsup/w32api/include/isguids.h
index 6518e66..d5655d2 100644
--- a/winsup/w32api/include/isguids.h
+++ b/winsup/w32api/include/isguids.h
@@ -1,5 +1,9 @@
#ifndef _ISGUID_H
#define _ISGUID_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/largeint.h b/winsup/w32api/include/largeint.h
index c36db31..b2222a9 100644
--- a/winsup/w32api/include/largeint.h
+++ b/winsup/w32api/include/largeint.h
@@ -6,6 +6,9 @@
*/
#ifndef _LARGEINT_H
#define _LARGEINT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <windows.h>
diff --git a/winsup/w32api/include/lm.h b/winsup/w32api/include/lm.h
index 040d13a..db1779d 100644
--- a/winsup/w32api/include/lm.h
+++ b/winsup/w32api/include/lm.h
@@ -1,5 +1,8 @@
#ifndef _LM_H
#define _LM_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <lmcons.h>
#include <lmaccess.h>
diff --git a/winsup/w32api/include/lmaccess.h b/winsup/w32api/include/lmaccess.h
index 8a7b9ba..bb77d2a 100644
--- a/winsup/w32api/include/lmaccess.h
+++ b/winsup/w32api/include/lmaccess.h
@@ -1,5 +1,9 @@
#ifndef _LMACCESS_H
#define _LMACCESS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmalert.h b/winsup/w32api/include/lmalert.h
index d4899bc..4f59edc 100644
--- a/winsup/w32api/include/lmalert.h
+++ b/winsup/w32api/include/lmalert.h
@@ -1,5 +1,9 @@
#ifndef _LMALERT_H
#define _LMALERT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define ALERTER_MAILSLOT TEXT("\\\\.\\MAILSLOT\\Alerter")
#define ALERT_PRINT_EVENT TEXT("PRINTING")
#define ALERT_MESSAGE_EVENT TEXT("MESSAGE")
diff --git a/winsup/w32api/include/lmapibuf.h b/winsup/w32api/include/lmapibuf.h
index 2340d6d..54de811 100644
--- a/winsup/w32api/include/lmapibuf.h
+++ b/winsup/w32api/include/lmapibuf.h
@@ -1,5 +1,9 @@
#ifndef _LMAPIBUF_H
#define _LMAPIBUF_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmat.h b/winsup/w32api/include/lmat.h
index 4d2cf8c..95999a8 100644
--- a/winsup/w32api/include/lmat.h
+++ b/winsup/w32api/include/lmat.h
@@ -1,5 +1,9 @@
#ifndef _LMAT_H
#define _LMAT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmaudit.h b/winsup/w32api/include/lmaudit.h
index 1d944b2..4a97baa 100644
--- a/winsup/w32api/include/lmaudit.h
+++ b/winsup/w32api/include/lmaudit.h
@@ -1,5 +1,9 @@
#ifndef _LMAUDIT_H
#define _LMAUDIT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmbrowsr.h b/winsup/w32api/include/lmbrowsr.h
index 85e40bb..4aee464 100644
--- a/winsup/w32api/include/lmbrowsr.h
+++ b/winsup/w32api/include/lmbrowsr.h
@@ -1,5 +1,9 @@
#ifndef _LMBROWSR_H
#define _LMBROWSR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmchdev.h b/winsup/w32api/include/lmchdev.h
index c7a6814..3a40968 100644
--- a/winsup/w32api/include/lmchdev.h
+++ b/winsup/w32api/include/lmchdev.h
@@ -1,5 +1,9 @@
#ifndef _LMCHDEV_H
#define _LMCHDEV_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmconfig.h b/winsup/w32api/include/lmconfig.h
index 746a5dd..b75c6ab 100644
--- a/winsup/w32api/include/lmconfig.h
+++ b/winsup/w32api/include/lmconfig.h
@@ -1,5 +1,9 @@
#ifndef _LMCONFIG_H
#define _LMCONFIG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmcons.h b/winsup/w32api/include/lmcons.h
index c82837f..27566b3 100644
--- a/winsup/w32api/include/lmcons.h
+++ b/winsup/w32api/include/lmcons.h
@@ -1,5 +1,9 @@
#ifndef _LMCONS_H
#define _LMCONS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define MESSAGE_FILENAME TEXT("NETMSG")
#define OS2MSG_FILENAME TEXT("BASE")
#define HELP_MSG_FILENAME TEXT("NETH")
diff --git a/winsup/w32api/include/lmerr.h b/winsup/w32api/include/lmerr.h
index 308a912..58b1484 100644
--- a/winsup/w32api/include/lmerr.h
+++ b/winsup/w32api/include/lmerr.h
@@ -1,5 +1,9 @@
#ifndef _LMERR_H
#define _LMERR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <winerror.h>
#define NERR_Success 0
#define NERR_BASE 2100
diff --git a/winsup/w32api/include/lmerrlog.h b/winsup/w32api/include/lmerrlog.h
index 7948af2..2f41603 100644
--- a/winsup/w32api/include/lmerrlog.h
+++ b/winsup/w32api/include/lmerrlog.h
@@ -1,5 +1,9 @@
#ifndef _LMERRLOG_H
#define _LMERRLOG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmmsg.h b/winsup/w32api/include/lmmsg.h
index 0168981..9a4ea64 100644
--- a/winsup/w32api/include/lmmsg.h
+++ b/winsup/w32api/include/lmmsg.h
@@ -1,5 +1,9 @@
#ifndef _LMMSG_H
#define _LMMSG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmremutl.h b/winsup/w32api/include/lmremutl.h
index 553bdbd..0609240 100644
--- a/winsup/w32api/include/lmremutl.h
+++ b/winsup/w32api/include/lmremutl.h
@@ -1,5 +1,9 @@
#ifndef _LMREMUTL_H
#define _LMREMUTL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmrepl.h b/winsup/w32api/include/lmrepl.h
index f0ca544..0cef98c 100644
--- a/winsup/w32api/include/lmrepl.h
+++ b/winsup/w32api/include/lmrepl.h
@@ -1,5 +1,9 @@
#ifndef _LMREPL_H
#define _LMREPL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmserver.h b/winsup/w32api/include/lmserver.h
index f944588..7119714 100644
--- a/winsup/w32api/include/lmserver.h
+++ b/winsup/w32api/include/lmserver.h
@@ -1,5 +1,9 @@
#ifndef _LMSERVER_H
#define _LMSERVER_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmshare.h b/winsup/w32api/include/lmshare.h
index 326ad85..07fe927 100644
--- a/winsup/w32api/include/lmshare.h
+++ b/winsup/w32api/include/lmshare.h
@@ -1,5 +1,9 @@
#ifndef _LMSHARE_H
#define _LMSHARE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmsname.h b/winsup/w32api/include/lmsname.h
index 2a0f42b..a840cb2 100644
--- a/winsup/w32api/include/lmsname.h
+++ b/winsup/w32api/include/lmsname.h
@@ -1,5 +1,9 @@
#ifndef _LMSNAME_H
#define _LMSNAME_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define SERVICE_WORKSTATION TEXT("LanmanWorkstation")
#define SERVICE_LM20_WORKSTATION TEXT("WORKSTATION")
#define WORKSTATION_DISPLAY_NAME TEXT("Workstation")
diff --git a/winsup/w32api/include/lmstats.h b/winsup/w32api/include/lmstats.h
index 23820d7..2a4a2c2 100644
--- a/winsup/w32api/include/lmstats.h
+++ b/winsup/w32api/include/lmstats.h
@@ -1,5 +1,9 @@
#ifndef _LMSTATS_H
#define _LMSTATS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmsvc.h b/winsup/w32api/include/lmsvc.h
index a129bb0..bb19ee0 100644
--- a/winsup/w32api/include/lmsvc.h
+++ b/winsup/w32api/include/lmsvc.h
@@ -1,5 +1,9 @@
#ifndef _LMSVC_H
#define _LMSVC_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmuse.h b/winsup/w32api/include/lmuse.h
index 528e1ff..a63a71f 100644
--- a/winsup/w32api/include/lmuse.h
+++ b/winsup/w32api/include/lmuse.h
@@ -1,5 +1,9 @@
#ifndef _LMUSE_H
#define _LMUSE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lmuseflg.h b/winsup/w32api/include/lmuseflg.h
index 7984b19..34162e4 100644
--- a/winsup/w32api/include/lmuseflg.h
+++ b/winsup/w32api/include/lmuseflg.h
@@ -1,5 +1,9 @@
#ifndef _LMUSEFLG_H
#define _LMUSEFLG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define USE_NOFORCE 0
#define USE_FORCE 1
#define USE_LOTS_OF_FORCE 2
diff --git a/winsup/w32api/include/lmwksta.h b/winsup/w32api/include/lmwksta.h
index 6538fc9..a8c6ccb 100644
--- a/winsup/w32api/include/lmwksta.h
+++ b/winsup/w32api/include/lmwksta.h
@@ -1,5 +1,9 @@
#ifndef _LMWKSTA_H
#define _LMWKSTA_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/lzexpand.h b/winsup/w32api/include/lzexpand.h
index 5c06d14..68d4807 100644
--- a/winsup/w32api/include/lzexpand.h
+++ b/winsup/w32api/include/lzexpand.h
@@ -1,5 +1,9 @@
#ifndef _LZEXPAND_H
#define _LZEXPAND_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/mapi.h b/winsup/w32api/include/mapi.h
index 4275502..c007ee2 100644
--- a/winsup/w32api/include/mapi.h
+++ b/winsup/w32api/include/mapi.h
@@ -1,5 +1,8 @@
-#ifndef _MAPI_H_
-#define _MAPI_H_
+#ifndef _MAPI_H
+#define _MAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
@@ -156,5 +159,5 @@ typedef ULONG (PASCAL * LPMAPILOGOFF)(LHANDLE,ULONG,FLAGS,ULONG);
}
#endif
-#endif /* Not _MAPI_H_ */
+#endif /* Not _MAPI_H */
diff --git a/winsup/w32api/include/mciavi.h b/winsup/w32api/include/mciavi.h
index b56bb8f..8535a7f 100644
--- a/winsup/w32api/include/mciavi.h
+++ b/winsup/w32api/include/mciavi.h
@@ -1,5 +1,9 @@
#ifndef _MCIAVI_H
#define _MCIAVI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define MCI_MCIAVI_PLAY_WINDOW 0x1000000
#define MCI_MCIAVI_PLAY_FULLSCREEN 0x2000000
#define MCI_MCIAVI_PLAY_FULLBY2 0x4000000
diff --git a/winsup/w32api/include/mcx.h b/winsup/w32api/include/mcx.h
index facc6d5..c7173b7 100644
--- a/winsup/w32api/include/mcx.h
+++ b/winsup/w32api/include/mcx.h
@@ -1,5 +1,9 @@
#ifndef _MCX_H
#define _MCX_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/mmsystem.h b/winsup/w32api/include/mmsystem.h
index 63451f9..a1634ad 100644
--- a/winsup/w32api/include/mmsystem.h
+++ b/winsup/w32api/include/mmsystem.h
@@ -1,6 +1,9 @@
#ifndef _MMSYSTEM_H
#define _MMSYSTEM_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#pragma pack(push,1)
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/mswsock.h b/winsup/w32api/include/mswsock.h
index 7926a13..385d0b2 100644
--- a/winsup/w32api/include/mswsock.h
+++ b/winsup/w32api/include/mswsock.h
@@ -11,7 +11,9 @@
#ifndef _MSWSOCK_H
#define _MSWSOCK_H
-
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/nb30.h b/winsup/w32api/include/nb30.h
index c12b943..c0ef0e5 100644
--- a/winsup/w32api/include/nb30.h
+++ b/winsup/w32api/include/nb30.h
@@ -1,5 +1,9 @@
#ifndef _NB30_H
#define _NB30_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/nddeapi.h b/winsup/w32api/include/nddeapi.h
index 1648b62..a6ea207 100644
--- a/winsup/w32api/include/nddeapi.h
+++ b/winsup/w32api/include/nddeapi.h
@@ -1,5 +1,9 @@
#ifndef _NDDEAPI_H
#define _NDDEAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/nspapi.h b/winsup/w32api/include/nspapi.h
index 97dde16..2a15c32 100644
--- a/winsup/w32api/include/nspapi.h
+++ b/winsup/w32api/include/nspapi.h
@@ -1,5 +1,9 @@
#ifndef _NSPAPI_H
#define _NSPAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/ntdef.h b/winsup/w32api/include/ntdef.h
index 623a714..fcf8d49 100644
--- a/winsup/w32api/include/ntdef.h
+++ b/winsup/w32api/include/ntdef.h
@@ -1,5 +1,9 @@
#ifndef _NTDEF_H
#define _NTDEF_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define NTAPI __stdcall
#define OBJ_INHERIT 2L
#define OBJ_PERMANENT 16L
diff --git a/winsup/w32api/include/ntsecapi.h b/winsup/w32api/include/ntsecapi.h
index a5c81f9..71e4e5e 100644
--- a/winsup/w32api/include/ntsecapi.h
+++ b/winsup/w32api/include/ntsecapi.h
@@ -1,5 +1,9 @@
#ifndef _NTSECAPI_H
#define _NTSECAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/ntsecpkg.h b/winsup/w32api/include/ntsecpkg.h
index 4e7696b..1b6076a 100644
--- a/winsup/w32api/include/ntsecpkg.h
+++ b/winsup/w32api/include/ntsecpkg.h
@@ -1,5 +1,8 @@
#ifndef _NTSECPKG_H
#define _NTSECPKG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#define ISC_REQ_DELEGATE 1
#define ISC_REQ_MUTUAL_AUTH 2
diff --git a/winsup/w32api/include/oaidl.h b/winsup/w32api/include/oaidl.h
index 4e66e54..fb6fd4e 100644
--- a/winsup/w32api/include/oaidl.h
+++ b/winsup/w32api/include/oaidl.h
@@ -1,5 +1,9 @@
#ifndef _OAIDL_H
#define _OAIDL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/objbase.h b/winsup/w32api/include/objbase.h
index b3a5cc9..a1b0e57 100644
--- a/winsup/w32api/include/objbase.h
+++ b/winsup/w32api/include/objbase.h
@@ -1,5 +1,9 @@
#ifndef _OBJBASE_H
#define _OBJBASE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <rpc.h>
#include <rpcndr.h>
#include <stdlib.h>
diff --git a/winsup/w32api/include/objfwd.h b/winsup/w32api/include/objfwd.h
index ce567b6..17b8a81 100644
--- a/winsup/w32api/include/objfwd.h
+++ b/winsup/w32api/include/objfwd.h
@@ -1,5 +1,9 @@
#ifndef _OBJFWD_H
#define _OBJFWD_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/objidl.h b/winsup/w32api/include/objidl.h
index 26160b7..34ebe8e 100644
--- a/winsup/w32api/include/objidl.h
+++ b/winsup/w32api/include/objidl.h
@@ -1,5 +1,8 @@
#ifndef _OBJIDL_H
#define _OBJIDL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <objfwd.h>
diff --git a/winsup/w32api/include/odbcinst.h b/winsup/w32api/include/odbcinst.h
index 449e781..b90464f 100644
--- a/winsup/w32api/include/odbcinst.h
+++ b/winsup/w32api/include/odbcinst.h
@@ -1,5 +1,8 @@
#ifndef _ODBCINST_H
#define _ODBCINST_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <sql.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/ole.h b/winsup/w32api/include/ole.h
index f967459..d2dd202 100644
--- a/winsup/w32api/include/ole.h
+++ b/winsup/w32api/include/ole.h
@@ -1,5 +1,9 @@
#ifndef _OLE_H
#define _OLE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/ole2.h b/winsup/w32api/include/ole2.h
index 0f5aa71..c80a9a9 100644
--- a/winsup/w32api/include/ole2.h
+++ b/winsup/w32api/include/ole2.h
@@ -1,5 +1,9 @@
#ifndef _OLE2_H
#define _OLE2_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#pragma pack(push,8)
#include <winerror.h>
#include <objbase.h>
diff --git a/winsup/w32api/include/ole2ver.h b/winsup/w32api/include/ole2ver.h
index c7741dc..667003a 100644
--- a/winsup/w32api/include/ole2ver.h
+++ b/winsup/w32api/include/ole2ver.h
@@ -1,5 +1,8 @@
#ifndef _OLE2VER_H
#define _OLE2VER_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#define rmm 23
#define rup 639
#endif
diff --git a/winsup/w32api/include/oleauto.h b/winsup/w32api/include/oleauto.h
index 0e5d8f7..ab519ab 100644
--- a/winsup/w32api/include/oleauto.h
+++ b/winsup/w32api/include/oleauto.h
@@ -1,5 +1,9 @@
#ifndef _OLEAUTO_H
#define _OLEAUTO_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#pragma pack(push,8)
#define WINOLEAUTAPI STDAPI
#define WINOLEAUTAPI_(type) STDAPI_(type)
@@ -253,4 +257,5 @@ WINOLEAUTAPI VarSub(LPVARIANT, LPVARIANT, LPVARIANT);
WINOLEAUTAPI VarMul(LPVARIANT, LPVARIANT, LPVARIANT);
WINOLEAUTAPI VarDiv(LPVARIANT, LPVARIANT, LPVARIANT);
#pragma pack(pop)
+
#endif
diff --git a/winsup/w32api/include/olectl.h b/winsup/w32api/include/olectl.h
index 6c21630..74ce93e 100644
--- a/winsup/w32api/include/olectl.h
+++ b/winsup/w32api/include/olectl.h
@@ -1,5 +1,9 @@
#ifndef _OLECTL_H
#define _OLECTL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/olectlid.h b/winsup/w32api/include/olectlid.h
index 2aefe97..4795b64 100644
--- a/winsup/w32api/include/olectlid.h
+++ b/winsup/w32api/include/olectlid.h
@@ -1,5 +1,9 @@
#ifndef _OLECTLID_H
#define _OLECTLID_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/oledlg.h b/winsup/w32api/include/oledlg.h
index 438b53e..11dd88b 100644
--- a/winsup/w32api/include/oledlg.h
+++ b/winsup/w32api/include/oledlg.h
@@ -1,5 +1,9 @@
#ifndef _OLEDLG_H
#define _OLEDLG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/oleidl.h b/winsup/w32api/include/oleidl.h
index f1fafa3..570f2cc 100644
--- a/winsup/w32api/include/oleidl.h
+++ b/winsup/w32api/include/oleidl.h
@@ -1,5 +1,8 @@
#ifndef _OLEIDL_H
#define _OLEIDL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/pbt.h b/winsup/w32api/include/pbt.h
index fba11e3..570c02b 100644
--- a/winsup/w32api/include/pbt.h
+++ b/winsup/w32api/include/pbt.h
@@ -1,5 +1,9 @@
#ifndef _PBT_H
#define _PBT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define PBT_APMQUERYSUSPEND 0
#define PBT_APMQUERYSTANDBY 1
#define PBT_APMQUERYSUSPENDFAILED 2
diff --git a/winsup/w32api/include/prsht.h b/winsup/w32api/include/prsht.h
index 296ea6b..780c39a 100644
--- a/winsup/w32api/include/prsht.h
+++ b/winsup/w32api/include/prsht.h
@@ -1,5 +1,9 @@
#ifndef _PRSHT_H
#define _PRSHT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/psapi.h b/winsup/w32api/include/psapi.h
index 4c48273..af72931 100644
--- a/winsup/w32api/include/psapi.h
+++ b/winsup/w32api/include/psapi.h
@@ -16,6 +16,9 @@
*/
#ifndef _PSAPI_H
#define _PSAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/rapi.h b/winsup/w32api/include/rapi.h
index 1bc74db..4cf6515 100644
--- a/winsup/w32api/include/rapi.h
+++ b/winsup/w32api/include/rapi.h
@@ -7,6 +7,9 @@
#ifndef _RAPI_H
#define _RAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
typedef struct IRAPIStream
{
diff --git a/winsup/w32api/include/ras.h b/winsup/w32api/include/ras.h
index 7e86039..43bbc25 100644
--- a/winsup/w32api/include/ras.h
+++ b/winsup/w32api/include/ras.h
@@ -1,5 +1,8 @@
#ifndef _RAS_H
#define _RAS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C"
diff --git a/winsup/w32api/include/raserror.h b/winsup/w32api/include/raserror.h
index 54d11f7..97498b0 100644
--- a/winsup/w32api/include/raserror.h
+++ b/winsup/w32api/include/raserror.h
@@ -1,5 +1,9 @@
#ifndef _RASERROR_H
#define _RASERROR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define RASBASE 600
#define SUCCESS 0
#define PENDING (RASBASE+0)
diff --git a/winsup/w32api/include/rassapi.h b/winsup/w32api/include/rassapi.h
index c5e8bb3..9ba4afb 100644
--- a/winsup/w32api/include/rassapi.h
+++ b/winsup/w32api/include/rassapi.h
@@ -1,5 +1,9 @@
#ifndef _RASSAPI_H
#define _RASSAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/regstr.h b/winsup/w32api/include/regstr.h
index 6a34ffb..ccf80ea 100644
--- a/winsup/w32api/include/regstr.h
+++ b/winsup/w32api/include/regstr.h
@@ -1,5 +1,9 @@
#ifndef _REGSTR_H
#define _REGSTR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/richedit.h b/winsup/w32api/include/richedit.h
index 67c159b..bafc1e2 100644
--- a/winsup/w32api/include/richedit.h
+++ b/winsup/w32api/include/richedit.h
@@ -1,5 +1,9 @@
#ifndef _RICHEDIT_H
#define _RICHEDIT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/richole.h b/winsup/w32api/include/richole.h
index 90f390b..da2e336 100644
--- a/winsup/w32api/include/richole.h
+++ b/winsup/w32api/include/richole.h
@@ -1,5 +1,9 @@
#ifndef _RICHOLE_H
#define _RICHOLE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/rpc.h b/winsup/w32api/include/rpc.h
index 12f5fd0..0d5e1b3 100644
--- a/winsup/w32api/include/rpc.h
+++ b/winsup/w32api/include/rpc.h
@@ -1,5 +1,9 @@
#ifndef _RPC_H
#define _RPC_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifndef RPC_NO_WINDOWS_H
#include <windows.h>
#endif
diff --git a/winsup/w32api/include/rpcdce.h b/winsup/w32api/include/rpcdce.h
index 7230616..39b6474 100644
--- a/winsup/w32api/include/rpcdce.h
+++ b/winsup/w32api/include/rpcdce.h
@@ -1,5 +1,8 @@
#ifndef _RPCDCE_H
#define _RPCDCE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/rpcdce2.h b/winsup/w32api/include/rpcdce2.h
index ec0f62e..4d065f1 100644
--- a/winsup/w32api/include/rpcdce2.h
+++ b/winsup/w32api/include/rpcdce2.h
@@ -1,5 +1,9 @@
#ifndef _RPCDCE2_H
#define _RPCDCE2_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/rpcdcep.h b/winsup/w32api/include/rpcdcep.h
index 37c2ee3..c45bc46 100644
--- a/winsup/w32api/include/rpcdcep.h
+++ b/winsup/w32api/include/rpcdcep.h
@@ -1,5 +1,9 @@
#ifndef _RPCDCEP_H
#define _RPCDCEP_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/rpcndr.h b/winsup/w32api/include/rpcndr.h
index 037918f..8b728bb 100644
--- a/winsup/w32api/include/rpcndr.h
+++ b/winsup/w32api/include/rpcndr.h
@@ -1,5 +1,9 @@
#ifndef __RPCNDR_H__
#define __RPCNDR_H__
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifndef __RPCNDR_H_VERSION__
#define __RPCNDR_H_VERSION__ ( 450 )
#endif /* __RPCNDR_H_VERSION__ */
diff --git a/winsup/w32api/include/rpcnsi.h b/winsup/w32api/include/rpcnsi.h
index 69547c8..079d7b2 100644
--- a/winsup/w32api/include/rpcnsi.h
+++ b/winsup/w32api/include/rpcnsi.h
@@ -1,5 +1,9 @@
#ifndef _RPCNSI_H
#define _RPCNSI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/rpcnsip.h b/winsup/w32api/include/rpcnsip.h
index 4df26ca..15ed761 100644
--- a/winsup/w32api/include/rpcnsip.h
+++ b/winsup/w32api/include/rpcnsip.h
@@ -1,5 +1,9 @@
#ifndef _RPCNSIP_H
#define _RPCNSIP_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/rpcnterr.h b/winsup/w32api/include/rpcnterr.h
index 6b075ae..477ef29 100644
--- a/winsup/w32api/include/rpcnterr.h
+++ b/winsup/w32api/include/rpcnterr.h
@@ -1,5 +1,9 @@
#ifndef _RPCNTERR_H
#define _RPCNTERR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define RPC_S_OK ERROR_SUCCESS
#define RPC_S_INVALID_ARG ERROR_INVALID_PARAMETER
#define RPC_S_OUT_OF_MEMORY ERROR_OUTOFMEMORY
diff --git a/winsup/w32api/include/rpcproxy.h b/winsup/w32api/include/rpcproxy.h
index 606526d..5700e54 100644
--- a/winsup/w32api/include/rpcproxy.h
+++ b/winsup/w32api/include/rpcproxy.h
@@ -6,6 +6,10 @@
*/
#ifndef _RPCPROXY_H
#define _RPCPROXY_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#if defined __cplusplus && !defined CINTERFACE
#warning "rpcproxy type definitions require CINTERFACE"
#else
diff --git a/winsup/w32api/include/schannel.h b/winsup/w32api/include/schannel.h
index ae16a45..e010555 100644
--- a/winsup/w32api/include/schannel.h
+++ b/winsup/w32api/include/schannel.h
@@ -1,5 +1,8 @@
#ifndef _SCHANNEL_H
#define _SCHANNEL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <wincrypt.h>
diff --git a/winsup/w32api/include/schnlsp.h b/winsup/w32api/include/schnlsp.h
index b72a4c2..8e9e095 100644
--- a/winsup/w32api/include/schnlsp.h
+++ b/winsup/w32api/include/schnlsp.h
@@ -1,5 +1,9 @@
#ifndef _SCHNLSP_H
#define _SCHNLSP_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define SECPKG_ATTR_SUPPORTED_ALGS 86
#define SECPKG_ATTR_CIPHER_STRENGTHS 87
diff --git a/winsup/w32api/include/scrnsave.h b/winsup/w32api/include/scrnsave.h
index 30889d0..5cee4b6 100644
--- a/winsup/w32api/include/scrnsave.h
+++ b/winsup/w32api/include/scrnsave.h
@@ -9,6 +9,9 @@
*/
#ifndef _SCRNSAVE_H
#define _SCRNSAVE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/security.h b/winsup/w32api/include/security.h
index bdf8e41..1d74c20 100644
--- a/winsup/w32api/include/security.h
+++ b/winsup/w32api/include/security.h
@@ -1,5 +1,9 @@
#ifndef _SECURITY_H
#define _SECURITY_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define SEC_E_OK 0
#define SEC_E_CERT_EXPIRED (-2146893016)
diff --git a/winsup/w32api/include/setupapi.h b/winsup/w32api/include/setupapi.h
index 2202e24..0fbc462 100644
--- a/winsup/w32api/include/setupapi.h
+++ b/winsup/w32api/include/setupapi.h
@@ -1,5 +1,8 @@
#ifndef _SETUPAPI_H_
#define _SETUPAPI_H_
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <commctrl.h>
#include <pshpack1.h>
diff --git a/winsup/w32api/include/shellapi.h b/winsup/w32api/include/shellapi.h
index dab2659..3d6ba28 100644
--- a/winsup/w32api/include/shellapi.h
+++ b/winsup/w32api/include/shellapi.h
@@ -1,5 +1,9 @@
#ifndef _SHELLAPI_H
#define _SHELLAPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/shlguid.h b/winsup/w32api/include/shlguid.h
index d658e6e..72bc6af 100644
--- a/winsup/w32api/include/shlguid.h
+++ b/winsup/w32api/include/shlguid.h
@@ -1,5 +1,9 @@
#ifndef _SHLGUID_H
#define _SHLGUID_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/shlobj.h b/winsup/w32api/include/shlobj.h
index 2997c57..2be75cb 100644
--- a/winsup/w32api/include/shlobj.h
+++ b/winsup/w32api/include/shlobj.h
@@ -1,5 +1,8 @@
#ifndef _SHLOBJ_H
#define _SHLOBJ_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/sql.h b/winsup/w32api/include/sql.h
index f5241c1..2f0391b 100644
--- a/winsup/w32api/include/sql.h
+++ b/winsup/w32api/include/sql.h
@@ -1,5 +1,9 @@
#ifndef _SQL_H
#define _SQL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/sqlext.h b/winsup/w32api/include/sqlext.h
index 17235bd..8842607 100644
--- a/winsup/w32api/include/sqlext.h
+++ b/winsup/w32api/include/sqlext.h
@@ -1,5 +1,9 @@
#ifndef _SQLEXT_H
#define _SQLEXT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <sql.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/sqltypes.h b/winsup/w32api/include/sqltypes.h
index c2f1bfa..b831884 100644
--- a/winsup/w32api/include/sqltypes.h
+++ b/winsup/w32api/include/sqltypes.h
@@ -1,5 +1,9 @@
#ifndef _SQLTYPES_H
#define _SQLTYPES_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/sqlucode.h b/winsup/w32api/include/sqlucode.h
index faef644..78c0490 100644
--- a/winsup/w32api/include/sqlucode.h
+++ b/winsup/w32api/include/sqlucode.h
@@ -1,5 +1,9 @@
#ifndef _SQLUCODE_H
#define _SQLUCODE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <sqlext.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/sspi.h b/winsup/w32api/include/sspi.h
index f24c420..146d03e 100644
--- a/winsup/w32api/include/sspi.h
+++ b/winsup/w32api/include/sspi.h
@@ -1,5 +1,8 @@
#ifndef _SSPI_H
#define _SSPI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/subauth.h b/winsup/w32api/include/subauth.h
index b31a4ba..2c87f28 100644
--- a/winsup/w32api/include/subauth.h
+++ b/winsup/w32api/include/subauth.h
@@ -1,5 +1,9 @@
#ifndef _SUBAUTH_H
#define _SUBAUTH_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/tlhelp32.h b/winsup/w32api/include/tlhelp32.h
index 8f4222e..e928380 100644
--- a/winsup/w32api/include/tlhelp32.h
+++ b/winsup/w32api/include/tlhelp32.h
@@ -12,6 +12,10 @@
*/
#ifndef _TLHELP32_H
#define _TLHELP32_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/unknwn.h b/winsup/w32api/include/unknwn.h
index 48cea3b..4558a08 100644
--- a/winsup/w32api/include/unknwn.h
+++ b/winsup/w32api/include/unknwn.h
@@ -1,5 +1,9 @@
#ifndef _UNKNWN_H
#define _UNKNWN_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <windows.h>
#ifdef __cplusplus
extern "C"{
diff --git a/winsup/w32api/include/userenv.h b/winsup/w32api/include/userenv.h
index a073b79..fad9f81 100644
--- a/winsup/w32api/include/userenv.h
+++ b/winsup/w32api/include/userenv.h
@@ -1,5 +1,9 @@
#ifndef _USERENV_H
#define _USERENV_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/w32api.h b/winsup/w32api/include/w32api.h
index 8add46e..a8d36a4 100644
--- a/winsup/w32api/include/w32api.h
+++ b/winsup/w32api/include/w32api.h
@@ -1,5 +1,8 @@
#ifndef _W32API_H_
#define _W32API_H_
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#define __W32API_VERSION 1.3
#define __W32API_MAJOR_VERSION 1
diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h
index ebc2687..b3fab6c 100644
--- a/winsup/w32api/include/winbase.h
+++ b/winsup/w32api/include/winbase.h
@@ -1,5 +1,9 @@
#ifndef _WINBASE_H
#define _WINBASE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define WINBASEAPI DECLSPEC_IMPORT
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/wincon.h b/winsup/w32api/include/wincon.h
index 4ed04ab..8539fe5 100644
--- a/winsup/w32api/include/wincon.h
+++ b/winsup/w32api/include/wincon.h
@@ -1,5 +1,9 @@
#ifndef _WINCON_H
#define _WINCON_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/wincrypt.h b/winsup/w32api/include/wincrypt.h
index 8ec9770..8d0f5f0 100644
--- a/winsup/w32api/include/wincrypt.h
+++ b/winsup/w32api/include/wincrypt.h
@@ -1,5 +1,9 @@
#ifndef _WINCRYPT_H
#define _WINCRYPT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/windef.h b/winsup/w32api/include/windef.h
index f4de5ca..1ee3f39 100644
--- a/winsup/w32api/include/windef.h
+++ b/winsup/w32api/include/windef.h
@@ -1,5 +1,9 @@
#ifndef _WINDEF_H
#define _WINDEF_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/windows.h b/winsup/w32api/include/windows.h
index 267db18..de2cf9b 100644
--- a/winsup/w32api/include/windows.h
+++ b/winsup/w32api/include/windows.h
@@ -12,6 +12,10 @@
*/
#ifndef _WINDOWS_H
#define _WINDOWS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
/* translate GCC target defines to MS equivalents. Keep this synchronized
with winnt.h. */
#if defined(__i686__) && !defined(_M_IX86)
diff --git a/winsup/w32api/include/windowsx.h b/winsup/w32api/include/windowsx.h
index 37a439a..460718e 100644
--- a/winsup/w32api/include/windowsx.h
+++ b/winsup/w32api/include/windowsx.h
@@ -1,5 +1,9 @@
#ifndef _WINDOWSX_H
#define _WINDOWSX_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define WM_CTLCOLOR 25
#define Button_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),BM_GETCHECK,0,0))
diff --git a/winsup/w32api/include/winerror.h b/winsup/w32api/include/winerror.h
index 5dc58c7..8865d97 100644
--- a/winsup/w32api/include/winerror.h
+++ b/winsup/w32api/include/winerror.h
@@ -1,5 +1,9 @@
#ifndef _WINERROR_H
#define _WINERROR_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define ERROR_SUCCESS 0L
#define NO_ERROR 0L
#define ERROR_INVALID_FUNCTION 1L
diff --git a/winsup/w32api/include/wingdi.h b/winsup/w32api/include/wingdi.h
index c938b1d..1a9b5c9 100644
--- a/winsup/w32api/include/wingdi.h
+++ b/winsup/w32api/include/wingdi.h
@@ -1,5 +1,9 @@
#ifndef _WINGDI_H
#define _WINGDI_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/wininet.h b/winsup/w32api/include/wininet.h
index 690d6c0..49b519d 100644
--- a/winsup/w32api/include/wininet.h
+++ b/winsup/w32api/include/wininet.h
@@ -1,5 +1,9 @@
#ifndef _WININET_H
#define _WININET_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <windows.h>
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/w32api/include/winioctl.h b/winsup/w32api/include/winioctl.h
index b017199..31e9a4e 100644
--- a/winsup/w32api/include/winioctl.h
+++ b/winsup/w32api/include/winioctl.h
@@ -1,5 +1,9 @@
#ifndef _WINIOCTL_H
#define _WINIOCTL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winnetwk.h b/winsup/w32api/include/winnetwk.h
index f65bd5a..662fba9 100644
--- a/winsup/w32api/include/winnetwk.h
+++ b/winsup/w32api/include/winnetwk.h
@@ -1,5 +1,9 @@
#ifndef _WINNETWK_H
#define _WINNETWK_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winnls.h b/winsup/w32api/include/winnls.h
index ea72eda..3933812 100644
--- a/winsup/w32api/include/winnls.h
+++ b/winsup/w32api/include/winnls.h
@@ -1,5 +1,9 @@
#ifndef _WINNLS_H
#define _WINNLS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h
index 7276945..810d991 100644
--- a/winsup/w32api/include/winnt.h
+++ b/winsup/w32api/include/winnt.h
@@ -1,5 +1,9 @@
#ifndef _WINNT_H
#define _WINNT_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
/* translate GCC target defines to MS equivalents. Keep this synchronized
with windows.h. */
#if defined(__i686__) && !defined(_M_IX86)
diff --git a/winsup/w32api/include/winperf.h b/winsup/w32api/include/winperf.h
index 99620e4..75e29a8 100644
--- a/winsup/w32api/include/winperf.h
+++ b/winsup/w32api/include/winperf.h
@@ -1,5 +1,9 @@
#ifndef _WINPERF_H
#define _WINPERF_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winreg.h b/winsup/w32api/include/winreg.h
index aae020a..21020b8 100644
--- a/winsup/w32api/include/winreg.h
+++ b/winsup/w32api/include/winreg.h
@@ -1,5 +1,9 @@
#ifndef _WINREG_H
#define _WINREG_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winresrc.h b/winsup/w32api/include/winresrc.h
index 59e0cd0..79a5d8e 100644
--- a/winsup/w32api/include/winresrc.h
+++ b/winsup/w32api/include/winresrc.h
@@ -1,5 +1,9 @@
#ifndef _WINRESRC_H
#define _WINRESRC_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define WIN32_LEAN_AND_MEAN
#include <winuser.h>
#include <winnt.h>
diff --git a/winsup/w32api/include/winsock.h b/winsup/w32api/include/winsock.h
index 8ab4899..de9f080 100644
--- a/winsup/w32api/include/winsock.h
+++ b/winsup/w32api/include/winsock.h
@@ -10,6 +10,10 @@
#ifndef _WINSOCK_H
#define _WINSOCK_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
diff --git a/winsup/w32api/include/winsock2.h b/winsup/w32api/include/winsock2.h
index b90cf74..77c90bd 100644
--- a/winsup/w32api/include/winsock2.h
+++ b/winsup/w32api/include/winsock2.h
@@ -13,6 +13,10 @@
#if !(defined _WINSOCK2_H || defined _WINSOCK_H)
#define _WINSOCK2_H
#define _WINSOCK_H /* to prevent later inclusion of winsock.h */
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
diff --git a/winsup/w32api/include/winspool.h b/winsup/w32api/include/winspool.h
index b4a909e..4e5fa17 100644
--- a/winsup/w32api/include/winspool.h
+++ b/winsup/w32api/include/winspool.h
@@ -1,5 +1,9 @@
#ifndef _WINSPOOL_H
#define _WINSPOOL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winsvc.h b/winsup/w32api/include/winsvc.h
index 63af958..ae60d46 100644
--- a/winsup/w32api/include/winsvc.h
+++ b/winsup/w32api/include/winsvc.h
@@ -1,5 +1,9 @@
#ifndef _WINSVC_H
#define _WINSVC_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winuser.h b/winsup/w32api/include/winuser.h
index 305036b..8929c6b 100644
--- a/winsup/w32api/include/winuser.h
+++ b/winsup/w32api/include/winuser.h
@@ -1,5 +1,9 @@
#ifndef _WINUSER_H
#define _WINUSER_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/winver.h b/winsup/w32api/include/winver.h
index 93f5e53..f20333a 100644
--- a/winsup/w32api/include/winver.h
+++ b/winsup/w32api/include/winver.h
@@ -1,5 +1,9 @@
#ifndef _WINVER_H
#define _WINVER_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/winsup/w32api/include/ws2tcpip.h b/winsup/w32api/include/ws2tcpip.h
index 5432cd5..1b64dc9 100644
--- a/winsup/w32api/include/ws2tcpip.h
+++ b/winsup/w32api/include/ws2tcpip.h
@@ -8,6 +8,9 @@
#ifndef _WS2TCPIP_H
#define _WS2TCPIP_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#include <winsock2.h>
#ifdef __cplusplus
diff --git a/winsup/w32api/include/wsnetbs.h b/winsup/w32api/include/wsnetbs.h
index 84b2837..e435b5d 100644
--- a/winsup/w32api/include/wsnetbs.h
+++ b/winsup/w32api/include/wsnetbs.h
@@ -1,5 +1,8 @@
#ifndef _WSNETBS_H
#define _WSNETBS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#define NETBIOS_NAME_LENGTH 16
#define NETBIOS_UNIQUE_NAME 0
diff --git a/winsup/w32api/include/wtypes.h b/winsup/w32api/include/wtypes.h
index 34aa7cd..6c24def 100644
--- a/winsup/w32api/include/wtypes.h
+++ b/winsup/w32api/include/wtypes.h
@@ -1,5 +1,9 @@
#ifndef _WTYPES_H
#define _WTYPES_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
#include <rpc.h>
#include <rpcndr.h>
#ifdef __cplusplus
diff --git a/winsup/w32api/include/zmouse.h b/winsup/w32api/include/zmouse.h
index aa6073c..abb61ea 100644
--- a/winsup/w32api/include/zmouse.h
+++ b/winsup/w32api/include/zmouse.h
@@ -13,6 +13,9 @@
#ifndef _ZMOUSE_H
#define _ZMOUSE_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
#ifndef WM_MOUSEWHEEL
# define WM_MOUSEWHEEL (WM_MOUSELAST + 1)