mailing list of musl libc
 help / color / mirror / code / Atom feed
* [feature request] add function strtoull_l and similar
@ 2014-01-08  4:03 邓尧
  2014-01-08  4:15 ` Rich Felker
  2014-01-08  8:34 ` Daniel Cegiełka
  0 siblings, 2 replies; 5+ messages in thread
From: 邓尧 @ 2014-01-08  4:03 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

I'm building libc++ against musl, it requires strtoull_l and similar
functions in order to implement C++ header <locale>. I have no idea whether
these functions are standard or glibc extensions.

Thanks
Yao

[-- Attachment #2: Type: text/html, Size: 274 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [feature request] add function strtoull_l and similar
  2014-01-08  4:03 [feature request] add function strtoull_l and similar 邓尧
@ 2014-01-08  4:15 ` Rich Felker
  2014-01-08  8:34 ` Daniel Cegiełka
  1 sibling, 0 replies; 5+ messages in thread
From: Rich Felker @ 2014-01-08  4:15 UTC (permalink / raw)
  To: musl

On Wed, Jan 08, 2014 at 12:03:46PM +0800, 邓尧 wrote:
> I'm building libc++ against musl, it requires strtoull_l and similar
> functions in order to implement C++ header <locale>. I have no idea whether
> these functions are standard or glibc extensions.

You can just redirect them to plain strtoull, etc.; musl does not
support radix separators other than '.' so there's no need for passing
a locale argument. The GNU/BSD _l variants will probably be added at
some point in the future (ignoring their locale argument) but fow now
it's probably just easiest to work around their absence.

Rich


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [feature request] add function strtoull_l and similar
  2014-01-08  4:03 [feature request] add function strtoull_l and similar 邓尧
  2014-01-08  4:15 ` Rich Felker
@ 2014-01-08  8:34 ` Daniel Cegiełka
  2014-01-08  9:33   ` Daniel Cegiełka
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Cegiełka @ 2014-01-08  8:34 UTC (permalink / raw)
  To: musl

2014/1/8 邓尧 <torshie@gmail.com>:
> I'm building libc++ against musl, it requires strtoull_l and similar
> functions in order to implement C++ header <locale>. I have no idea whether
> these functions are standard or glibc extensions.

http://ellcc.org/viewvc/svn/ellcc/trunk/libecc/src/musl/src/bsd/

Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [feature request] add function strtoull_l and similar
  2014-01-08  8:34 ` Daniel Cegiełka
@ 2014-01-08  9:33   ` Daniel Cegiełka
  2014-01-08 15:31     ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Cegiełka @ 2014-01-08  9:33 UTC (permalink / raw)
  To: musl

Sory - I gave link without checking whether ellcc really uses it.

If it's really necessary, you can import this function eg from FreeBSD:

https://github.com/freebsd/freebsd-head/blob/master/lib/libc/stdlib/strtoull.c

Daniel


2014/1/8 Daniel Cegiełka <daniel.cegielka@gmail.com>:
> 2014/1/8 邓尧 <torshie@gmail.com>:
>> I'm building libc++ against musl, it requires strtoull_l and similar
>> functions in order to implement C++ header <locale>. I have no idea whether
>> these functions are standard or glibc extensions.
>
> http://ellcc.org/viewvc/svn/ellcc/trunk/libecc/src/musl/src/bsd/
>
> Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [feature request] add function strtoull_l and similar
  2014-01-08  9:33   ` Daniel Cegiełka
@ 2014-01-08 15:31     ` Rich Felker
  0 siblings, 0 replies; 5+ messages in thread
From: Rich Felker @ 2014-01-08 15:31 UTC (permalink / raw)
  To: musl

On Wed, Jan 08, 2014 at 10:33:36AM +0100, Daniel Cegiełka wrote:
> Sory - I gave link without checking whether ellcc really uses it.
> 
> If it's really necessary, you can import this function eg from FreeBSD:
> 
> https://github.com/freebsd/freebsd-head/blob/master/lib/libc/stdlib/strtoull.c

The function in question was the nonstandard strtoull_l, not strtoull.
In the case of the former, attempting to import it from FreeBSD would
definitely not be the right solution; you'd have to import a large
part of the FreeBSD locale framework it depends on, in which case
you'd be giving very inconsistent behavior with the rest of musl, or
you'd have to strip the code that's using the locale and make
strtoull_l ignore it, in which case the outcome would be identical to
using the existing version in musl, but with a lot of duplicate code
added.

Rich


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-08 15:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-08  4:03 [feature request] add function strtoull_l and similar 邓尧
2014-01-08  4:15 ` Rich Felker
2014-01-08  8:34 ` Daniel Cegiełka
2014-01-08  9:33   ` Daniel Cegiełka
2014-01-08 15:31     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).