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 /capchild | |
parent | f6b8b4dca5c05f0e6011ca8d8ef670beb911ac39 (diff) |
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 'capchild')
-rw-r--r-- | capchild/capture_sync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c index 310c767f7d..edd0c5de7a 100644 --- a/capchild/capture_sync.c +++ b/capchild/capture_sync.c @@ -1617,7 +1617,7 @@ pipe_read_bytes(int pipe_fd, char *bytes, int required, char **msg) int error; while(required) { - newly = read(pipe_fd, &bytes[offset], required); + newly = ws_read(pipe_fd, &bytes[offset], required); if (newly == 0) { /* EOF */ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, @@ -1684,7 +1684,7 @@ sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max) { offset++; if (! pipe_data_available(pipe_fd)) break; - newly = read(pipe_fd, &bytes[offset], 1); + newly = ws_read(pipe_fd, &bytes[offset], 1); if (newly == 0) { /* EOF - not necessarily an error */ break; @@ -1771,7 +1771,7 @@ pipe_read_block(int pipe_fd, char *indicator, int len, char *msg, /* we have a problem here, try to read some more bytes from the pipe to debug where the problem really is */ memcpy(msg, header, sizeof(header)); - newly = read(pipe_fd, &msg[sizeof(header)], len-sizeof(header)); + newly = ws_read(pipe_fd, &msg[sizeof(header)], len-sizeof(header)); if (newly < 0) { /* error */ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "read from pipe %d: error(%u): %s", pipe_fd, errno, g_strerror(errno)); @@ -2189,7 +2189,7 @@ signal_pipe_capquit_to_child(capture_session *cap_session) /* it doesn't matter *what* we send here, the first byte will stop the capture */ /* simply sending a "QUIT" string */ /*pipe_write_block(cap_session->signal_pipe_write_fd, SP_QUIT, quit_msg);*/ - ret = write(cap_session->signal_pipe_write_fd, quit_msg, sizeof quit_msg); + ret = ws_write(cap_session->signal_pipe_write_fd, quit_msg, sizeof quit_msg); if(ret == -1) { g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_WARNING, "signal_pipe_capquit_to_child: %d header: error %s", cap_session->signal_pipe_write_fd, g_strerror(errno)); |