[prev in list] [next in list] [prev in thread] [next in thread]
List: winpcap-users
Subject: Re: [Winpcap-users] [PATCH] mingw build
From: "Gianluca Varenni" <gianluca.varenni () cacetech ! com>
Date: 2010-11-12 21:49:59
Message-ID: 5A734B0054A34FC2A30F1719A91A7C40 () NELSON3
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Alon,
sorry for taking so much time in getting back to you. I've been extremely busy after \
the recent acquisition and I haven't found time to work on it. I plan to work again \
on it within the next couple of weeks.
Have a nice day
GV
From: Alon Bar-Lev
Sent: Thursday, October 21, 2010 4:10 AM
To: winpcap-users@winpcap.org
Subject: Re: [Winpcap-users] [PATCH] mingw build
I use the simple way...
Gentoo's crossdev
crossdev -t i686-w64-mingw32
crossdev -t x86_64-w64-mingw32
On Wed, Oct 20, 2010 at 2:39 AM, Gianluca Varenni <gianluca.varenni@cacetech.com> \
wrote:
That should work.
Can you tell me the exact steps and environment that you use to target 32bit
with MINGW64?
Have a nice day
GV
--------------------------------------------------
From: "Alon Bar-Lev" <alon.barlev@gmail.com>
Sent: Tuesday, October 19, 2010 10:33 AM
To: <winpcap-users@winpcap.org>
Subject: Re: [Winpcap-users] [PATCH] mingw build
> Hi,
>
> No I don't use -m32, you can build cross compile that targets 32bit
> without multilib...
> But it is not such important.
>
> What I am suggesting is a simple Makefile rule, or just use the
> autoconf provided with libpcap anyway... but if not, please consider
> the following, then #include config.h, and use its constants to
> conditionally do whatever.
>
> target: config.h
>
> config.h:
> -rm config.h config.h.tmp
> touch config.h.tmp
> echo "#include <windows.h>" > conftest.c
> echo "#include <ntddndis.h>" >> conftest.c
> $(CC) -c conftest.c > /dev/null 2>&1 && echo "#define
> HAVE_NTDDNDIS_H 1" >> config.h.tmp || true
> echo "#include <windows.h>" > conftest.c
> echo "#include <ddk/ntddndis.h>" >> conftest.c
> $(CC) -c conftest.c > /dev/null 2>&1 && echo "#define
> HAVE_DDK_NTDDNDIS_H 1" >> config.h.tmp || true
> echo "int getaddrinfo();int main(void){getaddrinfo();}" >
> conftest.c
> $(CC) conftest.c -lws2_32 > /dev/null 2>&1 && echo "#define
> HAVE_GETADDRINFO 1" >> config.h.tmp || true
> mv config.h.tmp config.h
>
>
>
> On Tue, Oct 19, 2010 at 6:51 PM, Gianluca Varenni
> <gianluca.varenni@cacetech.com> wrote:
>>
>>
>> --------------------------------------------------
>> From: "Alon Bar-Lev" <alon.barlev@gmail.com>
>> Sent: Tuesday, October 19, 2010 12:16 AM
>> To: <winpcap-users@winpcap.org>
>> Subject: Re: [Winpcap-users] [PATCH] mingw build
>>
>>> Hi,
>>>
>>> This is incorrect:
>>> ---
>>> #ifdef __MINGW32__
>>> +#ifdef __MINGW64__
>>> +#include <ntddndis.h>
>>> +#else /*__MINGW64__*/
>>> #include <ddk/ntddndis.h>
>>> +#endif /*__MINGW64__*/
>>> #else
>>> ---
>>>
>>> As mingw-w64 can be used as both 32bit and 64bit (i686-w64-mingw32,
>>> x86_64-w64-mingw32).
>>> So you fix this for 64bit but if you use 32bit you will get the same
>>> error.
>>
>> I think I know what you mean now (after searching more on the internet).
>> You
>> are using MINGW64 *and* the option -m32 to generate 32bit binaries. I
>> didn't
>> know about the existence of -m32 ...
>>
>> Regarding the addition of the ddk include in the makefile, the reason why
>> I
>> didn't do that is because I couldn't find a definition of the default
>> include folder for that specific toolchain (and that works on mingw,
>> mingw64, mingw64 with -m32, linux, windows, cygwin). Ideally the addition
>> should be something like
>>
>> CFLAGS = ........ -I ${default_include_dir}/ddk
>>
>> but I haven't found what is the right env variable that I should put in
>> place of "default_include_dir". I don't want to put an absolute path
>> there.
>>
>> I'm definitely open to suggestions...
>>
>> Have a nice day
>> GV
>>
>>
>>>
>>> What I recommend is to add ddk include file LAST in the CPP search
>>> list in make file.
>>>
>>> Same goes to:
>>> +/*
>>> + * Mingw64 has its own implementation of getaddrinfo, mingw32 no
>>> + */
>>> +#ifndef __MINGW64__
>>> +
>>> +
>>>
>>> Best to have it done in Makefile, by trying to compile something with
>>> getaddrinfo and create mini config.h file.
>>>
>>> If you want I can create such a patch. And if we do this, we can also
>>> check if the ddk is needed or not using the same method.
>>>
>>> Regards,
>>> Alon Bar-Lev.
>>>
>>> On Tue, Oct 19, 2010 at 12:19 AM, Gianluca Varenni
>>> <gianluca.varenni@cacetech.com> wrote:
>>>>
>>>> I reworked the patch originally provided by Alon Bar-Lev (thanks!) a
>>>> bit
>>>> to
>>>> have WinPcap 4.1.2 compile under MINGW32 and MINGW64, Windows and Linux
>>>> cross compilation.
>>>>
>>>> You can find it at
>>>>
>>>> http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_win.patch
>>>> http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_linux.patch
>>>>
>>>> MD5's are as follows:
>>>>
>>>> 6cecf64649cfd4f32553025d2b6daa96 *WinPcap_4_1_2_mingw_linux.patch
>>>> 8b341ba39bb0b621c81f5c8df7e7536a *WinPcap_4_1_2_mingw_win.patch
>>>>
>>>> Due to a big mess with line endings in the source code of WinPcap 4.1.2
>>>> (some files have the CR/LF line ending, some have the LF one), the
>>>> patch
>>>> that was working on Windows (with patch.exe coming from cygwin or
>>>> MSYS)
>>>> was
>>>> not working on linux, and viceversa. So I created two patch files for
>>>> WinPcap 4.1.2.
>>>>
>>>> The resulting patched WinPcap 4.1.2 was tested on
>>>> - Cygwin 1.7
>>>> - MSYS+MINGW64 (I used the TDM-GCC one at http://tdm-gcc.tdragon.net/)
>>>> - MSYS+MINGW32 (I used the TDM-GCC one at http://tdm-gcc.tdragon.net/)
>>>> - MINGW32 on a debian "squeeze" machine
>>>> - MINGW64 on a debian "squeeze" machine
>>>>
>>>> Also, the same patches were committed on the WinPcap repository +
>>>> libpcap
>>>> repository (HEAD and libpcap_1.1 branch).
>>>>
>>>> Have a nice day
>>>> GV
>>>>
>>>>
>>>>
>>>> --------------------------------------------------
>>>> From: "Gianluca Varenni" <gianluca.varenni@cacetech.com>
>>>> Sent: Tuesday, October 12, 2010 9:43 AM
>>>> To: <winpcap-users@winpcap.org>
>>>> Subject: Re: [Winpcap-users] [PATCH] mingw build
>>>>
>>>> >
>>>> >
>>>> > --------------------------------------------------
>>>> > From: "Guy Harris" <guy@alum.mit.edu>
>>>> > Sent: Wednesday, October 06, 2010 5:02 PM
>>>> > To: <winpcap-users@winpcap.org>
>>>> > Subject: Re: [Winpcap-users] [PATCH] mingw build
>>>> >
>>>> >>
>>>> >> On Sep 14, 2010, at 9:17 AM, Alon Bar-Lev wrote:
>>>> >>
>>>> >>> 4. grammar.y - any idea why we need pcap_parse if yacc defines it
>>>> >>> anyway instead of yyparse?
>>>> >>
>>>> >> Because
>>>> >>
>>>> >> 1) WinPcap is based on libpcap;
>>>> >>
>>>> >> 2) libpcap was originally written back when many UN*Xes had only the
>>>> >> old
>>>> >> AT&T YACC, which only defined yyparse().
>>>> >>
>>>> >> The current top-of-trunk version of grammar.y, at least, defines
>>>> >> pcap_parse() only if YYBISON is not defined, which presumably means
>>>> >> "not
>>>> >> Bison".
>>>> >>
>>>> >>> 5. yacc does not accept -y argument.
>>>> >>
>>>> >> Earlier versions of GNUmakefile mirrored the UN*X Makefile.in, and
>>>> >> had
>>>> >> a
>>>> >> YACC variable that ran Bison, rather than YACC, with the "-y" flag
>>>> >> (which,
>>>> >> for Bison, means "act like YACC and produce y.tab.c and y.tab.h
>>>> >> files").
>>>> >>
>>>> >> The 4.1.2 version runs whatever make sets YACC to refer to, with the
>>>> >> YFLAGS flag. Is there some reason why that was done?
>>>> >
>>>> > No idea. The original GNUMakefile was contributed by someone and
>>>> > included
>>>> > into the WinPcap sources.
>>>> > I modified GNUMakefile to
>>>> > 1. define "BISON = bison" and "FLEX = flex"
>>>> > 2. use ${BISON} to compile grammar.y
>>>> >
>>>> >
>>>> >> Was this to support parser-generators *other* than Bison? Unless
>>>> >> there's
>>>> >> a compelling reason not to run Bison, it should probably go back to
>>>> >> the
>>>> >> way it was, using Bison - that'll fix that problem *and* the
>>>> >> previous
>>>> >> problem, with no changes required to grammar.y.
>>>> >>
>>>> >> If there *is* a compelling reason not to run Bison, then
>>>> >>
>>>> >> 1) it should not include "-y"
>>>> >>
>>>> >> and
>>>> >>
>>>> >> 2) either it should not do "-p pcap_", if whatever version of YACC
>>>> >> is
>>>> >> being used doesn't support "-p", or:
>>>> >>
>>>> >> 2a) grammar.y should check for YYBISON *and* some other #define
>>>> >> named
>>>> >> appropriately for whatever parser-generator is being used
>>>> >>
>>>> >> and
>>>> >>
>>>> >> 2b) it should do "-D{that #define name}".
>>>> >>
>>>> >>> 7. Minor modification of (char*)A += code.
>>>> >>
>>>> >> (I.e., "casting lvalues considered harmful - and possibly rejected
>>>> >> by
>>>> >> some
>>>> >> compilers.")
>>>> >
>>>> > I will commit it on the libpcap git repository as soon as possible.
>>>> >
>>>> > Have a nice day
>>>> > GV
>>>> >
>>>> >> _______________________________________________
>>>> >> Winpcap-users mailing list
>>>> >> Winpcap-users@winpcap.org
>>>> >> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>> >
>>>> > _______________________________________________
>>>> > Winpcap-users mailing list
>>>> > Winpcap-users@winpcap.org
>>>> > https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>>
>>>> _______________________________________________
>>>> Winpcap-users mailing list
>>>> Winpcap-users@winpcap.org
>>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>> _______________________________________________
>>> Winpcap-users mailing list
>>> Winpcap-users@winpcap.org
>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>
>> _______________________________________________
>> Winpcap-users mailing list
>> Winpcap-users@winpcap.org
>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users@winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
--------------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=utf-8 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16671"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>Alon,</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>sorry for taking so much time in getting back to you.
I've been extremely busy after the recent acquisition and I haven't found time
to work on it. I plan to work again on it within the next couple of
weeks.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Have a nice day</FONT></DIV>
<DIV><FONT face=Calibri>GV</FONT></DIV>
<DIV> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=alon.barlev@gmail.com
href="mailto:alon.barlev@gmail.com">Alon Bar-Lev</A> </DIV>
<DIV><B>Sent:</B> Thursday, October 21, 2010 4:10 AM</DIV>
<DIV><B>To:</B> <A
title="mailto:winpcap-users@winpcap.org CTRL + Click to follow link"
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Winpcap-users] [PATCH] mingw build</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV dir=ltr>I use the simple way...<BR><BR>Gentoo's crossdev<BR><BR>crossdev -t
i686-w64-mingw32<BR>crossdev -t x86_64-w64-mingw32<BR><BR>
<DIV class=gmail_quote>On Wed, Oct 20, 2010 at 2:39 AM, Gianluca Varenni <SPAN
dir=ltr><<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>></SPAN> \
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; \
PADDING-LEFT: 1ex" class=gmail_quote>That should work.<BR><BR>Can you tell me the \
exact steps and environment that you use to target 32bit<BR>with MINGW64?<BR>
<DIV class=im><BR>Have a nice
day<BR>GV<BR><BR><BR><BR>--------------------------------------------------<BR></DIV>
<DIV class=im>From: "Alon Bar-Lev" <<A
href="mailto:alon.barlev@gmail.com">alon.barlev@gmail.com</A>><BR></DIV>Sent:
Tuesday, October 19, 2010 10:33 AM<BR>
<DIV>
<DIV></DIV>
<DIV class=h5>To: <<A
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>><BR>Subject: \
Re: [Winpcap-users] [PATCH] mingw build<BR><BR>> Hi,<BR>><BR>> No I
don't use -m32, you can build cross compile that targets 32bit<BR>> without
multilib...<BR>> But it is not such important.<BR>><BR>> What I am
suggesting is a simple Makefile rule, or just use the<BR>> autoconf
provided with libpcap anyway... but if not, please consider<BR>> the
following, then #include config.h, and use its constants to<BR>>
conditionally do whatever.<BR>><BR>> target: config.h<BR>><BR>>
config.h:<BR>> -rm config.h config.h.tmp<BR>>
touch config.h.tmp<BR>>
echo "#include <windows.h>" > conftest.c<BR>>
echo "#include <ntddndis.h>" >> conftest.c<BR>>
$(CC) -c conftest.c > /dev/null 2>&1
&& echo "#define<BR>> HAVE_NTDDNDIS_H 1" >> config.h.tmp ||
true<BR>> echo "#include <windows.h>" >
conftest.c<BR>> echo "#include
<ddk/ntddndis.h>" >> conftest.c<BR>>
$(CC) -c conftest.c > /dev/null 2>&1 && echo
"#define<BR>> HAVE_DDK_NTDDNDIS_H 1" >> config.h.tmp || true<BR>>
echo "int getaddrinfo();int
main(void){getaddrinfo();}" ><BR>> conftest.c<BR>>
$(CC) conftest.c -lws2_32 > /dev/null 2>&1 &&
echo "#define<BR>> HAVE_GETADDRINFO 1" >> config.h.tmp ||
true<BR>> mv config.h.tmp
config.h<BR>><BR>><BR>><BR>> On Tue, Oct 19, 2010 at 6:51 PM,
Gianluca Varenni<BR>> <<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>>
wrote:<BR>>><BR>>><BR>>>
--------------------------------------------------<BR>>> From: "Alon
Bar-Lev" <<A
href="mailto:alon.barlev@gmail.com">alon.barlev@gmail.com</A>><BR>>>
Sent: Tuesday, October 19, 2010 12:16 AM<BR>>> To: <<A
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>><BR>>> \
Subject: Re: [Winpcap-users] [PATCH] mingw build<BR>>><BR>>>>
Hi,<BR>>>><BR>>>> This is incorrect:<BR>>>>
---<BR>>>> #ifdef __MINGW32__<BR>>>> +#ifdef
__MINGW64__<BR>>>> +#include <ntddndis.h><BR>>>>
+#else /*__MINGW64__*/<BR>>>> #include
<ddk/ntddndis.h><BR>>>> +#endif /*__MINGW64__*/<BR>>>>
#else<BR>>>> ---<BR>>>><BR>>>> As mingw-w64 can be
used as both 32bit and 64bit (i686-w64-mingw32,<BR>>>>
x86_64-w64-mingw32).<BR>>>> So you fix this for 64bit but if you use
32bit you will get the same<BR>>>> error.<BR>>><BR>>> I
think I know what you mean now (after searching more on the
internet).<BR>>> You<BR>>> are using MINGW64 *and* the option -m32
to generate 32bit binaries. I<BR>>> didn't<BR>>> know about the
existence of -m32 ...<BR>>><BR>>> Regarding the addition of the
ddk include in the makefile, the reason why<BR>>> I<BR>>> didn't
do that is because I couldn't find a definition of the default<BR>>>
include folder for that specific toolchain (and that works on
mingw,<BR>>> mingw64, mingw64 with -m32, linux, windows, cygwin).
Ideally the addition<BR>>> should be something
like<BR>>><BR>>> CFLAGS = ........ -I
${default_include_dir}/ddk<BR>>><BR>>> but I haven't found
what is the right env variable that I should put in<BR>>> place of
"default_include_dir". I don't want to put an absolute path<BR>>>
there.<BR>>><BR>>> I'm definitely open to
suggestions...<BR>>><BR>>> Have a nice day<BR>>>
GV<BR>>><BR>>><BR>>>><BR>>>> What I recommend is
to add ddk include file LAST in the CPP search<BR>>>> list in make
file.<BR>>>><BR>>>> Same goes to:<BR>>>>
+/*<BR>>>> + * Mingw64 has its own implementation of getaddrinfo,
mingw32 no<BR>>>> + */<BR>>>> +#ifndef
__MINGW64__<BR>>>> +<BR>>>>
+<BR>>>><BR>>>> Best to have it done in Makefile, by trying
to compile something with<BR>>>> getaddrinfo and create mini config.h
file.<BR>>>><BR>>>> If you want I can create such a patch.
And if we do this, we can also<BR>>>> check if the ddk is needed or
not using the same method.<BR>>>><BR>>>>
Regards,<BR>>>> Alon Bar-Lev.<BR>>>><BR>>>> On Tue,
Oct 19, 2010 at 12:19 AM, Gianluca Varenni<BR>>>> <<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>>
wrote:<BR>>>>><BR>>>>> I reworked the patch originally
provided by Alon Bar-Lev (thanks!) a<BR>>>>>
bit<BR>>>>> to<BR>>>>> have WinPcap 4.1.2 compile
under MINGW32 and MINGW64, Windows and Linux<BR>>>>> cross
compilation.<BR>>>>><BR>>>>> You can find it
at<BR>>>>><BR>>>>> <A
href="http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_win.patch"
target=_blank>http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_win.patch</A><BR>>>>> \
<A href="http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_linux.patch"
target=_blank>http://www.winpcap.org/install/bin/WinPcap_4_1_2_mingw_linux.patch</A><BR>>>>><BR>>>>> \
MD5's are as follows:<BR>>>>><BR>>>>>
6cecf64649cfd4f32553025d2b6daa96
*WinPcap_4_1_2_mingw_linux.patch<BR>>>>>
8b341ba39bb0b621c81f5c8df7e7536a
*WinPcap_4_1_2_mingw_win.patch<BR>>>>><BR>>>>> Due to
a big mess with line endings in the source code of WinPcap
4.1.2<BR>>>>> (some files have the CR/LF line ending, some have
the LF one), the<BR>>>>> patch<BR>>>>> that was
working on Windows (with patch.exe coming from cygwin
or<BR>>>>> MSYS)<BR>>>>> was<BR>>>>> not
working on linux, and viceversa. So I created two patch files
for<BR>>>>> WinPcap 4.1.2.<BR>>>>><BR>>>>>
The resulting patched WinPcap 4.1.2 was tested on<BR>>>>> - Cygwin
1.7<BR>>>>> - MSYS+MINGW64 (I used the TDM-GCC one at <A
href="http://tdm-gcc.tdragon.net/"
target=_blank>http://tdm-gcc.tdragon.net/</A>)<BR>>>>> -
MSYS+MINGW32 (I used the TDM-GCC one at <A href="http://tdm-gcc.tdragon.net/"
target=_blank>http://tdm-gcc.tdragon.net/</A>)<BR>>>>> - MINGW32
on a debian "squeeze" machine<BR>>>>> - MINGW64 on a debian
"squeeze" machine<BR>>>>><BR>>>>> Also, the same
patches were committed on the WinPcap repository +<BR>>>>>
libpcap<BR>>>>> repository (HEAD and libpcap_1.1
branch).<BR>>>>><BR>>>>> Have a nice
day<BR>>>>>
GV<BR>>>>><BR>>>>><BR>>>>><BR>>>>>
--------------------------------------------------<BR>>>>> From:
"Gianluca Varenni" <<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>><BR>>>>> \
Sent: Tuesday, October 12, 2010 9:43 AM<BR>>>>> To: <<A
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>><BR>>>>> \
Subject: Re: [Winpcap-users] [PATCH] mingw
build<BR>>>>><BR>>>>> ><BR>>>>>
><BR>>>>> >
--------------------------------------------------<BR>>>>> >
From: "Guy Harris" <<A
href="mailto:guy@alum.mit.edu">guy@alum.mit.edu</A>><BR>>>>>
> Sent: Wednesday, October 06, 2010 5:02 PM<BR>>>>> > To:
<<A
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>><BR>>>>> \
> Subject: Re: [Winpcap-users] [PATCH] mingw build<BR>>>>>
><BR>>>>> >><BR>>>>> >> On Sep 14,
2010, at 9:17 AM, Alon Bar-Lev wrote:<BR>>>>>
>><BR>>>>> >>> 4. grammar.y - any idea why we need
pcap_parse if yacc defines it<BR>>>>> >>> anyway instead
of yyparse?<BR>>>>> >><BR>>>>> >>
Because<BR>>>>> >><BR>>>>> >> 1) WinPcap
is based on libpcap;<BR>>>>> >><BR>>>>> >>
2) libpcap was originally written back when many UN*Xes had only
the<BR>>>>> >> old<BR>>>>> >> AT&T
YACC, which only defined yyparse().<BR>>>>>
>><BR>>>>> >> The current top-of-trunk version of
grammar.y, at least, defines<BR>>>>> >> pcap_parse() only if
YYBISON is not defined, which presumably means<BR>>>>> >>
"not<BR>>>>> >> Bison".<BR>>>>>
>><BR>>>>> >>> 5. yacc does not accept -y
argument.<BR>>>>> >><BR>>>>> >> Earlier
versions of GNUmakefile mirrored the UN*X Makefile.in, and<BR>>>>>
>> had<BR>>>>> >> a<BR>>>>> >> YACC
variable that ran Bison, rather than YACC, with the "-y"
flag<BR>>>>> >> (which,<BR>>>>> >> for
Bison, means "act like YACC and produce y.tab.c and
y.tab.h<BR>>>>> >> files").<BR>>>>>
>><BR>>>>> >> The 4.1.2 version runs whatever make
sets YACC to refer to, with the<BR>>>>> >> YFLAGS flag.
Is there some reason why that was done?<BR>>>>>
><BR>>>>> > No idea. The original GNUMakefile was
contributed by someone and<BR>>>>> >
included<BR>>>>> > into the WinPcap
sources.<BR>>>>> > I modified GNUMakefile
to<BR>>>>> > 1. define "BISON = bison" and "FLEX =
flex"<BR>>>>> > 2. use ${BISON} to compile
grammar.y<BR>>>>> ><BR>>>>>
><BR>>>>> >> Was this to support parser-generators
*other* than Bison? Unless<BR>>>>> >>
there's<BR>>>>> >> a compelling reason not to run Bison, it
should probably go back to<BR>>>>> >>
the<BR>>>>> >> way it was, using Bison - that'll fix that
problem *and* the<BR>>>>> >> previous<BR>>>>>
>> problem, with no changes required to grammar.y.<BR>>>>>
>><BR>>>>> >> If there *is* a compelling reason not to
run Bison, then<BR>>>>> >><BR>>>>> >> 1)
it should not include "-y"<BR>>>>> >><BR>>>>>
>> and<BR>>>>> >><BR>>>>> >> 2)
either it should not do "-p pcap_", if whatever version of
YACC<BR>>>>> >> is<BR>>>>> >> being used
doesn't support "-p", or:<BR>>>>> >><BR>>>>>
>> 2a) grammar.y should check for YYBISON *and* some other
#define<BR>>>>> >> named<BR>>>>> >>
appropriately for whatever parser-generator is being used<BR>>>>>
>><BR>>>>> >> and<BR>>>>>
>><BR>>>>> >> 2b) it should do "-D{that #define
name}".<BR>>>>> >><BR>>>>> >>> 7. Minor
modification of (char*)A += code.<BR>>>>>
>><BR>>>>> >> (I.e., "casting lvalues considered
harmful - and possibly rejected<BR>>>>> >>
by<BR>>>>> >> some<BR>>>>> >>
compilers.")<BR>>>>> ><BR>>>>> > I will commit
it on the libpcap git repository as soon as possible.<BR>>>>>
><BR>>>>> > Have a nice day<BR>>>>> >
GV<BR>>>>> ><BR>>>>> >>
_______________________________________________<BR>>>>> >>
Winpcap-users mailing list<BR>>>>> >> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>>>> \
>> <A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>>>>> \
><BR>>>>> >
_______________________________________________<BR>>>>> >
Winpcap-users mailing list<BR>>>>> > <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>>>> \
> <A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>>>>><BR>>>>> \
_______________________________________________<BR>>>>>
Winpcap-users mailing list<BR>>>>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>>>> \
<A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>>>> \
_______________________________________________<BR>>>> Winpcap-users
mailing list<BR>>>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>>> \
<A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>>>><BR>>> \
_______________________________________________<BR>>> Winpcap-users
mailing list<BR>>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>>
<A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>>><BR>> \
_______________________________________________<BR>> Winpcap-users mailing
list<BR>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>
<A href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>><BR>_______________________________________________<BR>Winpcap-users \
mailing list<BR><A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR><A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BODY></HTML>
_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic