]> git.sesse.net Git - betaftpd/commitdiff
All header files should now be self-contained (ie. you shouldn't need to do any syste...
authorsgunderson <sgunderson>
Sun, 17 Sep 2000 01:01:29 +0000 (01:01 +0000)
committersgunderson <sgunderson>
Sun, 17 Sep 2000 01:01:29 +0000 (01:01 +0000)
ascii.h
cmds.h
ftpd.h
nonroot.h

diff --git a/ascii.h b/ascii.h
index 7b2519c1dbc837f28742f3ee9adda07b15638640..df6696e73309331763b9e1c9aea96fbb684954a8 100644 (file)
--- a/ascii.h
+++ b/ascii.h
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifndef _ASCII_H
+#define _ASCII_H 1
+
 int ascii_findlength(const char * const buffer, const int tranlen);
 int ascii_downloadfilter(const char * const buffer, char * const outbuffer, const int length);
 int ascii_uploadfilter(char * const buffer, const int length);
+
+#endif
diff --git a/cmds.h b/cmds.h
index 88b04d19fc6e6b5fd63a69d87ec16d97eb898f47..659524da7c14ef72ca005cc76ba0cb7c57d0d21f 100644 (file)
--- a/cmds.h
+++ b/cmds.h
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifndef _CMDS_H
+#define _CMDS_H 1
+
+#include <ftpd.h>
+
 /*
  * TRAP_ERROR: This is a quick way of doing a test for an error condition.
  *             if an error occurs (or more precisely, if the value supplied is
@@ -127,3 +132,5 @@ char *do_pwd(struct conn * const c, char * const retbuf, const char * const dir)
 #define POLLIN         0x001
 #define POLLOUT                0x004
 #endif
+
+#endif
diff --git a/ftpd.h b/ftpd.h
index 086df8a50780adc26c5ce6d2a8e0e98fa2abd94b..11bb81a74ecf169e303951254d39de37cb553154 100644 (file)
--- a/ftpd.h
+++ b/ftpd.h
@@ -15,6 +15,9 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifndef _FTPD_H
+#define _FTPD_H 1
+
 /*
  * This is the port you want BetaFTPD to listen on. The standard
  * FTP port is 21 -- if you really want to use BetaFTPD as your
  */
 #define MAX_BLOCK_SIZE 4096
 
+#if HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #if HAVE_LINUX_SENDFILE && !HAVE_MMAP
 #warning sendfile() without mmap() is not supported -- disabling sendfile()
 #undef HAVE_LINUX_SENDFILE
@@ -206,3 +225,4 @@ void dump_file(struct conn * const c, const int num, const char * const filename
 void list_readmes(struct conn * const c);
 #endif
 
+#endif
index fd2308468eb0f81048c2b542e18f8687f17a08ef..c8d697c123693536f134aa0a8c7828437d379a04 100644 (file)
--- a/nonroot.h
+++ b/nonroot.h
@@ -15,6 +15,9 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifndef _NONROOT_H
+#define _NONROOT_H 1
+
 int nr_userinfo(const char * const username, int * const uid,
                 char * const homedir, char * const rootdir,
                 const char * const password);
@@ -28,3 +31,4 @@ int member_of_group(const uid_t uid, const gid_t gid);
 char *nr_get_uname(const uid_t uid);
 char *nr_get_gname(const gid_t gid);
 
+#endif