public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [PATCH] long double IEEE double -> quad switch
Date: Sat, 27 Mar 2004 08:18:00 -0000	[thread overview]
Message-ID: <40648956.20700@redhat.com> (raw)
In-Reply-To: <20040324160427.GM15946@sunsite.ms.mff.cuni.cz>

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 ❖

  reply	other threads:[~2004-03-26 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 22:00 Jakub Jelinek
2004-03-27  8:18 ` Ulrich Drepper [this message]
2004-04-07 17:06 ` Steve Munroe
2004-04-07 17:32   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40648956.20700@redhat.com \
    --to=drepper@redhat.com \
    --cc=jakub@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).