Nick Mathewson
5cf9167f91
Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32
...
This commit is completely mechanical; I used this perl script to make it:
#!/usr/bin/perl -w -i.bak -p
if (/^\s*\#/) {
s/MS_WINDOWS/_WIN32/g;
s/\bWIN32\b/_WIN32/g;
}
2012-01-31 15:48:47 -05:00
Nick Mathewson
d1b40cf2e7
Merge remote-tracking branch 'public/bug4533_part1'
...
Conflicts:
src/common/compat.h
2012-01-18 15:33:04 -05:00
Nick Mathewson
1772782e42
Merge remote-tracking branch 'origin/maint-0.2.2'
2012-01-18 15:29:41 -05:00
Nick Mathewson
dd4b1a2ac6
Fix SOCKET_OK test on win64.
...
Bugfix on 0.2.2.29-beta; partial fix for 4533; found by wanoskarnet
2012-01-18 10:48:29 -05:00
Nick Mathewson
6e8c2a3e46
Use SOCKET_OK macros in even more places
...
Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET.
Partial work for bug4533.
2012-01-17 16:35:07 -05:00
Nick Mathewson
85d7811456
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-12-26 17:58:51 -05:00
Sebastian Hahn
da876aec63
Provide correct timeradd/timersup replacements
...
Bug caught and patch provided by Vektor. Fixes bug 4778.t
2011-12-25 23:19:08 +01:00
Kamran Riaz Khan
a1c1fc72d1
Prepend cwd for relative config file paths.
...
Modifies filenames which do not start with '/' or '.' on non-Windows
platforms; uses _fullpath on Windows.
2011-12-22 10:17:48 -05:00
Nick Mathewson
d9edee3a3b
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-12-02 16:10:17 -05:00
Nick Mathewson
2b5a035604
tor_accept_socket() should take tor_addr_t for listener arg
...
Fixes bug 4535; bugfix on 0.2.2.28-beta; found by "troll_un"
2011-12-02 16:09:16 -05:00
Nick Mathewson
cb8059b42d
Merge remote-tracking branch 'sebastian/pure_removal'
2011-11-25 14:54:04 -05:00
Sebastian Hahn
75d8ad7320
Purge ATTR_PURE from the code
...
We're using it incorrectly in many cases, and it doesn't help as far as
we know.
2011-11-25 17:57:50 +01:00
Nick Mathewson
eaa3a379f0
Move disable-debugger-attachment fn to compat where it belongs. Fix whitespace
2011-11-24 23:45:47 -05:00
Sebastian Hahn
2efa6eb652
Sockets are unsigned on windows
...
this gets rid of a warning about signed/unsigned comparison
This is a backport of 0a5338e03c
that
accidentally only went into master
2011-11-20 15:15:14 +01:00
Nick Mathewson
9452b65680
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-11-09 10:28:43 -05:00
Sebastian Hahn
0cc7a63fc0
Don't warn when compiling with --disable-threads
...
STMT_VOID semantics suggested by nick, thanks!
2011-11-09 10:26:35 +01:00
Andrea Gelmini
72d4d762c1
Remove some duplicate includes
2011-11-03 10:23:33 -04:00
Sebastian Hahn
0a5338e03c
Sockets are unsigned on windows
...
this gets rid of a warning about signed/unsigned comparison
2011-08-09 11:03:16 +02:00
Nick Mathewson
44cfa53873
Make WIN32_WINNT defines conditional
...
Requested by Gisle Vanem on tor-dev. I'm not quite sure this is the
right solution, but it's probably harmless.
2011-07-15 10:03:59 -04:00
Nick Mathewson
21de9d46e2
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/compat.c
src/or/main.c
2011-05-30 14:58:26 -04:00
Nick Mathewson
da7c60dcf3
Merge remote-tracking branch 'public/bug3270' into maint-0.2.2
2011-05-30 14:49:49 -04:00
Nick Mathewson
2527acb2dc
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/Makefile.am
src/or/control.c
2011-05-23 01:23:53 -04:00
Nick Mathewson
b80a8bba19
Merge branch 'feature3049-v2' into maint-0.2.2
...
Conflicts:
src/common/Makefile.am
2011-05-23 01:19:04 -04:00
Nick Mathewson
cfeafe5e77
Use a 64-bit type to hold sockets on win64.
...
On win64, sockets are of type UINT_PTR; on win32 they're u_int;
elsewhere they're int. The correct windows way to check a socket for
being set is to compare it with INVALID_SOCKET; elsewhere you see if
it is negative.
On Libevent 2, all callbacks take sockets as evutil_socket_t; we've
been passing them int.
This patch should fix compilation and correctness when built for
64-bit windows. Fixes bug 3270.
2011-05-23 00:17:48 -04:00
Nick Mathewson
4ac8ff9c9f
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-05-15 20:22:44 -04:00
Nick Mathewson
3b6cbf2534
Add a function to pull off the final component of a path
2011-05-15 20:20:29 -04:00
Robert Ransom
b7452dcbcb
Fix comment typo
2011-05-10 05:15:02 -07:00
Nick Mathewson
8b33928676
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-04-28 17:15:31 -04:00
Nick Mathewson
51e551d383
Detect and handle NULL returns from (gm/local)time_r
...
These functions can return NULL for otherwise-valid values of
time_t. Notably, the glibc gmtime manpage says it can return NULL
if the year if greater than INT_MAX, and the windows MSDN gmtime
page says it can return NULL for negative time_t values.
Also, our formatting code is not guaranteed to correctly handle
years after 9999 CE.
This patch tries to correct this by detecting NULL values from
gmtime/localtime_r, and trying to clip them to a reasonable end of
the scale. If they are in the middle of the scale, we call it a
downright error.
Arguably, it's a bug to get out-of-bounds dates like this to begin
with. But we've had bugs of this kind in the past, and warning when
we see a bug is much kinder than doing a NULL-pointer dereference.
Boboper found this one too.
2011-04-28 17:12:54 -04:00
Nick Mathewson
ee871e7a0e
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/compat.h
src/or/circuitlist.c
src/or/circuituse.c
src/or/or.h
src/or/rephist.c
2011-03-30 14:55:50 -04:00
Nick Mathewson
5eaba5ac21
Implement replacements for timer(add,cmp,sub) on platforms lacking them.
2011-03-30 14:41:41 -04:00
Nick Mathewson
57b954293e
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Trivial Conflicts in
src/common/crypto.c
src/or/main.h
src/or/or.h
2011-03-16 17:09:32 -04:00
Nick Mathewson
6617822b84
Doxygen documentation for about 100 things that didn't have any
...
About 860 doxygen-less things remain in 0.2.2
2011-03-16 17:05:37 -04:00
Nick Mathewson
0489f7e004
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 13:19:10 -05:00
Nick Mathewson
27cefef3a2
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-01-03 13:18:33 -05:00
Nick Mathewson
5c09431cc7
Never include pthread.h when building for Windows.
...
On Windows, we never use pthreads, since it doesn't usually exist,
and when it does it tends to be a little weirdly-behaved. But some
mingw installations have a pthreads installed, so autoconf detects
pthread.h and tells us about it. This would make us include
pthread.h, which could make for trouble when the iffy pthread.h
tried to include config.h.
This patch changes compat.h so that we never include pthread.h on
Windows. Fixes bug 2313; bugfix on 0.1.0.1-rc.
2011-01-03 12:45:13 -05:00
Nick Mathewson
8730884ebe
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 11:53:28 -05:00
Nick Mathewson
f1de329e78
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/common/test.h
src/or/test.c
2011-01-03 11:51:17 -05:00
Nick Mathewson
1a07348a50
Bump copyright statements to 2011
2011-01-03 11:50:39 -05:00
Roger Dingledine
c79427a992
Merge branch 'maint-0.2.2'
2010-12-19 22:08:42 -05:00
Nick Mathewson
b5e293afe6
Merge remote branch fix_security_bug_021 into fix_security_bug_022
...
Conflicts:
src/common/memarea.c
src/or/or.h
src/or/rendclient.c
2010-12-15 22:48:23 -05:00
Nick Mathewson
b8a7bad799
Make payloads into uint8_t.
...
This will avoid some signed/unsigned assignment-related bugs.
2010-12-15 22:31:11 -05:00
Nick Mathewson
9908404f01
Merge remote branch 'sjmurdoch/cloexec'
2010-12-01 11:42:34 -05:00
Nick Mathewson
3ed7505dc5
Merge remote branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/relay.c
2010-11-30 19:23:40 -05:00
Nick Mathewson
89e97bdf94
Add wrappers function for libc random()
...
On windows, it's called something different.
2010-11-29 16:00:47 -05:00
Nick Mathewson
e669d25e43
Do cloexec on socketpairs and stdio files
2010-11-20 01:16:29 -05:00
Nick Mathewson
5a66de7015
Initial work to set CLOEXEC on all possible fds
...
Still to go: some pipes, all stdio files.
2010-11-20 00:58:40 -05:00
Nick Mathewson
94a99ad205
Add a portable tor_timercmp
...
We can't use the platform timercmp, because
1) some platforms don't have them
2) some that do have them only support certain relational operators
2010-10-15 12:35:05 -04:00
Nick Mathewson
73d93c033d
Autodetect the number of CPUs when possible if NumCPUs==0
...
This is needed for IOCP, since telling the IOCP backend about all
your CPUs is a good idea. It'll also come in handy with asn's
multithreaded crypto stuff, and for people who run servers without
reading the manual.
2010-09-28 14:42:21 -04:00
valerino
076063ca90
moved wince related includes and defs to compat.h where possible, removed unused/redundant wince includes
2010-05-24 11:46:54 -04:00