diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-08-14 17:51:36 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-08-14 17:51:36 +0000 |
commit | 1777487f4ea898f6919334f8a8cbdba7724f2abd (patch) | |
tree | caf5727bf91d810255b323aeea8a86a1515960ee | |
parent | adbc0577728dbf09d5c35efb2c36c0cc11fc5f59 (diff) | |
download | tor-1777487f4ea898f6919334f8a8cbdba7724f2abd.tar.gz tor-1777487f4ea898f6919334f8a8cbdba7724f2abd.zip |
Tor now builds on win32.
svn:r400
-rw-r--r-- | Win32Build/or/or.dsp | 136 | ||||
-rw-r--r-- | Win32Build/tor/tor.dsw | 12 | ||||
-rw-r--r-- | Win32Build/tor/tor.ncb | bin | 25600 -> 107520 bytes | |||
-rw-r--r-- | Win32Build/tor/tor.opt | bin | 37888 -> 55808 bytes | |||
-rw-r--r-- | src/common/fakepoll.c | 2 | ||||
-rw-r--r-- | src/common/util.c | 3 | ||||
-rw-r--r-- | src/common/util.h | 11 |
7 files changed, 148 insertions, 16 deletions
diff --git a/Win32Build/or/or.dsp b/Win32Build/or/or.dsp index 2c61b3faed..77bbf8916b 100644 --- a/Win32Build/or/or.dsp +++ b/Win32Build/or/or.dsp @@ -39,17 +39,18 @@ RSC=rc.exe # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "d:\openssl\include ..\win32" /I "..\win32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /machine:I386 /libpath:"d:\openssl\lib\vc"
!ELSEIF "$(CFG)" == "or - Win32 Debug"
@@ -62,17 +63,18 @@ LINK32=link.exe # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\win32" /I "D:\openssl\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\openssl\lib\vc"
!ENDIF
@@ -83,10 +85,130 @@ LINK32=link.exe # Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\common\aes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\buffers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\circuit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\command.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\config.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\connection.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\connection_ap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\connection_edge.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\connection_exit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\connection_or.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\crypto.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\directory.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\dns.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\fakepoll.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\log.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\onion.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\routers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\tor_main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\util.c
+# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\src\common\aes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\crypto.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\fakepoll.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\log.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\or.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\win32\orconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\test.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\torint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\or\tree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\util.h
+# End Source File
# End Group
# Begin Group "Resource Files"
diff --git a/Win32Build/tor/tor.dsw b/Win32Build/tor/tor.dsw index 4ad03e67bf..ae4da0804f 100644 --- a/Win32Build/tor/tor.dsw +++ b/Win32Build/tor/tor.dsw @@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ###############################################################################
+Project: "or"="..\or\or.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Global:
Package=<5>
diff --git a/Win32Build/tor/tor.ncb b/Win32Build/tor/tor.ncb Binary files differindex 8cd015a697..535305ac99 100644 --- a/Win32Build/tor/tor.ncb +++ b/Win32Build/tor/tor.ncb diff --git a/Win32Build/tor/tor.opt b/Win32Build/tor/tor.opt Binary files differindex 688595e109..8ae08d4288 100644 --- a/Win32Build/tor/tor.opt +++ b/Win32Build/tor/tor.opt diff --git a/src/common/fakepoll.c b/src/common/fakepoll.c index 17bd18d401..27804ba0e0 100644 --- a/src/common/fakepoll.c +++ b/src/common/fakepoll.c @@ -66,7 +66,7 @@ poll(struct pollfd *ufds, unsigned int nfds, int timeout) } #ifdef MS_WINDOWS if (!any_fds_set) { - usleep(timeout); + Sleep(timeout); return 0; } #endif diff --git a/src/common/util.c b/src/common/util.c index dea4b33719..3a80b94da7 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -116,6 +116,7 @@ int spawn_func(int (*func)(void *), void *data) /* Child */ func(data); assert(0); /* Should never reach here. */ + return 0; /* suppress "control-reaches-end-of-non-void" warning. */ } else { /* Parent */ return 0; @@ -236,7 +237,7 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) #ifdef MS_WINDOWS int correct_socket_errno(int s) { - int r, optval, optvallen=sizeof(optval); + int optval, optvallen=sizeof(optval); assert(errno == WSAEWOULDBLOCK); if (getsockopt(s, SOL_SOCKET, SO_ERROR, (void*)&optval, &optvallen)) return errno; diff --git a/src/common/util.h b/src/common/util.h index 0590f8ed7a..614a5388a6 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -19,6 +19,7 @@ #elif defined(_MSC_VER) #include <winsock.h> #endif +#include <errno.h> #ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_FTIME #define USING_FAKE_TIMEVAL @@ -65,13 +66,9 @@ int tor_socketpair(int family, int type, int protocol, int fd[2]); * errnos which they use as the fancy strikes them. */ #ifdef MS_WINDOWS -#define ERRNO_EAGAIN(e) ((e) == EAGAIN || \ - (e) == WSAEWOULDBLOCK || \ - (e) == EWOULDBLOCK) -#define ERRNO_EINPROGRESS(e) ((e) == EINPROGRESS || \ - (e) == WSAEINPROGRESS) -#define ERRNO_CONN_EINPROGRESS(e) ((e) == EINPROGRESS || \ - (e) == WSAEINPROGRESS || (e) == WSAEINVAL) +#define ERRNO_EAGAIN(e) ((e) == EAGAIN || (e) == WSAEWOULDBLOCK) +#define ERRNO_EINPROGRESS(e) ((e) == WSAEINPROGRESS) +#define ERRNO_CONN_EINPROGRESS(e) ((e) == WSAEINPROGRESS || (e) == WSAEINVAL) int correct_socket_errno(int s); #else #define ERRNO_EAGAIN(e) ((e) == EAGAIN) |