This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Silence compiler warning when using sysctl
- From: jay at systech dot com
- To: John Dallaway <john at dallaway dot org dot uk>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 22 Jul 2009 09:14:13 -0700 (PDT)
- Subject: Re: Silence compiler warning when using sysctl
- Reply-to: jay at systech dot com
--- On Wed, 7/22/09, John Dallaway <john@dallaway.org.uk> wrote:
> From: John Dallaway <john@dallaway.org.uk>
> Subject: Re: Silence compiler warning when using sysctl
> To: jay@systech.com
> Cc: ecos-patches@ecos.sourceware.org
> Date: Wednesday, July 22, 2009, 4:15 AM
> Hi Jay
>
> jay@systech.com
> wrote:
>
> > The attached patch silences a compiler warning when
> using sysctl.
>
> Assuming this is an undefined macro warning, I would
> prefer:
>
> ? #if defined(__FreeBSD_cc_version) &&
> (__FreeBSD_cc_version >= 300001)
>
> to preserve existing behaviour precisely. Does this work
> for you?
>
> John Dallaway
>
Yes. I thought about that too after I submitted the patch.
It turns out that the macro being conditionally defined (__printf0like()) is unused for eCos, so it works either way for eCos.
Jay