On Tue, 22 Nov 2005, David Lee wrote:
"lib/clplumbing/setproctitle.c": In brief, I propose the attached patch, to
be added later this week, so that "PF_ARGV_TYPE == PF_ARGV_NONE" disables all
the code.
[...]
All-in-all, chasing setproctitle-equivalent functionality seems to be
diminishing returns. The current implementation causes damage on Solaris-8;
we ought to have "PF_ARGV_NONE" working (and doing so with intuitively "NONE"
impact) anyway.
If no adverse comments arise, I would propose applying that patch (to use
"PF_ARGV_NONE" value to compile minimally and correctly) sometime tomorrow
(UK time).
[...]
(Note that to drive this we'll need to modify "configure.in" so that value
"PF_ARGV_NONE" gets set: but that's another story...)
Attached is my proposed patch that sets "PF_ARGV_NONE" for Solaris. (As a
side effect, it also solves Bugzilla 967.) If no adverse comments arise,
I would propose applying it on Friday.
--
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: Durham University :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :
--- configure.in.orig Wed Nov 9 14:20:12 2005
+++ configure.in Wed Nov 23 14:52:28 2005
@@ -32,12 +32,23 @@
INIT_EXT=""
USE_MODULES=0
echo Our Host OS: $host_os/$host
+
+dnl This OS-based decision-making is poor autotools practice;
+dnl feature-based mechanisms are strongly preferred.
+dnl
+dnl So keep this section to a bare minimum; regard as a "necessary evil".
+
+pf_argv_set=""
case "$host_os" in
*bsd*) LIBS="-L/usr/local/lib"
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
INIT_EXT=".sh"
;;
+*solaris*)
+ pf_argv_set="PF_ARGV_NONE"
+ ;;
+
*linux*) USE_MODULES=1
;;
dnl anything?
@@ -1922,33 +1933,30 @@
ac_cv_func_setproctitle="yes" ; LIBS="$LIBS -lutil"])
if test "$ac_cv_func_setproctitle" = "yes"; then
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NONE, [ ])
-else
- pf_argv_set="no"
+ pf_argv_set="PF_ARGV_NONE"
+fi
+if test "$pf_argv_set" = ""; then
AC_CHECK_HEADERS(sys/pstat.h)
if test "$ac_cv_header_pstat_h" = "yes"; then
AC_CHECK_FUNCS(pstat)
if test "$ac_cv_func_pstat" = "yes"; then
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSTAT, [ ])
+ pf_argv_set="PF_ARGV_PSTAT"
else
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITABLE, [ ])
+ pf_argv_set="PF_ARGV_WRITEABLE"
fi
-
- pf_argv_set="yes"
fi
- if test "$pf_argv_set" = "no"; then
+ if test "$pf_argv_set" = ""; then
AC_EGREP_HEADER([#define.*PS_STRINGS.*],sys/exec.h,
have_psstrings="yes",have_psstrings="no")
if test "$have_psstrings" = "yes"; then
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSSTRINGS, [ ])
- pf_argv_set="yes"
+ pf_argv_set="PF_ARGV_PSSTRINGS"
fi
fi
- if test "$pf_argv_set" = "no"; then
+ if test "$pf_argv_set" = ""; then
AC_CACHE_CHECK(whether __progname and __progname_full are available,
pf_cv_var_progname,
AC_TRY_LINK([extern char *__progname, *__progname_full;],
@@ -1968,15 +1976,16 @@
],pf_cv_argv_type="new", pf_cv_argv_type="writeable"))
if test "$pf_cv_argv_type" = "new"; then
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NEW, [ ])
- pf_argv_set="yes"
+ pf_argv_set="PF_ARGV_NEW"
fi
- if test "$pf_argv_set" = "no"; then
- AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITEABLE, [ ])
+ if test "$pf_argv_set" = ""; then
+ pf_argv_set="PF_ARGV_WRITEABLE"
fi
fi
fi
+AC_DEFINE_UNQUOTED(PF_ARGV_TYPE, $pf_argv_set,
+ mechanism to pretty-print ps output: setproctitle-equivalent)
dnl End of tests borrowed from Proftpd
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/