#include <string.h>
#include "wtap.h"
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
#endif
#include "svnversion.h"
static int
get_natural_int(const char *string, const char *name)
{
- long number;
+ int number;
char *p;
- number = strtol(string, &p, 10);
+ number = (int) strtol(string, &p, 10);
if (p == string || *p != '\0') {
fprintf(stderr, "mergecap: The specified %s \"%s\" isn't a decimal number\n",
name, string);
static int
get_positive_int(const char *string, const char *name)
{
- long number;
+ int number;
number = get_natural_int(string, name);
int
main(int argc, char *argv[])
{
- extern char *optarg;
- extern int optind;
int opt;
gboolean do_append = FALSE;
gboolean verbose = FALSE;