diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-08-12 03:08:41 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-08-12 03:08:41 +0000 |
commit | c336c99e609b2918ca664bc1fdbfb916a6811508 (patch) | |
tree | ff04c4774b60cef2dce98d88497ac5ac4a3cb8e7 /src/or/test.c | |
parent | 5126f203f23773f64b51e5c0c7b7e1d702f26ca9 (diff) | |
download | tor-c336c99e609b2918ca664bc1fdbfb916a6811508.tar tor-c336c99e609b2918ca664bc1fdbfb916a6811508.tar.gz |
Start of port to win32. Missing are:
- signal support
- forking for DNS farm
- changes for async IO
- daemonizing
In other words, some files still don't build, and the ones that do build,
do nonblocking IO incorrectly.
I'm also not checking in the project files till I have a good place
for them.
svn:r380
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/or/test.c b/src/or/test.c index 881396c55..acc3896af 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -3,7 +3,14 @@ /* $Id$ */ #include <stdio.h> +#ifdef HAVE_FCNTL_H #include <fcntl.h> +#endif + +#ifdef _MSC_VER +/* For mkdir() */ +#include <direct.h> +#endif #include "or.h" #include "../common/test.h" @@ -26,8 +33,14 @@ dump_hex(char *s, int len) void setup_directory() { char buf[256]; + int r; sprintf(buf, "/tmp/tor_test"); - if (mkdir(buf, 0700) && errno != EEXIST) +#ifdef _MSC_VER + r = mkdir(buf); +#else + r = mkdir(buf, 0700); +#endif + if (r && errno != EEXIST) fprintf(stderr, "Can't create directory %s", buf); } |