From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2214 invoked by alias); 25 Jun 2013 17:20:52 -0000 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 Received: (qmail 2181 invoked by uid 89); 25 Jun 2013 17:20:47 -0000 X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 25 Jun 2013 17:20:47 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UrWv1-0006uv-Li for ecos-discuss@ecos.sourceware.org; Tue, 25 Jun 2013 19:20:39 +0200 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jun 2013 19:20:39 +0200 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jun 2013 19:20:39 +0200 To: ecos-discuss@ecos.sourceware.org From: Grant Edwards Date: Tue, 25 Jun 2013 17:20:00 -0000 Message-ID: References: User-Agent: slrn/1.0.1 (Linux) Subject: [ECOS] Re: Why does #include define a bunch of time-related symbols? X-SW-Source: 2013-06/txt/msg00024.txt.bz2 On 2013-06-25, Grant Edwards wrote: > I'm working on a new Ethernet driver. eCos kernel/libs (including the > new drive) build fine. But, when I try to link an application I get a > bunch of errors because some time-related functions are defined twice. > They're defined in libtarget where they're supposed to be, but they're > also getting defined in the object file for my Ethernet driver [and I > can't figure out why]. It's cause by compiling the driver with the -std=gnu99 flag. I a big fan of limiting the scope of variables and like to use this sort of construct: for (int i=0; i