diff options
-rw-r--r-- | config.h.win32 | 266 | ||||
-rwxr-xr-x | runlex.sh | 159 | ||||
-rw-r--r-- | wiretap/Makefile.am | 9 | ||||
-rw-r--r-- | wiretap/Makefile.nmake | 9 |
4 files changed, 3 insertions, 440 deletions
diff --git a/config.h.win32 b/config.h.win32 deleted file mode 100644 index 1e4e1e583f..0000000000 --- a/config.h.win32 +++ /dev/null @@ -1,266 +0,0 @@ -/* $Id$ */ -/* config.h.win32 Generated manually. :-) */ -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Generated Bison and Flex files test whether __STDC__ is defined - in order to check whether to use ANSI C features such as "const". - - GCC defines it as 1 even if extensions that render the implementation - non-conformant are enabled; Sun's C compiler (and, I think, other - AT&T-derived C compilers) define it as 0 if extensions that render - the implementation non-conformant are enabled; Microsoft Visual C++ - 6.0 doesn't define it at all if extensions that render the implementation - non-conformant are enabled. - - We define it as 0 here, so that those generated files will use - those features (and thus not get type warnings when compiled with - MSVC++). */ -#ifndef __STDC__ -#define __STDC__ 0 -#endif - -/* Use Unicode in Windows runtime functions. */ -#define UNICODE 1 -#define _UNICODE 1 - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define if lex declares yytext as a char * by default, not a char[]. */ -#define YYTEXT_POINTER 1 - -#define HAVE_PLUGINS 1 -#define PLUGINS_NEED_ADDRESS_TABLE 1 - -/* Plugins can also use the import library of libwireshark.dll instead - of the old API. In that case we undefine PLUGINS_NEED_ADDRESS_TABLE - for the plugin. We don't undefine PLUGINS_NEED_ADDRESS_TABLE globally. - Thus Wireshark will be still able to load plugins using the old API. - The macro HAVE_WIN32_LIBWIRESHARK_LIB has to be defined in plugin's - makefile.nmake. A template is available in doc/README.plugins */ -#ifdef HAVE_WIN32_LIBWIRESHARK_LIB -#undef PLUGINS_NEED_ADDRESS_TABLE -#endif - -/* #undef HAVE_SA_LEN */ - -/* #undef NEED_STRERROR_H */ - -#define NEED_MKSTEMP 1 - -@HAVE_LIBPCAP@ -@HAVE_PCAP_BREAKLOOP@ -@HAVE_PCAP_FINDALLDEVS@ -@HAVE_PCAP_DATALINK_NAME_TO_VAL@ -@HAVE_PCAP_DATALINK_VAL_TO_NAME@ -@WPCAP_CONSTIFIED@ -@HAVE_LIBWIRESHARKDLL@ - -@HAVE_REMOTE@ -@HAVE_PCAP_REMOTE@ -@HAVE_PCAP_OPEN@ -@HAVE_PCAP_FINDALLDEVS_EX@ -@HAVE_PCAP_CREATESRCSTR@ -@HAVE_PCAP_SETSAMPLING@ - -@HAVE_AIRPCAP@ -@HAVE_AIRPDCAP@ - -/* availability of pcap_freecode() is handled at runtime */ -#define HAVE_PCAP_FREECODE 1 - -/* define macro for importing variables from an dll - * it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_ - */ -#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL) -# define WS_VAR_IMPORT __declspec(dllimport) extern -#else -# define WS_VAR_IMPORT extern -#endif - -/* Define if you have the gethostbyname2 function. */ -/* #undef HAVE_GETHOSTBYNAME2 */ - -/* Define if you have the getprotobynumber function. */ -/* #undef HAVE_GETPROTOBYNUMBER */ - -/* Define if you have the <arpa/inet.h> header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define if you have the <fcntl.h> header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the <iconv.h> header file. */ -/* #undef HAVE_ICONV */ - -/* Define if you have the <netdb.h> header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define if you have the <netinet/in.h> header file. */ -/* #define HAVE_NETINET_IN_H 1 */ - -/* Define if you have the <snmp/snmp.h> header file. */ -/* #undef HAVE_SNMP_SNMP_H */ - -/* Define if you have the <snmp/version.h> header file. */ -/* #undef HAVE_SNMP_VERSION_H */ - -/* Define if you have the <stdarg.h> header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the <stddef.h> header file. */ -/* #undef HAVE_STDDEF_H */ - -/* Define if you have the <sys/ioctl.h> header file. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* Define if you have the <sys/socket.h> header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define if you have the <sys/sockio.h> header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define if you have the <sys/stat.h> header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the <sys/time.h> header file. */ -/* #define HAVE_SYS_TIME_H 1 */ - -/* Define if you have the <sys/types.h> header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the <sys/wait.h> header file. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define if you have the <unistd.h> header file. */ -/* #define HAVE_UNISTD_H 1 */ - -/* Define if <inttypes.h> defines PRI[doxu]64 macros */ -/* #define INTTYPES_H_DEFINES_FORMATS */ - -/* Format for printing 64-bit signed decimal numbers */ -#ifndef PRId64 -#ifdef _MSC_EXTENSIONS -#define PRId64 "I64d" -#else /* _MSC_EXTENSIONS */ -#define PRId64 "lld" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRId64 */ - -/* Format for printing 64-bit unsigned octal numbers */ -#ifndef PRIo64 -#ifdef _MSC_EXTENSIONS -#define PRIo64 "I64o" -#else /* _MSC_EXTENSIONS */ -#define PRIo64 "llo" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIo64 */ - -/* Format for printing 64-bit unsigned decimal numbers */ -#ifndef PRIu64 -#ifdef _MSC_EXTENSIONS -#define PRIu64 "I64u" -#else /* _MSC_EXTENSIONS */ -#define PRIu64 "llu" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIu64 */ - -/* Formats for printing 64-bit unsigned hexadecimal numbers */ -/* XXX - it seems that GLib has problems with the MSVC like I64x. - As we use GLib's g_sprintf and alike, it should be safe to use - llx everywhere now, making the macros pretty useless. For details see: - http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1025 */ -#ifndef PRIx64 -#ifdef _MSC_EXTENSIONS -/*#define PRIx64 "I64x"*/ -#define PRIx64 "llx" -#else /* _MSC_EXTENSIONS */ -#define PRIx64 "llx" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIx64 */ - -#ifndef PRIX64 -#ifdef _MSC_EXTENSIONS -/*#define PRIX64 "I64X"*/ -#define PRIX64 "llX" -#else /* _MSC_EXTENSIONS */ -#define PRIX64 "llX" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIX64 */ - -/* Define if you have the z library (-lz). */ -@HAVE_LIBZ@ - -/* Define to use GNU ADNS library */ -@HAVE_GNU_ADNS@ -#define ADNS_JGAA_WIN32 1 - -/* Define to use the PCRE library */ -@HAVE_PCRE@ - -/* Define to use the Nettle library */ -@HAVE_NETTLE@ - -/* Define to use the gnutls library */ -@HAVE_LIBGNUTLS@ - -/* Define to use the libgcrypt library */ -@HAVE_LIBGCRYPT@ - -/* Define to use mit kerberos for decryption of kerberos/sasl/dcerpc */ -@HAVE_KFW@ -#ifdef HAVE_MIT_KERBEROS -#define HAVE_KERBEROS -#endif - -/* Define to use Lua */ -@HAVE_LUA@ -@HAVE_LUA_5_1@ - -/* Define to use Portaudio library */ -@HAVE_LIBPORTAUDIO@ -/* Define version of of the Portaudio library API */ -@PORTAUDIO_API_1@ - -/* Define to have SMI */ -@HAVE_SMI@ - - -#ifndef WIN32 -#define WIN32 1 -#endif - -#define HAVE_WINDOWS_H 1 -#define HAVE_WINSOCK2_H 1 -#define HAVE_DIRECT_H 1 -#define NEED_INET_ATON_H 1 -#define NEED_INET_V6DEFS_H 1 -/* Visual C 9 (2008) now needs these prototypes */ -#if _MSC_VER == 1500 -#define NTDDI_VERSION NTDDI_WIN2K -#define _WIN32_WINNT _WIN32_WINNT_WIN2K -#endif -#define NEED_GETOPT_H 1 -#define NEED_STRPTIME_H 1 -#define strcasecmp stricmp -#define strncasecmp strnicmp -#define popen _popen -#define pclose _pclose - -/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */ -/*#define ZLIB_DLL 1 -#define _WINDOWS 1*/ - -/* Name of package */ -#define PACKAGE "wireshark" - -/* Version number of package */ -#define VERSION "@VERSION@" - -/* We shouldn't need this under Windows but we'll define it anyway. */ -#define HTML_VIEWER "mozilla" diff --git a/runlex.sh b/runlex.sh deleted file mode 100755 index 15c8f18d63..0000000000 --- a/runlex.sh +++ /dev/null @@ -1,159 +0,0 @@ -#! /bin/sh - -# -# runlex.sh -# Script to run Lex/Flex. -# First argument is the (quoted) name of the command; if it's null, that -# means that neither Flex nor Lex was found, so we report an error and -# quit. -# -# $Id$ -# -# Wireshark - Network traffic analyzer -# By Gerald Combs <gerald@wireshark.org> -# Copyright 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -# -# Get the name of the command to run, and then shift to get the arguments. -# -if [ $# -eq 0 ] -then - echo "Usage: runlex <lex/flex command to run> [ arguments ]" 1>&2 - exit 1 -fi -LEX="$1" -shift - -# -# Check whether we have it. -# -if [ -z "${LEX}" ] -then - echo "Neither lex nor flex was found" 1>&2 - exit 1 -fi - -# -# Process the flags. We don't use getopt because we don't want to -# embed complete knowledge of what options are supported by Lex/Flex. -# -flags="" -outfile=lex.yy.c -while [ $# -ne 0 ] -do - case "$1" in - - -o*) - # - # Set the output file name. - # - outfile=`echo "$1" | sed 's/-o\(.*\)/\1/'` - ;; - - -*) - # - # Add this to the list of flags. - # - flags="$flags $1" - ;; - - --|*) - # - # End of flags. - # - break - ;; - esac - shift -done - -# -# OK, run it. -# -${LEX} -o"$outfile" $flags "$@" - -# -# Did it succeed? -# -if [ $? -ne 0 ] -then - # - # No. Exit with the failing exit status. - # - exit $? -fi - -# -# Flex has the annoying habit of stripping all but the last component of -# the "-o" flag argument and using that as the place to put the output. -# This gets in the way of building in a directory different from the -# source directory. Try to work around this. -# -# Is the outfile where we think it is? -# -outfile_base=`basename "$outfile"` -if [ "$outfile_base" != "$outfile" -a \( ! -r "$outfile" \) -a -r "$outfile_base" ] -then - # - # No, it's not, but it is in the current directory. Put it - # where it's supposed to be. - # - mv "$outfile_base" "$outfile" - if [ $? -ne 0 ] - then - echo $? - fi -fi - -# -# OK, now let's generate a header file declaring the relevant functions -# defined by the .c file; if the .c file is .../foo.c, the header file -# will be .../foo_lex.h. -# -# This works around some other Flex suckage, wherein it doesn't declare -# the lex routine before defining it, causing compiler warnings. -# XXX - newer versions of Flex support --header-file=, to generate the -# appropriate header file. With those versions, we should use that option. -# - -# -# Get the name of the prefix; scan the source files for a %option prefix -# line. We use the last one. -# -prefix=`sed -n 's/%option[ ][ ]*prefix="\(.*\)".*/\1/p' "$@" | tail -1` -if [ ! -z "$prefix" ] -then - prefixline="#define yylex ${prefix}lex" -fi - -# -# Construct the name of the header file. -# -header_file=`dirname "$outfile"`/`basename "$outfile" .c`_lex.h - -# -# Spew out the declaration. -# -cat <<EOF >$header_file -/* This is generated by runlex.sh. Do not edit it. */ -$prefixline -#ifndef YY_DECL -#define YY_DECL int yylex(void) -#endif -YY_DECL; -EOF diff --git a/wiretap/Makefile.am b/wiretap/Makefile.am index 570fcf1383..22bbb78d41 100644 --- a/wiretap/Makefile.am +++ b/wiretap/Makefile.am @@ -44,10 +44,7 @@ CLEANFILES = \ MAINTAINERCLEANFILES = \ $(GENERATED_FILES) \ - Makefile.in \ - aclocal.m4 \ - config.h.in \ - configure + Makefile.in #Since code generated by lex may trigger gcc warnings, we are now generating two #libraries. A single library is generated with the lex code without the barrier @@ -63,10 +60,8 @@ libwiretap_generated_la_SOURCES = \ EXTRA_DIST = \ README.developer \ - config.h.win32 \ Makefile.common \ Makefile.nmake \ - runlex.sh \ wtap.def \ file_util.c \ $(GENERATOR_SOURCES) \ @@ -75,7 +70,7 @@ EXTRA_DIST = \ libwiretap_la_LIBADD = libwiretap_generated.la libwiretap_la_DEPENDENCIES = libwiretap_generated.la -RUNLEX = $(top_srcdir)/runlex.sh +RUNLEX = $(top_srcdir)/tools/runlex.sh ascend-scanner_lex.h : ascend-scanner.c diff --git a/wiretap/Makefile.nmake b/wiretap/Makefile.nmake index e7f6738ed1..78e16f0e37 100644 --- a/wiretap/Makefile.nmake +++ b/wiretap/Makefile.nmake @@ -38,8 +38,6 @@ wiretap-$(WTAP_VERSION).dll : $(OBJECTS) wtap.def ..\image\wiretap.res mt.exe -nologo -manifest "wiretap-$(WTAP_VERSION).dll.manifest" -outputresource:wiretap-$(WTAP_VERSION).dll;2 !ENDIF -$(OBJECTS): config.h - RUNLEX = ..\tools\runlex.sh ascend-scanner_lex.h : ascend-scanner.c @@ -51,11 +49,6 @@ k12text.obj : k12text.c ascend-grammar.c ascend-grammar.h : ascend-grammar.y $(YACC) $(YACC_OPTS) -d -p ascend ascend-grammar.y -o ascend-grammar.c -config.h : config.h.win32 ..\config.nmake - sed -e s/@VERSION@/$(WTAP_VERSION)/ \ - -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \ - < config.h.win32 > $@ - clean : rm -f $(OBJECTS) \ wiretap-*.lib \ @@ -74,6 +67,6 @@ clean : # long as you need Flex, you might as well get Bison.... # distclean: clean - rm -f config.h $(GENERATED_FILES) + rm -f $(GENERATED_FILES) maintainer-clean: distclean |