mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Move extern declarations for EXEC_BACKEND to header files
This fixes warnings from -Wmissing-variable-declarations (not yet part of the standard warning options) under EXEC_BACKEND. The NON_EXEC_STATIC variables need a suitable declaration in a header file under EXEC_BACKEND. Also fix the inconsistent application of the volatile qualifier for PMSignalState, which was revealed by this change. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
This commit is contained in:
@@ -114,7 +114,7 @@ typedef struct
|
||||
PROC_HDR *ProcGlobal;
|
||||
PGPROC *AuxiliaryProcs;
|
||||
PGPROC *PreparedXactProcs;
|
||||
PMSignalData *PMSignalState;
|
||||
volatile PMSignalData *PMSignalState;
|
||||
pid_t PostmasterPid;
|
||||
TimestampTz PgStartTime;
|
||||
TimestampTz PgReloadTime;
|
||||
@@ -668,16 +668,6 @@ SubPostmasterMain(int argc, char *argv[])
|
||||
pg_unreachable(); /* main_fn never returns */
|
||||
}
|
||||
|
||||
/*
|
||||
* The following need to be available to the save/restore_backend_variables
|
||||
* functions. They are marked NON_EXEC_STATIC in their home modules.
|
||||
*/
|
||||
extern slock_t *ProcStructLock;
|
||||
extern PGPROC *AuxiliaryProcs;
|
||||
extern PMSignalData *PMSignalState;
|
||||
extern pg_time_t first_syslogger_file_time;
|
||||
extern struct bkend *ShmemBackendArray;
|
||||
|
||||
#ifndef WIN32
|
||||
#define write_inheritable_socket(dest, src, childpid) ((*(dest) = (src)), true)
|
||||
#define read_inheritable_socket(dest, src) (*(dest) = *(src))
|
||||
|
||||
Reference in New Issue
Block a user