Commit Graph

27 Commits

Author SHA1 Message Date
Nick Mathewson feed41bed3 Merge branch 'maint-0.3.4' 2018-10-15 12:47:46 -04:00
Nick Mathewson 23ce9a60fb Merge branch 'maint-0.3.4' 2018-10-15 10:48:35 -04:00
Nick Mathewson 4983322cc7 Merge branch 'maint-0.3.4' 2018-10-15 10:37:53 -04:00
Nick Mathewson 219f6ea516 Fix log.c comments about assert vs tor_assert vs raw_assert. 2018-08-28 15:58:16 -04:00
Nick Mathewson acb54dee7b Remove a now-obsolete comment about deadcode_dummy__ 2018-07-30 09:09:10 -04:00
Nick Mathewson c515dc8d0d Remove over-cleverness from our coverity BUG() definition.
Our previous definition implied that code would never keep running
if a BUG occurred (which it does), and that BUG(x) might be true
even if x was false (which it can't be).

Closes ticket 26890. Bugfix on 0.3.1.4-alpha.
2018-07-20 11:19:54 -04:00
Nick Mathewson 5aee26ee46 Move all use cases of micro-revision.i to a single place
That place is git-revision.c; git-revision.c now lives in lib/log.

Also fix the compilation rules so that all object files that need
micro-revision.i depend on it.
2018-07-11 09:52:39 -04:00
Nick Mathewson b6d0e7caa4 Rename tm_cvt to time_to_tm 2018-07-10 15:25:53 -04:00
Nick Mathewson e7f5f48d68 Rename torlog.[ch] to log.[ch]
Fun fact: these files used to be called log.[ch] until we ran into
conflicts with systems having a log.h file.  But now that we always
include "lib/log/log.h", we should be fine.
2018-07-10 15:20:30 -04:00
Nick Mathewson 41640b6573 Rename util_malloc to malloc. 2018-07-10 15:16:57 -04:00
Nick Mathewson 4f42c923d6 File-level summary documentation for src/lib/*/*.[ch] 2018-07-10 12:22:01 -04:00
Nick Mathewson 000de2f2ac Merge branch 'fs_refactor' 2018-06-27 14:45:17 -04:00
Nick Mathewson b9b05e437d Merge branch 'net_refactor' 2018-06-27 12:52:31 -04:00
Nick Mathewson 3d606dddb9 fixup! Move format_win32_error into lib/log/ 2018-06-27 12:35:48 -04:00
Nick Mathewson 3246c114a2 Move format_win32_error into lib/log/ 2018-06-27 12:30:11 -04:00
Nick Mathewson 67135ca8e0 Split read_all and write_all into separate functions 2018-06-27 10:47:42 -04:00
Nick Mathewson 7159edf909 Move the escape-for-log code into src/lib/log
It doesn't need anything higher-level, and everything that needs the
logs potentially needs this.
2018-06-26 20:51:17 -04:00
Nick Mathewson b1de1e7a77 Extract core part of smartlist code into its own library.
The smartlist_core library now contains only the parts of smartlists
that are needed for the logging library.  This resolves the
circularity between "container" and "log".

The "containers" library still uses the logging code, and has the
higher-level smartlist functions.
2018-06-26 12:13:23 -04:00
Nick Mathewson 4118ba67db Update the micro-revision.i dependencies, and add a stdlib.h 2018-06-22 13:25:58 -04:00
Nick Mathewson cf66544941 Two more small changes for CI. 2018-06-22 13:10:52 -04:00
Nick Mathewson bcf3e546d1 Move util_bug into libtor-log 2018-06-22 11:54:38 -04:00
Nick Mathewson 7a93ce8f63 Update .gitignore and .may_include files 2018-06-22 11:46:44 -04:00
Nick Mathewson 79f73ab330 Finally extract the log library and make it build.
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-22 11:40:20 -04:00
Nick Mathewson bfb39164ce Extract core part of gmtime_r, localtime_r (without logging) 2018-06-22 11:17:11 -04:00
Nick Mathewson b2d4e786b7 Remove the util_bug.h include from smartlist.h.
This change makes a whole bunch of things in torlog.c break, since
apparently I did not find all the fd dependencies.
2018-06-22 10:50:14 -04:00
Nick Mathewson da4ae8a6b6 Automated fixup of include paths after torlog.h movement. 2018-06-22 10:32:10 -04:00
Nick Mathewson 97b15a1d7c Extract the locking and logging code
The locking code gets its own module, since it's more fundamental
than the higher-level locking code.

Extracting the logging code was the whole point here. :)
2018-06-22 10:31:51 -04:00