This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [PATCH] Fix configuration in assert.h.
- From: Bart Veer <bartv at ecoscentric dot com>
- To: osv at javad dot com
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 7 Mar 2006 18:00:24 +0000 (GMT)
- Subject: Re: [PATCH] Fix configuration in assert.h.
- References: <877j76gqrb.fsf@javad.com>
>>>>> "Sergei" == Sergei Organov <osv@javad.com> writes:
Sergei> Index: packages/isoinfra/current/ChangeLog
Sergei> ===================================================================
Sergei> RCS file: /var/local/group/firmware/cvsroot/ecos/packages/isoinfra/current/ChangeLog,v
Sergei> retrieving revision 1.1.1.1
Sergei> diff -u -r1.1.1.1 ChangeLog
Sergei> --- packages/isoinfra/current/ChangeLog 7 Dec 2005 12:06:35 -0000 1.1.1.1
Sergei> +++ packages/isoinfra/current/ChangeLog 7 Mar 2006 16:22:55 -0000
Sergei> @@ -1,3 +1,10 @@
Sergei> +2006-03-07 Sergei Organov <osv@javad.com>
Sergei> +
Sergei> + * include/assert.h: Replace #if defined(CYGINT_xxx) with #if
Sergei> + CYGINT_xxx. CYGINT_xxx configuration variables are always
Sergei> + defined to either 0 or 1, so checks of the former form are always
Sergei> + evaluated to true.
That is incorrect. CDL interfaces, which should normally be the only
configury that uses CYGINT_, can have the "data", "bool", or
"booldata" flavors with data being the default. If an interface has
the "data" flavour then there will always be a #define with the value
being the number of implementors of the interface (which can be > 1).
If it has the "bool" flavor and there are no implementors then there
will be no #define, otherwise there will be a #define for 1. If it has
the "booldata" flavor and there are no implementors then there will be
no #define, otherwise there will be a #define for the number of
implementors.
Sergei> Index: packages/isoinfra/current/include/assert.h
Sergei> ===================================================================
Sergei> RCS file: /var/local/group/firmware/cvsroot/ecos/packages/isoinfra/current/include/assert.h,v
Sergei> retrieving revision 1.1.1.1
Sergei> diff -u -r1.1.1.1 assert.h
Sergei> --- packages/isoinfra/current/include/assert.h 7 Dec 2005 12:06:35 -0000 1.1.1.1
Sergei> +++ packages/isoinfra/current/include/assert.h 7 Mar 2006 15:27:50 -0000
Sergei> @@ -73,7 +73,7 @@
Sergei> /* First preference is to be standards compliant */
Sergei> -#if defined(CYGINT_ISO_STDIO_FORMATTED_IO) && defined(CYGINT_ISO_EXIT)
Sergei> +#if CYGINT_ISO_STDIO_FORMATTED_IO && CYGINT_ISO_EXIT
In this case CYGINT_ISO_STDIO_FORMATTED_IO has the booldata flavor so
should be tested with #ifdef or #if defined(). However CYGINT_ISO_EXIT
has the default flavour, i.e. "data", so testing with defined() serves
no purpose. Hence I suspect the line should read:
#if defined(CYGINT_ISO_STDIO_FORMATTED_IO) && CYGINT_ISO_EXIT
Alternatively the bug may be in the CDL with a missing flavor property
for CYGINT_ISO_EXIT. This is jifl's code so I'll let him comment.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts