diff --git a/aclocal.m4 b/aclocal.m4 index 54e13a7..15a4037 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -21,8 +21,10 @@ dnl for these particular functions.) dnl -------------------------------------------------------------------------- AC_DEFUN(PA_SIGSETJMP, [AC_MSG_CHECKING([for sigsetjmp]) - AC_TRY_LINK( - [#include ], + AC_TRY_LINK([ +#ifdef HAVE_SETJMP_H +#include +#endif], [sigjmp_buf buf; sigsetjmp(buf,1); siglongjmp(buf,2);], diff --git a/config.h b/config.h index b1c0238..187009b 100644 --- a/config.h +++ b/config.h @@ -70,7 +70,24 @@ #include #endif +#ifdef HAVE_SETJMP_H #include +#endif + +#ifdef TIME_WITH_SYS_TIME +#include +#include +#else +#if HAVE_SYS_TIME_H +#include +#else +#include +#endif +#endif + +#include +#include + #include /* If we don't have intmax_t, try creating it */ diff --git a/configure.in b/configure.in index a9fab1f..a502d02 100644 --- a/configure.in +++ b/configure.in @@ -58,16 +58,20 @@ AC_CHECK_HEADERS(stdint.h) PA_CHECK_INTTYPES_H_SANE AC_CHECK_HEADERS(libgen.h) AC_CHECK_HEADERS(memory.h) +AC_CHECK_HEADERS(setjmp.h) AC_CHECK_HEADERS(stddef.h) AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sysexits.h) +AC_CHECK_HEADERS(time.h) AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(sys/filio.h) AC_CHECK_HEADERS(sys/stat.h) +AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(arpa/inet.h) +AC_HEADER_TIME dnl This is needed on some versions of FreeBSD... AC_CHECK_HEADERS(machine/param.h) diff --git a/tftp/main.c b/tftp/main.c index 1b45005..478f3ba 100644 --- a/tftp/main.c +++ b/tftp/main.c @@ -51,23 +51,9 @@ static const char *rcsid UNUSED = /* * TFTP User Program -- Command Interface. */ -#include -#include #include - -#include - -#include - #include -#include #include -#include -#include -#include -#include -#include -#include #include #ifdef WITH_READLINE #include diff --git a/tftp/tftp.c b/tftp/tftp.c index 017767f..c199f8e 100644 --- a/tftp/tftp.c +++ b/tftp/tftp.c @@ -50,21 +50,6 @@ static const char *rcsid UNUSED = /* * TFTP User Program -- Protocol Machines */ -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - #include "extern.h" extern struct sockaddr_in peeraddr; /* filled in by main */ diff --git a/tftp/tftpsubs.c b/tftp/tftpsubs.c index c358ccd..3dd34bd 100644 --- a/tftp/tftpsubs.c +++ b/tftp/tftpsubs.c @@ -56,15 +56,7 @@ static const char *rcsid UNUSED = Jim Guyton 10/85 */ -#include -#include #include -#include -#include -#include -#include -#include -#include #define PKTSIZE MAX_SEGSIZE+4 /* should be moved to tftp.h */ diff --git a/tftpd/misc.c b/tftpd/misc.c index 62f2c07..d3c49cd 100644 --- a/tftpd/misc.c +++ b/tftpd/misc.c @@ -17,7 +17,6 @@ #include "config.h" /* Must be included first! */ #include -#include #include "tftpd.h" /* diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index dbfd13f..53f607d 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -54,28 +54,14 @@ static const char *rcsid UNUSED = * This version includes many modifications by Jim Guyton */ -#include #include -#include -#include #include #include - -#include -#include -#include #include - -#include -#include -#include -#include #include -#include -#include #include -#include #include +#include #include "tftpsubs.h" #include "recvfrom.h"