Some initial changes for win32 support, but not all.
Added lots of #ifdef HAVE_*_H wrappers. Added some #defines in config.h.win32 Check for more headers in configure.in Added prototype for inet_aton() in inet_v6defs.h. Changed "BYTE" token (i.e., #define) in ascend-gramamr.y because it conflicts with a windows definition. Use HEXBYTE instead. svn path=/trunk/; revision=1448
This commit is contained in:
parent
9fe38ca2b5
commit
1990d5fb5c
|
@ -95,9 +95,15 @@
|
|||
/* Version number of package */
|
||||
#define VERSION "0.8.0"
|
||||
|
||||
#define HAVE_WINSOCK_H
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define HAVE_DIRECT_H
|
||||
#define HAVE_IO_H
|
||||
#define strncasecmp strnicmp
|
||||
#define HAVE_WINSOCK_H 1
|
||||
#define HAVE_DIRECT_H 1
|
||||
#define HAVE_IO_H 1
|
||||
#define NEED_INET_V6DEFS_H 1
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define strncasecmp strnicmp
|
||||
#define open _open
|
||||
#define close _close
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.in,v 1.71 2000/01/09 20:05:37 guy Exp $
|
||||
# $Id: configure.in,v 1.72 2000/01/10 17:32:50 gram Exp $
|
||||
dnl
|
||||
dnl Process this file with autoconf 2.13 or later to produce a
|
||||
dnl configure script; 2.12 doesn't generate a "configure" script that
|
||||
|
@ -154,10 +154,12 @@ fi
|
|||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
|
||||
AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h netinet/in.h sys/socket.h net/if.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h sys/socket.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h sys/param.h)
|
||||
AC_CHECK_HEADERS(netinet/in.h net/if.h)
|
||||
AC_CHECK_HEADERS(stddef.h)
|
||||
AC_CHECK_HEADERS(dlfcn.h)
|
||||
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
|
||||
|
||||
dnl SNMP Check
|
||||
AC_ARG_ENABLE(snmp,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* dfilter-scanner.l
|
||||
* Scanner for display filters
|
||||
*
|
||||
* $Id: dfilter-scanner.l,v 1.26 1999/10/19 05:45:45 gram Exp $
|
||||
* $Id: dfilter-scanner.l,v 1.27 2000/01/10 17:32:50 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -29,6 +29,10 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h> /* for isatty() on win32 */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
@ -32,7 +32,13 @@
|
|||
#include "gtkclist.h"
|
||||
#include <gtk/gtkbindings.h>
|
||||
#include <gtk/gtkdnd.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <gdk/win32/gdkwin32.h>
|
||||
#else
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
/* length of button_actions array */
|
||||
|
|
17
inet_aton.c
17
inet_aton.c
|
@ -31,13 +31,30 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/*
|
||||
|
|
31
inet_ntop.c
31
inet_ntop.c
|
@ -15,19 +15,40 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$Id: inet_ntop.c,v 1.2 1999/10/14 06:55:08 guy Exp $";
|
||||
static char rcsid[] = "$Id: inet_ntop.c,v 1.3 2000/01/10 17:32:51 gram Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
|
27
inet_pton.c
27
inet_pton.c
|
@ -15,16 +15,41 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$Id: inet_pton.c,v 1.2 1999/10/14 06:55:10 guy Exp $";
|
||||
static char rcsid[] = "$Id: inet_pton.c,v 1.3 2000/01/10 17:32:51 gram Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* inet_pton.h
|
||||
*
|
||||
* $Id: inet_v6defs.h,v 1.1 1999/10/14 06:55:09 guy Exp $
|
||||
* $Id: inet_v6defs.h,v 1.2 2000/01/10 17:32:51 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -29,6 +29,9 @@ extern int inet_pton(int af, const char *src, void *dst);
|
|||
extern const char *inet_ntop(int af, const void *src, char *dst,
|
||||
size_t size);
|
||||
|
||||
struct in_addr;
|
||||
extern int inet_aton(const char* cp_arg, struct in_addr *addr);
|
||||
|
||||
/*
|
||||
* Those OSes may also not have AF_INET6, so declare it here if it's not
|
||||
* already declared, so that we can pass it to "inet_ntop()" and "inet_pton()".
|
||||
|
|
|
@ -63,7 +63,10 @@
|
|||
#include "packet.h"
|
||||
#include "packet-bgp.h"
|
||||
#include "packet-ipv6.h"
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
static const value_string bgptypevals[] = {
|
||||
{ BGP_OPEN, "OPEN Message" },
|
||||
|
|
4
packet.c
4
packet.c
|
@ -1,7 +1,7 @@
|
|||
/* packet.c
|
||||
* Routines for packet disassembly
|
||||
*
|
||||
* $Id: packet.c,v 1.62 1999/12/29 07:37:12 guy Exp $
|
||||
* $Id: packet.c,v 1.63 2000/01/10 17:32:52 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -55,7 +55,9 @@
|
|||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_INET_V6DEFS_H
|
||||
# include "inet_v6defs.h"
|
||||
|
|
4
resolv.c
4
resolv.c
|
@ -1,7 +1,7 @@
|
|||
/* resolv.c
|
||||
* Routines for network object lookup
|
||||
*
|
||||
* $Id: resolv.c,v 1.21 1999/11/22 06:03:46 gram Exp $
|
||||
* $Id: resolv.c,v 1.22 2000/01/10 17:32:52 gram Exp $
|
||||
*
|
||||
* Laurent Deniel <deniel@worldnet.fr>
|
||||
*
|
||||
|
@ -55,7 +55,9 @@
|
|||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
|
|
7
util.c
7
util.c
|
@ -1,7 +1,7 @@
|
|||
/* util.c
|
||||
* Utility routines
|
||||
*
|
||||
* $Id: util.c,v 1.24 1999/12/09 07:19:05 guy Exp $
|
||||
* $Id: util.c,v 1.25 2000/01/10 17:32:53 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -57,6 +57,11 @@
|
|||
|
||||
#include "util.h"
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h>
|
||||
typedef int mode_t; /* for win32 */
|
||||
#endif
|
||||
|
||||
static char *
|
||||
setup_tmpdir(char *dir)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%{
|
||||
/* ascend-grammar.y
|
||||
*
|
||||
* $Id: ascend-grammar.y,v 1.8 1999/10/31 19:34:46 guy Exp $
|
||||
* $Id: ascend-grammar.y,v 1.9 2000/01/10 17:33:16 gram Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
|
@ -87,7 +87,7 @@ char b;
|
|||
|
||||
%token <s> STRING KEYWORD COUNTER
|
||||
%token <d> WDS_PREFIX DECNUM HEXNUM
|
||||
%token <b> BYTE
|
||||
%token <b> HEXBYTE
|
||||
|
||||
%type <s> string dataln datagroup
|
||||
%type <d> wds_prefix decnum hexnum
|
||||
|
@ -164,7 +164,7 @@ wdd_hdr: KEYWORD decnum decnum decnum KEYWORD decnum decnum decnum KEYWORD strin
|
|||
}
|
||||
;
|
||||
|
||||
byte: BYTE {
|
||||
byte: HEXBYTE {
|
||||
if (bcur < caplen) {
|
||||
pkt_data[bcur] = $1;
|
||||
bcur++;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%{
|
||||
/* ascend-scanner.l
|
||||
*
|
||||
* $Id: ascend-scanner.l,v 1.9 1999/11/24 19:29:45 guy Exp $
|
||||
* $Id: ascend-scanner.l,v 1.10 2000/01/10 17:33:16 gram Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
|
@ -29,6 +29,11 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h> /* for isatty() on win32 */
|
||||
#endif
|
||||
|
||||
#include "wtap.h"
|
||||
#include "ascend.h"
|
||||
#include "ascend-grammar.h"
|
||||
|
@ -151,7 +156,7 @@ WDD_TYPE "type "[^\n\r\t ]+
|
|||
|
||||
<sc_gen_byte>{H}{2} {
|
||||
ascendlval.b = strtol(ascendtext, NULL, 16);
|
||||
return BYTE;
|
||||
return HEXBYTE;
|
||||
}
|
||||
|
||||
<INITIAL,sc_gen_byte>{WDD_DATE} {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ascend.c
|
||||
*
|
||||
* $Id: ascend.c,v 1.9 1999/10/28 01:42:43 gerald Exp $
|
||||
* $Id: ascend.c,v 1.10 2000/01/10 17:33:16 gram Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
|
@ -30,7 +30,11 @@
|
|||
#include "file.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -25,4 +25,7 @@
|
|||
/* Version number of package */
|
||||
#define VERSION "0.0.0"
|
||||
|
||||
#define HAVE_WINSOCK_H
|
||||
#define HAVE_WINSOCK_H 1
|
||||
#define HAVE_IO_H 1
|
||||
#define open _open
|
||||
#define close _close
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.in,v 1.18 1999/12/04 05:14:38 guy Exp $
|
||||
# $Id: configure.in,v 1.19 2000/01/10 17:33:17 gram Exp $
|
||||
dnl
|
||||
dnl Process this file with autoconf 2.13 or later to produce a
|
||||
dnl configure script; 2.12 doesn't generate a "configure" script that
|
||||
|
@ -87,7 +87,7 @@ dnl defined, have it take an "off_t" as its second argument, and
|
|||
dnl put it into a file that doesn't require HAVE_UNISTD_H.
|
||||
dnl
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(sys/time.h netinet/in.h)
|
||||
AC_CHECK_HEADERS(sys/time.h netinet/in.h unistd.h)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* file.c
|
||||
*
|
||||
* $Id: file.c,v 1.43 1999/12/15 01:34:17 guy Exp $
|
||||
* $Id: file.c,v 1.44 2000/01/10 17:33:17 gram Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
|
@ -23,12 +23,18 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h> /* open/close on win32 */
|
||||
#endif
|
||||
|
||||
#include "wtap.h"
|
||||
#include "file.h"
|
||||
#include "buffer.h"
|
||||
|
|
Loading…
Reference in New Issue