diff options
Diffstat (limited to 'waitlib')
| -rw-r--r-- | waitlib/configure.ac | 22 | ||||
| -rw-r--r-- | waitlib/confwait.c | 6 | ||||
| -rw-r--r-- | waitlib/testwait.c | 5 | ||||
| -rw-r--r-- | waitlib/waitlib.c | 8 | ||||
| -rw-r--r-- | waitlib/waitlib.h | 6 | ||||
| -rw-r--r-- | waitlib/waitlib2.c | 8 |
6 files changed, 20 insertions, 35 deletions
diff --git a/waitlib/configure.ac b/waitlib/configure.ac index d475dee..7e94c50 100644 --- a/waitlib/configure.ac +++ b/waitlib/configure.ac @@ -3,7 +3,7 @@ dnl dnl Copyright 1998 - 2002 Double Precision, Inc. See COPYING for dnl distribution information. -AC_INIT(waitlib, 0.50, [courier-users@lists.sourceforge.net]) +AC_INIT([waitlib],[0.50],[courier-users@lists.sourceforge.net]) >confdefs.h # Kill PACKAGE_ macros @@ -18,8 +18,7 @@ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_CC -AC_PROG_CC_C99 -AC_PROG_LIBTOOL +LT_INIT dnl Checks for libraries. @@ -31,7 +30,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T dnl Checks for library functions. -AC_TYPE_SIGNAL + AC_SYS_LARGEFILE AC_CHECK_FUNCS(wait wait3 sigblock sighold sigprocmask) @@ -50,12 +49,10 @@ wait3) "") AC_CACHE_CHECK([if wait function is broken],waitlib_cv_SYS_WAITBROKEN, - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include "confdefs.h" #include "$srcdir/confwait.c" - ], waitlib_cv_SYS_WAITBROKEN=no, - waitlib_cv_SYS_WAITBROKEN=yes, - AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling))) + ]])],[waitlib_cv_SYS_WAITBROKEN=no],[waitlib_cv_SYS_WAITBROKEN=yes],[AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)])) has_xsig=no; if test "$ac_cv_func_sigblock" = "yes" @@ -70,13 +67,11 @@ wait3) if test "$waitlib_cv_SYS_WAITBROKEN$has_xsig$ac_cv_func_wait3" = "yesyesyes" then AC_CACHE_CHECK([if wait3 function is broken],waitlib_cv_SYS_WAIT3BROKEN, - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #define USE_WAIT3 1 #include "confdefs.h" #include "$srcdir/confwait.c" - ], waitlib_cv_SYS_WAIT3BROKEN=no, - waitlib_cv_SYS_WAIT3BROKEN=yes, - AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling))) + ]])],[waitlib_cv_SYS_WAIT3BROKEN=no],[waitlib_cv_SYS_WAIT3BROKEN=yes],[AC_MSG_ERROR(Must specify --with-waitfunc when cross-compiling)])) use_wait3=yes if test $waitlib_cv_SYS_WAIT3BROKEN = yes then @@ -106,4 +101,5 @@ then CFLAGS="-Wall $CFLAGS" fi -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/waitlib/confwait.c b/waitlib/confwait.c index 7bd4d2d..55127b3 100644 --- a/waitlib/confwait.c +++ b/waitlib/confwait.c @@ -35,15 +35,11 @@ static void cntreaped(pid_t p, int n) if ( ++numterminated == NUMPROCS ) _exit(0); } -static RETSIGTYPE childsig(int n) +static void childsig(int n) { n=n; wait_reap(cntreaped, childsig); - -#if RETSIGTYPE != void - return (0); -#endif } int main() diff --git a/waitlib/testwait.c b/waitlib/testwait.c index a720e49..bd952be 100644 --- a/waitlib/testwait.c +++ b/waitlib/testwait.c @@ -26,12 +26,9 @@ static void reap_child(pid_t p, int dummy) ; /* shut up gcc */ } -static RETSIGTYPE sighandler(int sig) +static void sighandler(int sig) { wait_reap(&reap_child, &sighandler); -#if RETSIGTYPE != void - return (0); -#endif } static pid_t start_child() diff --git a/waitlib/waitlib.c b/waitlib/waitlib.c index 9a5a2e1..643c391 100644 --- a/waitlib/waitlib.c +++ b/waitlib/waitlib.c @@ -43,7 +43,7 @@ void wait_block() HOLD_CHILDREN; } -void wait_clear(RETSIGTYPE (*func)(int)) +void wait_clear(void (*func)(int)) { RELEASE_CHILDREN; } @@ -61,7 +61,7 @@ void wait_block() signal(SIGCHLD, SIG_DFL); } -void wait_clear(RETSIGTYPE (*func)(int)) +void wait_clear(void (*func)(int)) { signal(SIGCHLD, func); } @@ -73,7 +73,7 @@ void wait_restore() #endif -void wait_reap( void (*func)(pid_t, int), RETSIGTYPE (*handler)(int)) +void wait_reap( void (*func)(pid_t, int), void (*handler)(int)) { int dummy; pid_t p; @@ -98,7 +98,7 @@ pid_t p; } -void wait_forchild( void (*reap)(pid_t, int), RETSIGTYPE (*func)(int)) +void wait_forchild( void (*reap)(pid_t, int), void (*func)(int)) { pid_t p; int wait_stat; diff --git a/waitlib/waitlib.h b/waitlib/waitlib.h index 7d36287..163a6e5 100644 --- a/waitlib/waitlib.h +++ b/waitlib/waitlib.h @@ -32,7 +32,7 @@ */ void wait_reap( void (*)(pid_t, int), /* Called to process reaped child */ - RETSIGTYPE (*)(int)); /* Should point back to signal handler */ + void (*)(int)); /* Should point back to signal handler */ /* ** Main program can call wait_block and wait_clear to temporarily @@ -40,7 +40,7 @@ void wait_reap( void (*)(pid_t, int), /* Called to process reaped child */ */ void wait_block(); -void wait_clear(RETSIGTYPE (*)(int)); /* The signal handler */ +void wait_clear(void (*)(int)); /* The signal handler */ /* ** wait_restore should be called instead of signal(SIGCHLD, SIG_DFL) @@ -60,7 +60,7 @@ void wait_restore(); */ void wait_forchild( void (*)(pid_t, int), /* Reaper */ - RETSIGTYPE (*)(int)); /* Signal handler stub */ + void (*)(int)); /* Signal handler stub */ /* ** wait_startchildren() is a convenient function to start a given number diff --git a/waitlib/waitlib2.c b/waitlib/waitlib2.c index 52dfc26..a98bd9c 100644 --- a/waitlib/waitlib2.c +++ b/waitlib/waitlib2.c @@ -20,17 +20,13 @@ static void start_reaper(pid_t pid, int exit_stat) { } -static RETSIGTYPE start_reap(int signum) +static void start_reap(int signum) { wait_reap(start_reaper, start_reap); - -#if RETSIGTYPE != void - return (0); -#endif } void wait_forchild( void (*)(pid_t, int), /* Reaper */ - RETSIGTYPE (*)(int)); /* Signal handler stub */ + void (*)(int)); /* Signal handler stub */ int wait_startchildren(unsigned nchildren, pid_t **pidptr) { |
