Ethereal-dev: Re: [Ethereal-dev] Use of C99 code in 0.10.8

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Thu, 30 Dec 2004 01:27:55 +0100
On Thu, Dec 30, 2004 at 01:15:04AM +0100, Joerg Mayer wrote:
> On Wed, Dec 29, 2004 at 03:49:21PM -0800, Guy Harris wrote:
> > Well, compiling with -ansi seems to work - and it catches // comments.
> 
> At least on linux it will cause compilation to fail in the libpcap includes
> (at least it did last time I checked - maybe a year ago).

And it still does:

 /opt/experimental/gcc-4.0/bin/gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I/usr/local/include "-D_U_=__attribute__((unused))" -Wall -W -ansi -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -O3 -march=i686 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -MT libpcap.lo -MD -MP -MF .deps/libpcap.Tpo -c libpcap.c  -fPIC -DPIC -o .libs/libpcap.o
In file included from /usr/include/pcap.h:48,
                 from libpcap.c:28:
/usr/include/pcap-bpf.h:64: error: syntax error before 'bpf_u_int32'
/usr/include/pcap-bpf.h:85: error: syntax error before 'u_int'
/usr/include/pcap-bpf.h:87: error: syntax error before '}' token
/usr/include/pcap-bpf.h:101: error: syntax error before 'u_short'
/usr/include/pcap-bpf.h:574: error: syntax error before 'u_short'
/usr/include/pcap-bpf.h:576: error: syntax error before 'jf'
/usr/include/pcap-bpf.h:578: error: syntax error before '}' token
/usr/include/pcap-bpf.h:588: error: syntax error before 'bpf_filter'
/usr/include/pcap-bpf.h:588: error: syntax error before 'u_char'
In file included from libpcap.c:28:
/usr/include/pcap.h:111: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:113: error: syntax error before 'version_minor'
/usr/include/pcap.h:115: error: syntax error before 'sigfigs'
/usr/include/pcap.h:116: error: syntax error before 'snaplen'
/usr/include/pcap.h:117: error: syntax error before 'linktype'
/usr/include/pcap.h:127: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:135: error: syntax error before 'u_int'
/usr/include/pcap.h:137: error: syntax error before 'ps_ifdrop'
/usr/include/pcap.h:151: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:167: error: syntax error before '*' token
/usr/include/pcap.h:171: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:176: error: syntax error before 'u_char'
/usr/include/pcap.h:177: error: syntax error before 'u_char'
/usr/include/pcap.h:178: error: syntax error before '*' token
/usr/include/pcap.h:180: error: syntax error before '*' token
/usr/include/pcap.h:190: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:192: error: syntax error before 'bpf_u_int32'
/usr/include/pcap.h:212: error: syntax error before '*' token
/usr/include/pcap.h:221: error: syntax error before 'bpf_filter'
/usr/include/pcap.h:221: error: syntax error before 'u_char'
libpcap.c: In function 'wtap_process_pcap_packet':
libpcap.c:1727: error: dereferencing pointer to incomplete type
libpcap.c:1728: error: dereferencing pointer to incomplete type
libpcap.c:1729: error: dereferencing pointer to incomplete type
libpcap.c:1730: error: dereferencing pointer to incomplete type
make[1]: *** [libpcap.lo] Error 1
make[1]: Leaving directory `/home/jmayer/work/ethereal/trunk/wiretap'
make: *** [all] Error 2

Ciao
 Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.