/* 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>
#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>
/* 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
#include "./tortls.h"
#include "./util.h"
#include "./log.h"
+#include <string.h>
/* Copied from or.h */
#define LEGAL_NICKNAME_CHARACTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
/* 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
#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>
#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);
return the_directory_len;
}
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
#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"