1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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.
This commit is contained in:
Tom Lane
2025-04-27 13:23:19 -04:00
parent 2311f193ea
commit 94b84a6072
7 changed files with 14 additions and 14 deletions
src
backend
bin
initdb
pg_dump
pg_verifybackup
include
pl

@ -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 {

@ -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

@ -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"

@ -18,7 +18,7 @@
#include "pg_backup_utils.h"
#ifdef HAVE_LIBZ
#include "zlib.h"
#include <zlib.h>
/*----------------------
* Compressor API

@ -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"

@ -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>

@ -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 */