necessary nor sufficient if you're using "struct tm" (on many, perhaps
most, perhaps even all modern UNIXes, <sys/time.h> includes <time.h>,
which declares "struct tm", but that's not necessarily the case on
non-UNIX systems).
Include <time.h> in "file.c", to declare "struct tm".
Don't use PCAP_ERRBUF_SIZE to declare a message string buffer - that
won't work if you don't have "libpcap".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@549
f5534014-38df-0310-8fa8-
9805f1628bb7
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.79 1999/08/22 02:52:42 guy Exp $
+ * $Id: file.c,v 1.80 1999/08/22 07:19:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#include <unistd.h>
#endif
+#include <time.h>
+
#ifdef HAVE_IO_H
#include <io.h>
#endif
size_t msg_len;
char *errmsg;
char errmsg_errno[1024+1];
- gchar err_str[PCAP_ERRBUF_SIZE];
+ gchar err_str[2048+1];
if ((name_ptr = (gchar *) strrchr(cf->filename, '/')) == NULL)
name_ptr = cf->filename;
errmsg = errmsg_errno;
break;
}
- snprintf(err_str, PCAP_ERRBUF_SIZE, errmsg);
+ snprintf(err_str, sizeof err_str, errmsg);
simple_dialog(ESD_TYPE_WARN, NULL, err_str);
return (err);
} else
/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.39 1999/08/22 00:47:43 guy Exp $
+ * $Id: file.h,v 1.40 1999/08/22 07:19:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#ifndef __WTAP_H__
#include "wiretap/wtap.h"
#endif
#endif
#endif
-
#ifndef __DFILTER_H__
#include "dfilter.h"
#endif