From f27321a1d63186b905755013389212762bf47f7f Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 29 Sep 1996 23:40:23 +0000 Subject: [PATCH] add more #ifdef before #include-ing git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@805 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/common/glob.c | 12 ++++++++++++ appl/ftp/ftp/extern.h | 2 ++ appl/ftp/ftp/ftp_locl.h | 30 ++++++++++++++++++++++++++++++ appl/ftp/ftp/ftp_var.h | 2 ++ appl/ftp/ftpd/auth.c | 4 ++++ appl/ftp/ftpd/extern.h | 6 ++++++ appl/ftp/ftpd/ftpd.c | 34 ++++++++++++++++++++++++++++++++++ lib/roken/glob.c | 12 ++++++++++++ 8 files changed, 102 insertions(+) diff --git a/appl/ftp/common/glob.c b/appl/ftp/common/glob.c index 1b4d51585..3f995373d 100644 --- a/appl/ftp/common/glob.c +++ b/appl/ftp/common/glob.c @@ -65,18 +65,30 @@ #include #endif +#ifdef HAVE_SYS_PARAM_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif #include +#ifdef HAVE_DIRENT_H #include +#endif #include +#ifdef HAVE_PWD_H #include +#endif #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include "glob.h" #include "roken.h" diff --git a/appl/ftp/ftp/extern.h b/appl/ftp/ftp/extern.h index 77df927bf..51dd40308 100644 --- a/appl/ftp/ftp/extern.h +++ b/appl/ftp/ftp/extern.h @@ -39,7 +39,9 @@ #include #include +#ifdef HAVE_SYS_TIME_H #include +#endif #ifdef HAVE_SYS_SELECT_H #include #endif diff --git a/appl/ftp/ftp/ftp_locl.h b/appl/ftp/ftp/ftp_locl.h index 74a7e4531..da0082bd8 100644 --- a/appl/ftp/ftp/ftp_locl.h +++ b/appl/ftp/ftp/ftp_locl.h @@ -10,37 +10,67 @@ #include #include +#ifdef HAVE_PWD_H #include +#endif #include #include #include #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif +#ifdef HAVE_SYS_PARAM_H #include +#endif +#ifdef HAVE_SYS_TIME_H #include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif +#ifdef HAVE_SYS_WAIT_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H #include +#endif +#ifdef HAVE_NETINET_IP_H #include +#endif +#ifdef HAVE_ARPA_FTP_H #include +#endif +#ifdef HAVE_ARPA_INET_H #include +#endif +#ifdef HAVE_ARPA_TELNET_H #include +#endif #include #include #include +#ifdef HAVE_NETDB_H #include +#endif #ifdef HAVE_SYS_MMAN_H #include diff --git a/appl/ftp/ftp/ftp_var.h b/appl/ftp/ftp/ftp_var.h index 4ceada0cb..621bc3d64 100644 --- a/appl/ftp/ftp/ftp_var.h +++ b/appl/ftp/ftp/ftp_var.h @@ -39,7 +39,9 @@ * FTP global variables. */ +#ifdef HAVE_SYS_PARAM_H #include +#endif #include /* diff --git a/appl/ftp/ftpd/auth.c b/appl/ftp/ftpd/auth.c index 495b0d433..0243c83a1 100644 --- a/appl/ftp/ftpd/auth.c +++ b/appl/ftp/ftpd/auth.c @@ -3,8 +3,12 @@ RCSID("$Id$"); #endif +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_IOCTL_H #include +#endif #include #include diff --git a/appl/ftp/ftpd/extern.h b/appl/ftp/ftpd/extern.h index 4c609ca02..cb6629fe9 100644 --- a/appl/ftp/ftpd/extern.h +++ b/appl/ftp/ftpd/extern.h @@ -38,13 +38,19 @@ #ifndef _EXTERN_H_ #define _EXTERN_H_ +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_NETDB_H #include +#endif #include #include #include +#ifdef HAVE_PWD_H #include +#endif void blkfree(char **); char **copyblk(char **); diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index 50740ec21..712e903d0 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -41,19 +41,37 @@ RCSID("$Id$"); /* * FTP server. */ +#ifdef HAVE_SYS_PARAM_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif +#ifdef HAVE_SYS_IOCTL_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_SYS_TIME_H #include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif +#ifdef HAVE_SYS_WAIT_H #include +#endif +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H #include +#endif +#ifdef HAVE_NETINET_IP_H #include +#endif #ifdef HAVE_SYS_MMAN_H #include @@ -61,25 +79,41 @@ RCSID("$Id$"); #define FTP_NAMES #include +#ifdef HAVE_ARPA_INET_H #include +#endif +#ifdef HAVE_ARPA_TELNET_H #include +#endif #include +#ifdef HAVE_DIRENT_H #include +#endif #include +#ifdef HAVE_FCNTL_H #include +#endif #include #include +#ifdef HAVE_PWD_H #include +#endif #include #include #include #include #include +#ifdef HAVE_SYSLOG_H #include +#endif #include +#ifdef HAVE_UNISTD_H #include +#endif +#ifdef HAVE_GRP_H #include +#endif #include diff --git a/lib/roken/glob.c b/lib/roken/glob.c index 1b4d51585..3f995373d 100644 --- a/lib/roken/glob.c +++ b/lib/roken/glob.c @@ -65,18 +65,30 @@ #include #endif +#ifdef HAVE_SYS_PARAM_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif #include +#ifdef HAVE_DIRENT_H #include +#endif #include +#ifdef HAVE_PWD_H #include +#endif #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include "glob.h" #include "roken.h"