[PATCH] long double IEEE double -> quad switch
Ulrich Drepper
drepper@redhat.com
Sat Mar 27 08:18:00 GMT 2004
I don't like any of this very much, people should just bite the bullet.
But if this is not possible we'll have to make the best out of it.
The most important part are the public headers. There is too much added
so far. Especially for loser compilers. Hide that stuff in some extra
header which only exists for the affected platforms and which is only
included in case such a compiler is used. I'm mainly talking about the
long list of defines in <stdio.h> and <wchar.h>.
The defined __LONG_DOUBLE_MATH_OPTIONAL || !defined
__NO_LONG_DOUBLE_MATH expression probably deserves it own #define to
make tests shorter.
All the redirect macros should be defined in a central place:
<sys/cdefs.h>. No need to duplicate this. And: out of sight.
<sys/cdefs.h> is not that often looked at.
The DBL_IS_LDBL_DECL and DBL_IS_LDBL macros probably should be defined
in include/libc-symbols.h and not in individual files. This will also
eliminate some #ifdef in function definition parameter lists.
If you do something like
+#include <libioP.h>
+#ifdef __LONG_DOUBLE_MATH_OPTIONAL
+# define vasprintf(s, f, a) ___vasprintf (s, f, a, 0)
+#else
+# define vasprintf(s, f, a) _IO_vasprintf (s, f, a)
+#endif
it probably is better to just use ___vasprintf everywhere.
On the lighter side, some preprocesor directives are not correctly indented.
--
â§ Ulrich Drepper â§ Red Hat, Inc. â§ 444 Castro St â§ Mountain View, CA â
More information about the Libc-hacker
mailing list