aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
AgeCommit message (Collapse)Author
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
2006-08-11 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700Nick Mathewson
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation. svn:r7020
2006-08-05 r7029@Kushana: nickm | 2006-08-04 14:08:41 -0700Nick Mathewson
Remove now-spurious size and data arguments from tor_mmap_file svn:r6987
2006-08-05 r7028@Kushana: nickm | 2006-08-04 13:10:16 -0700Nick Mathewson
Make data and size fields visible in tor_mmap_t; hide win magic differently. svn:r6986
2006-08-04 r7012@Kushana: nickm | 2006-08-03 19:21:25 -0700Nick Mathewson
Add an "mmap handle" type to encapsulate bookkeeping elements of mmap issues; add prelim win32 impl svn:r6980
2006-07-31 r6978@Kushana: nickm | 2006-07-31 13:16:14 -0400Nick Mathewson
Add isupper and islower wrappers to compat.h svn:r6957
2006-07-21Another MSVC6 fix. Grnk.Nick Mathewson
svn:r6802
2006-07-17MSVC6 is apparently terrified of unnatural cross-breeding between uint64_t ↵Nick Mathewson
and double, and needs more persuasion than usual to cast one to the other. Issue identified by Frediano Ziglio; patch revised for minimal impact on non-MSVC6 compilers. svn:r6768
2006-07-04minor fixesRoger Dingledine
svn:r6710
2006-06-05simplify code now that libevent considers all sockets pollable.Roger Dingledine
what we really mean now is ">= 0", which is clearer to test for. svn:r6543
2006-06-03Patch based on post by Mike C to or-dev; special-case based on use of MSVC, ↵Nick Mathewson
rather than on MS_WINDOWS, so that mingw builds. svn:r6523
2006-05-28Add a basic mmap function, with a "fake-it" wrapper to do read_file_from_str ↵Nick Mathewson
instead. Based on code from Michael Mohr. svn:r6510
2006-05-23Throw out this UNALIGNED_INT_ACCESS_OK nonsense. Even where it works, it is ↵Nick Mathewson
often way way slower than doing the right thing. Backport candidate. svn:r6473