Index: databases/postgresql10-server/files/patch-configure =================================================================== --- /dev/null +++ databases/postgresql10-server/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2018-05-07 20:51:40 UTC ++++ configure +@@ -13031,7 +13031,7 @@ fi + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l ++for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" Index: databases/postgresql10-server/files/patch-configure.in =================================================================== --- /dev/null +++ databases/postgresql10-server/files/patch-configure.in @@ -0,0 +1,11 @@ +--- configure.in.orig 2018-05-07 20:51:40 UTC ++++ configure.in +@@ -1436,7 +1436,7 @@ PGAC_FUNC_WCSTOMBS_L + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-AC_CHECK_FUNCS([cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) ++AC_CHECK_FUNCS([cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) + + AC_REPLACE_FUNCS(fseeko) + case $host_os in Index: databases/postgresql10-server/files/patch-src_backend_utils_misc_ps__status.c =================================================================== --- /dev/null +++ databases/postgresql10-server/files/patch-src_backend_utils_misc_ps__status.c @@ -0,0 +1,41 @@ +--- src/backend/utils/misc/ps_status.c.orig 2018-05-07 20:51:40 UTC ++++ src/backend/utils/misc/ps_status.c +@@ -38,6 +38,9 @@ bool update_process_title = true; + /* + * Alternative ways of updating ps display: + * ++ * PS_USE_SETPROCTITLE_FAST ++ * use the function setproctitle_fast(const char *, ...) ++ * (newer FreeBSD systems) + * PS_USE_SETPROCTITLE + * use the function setproctitle(const char *, ...) + * (newer BSD systems) +@@ -59,7 +62,9 @@ bool update_process_title = true; + * don't update ps display + * (This is the default, as it is safest.) + */ +-#if defined(HAVE_SETPROCTITLE) ++#if defined(HAVE_SETPROCTITLE_FAST) ++#define PS_USE_SETPROCTITLE_FAST ++#elif defined(HAVE_SETPROCTITLE) + #define PS_USE_SETPROCTITLE + #elif defined(HAVE_PSTAT) && defined(PSTAT_SETCMD) + #define PS_USE_PSTAT +@@ -286,7 +291,7 @@ init_ps_display(const char *username, const char *dbna + * Make fixed prefix of ps display. + */ + +-#ifdef PS_USE_SETPROCTITLE ++#if defined(PS_USE_SETPROCTITLE) || defined(PS_USE_SETPROCTITLE_FAST) + + /* + * apparently setproctitle() already adds a `progname:' prefix to the ps +@@ -349,6 +354,8 @@ set_ps_display(const char *activity, bool force) + + #ifdef PS_USE_SETPROCTITLE + setproctitle("%s", ps_buffer); ++#elif defined(PS_USE_SETPROCTITLE_FAST) ++ setproctitle_fast("%s", ps_buffer); + #endif + + #ifdef PS_USE_PSTAT Index: databases/postgresql10-server/files/patch-src_include_pg__config.h.in =================================================================== --- /dev/null +++ databases/postgresql10-server/files/patch-src_include_pg__config.h.in @@ -0,0 +1,12 @@ +--- src/include/pg_config.h.in.orig 2018-05-07 20:51:40 UTC ++++ src/include/pg_config.h.in +@@ -457,6 +457,9 @@ + /* Define to 1 if you have the `setproctitle' function. */ + #undef HAVE_SETPROCTITLE + ++/* Define to 1 if you have the `setproctitle_fast' function. */ ++#undef HAVE_SETPROCTITLE_FAST ++ + /* Define to 1 if you have the `setsid' function. */ + #undef HAVE_SETSID + Index: databases/postgresql95-server/files/patch-configure =================================================================== --- /dev/null +++ databases/postgresql95-server/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2018-05-07 20:55:28 UTC ++++ configure +@@ -11669,7 +11669,7 @@ fi + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l ++for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" Index: databases/postgresql95-server/files/patch-configure.in =================================================================== --- /dev/null +++ databases/postgresql95-server/files/patch-configure.in @@ -0,0 +1,11 @@ +--- configure.in.orig 2018-05-07 20:55:28 UTC ++++ configure.in +@@ -1343,7 +1343,7 @@ PGAC_FUNC_WCSTOMBS_L + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) ++AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) + + AC_REPLACE_FUNCS(fseeko) + case $host_os in Index: databases/postgresql95-server/files/patch-src_backend_utils_misc_ps__status.c =================================================================== --- /dev/null +++ databases/postgresql95-server/files/patch-src_backend_utils_misc_ps__status.c @@ -0,0 +1,41 @@ +--- src/backend/utils/misc/ps_status.c.orig 2018-05-07 20:55:28 UTC ++++ src/backend/utils/misc/ps_status.c +@@ -38,6 +38,9 @@ bool update_process_title = true; + /* + * Alternative ways of updating ps display: + * ++ * PS_USE_SETPROCTITLE_FAST ++ * use the function setproctitle_fast(const char *, ...) ++ * (newer FreeBSD systems) + * PS_USE_SETPROCTITLE + * use the function setproctitle(const char *, ...) + * (newer BSD systems) +@@ -59,7 +62,9 @@ bool update_process_title = true; + * don't update ps display + * (This is the default, as it is safest.) + */ +-#if defined(HAVE_SETPROCTITLE) ++#if defined(HAVE_SETPROCTITLE_FAST) ++#define PS_USE_SETPROCTITLE_FAST ++#elif defined(HAVE_SETPROCTITLE) + #define PS_USE_SETPROCTITLE + #elif defined(HAVE_PSTAT) && defined(PSTAT_SETCMD) + #define PS_USE_PSTAT +@@ -259,7 +264,7 @@ init_ps_display(const char *username, const char *dbna + * Make fixed prefix of ps display. + */ + +-#ifdef PS_USE_SETPROCTITLE ++#if defined(PS_USE_SETPROCTITLE) || defined(PS_USE_SETPROCTITLE_FAST) + + /* + * apparently setproctitle() already adds a `progname:' prefix to the ps +@@ -322,6 +327,8 @@ set_ps_display(const char *activity, bool force) + + #ifdef PS_USE_SETPROCTITLE + setproctitle("%s", ps_buffer); ++#elif defined(PS_USE_SETPROCTITLE_FAST) ++ setproctitle_fast("%s", ps_buffer); + #endif + + #ifdef PS_USE_PSTAT Index: databases/postgresql95-server/files/patch-src_include_pg__config.h.in =================================================================== --- /dev/null +++ databases/postgresql95-server/files/patch-src_include_pg__config.h.in @@ -0,0 +1,12 @@ +--- src/include/pg_config.h.in.orig 2018-05-07 20:55:28 UTC ++++ src/include/pg_config.h.in +@@ -454,6 +454,9 @@ + /* Define to 1 if you have the `setproctitle' function. */ + #undef HAVE_SETPROCTITLE + ++/* Define to 1 if you have the `setproctitle_fast' function. */ ++#undef HAVE_SETPROCTITLE_FAST ++ + /* Define to 1 if you have the `setsid' function. */ + #undef HAVE_SETSID + Index: databases/postgresql96-server/files/patch-configure =================================================================== --- /dev/null +++ databases/postgresql96-server/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2018-05-07 20:53:38 UTC ++++ configure +@@ -12524,7 +12524,7 @@ fi + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l ++for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" Index: databases/postgresql96-server/files/patch-configure.in =================================================================== --- /dev/null +++ databases/postgresql96-server/files/patch-configure.in @@ -0,0 +1,11 @@ +--- configure.in.orig 2018-05-07 20:53:38 UTC ++++ configure.in +@@ -1463,7 +1463,7 @@ PGAC_FUNC_WCSTOMBS_L + LIBS_including_readline="$LIBS" + LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` + +-AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) ++AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l]) + + AC_REPLACE_FUNCS(fseeko) + case $host_os in Index: databases/postgresql96-server/files/patch-src_backend_utils_misc_ps__status.c =================================================================== --- /dev/null +++ databases/postgresql96-server/files/patch-src_backend_utils_misc_ps__status.c @@ -0,0 +1,41 @@ +--- src/backend/utils/misc/ps_status.c.orig 2018-05-07 20:53:38 UTC ++++ src/backend/utils/misc/ps_status.c +@@ -38,6 +38,9 @@ bool update_process_title = true; + /* + * Alternative ways of updating ps display: + * ++ * PS_USE_SETPROCTITLE_FAST ++ * use the function setproctitle_fast(const char *, ...) ++ * (newer FreeBSD systems) + * PS_USE_SETPROCTITLE + * use the function setproctitle(const char *, ...) + * (newer BSD systems) +@@ -59,7 +62,9 @@ bool update_process_title = true; + * don't update ps display + * (This is the default, as it is safest.) + */ +-#if defined(HAVE_SETPROCTITLE) ++#if defined(HAVE_SETPROCTITLE_FAST) ++#define PS_USE_SETPROCTITLE_FAST ++#elif defined(HAVE_SETPROCTITLE) + #define PS_USE_SETPROCTITLE + #elif defined(HAVE_PSTAT) && defined(PSTAT_SETCMD) + #define PS_USE_PSTAT +@@ -259,7 +264,7 @@ init_ps_display(const char *username, const char *dbna + * Make fixed prefix of ps display. + */ + +-#ifdef PS_USE_SETPROCTITLE ++#if defined(PS_USE_SETPROCTITLE) || defined(PS_USE_SETPROCTITLE_FAST) + + /* + * apparently setproctitle() already adds a `progname:' prefix to the ps +@@ -322,6 +327,8 @@ set_ps_display(const char *activity, bool force) + + #ifdef PS_USE_SETPROCTITLE + setproctitle("%s", ps_buffer); ++#elif defined(PS_USE_SETPROCTITLE_FAST) ++ setproctitle_fast("%s", ps_buffer); + #endif + + #ifdef PS_USE_PSTAT Index: databases/postgresql96-server/files/patch-src_include_pg__config.h.in =================================================================== --- /dev/null +++ databases/postgresql96-server/files/patch-src_include_pg__config.h.in @@ -0,0 +1,12 @@ +--- src/include/pg_config.h.in.orig 2018-05-07 20:53:38 UTC ++++ src/include/pg_config.h.in +@@ -457,6 +457,9 @@ + /* Define to 1 if you have the `setproctitle' function. */ + #undef HAVE_SETPROCTITLE + ++/* Define to 1 if you have the `setproctitle_fast' function. */ ++#undef HAVE_SETPROCTITLE_FAST ++ + /* Define to 1 if you have the `setsid' function. */ + #undef HAVE_SETSID +