]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make "common" no longer depend on or.h
authorNick Mathewson <nickm@torproject.org>
Sat, 3 Apr 2004 04:05:12 +0000 (04:05 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 3 Apr 2004 04:05:12 +0000 (04:05 +0000)
svn:r1466

src/common/crypto.c
src/common/fakepoll.c
src/common/log.c
src/common/tortls.c
src/common/util.c
src/common/util.h
src/or/dirserv.c
src/or/or.h

index 74f75bde32c717187c766c74b9d678e80002c863..a666d4abe2c9cd77f6558cca51737fee2be56ca3 100644 (file)
@@ -2,7 +2,7 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
-#include "../or/or.h"
+#include "orconfig.h"
 
 #include <string.h>
 
 #include <stdio.h>
 #include <limits.h>
 
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+
 #include "crypto.h"
 #include "log.h"
 #include "aes.h"
+#include "util.h"
 
 #ifdef MS_WINDOWS
 #include <wincrypt.h>
index 2f91c1b45f81ef426827352f25de24042f6aa74e..b60514a254f70cd0ce8f6f64fcd4995b2e3b5f1c 100644 (file)
@@ -15,6 +15,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 #if _MSC_VER > 1300
 #include <winsock2.h>
 #include <ws2tcpip.h>
index 4245fca5c547ee564bdaca1aea3f8ce13a4aa834..5e52cfff444f9b43352bc3878648365a71b646cb 100644 (file)
@@ -2,8 +2,13 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
-#include "../or/or.h"
 #include <stdarg.h>
+#include <assert.h>
+#include <stdlib.h>
+#include "orconfig.h"
+#include "./util.h"
+#include "./log.h"
+
 
 #ifdef MS_WINDOWS
 #define vsnprintf _vsnprintf
index b3957b857121125667f1e72722ab209b3d0fcc79..956692b833daf4544f77216d566cca17a1d04ea1 100644 (file)
@@ -11,6 +11,7 @@
 #include "./tortls.h"
 #include "./util.h"
 #include "./log.h"
+#include <string.h>
 
 /* Copied from or.h */
 #define LEGAL_NICKNAME_CHARACTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
index 7a9301efb0ec953586f2e5b17754f1aab1a3cd25..050340f18320cd6eab2c77b1770e63e485b19862 100644 (file)
@@ -2,12 +2,52 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
-#include "../or/or.h"
+#include "orconfig.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "util.h"
+#include "log.h"
+#include "crypto.h"
 #include "../or/tree.h"
 
 #ifdef HAVE_UNAME
 #include <sys/utsname.h>
 #endif
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h> /* Must be included before sys/stat.h for Ultrix */
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
+#endif
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
 
 /* used by inet_addr, not defined on solaris anywhere!? */
 #ifndef INADDR_NONE
index ceed257928745e3a2dda607d53af1b5a567f43ea..29689e64bbc9eed7750b356bdc82f50a2b1431f3 100644 (file)
@@ -5,7 +5,12 @@
 #ifndef __UTIL_H
 #define __UTIL_H
 
-#include "../or/or.h"
+#include "orconfig.h"
+#include "torint.h"
+#include <stdio.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 
 #if _MSC_VER > 1300
 #include <winsock2.h>
@@ -32,6 +37,9 @@
 #define INLINE inline
 #endif
 
+/* legal characters in a filename */
+#define CONFIG_LEGAL_FILENAME_CHARACTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_/"
+
 size_t strlcat(char *dst, const char *src, size_t siz);
 size_t strlcpy(char *dst, const char *src, size_t siz);
 
index 0f906d47af9e8d320c945ab6d9ba917a471c32a3..152c1c2f3d1190da7b080bde40e820bc1e06d89e 100644 (file)
@@ -494,3 +494,10 @@ size_t dirserv_get_directory(const char **directory)
   return the_directory_len;
 }
 
+/*
+  Local Variables:
+  mode:c
+  indent-tabs-mode:nil
+  c-basic-offset:2
+  End:
+*/
index 0a8ecd46cc15bc6fad11053571972f9fdca82909..692c155a00a88873e415141ed12da0563769dca4 100644 (file)
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
 #ifdef HAVE_WINSOCK_H
 #include <winsock.h>
 #endif
 #define CELL_RELAY 3
 #define CELL_DESTROY 4
 
-/* legal characters in a filename */
-#define CONFIG_LEGAL_FILENAME_CHARACTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_/"
 /* legal characters in a nickname */
 #define LEGAL_NICKNAME_CHARACTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"