Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bcafeb

Browse files
committed
test for presence of stddef.h
separate arg requirements for getpgrp() and setpgrp()
1 parent 9041279 commit 2bcafeb

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

acconfig.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
/* Define to `long' if <time.h> doesn't define. */
1313
#undef clock_t
1414

15-
/* Define if getpgrp() must be called as getpgrp(0)
16-
and (consequently) setpgrp() as setpgrp(0, 0). */
15+
/* Define if getpgrp() must be called as getpgrp(0). */
1716
#undef GETPGRP_HAVE_ARG
1817

18+
/* Define if setpgrp() must be called as setpgrp(0, 0). */
19+
#undef SETPGRP_HAVE_ARG
20+
1921
/* Define this if your time.h defines altzone */
2022
#undef HAVE_ALTZONE
2123

config.h.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@
9090
/* Define to `long' if <time.h> doesn't define. */
9191
#undef clock_t
9292

93-
/* Define if getpgrp() must be called as getpgrp(0)
94-
and (consequently) setpgrp() as setpgrp(0, 0). */
93+
/* Define if getpgrp() must be called as getpgrp(0). */
9594
#undef GETPGRP_HAVE_ARG
9695

96+
/* Define if setpgrp() must be called as setpgrp(0, 0). */
97+
#undef SETPGRP_HAVE_ARG
98+
9799
/* Define this if your time.h defines altzone */
98100
#undef HAVE_ALTZONE
99101

@@ -237,6 +239,9 @@
237239
/* Define if you have the <stdarg.h> header file. */
238240
#undef HAVE_STDARG_H
239241

242+
/* Define if you have the <stddef.h> header file. */
243+
#undef HAVE_STDDEF_H
244+
240245
/* Define if you have the <stdlib.h> header file. */
241246
#undef HAVE_STDLIB_H
242247

configure.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ main() { exit(0); }
4646

4747
# checks for header files
4848
AC_STDC_HEADERS
49-
AC_HAVE_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h)
49+
AC_HAVE_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h)
5050
AC_DIR_HEADER
5151

5252
# checks for typedefs
@@ -196,6 +196,7 @@ LIBS="$LIBS -ldl -ldld"])
196196
AC_HAVE_FUNCS(chown clock dlopen ftime gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid)
197197
AC_REPLACE_FUNCS(dup2 getcwd strerror memmove)
198198
AC_FUNC_CHECK(getpgrp, AC_COMPILE_CHECK([argument to getpgrp], [#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
199+
+ AC_FUNC_CHECK(setpgrp, AC_COMPILE_CHECK([arguments to setpgrp], [#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))
199200

200201
# checks for structures
201202
AC_TIME_WITH_SYS_TIME

0 commit comments

Comments
 (0)