aboutsummaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2018-07-02Don't redefine str(n)casecmp on windows unless they're missingNick Mathewson
When we do redefine them, use inline functions instead of #define. This fixes a latent code problem in our redefinition of these functions, which was exposed by our refactoring: Previously, we would #define strcasecmp after string.h was included, so nothing bad would happen. But when we refactored, we would sometimes #define it first, which was a problem on mingw, whose headers contain (approximately): inline int strcasecmp (const char *a, const char *b) { return _stricmp(a,b); } Our define turned this into: inline int _stricmp(const char *a, const char *b) { return _stricmp(a,b); } And GCC would correctly infer that this function would loop forever, rather than actually comparing anything. This caused bug 26594. Fixes bug 26594; bug not in any released version of Tor.
2018-07-01File-level documentation for some of src/lib.Nick Mathewson
2018-07-01Prune the .may_include files a bit; detect unused lines in themNick Mathewson
2018-07-01Tabify all of the .am files.Nick Mathewson
2018-06-29add an include to fix macos, and probably bsd tooNick Mathewson
2018-06-29Remove non-windows system includes from compat.h and util.hNick Mathewson
2018-06-29Move SIO_IDEAL_SEND_BACKLOG_QUERY into socket.hNick Mathewson
2018-06-29Remove an errant (and unused) include permission in lib/tlsNick 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 SUBTYPE_P into compat_compiler.hNick Mathewson
2018-06-29Move bool_eq and bool_neq to lib/intmathNick 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-28Merge remote-tracking branch 'catalyst-github/fix-macos-includes'Nick Mathewson
2018-06-28Fix macOS includesTaylor Yu
Recent code movement from refactoring missed some includes that seem to be necessary on macOS.
2018-06-28Fix a bogus n in a commentNick Mathewson
2018-06-28A couple of includes to make windows compile againNick Mathewson
2018-06-28Move buffers into containerNick Mathewson
Split the network-only and compression-only parts of buffers into the appropriate modules.
2018-06-28Add sys/capability.h and sys/prctl.h includes in setuid.cNick Mathewson
2018-06-28compat_threads.c needs string.h for memset.Nick Mathewson
2018-06-28Remove all include common/ uses in crypto_ops and tls.Nick Mathewson
2018-06-28Fix windows compilation in compat_timeNick Mathewson
We need to use lib/fs/winlib.h here so that we can use GetTickCount64. I would love to declare that XP is dead, and everybody has GetTickCount64.
2018-06-28Use tor_ntohs in compress.c; avoid a winsocks dependencyNick Mathewson
2018-06-28fixup! Extract time functionality into lib/wallclock and lib/timeNick Mathewson
2018-06-28Move DLL support to lib/fsNick Mathewson
2018-06-28Add ntohs and htons to lib/arch/bytes.hNick Mathewson
2018-06-28Update lib/compress to not require common/*.hNick Mathewson
2018-06-28Move MIN and MAX into lib/intmath/cmp.hNick Mathewson
2018-06-28Extract time functionality into lib/wallclock and lib/timeNick Mathewson
2018-06-28Move floating-point math functions into a new lib/mathNick Mathewson
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 string_is_key_value to lib/encodingNick Mathewson
2018-06-28Move weakrng into lib/intmathNick 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-28Move conffile and storagedir to lib/fsNick Mathewson
2018-06-28Extract memarea into its own libraryNick Mathewson
2018-06-28Extract threading code into a new library.Nick Mathewson
Note that the workqueue code does *not* go here: it is logically at a higher level, since it needs to use libevent and the networking stack.
2018-06-28Extract the alert-socket code into lib/net.Nick Mathewson
This code was in compat_threads, since it was _used_ for efficiently notifying the main libevent thread from another thread. But in spite of its usage, it's fundamentally a part of the network code.
2018-06-27Move confline.c to lib/encoding: it is about encoding key-value pairsNick Mathewson
Also, move "unescape_string()" to encoding too, since it's about encoding data as C strings.
2018-06-27Move hex_str to binascii.cNick Mathewson
2018-06-27Extract time encoding functions into lib/encodingNick Mathewson
2018-06-27Move util_format into a new libtor-encoding libraryNick Mathewson
libtor-encoding is about various ways to transform data to and from character sequences.
2018-06-27Move several address-string-testing functions to address.cNick Mathewson
2018-06-27Move various mem* functions to lib/stringNick Mathewson
2018-06-27Move tor_strtok_r to libtor-stringNick Mathewson