strspn \
sysconf \
waitpid \
+ wait4 \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10110: checking for $ac_func" >&5
+echo "configure:10111: 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 10115 "configure"
+#line 10116 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in getopt tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10166: checking for $ac_func" >&5
+echo "configure:10167: 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 10171 "configure"
+#line 10172 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:10224: checking declaration of sys_errlist" >&5
+echo "configure:10225: 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 10230 "configure"
+#line 10231 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:10240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
else
EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:10260: checking existence of sys_errlist" >&5
+echo "configure:10261: 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 10266 "configure"
+#line 10267 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
-echo "configure:10297: checking strdup declaration" >&5
+echo "configure:10298: checking strdup declaration" >&5
if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10303 "configure"
+#line 10304 "configure"
#include "confdefs.h"
#include <string.h>
extern char *strdup();
; return 0; }
EOF
-if { (eval echo configure:10311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_strdup=yes
else
#include <stdio.h>
#include <stdlib.h>
-#include <ac/string.h>
#include <ac/ctype.h>
+#include <ac/dirent.h>
#include <ac/socket.h>
+#include <ac/string.h>
#include <ac/unistd.h>
#include <ac/wait.h>
-#include <dirent.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
#include "ldapconfig.h"
static void
fork_child( char *prog, char *args[] )
{
- int pid;
+ pid_t pid;
wait4kids( maxkids );
wait4kids( int nkidval )
{
int status;
- unsigned char *p;
while ( nkids >= nkidval ) {
wait( &status );
- p = (unsigned char *) &status;
- if ( p[sizeof(int) - 1] == 0177 ) {
+
+ if ( WIFSTOPPED(status) ) {
fprintf( stderr,
"stopping: child stopped with signal %d\n",
- p[sizeof(int) - 2] );
- } else if ( p[sizeof(int) - 1] != 0 ) {
+ (int) WSTOPSIG(status) );
+
+ } else if ( WIFSIGNALED(status) ) {
fprintf( stderr,
- "stopping: child terminated with signal %d\n",
- p[sizeof(int) - 1] );
- exit( p[sizeof(int) - 1] );
- } else if ( p[sizeof(int) - 2] != 0 ) {
+ "stopping: child terminated with signal %d%s\n",
+ (int) WTERMSIG(status),
+#ifdef WCOREDUMP
+ WCOREDUMP(status) ? ", core dumped" : ""
+#else
+ ""
+#endif
+ );
+ exit( WEXITSTATUS(status) );
+
+ } else if ( WEXITSTATUS(status) != 0 ) {
fprintf( stderr,
"stopping: child exited with status %d\n",
- p[sizeof(int) - 2] );
- exit( p[sizeof(int) - 2] );
+ (int) WEXITSTATUS(status) );
+ exit( WEXITSTATUS(status) );
+
} else {
nkids--;
}