summaryrefslogtreecommitdiff
path: root/src/common/compat.c
AgeCommit message (Collapse)Author
2018-06-29Remove compat.c and util.cNick Mathewson
2018-06-29Extract getpass to a new lib/term libraryNick Mathewson
(Term is short for terminal)
2018-06-29Extract get_uname to lib/osinfo.Nick Mathewson
2018-06-29Move fd and memory-info functions.Nick Mathewson
2018-06-29Move tor_get_avail_disk_space() to lib/fsNick Mathewson
2018-06-28Fix macOS includesTaylor Yu
Recent code movement from refactoring missed some includes that seem to be necessary on macOS.
2018-06-28Move compute_num_cpus to lib/threadNick Mathewson
2018-06-28Move network_init to lib/netNick Mathewson
2018-06-28Move tor_gethostname to lib/netNick Mathewson
2018-06-28Move lockfile code into lib/fsNick Mathewson
2018-06-28Move socket-errno code into lib/netNick Mathewson
2018-06-28Extract process-management functionality into a new lib/processNick Mathewson
Note that procmon does *not* go here, since procmon needs to integrate with the event loop.
2018-06-27Extract time encoding functions into lib/encodingNick Mathewson
2018-06-27Move various mem* functions to lib/stringNick Mathewson
2018-06-27Move tor_strtok_r to libtor-stringNick Mathewson
2018-06-27Move set/get_uint*() to inline functions in arch/bytes.hNick Mathewson
Also move our ntohll/htonll functions.
2018-06-27Extract functions from compat.c and util.h into a new fs libraryNick Mathewson
2018-06-27Move format_win32_error into lib/log/Nick Mathewson
2018-06-27Fix up include paths for sandbox.h (automated)Nick Mathewson
2018-06-27rectify include paths (automatic) for address.hNick Mathewson
2018-06-27Move network code to libtor-net.Nick Mathewson
There are some additional changes to come: those points are marked by XXXX.
2018-06-22Remove util_bug dependency on compat.hNick Mathewson
2018-06-22Finally extract the log library and make it build.Nick Mathewson
This patch: - introduces an fdio module for low-level fd functions that don't need to log. - moves the responsibility for opening files outside of torlog.c, so it won't need to call tor_open_cloexec.
2018-06-22Extract strlcpy and strlcmp to libtor-stringNick Mathewson
2018-06-22Extract core part of gmtime_r, localtime_r (without logging)Nick Mathewson
2018-06-22Automated fixup of include paths after torlog.h movement.Nick Mathewson
2018-06-22Extract key string manipulation functions into a new library.Nick Mathewson
2018-06-22Extract smartlist.h from container.hNick Mathewson
2018-06-22Rectify include paths after container split (automatic)Nick Mathewson
2018-06-20Remove all use of the assert.h headerNick Mathewson
Nothing in Tor has actually called assert() for some while.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-04-12Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-12Make get_total_system_memory mockable.Alexander Færøy
This patch makes get_total_system_memory mockable, which allows us to alter the return value of the function in tests. See: https://bugs.torproject.org/24782
2018-03-28Merge remote-tracking branch 'hello71/bug25398'Nick Mathewson
2018-03-22Do not page-align mmap length. #25399Alex Xu (Hello71)
2018-03-02Remove uncompilable tor_mmap_file fallback. #25398Alex Xu (Hello71)
2018-02-20Remove a bunch of other redundant #includesNick Mathewson
Folks have found two in the past week or so; we may as well fix the others. Found with: \#!/usr/bin/python3 import re def findMulti(fname): includes = set() with open(fname) as f: for line in f: m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line) if m: inc = m.group(1) if inc in includes: print("{}: {}".format(fname, inc)) includes.add(m.group(1)) import sys for fname in sys.argv[1:]: findMulti(fname)
2018-02-15Merge branch 'bug18105'Nick Mathewson
2018-02-07more fixes for typos, grammar, whitespace, etcRoger Dingledine
some of these ought to have been noticed by the "misspell" tool, so if anybody is debugging it, here are some bug reports :)
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-01-26Use tor_addr_from_getsockname() in several placesNick Mathewson
I'm leaving the getsockname code in transproxy alone, since it is comparatively isolated, rather platform-specific, and hard to test. Implements 18105.
2018-01-26Add a new tor_addr_from_getsockname()Nick Mathewson
We use this pattern all over, and this should simplify matters a bit. Part of 18105.
2018-01-17Merge branch 'bug21074_029'Nick Mathewson
2018-01-17Add a cast to avoid a signed/unsigned comparisonNick Mathewson
2018-01-16Merge branch 'bug21074_029'Nick Mathewson
2018-01-04Don't treat a setrlimit failure as fatal.Nick Mathewson
Fixes bug 21074; bugfix on 4689243242e2e12 in 0.0.9rc5 when we started doing setrlimit() in the first place.
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-10-18New function for Tor to treat itself as the "owner" of a socketNick Mathewson
Our socket accounting functions assumed that we'd never be asked to close a socket that we didn't open ourselves. But now we want to support taking control sockets that we inherit -- so we need a way of taking ownership of them, so we don't freak out later on when we close them.
2017-10-18Make the mark_socket_open() no-op treat the socket as used.Nick Mathewson
This is preliminary for extracting the "take socket ownership" code into its own function.