diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index ef624e0430b21145253cc9953b00116b702ac0a4..47f127d939d82de326f895e77d35df8d7f27dbd8 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -325,10 +325,10 @@ wait4child( int sig ) if ( debug ) printf( "parent: catching child status\n" ); #ifdef HAVE_WAITPID - while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0) + while (waitpid ((pid_t) -1, (int *) NULL, WAIT_FLAGS) > 0) ; /* NULL */ #else - while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + while ( wait4((pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 ) ; /* NULL */ #endif diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index d2218f537b35a2d6b6d5d55c11cce9f296df7f60..4735947c0eb9337d6e86508af8456921ce3620da 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -352,10 +352,10 @@ wait4child( int sig ) if ( debug ) printf( "parent: catching child status\n" ); #ifdef HAVE_WAITPID - while (waitpid ((pid_t) -1, NULL, WAIT_FLAGS) > 0) + while (waitpid ((pid_t) -1, (int *) NULL, WAIT_FLAGS) > 0) ; /* NULL */ #else - while (wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + while (wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 ) ; /* NULL */ #endif diff --git a/configure b/configure index 7ca2ef80902185f906060ed482c1f2eac63ba118..6a39cb4249f29f1ad7e0321489ecd57f022e531b 100755 --- a/configure +++ b/configure @@ -8338,69 +8338,6 @@ done fi -echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:8343: checking for wait3 that fills in rusage" >&5 -if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_wait3_rusage=no -else - cat > conftest.$ac_ext <<EOF -#line 8351 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <stdio.h> -/* HP-UX has wait3 but does not fill in rusage at all. */ -main() { - struct rusage r; - int i; - /* Use a field that we can force nonzero -- - voluntary context switches. - For systems like NeXT and OSF/1 that don't set it, - also use the system CPU time. And page faults (I/O) for Linux. */ - r.ru_nvcsw = 0; - r.ru_stime.tv_sec = 0; - r.ru_stime.tv_usec = 0; - r.ru_majflt = r.ru_minflt = 0; - switch (fork()) { - case 0: /* Child. */ - sleep(1); /* Give up the CPU. */ - _exit(0); - case -1: _exit(0); /* What can we do? */ - default: /* Parent. */ - wait3(&i, 0, &r); - sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ - exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 - && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); - } -} -EOF -if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_func_wait3_rusage=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_wait3_rusage=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 -if test $ac_cv_func_wait3_rusage = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_WAIT3 1 -EOF - -fi - - for ac_func in \ bcopy \ flock \ @@ -8434,12 +8371,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8438: checking for $ac_func" >&5 +echo "configure:8375: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8443 "configure" +#line 8380 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8462,7 +8399,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8496,12 +8433,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8500: checking for $ac_func" >&5 +echo "configure:8437: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8505 "configure" +#line 8442 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8524,7 +8461,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8551,19 +8488,19 @@ done if test "$ac_cv_func_ctime_r" = yes ; then echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6 -echo "configure:8555: checking number of arguments of ctime_r" >&5 +echo "configure:8492: checking number of arguments of ctime_r" >&5 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8560 "configure" +#line 8497 "configure" #include "confdefs.h" #include <time.h> int main() { time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } EOF -if { (eval echo configure:8567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_func_ctime_r_nargs=3 else @@ -8575,7 +8512,7 @@ fi rm -f conftest* if test $ol_cv_func_ctime_r_nargs = 0 ; then cat > conftest.$ac_ext <<EOF -#line 8579 "configure" +#line 8516 "configure" #include "confdefs.h" #include <time.h> int main() { @@ -8583,7 +8520,7 @@ time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } EOF -if { (eval echo configure:8587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_func_ctime_r_nargs=2 else @@ -8632,12 +8569,12 @@ fi for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8636: checking for $ac_func" >&5 +echo "configure:8573: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8641 "configure" +#line 8578 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8660,7 +8597,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:8664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8690,13 +8627,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:8694: checking declaration of sys_errlist" >&5 +echo "configure:8631: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8700 "configure" +#line 8637 "configure" #include "confdefs.h" #include <stdio.h> @@ -8706,7 +8643,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:8710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -8727,20 +8664,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:8731: checking existence of sys_errlist" >&5 +echo "configure:8668: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8737 "configure" +#line 8674 "configure" #include "confdefs.h" #include <errno.h> int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index d1dad6f652f6a86acc22e95d39e0215901140922..66504d6e58543b52d9e27cd0d904a32c9c6167fa 100644 --- a/configure.in +++ b/configure.in @@ -1278,8 +1278,6 @@ if test $ac_cv_func_vprintf = yes ; then AC_CHECK_FUNCS(vsnprintf vsprintf) fi -AC_FUNC_WAIT3 - AC_CHECK_FUNCS( \ bcopy \ flock \ diff --git a/include/portable.h.in b/include/portable.h.in index 696ded0c027a14e93ecb8e21f96f91d74a58cdec..1732e0f7b95b359250179cdc30bdedfabdbbe268 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -47,9 +47,6 @@ /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF -/* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 - /* Define if on MINIX. */ #undef _MINIX diff --git a/servers/ldapd/main.c b/servers/ldapd/main.c index 354214609139d198513aca0adfdd1252c0d287c4..85f9b5d71f46cf53c34b1557c7a4a673a909ef4f 100644 --- a/servers/ldapd/main.c +++ b/servers/ldapd/main.c @@ -653,10 +653,10 @@ wait4child( int sig ) Debug( LDAP_DEBUG_TRACE, "parent: catching child status\n", 0, 0, 0 ); #ifdef HAVE_WAITPID - while( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) > 0 ) + while( waitpid( (pid_t) -1, (int *) NULL, WAIT_FLAGS ) > 0 ) ; /* NULL */ #else - while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 ) + while ( wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) > 0 ) ; /* NULL */ #endif diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index 598e4a11c46b5c3bc510536ee6b59e33b6eac70d..31d43491aeda49bfcc6f4dfb0567c9fd2ae034bb 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -537,7 +537,7 @@ edit_entry( char c, Datum *data ) #ifdef HAVE_WAITPID if ( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) < 0 ) { #else - if ( wait3( &status, WAIT_FLAGS, 0 ) < 0 ) { + if ( wait4( (pid_t) -1, &status, WAIT_FLAGS, 0 ) < 0 ) { #endif perror( "wait" ); return;