#include <fcntl.h>
#endif
+#ifdef _WIN32
+#include <wsutil/unicode-utils.h>
+#endif /* _WIN32 */
+
static int
get_natural_int(const char *string, const char *name)
{
main(int argc, char *argv[])
{
int opt;
+
gboolean do_append = FALSE;
gboolean verbose = FALSE;
int in_file_count = 0;
guint snaplen = 0;
- int file_type = WTAP_FILE_PCAP; /* default to libpcap format */
+#ifdef PCAP_NG_DEFAULT
+ int file_type = WTAP_FILE_PCAPNG; /* default to pcap format */
+#else
+ int file_type = WTAP_FILE_PCAP; /* default to pcapng format */
+#endif
int frame_type = -2;
int out_fd;
merge_in_file_t *in_files = NULL;
gboolean got_read_error = FALSE, got_write_error = FALSE;
int count;
+#ifdef _WIN32
+ arg_list_utf_16to8(argc, argv);
+#endif /* _WIN32 */
+
/* Process the options first */
while ((opt = getopt(argc, argv, "hvas:T:F:w:")) != -1) {
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);
}
}