]> git.sesse.net Git - betaftpd/commitdiff
New files.
authorsgunderson <sgunderson>
Sun, 17 Sep 2000 00:59:57 +0000 (00:59 +0000)
committersgunderson <sgunderson>
Sun, 17 Sep 2000 00:59:57 +0000 (00:59 +0000)
dcache.c
dcache.h

index bd0fcd70b229e1166c5392c92f909de23be15601..ddf5cab37a30662e043695e2c15e35cf7fd6fa61 100644 (file)
--- a/dcache.c
+++ b/dcache.c
 #include <config.h>
 #endif
 
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
 
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -59,9 +35,8 @@
 #include <strings.h>
 #endif
 
-#include <ftpd.h>
-
 #if WANT_DCACHE
+#include <ftpd.h>
 #include <dcache.h>
 
 extern struct dcache *first_dcache;
index 1be01507ef832c701b14d28c9011046d4befd159..d45614bebcba9e8f010421c1c6c7770def33debc 100644 (file)
--- a/dcache.h
+++ b/dcache.h
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifndef _DCACHE_H
+#define _DCACHE_H 1
+
+#if HAVE_TIME_H
+#include <time.h>
+#endif
+
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <ftpd.h>
+
 /* doubly linked list of cached directory listings */
 struct dcache {
         struct dcache *prev_dcache;
@@ -36,3 +49,5 @@ struct dcache *alloc_new_dcache();
 void time_out_dcache();
 void populate_dcache(struct ftran * const f, const char * const cwd,
                     const char * const pattern, const struct list_options * const lo);
+
+#endif