Summary: | [libc] [patch] new feature: add a64l()/l64a/l64a_r functions (obtained from NetBSD) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | osa <osa> | ||||
Component: | standards | Assignee: | Tom Rhodes <trhodes> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 5.0-CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
osa
2003-04-21 12:00:18 UTC
On Mon, Apr 21, 2003 at 02:59:46PM +0400, Sergey A.Osokin wrote: > +int > +l64a_r (long value, char *buffer, int buflen) > +{ > + char *s = buffer; > + int digit; > + unsigned long v = value; ^^^^^^^^^^^^^ Shouldn't this be 'uint32_t'? According to SUSv3: "If the type long contains more than 32 bits, only the low-order 32 bits shall be used for these operations." > + > + _DIAGASSERT(buffer != NULL); > + > + if (value == 0UL) > + goto out; > + > + for (; v != 0 && buflen > 1; s++, buflen--) { > + digit = (int)(v & 0x3f); > + > + if (digit < 2) > + *s = digit + '.'; > + else if (digit < 12) > + *s = digit + '0' - 2; > + else if (digit < 38) > + *s = digit + 'A' - 12; > + else > + *s = digit + 'a' - 38; > + v >>= 6; > + } > + > +out: > + *s = '\0'; > + > + return (v == 0UL ? 0 : -1); > +} On Mon, Apr 21, 2003 at 04:00:18AM -0700, FreeBSD-gnats-submit@FreeBSD.org wrote: > Thank you very much for your problem report. > It has the internal identification `standards/51209'. > The individual assigned to look at your > report is: freebsd-standards. > > You can access the state of your problem report at any time > via this link: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=51209 > > >Category: standards > >Responsible: freebsd-standards > >Synopsis: [PATCH] add a64l()/l64a/l64a_r functions (obtained from NetBSD) > >Arrival-Date: Mon Apr 21 04:00:18 PDT 2003 New version of this patch avaliable at http://ozz.pp.ru/patches/patch-libc Thanks ru@. -- Rgdz, /"\ ASCII RIBBON CAMPAIGN Sergey Osokin aka oZZ, \ / AGAINST HTML MAIL http://ozz.pp.ru/ X AND NEWS / \ State Changed From-To: open->patched I've modified the patch heavily and committed a different version based on this. Thanks! Responsible Changed From-To: freebsd-standards->trhodes I've modified the patch heavily and committed a different version based on this. Thanks! State Changed From-To: patched->closed Merge to RELENG_6 complete, close this PR. Thanks! |