Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3F47D81F.92670EB7@phekda.freeserve.co.uk> Date: Sat, 23 Aug 2003 22:09:51 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: tests/libc/c99/math/t-fpclas.c References: <200308182213 DOT h7IMDUud018570 AT speedy DOT ludd DOT luth DOT se> <6480-Tue19Aug2003100513+0300-eliz AT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > > From: > > Date: Tue, 19 Aug 2003 00:13:30 +0200 (CEST) > > > > Are everyone happy with the additional header file? Otherwise we could > > add "#if __GNUC__/#endif" to strategic places in (and other > > header files if necessary) to remove everything but the defines for .S > > files. > > Why do we need the header file? Is it just for the definitions of the > FP_* macros? If so, we could create a header with only those > definitions by running Sed on math.h. The header file is only needed > during the compilation of fpclassifyld.S, so there's no need to keep > it any longer, let alone in the public include/sys directory. I don't like the idea of the "#if __GNUC__/#endif" thing. I prefer the idea of using sed. > > Personally I'd rather add the "#if __GNU__"s instead of the new header > > file (now that I think it's possible). > > I agree that this is better than adding a new header. Rather than just complain, here's an example of how to get sed to list what you want. ;) bash-2.04$ echo -e "/FP_CLASSIFY/p\n/FP_NAN/p" > fp.sed bash-2.04$ echo -e "foo\nbar\nFP_CLASSIFY\nblah\nFP_NAN" | sed -n -f fp.sed FP_CLASSIFY FP_NAN bash-2.04$ sed --version GNU sed version 3.02.80 Copyright (C) 1999 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law. I guess you'd need something in the makefile for fpclassify like this: fpclassify.S: fp-asm.h fp-asm.sed sed -n -f fp-asm.sed $(TOP)/../../include/math.h > fp-asm.h clean: rm -f fp-asm.h Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]