From 2e7c531fdc63ed3d96180a10ea5d7d27989092a9 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Mon, 29 Jul 2013 15:46:57 +0200 Subject: Prepare some mock functions to test #9288. --- src/common/util.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/common/util.h') diff --git a/src/common/util.h b/src/common/util.h index ad75266587..505ef23bd2 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -491,18 +491,21 @@ FILE *tor_process_get_stdout_pipe(process_handle_t *process_handle); #endif #ifdef _WIN32 -struct smartlist_t * -tor_get_lines_from_handle(HANDLE *handle, - enum stream_status *stream_status); +MOCK_DECL(struct smartlist_t *, +tor_get_lines_from_handle,(HANDLE *handle, + enum stream_status *stream_status)); #else -struct smartlist_t * -tor_get_lines_from_handle(FILE *handle, - enum stream_status *stream_status); +MOCK_DECL(struct smartlist_t *, +tor_get_lines_from_handle,(FILE *handle, + enum stream_status *stream_status)); #endif -int tor_terminate_process(process_handle_t *process_handle); -void tor_process_handle_destroy(process_handle_t *process_handle, - int also_terminate_process); +int +tor_terminate_process(process_handle_t *process_handle); + +MOCK_DECL(void, +tor_process_handle_destroy,(process_handle_t *process_handle, + int also_terminate_process)); /* ===== Insecure rng */ typedef struct tor_weak_rng_t { -- cgit v1.2.3-54-g00ecf