This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc/rfa(DavidT?)] Move DOUBLEST to doublest.{h,c}
> Headers such as tm-m88k.h contain macros that refer to functions such as
> store_floating(). I moved those functions to doublest.h.
>
> I see, but how about the i386/xm-*.h files? I'm asking since I'm
> thinking about replacing most of them with a single xm-i386.h with the
> following contents:
I was only checking for references to the functions I moved.
> /* FIXME: kettenis/2001-07-29: Get rid of HOST_BYTE_ORDER when Andrew
> has erradicated it from the sources. */
> #define HOST_BYTE_ORDER LITTLE_ENDIAN
>
> #define HOST_FLOAT_FORMAT &floatformat_ieee_single_little
> #define HOST_DOUBLE_FORMAT &floatformat_ieee_double_little
> #define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
I'd include "floatformat.h". Is there an x86 system that doesn't have
long double? I've a memory of someone pointing this out when I recently
changed the i387 float conversion code.
FYI, I also recently added the below to the doco. It was an attempt at
summarising an earlier discussion about an include file policy.
Andrew
@subsection Include Files
All @file{.c} files should include @file{defs.h} first.
All @file{.c} files should explicitly include the headers for any
declarations they refer to. They should not rely on files being
included indirectly.
With the exception of the global definitions supplied by @file{defs.h},
a header file should explictily include the header declaring any
@code{typedefs} et.al.@: it refers to.
@code{extern} declarations should never appear in @code{.c} files.
All include files should be wrapped in:
@example
#ifndef INCLUDE_FILE_NAME_H
#define INCLUDE_FILE_NAME_H
header body
#endif
@end example