From: Simon Kallweit <simon.kallweit@intefo.ch>
To: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Cc: Bob.Brusa@gmail.com,
"MailingList:ecos-discuss ;" <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS]How to run testprograms for lwip
Date: Wed, 29 Jul 2009 12:32:00 -0000 [thread overview]
Message-ID: <4A70421C.3080300@intefo.ch> (raw)
In-Reply-To: <20090729122550.GA28019@sg-ubuntu.local>
Sergei Gavrikov wrote:
> Hi Simon,
>
> Thank you for your contribution. I tried to built lwIP's with SNMP
> support using your snapshot. Unfortunately, I ran in a problem with CPP
> defines for eCos (lwipopts.h).
Glad there are people starting to test the port :)
> mib2.c:70:
> #define SNMP_SYSSERVICES ((1 << 6) | (1 << 3) | ((IP_FORWARD) << 2))
>
> mib2.c:766:
> static const s32_t sysservices = SNMP_SYSSERVICES;
>
> lwipopts.h:102:
> #define IP_FORWARD defined(CYGFUN_LWIP_IP_FORWARD)
>
> So, the above init will become itself:
>
> static const s32_t sysservices = ((1 << 6) | (1 << 3) | ((defined(CYGFUN_LWIP_IP_FORWARD)) << 2))
>
> May be the below should be used in lwipopts.h?
>
> #if defined(CYGFUN_LWIP_IP_FORWARD)
> # define IP_FORWARD 1
> #else
> # define IP_FORWARD 0
> #endif
That's exactly the right fix. There are already some other defines which
use that scheme in lwipopts.h (CYGFUN_LWIP_PAP_SUPPORT is such an example).
> FYI: There are a few defines like this
>
> #define FOO defined(CYG_FOO)
>
> in lwipopts.h. Small testcase:
>
> #define CYG_FOO 1
> #define FOO defined(CYG_FOO)
>
> main ()
> {
> int foo = FOO;
> }
>
> It cannot be linked. FOO is not boolean ;-) I can check the same
> "rvalues" then and send a patch if you want.
As I have not used SNMP myself yet, it had to be expected that there are
some issues left. If you can provide a patch that'd be great!
Simon
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2009-07-29 12:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 9:50 Robert Brusa
2009-07-23 10:02 ` Simon Kallweit
2009-07-23 12:19 ` Robert Brusa
2009-07-23 12:25 ` Simon Kallweit
2009-07-24 15:51 ` Robert Brusa
2009-07-29 12:25 ` Sergei Gavrikov
2009-07-29 12:32 ` Simon Kallweit [this message]
2009-07-30 9:11 David Fernandez
2009-07-30 11:02 ` Sergei Gavrikov
2009-07-30 11:11 ` Simon Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A70421C.3080300@intefo.ch \
--to=simon.kallweit@intefo.ch \
--cc=Bob.Brusa@gmail.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=sergei.gavrikov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).