Add missing include guard to win32ntdll.h.
authorThomas Munro
Tue, 11 Jan 2022 21:11:50 +0000 (10:11 +1300)
committerAndrew Dunstan
Thu, 7 Nov 2024 23:05:45 +0000 (09:35 +1030)
Oversight in commit e2f0f8ed.  Also add this file to the exclusion lists
in headerscheck and cpluscpluscheck, because Unix systems don't have a
header it includes.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/2760528.1641929756%40sss.pgh.pa.us
(cherry picked from commit af9e6331aeba149c93052c3549140082a85a3cf9)

Author: Thomas Munro 
Author: Alexandra Wang 

src/include/port/win32ntdll.h
src/tools/pginclude/cpluspluscheck
src/tools/pginclude/headerscheck

index 4d8808b3aaf3336d96f97ea0c4e4deee76eb9927..b29b06b91f9649bdfa4df30c7f2f69916b83bc5e 100644 (file)
@@ -11,6 +11,9 @@
  *-------------------------------------------------------------------------
  */
 
+#ifndef WIN32NTDLL_H
+#define WIN32NTDLL_H
+
 /*
  * Because this includes NT headers that normally conflict with Win32 headers,
  * any translation unit that includes it should #define UMDF_USING_NTSTATUS
@@ -25,3 +28,5 @@ typedef NTSTATUS (__stdcall *RtlGetLastNtStatus_t) (void);
 extern RtlGetLastNtStatus_t pg_RtlGetLastNtStatus;
 
 extern int initialize_ntdll(void);
+
+#endif                         /* WIN32NTDLL_H */
index e52d5e4240855d3c6323ee8c3f709290d03452d6..f75909d6dc6c43f07f611c81465f9555a4824392 100755 (executable)
@@ -75,6 +75,7 @@ do
    test "$f" = src/include/port/win32/sys/socket.h && continue
    test "$f" = src/include/port/win32_msvc/dirent.h && continue
    test "$f" = src/include/port/win32_msvc/utime.h && continue
+   test "$f" = src/include/port/win32ntdll.h && continue
    test "$f" = src/port/pthread-win32.h && continue
 
    # Likewise, these files are platform-specific, and the one
index 9542cf37bc9cf61731c8c666f0c7dce1cd1e94fb..c0a57ad7a7fd57e2ae1070c2a54232be594f130b 100755 (executable)
@@ -71,6 +71,7 @@ do
    test "$f" = src/include/port/win32/sys/socket.h && continue
    test "$f" = src/include/port/win32_msvc/dirent.h && continue
    test "$f" = src/include/port/win32_msvc/utime.h && continue
+   test "$f" = src/include/port/win32ntdll.h && continue
    test "$f" = src/port/pthread-win32.h && continue
 
    # Likewise, these files are platform-specific, and the one