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

Commitc3ca3c3

Browse files
peterepull[bot]
authored andcommitted
Move NON_EXEC_STATIC from c.h to postgres.h
It is not needed at the scope of c.h, only in backend code.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://www.postgresql.org/message-id/flat/a6a6b48e-ca0a-b58d-18de-98e40d94b842%40enterprisedb.com
1 parente7f857a commitc3ca3c3

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

‎src/include/c.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,13 +1327,6 @@ typedef intptr_t sigjmp_buf[5];
13271327
#endif/* __MINGW64__ */
13281328
#endif/* WIN32 */
13291329

1330-
/* EXEC_BACKEND defines */
1331-
#ifdefEXEC_BACKEND
1332-
#defineNON_EXEC_STATIC
1333-
#else
1334-
#defineNON_EXEC_STATIC static
1335-
#endif
1336-
13371330
/* /port compatibility functions */
13381331
#include"port.h"
13391332

‎src/include/postgres.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* -------------------------------------------------------
2626
*1)variable-length datatypes (TOAST support)
2727
*2)Datum type + support macros
28+
*3)miscellaneous
2829
*
2930
* NOTES
3031
*
@@ -805,4 +806,23 @@ extern Datum Float8GetDatum(float8 X);
805806
#defineFloat8GetDatumFast(X) PointerGetDatum(&(X))
806807
#endif
807808

809+
810+
/* ----------------------------------------------------------------
811+
*Section 3:miscellaneous
812+
* ----------------------------------------------------------------
813+
*/
814+
815+
/*
816+
* NON_EXEC_STATIC: It's sometimes useful to define a variable or function
817+
* that is normally static but extern when using EXEC_BACKEND (see
818+
* pg_config_manual.h). There would then typically be some code in
819+
* postmaster.c that uses those extern symbols to transfer state between
820+
* processes or do whatever other things it needs to do in EXEC_BACKEND mode.
821+
*/
822+
#ifdefEXEC_BACKEND
823+
#defineNON_EXEC_STATIC
824+
#else
825+
#defineNON_EXEC_STATIC static
826+
#endif
827+
808828
#endif/* POSTGRES_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp