check_include_file("stddef.h" HAVE_STDDEF_H)\r
check_include_file("stdint.h" HAVE_STDINT_H)\r
check_include_file("stdlib.h" HAVE_STDLIB_H)\r
-check_include_file("strerror.h" NEED_STRERROR_H)\r
check_include_file("strings.h" HAVE_STRINGS_H)\r
check_include_file("string.h" HAVE_STRING_H)\r
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)\r
{
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"An error occurred while reading from the file \"%s\": %s.",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
if (size == -1) {
fprintf(stderr,
"capinfos: Can't get size of \"%s\": %s.\n",
- filename, strerror(err));
+ filename, g_strerror(err));
g_free(cf_info.encap_counts);
return 1;
}
if (err_str != NULL) {
*err_str = g_strdup_printf(
"Can't get list of interfaces: error opening socket: %s",
- strerror(errno));
+ g_strerror(errno));
}
return NULL;
}
if (err_str != NULL) {
*err_str = g_strdup_printf(
"Can't get list of interfaces: SIOCGIFCONF ioctl error: %s",
- strerror(errno));
+ g_strerror(errno));
}
goto fail;
}
if (err_str != NULL) {
*err_str = g_strdup_printf(
"Can't get list of interfaces: SIOCGIFFLAGS error getting flags for interface %s: %s",
- ifr->ifr_name, strerror(errno));
+ ifr->ifr_name, g_strerror(errno));
}
goto fail;
}
#else /* _WIN32 */
if (pipe(sync_pipe) < 0) {
/* Couldn't create the pipe between parent and child. */
- report_failure("Couldn't create sync pipe: %s", strerror(errno));
+ report_failure("Couldn't create sync pipe: %s", g_strerror(errno));
g_free( (gpointer) argv[0]);
g_free(argv);
return FALSE;
ws_close(sync_pipe[PIPE_READ]);
execv(argv[0], (gpointer)argv);
g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
- argv[0], strerror(errno));
+ argv[0], g_strerror(errno));
sync_pipe_errmsg_to_parent(2, errmsg, "");
/* Exit with "_exit()", so that we don't close the connection
if (capture_opts->fork_child == -1) {
/* We couldn't even create the child process. */
- report_failure("Couldn't create child process: %s", strerror(errno));
+ report_failure("Couldn't create child process: %s", g_strerror(errno));
ws_close(sync_pipe_read_fd);
#ifdef _WIN32
ws_close(capture_opts->signal_pipe_write_fd);
/* Create a pipe for the child process to send us messages */
if (pipe(sync_pipe) < 0) {
/* Couldn't create the message pipe between parent and child. */
- *msg = g_strdup_printf("Couldn't create sync pipe: %s", strerror(errno));
+ *msg = g_strdup_printf("Couldn't create sync pipe: %s", g_strerror(errno));
g_free( (gpointer) argv[0]);
g_free(argv);
return -1;
/* Create a pipe for the child process to send us data */
if (pipe(data_pipe) < 0) {
/* Couldn't create the data pipe between parent and child. */
- *msg = g_strdup_printf("Couldn't create data pipe: %s", strerror(errno));
+ *msg = g_strdup_printf("Couldn't create data pipe: %s", g_strerror(errno));
ws_close(sync_pipe[PIPE_READ]);
ws_close(sync_pipe[PIPE_WRITE]);
g_free( (gpointer) argv[0]);
ws_close(sync_pipe[PIPE_WRITE]);
execv(argv[0], (gpointer)argv);
g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
- argv[0], strerror(errno));
+ argv[0], g_strerror(errno));
sync_pipe_errmsg_to_parent(2, errmsg, "");
/* Exit with "_exit()", so that we don't close the connection
if (*fork_child == -1) {
/* We couldn't even create the child process. */
- *msg = g_strdup_printf("Couldn't create child process: %s", strerror(errno));
+ *msg = g_strdup_printf("Couldn't create child process: %s", g_strerror(errno));
ws_close(*data_read_fd);
ws_close(*message_read_fd);
return -1;
error = errno;
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
"read from pipe %d: error(%u): %s", pipe_fd, error,
- strerror(error));
+ g_strerror(error));
*msg = g_strdup_printf("Error reading from sync pipe: %s",
- strerror(error));
+ g_strerror(error));
return newly;
}
} else if (newly < 0) {
/* error */
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
- "read from pipe %d: error(%u): %s", pipe_fd, errno, strerror(errno));
+ "read from pipe %d: error(%u): %s", pipe_fd, errno, g_strerror(errno));
return newly;
} else if (bytes[offset] == '\n') {
break;
ret = 0;
#ifdef _WIN32
if (_cwait(&fork_child_status, fork_child, _WAIT_CHILD) == -1) {
- *msgp = g_strdup_printf("Error from cwait(): %s", strerror(errno));
+ *msgp = g_strdup_printf("Error from cwait(): %s", g_strerror(errno));
ret = -1;
} else {
/*
ret = -1;
}
} else {
- *msgp = g_strdup_printf("Error from waitpid(): %s", strerror(errno));
+ *msgp = g_strdup_printf("Error from waitpid(): %s", g_strerror(errno));
ret = -1;
}
#endif
ret = write(capture_opts->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", capture_opts->signal_pipe_write_fd, strerror(errno));
+ "signal_pipe_capquit_to_child: %d header: error %s", capture_opts->signal_pipe_write_fd, g_strerror(errno));
}
}
#endif
int sts = kill(capture_opts->fork_child, SIGINT);
if (sts != 0) {
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_WARNING,
- "Sending SIGINT to child failed: %s\n", strerror(errno));
+ "Sending SIGINT to child failed: %s\n", g_strerror(errno));
}
#else
#define STOP_SLEEP_TIME 500 /* ms */
int sts = kill(fork_child, SIGTERM); /* SIGTERM so it can clean up if necessary */
if (sts != 0) {
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_WARNING,
- "Sending SIGTERM to child failed: %s\n", strerror(errno));
+ "Sending SIGTERM to child failed: %s\n", g_strerror(errno));
}
#else
/* Remark: This is not the preferred method of closing a process!
/* Define if inet/v6defs.h needs to be included */
#cmakedefine NEED_INET_V6DEFS_H 1
-/* Define if strerror.h needs to be included */
-#cmakedefine NEED_STRERROR_H 1
-
/* Define if strptime.h needs to be included */
#cmakedefine NEED_STRPTIME_H 1
if (errno != ENOENT) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open filter file\n\"%s\": %s.", path,
- strerror(errno));
+ g_strerror(errno));
}
g_free(path);
return FALSE;
if (errno != ENOENT) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open global filter file\n\"%s\": %s.", path,
- strerror(errno));
+ g_strerror(errno));
}
g_free(path);
return FALSE;
if ((f = ws_fopen(path, "r")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open\n%s\nfor reading: %s.",
- path, strerror(errno));
+ path, g_strerror(errno));
return FALSE;
}
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor color files: %s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
return FALSE;
}
if ((f = ws_fopen(path, "w+")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open\n%s\nfor writing: %s.",
- path, strerror(errno));
+ path, g_strerror(errno));
g_free(path);
return FALSE;
}
if ((f = ws_fopen(path, "w+")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open\n%s\nfor writing: %s.",
- path, strerror(errno));
+ path, g_strerror(errno));
return FALSE;
}
write_filters_file(cfl, f, only_marked);
/* #undef HAVE_SA_LEN */
-/* #undef NEED_STRERROR_H */
-
/* #undef HAVE_MKSTEMP */
/* #undef HAVE_MKDTEMP */
AM_CONDITIONAL(NEED_GETOPT_LO, test "x$ac_cv_func_getopt" = "xno")
AC_SUBST(GETOPT_LO)
-AC_CHECK_FUNC(strerror, STRERROR_LO="",
- [STRERROR_LO="strerror.lo"
- AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
-])
-if test "$ac_cv_func_strerror" = no ; then
- STRERROR_LO="strerror.lo"
-fi
-AM_CONDITIONAL(NEED_STRERROR_LO, test "x$ac_cv_func_strerror" = "xno")
-AC_SUBST(STRERROR_LO)
-
AC_CHECK_FUNC(strncasecmp, STRNCASECMP_LO="",
STRNCASECMP_LO="strncasecmp.lo")
if test "$ac_cv_func_strncasecmp" = no ; then
#include <string.h>
#include <errno.h>
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
-
#include <glib.h>
#include <epan/epan.h>
if (gpf_open_errno != 0) {
fprintf(stderr,
"can't open global preferences file \"%s\": %s.\n",
- pf_path, strerror(gpf_open_errno));
+ pf_path, g_strerror(gpf_open_errno));
}
if (gpf_read_errno != 0) {
fprintf(stderr,
"I/O error reading global preferences file \"%s\": %s.\n",
- pf_path, strerror(gpf_read_errno));
+ pf_path, g_strerror(gpf_read_errno));
}
}
if (pf_path != NULL) {
if (pf_open_errno != 0) {
fprintf(stderr,
"can't open your preferences file \"%s\": %s.\n",
- pf_path, strerror(pf_open_errno));
+ pf_path, g_strerror(pf_open_errno));
}
if (pf_read_errno != 0) {
fprintf(stderr,
"I/O error reading your preferences file \"%s\": %s.\n",
- pf_path, strerror(pf_read_errno));
+ pf_path, g_strerror(pf_read_errno));
}
}
read_failure_message(const char *filename, int err)
{
fprintf(stderr, "dftest: An error occurred while reading from the file \"%s\": %s.\n",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
write_failure_message(const char *filename, int err)
{
fprintf(stderr, "dftest: An error occurred while writing to the file \"%s\": %s.\n",
- filename, strerror(err));
+ filename, g_strerror(err));
}
cap_t caps = cap_init(); /* all capabilities initialized to off */
print_caps("Pre-clear");
if (cap_set_proc(caps)) {
- cmdarg_err("cap_set_proc() fail return: %s", strerror(errno));
+ cmdarg_err("cap_set_proc() fail return: %s", g_strerror(errno));
}
print_caps("Post-clear");
cap_free(caps);
print_caps("Pre drop, pre set");
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) {
- cmdarg_err("prctl() fail return: %s", strerror(errno));
+ cmdarg_err("prctl() fail return: %s", g_strerror(errno));
}
cap_set_flag(caps, CAP_PERMITTED, cl_len, cap_list, CAP_SET);
cap_set_flag(caps, CAP_INHERITABLE, cl_len, cap_list, CAP_SET);
if (cap_set_proc(caps)) {
- cmdarg_err("cap_set_proc() fail return: %s", strerror(errno));
+ cmdarg_err("cap_set_proc() fail return: %s", g_strerror(errno));
}
print_caps("Pre drop, post set");
print_caps("Post drop, pre set");
cap_set_flag(caps, CAP_EFFECTIVE, cl_len, cap_list, CAP_SET);
if (cap_set_proc(caps)) {
- cmdarg_err("cap_set_proc() fail return: %s", strerror(errno));
+ cmdarg_err("cap_set_proc() fail return: %s", g_strerror(errno));
}
print_caps("Post drop, post set");
else {
g_snprintf(errmsg, errmsgl,
"The capture session could not be initiated "
- "due to error getting information on pipe/socket: %s", strerror(errno));
+ "due to error getting information on pipe/socket: %s", g_strerror(errno));
pcap_opts->cap_pipe_err = PIPERR;
}
return;
if (fd == -1) {
g_snprintf(errmsg, errmsgl,
"The capture session could not be initiated "
- "due to error on pipe open: %s", strerror(errno));
+ "due to error on pipe open: %s", g_strerror(errno));
pcap_opts->cap_pipe_err = PIPERR;
return;
}
if (fd == -1) {
g_snprintf(errmsg, errmsgl,
"The capture session could not be initiated "
- "due to error on socket create: %s", strerror(errno));
+ "due to error on socket create: %s", g_strerror(errno));
pcap_opts->cap_pipe_err = PIPERR;
return;
}
if (b == -1) {
g_snprintf(errmsg, errmsgl,
"The capture session coud not be initiated "
- "due to error on socket connect: %s", strerror(errno));
+ "due to error on socket connect: %s", g_strerror(errno));
pcap_opts->cap_pipe_err = PIPERR;
return;
}
sel_ret = cap_pipe_select(fd);
if (sel_ret < 0) {
g_snprintf(errmsg, errmsgl,
- "Unexpected error from select: %s", strerror(errno));
+ "Unexpected error from select: %s", g_strerror(errno));
goto error;
} else if (sel_ret > 0) {
b = read(fd, ((char *)&magic)+bytes_read, sizeof magic-bytes_read);
g_snprintf(errmsg, errmsgl, "End of file on pipe magic during open");
else
g_snprintf(errmsg, errmsgl, "Error on pipe magic during open: %s",
- strerror(errno));
+ g_strerror(errno));
goto error;
}
bytes_read += b;
g_snprintf(errmsg, errmsgl, "End of file on pipe magic during open");
else
g_snprintf(errmsg, errmsgl, "Error on pipe magic during open: %s",
- strerror(errno));
+ g_strerror(errno));
goto error;
}
sel_ret = cap_pipe_select(fd);
if (sel_ret < 0) {
g_snprintf(errmsg, errmsgl,
- "Unexpected error from select: %s", strerror(errno));
+ "Unexpected error from select: %s", g_strerror(errno));
goto error;
} else if (sel_ret > 0) {
b = read(fd, ((char *)hdr)+bytes_read,
g_snprintf(errmsg, errmsgl, "End of file on pipe header during open");
else
g_snprintf(errmsg, errmsgl, "Error on pipe header during open: %s",
- strerror(errno));
+ g_strerror(errno));
goto error;
}
bytes_read += b;
g_snprintf(errmsg, errmsgl, "End of file on pipe header during open");
else
g_snprintf(errmsg, errmsgl, "Error on pipe header header during open: %s",
- strerror(errno));
+ g_strerror(errno));
goto error;
}
#endif /* USE_THREADS */
LocalFree(err_str);
#else
g_snprintf(errmsg, errmsgl, "Error reading from pipe: %s",
- strerror(errno));
+ g_strerror(errno));
#endif
/* Fall through */
case PD_ERR:
g_snprintf(errmsg, errmsg_len,
"The file to which the capture would be"
" saved (\"%s\") could not be opened: %s.",
- capture_opts->save_file, strerror(err));
+ capture_opts->save_file, g_strerror(err));
}
break;
}
if (sel_ret <= 0) {
if (sel_ret < 0 && errno != EINTR) {
g_snprintf(errmsg, errmsg_len,
- "Unexpected error from select: %s", strerror(errno));
+ "Unexpected error from select: %s", g_strerror(errno));
report_capture_error(errmsg, please_report);
ld->go = FALSE;
}
} else {
if (sel_ret < 0 && errno != EINTR) {
g_snprintf(errmsg, errmsg_len,
- "Unexpected error from select: %s", strerror(errno));
+ "Unexpected error from select: %s", g_strerror(errno));
report_capture_error(errmsg, please_report);
ld->go = FALSE;
}
if (is_tempfile) {
g_snprintf(errmsg, errmsg_len,
"The temporary file to which the capture would be saved (\"%s\") "
- "could not be opened: %s.", capfile_name, strerror(errno));
+ "could not be opened: %s.", capfile_name, g_strerror(errno));
} else {
if (capture_opts->multi_files_on) {
ringbuf_error_cleanup();
g_snprintf(errmsg, errmsg_len,
"The file to which the capture would be saved (\"%s\") "
"could not be opened: %s.", capfile_name,
- strerror(errno));
+ g_strerror(errno));
}
g_free(capfile_name);
return FALSE;
/* On Linux, if an interface goes down while you're capturing on it,
you'll get a "recvfrom: Network is down" or
"The interface went down" error (ENETDOWN).
- (At least you will if strerror() doesn't show a local translation
+ (At least you will if g_strerror() doesn't show a local translation
of the error.)
On FreeBSD and OS X, if a network adapter disappears while
g_snprintf(errmsg, errmsglen,
"The file to which the capture was being saved\n"
"(\"%s\") could not be closed: %s.",
- fname, strerror(err));
+ fname, g_strerror(err));
} else {
g_snprintf(errmsg, errmsglen,
"An error occurred while writing to the file"
" to which the capture was being saved\n"
"(\"%s\"): %s.",
- fname, strerror(err));
+ fname, g_strerror(err));
}
break;
}
FILE* f = ws_fopen(filename,"w");
if (!f) {
- *error = ep_strdup_printf("Could not open file: '%s', error: %s\n", filename, strerror(errno) );
+ *error = ep_strdup_printf("Could not open file: '%s', error: %s\n", filename, g_strerror(errno) );
return;
}
D(("entity: %s filename: %s yyin: %p\n",e->name,e->file,yyin));
if (!yyin) {
if (errno) {
- fprintf(stderr, "Could not open file: '%s', error: %s\n", e->file, strerror(errno) );
+ fprintf(stderr, "Could not open file: '%s', error: %s\n", e->file, g_strerror(errno) );
yyterminate();
}
} else {
#include <ctype.h>
#include <glib.h>
#include <math.h>
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
#include "isprint.h"
if (fp == NULL) {
if (errno == EACCES)
- fprintf(stderr, "Error opening file %s for reading: %s\n", name, strerror(errno));
+ fprintf(stderr, "Error opening file %s for reading: %s\n", name, g_strerror(errno));
return;
}
if (!yyin) {
if (err)
- g_string_append_printf(err, "Could not open file: '%s', error: %s",fullname,strerror(errno));
+ g_string_append_printf(err, "Could not open file: '%s', error: %s",fullname,g_strerror(errno));
return NULL;
}
* allocate for the current directory.
*/
return g_strdup_printf("pathconf failed: %s\n",
- strerror(errno));
+ g_strerror(errno));
}
curdir = (char *)g_malloc(path_max);
if (getcwd(curdir, path_max) == NULL) {
*/
g_free(curdir);
return g_strdup_printf("getcwd failed: %s\n",
- strerror(errno));
+ g_strerror(errno));
}
path = g_strdup_printf("%s/%s", curdir, arg0);
g_free(curdir);
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" could not be %s: %s.",
for_writing ? "created" : "opened",
- strerror(err));
+ g_strerror(err));
errmsg = errmsg_errno;
break;
}
default:
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"An error occurred while writing to the file \"%%s\": %s.",
- strerror(err));
+ g_strerror(err));
errmsg = errmsg_errno;
break;
}
if (!yyin) {
if (errno) {
- g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
+ g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], g_strerror(errno) );
yyterminate();
}
} else {
yyin = ws_fopen(fullpaths[include_stack_ptr],"r");
if (!yyin) {
- g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
+ g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], g_strerror(errno) );
g_free(fullpaths[include_stack_ptr]);
*err_str = error->str;
g_string_free(error,FALSE);
}
if (!fp) {
- *error = ep_strdup_printf("uat_save: error opening '%s': %s",fname,strerror(errno));
+ *error = ep_strdup_printf("uat_save: error opening '%s': %s",fname,g_strerror(errno));
return FALSE;
}
long i = strtol(str,&str,10);
if ( ( i == 0) && (errno == ERANGE || errno == EINVAL) ) {
- *err = strerror(errno);
+ *err = g_strerror(errno);
return FALSE;
}
}
long i = strtol(str,&str,16);
if ( ( i == 0) && (errno == ERANGE || errno == EINVAL) ) {
- *err = strerror(errno);
+ *err = g_strerror(errno);
return FALSE;
}
}
if (!(yyin = ws_fopen(fname,"r"))) {
- *err = strerror(errno);
+ *err = g_strerror(errno);
g_free(fname);
return FALSE;
}
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
/* Write the preferencs out. */
if (err != 0) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open preferences file\n\"%s\": %s.", pf_path,
- strerror(err));
+ g_strerror(err));
g_free(pf_path);
}
}
if (!prefs.gui_use_pref_save) {
if (!color_filters_write(color_filter_edit_list))
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not open filter file: %s", strerror(errno));
+ "Could not open filter file: %s", g_strerror(errno));
}
/* Apply the coloring rules, both the temporary ones in
if (!color_filters_write(color_filter_edit_list))
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not open filter file: %s", strerror(errno));
+ "Could not open filter file: %s", g_strerror(errno));
}
/* User pressed "Cancel" button (or "ESC" or the 'X'):
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor filter files: %s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
return;
}
/* We had an error saving the filter. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not save to your %s filter file\n\"%s\": %s.",
- filter_type, f_path, strerror(f_save_errno));
+ filter_type, f_path, g_strerror(f_save_errno));
g_free(f_path);
}
}
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Error writing to print command: %s",
- strerror(errno));
+ g_strerror(errno));
}
/* XXX - cancel printing? */
destroy_print_stream(stream);
case FOLLOW_TCP :
i = ws_unlink(follow_info->data_out_filename);
if(i != 0) {
- g_warning("Follow: Couldn't remove temporary file: \"%s\", errno: %s (%u)", follow_info->data_out_filename, strerror(errno), errno);
+ g_warning("Follow: Couldn't remove temporary file: \"%s\", errno: %s (%u)", follow_info->data_out_filename, g_strerror(errno), errno);
}
break;
if (tmp_fd == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not create temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
g_free(follow_info->data_out_filename);
g_free(follow_info);
g_free(follow_filter);
if (data_out_file == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not create temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
ws_close(tmp_fd);
ws_unlink(follow_info->data_out_filename);
g_free(follow_info->data_out_filename);
if (ferror(data_out_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not read from temporary file %s: %s",
- follow_info->data_out_filename, strerror(errno));
+ follow_info->data_out_filename, g_strerror(errno));
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Short read from temporary file %s: expected %lu, got %lu",
if (data_out_file == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not open temporary file %s: %s", follow_info->data_out_filename,
- strerror(errno));
+ g_strerror(errno));
return FRS_OPEN_ERROR;
}
if (ferror(data_out_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Error reading temporary file %s: %s", follow_info->data_out_filename,
- strerror(errno));
+ g_strerror(errno));
fclose(data_out_file);
data_out_file = NULL;
return FRS_READ_ERROR;
if (cf_open(&cfile, fname, FALSE, &err) != CF_OK) {
- *err_str = strerror(err);
+ *err_str = g_strerror(err);
if (rfcode != NULL) dfilter_free(rfcode);
return FALSE;
}
#include <unistd.h>
#endif
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
if (gpf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open global preferences file\n\"%s\": %s.", gpf_path,
- strerror(gpf_open_errno));
+ g_strerror(gpf_open_errno));
}
if (gpf_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading global preferences file\n\"%s\": %s.", gpf_path,
- strerror(gpf_read_errno));
+ g_strerror(gpf_read_errno));
}
}
if (pf_path != NULL) {
if (pf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your preferences file\n\"%s\": %s.", pf_path,
- strerror(pf_open_errno));
+ g_strerror(pf_open_errno));
}
if (pf_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading your preferences file\n\"%s\": %s.", pf_path,
- strerror(pf_read_errno));
+ g_strerror(pf_read_errno));
}
g_free(pf_path);
pf_path = NULL;
if (cf_path != NULL) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your capture filter file\n\"%s\": %s.", cf_path,
- strerror(cf_open_errno));
+ g_strerror(cf_open_errno));
g_free(cf_path);
}
if (df_path != NULL) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your display filter file\n\"%s\": %s.", df_path,
- strerror(df_open_errno));
+ g_strerror(df_open_errno));
g_free(df_path);
}
if (gdp_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open global disabled protocols file\n\"%s\": %s.",
- *gdp_path, strerror(gdp_open_errno));
+ *gdp_path, g_strerror(gdp_open_errno));
}
if (gdp_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading global disabled protocols file\n\"%s\": %s.",
- *gdp_path, strerror(gdp_read_errno));
+ *gdp_path, g_strerror(gdp_read_errno));
}
g_free(*gdp_path);
*gdp_path = NULL;
if (dp_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open your disabled protocols file\n\"%s\": %s.", *dp_path,
- strerror(dp_open_errno));
+ g_strerror(dp_open_errno));
}
if (dp_read_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"I/O error reading your disabled protocols file\n\"%s\": %s.", *dp_path,
- strerror(dp_read_errno));
+ g_strerror(dp_read_errno));
}
g_free(*dp_path);
*dp_path = NULL;
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open common recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
/* "pre-scan" the command line parameters, if we have "console only"
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
if (recent.gui_fileopen_remembered_dir &&
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
color_filters_enable(recent.packet_list_colorize);
if (create_persconffile_profile(profile_name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
if (rf_path != NULL && rf_open_errno != 0) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Could not open common recent file\n\"%s\": %s.",
- rf_path, strerror(rf_open_errno));
+ rf_path, g_strerror(rf_open_errno));
}
if (recent.gui_fileopen_remembered_dir &&
test_for_directory(recent.gui_fileopen_remembered_dir) == EISDIR) {
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
/* Write the preferencs out. */
if (err != 0) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open preferences file\n\"%s\": %s.", pf_path,
- strerror(err));
+ g_strerror(err));
g_free(pf_path);
}
}
write_failure_alert_box(args->file, errno);
else
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Error writing to print command: %s", strerror(errno));
+ "Error writing to print command: %s", g_strerror(errno));
break;
}
if (create_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
&pf_filename, &pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
if (create_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't rename directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_dir_path, pf_dir_path2, strerror(errno));
+ pf_dir_path, pf_dir_path2, g_strerror(errno));
g_free(pf_dir_path);
g_free(pf_dir_path2);
if (delete_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't delete profile directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
if (create_persconffile_profile(new_name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
} else if (strlen (profile_name) &&
{
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_filename, pf_dir_path2, pf_dir_path, strerror(errno));
+ pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno));
g_free(pf_filename);
g_free(pf_dir_path);
&pf_dir_path, &pf_dir_path2) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't rename directory\n\"%s\" to\n\"%s\":\n%s.",
- pf_dir_path, pf_dir_path2, strerror(errno));
+ pf_dir_path, pf_dir_path2, g_strerror(errno));
g_free(pf_dir_path);
g_free(pf_dir_path2);
if (delete_persconffile_profile(name, &pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't delete profile directory\n\"%s\":\n%s.",
- pf_dir_path, strerror(errno));
+ pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
}
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor disabled protocols file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
} else {
save_disabled_protos_list(&pf_path, &pf_save_errno);
if (pf_path != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Could not save to your disabled protocols file\n\"%s\": %s.",
- pf_path, strerror(pf_save_errno));
+ pf_path, g_strerror(pf_save_errno));
g_free(pf_path);
}
}
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor recent file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
return FALSE;
}
if ((rf = ws_fopen(rf_path, "w")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open recent file\n\"%s\": %s.", rf_path,
- strerror(errno));
+ g_strerror(errno));
g_free(rf_path);
return FALSE;
}
if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't create directory\n\"%s\"\nfor recent file: %s.", pf_dir_path,
- strerror(errno));
+ g_strerror(errno));
g_free(pf_dir_path);
return FALSE;
}
if ((rf = ws_fopen(rf_path, "w")) == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't open recent file\n\"%s\": %s.", rf_path,
- strerror(errno));
+ g_strerror(errno));
g_free(rf_path);
return FALSE;
}
gpointer
vsimple_dialog(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, va_list ap)
{
- gchar *vmessage;
gchar *message;
queued_message_t *queued_message;
GtkWidget *win;
GdkWindowState state = 0;
/* Format the message. */
- vmessage = g_strdup_vprintf(msg_format, ap);
-
- /* convert character encoding from locale to UTF8 (using iconv) */
- message = g_locale_to_utf8(vmessage, -1, NULL, NULL, NULL);
- g_free(vmessage);
+ message = g_strdup_vprintf(msg_format, ap);
if (top_level != NULL) {
state = gdk_window_get_state(top_level->window);
}
if(ferror(text_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Error reading file \"%s\": %s",
- absolute_path, strerror(errno));
+ absolute_path, g_strerror(errno));
}
fclose(text_file);
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not open file \"%s\": %s",
- absolute_path, strerror(errno));
+ absolute_path, g_strerror(errno));
}
}
out_fd = ws_open(out_filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
if (out_fd == -1) {
fprintf(stderr, "mergecap: Couldn't open output file %s: %s\n",
- out_filename, strerror(errno));
+ out_filename, g_strerror(errno));
exit(1);
}
}
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
data = g_malloc(size);
if (fread(data, size, 1, f) < 1) {
- g_warning("error reading %s, %s", filename, strerror(errno));
+ g_warning("error reading %s, %s", filename, g_strerror(errno));
}
fclose(f);
yy_switch_to_buffer(include_stack[--include_stack_ptr] );
if (errno)
- g_string_append_printf(mc->config_error, "Mate parser: Could not open file: '%s': %s", yytext, strerror(errno) );
+ g_string_append_printf(mc->config_error, "Mate parser: Could not open file: '%s': %s", yytext, g_strerror(errno) );
} else {
yyin = ws_fopen(filename,"r");
if (!yyin) {
- g_string_append_printf(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, strerror(errno) );
+ g_string_append_printf(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, g_strerror(errno) );
return FALSE;
}
if (errno != ENOENT) {
fprintf(stderr,
"randpkt: Could not open " RANDOM_DEV " for reading: %s\n",
- strerror(errno));
+ g_strerror(errno));
exit(2);
}
goto fallback;
if (ret == -1) {
fprintf(stderr,
"randpkt: Could not read from " RANDOM_DEV ": %s\n",
- strerror(errno));
+ g_strerror(errno));
exit(2);
}
if ((size_t)ret != sizeof randomness) {
# include <sys/stat.h>
#endif
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
#ifndef _WIN32
if (ws_stat64(pipe_name, &pipe_stat) < 0) {
fprintf(stderr, "rawshark: The pipe %s could not be checked: %s\n",
- pipe_name, strerror(errno));
+ pipe_name, g_strerror(errno));
return -1;
}
if (! S_ISFIFO(pipe_stat.st_mode)) {
rfd = ws_open(pipe_name, O_RDONLY | O_NONBLOCK, 0000 /* no creation so don't matter */);
if (rfd == -1) {
fprintf(stderr, "rawshark: \"%s\" could not be opened: %s\n",
- pipe_name, strerror(errno));
+ pipe_name, g_strerror(errno));
return -1;
}
#else /* _WIN32 */
rfd = _open_osfhandle((long) hPipe, _O_RDONLY);
if (rfd == -1) {
fprintf(stderr, "rawshark: \"%s\" could not be opened: %s\n",
- pipe_name, strerror(errno));
+ pipe_name, g_strerror(errno));
return -1;
}
#endif /* _WIN32 */
if (gpf_path != NULL) {
if (gpf_open_errno != 0) {
cmdarg_err("Can't open global preferences file \"%s\": %s.",
- pf_path, strerror(gpf_open_errno));
+ pf_path, g_strerror(gpf_open_errno));
}
if (gpf_read_errno != 0) {
cmdarg_err("I/O error reading global preferences file \"%s\": %s.",
- pf_path, strerror(gpf_read_errno));
+ pf_path, g_strerror(gpf_read_errno));
}
}
if (pf_path != NULL) {
if (pf_open_errno != 0) {
cmdarg_err("Can't open your preferences file \"%s\": %s.", pf_path,
- strerror(pf_open_errno));
+ g_strerror(pf_open_errno));
}
if (pf_read_errno != 0) {
cmdarg_err("I/O error reading your preferences file \"%s\": %s.",
- pf_path, strerror(pf_read_errno));
+ pf_path, g_strerror(pf_read_errno));
}
g_free(pf_path);
pf_path = NULL;
if (gdp_path != NULL) {
if (gdp_open_errno != 0) {
cmdarg_err("Could not open global disabled protocols file\n\"%s\": %s.",
- gdp_path, strerror(gdp_open_errno));
+ gdp_path, g_strerror(gdp_open_errno));
}
if (gdp_read_errno != 0) {
cmdarg_err("I/O error reading global disabled protocols file\n\"%s\": %s.",
- gdp_path, strerror(gdp_read_errno));
+ gdp_path, g_strerror(gdp_read_errno));
}
g_free(gdp_path);
}
if (dp_open_errno != 0) {
cmdarg_err(
"Could not open your disabled protocols file\n\"%s\": %s.", dp_path,
- strerror(dp_open_errno));
+ g_strerror(dp_open_errno));
}
if (dp_read_errno != 0) {
cmdarg_err(
"I/O error reading your disabled protocols file\n\"%s\": %s.", dp_path,
- strerror(dp_read_errno));
+ g_strerror(dp_read_errno));
}
g_free(dp_path);
}
default:
cmdarg_err("An error occurred while printing packets: %s.",
- strerror(err));
+ g_strerror(err));
break;
}
}
read_failure_message(const char *filename, int err)
{
cmdarg_err("An error occurred while reading from the file \"%s\": %s.",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
write_failure_message(const char *filename, int err)
{
cmdarg_err("An error occurred while writing to the file \"%s\": %s.",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
input_file = ws_fopen(input_filename, "rb");
if (!input_file) {
fprintf(stderr, "Cannot open file [%s] for reading: %s\n",
- input_filename, strerror(errno));
+ input_filename, g_strerror(errno));
exit(-1);
}
} else {
output_file = ws_fopen(output_filename, "wb");
if (!output_file) {
fprintf(stderr, "Cannot open file [%s] for writing: %s\n",
- output_filename, strerror(errno));
+ output_filename, g_strerror(errno));
exit(-1);
}
} else {
'g_strdown',
'g_string_up',
'g_string_down',
+ 'strerror', # use g_strerror
# Use the ws_* version of these:
# (Necessary because on Windows we use UTF8 for throughout the code
# so we must tweak that to UTF16 before operating on the file. Code
# APIs that SHOULD NOT be used in Wireshark (any more)
'deprecated' => { 'count_errors' => 1, 'functions' => [
- 'perror', # Use strerror() and report messages in whatever
+ 'perror', # Use g_strerror() and report messages in whatever
# fashion is appropriate for the code in question.
'ctime', # Use abs_time_secs_to_str()
'dissector_add', # Use dissector_add_uint()
# include <sys/stat.h>
#endif
-#ifdef NEED_STRERROR_H
-#include "wsutil/strerror.h"
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
if (gpf_path != NULL) {
if (gpf_open_errno != 0) {
cmdarg_err("Can't open global preferences file \"%s\": %s.",
- pf_path, strerror(gpf_open_errno));
+ pf_path, g_strerror(gpf_open_errno));
}
if (gpf_read_errno != 0) {
cmdarg_err("I/O error reading global preferences file \"%s\": %s.",
- pf_path, strerror(gpf_read_errno));
+ pf_path, g_strerror(gpf_read_errno));
}
}
if (pf_path != NULL) {
if (pf_open_errno != 0) {
cmdarg_err("Can't open your preferences file \"%s\": %s.", pf_path,
- strerror(pf_open_errno));
+ g_strerror(pf_open_errno));
}
if (pf_read_errno != 0) {
cmdarg_err("I/O error reading your preferences file \"%s\": %s.",
- pf_path, strerror(pf_read_errno));
+ pf_path, g_strerror(pf_read_errno));
}
g_free(pf_path);
pf_path = NULL;
if (gdp_path != NULL) {
if (gdp_open_errno != 0) {
cmdarg_err("Could not open global disabled protocols file\n\"%s\": %s.",
- gdp_path, strerror(gdp_open_errno));
+ gdp_path, g_strerror(gdp_open_errno));
}
if (gdp_read_errno != 0) {
cmdarg_err("I/O error reading global disabled protocols file\n\"%s\": %s.",
- gdp_path, strerror(gdp_read_errno));
+ gdp_path, g_strerror(gdp_read_errno));
}
g_free(gdp_path);
}
if (dp_open_errno != 0) {
cmdarg_err(
"Could not open your disabled protocols file\n\"%s\": %s.", dp_path,
- strerror(dp_open_errno));
+ g_strerror(dp_open_errno));
}
if (dp_read_errno != 0) {
cmdarg_err(
"I/O error reading your disabled protocols file\n\"%s\": %s.", dp_path,
- strerror(dp_read_errno));
+ g_strerror(dp_read_errno));
}
g_free(dp_path);
}
default:
cmdarg_err("An error occurred while printing packets: %s.",
- strerror(err));
+ g_strerror(err));
break;
}
}
read_failure_message(const char *filename, int err)
{
cmdarg_err("An error occurred while reading from the file \"%s\": %s.",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
write_failure_message(const char *filename, int err)
{
cmdarg_err("An error occurred while writing to the file \"%s\": %s.",
- filename, strerror(err));
+ filename, g_strerror(err));
}
/*
*/
if (uname(&name) < 0) {
g_string_append_printf(str, "unknown OS version (uname failed - %s)",
- strerror(errno));
+ g_strerror(errno));
return;
}
return "Unknown reason";
return wtap_errlist[wtap_errlist_index];
} else
- return strerror(err);
+ return g_strerror(err);
}
/* Close only the sequential side, freeing up memory it uses.
# @INET_ATON_LO@ # inet_aton.c
# @INET_NTOP_LO@ # inet_ntop.c
# @INET_PTON_LO@ # inet_pton.c
-# @STRERROR_LO@ # strerror.c
# @STRNCASECMP_LO@ # strncasecmp.c
# @STRPTIME_LO@ # strptime.c
mpeg-audio.c
def_sym_filter_symbols += || /^ws_inet_pton/
endif
-if NEED_STRERROR_LO
-wsutil_optional_objects += @STRERROR_LO@
-else
-def_sym_filter_symbols += || /^strerror/
-endif
-
if NEED_STRNCASECMP_LO
wsutil_optional_objects += @STRNCASECMP_LO@
else
inet_ntop.c \
inet_pton.c \
inet_v6defs.h \
- strerror.c \
- strerror.h \
strncasecmp.c \
strptime.c \
strptime.h \
+++ /dev/null
-/* strerror.c
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "strerror.h"
-#include <glib.h>
-
-/*
- * Version of "strerror()", for the benefit of OSes that don't have it
- * (e.g., SunOS 4.x).
- */
-char *
-strerror(int errnum)
-{
- extern int sys_nerr;
- extern char *sys_errlist[];
- static char errbuf[5+1+11+1]; /* "Error %d" */
-
- if (errnum < 0 || errnum >= sys_nerr) {
- g_snprintf(errbuf, 18, "Error %d", errnum);
- return errbuf;
- } else
- return sys_errlist[errnum];
-}
+++ /dev/null
-/* strerror.h
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __STRERROR_H__
-#define __STRERROR_H__
-
-/*
- * Version of "strerror()", for the benefit of OSes that don't have it
- * (e.g., SunOS 4.x).
- */
-extern char *strerror(int);
-
-#endif