AC_CHECK_FUNCS defines HAVE_SETPROCTITLE The replaced code made an incorrect assumption that it was only availble on BSD-like systems.
Signed-off-by: Gaetan Nadon <[email protected]> --- choose.c | 2 +- configure.ac | 12 +----------- dm.c | 2 +- dm.h | 2 +- session.c | 2 +- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/choose.c b/choose.c index 1e61047..c4cda8a 100644 --- a/choose.c +++ b/choose.c @@ -516,7 +516,7 @@ RunChooser (struct display *d) char **env; Debug ("RunChooser %s\n", d->name); -# ifndef HAS_SETPROCTITLE +# ifndef HAVE_SETPROCTITLE SetTitle (d->name, "chooser", (char *) 0); # else setproctitle("chooser %s", d->name); diff --git a/configure.ac b/configure.ac index b190a68..127e53a 100644 --- a/configure.ac +++ b/configure.ac @@ -91,7 +91,7 @@ AC_TYPE_SIGNAL # # Required system libraries have been searched for and are listed in $LIBS #------------------------------------------------------------------------------ -AC_CHECK_FUNCS([daemon sigaction openlog asprintf]) +AC_CHECK_FUNCS([daemon sigaction openlog asprintf setproctitle]) #------------------------------------------------------------------------------ @@ -116,16 +116,6 @@ AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAS_GETIFADDRS,1, AC_CHECK_FUNC(getspnam, AC_DEFINE(USESHADOW,1, [Define to 1 if you have the shadow password functions.])) - -# According to the old Imakefile, FreeBSD has this in libutil -AC_CHECK_FUNC(setproctitle, [HAS_SETPROCTITLE="yes"], - AC_CHECK_LIB(util, setproctitle, - [HAS_SETPROCTITLE="yes" ; XDM_OS_LIBS="$XDM_OS_LIBS -lutil"])) -if test "x$HAS_SETPROCTITLE" = "xyes" ; then - AC_DEFINE(HAS_SETPROCTITLE,1, - [Define to 1 if you have the 'setproctitle' function.]) -fi - # According to the old Imakefile, BSD/OS has this in libutil AC_CHECK_FUNC(setusercontext, [HAS_SETUSERCONTEXT="yes"], AC_CHECK_LIB(util, setusercontext, diff --git a/dm.c b/dm.c index 7016daf..858a06e 100644 --- a/dm.c +++ b/dm.c @@ -1004,7 +1004,7 @@ UnlockPidFile (void) } #endif -#ifndef HAS_SETPROCTITLE +#ifndef HAVE_SETPROCTITLE void SetTitle (char *name, ...) { # ifndef NOXDMTITLE diff --git a/dm.h b/dm.h index af50328..502cbb9 100644 --- a/dm.h +++ b/dm.h @@ -378,7 +378,7 @@ extern void BecomeOrphan (void); extern void CloseOnFork (void); extern void RegisterCloseOnFork (int fd); extern void StartDisplay (struct display *d); -# ifndef HAS_SETPROCTITLE +# ifndef HAVE_SETPROCTITLE extern void SetTitle (char *name, ...); # endif diff --git a/session.c b/session.c index 5be3276..ad216d3 100644 --- a/session.c +++ b/session.c @@ -330,7 +330,7 @@ ManageSession (struct display *d) Debug ("ManageSession %s\n", d->name); (void)XSetIOErrorHandler(IOErrorHandler); (void)XSetErrorHandler(ErrorHandler); -#ifndef HAS_SETPROCTITLE +#ifndef HAVE_SETPROCTITLE SetTitle(d->name, (char *) 0); #else setproctitle("%s", d->name); -- 1.6.0.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
