#ifdef _JBLEN not portable

Jeffrey A Law law@cygnus.com
Wed Jun 24 21:52:00 GMT 1998


  >  > 1. include <setjmp.h> in toplev.h so jmpbuf is always defined.
  >  > 
  >  >   This probably goes against egcs coding standards
  >  > 
  >  > 2. move setjmp stuff to system.h
  > 
  > 
  > 	Since both toplev.h and system.h are included in almost every
  > file, choices 1&2 would both end up doing the same thing.  That is,
  > every C file would get setjmp.h.  Some egcs developers don't like it
  > when a header only needed in a couple of files gets included
  > everywhere, so I'd like to shy away from these solutions.
I don't see any particular problem with #2.  But you've taken the
lead on this stuff, so I'll leave it up to you.

  > A lower impact alternative would be to find a macro defined in glibc's
  > setjmp.h and change the test in toplev.h to check _JBLEN as well as
  > this new one which you could choose for us.  Eg: 
  > 
  >  > #if defined(_JBLEN) || defined(<SOMETHING_DEFINED_IN_GLIBC_SETJMP_H>)
  >  > extern void set_float_handler PROTO((jmp_buf));
  >  > #endif
But isn't this is the kind of thing we want autoconf to do :-)

jeff



More information about the Gcc-bugs mailing list