diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-08 02:31:01 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-08 10:32:09 +0000 |
commit | caa1e87410fb74606f2ec91b5fd1b897053149bf (patch) | |
tree | 7d46afa570a24957716f5b74add64760bfeb5079 /wsutil/file_util.h | |
parent | 11bdadacc27d3781c3fd0d759068fddd3da9107c (diff) |
Use ws_{read,write,fdopen,close}.
Be more consistent about using the ws_ routines, as we suggest in
README.developer.
In C++ on UN*X, define ws_close as ::close rather than close, so that it
works even in classes with methods or members named "close".
Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591
Reviewed-on: https://code.wireshark.org/review/11637
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/file_util.h')
-rw-r--r-- | wsutil/file_util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wsutil/file_util.h b/wsutil/file_util.h index dff51bbe83..813c349cfc 100644 --- a/wsutil/file_util.h +++ b/wsutil/file_util.h @@ -182,7 +182,14 @@ WS_DLL_PUBLIC void create_app_running_mutex(); #define ws_read read #define ws_write write +#ifdef __cplusplus +/* + * Just in case this is used in a class with a close method or member. + */ +#define ws_close ::close +#else #define ws_close close +#endif #define ws_dup dup #define ws_fstat64 fstat /* AC_SYS_LARGEFILE should make off_t 64-bit */ #define ws_lseek64 lseek /* AC_SYS_LARGEFILE should make off_t 64-bit */ |