Ticket #13081: tor-0.2.6.7-msvs2013-build.diff

File tor-0.2.6.7-msvs2013-build.diff, 17.0 KB (added by NewEraCracker, 4 years ago)
  • Makefile.nmake

    a b  
     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)"
    430        cd ../../src/ext
    5         $(MAKE) /F Makefile.nmake
     31        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     32        cd ../../src/trunnel
     33        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    634        cd ../../src/or
    7         $(MAKE) /F Makefile.nmake
     35        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    836        cd ../../src/test
    9         $(MAKE) /F Makefile.nmake
     37        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     38        cd ../../src/tools
     39        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
    1040
    1141clean:
    1242        cd src/common
    13         $(MAKE) /F Makefile.nmake clean
     43        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
    1444        cd ../../src/ext
    15         $(MAKE) /F Makefile.nmake clean
     45        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     46        cd ../../src/trunnel
     47        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
    1648        cd ../../src/or
    17         $(MAKE) /F Makefile.nmake clean
     49        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
    1850        cd ../../src/test
    19         $(MAKE) /F Makefile.nmake clean
     51        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     52        cd ../../src/tools
     53        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
  • src/common/Makefile.nmake

    a b  
    1 all: libor.lib libor-crypto.lib libor-event.lib
    2 
    3 CFLAGS = /O2 /MT /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common \
    4     /I ..\ext
     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 /I ..\trunnel /I ..\ext\trunnel
     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 /I ..\trunnel /I ..\ext\trunnel /D"TOR_UNIT_TESTS"
     14!ENDIF
    515
    6 LIBOR_OBJECTS = address.obj backtrace.obj compat.obj container.obj di_ops.obj \
    7         log.obj memarea.obj mempool.obj procmon.obj sandbox.obj util.obj \
    8         util_codedigest.obj
     16all: libor.lib libor-crypto.lib libor-event.lib
    917
    10 LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj crypto_format.obj torgzip.obj tortls.obj \
    11         crypto_curve25519.obj curve25519-donna.obj
     18LIBOR_OBJECTS = address.obj backtrace.obj compat.obj container.obj di_ops.obj log.obj \
     19        memarea.obj procmon.obj sandbox.obj util.obj util_codedigest.obj util_process.obj \
     20        workqueue.obj
    1221
    13 LIBOR_EVENT_OBJECTS = compat_libevent.obj
     22LIBOR_CRYPTO_OBJECTS = aes.obj torgzip.obj tortls.obj crypto.obj crypto_curve25519.obj \
     23        crypto_ed25519.obj crypto_format.obj crypto_pwbox.obj crypto_s2k.obj
    1424
    15 curve25519-donna.obj: ..\ext\curve25519_donna\curve25519-donna.c
    16         $(CC) $(CFLAGS) /D inline=_inline /c ..\ext\curve25519_donna\curve25519-donna.c
     25LIBOR_EVENT_OBJECTS = compat_libevent.obj compat_threads.obj compat_winthreads.obj
    1726
    1827libor.lib: $(LIBOR_OBJECTS)
    1928        lib $(LIBOR_OBJECTS) /out:libor.lib
     
    2534        lib $(LIBOR_EVENT_OBJECTS) /out:libor-event.lib
    2635
    2736clean:
    28         del *.obj *.lib libor*.lib
     37        del *.obj libor.lib libor-crypto.lib libor-event.lib
  • src/common/backtrace.c

    a b  
    66
    77#include "orconfig.h"
    88#include "compat.h"
    9 #include "util.h"
    10 #include "torlog.h"
    119
    1210#ifdef HAVE_EXECINFO_H
    1311#include <execinfo.h>
     
    2119#ifdef HAVE_SIGNAL_H
    2220#include <signal.h>
    2321#endif
     22
     23#include "util.h"
     24#include "torlog.h"
    2425
    2526#ifdef HAVE_CYGWIN_SIGNAL_H
    2627#include <cygwin/signal.h>
  • src/common/compat.c

    a b  
    2727#include "compat.h"
    2828
    2929#ifdef _WIN32
     30#include <io.h>
    3031#include <windows.h>
    3132#include <sys/locking.h>
    3233#endif
  • src/common/compat_threads.c

    a b  
    1010#include "compat.h"
    1111#include "compat_threads.h"
    1212
    13 #include "util.h"
    14 #include "torlog.h"
    15 
     13#ifdef _WIN32
     14#include <io.h>
     15#endif
    1616#ifdef HAVE_SYS_EVENTFD_H
    1717#include <sys/eventfd.h>
    1818#endif
     
    2222#ifdef HAVE_UNISTD_H
    2323#include <unistd.h>
    2424#endif
     25
     26#include "util.h"
     27#include "torlog.h"
    2528
    2629/** Return a newly allocated, ready-for-use mutex. */
    2730tor_mutex_t *
  • src/common/crypto.c

    a b  
    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

    a b  
    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/common/torint.h

    a b  
    111111typedef unsigned int uint32_t;
    112112#define HAVE_UINT32_T
    113113#endif
     114
     115#ifndef UINT8_MAX
     116#define UINT8_MAX 0xffu
     117#endif
     118#ifndef INT8_MAX
     119#define INT8_MAX 0x7f
     120#endif
     121#ifndef INT8_MIN
     122#define INT8_MIN (-INT8_MAX-1)
     123#endif
    114124#ifndef UINT16_MAX
    115125#define UINT16_MAX 0xffffu
    116126#endif
  • src/ext/Makefile.nmake

    a b  
     1CFLAGS = /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
     2
     3all: build-libs build-deps
     4
     5build-libs: csiphash.lib tinytest.lib
     6
     7csiphash.lib: csiphash.obj
     8        lib csiphash.obj /out:csiphash.lib
     9
     10tinytest.lib: tinytest.obj
     11        lib tinytest.obj /out:tinytest.lib
     12
     13build-deps:
     14        cd curve25519_donna
     15        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     16        cd ../ed25519/ref10
     17        $(MAKE) /F Makefile.nmake all CFG="$(CFG)"
     18
     19clean: clean-libs clean-deps
     20
     21clean-libs:
     22        del *.obj *.lib
     23
     24clean-deps:
     25        cd curve25519_donna
     26        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     27        cd ../ed25519/ref10
     28        $(MAKE) /F Makefile.nmake clean CFG="$(CFG)"
     29 No newline at end of file
  • src/ext/curve25519_donna/Makefile.nmake

    a b  
     1CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\..\win32 /I ..\..\common
     2
     3all: curve25519-donna.lib
     4
     5curve25519-donna.obj: curve25519-donna.c
     6        $(CC) $(CFLAGS) /D inline=_inline /c curve25519-donna.c
     7
     8curve25519-donna.lib: curve25519-donna.obj
     9        lib curve25519-donna.obj /out:curve25519-donna.lib
     10
     11clean:
     12        del *.obj *.lib
  • src/ext/ed25519/ref10/Makefile.nmake

    a b  
     1CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\..\..\win32 /I ..\..\..\..\..\build-alpha\include /I ..\..\..\common
     2
     3all: ed25519.lib
     4
     5ED25519_OBJECTS = \
     6        fe_0.obj \
     7        fe_1.obj \
     8        fe_add.obj \
     9        fe_cmov.obj \
     10        fe_copy.obj \
     11        fe_frombytes.obj \
     12        fe_invert.obj \
     13        fe_isnegative.obj \
     14        fe_isnonzero.obj \
     15        fe_mul.obj \
     16        fe_neg.obj \
     17        fe_pow22523.obj \
     18        fe_sq.obj \
     19        fe_sq2.obj \
     20        fe_sub.obj \
     21        fe_tobytes.obj \
     22        ge_add.obj \
     23        ge_double_scalarmult.obj \
     24        ge_frombytes.obj \
     25        ge_madd.obj \
     26        ge_msub.obj \
     27        ge_p1p1_to_p2.obj \
     28        ge_p1p1_to_p3.obj \
     29        ge_p2_0.obj \
     30        ge_p2_dbl.obj \
     31        ge_p3_0.obj \
     32        ge_p3_dbl.obj \
     33        ge_p3_to_cached.obj \
     34        ge_p3_to_p2.obj \
     35        ge_p3_tobytes.obj \
     36        ge_precomp_0.obj \
     37        ge_scalarmult_base.obj \
     38        ge_sub.obj \
     39        ge_tobytes.obj \
     40        keypair.obj \
     41        open.obj \
     42        sc_muladd.obj \
     43        sc_reduce.obj \
     44        sign.obj \
     45        keyconv.obj \
     46        blinding.obj
     47
     48ed25519.lib: $(ED25519_OBJECTS)
     49        lib $(ED25519_OBJECTS) /out:ed25519.lib
     50
     51clean:
     52        del *.obj *.lib
  • src/ext/tinytest.c

    a b  
    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/ext/trunnel/trunnel-impl.h

    a b  
    1818#include "trunnel-local.h"
    1919#endif
    2020
    21 #ifdef _MSC_VER
    22 #define uint8_t unsigned char
    23 #define uint16_t unsigned short
    24 #define uint32_t unsigned int
    25 #define uint64_t unsigned __int64
    26 #define inline __inline
    27 #else
    28 #include <stdint.h>
    29 #endif
     21#include "torint.h"
    3022
    3123#ifdef _WIN32
    3224uint32_t trunnel_htonl(uint32_t a);
  • src/or/Makefile.nmake

    a b  
    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 = /O2 /MT /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
     
    6880  status.obj \
    6981  transports.obj
    7082
     83EXT_LIBS = \
     84        ..\ext\csiphash.lib \
     85        ..\ext\tinytest.lib \
     86        ..\ext\curve25519_donna\curve25519-donna.lib \
     87        ..\ext\ed25519\ref10\ed25519.lib
     88
    7189libtor.lib: $(LIBTOR_OBJECTS)
    7290        lib $(LIBTOR_OBJECTS) /out:$@
    7391
    7492tor.exe: libtor.lib tor_main.obj
    75         $(CC) $(CFLAGS) $(LIBS) libtor.lib ..\common\*.lib ..\ext\*.lib tor_main.obj /Fe$@
     93        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib tor_main.obj /Fe$@
    7694
    7795clean:
    78         del $(LIBTOR_OBJECTS) tor_main.obj *.lib tor.exe
     96        del $(LIBTOR_OBJECTS) tor_main.obj libtor.lib tor.exe tor.exp tor.lib
  • src/test/Makefile.nmake

    a b  
     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
     25EXT_LIBS = \
     26 ..\ext\csiphash.lib \
     27 ..\ext\tinytest.lib \
     28 ..\ext\curve25519_donna\curve25519-donna.lib \
     29 ..\ext\ed25519\ref10\ed25519.lib
     30
     31TEST_OBJECTS = \
     32 test.obj \
     33 test_accounting.obj \
     34 test_addr.obj \
     35 test_address.obj \
     36 test_buffers.obj \
     37 test_cell_formats.obj \
     38 test_cell_queue.obj \
     39 test_channel.obj \
     40 test_channeltls.obj \
     41 test_checkdir.obj \
     42 test_circuitlist.obj \
     43 test_circuitmux.obj \
     44 test_config.obj \
     45 test_containers.obj \
     46 test_controller_events.obj \
     47 test_crypto.obj \
     48 test_data.obj \
     49 test_dir.obj \
     50 test_entryconn.obj \
     51 test_entrynodes.obj \
     52 test_guardfraction.obj \
     53 test_extorport.obj \
     54 test_hs.obj \
     55 test_introduce.obj \
     56 test_logging.obj \
     57 test_microdesc.obj \
     58 test_nodelist.obj \
     59 test_oom.obj \
     60 test_options.obj \
     61 test_policy.obj \
     62 test_pt.obj \
     63 test_relay.obj \
     64 test_relaycell.obj \
     65 test_replay.obj \
     66 test_routerkeys.obj \
     67 test_routerlist.obj \
     68 test_routerset.obj \
     69 test_scheduler.obj \
     70 test_socks.obj \
     71 test_status.obj \
     72 test_threads.obj \
     73 test_util.obj \
     74 test_helpers.obj \
     75 testing_common.obj
     76
     77bench.exe: bench.obj
     78        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) ..\or\libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib bench.obj /Fe$@
     79
     80test.exe: $(TEST_OBJECTS)
     81        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) ..\or\libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib $(TEST_OBJECTS) /Fe$@
     82
     83test_bt_cl.exe: test_bt_cl.obj
     84        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) ..\or\libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib test_bt_cl.obj /Fe$@
     85
     86test_ntor_cl.exe: test_ntor_cl.obj
     87        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) ..\or\libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib test_ntor_cl.obj /Fe$@
     88
     89test-child.exe: test-child.obj
     90        $(CC) $(CFLAGS) $(LIBS) $(EXT_LIBS) ..\or\libtor.lib ..\common\*.lib ..\trunnel\trunnel.lib test-child.obj /Fe$@
     91
     92clean:
     93        del $(TEST_OBJECTS) *.exe *.exp *.lib *.obj
  • src/test/test_bt_cl.c

    a b  
    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/test/test_checkdir.c

    a b  
    33
    44#include "orconfig.h"
    55#include "or.h"
    6 #include <dirent.h>
    76#include "config.h"
    8 #include "test.h"
    9 #include "util.h"
    107
    118#ifdef _WIN32
    129#define mkdir(a,b) mkdir(a)
    1310#define tt_int_op_nowin(a,op,b) do { (void)(a); (void)(b); } while (0)
    1411#define umask(mask) ((void)0)
    1512#else
     13#include <dirent.h>
    1614#define tt_int_op_nowin(a,op,b) tt_int_op((a),op,(b))
    1715#endif
     16
     17#include "test.h"
     18#include "util.h"
    1819
    1920/** Run unit tests for private dir permission enforcement logic. */
    2021static void
  • src/tools/Makefile.nmake

    a b  
     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/tools/tor-gencert.c

    a b  
    66#include <stdio.h>
    77#include <string.h>
    88
     9#ifdef _WIN32
     10#include <io.h>
     11#endif
    912#include <sys/types.h>
    1013#include <sys/stat.h>
    1114#include <fcntl.h>
  • src/trunnel/Makefile.nmake

    a b  
     1CFLAGS = /nologo /MD /W3 /O2 /D"_CRT_SECURE_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_DEPRECATE" /I ..\win32 /I ..\common /I ..\ext\trunnel
     2
     3all: trunnel.lib
     4
     5trunnel.lib: trunnel.obj pwbox.obj
     6        lib trunnel.obj pwbox.obj /out:trunnel.lib
     7
     8pwbox.obj: pwbox.c
     9        $(CC) $(CFLAGS) /D inline=_inline /c pwbox.c
     10
     11trunnel.obj: ..\ext\trunnel\trunnel.c
     12        $(CC) $(CFLAGS) /D inline=_inline /c ..\ext\trunnel\trunnel.c
     13
     14clean:
     15        del *.obj *.lib
  • src/trunnel/pwbox.h

    a b  
    55#ifndef TRUNNEL_PWBOX_H
    66#define TRUNNEL_PWBOX_H
    77
    8 #include <stdint.h>
     8#include "torint.h"
    99#include "trunnel.h"
    1010
    1111#define PWBOX0_CONST0 1414484546
  • src/win32/orconfig.h

    a b  
    8989/* Define to 1 if you have the `strlcpy' function. */
    9090#undef HAVE_STRLCPY
    9191
     92/* Define to 1 if you have the `strnlen' function. */
     93#define HAVE_STRNLEN
     94
    9295/* Define to 1 if you have the `strptime' function. */
    9396#undef HAVE_STRPTIME
    9497
     
    247250#define USE_CURVE25519_DONNA
    248251
    249252#define ENUM_VALS_ARE_SIGNED 1
     253
     254#define HAVE_EXTERN_ENVIRON_DECLARED
     255
     256#ifndef STDIN_FILENO
     257#define STDIN_FILENO 0
     258#endif
    250259
    251260#ifndef STDOUT_FILENO
    252261#define STDOUT_FILENO 1