postgres.git / summary / log / commit / refs

commit    5c0b7581ba12bb01ebebce60583e3db6c0511057
Author:   Thomas Munro <tmunro@postgresql.org>
Commit:   Andrew Dunstan <andrew@dunslane.net>
Date:     Tue Jan 11 21:11:50 2022 +0000
First released in: 13.17, 14.14

    Add missing include guard to win32ntdll.h.
    
    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 <tgl@sss.pgh.pa.us>
    Discussion: https://postgr.es/m/2760528.1641929756%40sss.pgh.pa.us
    (cherry picked from commit af9e6331aeba149c93052c3549140082a85a3cf9)
    
    Author: Thomas Munro <tmunro@postgresql.org>
    Author: Alexandra Wang <alexandra.wang.oss@gmail.com>


src/include/port/win32ntdll.h | 5 +++++ src/tools/pginclude/cpluspluscheck | 1 + src/tools/pginclude/headerscheck | 1 + 3 files changed, 7 insertions(+) diff --git a/src/include/port/win32ntdll.h b/src/include/port/win32ntdll.h index 4d8808b3aaf..b29b06b91f9 100644 --- a/src/include/port/win32ntdll.h +++ b/src/include/port/win32ntdll.h @@ -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 */ diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck index a5132cbadf2..eadb6fa105a 100755 --- a/src/tools/pginclude/cpluspluscheck +++ b/src/tools/pginclude/cpluspluscheck @@ -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 diff --git a/src/tools/pginclude/headerscheck b/src/tools/pginclude/headerscheck index 9442db2d2ea..10c42f6e801 100755 --- a/src/tools/pginclude/headerscheck +++ b/src/tools/pginclude/headerscheck @@ -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 [parent: 56b39cce778f]