mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Backpatch: Fix warnings about declaration of environ on MinGW
Backpatch commit7bc9a8bdd2to 13-17. The motivation for backpatching is that we want to update CI to Debian Trixie. Trixie contains a newer mingw installation, which would trigger the warning addressed by7bc9a8bdd2. The risk of backpatching seems fairly low, given that it did not cause issues in the branches the commit is already present. While CI is not present in 13-14, it seems better to be consistent across branches. Author: Thomas Munro <tmunro@postgresql.org> Discussion: https://postgr.es/m/o5yadhhmyjo53svzwvaocww6zkrp63i4f32cw3treuh46pxtza@hyqio5b2tkt6 Backpatch-through: 13
This commit is contained in:
@@ -942,7 +942,9 @@ PostmasterMain(int argc, char *argv[])
|
|||||||
|
|
||||||
/* For debugging: display postmaster environment */
|
/* For debugging: display postmaster environment */
|
||||||
{
|
{
|
||||||
|
#if !defined(WIN32) || defined(_MSC_VER)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
#endif
|
||||||
char **p;
|
char **p;
|
||||||
|
|
||||||
ereport(DEBUG3,
|
ereport(DEBUG3,
|
||||||
|
|||||||
@@ -32,7 +32,9 @@
|
|||||||
#include "utils/guc.h"
|
#include "utils/guc.h"
|
||||||
#include "utils/ps_status.h"
|
#include "utils/ps_status.h"
|
||||||
|
|
||||||
|
#if !defined(WIN32) || defined(_MSC_VER)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
#endif
|
||||||
bool update_process_title = true;
|
bool update_process_title = true;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -631,7 +631,9 @@ PG_FUNCTION_INFO_V1(get_environ);
|
|||||||
Datum
|
Datum
|
||||||
get_environ(PG_FUNCTION_ARGS)
|
get_environ(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
|
#if !defined(WIN32) || defined(_MSC_VER)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
#endif
|
||||||
int nvals = 0;
|
int nvals = 0;
|
||||||
ArrayType *result;
|
ArrayType *result;
|
||||||
Datum *env;
|
Datum *env;
|
||||||
|
|||||||
Reference in New Issue
Block a user