Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit71cb352

Browse files
committed
Fix header inclusion order in c.h.
Commit962da90 added #include <stdint.h> to postgres_ext.h, whichbroke c.h's header ordering rule.The system headers on some systems would then lock down off_t's size inprivate macros, before they'd had a chance to see our definition of_FILE_OFFSET_BITS (and presumably other things). This was picked up byperl's ABI compatibility checks on some 32 bit systems in the buildfarm.Move #include "postgres_ext.h" down below the system header section, andmake the comments clearer (thanks to Tom for the new wording).Diagnosed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/2397643.1733347237%40sss.pgh.pa.us
1 parent76fd342 commit71cb352

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/include/c.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@
4646
#ifndefC_H
4747
#defineC_H
4848

49-
#include"postgres_ext.h"
50-
49+
/*
50+
* These headers must be included before any system headers, because on some
51+
* platforms they affect the behavior of the system headers (for example, by
52+
* defining _FILE_OFFSET_BITS).
53+
*/
5154
#include"pg_config.h"
5255
#include"pg_config_manual.h"/* must be after pg_config.h */
53-
#include"pg_config_os.h"/*must be before any system header files */
56+
#include"pg_config_os.h"/*config from include/port/PORTNAME.h */
5457

5558
/* System header files that should be available everywhere in Postgres */
5659
#include<inttypes.h>
@@ -76,6 +79,9 @@
7679
#include<libintl.h>
7780
#endif
7881

82+
/* Pull in fundamental symbols that we also expose to applications */
83+
#include"postgres_ext.h"
84+
7985
/* Define before including zlib.h to add const decorations to zlib API. */
8086
#ifdefHAVE_LIBZ
8187
#defineZLIB_CONST

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp