aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
Commit message (Collapse)AuthorAge
* r12700@catbus: nickm | 2007-05-09 17:22:53 -0400Nick Mathewson2007-05-09
| | | | | | | [Backport candidate] On windows, open cached-routers with the sharing mode "FILE_SHARE_READ so that other processes can read it while Tor is running. (Reported by Janbar). svn:r10148
* r12546@catbus: nickm | 2007-04-29 21:27:43 -0400Nick Mathewson2007-04-30
| | | | | | | Correctly report win98se and win95osr2 versions. svn:r10047
* r12759@Kushana: nickm | 2007-04-20 08:47:20 -0400Nick Mathewson2007-04-21
| | | | | | | 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
* r12191@catbus: nickm | 2007-03-15 15:33:37 -0400Nick Mathewson2007-03-17
| | | | | | | Check return values from pthread_mutex functions. svn:r9862
* clean up some minor typos and log confusionsRoger Dingledine2007-03-15
| | | | svn:r9832
* r12001@catbus: nickm | 2007-02-28 15:24:12 -0500Nick Mathewson2007-02-28
| | | | | | | Try to build without warnings on mingw with verbose warnings on. First attempt. svn:r9688
* more cleanups; getting closerRoger Dingledine2007-02-26
| | | | svn:r9655
* doc pedantRoger Dingledine2007-02-24
| | | | svn:r9634
* r11852@catbus: nickm | 2007-02-20 17:25:17 -0500Nick Mathewson2007-02-20
| | | | | | | Reverse arguments in memset() call in no-mmap version of tor_munmap_file(). Resolves bug 392. Spotted by "fookoowa"--thanks! svn:r9604
* r11850@catbus: nickm | 2007-02-20 13:34:13 -0500Nick Mathewson2007-02-20
| | | | | | | 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
* r11826@catbus: nickm | 2007-02-16 14:58:38 -0500Nick Mathewson2007-02-16
| | | | | | | Resolve 56 DOCDOC comments. svn:r9594
* r11824@catbus: nickm | 2007-02-16 13:16:47 -0500Nick Mathewson2007-02-16
| | | | | | | 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
* r11791@catbus: nickm | 2007-02-13 11:36:07 -0500Nick Mathewson2007-02-13
| | | | | | | Try to fix mingw compile error reported by Li-Hui Zhou. svn:r9578
* r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson2007-02-12
| | | | | | | Update copyright dates. svn:r9570
* r11774@catbus: nickm | 2007-02-12 16:31:47 -0500Nick Mathewson2007-02-12
| | | | | | | 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
* r11629@catbus: nickm | 2007-02-02 15:06:17 -0500Nick Mathewson2007-02-02
| | | | | | | 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
* r11620@catbus: nickm | 2007-02-01 13:06:27 -0500Nick Mathewson2007-02-01
| | | | | | | Call stat() slightly less often; use fstat() when possible. svn:r9472
* r11607@catbus: nickm | 2007-01-30 17:19:27 -0500Nick Mathewson2007-01-30
| | | | | | | Audit non-const char arguments; make a lot more of them const. svn:r9466
* when we decide not to mmap, because the file is empty or isn'tRoger Dingledine2006-12-11
| | | | | | | there at all, don't yell so loud. svn:r9065
* r11444@Kushana: nickm | 2006-12-07 09:38:52 -0500Nick Mathewson2006-12-07
| | | | | | | 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
* cleanups, bump to 0.1.2.4-alphaRoger Dingledine2006-12-02
| | | | svn:r9015
* r9371@totoro: nickm | 2006-11-21 10:59:28 -0500Nick Mathewson2006-11-21
| | | | | | | Fix a trivial comment. svn:r8979
* r9313@totoro: nickm | 2006-11-13 20:07:41 -0500Nick Mathewson2006-11-14
| | | | | | | | | | | | | | | | | | | | | | | 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
* Avoid assert failure when our cached-routers file is empty on startup.Roger Dingledine2006-11-12
| | | | | | | (reported by revstray) svn:r8928
* checkpoint some changes as i read diffsRoger Dingledine2006-10-20
| | | | svn:r8780
* r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400Nick Mathewson2006-10-19
| | | | | | | 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
* r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400Nick Mathewson2006-09-29
| | | | | | | Differentiate more duplicated log entries svn:r8542
* r8750@totoro: nickm | 2006-09-27 20:52:01 -0400Nick Mathewson2006-09-28
| | | | | | | Fix some warnings on mingw; hopefully this should let us build on mingw without warnings. svn:r8509
* Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)Nick Mathewson2006-09-19
| | | | svn:r8427
* r9749@danube: weasel | 2006-09-14 06:53:12 +0200Peter Palfrader2006-09-14
| | | | | | | | | | | 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
* r8725@Kushana: nickm | 2006-09-06 04:39:29 -0400Nick Mathewson2006-09-06
| | | | | | | 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
* r8724@Kushana: nickm | 2006-09-06 04:32:28 -0400Nick Mathewson2006-09-06
| | | | | | | Fix spaces; restore support for mapping files over 4GB on win32 (?) svn:r8326
* - made configure check if we are building for win32Mike Chiussi2006-09-06
| | | | | | | | | | | | | - 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
* stop three memory leaks. nick, fix these if i'm wrong.Roger Dingledine2006-08-27
| | | | svn:r8235
* r7404@Kushana: nickm | 2006-08-16 09:32:19 -0400Nick Mathewson2006-08-16
| | | | | | | Pass hints to getaddrinfo; fix bug 280 (?) svn:r7069
* r7030@Kushana: nickm | 2006-08-04 14:46:52 -0700Nick Mathewson2006-08-05
| | | | | | | Close an fd leak on failed mmap() svn:r6988
* r7029@Kushana: nickm | 2006-08-04 14:08:41 -0700Nick Mathewson2006-08-05
| | | | | | | Remove now-spurious size and data arguments from tor_mmap_file svn:r6987
* r7028@Kushana: nickm | 2006-08-04 13:10:16 -0700Nick Mathewson2006-08-05
| | | | | | | Make data and size fields visible in tor_mmap_t; hide win magic differently. svn:r6986
* r7025@Kushana: nickm | 2006-08-04 12:03:22 -0700Nick Mathewson2006-08-04
| | | | | | | Finish (I hope) windows mmap impl. svn:r6981
* r7012@Kushana: nickm | 2006-08-03 19:21:25 -0700Nick Mathewson2006-08-04
| | | | | | | Add an "mmap handle" type to encapsulate bookkeeping elements of mmap issues; add prelim win32 impl svn:r6980
* Make compilation work on old MSVCs without GetVertsionEx magic. Patch from ↵Nick Mathewson2006-07-09
| | | | | | Frediano Ziglio. svn:r6749
* Actually enable mmap. That should improve matters.Nick Mathewson2006-06-28
| | | | svn:r6694
* simplify code now that libevent considers all sockets pollable.Roger Dingledine2006-06-05
| | | | | | | what we really mean now is ">= 0", which is clearer to test for. svn:r6543
* Add a new warning to our "warn a lot" list: unused parameters. This means ↵Nick Mathewson2006-06-04
| | | | | | we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.) svn:r6532
* More DNS fixes. Send meaningful TTLs back to the client whenNick Mathewson2006-06-03
| | | | | | | | | | | 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
* Add a basic mmap function, with a "fake-it" wrapper to do read_file_from_str ↵Nick Mathewson2006-05-28
| | | | | | instead. Based on code from Michael Mohr. svn:r6510
* Throw out this UNALIGNED_INT_ACCESS_OK nonsense. Even where it works, it is ↵Nick Mathewson2006-05-23
| | | | | | often way way slower than doing the right thing. Backport candidate. svn:r6473
* failing in a support function is a warn, not an err.Roger Dingledine2006-03-26
| | | | svn:r6239
* Check return value from GetVersionEx (even though the MSDN example doesnt) ↵Nick Mathewson2006-03-24
| | | | | | and zero out the LPOSVERSIONINFOEX struct before getting the version. This may fix the "johnboy" [major=-858993460,minor=-858993460] problem. svn:r6233
* Start the process of converting warn to log_warn and so on.Roger Dingledine2006-02-13
| | | | | | | | | 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