On Mon, May 09, 2022 at 09:23:47AM -0400, Robert Haas wrote:
> Either of you please feel free to change these things, at least as far
> as I'm concerned.

Well, what about the attached then?  While looking at all the headers
in the tree, I have noticed that __pg_log_level is not marked, but
we'd better paint a PGDLLIMPORT also for it?  This is getting used by
pgbench for some unlikely() business, as one example.
--
Michael
diff --git a/src/include/common/logging.h b/src/include/common/logging.h
index 9f426c32d6..2ab9f0ea50 100644
--- a/src/include/common/logging.h
+++ b/src/include/common/logging.h
@@ -51,7 +51,7 @@ enum pg_log_level
 /*
  * __pg_log_level is the minimum log level that will actually be shown.
  */
-extern enum pg_log_level __pg_log_level;
+extern PGDLLIMPORT enum pg_log_level __pg_log_level;
 
 /*
  * A log message can have several parts.  The primary message is required,
diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h
index 016fc89bd9..41227a30e2 100644
--- a/src/include/libpq/pqsignal.h
+++ b/src/include/libpq/pqsignal.h
@@ -30,9 +30,9 @@ extern int	pqsigsetmask(int mask);
 #define sigdelset(set, signum)	(*(set) &= ~(sigmask(signum)))
 #endif							/* WIN32 */
 
-extern sigset_t UnBlockSig,
-			BlockSig,
-			StartupBlockSig;
+extern PGDLLIMPORT sigset_t UnBlockSig;
+extern PGDLLIMPORT sigset_t BlockSig;
+extern PGDLLIMPORT sigset_t StartupBlockSig;
 
 extern void pqinitmask(void);
 
diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl
index 83b90db6ef..834fcac5b5 100755
--- a/src/tools/mark_pgdllimport.pl
+++ b/src/tools/mark_pgdllimport.pl
@@ -12,7 +12,8 @@
 # smart and may not catch all cases.
 #
 # It's probably a good idea to run pgindent on any files that this
-# script modifies before committing.
+# script modifies before committing.  This script uses as arguments
+# a list of the header files to scan for the markings.
 #
 # Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California

Attachment: signature.asc
Description: PGP signature

Reply via email to