summaryrefslogtreecommitdiff
path: root/src/common/compat.h
AgeCommit message (Collapse)Author
2008-02-19 r18226@catbus: nickm | 2008-02-19 18:01:01 -0500Nick Mathewson
Brown-paper-bag time. We were failing to count all the sockets from accept(). svn:r13595
2008-02-19 r18198@catbus: nickm | 2008-02-19 14:30:30 -0500Nick Mathewson
Try to *fix* the socket counting problem, and add an info log to detect whether we really fixed it svn:r13580
2008-02-15 r14181@tombo: nickm | 2008-02-15 16:48:17 -0500Nick Mathewson
Fix all but 2 DOCDOC items; defer many XXX020s (particularly those where fixing them would fix no bugs at the risk of introducing some bugs). svn:r13529
2008-02-12 r18051@catbus: nickm | 2008-02-12 15:20:43 -0500Nick Mathewson
Re-tune mempool parametes based on testing on peacetime: use smaller chuncks, free them a little more aggressively, and try very hard to concentrate allocations on fuller chunks. Also, lots of new documentation. svn:r13484
2008-02-07Update some copyright notices: it is now 2008.Nick Mathewson
svn:r13412
2008-02-05 r17899@catbus: nickm | 2008-02-05 14:14:06 -0500Nick Mathewson
Fix a couple of XXX020 items. Also, disable all "condition" sychronization code, since Tor does not use it yet svn:r13380
2008-02-05Apparently, our windows code for detecting ipv6 structures has worked for a ↵Nick Mathewson
while. Remove the special-case, remove the related XXXX020s, and add useful comments instead. svn:r13377
2008-01-06 r17472@catbus: nickm | 2008-01-05 22:10:19 -0500Nick Mathewson
Another test for the increasingly bad check-spaces style checker to check: #else\n#if is almost a sure sign of a failure to use #elif. Fortunately, we only did that 3 times. svn:r13039
2007-12-12clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine
svn:r12786
2007-12-11 r17091@catbus: nickm | 2007-12-11 18:05:55 -0500Nick Mathewson
Fix compilation when --disable-threads is passed in. svn:r12768
2007-12-05 r15161@tombo: nickm | 2007-12-05 11:30:37 -0500Nick Mathewson
Fix bug reported by Steve Murphy on or-talk: detect the s6_addr32 and s6_addr16 fields via autoconf. svn:r12679
2007-12-04 r15106@tombo: nickm | 2007-12-04 00:08:35 -0500Nick Mathewson
Change tor_addr_t to be a tagged union of in_addr and in6_addr, not of sockaddr_in and sockaddr_in6. It's hardly used in the main code as it is, but let's get it right before it gets popular. svn:r12660
2007-10-22 r16016@catbus: nickm | 2007-10-21 20:44:19 -0400Nick Mathewson
Check a platform assumption we have made without checking for too long: "Characters are represented in ascii." svn:r12088
2007-08-18 r14651@catbus: nickm | 2007-08-17 21:37:03 -0400Nick Mathewson
Another attempt to confirm to msvc for bug 482. svn:r11162
2007-08-17 r14639@catbus: nickm | 2007-08-17 17:45:28 -0400Nick Mathewson
Compile without warnings on MinGW, even with --enable-gcc-warnings enabled. svn:r11157
2007-08-17 r14634@catbus: nickm | 2007-08-17 16:43:49 -0400Nick Mathewson
Try to fix bug 482: do not rely on s6_addr16 or s6_addr32 on MSVC. How ugly. svn:r11155
2007-08-02 r13907@Kushana: nickm | 2007-08-02 10:29:13 -0700Nick Mathewson
Try (once again) to fix mingw build wrt detecting ipv6 types. svn:r11037
2007-08-01 r13872@Kushana: nickm | 2007-07-31 08:27:54 -0700Nick Mathewson
Rename IN4_ADDR and IN6_ADDR to try to avoid conflicting with Windows definitions. This may fix the windows build. svn:r11011
2007-07-29 r13964@catbus: nickm | 2007-07-28 22:55:10 -0400Nick Mathewson
Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mingw compilation svn:r10963
2007-07-26 r13920@catbus: nickm | 2007-07-26 16:25:25 -0400Nick Mathewson
whitespace fixes svn:r10935
2007-07-19 r13840@catbus: nickm | 2007-07-19 16:00:43 -0400Nick Mathewson
Apparently, this problem can occur on the whole BSD family. "Yay." svn:r10884
2007-07-19 r13838@catbus: nickm | 2007-07-19 15:50:16 -0400Nick Mathewson
Apparently, OSX does not define s6_addr32 or s6_addr16. How silly. svn:r10883
2007-07-19 r13827@catbus: nickm | 2007-07-19 14:42:25 -0400Nick Mathewson
Merge in some generic address manipulation code from croup. Needs some work. svn:r10880
2007-07-05 r13454@kushana: nickm | 2007-06-20 14:22:44 -0400Nick Mathewson
Switch windows locking implementation to CRITICAL_SECTION, not Mutex: Mutex is heavier-weight, and meant for multi-process situations. svn:r10739
2007-07-01 r13570@catbus: nickm | 2007-06-30 20:41:05 -0400Nick Mathewson
Implement conditions in compat.c; switch windows to use "critical sections" instead of mutexes. Apparently, mutexes are for IPC and critical sections are for multithreaded. svn:r10716
2007-06-17 r13477@catbus: nickm | 2007-06-17 14:22:03 -0400Nick Mathewson
Sun CC likes to give warnings for the do { } while(0) construction for making statement-like macros. Define STMT_BEGIN/STMT_END macros that do the right thing, and use them everywhere. svn:r10645
2007-05-31 r13110@catbus: nickm | 2007-05-31 15:03:24 -0400Nick Mathewson
Fix windows build. svn:r10424
2007-05-25 r12955@catbus: nickm | 2007-05-25 13:17:30 -0400Nick Mathewson
First bare stubs of ipv6 work: commit some (untested, hence doublessly broken) implementations of inet_ntop/pton for systems that lack them. svn:r10326
2007-05-24 r12916@catbus: nickm | 2007-05-24 12:43:45 -0400Nick Mathewson
Add math functions to round values to the nearest power of 2. Make mempools more careful about making sure that the size of their chunks is a little less than a power of 2, not a little more. svn:r10304
2007-05-22 r12850@catbus: nickm | 2007-05-21 22:20:42 -0400Nick Mathewson
Partial backport candidate: do not rely on finding a \0 after an mmaped() router/extrainfo file. Also, set journal length correctly when starting up. svn:r10248
2007-05-15 r12764@catbus: nickm | 2007-05-15 17:17:39 -0400Nick Mathewson
Enable (and cope with) more GCC 4.2 warnings. svn:r10196
2007-04-21 r12759@Kushana: nickm | 2007-04-20 08:47:20 -0400Nick Mathewson
Track the number of connection_t separately from the number of open sockets. It is already possible to have connections that do not count: resolving conns, for one. Once we move from socketpairs to linked conns, and once we do dns proxying, there will be lots of such connections. svn:r9994
2007-03-09 r12473@Kushana: nickm | 2007-03-06 15:49:45 -0500Nick Mathewson
Excise PREDICT and PREDICT_FALSE in favor of PREDICT_LIKELY and PREDICT_UNLIKELY. svn:r9781
2007-03-06 r12468@Kushana: nickm | 2007-03-06 15:24:00 -0500Nick Mathewson
More unit tests: gcov is fun. svn:r9748
2007-02-28 r12006@catbus: nickm | 2007-02-28 16:06:24 -0500Nick Mathewson
On mingw, use "%I64u" to printf/scanf 64-bit integers, instead of the usual GCC "%llu". This prevents a bug when saving 64-bit int configuration values on mingw; the high-order 32 bits would get truncated. If the value was then reloaded, disaster would occur. (Fixes bug 400 and maybe also bug 397.) Backport candidate. svn:r9691
2007-02-28 r11998@catbus: nickm | 2007-02-28 13:56:55 -0500Nick Mathewson
Correct an MSC_VER check. svn:r9685
2007-02-28 r11992@catbus: nickm | 2007-02-28 12:46:32 -0500Nick Mathewson
compile fix on mingw: mingw does not define _MSC_VER. svn:r9682
2007-02-12 r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson
Update copyright dates. svn:r9570
2007-02-12 r11774@catbus: nickm | 2007-02-12 16:31:47 -0500Nick Mathewson
Handle errors on opening cached-routers* more uniformly and sanely: log not-found errors at level INFO, and all other errors at level WARN. Needs testing on win32. svn:r9569
2007-01-30 r11607@catbus: nickm | 2007-01-30 17:19:27 -0500Nick Mathewson
Audit non-const char arguments; make a lot more of them const. svn:r9466
2006-10-25 r9380@Kushana: nickm | 2006-10-24 21:25:07 -0400Nick Mathewson
Add string.h include to compat.h so that strlcpy() and strlcat() will always be defined after including compat.h. This should resolve warnings on centos. svn:r8824
2006-10-19 r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400Nick Mathewson
Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string. svn:r8762
2006-09-19Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)Nick Mathewson
svn:r8427
2006-09-06 r8724@Kushana: nickm | 2006-09-06 04:32:28 -0400Nick Mathewson
Fix spaces; restore support for mapping files over 4GB on win32 (?) svn:r8326
2006-09-06- made configure check if we are building for win32Mike Chiussi
- made configure link to required system dll's if building for win32 - added diffs for libevent 1.1b - forced user to turn off eventdns if win32 is set - cleaned up tor_mmap_file()_win32 (not sure if it's stable) - cleaned up some warnings and typos svn:r8322
2006-08-31 r8692@Kushana: nickm | 2006-08-31 13:38:07 -0400Nick Mathewson
Fix bug 327 (part 2): Cast char to unsigned char before passing to toupper/tolower. (Follow the same idiom as with isupper and friends, in case we run into the same problem on SGI or whereever it was.) svn:r8310
2006-08-31 r8691@Kushana: nickm | 2006-08-31 13:30:46 -0400Nick Mathewson
Fix bug 327 (part 1): Use correct macro to test for GCC 3 or later. svn:r8309
2006-08-29 r8682@Kushana: nickm | 2006-08-29 17:58:59 -0400Nick Mathewson
Fix compilation on GCC2 by disabling fun attributes unless __GNUC_MAJOR__ >= 3. svn:r8303
2006-08-28 r8626@Kushana: nickm | 2006-08-27 23:45:46 -0400Nick Mathewson
Aw, crap. Non-gcc bug. We need regular windows builds. svn:r8259
2006-08-11 r7326@Kushana: nickm | 2006-08-10 23:50:49 -0700Nick Mathewson
And another GCC change: predict that tor_frees() are usually real frees, and tor_asserts() usually wont happen. Other test should wait till -fprofile-arcs svn:r7022