diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2025-04-27 13:23:19 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2025-04-27 13:23:19 -0400 |
commit | 94b84a60729e15ee071739c3aec7fdd781123aab (patch) | |
tree | dd7cfe54f977154b1ea5ab121d724b0bade11e23 | |
parent | 2311f193ea7db23f68f5471ae2c35940fc0d4794 (diff) | |
download | postgresql-94b84a60729e15ee071739c3aec7fdd781123aab.tar.gz postgresql-94b84a60729e15ee071739c3aec7fdd781123aab.zip |
Don't use double-quotes in #include's of system headers, redux.
This cleans up some loose ends left by commit e8ca9ed1d. I hadn't
looked closely enough at these places before, but now I have.
The use of double-quoted #includes for Perl headers in plperl_system.h
seems to be simply a mistake introduced in 6c944bf3c and faithfully
copied forward since then. (I had thought possibly it was required
by some weird Windows build setup, but there's no evidence of that in
our history.)
The occurrences in SectionMemoryManager.h and SectionMemoryManager.cpp
evidently stem from those files' origin as LLVM code. It's
understandable that LLVM would treat their own files as needing
double-quoted #includes; but they're still system headers to us.
I also applied the same check to *.c files, and found a few other
random incorrect usages in both directions.
Our ECPG headers and test files routinely use angle brackets to refer
to ECPG headers. I left those usages alone, since it seems reasonable
for an ECPG user to regard those headers as system headers.
-rw-r--r-- | src/backend/jit/llvm/SectionMemoryManager.cpp | 4 | ||||
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 4 | ||||
-rw-r--r-- | src/bin/initdb/initdb.c | 2 | ||||
-rw-r--r-- | src/bin/pg_dump/compress_gzip.c | 2 | ||||
-rw-r--r-- | src/bin/pg_verifybackup/pg_verifybackup.c | 2 | ||||
-rw-r--r-- | src/include/jit/SectionMemoryManager.h | 8 | ||||
-rw-r--r-- | src/pl/plperl/plperl_system.h | 6 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/jit/llvm/SectionMemoryManager.cpp b/src/backend/jit/llvm/SectionMemoryManager.cpp index c4fbf15a961..2171db5f382 100644 --- a/src/backend/jit/llvm/SectionMemoryManager.cpp +++ b/src/backend/jit/llvm/SectionMemoryManager.cpp @@ -40,8 +40,8 @@ #ifdef USE_LLVM_BACKPORT_SECTION_MEMORY_MANAGER #include "jit/SectionMemoryManager.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/Process.h" +#include <llvm/Support/MathExtras.h> +#include <llvm/Support/Process.h> namespace llvm { namespace backport { diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index fe0ceeadc13..0b317d2d809 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -3333,7 +3333,7 @@ UnpinBufferNoOwner(BufferDesc *buf) #define ST_COMPARE(a, b) ckpt_buforder_comparator(a, b) #define ST_SCOPE static #define ST_DEFINE -#include <lib/sort_template.h> +#include "lib/sort_template.h" /* * BufferSync -- Write out all dirty buffers in the pool. @@ -6450,7 +6450,7 @@ ScheduleBufferTagForWriteback(WritebackContext *wb_context, IOContext io_context #define ST_COMPARE(a, b) buffertag_comparator(&a->tag, &b->tag) #define ST_SCOPE static #define ST_DEFINE -#include <lib/sort_template.h> +#include "lib/sort_template.h" /* * Issue all pending writeback requests, previously scheduled with diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 2087690449d..08c6b5f8a38 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -61,7 +61,7 @@ #include <time.h> #ifdef HAVE_SHM_OPEN -#include "sys/mman.h" +#include <sys/mman.h> #endif #include "access/xlog_internal.h" diff --git a/src/bin/pg_dump/compress_gzip.c b/src/bin/pg_dump/compress_gzip.c index 23f617209e6..5a30ebf9bf5 100644 --- a/src/bin/pg_dump/compress_gzip.c +++ b/src/bin/pg_dump/compress_gzip.c @@ -18,7 +18,7 @@ #include "pg_backup_utils.h" #ifdef HAVE_LIBZ -#include "zlib.h" +#include <zlib.h> /*---------------------- * Compressor API diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c index 3ce233f3c20..a034d521123 100644 --- a/src/bin/pg_verifybackup/pg_verifybackup.c +++ b/src/bin/pg_verifybackup/pg_verifybackup.c @@ -15,6 +15,7 @@ #include <dirent.h> #include <fcntl.h> +#include <limits.h> #include <sys/stat.h> #include <time.h> @@ -23,7 +24,6 @@ #include "common/parse_manifest.h" #include "fe_utils/simple_list.h" #include "getopt_long.h" -#include "limits.h" #include "pg_verifybackup.h" #include "pgtime.h" diff --git a/src/include/jit/SectionMemoryManager.h b/src/include/jit/SectionMemoryManager.h index 6bed991bd2b..924a99b0d33 100644 --- a/src/include/jit/SectionMemoryManager.h +++ b/src/include/jit/SectionMemoryManager.h @@ -19,10 +19,10 @@ #ifndef LLVM_EXECUTIONENGINE_BACKPORT_SECTIONMEMORYMANAGER_H #define LLVM_EXECUTIONENGINE_BACKPORT_SECTIONMEMORYMANAGER_H -#include "llvm/ADT/SmallVector.h" -#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/Support/Alignment.h" -#include "llvm/Support/Memory.h" +#include <llvm/ADT/SmallVector.h> +#include <llvm/ExecutionEngine/RTDyldMemoryManager.h> +#include <llvm/Support/Alignment.h> +#include <llvm/Support/Memory.h> #include <cstdint> #include <string> #include <system_error> diff --git a/src/pl/plperl/plperl_system.h b/src/pl/plperl/plperl_system.h index 57355ac1ed4..4c09a5cc159 100644 --- a/src/pl/plperl/plperl_system.h +++ b/src/pl/plperl/plperl_system.h @@ -82,8 +82,8 @@ * can compile against MULTIPLICITY Perl builds without including XSUB.h. */ #define PERL_NO_GET_CONTEXT -#include "EXTERN.h" -#include "perl.h" +#include <EXTERN.h> +#include <perl.h> /* * We want to include XSUB.h only within .xs files, because on some platforms @@ -117,7 +117,7 @@ #undef unlink #endif -#include "XSUB.h" +#include <XSUB.h> #endif /* put back our *printf macros ... this must match src/include/port.h */ |