Ticket #13081: tor-0.2.5.6-alpha-build-with-VS-5th-version.diff

File tor-0.2.5.6-alpha-build-with-VS-5th-version.diff, 13.9 KB (added by NewEraCracker, 5 years ago)

Diff vs 0.2.5.6-alpha as of Sept 11th.

  • tor-0.2.5.6-alpha

    diff -uNraw tor-0.2.5.6-alpha.orig/Makefile.nmake tor-0.2.5.6-alpha/Makefile.nmake
    old new  
     1# Default configuration is Release
     2!IF "$(CFG)" == ""
     3CFG=Release
     4!ENDIF
     5
     6# Check user supplied configuration to see if it matches any build profile
     7!IF "$(CFG)" != "Release" && "$(CFG)" != "Test"
     8!MESSAGE Invalid configuration "$(CFG)" specified.
     9!MESSAGE
     10!MESSAGE You can specify a configuration when running NMAKE by defining
     11!MESSAGE the macro CFG on the command line.
     12!MESSAGE
     13!MESSAGE The following configurations are available:
     14!MESSAGE NMAKE /f "Makefile.nmake" all CFG="Release"
     15!MESSAGE NMAKE /f "Makefile.nmake" all CFG="Test"
     16!MESSAGE
     17!MESSAGE To clean build tree the following configurations are available:
     18!MESSAGE NMAKE /f "Makefile.nmake" clean CFG="Release"
     19!MESSAGE NMAKE /f "Makefile.nmake" clean CFG="Test"
     20!MESSAGE
     21!MESSAGE You are advised to clean your build tree before building a
     22!MESSAGE different profile.
     23!MESSAGE
     24!ERROR An invalid configuration is specified.
     25!ENDIF
     26
    127all:
    228        cd src/common
    3         $(MAKE) /F Makefile.nmake
     29        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     30        cd ../../src/ext
     31        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    432        cd ../../src/or
    5         $(MAKE) /F Makefile.nmake
     33        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    634        cd ../../src/test
    7         $(MAKE) /F Makefile.nmake
     35        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     36        cd ../../src/tools
     37        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    838
    939clean:
    1040        cd src/common
    11         $(MAKE) /F Makefile.nmake clean
     41        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     42        cd ../../src/ext
     43        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
    1244        cd ../../src/or
    13         $(MAKE) /F Makefile.nmake clean
     45        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
    1446        cd ../../src/test
    15         $(MAKE) /F Makefile.nmake clean
     47        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     48        cd ../../src/tools
     49        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
  • src/common/Makefile.nmake

    diff -uNraw tor-0.2.5.6-alpha.orig/src/common/Makefile.nmake tor-0.2.5.6-alpha/src/common/Makefile.nmake
    old new  
    1 all: libor.lib libor-crypto.lib libor-event.lib
     1# Sanity check
     2!IF "$(CFG)" != "Release" && "$(CFG)" != "Test"
     3!ERROR An invalid configuration is specified.
     4!ENDIF
     5
     6# Test suite is not included in Release version
     7!IF "$(CFG)" == "Release"
     8CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext
     9!ENDIF
     10
     11# Test suite is included in Test version
     12!IF "$(CFG)" == "Test"
     13CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext /D"TOR_UNIT_TESTS"
     14!ENDIF
    215
    3 CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include /I ..\ext
     16all: libor.lib libor-crypto.lib libor-event.lib
    417
    5 LIBOR_OBJECTS = address.obj compat.obj container.obj di_ops.obj \
    6         log.obj memarea.obj mempool.obj procmon.obj util.obj \
     18LIBOR_OBJECTS = address.obj backtrace.obj compat.obj container.obj di_ops.obj \
     19        log.obj memarea.obj mempool.obj procmon.obj sandbox.obj util.obj \
    720        util_codedigest.obj
    821
    9 LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj torgzip.obj tortls.obj \
     22LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj crypto_format.obj torgzip.obj tortls.obj \
    1023        crypto_curve25519.obj curve25519-donna.obj
    1124
    1225LIBOR_EVENT_OBJECTS = compat_libevent.obj
     
    2437        lib $(LIBOR_EVENT_OBJECTS) /out:libor-event.lib
    2538
    2639clean:
    27         del *.obj *.lib libor*.lib
     40        del *.obj libor.lib libor-crypto.lib libor-event.lib
  • src/common/backtrace.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/common/backtrace.c tor-0.2.5.6-alpha/src/common/backtrace.c
    old new  
    44#define __USE_GNU
    55#define _GNU_SOURCE 1
    66
    7 #include "orconfig.h"
    8 #include "compat.h"
    9 #include "util.h"
    10 #include "torlog.h"
    11 
    127#ifdef HAVE_EXECINFO_H
    138#include <execinfo.h>
    149#endif
     
    2116#ifdef HAVE_SIGNAL_H
    2217#include <signal.h>
    2318#endif
     19
     20#include "orconfig.h"
     21#include "compat.h"
     22#include "util.h"
     23#include "torlog.h"
    2424
    2525#ifdef HAVE_CYGWIN_SIGNAL_H
    2626#include <cygwin/signal.h>
  • src/common/compat.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/common/compat.c tor-0.2.5.6-alpha/src/common/compat.c
    old new  
    2727#include "compat.h"
    2828
    2929#ifdef _WIN32
     30#include <io.h>
    3031#include <process.h>
    3132#include <windows.h>
    3233#include <sys/locking.h>
  • src/common/crypto.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/common/crypto.c tor-0.2.5.6-alpha/src/common/crypto.c
    old new  
    2424#undef OCSP_RESPONSE
    2525#endif
    2626
     27#ifdef _MSC_VER
     28#include <openssl/applink.c>
     29#endif
     30
    2731#include <openssl/err.h>
    2832#include <openssl/rsa.h>
    2933#include <openssl/pem.h>
  • src/common/log.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/common/log.c tor-0.2.5.6-alpha/src/common/log.c
    old new  
    1515// #include <stdio.h>
    1616#include <stdlib.h>
    1717#include <string.h>
     18#ifdef _WIN32
     19#include <io.h>
     20#endif
    1821#ifdef HAVE_SYS_TIME_H
    1922#include <sys/time.h>
    2023#endif
  • src/ext/Makefile.nmake

    diff -uNraw tor-0.2.5.6-alpha.orig/src/ext/Makefile.nmake tor-0.2.5.6-alpha/src/ext/Makefile.nmake
    old new  
     1all: csiphash.lib tinytest.lib
     2
     3CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext
     4
     5csiphash.lib: csiphash.obj
     6        lib csiphash.obj /out:csiphash.lib
     7
     8tinytest.lib: tinytest.obj
     9        lib tinytest.obj /out:tinytest.lib
     10
     11clean:
     12        del *.obj *.lib
  • src/ext/tinytest.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/ext/tinytest.c tor-0.2.5.6-alpha/src/ext/tinytest.c
    old new  
    5656#define __attribute__(x)
    5757#endif
    5858
     59#ifdef _MSC_VER
     60#define snprintf _snprintf
     61#endif
     62
    5963#include "tinytest.h"
    6064#include "tinytest_macros.h"
    6165
  • src/or/Makefile.nmake

    diff -uNraw tor-0.2.5.6-alpha.orig/src/or/Makefile.nmake tor-0.2.5.6-alpha/src/or/Makefile.nmake
    old new  
    1 all: tor.exe
     1# Sanity check
     2!IF "$(CFG)" != "Release" && "$(CFG)" != "Test"
     3!ERROR An invalid configuration is specified.
     4!ENDIF
     5
     6# Test suite is not included in Release version
     7!IF "$(CFG)" == "Release"
     8CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext
     9!ENDIF
     10
     11# Test suite is included in Test version
     12!IF "$(CFG)" == "Test"
     13CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext /D"TOR_UNIT_TESTS"
     14!ENDIF
    215
    3 CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common \
    4     /I ..\ext
     16all: tor.exe
    517
    6 LIBS = ..\..\..\build-alpha\lib\libevent.lib \
    7  ..\..\..\build-alpha\lib\libcrypto.lib \
    8  ..\..\..\build-alpha\lib\libssl.lib \
    9  ..\..\..\build-alpha\lib\libz.lib \
     18LIBS = ..\..\..\build-alpha\lib\event.lib \
     19 ..\..\..\build-alpha\lib\libeay32.lib \
     20 ..\..\..\build-alpha\lib\ssleay32.lib \
     21 ..\..\..\build-alpha\lib\zdll.lib \
    1022 ws2_32.lib advapi32.lib shell32.lib \
    1123 crypt32.lib gdi32.lib user32.lib
    1224
     
    1527  buffers.obj \
    1628  channel.obj \
    1729  channeltls.obj \
     30  circpathbias.obj \
    1831  circuitbuild.obj \
    1932  circuitlist.obj \
    2033  circuitmux.obj \
     
    3548  dirvote.obj \
    3649  dns.obj \
    3750  dnsserv.obj \
     51  ext_orport.obj \
    3852  fp_pair.obj \
    3953  entrynodes.obj \
    4054  geoip.obj \
     
    6983        lib $(LIBTOR_OBJECTS) /out:$@
    7084
    7185tor.exe: libtor.lib tor_main.obj
    72         $(CC) $(CFLAGS) $(LIBS) libtor.lib ..\common\*.lib tor_main.obj /Fe$@
     86        $(CC) $(CFLAGS) $(LIBS) libtor.lib ..\common\*.lib ..\ext\*.lib tor_main.obj /Fe$@
    7387
    7488clean:
    75         del $(LIBTOR_OBJECTS) *.lib tor.exe
     89        del $(LIBTOR_OBJECTS) tor_main.obj libtor.lib tor.exe tor.exp tor.lib
  • src/test/Makefile.nmake

    diff -uNraw tor-0.2.5.6-alpha.orig/src/test/Makefile.nmake tor-0.2.5.6-alpha/src/test/Makefile.nmake
    old new  
     1# Sanity check
     2!IF "$(CFG)" != "Release" && "$(CFG)" != "Test"
     3!ERROR An invalid configuration is specified.
     4!ENDIF
     5
     6# Test suite is not included in Release version
     7!IF "$(CFG)" == "Release"
     8all: bench.exe
     9CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext
     10!ENDIF
     11
     12# Test suite is included in Test version
     13!IF "$(CFG)" == "Test"
     14all: bench.exe test.exe test_bt_cl.exe test_ntor_cl.exe test-child.exe
     15CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext /D"TOR_UNIT_TESTS"
     16!ENDIF
     17
     18LIBS = ..\..\..\build-alpha\lib\event.lib \
     19 ..\..\..\build-alpha\lib\libeay32.lib \
     20 ..\..\..\build-alpha\lib\ssleay32.lib \
     21 ..\..\..\build-alpha\lib\zdll.lib \
     22 ws2_32.lib advapi32.lib shell32.lib \
     23 crypt32.lib gdi32.lib user32.lib
     24
     25TEST_OBJECTS = \
     26 test.obj                   \
     27 test_addr.obj              \
     28 test_buffers.obj           \
     29 test_cell_formats.obj      \
     30 test_cell_queue.obj        \
     31 test_circuitlist.obj       \
     32 test_circuitmux.obj        \
     33 test_config.obj            \
     34 test_containers.obj        \
     35 test_controller_events.obj \
     36 test_crypto.obj            \
     37 test_data.obj              \
     38 test_dir.obj               \
     39 test_extorport.obj         \
     40 test_hs.obj                \
     41 test_introduce.obj         \
     42 test_logging.obj           \
     43 test_microdesc.obj         \
     44 test_nodelist.obj          \
     45 test_oom.obj               \
     46 test_options.obj           \
     47 test_policy.obj            \
     48 test_pt.obj                \
     49 test_relaycell.obj         \
     50 test_replay.obj            \
     51 test_routerkeys.obj        \
     52 test_socks.obj             \
     53 test_status.obj            \
     54 test_util.obj
     55
     56bench.exe: bench.obj
     57        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib bench.obj /Fe$@
     58
     59test.exe: $(TEST_OBJECTS)
     60        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib $(TEST_OBJECTS) /Fe$@
     61
     62test_bt_cl.exe: test_bt_cl.obj
     63        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib test_bt_cl.obj /Fe$@
     64
     65test_ntor_cl.exe: test_ntor_cl.obj
     66        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib test_ntor_cl.obj /Fe$@
     67
     68test-child.exe: test-child.obj
     69        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib test-child.obj /Fe$@
     70
     71clean:
     72        del $(TEST_OBJECTS) *.exe *.exp *.lib *.obj
  • tor-0.2.5.6-alpha

    diff -uNraw tor-0.2.5.6-alpha.orig/src/test/test.h tor-0.2.5.6-alpha/src/test/test.h
    old new  
    6161
    6262#ifdef _MSC_VER
    6363#define U64_PRINTF_TYPE uint64_t
    64 #define U64_PRINTF_TYPE int64_t
     64#define I64_PRINTF_TYPE int64_t
    6565#else
    6666#define U64_PRINTF_TYPE unsigned long long
    6767#define I64_PRINTF_TYPE long long
  • src/test/test_bt_cl.c

    diff -uNraw tor-0.2.5.6-alpha.orig/src/test/test_bt_cl.c tor-0.2.5.6-alpha/src/test/test_bt_cl.c
    old new  
    1818#ifdef __GNUC__
    1919#define NOINLINE __attribute__((noinline))
    2020#define NORETURN __attribute__((noreturn))
     21#else
     22#define NOINLINE
     23#define NORETURN
    2124#endif
    2225
    2326int crash(int x) NOINLINE;
  • src/tools/Makefile.nmake

    diff -uNraw tor-0.2.5.6-alpha.orig/src/tools/Makefile.nmake tor-0.2.5.6-alpha/src/tools/Makefile.nmake
    old new  
     1all: tor-checkkey.exe tor-gencert.exe tor-resolve.exe
     2
     3CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or /I ..\ext
     4
     5LIBS = ..\..\..\build-alpha\lib\event.lib \
     6 ..\..\..\build-alpha\lib\libeay32.lib \
     7 ..\..\..\build-alpha\lib\ssleay32.lib \
     8 ..\..\..\build-alpha\lib\zdll.lib \
     9 ws2_32.lib advapi32.lib shell32.lib \
     10 crypt32.lib gdi32.lib user32.lib
     11
     12tor-checkkey.exe: tor-checkkey.obj
     13        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib tor-checkkey.obj /Fe$@
     14
     15tor-gencert.exe: tor-gencert.obj
     16        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib tor-gencert.obj /Fe$@
     17
     18tor-resolve.exe: tor-resolve.obj
     19        $(CC) $(CFLAGS) $(LIBS) ..\or\libtor.lib ..\common\*.lib ..\ext\*.lib tor-resolve.obj /Fe$@
     20
     21clean:
     22        del tor-checkkey.obj tor-gencert.obj tor-resolve.obj \
     23                tor-checkkey.lib tor-gencert.lib tor-resolve.lib \
     24                tor-checkkey.exe tor-gencert.exe tor-resolve.exe \
     25                tor-checkkey.exp tor-gencert.exp
  • src/win32/orconfig.h

    diff -uNraw tor-0.2.5.6-alpha.orig/src/win32/orconfig.h tor-0.2.5.6-alpha/src/win32/orconfig.h
    old new  
    257257#define USE_CURVE25519_DONNA
    258258
    259259#define ENUM_VALS_ARE_SIGNED 1
     260
     261#define HAVE_EXTERN_ENVIRON_DECLARED
     262
     263#ifndef STDOUT_FILENO
     264#define STDOUT_FILENO 1
     265#endif
     266
     267#ifndef STDERR_FILENO
     268#define STDERR_FILENO 2
     269#endif