This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenBSD tester wanted (fixincludes patch)


Nathanael Nerode wrote:
> 
> Discounting the bogus ones (which I'm making up separate patches for),
> some of the fixes appear, curiously, to be correct!
> 
> -Applying broken_cabs to math.h
> (can't define 'extern double cabs()', conflicts with C99 supposedly)
> 
> -Applying math_huge_val_ifndef to math.h
> (don't define HUGE_VAL if it's already defined -- why was this done and
> is it needed?)
> 
> -Applying bsd_stdio_attrs_conflict to stdio.h
> (#define vfscanf __svfscanf isn't good for builtin_attrs.def apparently
> -- does someone know if this is still true or not?)
> 
> -Applying alpha_sbrk to unistd.h
> (sbrk needs void* prototype, not char* prototype.  Is this true?)
> 
> Are these all in fact correct?  In this case we should get some
> improvement on OpenBSD by starting to use 'em.
> 
> I'm not as sure about these three:
> 
> -Applying gnu_types to stddef.h
> size_t, ptrdiff_t, wchar_t typedefs
> -Applying gnu_types to stdlib.h
> size_t, wchar_t typedefs
> -Applying gnu_types to sys/types.h
> size_t typedef
> 
> Partly because I'm not sure exactly what the gnu_types fix *does*. :-)
> Bruce, any help?

glibc pulls specific types out of particular header files.
To accomplish this once and only once during a compile,
a bunch of #include wizardry is used to protect specific
definitions.  e.g. replace:

> typedef int wchar_t;

with:

> #if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
> #define _GCC_WCHAR_T
> typedef __WCHAR_TYPE__ wchar_t;
> #endif

this is done in fixfixes.c.  Any fix labeled as a ``c_fix'' is found
in that file, including "format".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]