From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4332 invoked by alias); 29 Jul 2009 12:32:08 -0000 Received: (qmail 4322 invoked by uid 22791); 29 Jul 2009 12:32:07 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BR X-Spam-Check-By: sourceware.org Received: from mail05.solnet.ch (HELO mail05.solnet.ch) (212.101.4.139) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jul 2009 12:32:00 +0000 Received: from mail05.solnet.ch ([127.0.0.1]) by localhost (mail05.solnet.ch [127.0.0.1]) (SolNet-Check, port 10024) with LMTP id 9dxPPsTNJcYW; Wed, 29 Jul 2009 12:31:56 +0000 (UTC) Received: from beta.intefo.ch (static-212-101-18-64.adsl.solnet.ch [212.101.18.64]) by mail05.solnet.ch (Postfix) with ESMTP id 44DEE3A382; Wed, 29 Jul 2009 12:31:56 +0000 (UTC) Received: from beta.intefo.ch ([127.0.0.1]) by localhost (beta.intefo.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id poU8gHSmyUZ9; Wed, 29 Jul 2009 14:31:55 +0200 (CEST) Received: from [192.168.1.99] (192.168.1.99.local.home [192.168.1.99]) by beta.intefo.ch (Postfix) with ESMTP id A66BE7700AF; Wed, 29 Jul 2009 14:31:55 +0200 (CEST) Message-ID: <4A70421C.3080300@intefo.ch> Date: Wed, 29 Jul 2009 12:32:00 -0000 From: Simon Kallweit User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Sergei Gavrikov CC: Bob.Brusa@gmail.com, "MailingList:ecos-discuss ;" References: <4A6835B0.6000803@intefo.ch> <4A68574F.5040307@intefo.ch> <20090729122550.GA28019@sg-ubuntu.local> In-Reply-To: <20090729122550.GA28019@sg-ubuntu.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS]How to run testprograms for lwip X-SW-Source: 2009-07/txt/msg00258.txt.bz2 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