aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-08-04 18:32:43 +0000
committerNick Mathewson <nickm@torproject.org>2006-08-04 18:32:43 +0000
commitbf72878cada8e60d9ceaffa6a9e7bcaf08ffe33c (patch)
tree6ecdad86da80473e4ae119bacde3f9feda40e014 /src/common/compat.h
parentabe27b807eb14960ffb0c8e7b6dd5b1b7603efd2 (diff)
downloadtor-bf72878cada8e60d9ceaffa6a9e7bcaf08ffe33c.tar
tor-bf72878cada8e60d9ceaffa6a9e7bcaf08ffe33c.tar.gz
r7012@Kushana: nickm | 2006-08-03 19:21:25 -0700
Add an "mmap handle" type to encapsulate bookkeeping elements of mmap issues; add prelim win32 impl svn:r6980
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 5b76cfe02..eb72e2e66 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -114,8 +114,12 @@ 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);
+/** Opaque bookkeeping type used for mmap accounting. */
+typedef struct tor_mmap_t tor_mmap_t;
+
+tor_mmap_t *tor_mmap_file(const char *filename,
+ const char **data, size_t *size);
+void tor_munmap_file(tor_mmap_t *handle);
int tor_snprintf(char *str, size_t size, const char *format, ...)
CHECK_PRINTF(3,4);