summaryrefslogtreecommitdiff
path: root/src/common/compat.c
AgeCommit message (Collapse)Author
2007-02-28 r12001@catbus: nickm | 2007-02-28 15:24:12 -0500Nick Mathewson
Try to build without warnings on mingw with verbose warnings on. First attempt. svn:r9688
2007-02-26more cleanups; getting closerRoger Dingledine
svn:r9655
2007-02-24doc pedantRoger Dingledine
svn:r9634
2007-02-20 r11852@catbus: nickm | 2007-02-20 17:25:17 -0500Nick Mathewson
Reverse arguments in memset() call in no-mmap version of tor_munmap_file(). Resolves bug 392. Spotted by "fookoowa"--thanks! svn:r9604
2007-02-20 r11850@catbus: nickm | 2007-02-20 13:34:13 -0500Nick Mathewson
Apply patch from coderman: have posix subthreads mask out signals. This could prevent some kinds of crashes when subthreads try to handle SIGPIPEs and die in the attempt. Backport candidate. svn:r9603
2007-02-16 r11826@catbus: nickm | 2007-02-16 14:58:38 -0500Nick Mathewson
Resolve 56 DOCDOC comments. svn:r9594
2007-02-16 r11824@catbus: nickm | 2007-02-16 13:16:47 -0500Nick Mathewson
Move all struct-offset-manipulation macros into util.h, and use them consistently. Because there are days when "SUBTYPE_P(handle, subtype, _base)" is just easier to read and write than "(basetp*)(((handle) - STRUCT_OFFSET(subtype, _base))". svn:r9592
2007-02-13 r11791@catbus: nickm | 2007-02-13 11:36:07 -0500Nick Mathewson
Try to fix mingw compile error reported by Li-Hui Zhou. svn:r9578
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-02-02 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500Nick Mathewson
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were. Oops. Hey, kids! Fixing some of these could be your first Tor patch! svn:r9477
2007-02-01 r11620@catbus: nickm | 2007-02-01 13:06:27 -0500Nick Mathewson
Call stat() slightly less often; use fstat() when possible. svn:r9472
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-12-11when we decide not to mmap, because the file is empty or isn'tRoger Dingledine
there at all, don't yell so loud. svn:r9065
2006-12-07 r11444@Kushana: nickm | 2006-12-07 09:38:52 -0500Nick Mathewson
Fix a couple of obvious bugs in tor_mmap_file on Windows: first, fix a boolean error when checking the return value of CreateFileMapping. Second, CreateFileMapping is documented to return NULL on failure. svn:r9035
2006-12-02cleanups, bump to 0.1.2.4-alphaRoger Dingledine
svn:r9015
2006-11-21 r9371@totoro: nickm | 2006-11-21 10:59:28 -0500Nick Mathewson
Fix a trivial comment. svn:r8979
2006-11-14 r9313@totoro: nickm | 2006-11-13 20:07:41 -0500Nick Mathewson
Try to compile with fewer warnings on irix64's MIPSpro compiler / environment, which apparently believes that: - off_t can be bigger than size_t. - only mean kids assign things they do not subsequently inspect. I don't try to fix the "error" that makes it say: cc-3970 cc: WARNING File = main.c, Line = 1277 conversion from pointer to same-sized integral type (potential portability problem) uintptr_t sig = (uintptr_t)arg; Because really, what can you do about a compiler that claims to be c99 but doesn't understand that void* x = NULL; uintptr_t y = (uintptr_t) x; is safe? svn:r8948
2006-11-12Avoid assert failure when our cached-routers file is empty on startup.Roger Dingledine
(reported by revstray) svn:r8928
2006-10-20checkpoint some changes as i read diffsRoger Dingledine
svn:r8780
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-29 r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400Nick Mathewson
Differentiate more duplicated log entries svn:r8542
2006-09-28 r8750@totoro: nickm | 2006-09-27 20:52:01 -0400Nick Mathewson
Fix some warnings on mingw; hopefully this should let us build on mingw without warnings. svn:r8509
2006-09-19Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)Nick Mathewson
svn:r8427
2006-09-14 r9749@danube: weasel | 2006-09-14 06:53:12 +0200Peter Palfrader
Do not graciously increase the size to be mmaped if the current size already is at a page_size boundary. This is important since if a file has a size of zero and we mmap() it with length > 0, then accessing the mmaped memory area causes a bus error. However, if we pass a length of 0 to mmap() it will return with -1 and things work from there. svn:r8387
2006-09-06 r8725@Kushana: nickm | 2006-09-06 04:39:29 -0400Nick Mathewson
spawn_func fixes: have cpuworker_main and dnsworker_main confirm to the right interfaces [casting func to void* is icky]. Also, make pthread_create() build without warnings. svn:r8327
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-27stop three memory leaks. nick, fix these if i'm wrong.Roger Dingledine
svn:r8235
2006-08-16 r7404@Kushana: nickm | 2006-08-16 09:32:19 -0400Nick Mathewson
Pass hints to getaddrinfo; fix bug 280 (?) svn:r7069
2006-08-05 r7030@Kushana: nickm | 2006-08-04 14:46:52 -0700Nick Mathewson
Close an fd leak on failed mmap() svn:r6988
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 r7025@Kushana: nickm | 2006-08-04 12:03:22 -0700Nick Mathewson
Finish (I hope) windows mmap impl. svn:r6981
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-09Make compilation work on old MSVCs without GetVertsionEx magic. Patch from ↵Nick Mathewson
Frediano Ziglio. svn:r6749
2006-06-28Actually enable mmap. That should improve matters.Nick Mathewson
svn:r6694
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-04Add a new warning to our "warn a lot" list: unused parameters. This means ↵Nick Mathewson
we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.) svn:r6532
2006-06-03More DNS fixes. Send meaningful TTLs back to the client whenNick Mathewson
possible. Cache at the server side independently from the TTL, to prevent attackers from probing the server to see who has been asking for what hostnames. (Hi, Dan Kaminski!) Also, clean some whitespace. svn:r6526
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
2006-03-26failing in a support function is a warn, not an err.Roger Dingledine
svn:r6239
2006-03-24Check return value from GetVersionEx (even though the MSDN example doesnt) ↵Nick Mathewson
and zero out the LPOSVERSIONINFOEX struct before getting the version. This may fix the "johnboy" [major=-858993460,minor=-858993460] problem. svn:r6233
2006-02-13Start the process of converting warn to log_warn and so on.Roger Dingledine
This is needed because Windows already has an err() that we can't clobber. And we need to be able to make the log functions a macro so we can print the function's name in the log entry. svn:r6000
2006-02-09Happy new year!Roger Dingledine
svn:r5949
2006-02-09and maybe some function documentation will help tooRoger Dingledine
svn:r5935
2006-01-23On systems that don't have getrlimit (like windows), we were artificiallyRoger Dingledine
constraining ourselves to a max of 1024 connections. Now if there is no getrlimit, just assume that we can handle the whole 15000 connections. The better answer is to find a getrlimit equivalent on Windows, but hey, one step at a time. svn:r5854
2005-12-14Bite the bullet and limit all our source lines to 80 characters, the way IBM ↵Nick Mathewson
intended. svn:r5582
2005-12-10crank the max line limit down to 150 chars.Roger Dingledine
svn:r5550