mirror of https://github.com/postgres/postgres
Mark assorted variables PGDLLIMPORT.
This makes life easier for extension authors who wish to support Windows. Brian Cloutier, slightly amended by me. Discussion: http://postgr.es/m/CAJCy68fscdNhmzFPS4kyO00CADkvXvEa-28H-OtENk-pa2OTWw@mail.gmail.com
This commit is contained in:
parent
28f8896af0
commit
c572599c65
|
@ -25,7 +25,7 @@
|
||||||
typedef struct GlobalTransactionData *GlobalTransaction;
|
typedef struct GlobalTransactionData *GlobalTransaction;
|
||||||
|
|
||||||
/* GUC variable */
|
/* GUC variable */
|
||||||
extern int max_prepared_xacts;
|
extern PGDLLIMPORT int max_prepared_xacts;
|
||||||
|
|
||||||
extern Size TwoPhaseShmemSize(void);
|
extern Size TwoPhaseShmemSize(void);
|
||||||
extern void TwoPhaseShmemInit(void);
|
extern void TwoPhaseShmemInit(void);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* them from the extension first.
|
* them from the extension first.
|
||||||
*/
|
*/
|
||||||
extern PGDLLIMPORT bool creating_extension;
|
extern PGDLLIMPORT bool creating_extension;
|
||||||
extern Oid CurrentExtensionObject;
|
extern PGDLLIMPORT Oid CurrentExtensionObject;
|
||||||
|
|
||||||
|
|
||||||
extern ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt);
|
extern ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt);
|
||||||
|
|
|
@ -150,14 +150,14 @@ extern PGDLLIMPORT bool IsUnderPostmaster;
|
||||||
extern PGDLLIMPORT bool IsBackgroundWorker;
|
extern PGDLLIMPORT bool IsBackgroundWorker;
|
||||||
extern PGDLLIMPORT bool IsBinaryUpgrade;
|
extern PGDLLIMPORT bool IsBinaryUpgrade;
|
||||||
|
|
||||||
extern bool ExitOnAnyError;
|
extern PGDLLIMPORT bool ExitOnAnyError;
|
||||||
|
|
||||||
extern PGDLLIMPORT char *DataDir;
|
extern PGDLLIMPORT char *DataDir;
|
||||||
|
|
||||||
extern PGDLLIMPORT int NBuffers;
|
extern PGDLLIMPORT int NBuffers;
|
||||||
extern int MaxBackends;
|
extern PGDLLIMPORT int MaxBackends;
|
||||||
extern int MaxConnections;
|
extern PGDLLIMPORT int MaxConnections;
|
||||||
extern int max_worker_processes;
|
extern PGDLLIMPORT int max_worker_processes;
|
||||||
extern int max_parallel_workers;
|
extern int max_parallel_workers;
|
||||||
|
|
||||||
extern PGDLLIMPORT int MyProcPid;
|
extern PGDLLIMPORT int MyProcPid;
|
||||||
|
@ -238,7 +238,7 @@ extern PGDLLIMPORT int IntervalStyle;
|
||||||
#define MAXTZLEN 10 /* max TZ name len, not counting tr. null */
|
#define MAXTZLEN 10 /* max TZ name len, not counting tr. null */
|
||||||
|
|
||||||
extern bool enableFsync;
|
extern bool enableFsync;
|
||||||
extern bool allowSystemTableMods;
|
extern PGDLLIMPORT bool allowSystemTableMods;
|
||||||
extern PGDLLIMPORT int work_mem;
|
extern PGDLLIMPORT int work_mem;
|
||||||
extern PGDLLIMPORT int maintenance_work_mem;
|
extern PGDLLIMPORT int maintenance_work_mem;
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ extern size_t pg_strftime(char *s, size_t max, const char *format,
|
||||||
|
|
||||||
/* these functions and variables are in pgtz.c */
|
/* these functions and variables are in pgtz.c */
|
||||||
|
|
||||||
extern pg_tz *session_timezone;
|
extern PGDLLIMPORT pg_tz *session_timezone;
|
||||||
extern pg_tz *log_timezone;
|
extern pg_tz *log_timezone;
|
||||||
|
|
||||||
extern void pg_timezone_initialize(void);
|
extern void pg_timezone_initialize(void);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
/* GUC options */
|
/* GUC options */
|
||||||
extern bool EnableSSL;
|
extern bool EnableSSL;
|
||||||
extern int ReservedBackends;
|
extern int ReservedBackends;
|
||||||
extern int PostPortNumber;
|
extern PGDLLIMPORT int PostPortNumber;
|
||||||
extern int Unix_socket_permissions;
|
extern int Unix_socket_permissions;
|
||||||
extern char *Unix_socket_group;
|
extern char *Unix_socket_group;
|
||||||
extern char *Unix_socket_directories;
|
extern char *Unix_socket_directories;
|
||||||
|
@ -44,7 +44,7 @@ extern int postmaster_alive_fds[2];
|
||||||
#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */
|
#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char *progname;
|
extern PGDLLIMPORT const char *progname;
|
||||||
|
|
||||||
extern void PostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();
|
extern void PostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();
|
||||||
extern void ClosePostmasterPorts(bool am_syslogger);
|
extern void ClosePostmasterPorts(bool am_syslogger);
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef int File;
|
||||||
|
|
||||||
|
|
||||||
/* GUC parameter */
|
/* GUC parameter */
|
||||||
extern int max_files_per_process;
|
extern PGDLLIMPORT int max_files_per_process;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is private to fd.c, but exported for save/restore_backend_variables()
|
* This is private to fd.c, but exported for save/restore_backend_variables()
|
||||||
|
|
|
@ -269,7 +269,7 @@ typedef struct PROC_HDR
|
||||||
int startupBufferPinWaitBufId;
|
int startupBufferPinWaitBufId;
|
||||||
} PROC_HDR;
|
} PROC_HDR;
|
||||||
|
|
||||||
extern PROC_HDR *ProcGlobal;
|
extern PGDLLIMPORT PROC_HDR *ProcGlobal;
|
||||||
|
|
||||||
extern PGPROC *PreparedXactProcs;
|
extern PGPROC *PreparedXactProcs;
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ extern PGPROC *PreparedXactProcs;
|
||||||
#define NUM_AUXILIARY_PROCS 4
|
#define NUM_AUXILIARY_PROCS 4
|
||||||
|
|
||||||
/* configurable options */
|
/* configurable options */
|
||||||
extern int DeadlockTimeout;
|
extern PGDLLIMPORT int DeadlockTimeout;
|
||||||
extern int StatementTimeout;
|
extern int StatementTimeout;
|
||||||
extern int LockTimeout;
|
extern int LockTimeout;
|
||||||
extern int IdleInTransactionSessionTimeout;
|
extern int IdleInTransactionSessionTimeout;
|
||||||
|
|
|
@ -129,7 +129,8 @@ struct _DestReceiver
|
||||||
/* Private fields might appear beyond this point... */
|
/* Private fields might appear beyond this point... */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DestReceiver *None_Receiver; /* permanent receiver for DestNone */
|
extern PGDLLIMPORT DestReceiver *None_Receiver; /* permanent receiver for
|
||||||
|
* DestNone */
|
||||||
|
|
||||||
/* The primary destination management functions */
|
/* The primary destination management functions */
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef enum
|
||||||
LOGSTMT_ALL /* log all statements */
|
LOGSTMT_ALL /* log all statements */
|
||||||
} LogStmtLevel;
|
} LogStmtLevel;
|
||||||
|
|
||||||
extern int log_statement;
|
extern PGDLLIMPORT int log_statement;
|
||||||
|
|
||||||
extern List *pg_parse_query(const char *query_string);
|
extern List *pg_parse_query(const char *query_string);
|
||||||
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
|
extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
|
||||||
|
|
|
@ -248,8 +248,8 @@ extern bool default_with_oids;
|
||||||
extern bool session_auth_is_superuser;
|
extern bool session_auth_is_superuser;
|
||||||
|
|
||||||
extern int log_min_error_statement;
|
extern int log_min_error_statement;
|
||||||
extern int log_min_messages;
|
extern PGDLLIMPORT int log_min_messages;
|
||||||
extern int client_min_messages;
|
extern PGDLLIMPORT int client_min_messages;
|
||||||
extern int log_min_duration_statement;
|
extern int log_min_duration_statement;
|
||||||
extern int log_temp_files;
|
extern int log_temp_files;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ extern int temp_file_limit;
|
||||||
extern int num_temp_buffers;
|
extern int num_temp_buffers;
|
||||||
|
|
||||||
extern char *cluster_name;
|
extern char *cluster_name;
|
||||||
extern char *ConfigFileName;
|
extern PGDLLIMPORT char *ConfigFileName;
|
||||||
extern char *HbaFileName;
|
extern char *HbaFileName;
|
||||||
extern char *IdentFileName;
|
extern char *IdentFileName;
|
||||||
extern char *external_pid_file;
|
extern char *external_pid_file;
|
||||||
|
|
|
@ -56,10 +56,10 @@ extern TimestampTz GetOldSnapshotThresholdTimestamp(void);
|
||||||
|
|
||||||
extern bool FirstSnapshotSet;
|
extern bool FirstSnapshotSet;
|
||||||
|
|
||||||
extern TransactionId TransactionXmin;
|
extern PGDLLIMPORT TransactionId TransactionXmin;
|
||||||
extern TransactionId RecentXmin;
|
extern PGDLLIMPORT TransactionId RecentXmin;
|
||||||
extern PGDLLIMPORT TransactionId RecentGlobalXmin;
|
extern PGDLLIMPORT TransactionId RecentGlobalXmin;
|
||||||
extern TransactionId RecentGlobalDataXmin;
|
extern PGDLLIMPORT TransactionId RecentGlobalDataXmin;
|
||||||
|
|
||||||
extern Snapshot GetTransactionSnapshot(void);
|
extern Snapshot GetTransactionSnapshot(void);
|
||||||
extern Snapshot GetLatestSnapshot(void);
|
extern Snapshot GetLatestSnapshot(void);
|
||||||
|
|
Loading…
Reference in New Issue