From cf6501eb45408c83467160c8ed026c6aab347642 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 11 Apr 2016 11:31:17 -0700 Subject: 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 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- wiretap/file_access.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wiretap/file_access.c') diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 146715d48f..03f2e7ed52 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -2283,7 +2283,7 @@ wtap_dump_open_tempfile_ng(char **filenamep, const char *pfx, fh = wtap_dump_file_fdopen(wdh, fd); if (fh == NULL) { *err = errno; - close(fd); + ws_close(fd); g_free(wdh); return NULL; /* can't create file */ } @@ -2461,7 +2461,7 @@ wtap_dump_open_finish(wtap_dumper *wdh, int file_type_subtype, gboolean compress if(compressed) { cant_seek = TRUE; } else { - fd = fileno((FILE *)wdh->fh); + fd = ws_fileno((FILE *)wdh->fh); if (ws_lseek64(fd, 1, SEEK_CUR) == (off_t) -1) cant_seek = TRUE; else { -- cgit v1.2.3