From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc/rfa(DavidT?)] Move DOUBLEST to doublest.{h,c} Date: Mon, 30 Jul 2001 15:34:00 -0000 Message-id: <3B65E10B.9000706@cygnus.com> References: <3B5305B5.4070207@cygnus.com> <3B64653B.90607@cygnus.com> <3B65707C.10003@cygnus.com> <200107302128.f6ULSI508576@delius.kettenis.local> X-SW-Source: 2001-07/msg00730.html > 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