diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-04-11 11:31:17 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-04-13 02:16:20 +0000 |
commit | cf6501eb45408c83467160c8ed026c6aab347642 (patch) | |
tree | 84755bcc3bbdb9a1b7dcc69e171ab2f947f0ed0a /wsutil/tempfile.c | |
parent | f6b8b4dca5c05f0e6011ca8d8ef670beb911ac39 (diff) | |
download | wireshark-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/tempfile.c')
-rw-r--r-- | wsutil/tempfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c index 4be05f8b84..2835735006 100644 --- a/wsutil/tempfile.c +++ b/wsutil/tempfile.c @@ -65,7 +65,7 @@ mkstemp (char *path_template) } if (g_snprintf (&path_template[len - 5], 6, "%.5u", - (unsigned int) getpid () % 100000) != 5) + (unsigned int) ws_getpid () % 100000) != 5) /* Inconceivable lossage. */ return -1; @@ -109,7 +109,7 @@ mkdtemp (char *path_template) } if (g_snprintf (&path_template[len - 5], 6, "%.5u", - (unsigned int) getpid () % 100000) != 5) + (unsigned int) ws_getpid () % 100000) != 5) /* Inconceivable lossage. */ return NULL; @@ -221,9 +221,9 @@ create_tempfile(char **namebuf, const char *pfx) the umask to 0077 to take away all group and other permissions, attempt to create the file, and then put the umask back. */ - old_umask = umask(0077); + old_umask = ws_umask(0077); fd = mkstemp(tf[idx].path); - umask(old_umask); + ws_umask(old_umask); return fd; } |