From: Thomas Munro Date: Mon, 17 Nov 2025 21:30:34 +0000 (+1300) Subject: Define PS_USE_CLOBBER_ARGV on GNU/Hurd. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=29a3e22f3568478ce0d887c63dc03c2bda9dfa53;p=postgresql.git Define PS_USE_CLOBBER_ARGV on GNU/Hurd. This is a backpatch of 32b23664 to v14 and v15. * Remove ancient test for __hurd__, which intended to activate PS_USE_CHANGE_ARGV in these branches but turned out not to be defined on modern systems. * Add new test for__GNU__ to activate PS_USE_CLOBBER_ARGV, like the newer branches. Author: Michael Banck Discussion: https://postgr.es/m/CA%2BhUKGJMNGUAqf27WbckYFrM-Mavy0RKJvocfJU%3DJ2XcAZyv%2Bw%40mail.gmail.com Backpatch-through: 14-15 --- diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index f1a02d602c8..9162226032d 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -73,9 +73,9 @@ bool update_process_title = true; #define PS_USE_PSTAT #elif defined(HAVE_PS_STRINGS) #define PS_USE_PS_STRINGS -#elif (defined(BSD) || defined(__hurd__)) && !defined(__darwin__) +#elif defined(BSD) && !defined(__darwin__) #define PS_USE_CHANGE_ARGV -#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(__svr5__) || defined(__darwin__) +#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(__svr5__) || defined(__darwin__) || defined(__GNU__) #define PS_USE_CLOBBER_ARGV #elif defined(WIN32) #define PS_USE_WIN32 @@ -85,7 +85,7 @@ bool update_process_title = true; /* Different systems want the buffer padded differently */ -#if defined(_AIX) || defined(__linux__) || defined(__darwin__) +#if defined(_AIX) || defined(__linux__) || defined(__darwin__) || defined(__GNU__) #define PS_PADDING '\0' #else #define PS_PADDING ' '