summaryrefslogtreecommitdiff
path: root/wsutil/file_util.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-04-11 11:31:17 -0700
committerMichael Mann <mmann78@netscape.net>2016-04-13 02:16:20 +0000
commitcf6501eb45408c83467160c8ed026c6aab347642 (patch)
tree84755bcc3bbdb9a1b7dcc69e171ab2f947f0ed0a /wsutil/file_util.h
parentf6b8b4dca5c05f0e6011ca8d8ef670beb911ac39 (diff)
downloadwireshark-cf6501eb45408c83467160c8ed026c6aab347642.tar.gz
Windows: Remove the need for _CRT_NONSTDC_NO_DEPRECATE.
Replace some function calls with their non-deprecated equivalents so that we can remove _CRT_NONSTDC_NO_DEPRECATE from CMakeLists.txt and config.nmake. Leave _CRT_SECURE_NO_DEPRECATE in place. Removing it failed with 145 warnings and 72 errors. Note that we could probably improve startup performance by using wmem in diam_dict.*. Change-Id: I6e130003de838aebedbdd1aa78c50de8a339ddcb Reviewed-on: https://code.wireshark.org/review/14883 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wsutil/file_util.h')
-rw-r--r--wsutil/file_util.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/wsutil/file_util.h b/wsutil/file_util.h
index 1588ced5de..d10cc817f7 100644
--- a/wsutil/file_util.h
+++ b/wsutil/file_util.h
@@ -121,6 +121,15 @@ WS_DLL_PUBLIC FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode,
#define ws_fstat64 _fstati64 /* use _fstati64 for 64-bit size support */
#define ws_lseek64 _lseeki64 /* use _lseeki64 for 64-bit offset support */
#define ws_fdopen _fdopen
+#define ws_fileno _fileno
+#define ws_isatty _isatty
+
+/*
+ * Other CRT functions. getpid probably belongs in sys_util.h or proc_util.h
+ * but neither yet exist.
+ */
+#define ws_getpid _getpid
+#define ws_umask _umask
/* DLL loading */
@@ -189,8 +198,14 @@ WS_DLL_PUBLIC void create_app_running_mutex();
#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 */
#define ws_fdopen fdopen
+#define ws_fileno fileno
+#define ws_isatty isatty
#define O_BINARY 0 /* Win32 needs the O_BINARY flag for open() */
+/* Other CRT functions */
+#define ws_getpid getpid
+#define ws_umask umask
+
#endif /* _WIN32 */
/* directory handling */