summaryrefslogtreecommitdiff
path: root/src/common/compat.h
AgeCommit message (Collapse)Author
2008-12-30Remove some code that is #ifdefed out, and that we no longer seem to use, if ↵Nick Mathewson
we ever did. svn:r17827
2008-12-29Use a consistent naming standard for header file guard macros, taking care ↵Nick Mathewson
not to collide with any system headers. This tripped us up on Android. svn:r17805
2008-12-11Remove some cargo-cult gcc hacks around tor_assert and predict_unlikely; ↵Nick Mathewson
instead, use the standard convert-to-boolean hack of "svn st" svn:r17597
2008-12-05Simplify mmap object layout to avoid confusing static analysis tools, and us ↵Nick Mathewson
too. svn:r17490
2008-12-02Add two lseek wrappers to compat.[ch]: one to return current fd position, ↵Nick Mathewson
and one to move the fd to the end of the file. svn:r17454
2008-12-02Define socklen_t before using it in compat.hNick Mathewson
svn:r17444
2008-11-12define get_uint8 and set_uint8 macros to make code cleaner.Nick Mathewson
svn:r17261
2008-11-07Patch from Jacob Appelbaum and me to make User option more robust, properly ↵Steven Murdoch
set supplementary groups, deprecated the Group option, and log more information on credential switching svn:r17200
2008-10-27Document some dmalloc stuff and some stupid C tricks.Nick Mathewson
svn:r17161
2008-09-01Add a lockfile to the Tor data directory to avoid situations where two Tors ↵Nick Mathewson
start with the same datadir, or where a --list-fingerprints races with a server to create keys, or such. svn:r16722
2008-09-01Fix compile on OpenBSD 4.4-current. Bugfix on 0.2.1.5-alpha.Roger Dingledine
Reported by Tas. svn:r16713
2008-08-25commit jake's patch to include strings with socks5 error numbersRoger Dingledine
svn:r16657
2008-08-22 r17848@tombo: nickm | 2008-08-22 12:10:11 -0400Nick Mathewson
Make definition of tor_mutex_t go into compat.h, so that it is possible to inline mutexes in critical objects. Add init/uninit functions for mutexes allocated inside other structs. svn:r16623
2008-07-25 r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200Nick Mathewson
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much. svn:r16208
2008-07-24 r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200Nick Mathewson
Make generic address manipulation functions work better. Switch address policy code to use tor_addr_t, so it can handle IPv6. That is a good place to start. svn:r16178
2008-07-09Stop using __attribute__((nonnull)): It gets us occcasional warnings when we ↵Nick Mathewson
do something so foolish it can be detected without dataflow analysis, but it also eliminates some of our error checking code. Suggested by Peter Gutmann. svn:r15803
2008-05-16 r19795@catbus: nickm | 2008-05-16 14:54:24 -0400Nick Mathewson
Rename tor_addr_t manipulation functions for a consistent style. svn:r14639
2008-02-21 r14371@tombo: nickm | 2008-02-21 16:13:18 -0500Nick Mathewson
Fix all -Wshorten-64-to-32 warnings that appear on my macbook. svn:r13662
2008-02-21 r18291@catbus: nickm | 2008-02-20 22:35:32 -0500Nick Mathewson
Resolve all DOCDOC issues, and document some other undocumented code, and fix a changelog entry. svn:r13638
2008-02-20 r18269@catbus: nickm | 2008-02-20 17:28:24 -0500Nick Mathewson
Apply patch from Sebastian Hahn: stop imposing an arbitrary maximum on the number of file descriptors used for busy servers. Bug reported by Olaf Selke. svn:r13626
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