diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-05-28 16:54:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-05-28 16:54:39 +0000 |
commit | 64d487a2d6d916fd12943db5585364e13f1aa43c (patch) | |
tree | 1c1eb35de4953cb7915b3be9d07e0c64482c2a2f /src/common/compat.h | |
parent | f6ff3e6f0eebb18ab935e1229f7601bad941d2d0 (diff) | |
download | tor-64d487a2d6d916fd12943db5585364e13f1aa43c.tar.gz tor-64d487a2d6d916fd12943db5585364e13f1aa43c.zip |
Add a basic mmap function, with a "fake-it" wrapper to do read_file_from_str instead. Based on code from Michael Mohr.
svn:r6510
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 25876ef18d..43199d9302 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -101,6 +101,9 @@ size_t strlcpy(char *dst, const char *src, size_t siz); #define U64_LITERAL(n) (n ## llu) #endif +const char *tor_mmap_file(const char *filename, size_t *size); +void tor_munmap_file(const char *memory, size_t size); + int tor_snprintf(char *str, size_t size, const char *format, ...) CHECK_PRINTF(3,4); int tor_vsnprintf(char *str, size_t size, const char *format, va_list args); |