[or-cvs] Make "common" no longer depend on or.h

Nick Mathewson nickm at seul.org
Sat Apr 3 04:05:14 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv25766/src/common

Modified Files:
	crypto.c fakepoll.c log.c tortls.c util.c util.h 
Log Message:
Make "common" no longer depend on or.h

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- crypto.c	3 Apr 2004 02:43:09 -0000	1.68
+++ crypto.c	3 Apr 2004 04:05:11 -0000	1.69
@@ -2,7 +2,7 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
-#include "../or/or.h"
+#include "orconfig.h"
 
 #include <string.h>
 
@@ -22,9 +22,14 @@
 #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: fakepoll.c
===================================================================
RCS file: /home/or/cvsroot/src/common/fakepoll.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- fakepoll.c	12 Mar 2004 13:02:16 -0000	1.20
+++ fakepoll.c	3 Apr 2004 04:05:11 -0000	1.21
@@ -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: log.c
===================================================================
RCS file: /home/or/cvsroot/src/common/log.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- log.c	3 Apr 2004 02:40:29 -0000	1.35
+++ log.c	3 Apr 2004 04:05:11 -0000	1.36
@@ -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: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- tortls.c	3 Apr 2004 02:40:29 -0000	1.38
+++ tortls.c	3 Apr 2004 04:05:11 -0000	1.39
@@ -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: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- util.c	3 Apr 2004 02:55:42 -0000	1.77
+++ util.c	3 Apr 2004 04:05:11 -0000	1.78
@@ -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: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- util.h	3 Apr 2004 03:37:11 -0000	1.48
+++ util.h	3 Apr 2004 04:05:11 -0000	1.49
@@ -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);
 



More information about the tor-commits mailing list