Mail Archives: djgpp-workers/2004/01/03/17:37:35
Hello.
Kbwms AT aol DOT com wrote:
> There continues to be a conflict with symbol 'roundl' in doprnt.c and
> the C99 function roundl(). A suggested fix that works is:
>
> --- src/libc/ansi/stdio/doprnt.c 2003-11-08 07:19:40.000000000 -0500
> +++ c:/gputil/doprnt.c 2004-01-03 15:36:26.000000000 -0500
[snip]
> static char *
> -roundl(long double fract, int *expv, char *start, char *end, char ch,
> +__roundl(long double fract, int *expv, char *start, char *end, char ch,
> char *signp)
> {
> long double tmp;
Presumably the conflict is because the prototypes differ?
I don't think renaming it to __roundl is the right solution. If we ever
use (the C99) roundl in a non-C99 function in libc, we will need a stub
for it, to avoid polluting the global namespace. In that case, (the C99)
roundl will be available in two versions: a stub called roundl for C99
programs and a stub called __roundl that will be used internally in the
library. So there will still be a clash.
Stubs are explained in the developer's section of the DJGPP knowledge
base ("info kb").
I suggest renaming the function to some other name.
Perhaps prefix it with "doprnt_", e.g.: doprnt_roundl. That's kind of
ugly. It would probably need to be done to the other internal functions
too: cvtl, roundl, exponentl, isspeciall.
A name related to its function would be better, but I can't think of a
non-ugly name now. I'm sure someone else can do better.
Bye, Rich =]
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]
"You can't evaluate a man by logic alone."
-- McCoy, "I, Mudd", Star Trek
- Raw text -