Re: pgsql: Check for STATUS_DELETE_PENDING on Windows. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Check for STATUS_DELETE_PENDING on Windows.
Date
Msg-id 2760528.1641929756@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Check for STATUS_DELETE_PENDING on Windows.  (Thomas Munro <tmunro@postgresql.org>)
Responses Re: pgsql: Check for STATUS_DELETE_PENDING on Windows.  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-committers
Thomas Munro <tmunro@postgresql.org> writes:
> Check for STATUS_DELETE_PENDING on Windows.

The src/include/port/win32ntdll.h file added by this commit has
a couple of deficiencies:

1. It lacks the usual anti-multiple-inclusion guard, i.e.
    #ifndef WIN32NTDLL_H
or the like.  Was there a specific reason to omit that?

2. headerscheck and cpluspluscheck don't like it, at least
not on non-Windows:

$ src/tools/pginclude/headerscheck
In file included from /tmp/headerscheck.WKh8cz/test.c:2:
./src/include/port/win32ntdll.h:20:10: fatal error: ntstatus.h: No such file or directory
 #include <ntstatus.h>
          ^~~~~~~~~~~~

One way to solve that, perhaps, is to wrap the whole header
in #ifdef WIN32.  But I think our more usual practice has
been to add such headers to the exclusion lists in those
two scripts.

            regards, tom lane



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Improve error message for missing extension.
Next
From: Thomas Munro
Date:
Subject: pgsql: Add missing include guard to win32ntdll.h.