compiling ACE for RTEMS

Joel Sherrill joel.sherrill at OARcorp.com
Tue Jul 1 18:05:08 UTC 2003



Jack Cawkwell wrote:
> 
> Joel,
> 
> I must be missing something, but looking at this I find that
> 'configure --enable-posix ...' sets
> 
>         RTEMS_HAS_POSIX_API=yes
> 
> in many of the Makefile's and I as far as I can tell that is the end of it.
> It appears to have no affect on the rest of the build process?
> Comparing it with (say) --enable-rdbg, I have a similar problem with
> finding
> any code that uses RTEMS_HAS_RDBG other than setting it in Makefiles.

The configure options simply prevent certain classes of code from being
built.  Most of them have little or no impact on .h files.

The option I was referring to is the gcc option -ansi.  A small section
of the gcc manual gives a hint.

     The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
     is used.  Some header files may notice this macro and refrain from
     declaring certain functions or defining certain macros that the
     ANSI standard doesn't call for; this is to avoid interfering with
     any programs that might use these names for other things.

Some libraries also use K&R prototypes instead of the ANSI style when 
__STRICT_ANSI__ is not defined.  So I was suggesting that XXX-gcc -ansi
would define __STRICT_ANSI__ and then signal.h should have the int in 
the function signature.  If __STRICT_ANSI__ is not defined, then it
should
use the K&R style signature.  Right now, it doesn't look like it honors
__STRICT_ANSI__ properly.

 
> My objective was to relate --enable-posix to the #if's in signal.h,
> but how can this be done?

It can't.
 
> Incidentally, will it be sensible to have #if RTEMS_HAS_POSIX_API=yes
> compiler control lines in /opt/rtems/i386-rtems/include/sys/signal.h
> or does this file have to be generic.

That file shoudl be generic and independent of the actual RTEMS
configuration.

> Jack

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list