mailing list of musl libc
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [musl] *strerror_r() bug in musl
  2022-04-13 22:58  6%               ` Rich Felker
@ 2022-04-13 23:07  6%                 ` Gary E. Miller
  0 siblings, 0 replies; 73+ results
From: Gary E. Miller @ 2022-04-13 23:07 UTC (permalink / raw)
  To: musl

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

Yo Rich!

On Wed, 13 Apr 2022 18:58:43 -0400
Rich Felker <dalias@libc.org> wrote:

> On Wed, Apr 13, 2022 at 03:43:14PM -0700, Gary E. Miller wrote:
> > > > And yet, I'm supposed to check the GNU feature macros?  So their
> > > > defines are good?  But musl not having the equivalent is good?
> > > >   
> > > 
> > > If you're using __GLIBC__ to work around an intentional glibc
> > > nonconformance issue, that's reasonable usage of it and part of
> > > the way they intend for you to be able to use it.  
> > 
> > So you intend for me to use __GLIBC__, for something I'm not sure
> > about, when __GLIBC__ is not part of your package or defined in your
> > doc?  
> 
> It's not part of our documentation because it has nothing to do with
> musl. As far as I can tell, you're only perceiving it as being
> "something about musl" because glibc is the frame of reference you're
> used to.

Uh, I was not the one that brought up __GLIBC__.  I always considered
it out of scope here in musl-land.

> > > - Using standard macros provided by the implementation that
> > > describe interfaces available: good.  
> > 
> > Except, musl does not provide any?  Or did I miss something?  
> 
> The macros from unistd.h declare conformance to the standards and
> which option groups are provided.

I just compared musl unistd.h to glibc unistd.h.  glibc has
many more standards handled than just POSIX.

But don't fix that on my account, I'm just saying...

> There is a proposal for extending this system with information about
> extensions that aren't standardized, that was discussed on the
> libc-coord mailing list, but it never really moved forward.

Then we are now on the same page here.  "unimplemented" but might be
nice.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 6%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 22:43  6%             ` Gary E. Miller
@ 2022-04-13 22:58  6%               ` Rich Felker
  2022-04-13 23:07  6%                 ` Gary E. Miller
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2022-04-13 22:58 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

On Wed, Apr 13, 2022 at 03:43:14PM -0700, Gary E. Miller wrote:
> > > And yet, I'm supposed to check the GNU feature macros?  So their
> > > defines are good?  But musl not having the equivalent is good?  
> > 
> > If you're using __GLIBC__ to work around an intentional glibc
> > nonconformance issue, that's reasonable usage of it and part of the
> > way they intend for you to be able to use it.
> 
> So you intend for me to use __GLIBC__, for something I'm not sure
> about, when __GLIBC__ is not part of your package or defined in your
> doc?

It's not part of our documentation because it has nothing to do with
musl. As far as I can tell, you're only perceiving it as being
"something about musl" because glibc is the frame of reference you're
used to.

> I'll stick to direct configure tests.
> 
> > > Get your story straight please.  
> > 
> > I don't see where it's inconsistent.
> > 
> > - Using standard macros provided by the implementation that describe
> >   interfaces available: good.
> 
> Except, musl does not provide any?  Or did I miss something?

The macros from unistd.h declare conformance to the standards and
which option groups are provided.

There is a proposal for extending this system with information about
extensions that aren't standardized, that was discussed on the
libc-coord mailing list, but it never really moved forward.

> On second thought, don't bother, I'll stick to direct configure tests.

This is a choice I fully support.


^ permalink raw reply	[relevance 6%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 22:27  5%           ` Rich Felker
@ 2022-04-13 22:43  6%             ` Gary E. Miller
  2022-04-13 22:58  6%               ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Gary E. Miller @ 2022-04-13 22:43 UTC (permalink / raw)
  To: musl

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

Yo Rich!

On Wed, 13 Apr 2022 18:27:58 -0400
Rich Felker <dalias@libc.org> wrote:

> > The musl docs also say you conform to FNU_SOURCE.  
> 
> No it does not, and I'm not even sure what "conform to" would mean
> here. The Conformance section in the Introduction covers what musl
> attempts to conform to, The Library Interfaces section (where the
> current manual ends) reiterates that:
> 
> "For all interfaces provided by musl that are specified by standards
> to which musl aims for conformance, the relevant standards documents
> are the official documentation."
> 
> The manual does say that _GNU_SOURCE exposes additional extension
> interfaces. Not that it works like in glibc and changes the behavior
> of standard interfaces. You read that into it. I agree reading that
> into it is an easy misreading and that's why I want to make it more
> clear.

Can we agree it is very misleading and needs to be improved?

> > Change that to add:
> > 
> >     Except wher the GNU extensions conflict with POSIX.  
> 
> Something like that. I would say that we should just be explicit that
> this is about exposing additional interfaces only and does not change
> the behavior of any standard interface. It's not an exception to
> what's written before it. The statement before it is already accurate.

Accurate, but misleading to the casual observer.

> So, at the end of the bulleted list, something like:
> 
> "As interpreted by musl, feature test macros only control what
> interfaces are exposed. They do not alter the behavior of any function
> or change the definition of any type. In particular, `_GNU_SOURCE`
> does not cause the signatures or behaviors of functions to change
> where GNU libc deviated from the requirements of the standards."

Works for me.  Thank you.

> > And yet, I'm supposed to check the GNU feature macros?  So their
> > defines are good?  But musl not having the equivalent is good?  
> 
> If you're using __GLIBC__ to work around an intentional glibc
> nonconformance issue, that's reasonable usage of it and part of the
> way they intend for you to be able to use it.

So you intend for me to use __GLIBC__, for something I'm not sure
about, when __GLIBC__ is not part of your package or defined in your
doc?

I'll stick to direct configure tests.

> > Get your story straight please.  
> 
> I don't see where it's inconsistent.
> 
> - Using standard macros provided by the implementation that describe
>   interfaces available: good.

Except, musl does not provide any?  Or did I miss something?

On second thought, don't bother, I'll stick to direct configure tests.

> - Providing macros that identify an implementation by name and version
>   and expecting applications to hard-code knowledge about that
>   implementation: bad.

I look forward to your glibc bug report on their implementing that
badness. Let's bet on how long before they take that advice?

I'll stick to direct configure tests.

> - Doing the best you can do with what glibc gave you: okay.

Always.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 6%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 21:16 11%         ` Gary E. Miller
@ 2022-04-13 22:27  5%           ` Rich Felker
  2022-04-13 22:43  6%             ` Gary E. Miller
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2022-04-13 22:27 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

On Wed, Apr 13, 2022 at 02:16:52PM -0700, Gary E. Miller wrote:
> Yo Rich!
> 
> On Wed, 13 Apr 2022 16:38:35 -0400
> Rich Felker <dalias@libc.org> wrote:
> 
> > On Wed, Apr 13, 2022 at 10:36:51AM -0700, Gary E. Miller wrote:
> > > Yo Rich!
> > > 
> > > On Wed, 13 Apr 2022 10:05:33 -0400
> > > Rich Felker <dalias@libc.org> wrote:
> > >   
> > > > > > When _GNU_SOURCE is defined with glibc, then strerror_r()
> > > > > > returns a char *.    
> > > > > 
> > > > > I have met this in multiple places the last decade. The usual
> > > > > way to fix it is to also check for GNU libc in addition to
> > > > > _GNU_SOURCE.
> > > > > 
> > > > > #if defined (__GLIBC__) && defined (_GNU_SOURCE)
> > > > > 	/* non-standard GLIBC exception */
> > > > > #else
> > > > > 	/* standard behavior for everything else */
> > > > > #endif    
> > > > 
> > > > That, or probe for the signature with a configure-style check and
> > > > use the result of that, as in
> > > > 
> > > > #ifdef HAVE_GNU_STRERROR_R
> > > > // handle the GNU version
> > > > #else
> > > > // code written to the standard
> > > > #endif  
> > > 
> > > gpsd runs on a huge variety of hardware and software.  We used to
> > > have rats nests of #ifdef's as suggested above.  But that only
> > > works when your library code actually follows your documentation,
> > > and our dev actually read and understood your documentation.
> > > 
> > > Since you doc fails to mention this "quirk", it is not possible to
> > > forsee this issue before debugging the rare crash.  
> > 
> > Our docs say we aim to conform to ISO C and POSIX. The alternate glibc
> > strerror_r does not conform to POSIX and therefore we don't do it.
> 
> The musl docs also say you conform to FNU_SOURCE.

No it does not, and I'm not even sure what "conform to" would mean
here. The Conformance section in the Introduction covers what musl
attempts to conform to, The Library Interfaces section (where the
current manual ends) reiterates that:

"For all interfaces provided by musl that are specified by standards
to which musl aims for conformance, the relevant standards documents
are the official documentation."

The manual does say that _GNU_SOURCE exposes additional extension
interfaces. Not that it works like in glibc and changes the behavior
of standard interfaces. You read that into it. I agree reading that
into it is an easy misreading and that's why I want to make it more
clear.

> Two incompatible statements.
> 
> > This isn't musl being weird, it's glibc being weird.
> 
> Agreed.  musl is insufficiently documented, and glibc is seird.  Although
> to be fair, they invented strerror_r() first, and POSIX munged the copy.
> 
> > I agree it would
> > be helpful to highlight this difference though. We have material on
> > the wiki covering a bunch of differences from glibc, but somehow this
> > was overlooked:
> > https://wiki.musl-libc.org/functional-differences-from-glibc.html
> 
> Since it fails to mention strerror() or strerror_r(), it will never how
> up as a result of an internet search.  Easy to fix.   For you, not me.
> 
> May I suggest a more obvious place as well:
> 
> https://musl.libc.org/doc/1.1.24/manual.html
> 
> It currently says:
> 
>     _GNU_SOURCE (or _ALL_SOURCE)
> 
>     Adds everything above, plus interfaces modeled after GNU libc
>     extensions and interfaces for making use of Linux-specific features.
> 
> Change that to add:
> 
>     Except wher the GNU extensions conflict with POSIX.

Something like that. I would say that we should just be explicit that
this is about exposing additional interfaces only and does not change
the behavior of any standard interface. It's not an exception to
what's written before it. The statement before it is already accurate.
So, at the end of the bulleted list, something like:

"As interpreted by musl, feature test macros only control what
interfaces are exposed. They do not alter the behavior of any function
or change the definition of any type. In particular, `_GNU_SOURCE`
does not cause the signatures or behaviors of functions to change
where GNU libc deviated from the requirements of the standards."

> And link to the wiki on glibc
> 
> > In general, none of these affect software which is not making
> > non-portable glibc-specific assumptions.
> 
> Afer reading your doc, I thought that was the case for gpsd.
> 
> The two fixes above should be a big improvement.
> 
> > > OBTW: did I mention musl does not appear to have any #defines to
> > > specify its current version?  Or even that it is musl?  Or did I
> > > miss something else in the doc?  
> > 
> > No, that's intentional. The macros that tell you what to expect are
> > _POSIX_VERSION and others from unistd.h. Attempting to hard-code
> > asssumptions about musl is explicitly unsupported usage. You have to
> > either detect or just assume standard behavior. It's covered in the
> > FAQ:
> 
> And yet, I'm supposed to check the GNU feature macros?  So their defines
> are good?  But musl not having the equivalent is good?

If you're using __GLIBC__ to work around an intentional glibc
nonconformance issue, that's reasonable usage of it and part of the
way they intend for you to be able to use it.

> Get your story straight please.

I don't see where it's inconsistent.

- Using standard macros provided by the implementation that describe
  interfaces available: good.

- Providing macros that identify an implementation by name and version
  and expecting applications to hard-code knowledge about that
  implementation: bad.

- Doing the best you can do with what glibc gave you: okay.

Rich

^ permalink raw reply	[relevance 5%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 20:38 11%       ` Rich Felker
@ 2022-04-13 21:16 11%         ` Gary E. Miller
  2022-04-13 22:27  5%           ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Gary E. Miller @ 2022-04-13 21:16 UTC (permalink / raw)
  To: musl

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

Yo Rich!

On Wed, 13 Apr 2022 16:38:35 -0400
Rich Felker <dalias@libc.org> wrote:

> On Wed, Apr 13, 2022 at 10:36:51AM -0700, Gary E. Miller wrote:
> > Yo Rich!
> > 
> > On Wed, 13 Apr 2022 10:05:33 -0400
> > Rich Felker <dalias@libc.org> wrote:
> >   
> > > > > When _GNU_SOURCE is defined with glibc, then strerror_r()
> > > > > returns a char *.    
> > > > 
> > > > I have met this in multiple places the last decade. The usual
> > > > way to fix it is to also check for GNU libc in addition to
> > > > _GNU_SOURCE.
> > > > 
> > > > #if defined (__GLIBC__) && defined (_GNU_SOURCE)
> > > > 	/* non-standard GLIBC exception */
> > > > #else
> > > > 	/* standard behavior for everything else */
> > > > #endif    
> > > 
> > > That, or probe for the signature with a configure-style check and
> > > use the result of that, as in
> > > 
> > > #ifdef HAVE_GNU_STRERROR_R
> > > // handle the GNU version
> > > #else
> > > // code written to the standard
> > > #endif  
> > 
> > gpsd runs on a huge variety of hardware and software.  We used to
> > have rats nests of #ifdef's as suggested above.  But that only
> > works when your library code actually follows your documentation,
> > and our dev actually read and understood your documentation.
> > 
> > Since you doc fails to mention this "quirk", it is not possible to
> > forsee this issue before debugging the rare crash.  
> 
> Our docs say we aim to conform to ISO C and POSIX. The alternate glibc
> strerror_r does not conform to POSIX and therefore we don't do it.

The musl docs also say you conform to FNU_SOURCE.

Two incompatible statements.

> This isn't musl being weird, it's glibc being weird.

Agreed.  musl is insufficiently documented, and glibc is seird.  Although
to be fair, they invented strerror_r() first, and POSIX munged the copy.

> I agree it would
> be helpful to highlight this difference though. We have material on
> the wiki covering a bunch of differences from glibc, but somehow this
> was overlooked:
> https://wiki.musl-libc.org/functional-differences-from-glibc.html

Since it fails to mention strerror() or strerror_r(), it will never how
up as a result of an internet search.  Easy to fix.   For you, not me.

May I suggest a more obvious place as well:

https://musl.libc.org/doc/1.1.24/manual.html

It currently says:

    _GNU_SOURCE (or _ALL_SOURCE)

    Adds everything above, plus interfaces modeled after GNU libc
    extensions and interfaces for making use of Linux-specific features.

Change that to add:

    Except wher the GNU extensions conflict with POSIX.

And link to the wiki on glibc

> In general, none of these affect software which is not making
> non-portable glibc-specific assumptions.

Afer reading your doc, I thought that was the case for gpsd.

The two fixes above should be a big improvement.

> > OBTW: did I mention musl does not appear to have any #defines to
> > specify its current version?  Or even that it is musl?  Or did I
> > miss something else in the doc?  
> 
> No, that's intentional. The macros that tell you what to expect are
> _POSIX_VERSION and others from unistd.h. Attempting to hard-code
> asssumptions about musl is explicitly unsupported usage. You have to
> either detect or just assume standard behavior. It's covered in the
> FAQ:

And yet, I'm supposed to check the GNU feature macros?  So their defines
are good?  But musl not having the equivalent is good?

Get your story straight please.

But, as I have said before, gpsd does prefer not to use feature #defines
either.  Because they are a mess.  One that includes musl.

> > So you expect me to use the glibc #defines, because musl lacks
> > them.  
> 
> No, I expect you not to assume non-conforming glibc behavior on
> platforms that aren't glibc. The same would apply on any of the BSDs.

No assumptions were made, except that your doc meant what it appeared to
say.  We all agree that it does not mean what it appears to say.

Easy to fix, I leave it to you folks to do so.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 11%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 17:36 10%     ` Gary E. Miller
@ 2022-04-13 20:38 11%       ` Rich Felker
  2022-04-13 21:16 11%         ` Gary E. Miller
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2022-04-13 20:38 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

On Wed, Apr 13, 2022 at 10:36:51AM -0700, Gary E. Miller wrote:
> Yo Rich!
> 
> On Wed, 13 Apr 2022 10:05:33 -0400
> Rich Felker <dalias@libc.org> wrote:
> 
> > > > When _GNU_SOURCE is defined with glibc, then strerror_r() returns
> > > > a char *.  
> > > 
> > > I have met this in multiple places the last decade. The usual way to
> > > fix it is to also check for GNU libc in addition to _GNU_SOURCE.
> > > 
> > > #if defined (__GLIBC__) && defined (_GNU_SOURCE)
> > > 	/* non-standard GLIBC exception */
> > > #else
> > > 	/* standard behavior for everything else */
> > > #endif  
> > 
> > That, or probe for the signature with a configure-style check and use
> > the result of that, as in
> > 
> > #ifdef HAVE_GNU_STRERROR_R
> > // handle the GNU version
> > #else
> > // code written to the standard
> > #endif
> 
> gpsd runs on a huge variety of hardware and software.  We used to have
> rats nests of #ifdef's as suggested above.  But that only works when
> your library code actually follows your documentation, and our dev
> actually read and understood your documentation.
> 
> Since you doc fails to mention this "quirk", it is not possible to
> forsee this issue before debugging the rare crash.

Our docs say we aim to conform to ISO C and POSIX. The alternate glibc
strerror_r does not conform to POSIX and therefore we don't do it.
This isn't musl being weird, it's glibc being weird. I agree it would
be helpful to highlight this difference though. We have material on
the wiki covering a bunch of differences from glibc, but somehow this
was overlooked:

https://wiki.musl-libc.org/functional-differences-from-glibc.html

In general, none of these affect software which is not making
non-portable glibc-specific assumptions.

> Now consider that gpsd supports well over 100 targets, back to POSIX
> 2001. glibc has a long history of changes around strerror_r(), and gpsd
> has to support each one.  Then there are all the other libc.  That is a
> lot of doc to check.  And a lot of #ifdeff version chacks.
> 
> OBTW: did I mention musl does not appear to have any #defines to
> specify its current version?  Or even that it is musl?  Or did I
> miss something else in the doc?

No, that's intentional. The macros that tell you what to expect are
_POSIX_VERSION and others from unistd.h. Attempting to hard-code
asssumptions about musl is explicitly unsupported usage. You have to
either detect or just assume standard behavior. It's covered in the
FAQ:

https://wiki.musl-libc.org/faq.html

> So you expect me to use the glibc #defines, because musl lacks them.

No, I expect you not to assume non-conforming glibc behavior on
platforms that aren't glibc. The same would apply on any of the BSDs.

Rich

^ permalink raw reply	[relevance 11%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 14:05 11%   ` Rich Felker
@ 2022-04-13 17:36 10%     ` Gary E. Miller
  2022-04-13 20:38 11%       ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Gary E. Miller @ 2022-04-13 17:36 UTC (permalink / raw)
  To: musl

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

Yo Rich!

On Wed, 13 Apr 2022 10:05:33 -0400
Rich Felker <dalias@libc.org> wrote:

> > > When _GNU_SOURCE is defined with glibc, then strerror_r() returns
> > > a char *.  
> > 
> > I have met this in multiple places the last decade. The usual way to
> > fix it is to also check for GNU libc in addition to _GNU_SOURCE.
> > 
> > #if defined (__GLIBC__) && defined (_GNU_SOURCE)
> > 	/* non-standard GLIBC exception */
> > #else
> > 	/* standard behavior for everything else */
> > #endif  
> 
> That, or probe for the signature with a configure-style check and use
> the result of that, as in
> 
> #ifdef HAVE_GNU_STRERROR_R
> // handle the GNU version
> #else
> // code written to the standard
> #endif

gpsd runs on a huge variety of hardware and software.  We used to have
rats nests of #ifdef's as suggested above.  But that only works when
your library code actually follows your documentation, and our dev
actually read and understood your documentation.

Since you doc fails to mention this "quirk", it is not possible to
forsee this issue before debugging the rare crash.

Now consider that gpsd supports well over 100 targets, back to POSIX
2001. glibc has a long history of changes around strerror_r(), and gpsd
has to support each one.  Then there are all the other libc.  That is a
lot of doc to check.  And a lot of #ifdeff version chacks.

OBTW: did I mention musl does not appear to have any #defines to
specify its current version?  Or even that it is musl?  Or did I
miss something else in the doc?

So you expect me to use the glibc #defines, because musl lacks them.

Not practical at scale.

gpsd prefers to check at configure time for all the known library calls
that are "quirky".  So, what I did was add, yet another, configure time
tesst


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 10%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-13 12:24 11% ` [musl] *strerror_r() " Natanael Copa
@ 2022-04-13 14:05 11%   ` Rich Felker
  2022-04-13 17:36 10%     ` Gary E. Miller
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2022-04-13 14:05 UTC (permalink / raw)
  To: Natanael Copa; +Cc: Gary E. Miller, musl

On Wed, Apr 13, 2022 at 02:24:32PM +0200, Natanael Copa wrote:
> On Tue, 12 Apr 2022 13:43:55 -0700
> "Gary E. Miller" <gem@rellim.com> wrote:
> 
> > Yo All!
> 
> Hi!
> 
> > 
> > I'm new to the list.  I;ve been trying to report a musl bug on #musl since
> > last Friday, but no one seems to live there.
> > 
> > musl (all versions) has a bug in strerror_r().
> > 
> > The musl reference manual says of _GNUSOURCE:
> > 
> >     _GNU_SOURCE (or _ALL_SOURCE)
> > 
> >     Adds everything above, plus interfaces modeled after GNU libc
> >     extensions and interfaces for making use of Linux-specific features.
> > 
> > I take that to mean that when _GNU_SOURCE is used to compile code with musl
> > that the results will behave as GNU libc (glinc).
> 
> Well, as other has mentioned. GNU libc has a non-compliant version of
> strerror_r.
> 
> ....
>  
> > When _GNU_SOURCE is defined with glibc, then strerror_r() returns a char *.
> 
> I have met this in multiple places the last decade. The usual way to
> fix it is to also check for GNU libc in addition to _GNU_SOURCE.
> 
> #if defined (__GLIBC__) && defined (_GNU_SOURCE)
> 	/* non-standard GLIBC exception */
> #else
> 	/* standard behavior for everything else */
> #endif

That, or probe for the signature with a configure-style check and use
the result of that, as in

#ifdef HAVE_GNU_STRERROR_R
// handle the GNU version
#else
// code written to the standard
#endif

or, even better, wrapping strerror_r in a translation unit that begins
with

#undef _GNU_SOURCE
#define _POSIX_C_SOURCE 200809L

or similar so that you always get the standard one, and calling your
wrapper instead.

Rich

^ permalink raw reply	[relevance 11%]

* Re: [musl] *strerror_r() bug in musl
  2022-04-12 20:43 13% [musl] ✘strerror_r() bug in musl Gary E. Miller
                   ` (2 preceding siblings ...)
  2022-04-13  3:44 10% ` Rich Felker
@ 2022-04-13 12:24 11% ` Natanael Copa
  2022-04-13 14:05 11%   ` Rich Felker
  3 siblings, 1 reply; 73+ results
From: Natanael Copa @ 2022-04-13 12:24 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

On Tue, 12 Apr 2022 13:43:55 -0700
"Gary E. Miller" <gem@rellim.com> wrote:

> Yo All!

Hi!

> 
> I'm new to the list.  I;ve been trying to report a musl bug on #musl since
> last Friday, but no one seems to live there.
> 
> musl (all versions) has a bug in strerror_r().
> 
> The musl reference manual says of _GNUSOURCE:
> 
>     _GNU_SOURCE (or _ALL_SOURCE)
> 
>     Adds everything above, plus interfaces modeled after GNU libc
>     extensions and interfaces for making use of Linux-specific features.
> 
> I take that to mean that when _GNU_SOURCE is used to compile code with musl
> that the results will behave as GNU libc (glinc).

Well, as other has mentioned. GNU libc has a non-compliant version of
strerror_r.

...
 
> When _GNU_SOURCE is defined with glibc, then strerror_r() returns a char *.

I have met this in multiple places the last decade. The usual way to
fix it is to also check for GNU libc in addition to _GNU_SOURCE.

#if defined (__GLIBC__) && defined (_GNU_SOURCE)
	/* non-standard GLIBC exception */
#else
	/* standard behavior for everything else */
#endif

-nc

^ permalink raw reply	[relevance 11%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:43 13% [musl] ✘strerror_r() bug in musl Gary E. Miller
  2022-04-12 20:48  6% ` alice
  2022-04-12 20:56 13% ` Alex Xu (Hello71)
@ 2022-04-13  3:44 10% ` Rich Felker
  2022-04-13 12:24 11% ` [musl] *strerror_r() " Natanael Copa
  3 siblings, 0 replies; 73+ results
From: Rich Felker @ 2022-04-13  3:44 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

On Tue, Apr 12, 2022 at 01:43:55PM -0700, Gary E. Miller wrote:
> Yo All!
> 
> I'm new to the list.  I;ve been trying to report a musl bug on #musl since
> last Friday, but no one seems to live there.
> 
> musl (all versions) has a bug in strerror_r().
> 
> The musl reference manual says of _GNUSOURCE:
> 
>     _GNU_SOURCE (or _ALL_SOURCE)
> 
>     Adds everything above, plus interfaces modeled after GNU libc
>     extensions and interfaces for making use of Linux-specific features.
> 
> I take that to mean that when _GNU_SOURCE is used to compile code with musl
> that the results will behave as GNU libc (glinc).

This is really a deficiency of the documentation. The text that's
there isn't factually wrong but it's in some sense wrong by omission
-- it omits clearly stating that _GNU_SOURCE does not change anything
to behave in ways that conflict with the standards-specified behaviors
(or change the behavior of standards-specified interfaces whatsoever).
It *only* exposes extension interfaces.

In addition to correcting this, the "criteria for exclusion/inclusion"
of extension functionality should really be written up well and placed
in a conspicuous place. At present it's just scattered across mailing
list discussions of various proposed extensions.

And likewise, the specific example of `strerror_r` (note: `basename`
is like this and is already covered) should be mentioned on the wiki
"differences from glibc" page.

> Is if musl intends its strerror_r() to work like glibc's strerror_r() then
> there is a bug.
> 
> Particularly nasty to have functions that only run when an error condition
> occurs, to themselves cause crashes.

The code should not even compile if it's using the wrong signature.
The GNU version of the function does not guarantee that the string is
stored in the provided buf, so you have to examine the return value,
and assignment/passing of an int where a pointer type is expected is a
constraint violation. By default gcc only treats this as a warning
(-Wint-conversion) but you can and should make it an error via
-Werror=int-conversion since code doing this is unconditionally wrong.

Rich

^ permalink raw reply	[relevance 10%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 23:16  6%     ` Wolf
@ 2022-04-13  0:15 11%       ` Gary E. Miller
  0 siblings, 0 replies; 73+ results
From: Gary E. Miller @ 2022-04-13  0:15 UTC (permalink / raw)
  To: musl

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

Yo Wolf!

On Wed, 13 Apr 2022 01:16:34 +0200
Wolf <wolf@wolfsden.cz> wrote:

> On 2022-04-12 14:07:24 -0700, Gary E. Miller wrote:
> > If you gonna leave the code as is, then fix the doc.  gpsd has
> > struggled with this bug for years until I tracked it down.  
> 
> How did you even managed to compile it when the function returned int
> instead of char*? Hard to believe the compiler did not complain...

It compiles fine, and runs fine, until it crashes.  The return value
was never used, so no warning generated.  The three variants
of strerror_r() differ in more than just their return value.

Yes, I know, sloppy, which is why I'm trying to problems like this one.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 11%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 21:07  6%   ` Gary E. Miller
@ 2022-04-12 23:16  6%     ` Wolf
  2022-04-13  0:15 11%       ` Gary E. Miller
  0 siblings, 1 reply; 73+ results
From: Wolf @ 2022-04-12 23:16 UTC (permalink / raw)
  To: musl

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

On 2022-04-12 14:07:24 -0700, Gary E. Miller wrote:
> If you gonna leave the code as is, then fix the doc.  gpsd has struggled
> with this bug for years until I tracked it down.

How did you even managed to compile it when the function returned int
instead of char*? Hard to believe the compiler did not complain...

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[relevance 6%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:56 13% ` Alex Xu (Hello71)
  2022-04-12 21:07  6%   ` Gary E. Miller
@ 2022-04-12 21:13 11%   ` Gary E. Miller
  1 sibling, 0 replies; 73+ results
From: Gary E. Miller @ 2022-04-12 21:13 UTC (permalink / raw)
  To: musl

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

Yo Alex!

On Tue, 12 Apr 2022 16:56:20 -0400
"Alex Xu (Hello71)" <alex_y_xu@yahoo.ca> wrote:

> The issue of GNU-specific strerror_r has been discussed several times
> on the mailing list: https://inbox.vuxu.org/musl/?q=strerror_r. See:
> 
> -
> https://inbox.vuxu.org/musl/20130208185918.GJ20323@brightrain.aerifal.cx/
> -
> https://inbox.vuxu.org/musl/20180805010455.GQ1392@brightrain.aerifal.cx/
> 
> and other threads.


The one suggests strerror_l(), which is uselsss for obvious reasons:

   strerror_l()
       strerror_l() is like strerror(), but maps errnum to a  locale-dependent
       error  message in the locale specified by locale.  The behavior of str‐
       error_l()  is  undefined  if  locale  is  the  special  locale   object
       LC_GLOBAL_LOCALE or is not a valid locale object handle.

I'm not going to ever use a function that in many (most?) cases has
"behavior... undefined".

gpsd, finally, solved the problem, by creating a configure test for
the unexpected and undocumented behaviour of strerror_r() in musl.

The other trhead says:

    > Is this a bug in musl?

    No, musl explicitly does not suppore the GNU interfaces that conflict
    with standard interfaces by the same name.

After looking all over the musl source and doc, I can strongly assert that
whatever is "explicitly" statad is very, very, hard to find.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 11%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:56 13% ` Alex Xu (Hello71)
@ 2022-04-12 21:07  6%   ` Gary E. Miller
  2022-04-12 23:16  6%     ` Wolf
  2022-04-12 21:13 11%   ` Gary E. Miller
  1 sibling, 1 reply; 73+ results
From: Gary E. Miller @ 2022-04-12 21:07 UTC (permalink / raw)
  To: musl

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

Yo Alex!

On Tue, 12 Apr 2022 16:56:20 -0400
"Alex Xu (Hello71)" <alex_y_xu@yahoo.ca> wrote:

> The issue of GNU-specific strerror_r has been discussed several times
> on the mailing list: https://inbox.vuxu.org/musl/?q=strerror_r. See:
> 
> -
> https://inbox.vuxu.org/musl/20130208185918.GJ20323@brightrain.aerifal.cx/
> -
> https://inbox.vuxu.org/musl/20180805010455.GQ1392@brightrain.aerifal.cx/
> 
> and other threads.

Since I don't use, or follow, musl, not surprising I did not know that.

But I carefully read the include file, the source code, and the doc.  None
of those provided a clue.

You can't expect casual users to have followined your online chats.

If you gonna leave the code as is, then fix the doc.  gpsd has struggled
with this bug for years until I tracked it down.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 6%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:48  6% ` alice
@ 2022-04-12 21:04  6%   ` Gary E. Miller
  0 siblings, 0 replies; 73+ results
From: Gary E. Miller @ 2022-04-12 21:04 UTC (permalink / raw)
  To: musl

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

Yo alice!

On Tue, 12 Apr 2022 22:48:08 +0200
"alice" <alice@ayaya.dev> wrote:

> On Tue Apr 12, 2022 at 10:43 PM CEST, Gary E. Miller wrote:
> > Yo All!
> >
> > I'm new to the list.  I;ve been trying to report a musl bug on
> > #musl since last Friday, but no one seems to live there.  
> are you sure it was #musl on libera.chat? there has been a lot of
> activity since last friday

Whoops, I'm on freenode #musl now.  20 other people in there.  I'll move
over to freenode.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 6%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:43 13% [musl] ✘strerror_r() bug in musl Gary E. Miller
  2022-04-12 20:48  6% ` alice
@ 2022-04-12 20:56 13% ` Alex Xu (Hello71)
  2022-04-12 21:07  6%   ` Gary E. Miller
  2022-04-12 21:13 11%   ` Gary E. Miller
  2022-04-13  3:44 10% ` Rich Felker
  2022-04-13 12:24 11% ` [musl] *strerror_r() " Natanael Copa
  3 siblings, 2 replies; 73+ results
From: Alex Xu (Hello71) @ 2022-04-12 20:56 UTC (permalink / raw)
  To: Gary E. Miller; +Cc: musl

The issue of GNU-specific strerror_r has been discussed several times on 
the mailing list: https://inbox.vuxu.org/musl/?q=strerror_r. See:

- https://inbox.vuxu.org/musl/20130208185918.GJ20323@brightrain.aerifal.cx/
- https://inbox.vuxu.org/musl/20180805010455.GQ1392@brightrain.aerifal.cx/

and other threads.

Cheers,
Alex.

^ permalink raw reply	[relevance 13%]

* Re: [musl] ✘strerror_r() bug in musl
  2022-04-12 20:43 13% [musl] ✘strerror_r() bug in musl Gary E. Miller
@ 2022-04-12 20:48  6% ` alice
  2022-04-12 21:04  6%   ` Gary E. Miller
  2022-04-12 20:56 13% ` Alex Xu (Hello71)
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 73+ results
From: alice @ 2022-04-12 20:48 UTC (permalink / raw)
  To: musl

On Tue Apr 12, 2022 at 10:43 PM CEST, Gary E. Miller wrote:
> Yo All!
>
> I'm new to the list.  I;ve been trying to report a musl bug on #musl since
> last Friday, but no one seems to live there.
are you sure it was #musl on libera.chat? there has been a lot of
activity since last friday

--
alice

^ permalink raw reply	[relevance 6%]

* [musl] ✘strerror_r() bug in musl
@ 2022-04-12 20:43 13% Gary E. Miller
  2022-04-12 20:48  6% ` alice
                   ` (3 more replies)
  0 siblings, 4 replies; 73+ results
From: Gary E. Miller @ 2022-04-12 20:43 UTC (permalink / raw)
  To: musl

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

Yo All!

I'm new to the list.  I;ve been trying to report a musl bug on #musl since
last Friday, but no one seems to live there.

musl (all versions) has a bug in strerror_r().

The musl reference manual says of _GNUSOURCE:

    _GNU_SOURCE (or _ALL_SOURCE)

    Adds everything above, plus interfaces modeled after GNU libc
    extensions and interfaces for making use of Linux-specific features.

I take that to mean that when _GNU_SOURCE is used to compile code with musl
that the results will behave as GNU libc (glinc).

The muls code in include/string.h, line 68 says:

#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
 || defined(_BSD_SOURCE)
char *strtok_r (char *__restrict, const char *__restrict, char **__restrict);
int strerror_r (int, char *, size_t);
[...]

So strerro_r() always returns an int if _GNU_SOURCE, POSIX_SOURCE, etc. is
defined.

But the glibc man page for strerror_r() ssys:

       int strerror_r(int errnum, char *buf, size_t buflen);
                      /* XSI-compliant */

       char *strerror_r(int errnum, char *buf, size_t buflen);
                      /* GNU-specific */

When _GNU_SOURCE is defined with glibc, then strerror_r() returns a char *.

The man page continues:

       strerror_r():
           The XSI-compliant version is provided if:
               (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
           Otherwise, the GNU-specific version is provided.


The glibc include/string.h, line 420, clarifies things a bit:

#ifdef __USE_XOPEN2K
/* Reentrant version of `strerror'.
   There are 2 flavors of `strerror_r', GNU which returns the string
   and may or may not use the supplied temporary buffer and POSIX one
   which fills the string into the buffer.
   To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L
   without -D_GNU_SOURCE is needed, otherwise the GNU version is
   preferred.  */
# if defined __USE_XOPEN2K && !defined __USE_GNU
/* Fill BUF with a string describing the meaning of the `errno' code in
   ERRNUM.  */
#  ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (strerror_r,
                           (int __errnum, char *__buf, size_t __buflen),
                           __xpg_strerror_r) __nonnull ((2))
    __attr_access ((__write_only__, 2, 3));
#  else
extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
     __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
#   define strerror_r __xpg_strerror_r
#  endif

Is if musl intends its strerror_r() to work like glibc's strerror_r() then
there is a bug.

Particularly nasty to have functions that only run when an error condition
occurs, to themselves cause crashes.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem@rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 851 bytes --]

^ permalink raw reply	[relevance 13%]

* [musl] [PATCH] support the __STDC_WANT_LIB_EXT2__ feature test macro
@ 2021-07-16 11:58  5% John Scott
  0 siblings, 0 replies; 73+ results
From: John Scott @ 2021-07-16 11:58 UTC (permalink / raw)
  To: musl


[-- Attachment #1.1: Type: text/plain, Size: 524 bytes --]

Hello,

As a feature, I suggest that musl supports the __STDC_WANT_LIB_EXT2__
feature test macro specified in the ISO/IEC Dynamic Allocations TR.
I've attached a patch to accomplish this and which makes minimal
changes to the headers to get musl's support comparable to glibc's.

I was not able to get my hands on the official publication, so I only
referred to the latest draft, which is available here:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1388.pdf

I'm not subscribed, so please CC me on replies.

[-- Attachment #1.2: git format-patch-style patch --]
[-- Type: text/x-patch, Size: 4784 bytes --]

From e923a4fc391909428914d3bebfb02b5431be338a Mon Sep 17 00:00:00 2001
From: John Scott <jscott@posteo.net>
Date: Fri, 16 Jul 2021 07:34:29 -0400
Subject: [PATCH] support the __STDC_WANT_LIB_EXT2__ feature test macro

this is intended to aid applications that wish to use the functionality
specified in ISO/IEC TR 24731-2:2010. Most of these functions are
specified by POSIX, except for (v)asprintf and some of the wide
character functions.

we don't define __STDC_ALLOC_LIB__ since the latter are not implemented.
Also, implementations are required to diagnose when the definition of
__STDC_WANT_LIB_EXT2__ changes after including additional headers, but
we currently don't check this.
---
 include/stdio.h  | 16 +++++++++++-----
 include/string.h |  9 +++++++--
 include/wchar.h  |  7 ++++++-
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 3604198c..15687ba3 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -131,9 +131,19 @@ FILE *tmpfile(void);
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
- || defined(_BSD_SOURCE)
+ || defined(_BSD_SOURCE) \
+ ||(defined(__STDC_WANT_LIB_EXT2__) && __STDC_WANT_LIB_EXT2__)
 FILE *fmemopen(void *__restrict, size_t, const char *__restrict);
 FILE *open_memstream(char **, size_t *);
+int asprintf(char **, const char *, ...);
+int vasprintf(char **, const char *, __isoc_va_list);
+ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict);
+ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict);
+#endif
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 FILE *fdopen(int, const char *);
 FILE *popen(const char *, const char *);
 int pclose(FILE *);
@@ -149,8 +159,6 @@ int getc_unlocked(FILE *);
 int getchar_unlocked(void);
 int putc_unlocked(int, FILE *);
 int putchar_unlocked(int);
-ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict);
-ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict);
 int renameat(int, const char *, int, const char *);
 char *ctermid(char *);
 #define L_ctermid 20
@@ -180,8 +188,6 @@ int fileno_unlocked(FILE *);
 int getw(FILE *);
 int putw(int, FILE *);
 char *fgetln(FILE *, size_t *);
-int asprintf(char **, const char *, ...);
-int vasprintf(char **, const char *, __isoc_va_list);
 #endif
 
 #ifdef _GNU_SOURCE
diff --git a/include/string.h b/include/string.h
index 795a2abc..fa3ad27e 100644
--- a/include/string.h
+++ b/include/string.h
@@ -65,14 +65,19 @@ int strerror_r (int, char *, size_t);
 char *stpcpy(char *__restrict, const char *__restrict);
 char *stpncpy(char *__restrict, const char *__restrict, size_t);
 size_t strnlen (const char *, size_t);
-char *strdup (const char *);
-char *strndup (const char *, size_t);
 char *strsignal(int);
 char *strerror_l (int, locale_t);
 int strcoll_l (const char *, const char *, locale_t);
 size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t);
 #endif
 
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
+ ||(defined(__STDC_WANT_LIB_EXT2__) && __STDC_WANT_LIB_EXT2__)
+char *strdup (const char *);
+char *strndup (const char *, size_t);
+#endif
+
 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
  || defined(_BSD_SOURCE)
 void *memccpy (void *__restrict, const void *__restrict, int, size_t);
diff --git a/include/wchar.h b/include/wchar.h
index 88eb55b1..6f8af081 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -157,7 +157,6 @@ size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)  || defined(_BSD_SOURCE)
-FILE *open_wmemstream(wchar_t **, size_t *);
 size_t mbsnrtowcs(wchar_t *__restrict, const char **__restrict, size_t, size_t, mbstate_t *__restrict);
 size_t wcsnrtombs(char *__restrict, const wchar_t **__restrict, size_t, size_t, mbstate_t *__restrict);
 wchar_t *wcsdup(const wchar_t *);
@@ -172,6 +171,12 @@ int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
 size_t wcsxfrm_l(wchar_t *__restrict, const wchar_t *__restrict, size_t, locale_t);
 #endif
 
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
+ ||(defined(__STDC_WANT_LIB_EXT2__) && __STDC_WANT_LIB_EXT2__)
+FILE *open_wmemstream(wchar_t **, size_t *);
+#endif
+
 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int wcwidth (wchar_t);
 int wcswidth (const wchar_t *, size_t);
-- 
2.30.2


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[relevance 5%]

* OpenEmbedded systemd+musl patch status
@ 2019-11-08 18:43  2% Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2019-11-08 18:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: musl, raj.khem

Some questions came up on #musl about systemd and musl
[non-]compatibility, and whether any of the patches being applied are
problematic/buggy, so I'm doing a quick review of my take on each,
from the list here:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd_243.bb#n31
https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd



0002-don-t-use-glibc-specific-qsort_r.patch

This looks ok-ish for now. It's not "musl specific" because qsort_r is
not a standard function and historical implementations differ in the
argument order, which is why musl has it -- lack of consensus over
something like this is a strong criterion for exclusion. I've been
working to get consensus on adopting the glibc argument order, and BSD
folks seem onboard with changing to match glibc and proposing qsort_r
for standardization in POSIX, so I think we'll support it in the
future.

In the mean time, to be safe the globals used to replace the context
argument should have __thread storage duration; current code in the
patch is silently thread-unsafe.



0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch

Harmless but slightly wrong, and not "musl specific" as described.
It has undefined behavior by virtue of defining (and systemd already
had UB by using) identifier in the reserved __ namespace. The correct
fix here is for systemd not to use the gratuitous glibc typedefs for
this function type and instead just write the type out, or make its
own typedef (by writing the type out) that doesn't involve the
gratuitous glibc typedef.




0004-add-fallback-parse_printf_format-implementation.patch

I don't understand what systemd wants with this, but by itself it's
harmless or at least doesn't have any obvious errors. This is not
"musl-specific". It's providing a fallback for a highly glibc-specific
interface.



0005-src-basic-missing.h-check-for-missing-strndupa.patch

strndupa has been proposed for musl and will probably be added at some
point (it's header-only and painless), but its use is almost always
insecure and a serious code smell, so it would be worth looking into
why systemd is using it...



0006-Include-netinet-if_ether.h.patch


Documented musl behavior is that if you want to use both libc headers
and kernel headers that cover the same types, the libc ones must be
included first so that they can suppress the kernel definitions with
the appropriate UAPI macros. We don't support the other direction
(using kernel-defined UAPI macros to suppress libc definitions) for
several reasons, probably the most important of which is that the
kernel ones may be using types that align in ABI layout but that are
not C-language-level compatible types (kernel folks don't seem to care
about that) and might break things elsewhere.

You can call this "musl-specific" if you like, but use of kernel
headers that clash with libc ones is not well-defined to begin with,
and AIUI the glibc folks are in agreement that the way musl supports
is preferable (less likely to break from kernel doing wacky things)
even though they support both. So I think changing the order makes
sense independent of musl.



0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch

These are both glibc-specific extensions which applications are
supposed to test for and provide their own copy of GNU glob (e.g. from
gnulib) if the system glob does not support them (or just do without).
The patch as proposed takes the "do without" option.

GLOB_ALTDIRFUNC has been proposed for musl and possibly meets
conditions for inclusion (it's iff) but the current proposed patch
introduces UB, and it's a pain to fix it not to introduce UB.

GLOB_BRACE has not been investigated yet.

The systemd patch is probably ok but might have user-facing effects.




0008-add-missing-FTW_-macros-for-musl.patch

This patch is bad, defining macros for functionality that's not
supported. musl should probably be returning an error when it sees
these unsupported bits but it's probably silently ignoring them.
Neither is likely to be helpful. If they're really needed, an alt
implementation of nftw is probably called for here (unless these
macros make sense in musl; I don't think this has been evaluated).

I'm not sure how harmful this patch is as-is but it's not correct.



0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch

This is abvolutely not "musl specific". The comment in the systemd
source file being patched is clear that the thing here is an awful
hack for avoiding needing -lpthread with glibc. It's poking at a
glibc-internal symbol in __ namespace and has UB. It should just be
removed and pthread_atfork should always be used.

However note that most uses of pthread_atfork have UB, since the child
context after a multithreaded process forks is in an async-signal
context where you cannot use most functions, including locking
functions (except sem_post which is AS-safe), and even if you could,
it would be UB to unlock a lock that you took in the parent in the
child, since the child is not the owner and unlock by non-owner has
UB. This was a design bug in the POSIX threads spec that's been
acknowledged. So systemd probably has bugs here.



0011-Use-uintmax_t-for-handling-rlim_t.patch

This is a fix that should have been accepted upstream. Assuming rlim_t
has same type as uint64_t is wrong.



0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch

This patch is correct, and the removal of these tests need not even be
dependent on !__GLIBC__. The types being checked are internal types
for use by glibc's headers, not public types provided by glibc.




0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch

This patch looks correct, but I'm not sure if there's more behind the
laccess mess systemd is doing. AT_SYMLINK_NOFOLLOW is not specified as
a valid flag for faccessat, and the kernel does not offer any direct
way to perform such an action. I'm not sure what hackery glibc is
doing to provide it, but I wouldn't be surprised if it has buggy
corner cases. We specifically punted on it unless/until it's required
by the spec, since it's likely hard or impossible to make it work
right.



0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch

This patch is correct and not "musl specific". Rather, the incorrect
definition of basename systemd expects is glibc-specific, contrary to
the spec, and contrary to every other implementation.



0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch

I don't understand why this patch is needed, and I don't think it's
the right fix. There's probably an underlying bug in systemd behind
it.


0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch

Exact same issue as 0016 -- glibc has a wrong definition of a standard
function and systemd is relying on it.



0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch

No idea why this is listed with musl+systemd patches. It does not seem
to have anything to do with musl.



0020-missing_type.h-add-__compar_d_fn_t-definition.patch

This patch is wrong but systemd is wrong too. It just should not be
using these gratuitous typedefs for comparator functions, which have a
standard type expressable without any system-header-provided typedefs
whatsoever. If they want a typedef they should define their own that's
not overlapping with one defined by glibc, and not in the reserved __
namespace.


0021-avoid-redefinition-of-prctl_mm_map-structure.patch

Not sure what the right thing to do here is. This should be detected
rather than using __GLIBC__ I think, if glibc actually needs it, but
it's messy. In any case the patch is harmless and not incorrect so
fine to keep for now.


0001-do-not-disable-buffer-in-writing-files.patch

Looks like #0017 above, probably same underlying issue. Patch is
almost surely not correct and there's likely an underlying bug/UB in
systemd that needs fixing.



0002-src-login-brightness.c-include-sys-wait.h.patch

Looks fine.



0003-src-basic-copy.c-include-signal.h.patch

Looks fine.



0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch

OK-ish, but defining this identifier in reserved namespace is wrong.
Rather, systemd should be fixed not to be poking at cpuset internals
but should correctly use accessor macros.




^ permalink raw reply	[relevance 2%]

* Re: C Annex K safe C functions
  @ 2019-02-27 16:34  3%   ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2019-02-27 16:34 UTC (permalink / raw)
  To: musl

On Wed, Feb 27, 2019 at 08:11:53AM -0500, Rich Felker wrote:
> On Wed, Feb 27, 2019 at 10:30:52AM +0700, Jonny Grant wrote:
> > Hello
> > Not on the list, so please cc me in replies.
> > Any plans to support Annex K?
> > Those safe functions are great, strncpy_s etc
> 
> No, and there's been considerable amounts of stuff written on this in
> the past. I'll try to give you a good summary later. The reply so far
> by Szabolcs Nagy is a good start.

Here's what comes to mind about the technical and social reasons
behind not adopting Annex K:

1. The Annex K interfaces are clearly inspired by (even named
identically to) the corresponding *_s interfaces provided by MSVC.
However, the MSVC functions don't actually conform to the
specification in Annex K, due to some subtle breakage in types (IIRC
the rsize_t stuff, possibly other things too). Thus there are actually
two slightly incompatible sets of functions with the same names. This
is generally a strong criterion for exclusion from musl, unless one of
the standards we aim to support mandates the presence of the functions
with this problem (like strerror_r).

2. The handling of "runtime constraint violation" and the ability to
customize the handler for it is highly problematic. Code using the
Annex K functions can neither rely on a particular default handling of
these errors, nor can it set the handling it wants unless it's global
initialization code for the whole application, since the runtime
constraint handler is global state that can't be set in a thread-safe
or library-safe manner. Thus, to use these functions safely, you must
both check for the erroneous conditions before making the call (since,
for one choice of handler, the call could abort your program if it
detects them), and you must check for an error return from the
function (since, for a different choice of handler, it might just
return an error, and if you don't check for that yourself, your
program could continue running in an unsafe state).

3. In order to provide any safety over the standard functions they
"replace", the Annex K functions rely on the caller to provide
accurate information about the sizes of buffers, etc. in the
additional function arguments. There's no good reason to believe that
the programmer will get these arguments right when they consistently
fail to get the arguments to the standard functions right. For
example, there's no reason to believe programmers won't just call
memcpy_s(dest, n, src, n) instead of going back to some better
authoritative source for the size of the dest buffer. In many (most?)
cases, n is already computed just as the size of the dest object, and
nothing is gained. These kinds of problems are solved *much* better by
techniques that allow the compiler or runtime to track the size of
objects and automatically insert checks, which aren't subject to human
error or misuse. The _FORTIFY_SOURCE feature, sanitizers, etc. all
provide much better protection than Annex K functions in this area.

4. The Annex K *printf_s specifications spread FUD about %n being
dangerous, ignoring that this is a poor stand-in for the general
unsafety of *passing a literal string where a format string is
expected* and for use of variable format strings. Without %n, the
impact of such bugs is somewhat reduced, but it's still possible to
get heartbleed-like info leak exploits from them. A real hardened
version of printf-family functions would take a list of argument types
and match the format string against it, and this list would be
generated automatically by the tooling (ala _FORTIFY_SOURCE).

5. Expanding on the topic of FUD/misinformation, both the introduction
of the original *_s functions, and lobbying for their inclusion in the
standard (which eventually reached the compromise of just putting them
in an Annex), was not about improving the C language or making useful
tools for programmers, but about introducing incompatibility and
fragmentation to the language/standard with the goal of undermining
it. The company that introduced it produces a product that is not
compatible with the C language as specified and does not even aim to
be, but aims to give the impression of being a C implementation (it's
mainly a C++ implementation, though likely not conforming to that
standard either). This is part of a long history, including wrong
wchar_t handling, inverting the meaning of %s and %ls with the wide
printf functions, etc. etc. etc. See also point #1 above about
incompatibility of the Annex K functions themselves. It's my position,
and I believe it's shared by many others in the musl community and C
language communities, that parties not interested in implementing or
using the standard should not try to influence its direction, and that
this kind of behavior should not be rewarded by playing along with it,
but that it should be shunned as long as doing so is practical.

Rich


^ permalink raw reply	[relevance 3%]

* Re: strerror_r and _GNU_SOURCE
  2018-08-05  0:54 14% strerror_r and _GNU_SOURCE W. Michael Petullo
@ 2018-08-05  1:04  6% ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2018-08-05  1:04 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: musl

On Sat, Aug 04, 2018 at 08:54:08PM -0400, W. Michael Petullo wrote:
> When _GNU_SOURCE is defined, strerror_r should return a char *. Musl
> 1.1.19 declares strerror_r as:
> 
> 	int strerror_r (int, char *, size_t)
> 
> I have found that _GNU_SOURCE is defined when I build snort on OpenWrt
> (OpenWrt uses musl). This causes the build to fail because snort expects
> strerror_r to return a char * since _GNU_SOURCE is defined.
> 
> Is this a bug in musl?

No, musl explicitly does not suppore the GNU interfaces that conflict
with standard interfaces by the same name.

Rich


^ permalink raw reply	[relevance 6%]

* strerror_r and _GNU_SOURCE
@ 2018-08-05  0:54 14% W. Michael Petullo
  2018-08-05  1:04  6% ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: W. Michael Petullo @ 2018-08-05  0:54 UTC (permalink / raw)
  To: musl

When _GNU_SOURCE is defined, strerror_r should return a char *. Musl
1.1.19 declares strerror_r as:

	int strerror_r (int, char *, size_t)

I have found that _GNU_SOURCE is defined when I build snort on OpenWrt
(OpenWrt uses musl). This causes the build to fail because snort expects
strerror_r to return a char * since _GNU_SOURCE is defined.

Is this a bug in musl?

-- 
Mike

:wq


^ permalink raw reply	[relevance 14%]

* Re: [PATCH v2] add powerpc64 port
  @ 2016-04-15 20:38  4%       ` Szabolcs Nagy
  0 siblings, 0 replies; 73+ results
From: Szabolcs Nagy @ 2016-04-15 20:38 UTC (permalink / raw)
  To: musl

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

* Szabolcs Nagy <nsz@port70.net> [2016-04-14 15:42:13 +0200]:
> * Bobby Bingham <koorogi@koorogi.info> [2016-04-14 03:01:38 -0500]:
> > 
> > How important is it to match glibc here?
> > 
> 
> i think we don't care about abi compat
> (but it might be interesting to check how much abi
> difference there is between glibc and musl, i can
> do this if i can build a musl+glibc toolchain)
> 

attached some c++ abi comparisions

(the comparision was not entirely clean, it involved
various manual hacks, but most types and functions
should be compared correctly glibc vs musl)

two interesting gcc warnings:

powerpc64 elf_vrreg_t (both musl and glibc):
note: the ABI of passing aggregates with 16-byte alignment has changed in GCC 5

x86_64 struct inotify_event (musl only):
note: the ABI of passing struct with a flexible array member has changed in GCC 4.4


[-- Attachment #2: abi_type.powerpc64le.diff --]
[-- Type: text/x-diff, Size: 5984 bytes --]

--- abi_type.powerpc64le.glibc	2016-04-15 21:00:27.432246225 +0100
+++ abi_type.powerpc64le.musl	2016-04-15 20:57:39.000149371 +0100
@@ -1 +0,0 @@
-std::piecewise_construct
@@ -3 +2 @@
-CODE: _code, _code*, size (*) [16], align (*) [8]
+CODE: CODE, CODE*, size (*) [16], align (*) [8]
@@ -69 +68 @@
-__jmp_buf: long*, long (*) [64], size (*) [512], align (*) [16]
+__jmp_buf: unsigned long long*, unsigned long long (*) [66], size (*) [528], align (*) [8]
@@ -90,2 +89,2 @@
-elf_vrreg_t: __vector128, __vector128*, size (*) [16], align (*) [16]
-elf_vrregset_t: __vector128*, __vector128 (*) [34], size (*) [544], align (*) [16]
+elf_vrreg_t: elf_vrreg_t, elf_vrreg_t*, size (*) [16], align (*) [16]
+elf_vrregset_t: elf_vrreg_t*, elf_vrreg_t (*) [34], size (*) [544], align (*) [16]
@@ -94 +93 @@
-fd_mask: long, long*, size (*) [8], align (*) [8]
+fd_mask: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -97 +96 @@
-fexcept_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
+fexcept_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -100,2 +99,2 @@
-fpos_t: _G_fpos_t, _G_fpos_t*, size (*) [16], align (*) [8]
-fpregset_t: double*, double (*) [33], size (*) [264], align (*) [8]
+fpos_t: _G_fpos64_t, _G_fpos64_t*, size (*) [16], align (*) [8]
+fpregset_t: fpregset_t, fpregset_t*, size (*) [264], align (*) [8]
@@ -106,0 +106 @@
+greg_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -120,2 +120,2 @@
-int_fast16_t: long, long*, size (*) [8], align (*) [8]
-int_fast32_t: long, long*, size (*) [8], align (*) [8]
+int_fast16_t: int, int*, size (*) [4], align (*) [4]
+int_fast32_t: int, int*, size (*) [4], align (*) [4]
@@ -130 +130 @@
-jmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [656], align (*) [16]
+jmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [664], align (*) [8]
@@ -141 +141 @@
-mcontext_t: mcontext_t, mcontext_t*, size (*) [1272], align (*) [8]
+mcontext_t: sigcontext, sigcontext*, size (*) [1528], align (*) [8]
@@ -183,2 +183,2 @@
-pthread_rwlockattr_t: pthread_rwlockattr_t, pthread_rwlockattr_t*, size (*) [8], align (*) [8]
-pthread_spinlock_t: int, int volatile*, size (*) [4], align (*) [4]
+pthread_rwlockattr_t: pthread_rwlockattr_t, pthread_rwlockattr_t*, size (*) [8], align (*) [4]
+pthread_spinlock_t: int, int*, size (*) [4], align (*) [4]
@@ -187 +187 @@
-quad_t: long, long*, size (*) [8], align (*) [8]
+quad_t: long long, long long*, size (*) [8], align (*) [8]
@@ -190,2 +190,2 @@
-regmatch_t: regmatch_t, regmatch_t*, size (*) [8], align (*) [4]
-regoff_t: int, int*, size (*) [4], align (*) [4]
+regmatch_t: regmatch_t, regmatch_t*, size (*) [16], align (*) [8]
+regoff_t: long, long*, size (*) [8], align (*) [8]
@@ -193 +193 @@
-rlim_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+rlim_t: unsigned long long, unsigned long long*, size (*) [8], align (*) [8]
@@ -195 +195 @@
-sem_t: sem_t, sem_t*, size (*) [32], align (*) [8]
+sem_t: sem_t, sem_t*, size (*) [32], align (*) [4]
@@ -205 +205 @@
-sigjmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [656], align (*) [16]
+sigjmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [664], align (*) [8]
@@ -213 +213 @@
-__jmp_buf_tag: __jmp_buf_tag, __jmp_buf_tag*, size (*) [656], align (*) [16]
+__jmp_buf_tag: __jmp_buf_tag, __jmp_buf_tag*, size (*) [664], align (*) [8]
@@ -229,2 +229,2 @@
-cmsghdr: cmsghdr, cmsghdr*, size (*) [16], align (*) [8]
-crypt_data: crypt_data, crypt_data*, size (*) [131232], align (*) [8]
+cmsghdr: cmsghdr, cmsghdr*, size (*) [16], align (*) [4]
+crypt_data: crypt_data, crypt_data*, size (*) [260], align (*) [4]
@@ -242,2 +242,2 @@
-ether_header: ether_header, ether_header*, size (*) [14], align (*) [1]
-ethhdr: ethhdr, ethhdr*, size (*) [14], align (*) [1]
+ether_header: ether_header, ether_header*, size (*) [14], align (*) [2]
+ethhdr: ethhdr, ethhdr*, size (*) [14], align (*) [2]
@@ -299 +299 @@
-lastlog: lastlog, lastlog*, size (*) [292], align (*) [4]
+lastlog: lastlog, lastlog*, size (*) [296], align (*) [8]
@@ -330 +330 @@
-ntptimeval: ntptimeval, ntptimeval*, size (*) [72], align (*) [8]
+ntptimeval: ntptimeval, ntptimeval*, size (*) [32], align (*) [8]
@@ -334,0 +335 @@
+prctl_mm_map: prctl_mm_map, prctl_mm_map*, size (*) [104], align (*) [8]
@@ -346,2 +347,2 @@
-rusage: rusage, rusage*, size (*) [144], align (*) [8]
-sched_param: sched_param, sched_param*, size (*) [4], align (*) [4]
+rusage: rusage, rusage*, size (*) [272], align (*) [8]
+sched_param: sched_param, sched_param*, size (*) [48], align (*) [8]
@@ -382,2 +383,2 @@
-sysinfo: sysinfo, sysinfo*, size (*) [112], align (*) [8]
-tcp_info: tcp_info, tcp_info*, size (*) [104], align (*) [4]
+sysinfo: sysinfo, sysinfo*, size (*) [368], align (*) [8]
+tcp_info: tcp_info, tcp_info*, size (*) [144], align (*) [8]
@@ -386,2 +387,2 @@
-termios: termios, termios*, size (*) [60], align (*) [4]
-tftphdr: tftphdr, tftphdr*, size (*) [5], align (*) [1]
+termios: termios, termios*, size (*) [44], align (*) [4]
+tftphdr: tftphdr, tftphdr*, size (*) [6], align (*) [2]
@@ -400 +401 @@
-utmpx: utmpx, utmpx*, size (*) [384], align (*) [4]
+utmpx: utmpx, utmpx*, size (*) [400], align (*) [8]
@@ -414 +415 @@
-u_quad_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+u_quad_t: unsigned long long, unsigned long long*, size (*) [8], align (*) [8]
@@ -416 +417 @@
-ucontext_t: ucontext, ucontext*, size (*) [1440], align (*) [8]
+ucontext_t: ucontext, ucontext*, size (*) [1696], align (*) [8]
@@ -423,2 +424,2 @@
-uint_fast16_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
-uint_fast32_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+uint_fast16_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
+uint_fast32_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
@@ -440 +441 @@
-vrregset_t: _libc_vrstate, _libc_vrstate*, size (*) [544], align (*) [16]
+vrregset_t: vrregset_t, vrregset_t*, size (*) [544], align (*) [8]

[-- Attachment #3: abi_func.powerpc64le.diff --]
[-- Type: text/x-diff, Size: 5518 bytes --]

--- abi_func.powerpc64le.glibc	2016-04-15 20:53:34.364008400 +0100
+++ abi_func.powerpc64le.musl	2016-04-15 20:11:08.522531385 +0100
@@ -1 +0,0 @@
-std::piecewise_construct
@@ -3 +2 @@
-void __assert_fail(char const*, char const*, unsigned int, char const*)
+void __assert_fail(char const*, char const*, int, char const*)
@@ -7,0 +7 @@
+int __flt_rounds()
@@ -12 +12 @@
-void __fpurge(_IO_FILE*)
+int __fpurge(_IO_FILE*)
@@ -13,0 +14 @@
+unsigned long __freadahead(_IO_FILE*)
@@ -14,0 +16,3 @@
+char const* __freadptr(_IO_FILE*, unsigned long*)
+void __freadptrinc(_IO_FILE*, unsigned long)
+void __fseterr(_IO_FILE*)
@@ -26,0 +31 @@
+int _flush_cache(void*, int, int)
@@ -28,0 +34,2 @@
+void _pthread_cleanup_pop(__ptcb*, int)
+void _pthread_cleanup_push(__ptcb*, void (*)(void*), void*)
@@ -96,0 +104,2 @@
+int cachectl(void*, int, int)
+int cacheflush(void*, int, int)
@@ -102,0 +112 @@
+void call_once(int*, void (*)())
@@ -166,0 +177,6 @@
+int cnd_broadcast(cnd_t*)
+void cnd_destroy(cnd_t*)
+int cnd_init(cnd_t*)
+int cnd_signal(cnd_t*)
+int cnd_timedwait(cnd_t*, mtx_t*, timespec const*)
+int cnd_wait(cnd_t*, mtx_t*)
@@ -300 +316 @@
-int fanotify_mark(int, unsigned int, unsigned long, int, char const*)
+int fanotify_mark(int, unsigned int, unsigned long long, int, char const*)
@@ -317 +333 @@
-int fegetexceptflag(unsigned int*, int)
+int fegetexceptflag(unsigned long*, int)
@@ -326 +342 @@
-int fesetexceptflag(unsigned int const*, int)
+int fesetexceptflag(unsigned long const*, int)
@@ -339 +355,2 @@
-int fgetpos(_IO_FILE*, _G_fpos_t*)
+char* fgetln(_IO_FILE*, unsigned long*)
+int fgetpos(_IO_FILE*, _G_fpos64_t*)
@@ -397 +414 @@
-int fsetpos(_IO_FILE*, _G_fpos_t const*)
+int fsetpos(_IO_FILE*, _G_fpos64_t const*)
@@ -436,0 +454 @@
+int getdents(int, dirent*, unsigned long)
@@ -493,0 +512 @@
+char* gets(char*)
@@ -506 +525 @@
-int gettimeofday(timeval*, timezone*)
+int gettimeofday(timeval*, void*)
@@ -509,3 +528,3 @@
-utmp* getutent()
-utmp* getutid(utmp const*)
-utmp* getutline(utmp const*)
+utmpx* getutent()
+utmpx* getutid(utmpx const*)
+utmpx* getutline(utmpx const*)
@@ -549,0 +569 @@
+char* index(char const*, int)
@@ -566 +586,3 @@
-int ioctl(int, unsigned long, ...)
+int ioctl(int, int, ...)
+int ioperm(unsigned long, unsigned long, int)
+int iopl(int)
@@ -587,0 +610 @@
+int issetugid()
@@ -650 +673 @@
-int lio_listio(int, aiocb* const*, int, sigevent*)
+int lio_listio(int, aiocb* const restrict*, int, sigevent*)
@@ -711,0 +735 @@
+void* memchr(void const*, int, unsigned long)
@@ -716,0 +741 @@
+void* memrchr(void const*, int, unsigned long)
@@ -756,0 +782,6 @@
+void mtx_destroy(mtx_t*)
+int mtx_init(mtx_t*, int)
+int mtx_lock(mtx_t*)
+int mtx_timedlock(mtx_t*, timespec const*)
+int mtx_trylock(mtx_t*)
+int mtx_unlock(mtx_t*)
@@ -804,0 +836 @@
+int posix_close(int, int)
@@ -842 +874 @@
-int prlimit(int, __rlimit_resource, rlimit const*, rlimit*)
+int prlimit(int, int, rlimit const*, rlimit*)
@@ -945,5 +977,5 @@
-int pthread_spin_destroy(int volatile*)
-int pthread_spin_init(int volatile*, int)
-int pthread_spin_lock(int volatile*)
-int pthread_spin_trylock(int volatile*)
-int pthread_spin_unlock(int volatile*)
+int pthread_spin_destroy(int*)
+int pthread_spin_init(int*, int)
+int pthread_spin_lock(int*)
+int pthread_spin_trylock(int*)
+int pthread_spin_unlock(int*)
@@ -951 +983 @@
-long ptrace(__ptrace_request, ...)
+long ptrace(int, ...)
@@ -963 +995 @@
-utmp* pututline(utmp const*)
+utmpx* pututline(utmpx const*)
@@ -989 +1021 @@
-int recvmmsg(int, mmsghdr*, unsigned int, int, timespec*)
+int recvmmsg(int, mmsghdr*, unsigned int, unsigned int, timespec*)
@@ -1014,0 +1047 @@
+char* rindex(char const*, int)
@@ -1063 +1096 @@
-int sendmmsg(int, mmsghdr*, unsigned int, int)
+int sendmmsg(int, mmsghdr*, unsigned int, unsigned int)
@@ -1178,0 +1212 @@
+char* strcasestr(char const*, char const*)
@@ -1179,0 +1214,2 @@
+char* strchr(char const*, int)
+char* strchrnul(char const*, int)
@@ -1188 +1224 @@
-char* strerror_r(int, char*, unsigned long)
+int strerror_r(int, char*, unsigned long)
@@ -1192,0 +1229,2 @@
+unsigned long strlcat(char*, char const*, unsigned long)
+unsigned long strlcpy(char*, char const*, unsigned long)
@@ -1200,0 +1239 @@
+char* strpbrk(char const*, char const*)
@@ -1201,0 +1241 @@
+char* strrchr(char const*, int)
@@ -1204,0 +1245 @@
+char* strstr(char const*, char const*)
@@ -1262,0 +1304,8 @@
+int thrd_create(unsigned long*, int (*)(void*), void*)
+unsigned long thrd_current()
+int thrd_detach(unsigned long)
+int thrd_equal(unsigned long, unsigned long)
+void thrd_exit(int)
+int thrd_join(unsigned long, int*)
+int thrd_sleep(timespec const*, timespec*)
+void thrd_yield()
@@ -1292,0 +1342,4 @@
+int tss_create(unsigned int*, void (*)(void*))
+void tss_delete(unsigned int)
+void* tss_get(unsigned int)
+int tss_set(unsigned int, void*)
@@ -1311 +1364 @@
-void updwtmp(char const*, utmp const*)
+void updwtmp(char const*, utmpx const*)
@@ -1345,3 +1398,3 @@
-int wait(void*)
-int wait3(void*, int, rusage*)
-int wait4(int, void*, int, rusage*)
+int wait(int*)
+int wait3(int*, int, rusage*)
+int wait4(int, int*, int, rusage*)
@@ -1357,0 +1411 @@
+wchar_t* wcschr(wchar_t const*, wchar_t)
@@ -1372,0 +1427,2 @@
+wchar_t* wcspbrk(wchar_t const*, wchar_t const*)
+wchar_t* wcsrchr(wchar_t const*, wchar_t)
@@ -1374,0 +1431 @@
+wchar_t* wcsstr(wchar_t const*, wchar_t const*)
@@ -1385,0 +1443 @@
+wchar_t* wcswcs(wchar_t const*, wchar_t const*)
@@ -1395,0 +1454 @@
+wchar_t* wmemchr(wchar_t const*, wchar_t, unsigned long)

^ permalink raw reply	[relevance 4%]

* Re: netflix support (WAS: Open/pending issues as of Jan 17)
  @ 2016-02-19 10:30  3%         ` Natanael Copa
  0 siblings, 0 replies; 73+ results
From: Natanael Copa @ 2016-02-19 10:30 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl

On Fri, 29 Jan 2016 13:19:28 -0500
Rich Felker <dalias@libc.org> wrote:

> On Fri, Jan 29, 2016 at 08:54:49AM +0100, Natanael Copa wrote:
> > An unrelated feature request: it would be nice to get netflix working
> > with the closed source libwidevinecdm.so and libwidevinecdmadapter.so 
> > 
> > ncopa-desktop:~$ ldd /usr/lib/chromium/libwidevinecdmadapter.so 
> > 	ldd (0x723cd632b000)
> > 	libwidevinecdm.so => /usr/lib/chromium/libwidevinecdm.so (0x723cd5ba2000)
> > 	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x723cd5852000)
> > 	libpthread.so.0 => ldd (0x723cd632b000)
> > 	libc.so.6 => ldd (0x723cd632b000)
> > 	libm.so.6 => ldd (0x723cd632b000)
> > 	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x723cd563f000)
> > Error relocating /usr/lib/chromium/libwidevinecdm.so: __memcpy_chk: symbol not found
> > Error relocating /usr/lib/chromium/libwidevinecdm.so: __memset_chk: symbol not found
> > Error relocating /usr/lib/chromium/libwidevinecdm.so: __sprintf_chk: symbol not found
> > 
> > 
> > Adding those symbols for libc6 ABI compat would be a first step.  
> 
> This is on the roadmap, and there's a pending patch on the list, but
> it still needs some changes before it's ready to commit.
> 
> Are you aware of anything else blocking support for these libs?

I don't know.

> It might be worth doing a symbol listing and checking it against
> functions that might have glibc extensions we don't support or the
> minor ABI mismatches (non-*64 funcs for 32-bit, or regexec regoff_t
> for 64-bit).

I suppose strerror_r also belongs to the incompat function list.

Looks like there are a open64 and fopen64 atleast. But I suppose 64bit
should work.


ncopa-desktop:~$ nm -D /usr/lib/chromium/libwidevinecdm*.so

/usr/lib/chromium/libwidevinecdm.so:
000000000004e090 T CreateCdmInstance
000000000004e070 T DeinitializeCdmModule
000000000004e130 T GetCdmVersion
000000000004e060 T InitializeCdmModule_4
                 w _Jv_RegisterClasses
                 U _Unwind_Resume
                 U _ZNKSs4dataEv
                 U _ZNKSs4sizeEv
                 U _ZNKSs5c_strEv
                 U _ZNKSs5emptyEv
                 U _ZNKSs7_M_iendEv
                 U _ZNKSs7compareEPKc
                 U _ZNKSs7compareERKSs
                 U _ZNKSs8capacityEv
                 U _ZNKSs9_M_ibeginEv
                 U _ZNSaIcEC1Ev
                 U _ZNSaIcED1Ev
                 U _ZNSi4peekEv
                 U _ZNSi4readEPcl
                 U _ZNSi5seekgESt4fposI11__mbstate_tE
                 U _ZNSi5seekgElSt12_Ios_Seekdir
                 U _ZNSi5tellgEv
                 U _ZNSi7putbackEc
                 U _ZNSo5flushEv
                 U _ZNSo5writeEPKcl
                 U _ZNSs12_Alloc_hiderC1EPcRKSaIcE
                 U _ZNSs12_M_leak_hardEv
                 U _ZNSs12_S_empty_repEv
                 U _ZNSs14_M_replace_auxEmmmc
                 U _ZNSs4_Rep10_M_destroyERKSaIcE
                 U _ZNSs4_Rep10_M_refdataEv
                 U _ZNSs4_Rep11_S_terminalE
                 U _ZNSs4_Rep20_S_empty_rep_storageE
                 U _ZNSs4_Rep26_M_set_length_and_sharableEm
                 U _ZNSs4_Rep9_S_createEmmRKSaIcE
                 U _ZNSs5clearEv
                 U _ZNSs6appendEPKc
                 U _ZNSs6appendEPKcm
                 U _ZNSs6appendERKSs
                 U _ZNSs6appendEmc
                 U _ZNSs6assignEPKcm
                 U _ZNSs6assignERKSs
                 U _ZNSs6assignERKSsmm
                 U _ZNSs6insertEmRKSs
                 U _ZNSs6resizeEm
                 U _ZNSs6resizeEmc
                 U _ZNSs7replaceEmmPKcm
                 U _ZNSs7reserveEm
                 U _ZNSs9_M_mutateEmmm
                 U _ZNSs9push_backEc
                 U _ZNSsC1EOSs
                 U _ZNSsC1EPKcRKSaIcE
                 U _ZNSsC1EPKcmRKSaIcE
                 U _ZNSsC1ERKSs
                 U _ZNSsC1EmcRKSaIcE
                 U _ZNSsC1Ev
                 U _ZNSsD1Ev
                 U _ZNSsaSERKSs
                 U _ZNSsixEm
                 U _ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
                 U _ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
                 U _ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev
                 U _ZNSt8__detail15_List_node_base11_M_transferEPS0_S1_
                 U _ZNSt8__detail15_List_node_base7_M_hookEPS0_
                 U _ZNSt8__detail15_List_node_base9_M_unhookEv
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
                 U _ZNSt9bad_allocD1Ev
                 U _ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
                 U _ZNSt9exceptionD2Ev
                 U _ZSt15set_new_handlerPFvvE
                 U _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
                 U _ZSt17__throw_bad_allocv
                 U _ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base
                 U _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
                 U _ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
                 U _ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base
                 U _ZSt18uncaught_exceptionv
                 U _ZSt19__throw_logic_errorPKc
                 U _ZSt20__throw_length_errorPKc
                 U _ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS_
                 U _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
                 U _ZSt2wsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_
                 U _ZSt9terminatev
                 U _ZTIPKc
                 U _ZTIPKh
                 U _ZTIPKi
                 U _ZTIPKw
                 U _ZTIPh
                 U _ZTISi
                 U _ZTISo
                 U _ZTISt9bad_alloc
                 U _ZTISt9exception
                 U _ZTIb
                 U _ZTIh
                 U _ZTIi
                 U _ZTIj
                 U _ZTVN10__cxxabiv116__enum_type_infoE
                 U _ZTVN10__cxxabiv117__class_type_infoE
                 U _ZTVN10__cxxabiv119__pointer_type_infoE
                 U _ZTVN10__cxxabiv120__si_class_type_infoE
                 U _ZTVN10__cxxabiv121__vmi_class_type_infoE
                 U _ZTVSt9bad_alloc
                 U _ZTVSt9exception
                 U _ZdaPv
                 U _ZdlPv
                 U _Znam
                 U _Znwm
                 U __ctype_toupper_loc
                 U __cxa_allocate_exception
                 U __cxa_atexit
                 U __cxa_begin_catch
                 U __cxa_call_unexpected
                 U __cxa_end_catch
                 w __cxa_finalize
                 U __cxa_free_exception
                 U __cxa_get_exception_ptr
                 U __cxa_guard_acquire
                 U __cxa_guard_release
                 U __cxa_pure_virtual
                 U __cxa_rethrow
                 U __cxa_throw
                 U __dynamic_cast
                 U __errno_location
                 w __gmon_start__
                 U __gxx_personality_v0
                 U __memcpy_chk
                 U __memset_chk
                 U __sched_cpucount
                 U __sprintf_chk
                 U __stack_chk_fail
                 U __strdup
                 U __strtok_r
0000000000365cec T _fini
0000000000030bb8 T _init
                 U _setjmp
                 U abort
                 U accept
                 U acos
                 U atan
                 U atoi
                 U bind
                 U calloc
                 U ceil
                 U clock
                 U close
                 U connect
                 U cos
                 U exit
                 U exp
                 U exp2
                 U fclose
                 U fflush
                 U fgets
                 U floor
                 U floorf
                 U fopen
                 U fopen64
                 U fprintf
                 U fputc
                 U fputs
                 U fread
                 U free
                 U fseek
                 U ftell
                 U fwrite
                 U getenv
                 U geteuid
                 U gethostbyname
                 U gethostname
                 U getpeername
                 U getservbyname
                 U getsockname
                 U gettimeofday
                 U inet_addr
                 U ioctl
                 U isalpha
                 U ldexp
                 U listen
                 U localtime
                 U log
                 U log10
                 U longjmp
                 U malloc
                 U memalign
                 U memchr
                 U memcmp
                 U memcpy
                 U memmove
                 U memset
                 U open64
                 U pow
                 U printf
                 U pthread_attr_destroy
                 U pthread_attr_init
                 U pthread_attr_setschedpolicy
                 w pthread_cancel
                 U pthread_cond_broadcast
                 U pthread_cond_destroy
                 U pthread_cond_init
                 U pthread_cond_signal
                 U pthread_cond_timedwait
                 U pthread_cond_wait
                 U pthread_create
                 U pthread_getschedparam
                 U pthread_getspecific
                 U pthread_join
                 U pthread_key_create
                 U pthread_key_delete
                 U pthread_mutex_destroy
                 U pthread_mutex_init
                 U pthread_mutex_lock
                 U pthread_mutex_trylock
                 U pthread_mutex_unlock
                 U pthread_mutexattr_destroy
                 U pthread_mutexattr_init
                 U pthread_mutexattr_settype
                 U pthread_once
                 U pthread_setschedparam
                 U pthread_setspecific
                 U qsort
                 U rand
                 U read
                 U readlink
                 U realloc
                 U recv
                 U rint
                 U rintf
                 U round
                 U sched_get_priority_max
                 U sched_get_priority_min
                 U sched_getaffinity
                 U sched_yield
                 U select
                 U sem_destroy
                 U sem_init
                 U sem_post
                 U sem_wait
                 U send
                 U shutdown
                 U signal
                 U sin
                 U sleep
                 U snprintf
                 U socket
                 U sprintf
                 U sqrt
                 U stderr
                 U stdout
                 U strcasecmp
                 U strcat
                 U strcmp
                 U strcpy
                 U strerror
                 U strftime
                 U strlen
                 U strncat
                 U strncmp
                 U strncpy
                 U strrchr
                 U strstr
                 U strtol
                 U sysconf
                 U time
                 U times
                 U tolower
                 U toupper
                 U uname
                 U usleep
                 U vsnprintf
                 U wcstombs

/usr/lib/chromium/libwidevinecdmadapter.so:
                 U CreateCdmInstance
                 U DeinitializeCdmModule
                 U InitializeCdmModule_4
000000000000be90 T PPP_GetInterface
000000000000be10 T PPP_InitializeModule
000000000000be70 T PPP_ShutdownModule
                 w _Jv_RegisterClasses
                 U _ZNKSs4findEcm
                 U _ZNSs12_M_leak_hardEv
                 U _ZNSs4_Rep10_M_destroyERKSaIcE
                 U _ZNSs4_Rep11_S_terminalE
                 U _ZNSs4_Rep20_S_empty_rep_storageE
                 U _ZNSs4swapERSs
                 U _ZNSs6appendEPKcm
                 U _ZNSs6appendERKSs
                 U _ZNSs6appendERKSsmm
                 U _ZNSs6appendEmc
                 U _ZNSs6assignEPKcm
                 U _ZNSs6assignERKSs
                 U _ZNSs6insertEmPKcm
                 U _ZNSs6resizeEmc
                 U _ZNSs7reserveEm
                 U _ZNSsC1EPKcRKSaIcE
                 U _ZNSsC1EPKcmRKSaIcE
                 U _ZNSsC1ERKSs
                 U _ZNSsC1ERKSsmm
0000000000005770 W _ZNSt6vectorIcSaIcEE13_M_assign_auxIPKhEEvT_S5_St20forward_iterator_tag
0000000000006260 W _ZNSt6vectorIcSaIcEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPcS1_EEEEvS6_T_S7_St20forward_iterator_tag
0000000000005690 W _ZNSt6vectorIcSaIcEE17_M_default_appendEm
000000000000ee60 W _ZNSt6vectorIiSaIiEE13_M_insert_auxIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
000000000000df90 W _ZNSt6vectorIiSaIiEE17_M_default_appendEm
000000000000cc70 W _ZNSt8_Rb_treeISsSt4pairIKSsPKvESt10_Select1stIS4_ESt4lessISsESaIS4_EE10_M_insert_IS4_EESt17_Rb_tree_iteratorIS4_EPKSt18_Rb_tree_node_baseSG_OT_
000000000000de70 W _ZNSt8_Rb_treeISsSt4pairIKSsPKvESt10_Select1stIS4_ESt4lessISsESaIS4_EE16_M_insert_uniqueIS4_EES0_ISt17_Rb_tree_iteratorIS4_EbEOT_
000000000000dc10 W _ZNSt8_Rb_treeISsSt4pairIKSsPKvESt10_Select1stIS4_ESt4lessISsESaIS4_EE17_M_insert_unique_IS4_EESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EOT_
0000000000005b60 W _ZNSt8_Rb_treeISsSt4pairIKSsPKvESt10_Select1stIS4_ESt4lessISsESaIS4_EE4findERS1_
00000000000055d0 W _ZNSt8_Rb_treeISsSt4pairIKSsPKvESt10_Select1stIS4_ESt4lessISsESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E
000000000000cc70 W _ZNSt8_Rb_treeISsSt4pairIKSsPvESt10_Select1stIS3_ESt4lessISsESaIS3_EE10_M_insert_IS3_EESt17_Rb_tree_iteratorIS3_EPKSt18_Rb_tree_node_baseSF_OT_
000000000000cd30 W _ZNSt8_Rb_treeISsSt4pairIKSsPvESt10_Select1stIS3_ESt4lessISsESaIS3_EE16_M_insert_uniqueIS3_EES0_ISt17_Rb_tree_iteratorIS3_EbEOT_
000000000000ca10 W _ZNSt8_Rb_treeISsSt4pairIKSsPvESt10_Select1stIS3_ESt4lessISsESaIS3_EE17_M_insert_unique_IS3_EESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EOT_
0000000000005b60 W _ZNSt8_Rb_treeISsSt4pairIKSsPvESt10_Select1stIS3_ESt4lessISsESaIS3_EE4findERS1_
00000000000055d0 W _ZNSt8_Rb_treeISsSt4pairIKSsPvESt10_Select1stIS3_ESt4lessISsESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E
0000000000005ed0 W _ZNSt8_Rb_treeISsSt4pairIKSsbESt10_Select1stIS2_ESt4lessISsESaIS2_EE10_M_insert_IS2_EESt17_Rb_tree_iteratorIS2_EPKSt18_Rb_tree_node_baseSE_OT_
0000000000005f90 W _ZNSt8_Rb_treeISsSt4pairIKSsbESt10_Select1stIS2_ESt4lessISsESaIS2_EE16_M_insert_uniqueIS2_EES0_ISt17_Rb_tree_iteratorIS2_EbEOT_
0000000000005c70 W _ZNSt8_Rb_treeISsSt4pairIKSsbESt10_Select1stIS2_ESt4lessISsESaIS2_EE17_M_insert_unique_IS2_EESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EOT_
0000000000005b60 W _ZNSt8_Rb_treeISsSt4pairIKSsbESt10_Select1stIS2_ESt4lessISsESaIS2_EE4findERS1_
00000000000055d0 W _ZNSt8_Rb_treeISsSt4pairIKSsbESt10_Select1stIS2_ESt4lessISsESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
                 U _ZSt17__throw_bad_allocv
                 U _ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base
                 U _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
                 U _ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
                 U _ZSt20__throw_length_errorPKc
                 U _ZSt20__throw_out_of_rangePKc
                 U _ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS_
                 U _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
                 U _ZSt4cout
                 U _ZdaPv
                 U _ZdlPv
                 U _Znam
                 U _Znwm
0000000000014038 A __bss_start
                 U __cxa_atexit
                 w __cxa_finalize
                 U __cxa_pure_virtual
                 w __gmon_start__
                 U __stack_chk_fail
0000000000014038 A _edata
00000000000141f9 A _end
0000000000010f78 T _fini
0000000000003860 T _init
                 U close
                 U memcmp
                 U memcpy
                 U memmove
                 U memset
                 U pthread_attr_init
                 U pthread_attr_setstacksize
                 w pthread_cancel
                 U pthread_create
                 U pthread_join
                 U pthread_mutex_destroy
                 U pthread_mutex_init
                 U pthread_mutex_lock
                 U pthread_mutex_unlock
                 U snprintf
                 U strcmp
                 U strlen
ncopa-desktop:~$ 




^ permalink raw reply	[relevance 3%]

* Re: pthread object sizes for new archs
  @ 2015-03-10 18:24  5%   ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2015-03-10 18:24 UTC (permalink / raw)
  To: musl

On Tue, Mar 10, 2015 at 09:30:44AM +0100, Jens Gustedt wrote:
> Hello,
> 
> Am Montag, den 09.03.2015, 21:07 -0400 schrieb Rich Felker:
> > How does this affect "glibc ABI compatibility"? Very little. As long
> > as the sizes of the musl types are no larger than the sizes of the
> > glibc types on the same arch, compatibility with glibc binary code
> > (apps or libs) is not affected. All that is affected if the ABI of
> > third-party libraries that use pthread types as members of public
> > structs, and it only matters if you're calling such libraries using
> > the glibc-derived ABI from code compiled against musl and using the
> > affected structures. This is a very unusual usage case, not something
> > we've ever prioritized supporting (it's broken in several other ways
> > anyway, or at least it was historically), and IMO it's not worth
> > severely bloating new archs that people actually want to use.
> 
> So to rephrase your arguments for that
> 
>  - For the case I compile my code with the glibc ABI and link it with
>    musl: any struct that has pthread (or C11 thread) components in it
>    will potentially only use a smaller part of that pthread (C11)
>    component. In particular in that case when compiling with the glibc
>    ABI the compiler always generates a consistent offset for the
>    pthread components. Sounds ok.

Yes.

>    But this only works because the glibc ABI doesn't export any
>    interface that has a visible combination of different pthread
>    components. Are we sure about that?

Yes. There are no public structs containing these, and it's unlikely
there ever would be. If so they could contain their own internal
padding to match.

>  - For the case that I compile code with the musl ABI and link it with
>    glibc, this may (and probably will) cause out-of-bounds errors on
>    execution. I would very much prefer that big warnings are already
>    issued when doing such a link, or even better if such a link would
>    fail systematically.

This does not work now anyway, and it's not intended to work.

- On glibc certain symbols like strerror_r map to nonstandard
  functions with different signatures and the standard function has
  some alternate name.

- On 32-bit archs the 32-bit-off_t functions would get used and
  horribly misinterpret their argument lists.

There may be other reasons I'm not thinking of right now too.

>    I hope that there is nobody out there, who would be currently using
>    this model, perhaps unknowingly.

If so it's already broken, so breaking quicker and more spectacularly
would be nice. :-)

Rich


^ permalink raw reply	[relevance 5%]

* Re: why is there no __MUSL__ macro?
  @ 2014-09-12 15:37  5%     ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2014-09-12 15:37 UTC (permalink / raw)
  To: Jörg Krause; +Cc: musl

On Fri, Sep 12, 2014 at 09:35:22AM +0200, Jörg Krause wrote:
> 
> On 09/11/2014 04:47 PM, Natanael Copa wrote:
> >On Thu, 11 Sep 2014 13:00:09 +0200
> >Jörg Krause <jkrause@posteo.de> wrote:
> >
> >>Hi,
> >>
> >>I am trying to add support for the musl toolchain to FFmpeg.
> >>
> >>FFmpeg needs support for library features defined in POSIX.1-2001 with
> >>XSI extension and the standards below. Currently configure probes the
> >>host and target libc by checking for defined macros like __GLIBC__ and
> >>__UCLIBC__. In case of glibc and uclibc it sets -D_XOPEN_SOURCE=600
> >>properly.
> >>
> >>After this it checks for some combinations of hardware and the probed
> >>libc to set some more compile options, if necessary.
> >>
> >>I know that musl does not have a macro __MUSL__ and I have read the
> >>explanation. However, I don't understand what's meant by "[..] it's a
> >>bug to assume a certain implementation has particular properties rather
> >>than testing." and how does it affect the way FFmpeg probes for the libc.
> >>
> >>What could be a solution which supports musl?
> >>
> >>Many thanks!
> >>Jörg
> >This is what we do on alpine linux:
> >http://git.alpinelinux.org/cgit/aports/tree/main/ffmpeg/fix-defines.patch
> >
> >--- ffmpeg-1.2.2.orig/libavutil/error.c
> >+++ ffmpeg-1.2.2/libavutil/error.c
> >@@ -17,6 +17,7 @@
> >   */
> >  #undef _GNU_SOURCE
> >+#define _XOPEN_SOURCE 600
> >  #include "avutil.h"
> >  #include "avstring.h"
> >  #include "common.h"
> >
> 
> Hi Natanal,
> 
> I had a look to alpine already. I submitted this patch to FFmpeg,
> but building FFmpeg with my configuration libavutils/error.c is not
> the only file which needs a feature test macro. The people of FFmpeg
> did not like the idea to have a lot of test macros in there source
> so I stopped with this solution and looked for a way to adopt the
> musl toolchain to their configure file.

It might work to add -D_DEFAULT_SOURCE (note: not available until
recent musl git) or -D_BSD_SOURCE to the global CFLAGS.

What's happening, I think, is that because -std=c99 or similar is in
the CFLAGS, default feature profile is getting suppressed, and
_GNU_SOURCE is the only thing bringing back the usual features (in
addition to lots of _GNU_SOURCE-only stuff, and strerror_r breakage).
Having at least one more feature test macro defined globally would
prevent this.

Note also that modern glibc supports _DEFAULT_SOURCE, with the same
semantics as musl: keeping the default stuff exposed even when a
-std=* option would otherwise suppress it.

Rich


^ permalink raw reply	[relevance 5%]

* Re: why is there no __MUSL__ macro?
  2014-09-11 13:33  5%         ` Jörg Krause
@ 2014-09-11 14:48  0%           ` Szabolcs Nagy
  0 siblings, 0 replies; 73+ results
From: Szabolcs Nagy @ 2014-09-11 14:48 UTC (permalink / raw)
  To: musl

* J?rg Krause <jkrause@posteo.de> [2014-09-11 15:33:16 +0200]:
> eg, in FFmpeg/libavutils uses strerror_r which is implemented as a
> XSI-compliant and a GNU-specific version. If I want to be sure to get the
> XSI-compliant version, I unset _GNU_SOURCE and set _XOPEN_SOURCE=600. So I
> do not need any further testing here, right?

yes, using feature test macros should work
(unless you want to support some very old version of the libc)


^ permalink raw reply	[relevance 0%]

* Re: why is there no __MUSL__ macro?
  @ 2014-09-11 13:33  5%         ` Jörg Krause
  2014-09-11 14:48  0%           ` Szabolcs Nagy
  0 siblings, 1 reply; 73+ results
From: Jörg Krause @ 2014-09-11 13:33 UTC (permalink / raw)
  To: musl


On 09/11/2014 02:38 PM, Szabolcs Nagy wrote:
> * J?rg Krause <jkrause@posteo.de> [2014-09-11 14:02:59 +0200]:
>> On 09/11/2014 01:17 PM, Szabolcs Nagy wrote:
>>> then _testing_ for conformance issues is the second try
>>> if the default fails
>> What do you mean with testing for concormance?
> eg glibc scanf uses "%a" for its own extension by default
> and c99 behaviour is only provided with appropriate cflags
>
> if your project depends on %a scanf then you may need to
> test for this conformance issue (instead of ifdef __GLIBC__
> because they may change the behaviour later or the cflag
> might not work on an older version etc)

I see. But I can avoid the GNU specific bevahiour by undefining 
_GNU_SOURCE if I want POSIX-conformance. In this case I do not need to 
test, but can rely on the libc of being conformal. Do I have this right?

eg, in FFmpeg/libavutils uses strerror_r which is implemented as a 
XSI-compliant and a GNU-specific version. If I want to be sure to get 
the XSI-compliant version, I unset _GNU_SOURCE and set 
_XOPEN_SOURCE=600. So I do not need any further testing here, right?


^ permalink raw reply	[relevance 5%]

* Re: build with clang-3.4 warnings report
  @ 2014-04-06 16:49  5%                   ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2014-04-06 16:49 UTC (permalink / raw)
  To: musl

On Sun, Apr 06, 2014 at 06:37:19PM +0200, Jens Gustedt wrote:
> Am Samstag, den 05.04.2014, 21:57 -0400 schrieb Rich Felker:
> > As usual you're the master of preprocessor tricks. Overall I like it,
> > but it's still not as efficient as what we have now.
> 
> If space efficiency is really as important, you could be thinking of
> compressing all that strings, there is a lot of redundancy in the
> text.

*sigh* This was all discussed in the last bikeshed.

Compressing it just moves all the size from shared text to non-shared
data, not to mention adding the code size of a decompressor. And you
can't just decompress one string at a time in a small buffer because
the contract of musl's strerror is that the returned string is
immutable/permanently valid. This is necessary to make implementing
printf, strerror_r, etc. in terms of strerror possible, which in turn
is needed to make them efficient (otherwise you need a horrible retry
loop dynamically allocating larger buffer space, etc.)

The question is not whether space efficiency is really important, but
whether there's a justification for enlarging a function when the
increase in size has no practical benefits. And I think a majority of
our users would say the answer is no.

I agree that your version is mildly more elegant, and if I'd thought
of it first that's probably what I would have used from the beginning,
but I can't see explaining to users a size increase for the sake of
mild elegance.

Rich


^ permalink raw reply	[relevance 5%]

* Re: dlopen'ing glibc linked libraries
  @ 2014-01-21 16:28  6%     ` John Spencer
  0 siblings, 0 replies; 73+ results
From: John Spencer @ 2014-01-21 16:28 UTC (permalink / raw)
  To: musl

Gabriel Jacobo wrote:
>> that's not quite true, sabotage linux builds mesa fine (with 2 minor
>> patches).
>> recipe:
>> https://github.com/sabotage-linux/sabotage/blob/master/pkg/mesalib#L19
>> patches:
>> https://github.com/sabotage-linux/sabotage/blob/master/
>> KEEP/mesalib-fpclassify.patch
>> https://github.com/sabotage-linux/sabotage/blob/master/
>> KEEP/mesalib-strtod.patch
>> https://github.com/sabotage-linux/sabotage/blob/master/
>> KEEP/mesalib-strtof.patch
>>
>>  nothing actually works with the SDL/musl binary.
>> basically what you should try to do is build all dependencies against musl.
>>
>>  So, will it ever work?
>> even if it would work, mixing glibc and musl linked things is far from
>> optimal.
>>
>>
> Thanks for the response. Let me express again that my experiment assumes
> there's binaries that you just can't rebuild against musl (nVidia binaries
> for example) or that's not practical to do so (like every binary provided
> by Ubuntu ;) ), and that's the fringe case that interests me the most right
> now.

OK, but in that case it's much saner if everything else is compiled 
against musl, and the nvidia binary the only impurity.
more binaries == more crazy glibc apis that could be willingly or 
unwillingy getting pulled in

> I would assume that if you rebuild all libraries against musl (or use SDL
> in a distro that's based on musl such as Sabotage), things would just work.

correct.

> But my question was oriented towards what's the goal for providing "full"
> binary compatibility with glibc.

i dont think we'll ever have 100% compatibility, since there are a lot 
of situations where the interfaces implemented by GLIBC are, to a 
varying degree, non-conformant, so things could fail at runtime:

if software uses crazy glibc extensions in printf format specifiers:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=1d3f7975f920f47e6a8a324f547da2180e64171a
or the pthread stack size issue (SDL bug mentioned earlier).

there's also strerror_r, for which the default symbol uses the broken 
glibc semantics, whereas the POSIX-conformant version is called 
__xpg_strerror_r in glibc (users of strerror_r get redirected there, 
unless they #define _GNU_SOURCE)...
additionally there are some interfaces like qsort_r where different 
implementations exist (the earlier BSD version and the GNU version have 
the argument order swapped), so implementing one of the 2 versions in 
musl could lead to silent breakage when a configure check tests for 
qsort_r, finds and uses it, but assumes different behaviour.

lastly, glibc tends to pull in a lot of implementation-internal __ 
prefixed functions, for example when some macros like _FORTIFY_SOURCE 
are defined.

so in order to be 100% compatible, we'd have to turn musl into a full 
glibc clone, with all of its bugs, bloat, (mis)features, and throw POSIX 
conformance over board.

however we're constantly adding legacy APIs that we see in usage, if 
they're not extremely ugly or intrusive, so the compatibility improves 
with every release.
so it's well possible that the compatibility is good enough for a single 
piece of sw, like nvidia drivers, but not for some other libraries it 
wants to link against. in that case it's safe to hand it musl-linked 
versions of those libraries instead.




^ permalink raw reply	[relevance 6%]

* Re: guard bug for strerror_r
  2013-02-08 17:30 13%   ` Jens Gustedt
  2013-02-08 18:01  6%     ` Isaac Dunham
@ 2013-02-10 23:08  6%     ` Rob Landley
  1 sibling, 0 replies; 73+ results
From: Rob Landley @ 2013-02-10 23:08 UTC (permalink / raw)
  To: musl; +Cc: musl

On 02/08/2013 11:30:00 AM, Jens Gustedt wrote:
> Am Freitag, den 08.02.2013, 17:55 +0100 schrieb Szabolcs Nagy:
> > musl provides the posix api when requested
> >
> > musl provides many gnu specific apis when _GNU_SOURCE is set
> >
> > but when posix and gnu collides it's always the posix api,
> 
> definitively a good strategy, but which reaches its limits, here.

Packages that don't know what their limits are and never say "no" turn  
into hairballs like Mozilla, or OpenOffice, or anything the GNU/Dammit  
crowd has ever done.

> > musl never provides broken gnu apis
> >
> > at least this was the policy so far
> 
> __GNU_SOURCE is defined by the gnu platform to specify the
> availability of their extensions. Unfortunately they don't have a
> finer grained tool to distinguish different types of extensions they
> provide. (BTW the same holds for gcc, that you only can tune with
> version numbers.)
> 
> If I, as a user, define __GNU_SOURCE I expect to have the gnu
> extension, if I then use strerror_r I expect to have their interface,


Sucks to be you then.

Musl is never going to provide 100% of what glibc does. The package you  
want is called "glibc".

> since this is documented like this. At least as it is now, I don't
> think I have any means to distinguish the two platforms and to know
> which version of strerror_r I would receive.

I think everybody is expected to patch their own __MUSL__ macro into  
their local builds. A bit like the way mksquashfs was out of tree  
forever, and union mounts still are, or the way I maintain perl removal  
patches...

Although why you want the libc defined as a compiler builtin when  
that's not even the way glibc does it is beyond me. (#include  
<features.h> is even there on the mac, if I recall. That's something  
musl does have, and what you'd patch a #define __MUSL__ into.)

Rob

^ permalink raw reply	[relevance 6%]

* Re: guard bug for strerror_r
  2013-02-08 20:31  5%             ` Jens Gustedt
@ 2013-02-08 20:38 11%               ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2013-02-08 20:38 UTC (permalink / raw)
  To: musl

On Fri, Feb 08, 2013 at 09:31:11PM +0100, Jens Gustedt wrote:
> And, also I think that even before the _r version would have been a
> good thing. I think the _r stands for reentrant, and for a function
> that you would typically like to use in error or signal handlers, this
> is a nice feature.

Yes, but unfortunately the _r's and use of the word "reentrant" in
issue 6 and earlier were all wrong; they used it to mean thread-safe,
not reentrant. None of the _r functions are required to be reentrant.
The term POSIX uses for reenatrant is "async-signal-safe", and
strerror_r is not async-signal-safe. This is not just a theoretical
limitation; in practice, most implementations probably fail to be
reentrant due to use of a mutex protecting access to the current
locale data.

If/when musl adds any locale state that would need synchronization, I
think our strerror should still be async-signal-safe, either using
musl's recursive mutex (which is also a reentrant mutex) or lock-free
atomic logic.

Rich


^ permalink raw reply	[relevance 11%]

* Re: guard bug for strerror_r
  2013-02-08 20:01 12%           ` Rich Felker
@ 2013-02-08 20:31  5%             ` Jens Gustedt
  2013-02-08 20:38 11%               ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Jens Gustedt @ 2013-02-08 20:31 UTC (permalink / raw)
  To: musl

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

Am Freitag, den 08.02.2013, 15:01 -0500 schrieb Rich Felker:
> It's part of the "xlocale" set of interfaces that seem to have
> originated with glibc or maybe Sun, and later made it into POSIX 2008.
> It allows you to pass a locale_t argument to get the results in a
> non-default locale, but you can instead just request the current
> locale.

really bizarre that they didn't estimate it necessary to document it

> > And I actually use this in P99 to provide the C11 Annex K interface
> > strerror_s, which is much closer to strerror_r than strerror_l. Well,
> > we now have
> 
> Are you sure this is the best interface to provide to applications?

the best I don't know, but it is now a standard and provides
runtime-constraint handlers, and basic function parameter checking,
which are nice features. (Just forget about the official title "Bounds
checking interfaces".)

> I'd instead provide a thread-safe interface with an interface
> identical to strerror, since that's by far the easiest to use.
> 
> If on the other hand you want to provide Annex K in principle,

I do

> that's
> another matter, but there's a fairly large portion of it that can't be
> provided portably on top of an existing libc (mainly the scanf or
> printf stuff, I think).

yes, these don't work and since P99 isn't a library but only wrappers
I can't provide that. But for the most of it the wrappers are quite
simple and provided by P99.

> > strerror    C, POSIX
> > strerror_r  POSIX
> > strerror_l  POSIX
> > strerror_s  C
> > 
> > superbe. Again a case where a liaison between the C committee and the
> > POSIX could have helped.
> 
> The problem seems to be just that C didn't have threads (and thus no
> need for strerror_r or strerror_l) until C11.

But now they have threads, and so at the same moment of introducing
them they could have equipped them with a semantic (POSIX comes into
mind :) and used other interfaces from POSIX that already exist.

And, also I think that even before the _r version would have been a
good thing. I think the _r stands for reentrant, and for a function
that you would typically like to use in error or signal handlers, this
is a nice feature.

Jens

-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 5%]

* Re: guard bug for strerror_r
  2013-02-08 19:53 13%         ` Jens Gustedt
@ 2013-02-08 20:01 12%           ` Rich Felker
  2013-02-08 20:31  5%             ` Jens Gustedt
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2013-02-08 20:01 UTC (permalink / raw)
  To: musl

On Fri, Feb 08, 2013 at 08:53:51PM +0100, Jens Gustedt wrote:
> Hello
> 
> Am Freitag, den 08.02.2013, 13:59 -0500 schrieb Rich Felker:
> > > #if defined(__GLIBC__) && defined(__USE_GNU)
> 
> the __GLIBC__ thing seems to work for my case, now. strerror_r seems
> to be the only interface where they use the same name with a different
> interface, so I'll bug something around that.

Yes, that and basename are the only interfaces I'm aware of with
incompatible GNU versions. I actually opened a related bug tracker
issue:

http://sourceware.org/bugzilla/show_bug.cgi?id=15124

> > I would simply avoid _ever_ using strerror_r on GNU systems. On any
> > modern GNU or POSIX 2008 conforming system, you have the vastly
> > superior strerror_l function. It does not require you to provide a
> > buffer, and it's thread-safe (the buffer returned is either immutable
> > static or thread-local). The logic I'd recommend is:
> > 
> > #if _POSIX_VERSION >= 200809L || defined(__GLIBC__)
> > /* use strerror_l */
> > #else
> > /* use strerror_r and assume POSIX version of it */
> > #endif
> 
> Hm, I have a relatively recent system (ubuntu) and there is no trace
> of strerror_l in the documentation, even in their "POSIX" man page.

It's part of the "xlocale" set of interfaces that seem to have
originated with glibc or maybe Sun, and later made it into POSIX 2008.
It allows you to pass a locale_t argument to get the results in a
non-default locale, but you can instead just request the current
locale.

Honestly I don't know why POSIX didn't just require strerror itself to
be thread-safe, but at the time it was probably an "unacceptable
burden" to at least one implementation and then the issue was never
revisited because strerror_r already existed.

> And I actually use this in P99 to provide the C11 Annex K interface
> strerror_s, which is much closer to strerror_r than strerror_l. Well,
> we now have

Are you sure this is the best interface to provide to applications?
I'd instead provide a thread-safe interface with an interface
identical to strerror, since that's by far the easiest to use.

If on the other hand you want to provide Annex K in principle, that's
another matter, but there's a fairly large portion of it that can't be
provided portably on top of an existing libc (mainly the scanf or
printf stuff, I think).

> strerror    C, POSIX
> strerror_r  POSIX
> strerror_l  POSIX
> strerror_s  C
> 
> superbe. Again a case where a liaison between the C committee and the
> POSIX could have helped.

The problem seems to be just that C didn't have threads (and thus no
need for strerror_r or strerror_l) until C11.

Rich


^ permalink raw reply	[relevance 12%]

* Re: guard bug for strerror_r
  2013-02-08 18:59 13%       ` Rich Felker
@ 2013-02-08 19:53 13%         ` Jens Gustedt
  2013-02-08 20:01 12%           ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Jens Gustedt @ 2013-02-08 19:53 UTC (permalink / raw)
  To: musl

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

Hello

Am Freitag, den 08.02.2013, 13:59 -0500 schrieb Rich Felker:
> > #if defined(__GLIBC__) && defined(__USE_GNU)

the __GLIBC__ thing seems to work for my case, now. strerror_r seems
to be the only interface where they use the same name with a different
interface, so I'll bug something around that.

> I would simply avoid _ever_ using strerror_r on GNU systems. On any
> modern GNU or POSIX 2008 conforming system, you have the vastly
> superior strerror_l function. It does not require you to provide a
> buffer, and it's thread-safe (the buffer returned is either immutable
> static or thread-local). The logic I'd recommend is:
> 
> #if _POSIX_VERSION >= 200809L || defined(__GLIBC__)
> /* use strerror_l */
> #else
> /* use strerror_r and assume POSIX version of it */
> #endif

Hm, I have a relatively recent system (ubuntu) and there is no trace
of strerror_l in the documentation, even in their "POSIX" man page.

And I actually use this in P99 to provide the C11 Annex K interface
strerror_s, which is much closer to strerror_r than strerror_l. Well,
we now have

strerror    C, POSIX
strerror_r  POSIX
strerror_l  POSIX
strerror_s  C

superbe. Again a case where a liaison between the C committee and the
POSIX could have helped.

Jens


-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 13%]

* Re: guard bug for strerror_r
  2013-02-08 18:01  6%     ` Isaac Dunham
@ 2013-02-08 18:59 13%       ` Rich Felker
  2013-02-08 19:53 13%         ` Jens Gustedt
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2013-02-08 18:59 UTC (permalink / raw)
  To: musl

On Fri, Feb 08, 2013 at 10:01:25AM -0800, Isaac Dunham wrote:
> On Fri, 08 Feb 2013 18:30:00 +0100
> Jens Gustedt <jens.gustedt@inria.fr> wrote:
> 
> > 
> > __GNU_SOURCE is defined by the gnu platform to specify the
> > availability of their extensions. Unfortunately they don't have a
> > finer grained tool to distinguish different types of extensions they
> > provide. (BTW the same holds for gcc, that you only can tune with
> > version numbers.)
> > 
> > If I, as a user, define __GNU_SOURCE I expect to have the gnu
> > extension, if I then use strerror_r I expect to have their interface,
> > since this is documented like this. At least as it is now, I don't
> > think I have any means to distinguish the two platforms and to know
> > which version of strerror_r I would receive.
> 
> #ifdef __linux
> #include <features.h> /* this is partly for this purpose */

Use <stdlib.h> or similar -- it will include <features.h>, but it's
standard, so it won't break on systems that don't have it.

> /*including <unistd.h> would also work, and is more universal
> * it's actually necessary with dietlibc, IIRC */
> #if defined(__GLIBC__) && defined(__USE_GNU)
> ...

I would simply avoid _ever_ using strerror_r on GNU systems. On any
modern GNU or POSIX 2008 conforming system, you have the vastly
superior strerror_l function. It does not require you to provide a
buffer, and it's thread-safe (the buffer returned is either immutable
static or thread-local). The logic I'd recommend is:

#if _POSIX_VERSION >= 200809L || defined(__GLIBC__)
/* use strerror_l */
#else
/* use strerror_r and assume POSIX version of it */
#endif

Rich


^ permalink raw reply	[relevance 13%]

* Re: musl detection by preprocessor
  2013-02-08 16:51  0%   ` Jens Gustedt
  2013-02-08 17:07  5%     ` Szabolcs Nagy
@ 2013-02-08 18:55  0%     ` Rich Felker
  1 sibling, 0 replies; 73+ results
From: Rich Felker @ 2013-02-08 18:55 UTC (permalink / raw)
  To: musl

On Fri, Feb 08, 2013 at 05:51:41PM +0100, Jens Gustedt wrote:
> Am Freitag, den 08.02.2013, 17:41 +0100 schrieb Szabolcs Nagy:
> > * Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:28:07 +0100]:
> > > In short I have some problem where they (the gnus) deviate from
> > > standard interfaces, here this was triggered by their different
> > > iterface for strerror_r. Now the musl compiler wrapper doesn't allow
> > > to distinguish a linux system with glibc or with musl (or at least I
> > > didn'find one).
> > > 
> > > Inspecting the wrapper, it looks quite easy to add something like
> > > 
> > > -D__MUSL__=000909UL

This kind of macro intentionally isn't provided, because its presence
would result in the vast majority of projects treating bug reports of
the form "your program does not compile against musl" with a quick
hack adding "#ifdef __MUSL__ ... [omit feature or substitute in
fallback definition] ... #endif". In a best case, this would harm
functionality by leaving the feature out even in later musl versions
that support it; in reality, it's likely to actively break build (e.g.
with conflicting declarations/macros/etc.) if the feature is added to
musl.

My position, and the position of most people involved with the
project, is that applications should test for features (e.g. with a
configure script or standardized per-feature macros defined in
headers) rather than hard-coding assumptions about which version of an
OS/library has which features. (Note that, in the OS case, screwing
this up has broken packages that assumed Linux version X lacks
behavior Y, when a particular distribution backported behavior Y to
version X.)

> > > 
> > 
> > can you use #ifdef __GLIBC__ ?
> 
> Hm, I don't think that this comes timely enough. Where would this be
> defined, probably in some header file that I'd include, no?

Any of the standard headers in glibc include <sys/cdefs.h> and
<features.h>. Including these yourself is not portable, but if you
just include <stddef.h> or something else ultra-light, you should be
able to get glibc-identifying macros (__GLIBC__).

As soon as you determine it's safe to include <unistd.h>, I think it
would be a good idea to include that too. That's where you get
_POSIX_VERSION and similar standards-defined macros, which can tell
you a lot about what features the system promises to provide.

> I'd like to distinguish the platform as early as possible, ideally
> *before* I include any files, such that I can base decisions on which
> files to include only on #defines that the pure compiler provides.

I'm not sure how you can determine with just the standard macros that
you're on a POSIX or POSIX-like system where you have unistd.h...

Rich


^ permalink raw reply	[relevance 0%]

* Re: guard bug for strerror_r
  2013-02-08 17:30 13%   ` Jens Gustedt
@ 2013-02-08 18:01  6%     ` Isaac Dunham
  2013-02-08 18:59 13%       ` Rich Felker
  2013-02-10 23:08  6%     ` Rob Landley
  1 sibling, 1 reply; 73+ results
From: Isaac Dunham @ 2013-02-08 18:01 UTC (permalink / raw)
  To: musl

On Fri, 08 Feb 2013 18:30:00 +0100
Jens Gustedt <jens.gustedt@inria.fr> wrote:

> 
> __GNU_SOURCE is defined by the gnu platform to specify the
> availability of their extensions. Unfortunately they don't have a
> finer grained tool to distinguish different types of extensions they
> provide. (BTW the same holds for gcc, that you only can tune with
> version numbers.)
> 
> If I, as a user, define __GNU_SOURCE I expect to have the gnu
> extension, if I then use strerror_r I expect to have their interface,
> since this is documented like this. At least as it is now, I don't
> think I have any means to distinguish the two platforms and to know
> which version of strerror_r I would receive.

#ifdef __linux
#include <features.h> /* this is partly for this purpose */
/*including <unistd.h> would also work, and is more universal
* it's actually necessary with dietlibc, IIRC */
#if defined(__GLIBC__) && defined(__USE_GNU)
..

-- 
Isaac Dunham <idunham@lavabit.com>



^ permalink raw reply	[relevance 6%]

* Re: guard bug for strerror_r
  2013-02-08 16:55  6% ` Szabolcs Nagy
@ 2013-02-08 17:30 13%   ` Jens Gustedt
  2013-02-08 18:01  6%     ` Isaac Dunham
  2013-02-10 23:08  6%     ` Rob Landley
  0 siblings, 2 replies; 73+ results
From: Jens Gustedt @ 2013-02-08 17:30 UTC (permalink / raw)
  To: musl

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

Am Freitag, den 08.02.2013, 17:55 +0100 schrieb Szabolcs Nagy:
> musl provides the posix api when requested
> 
> musl provides many gnu specific apis when _GNU_SOURCE is set
> 
> but when posix and gnu collides it's always the posix api,

definitively a good strategy, but which reaches its limits, here.

> musl never provides broken gnu apis
> 
> at least this was the policy so far

__GNU_SOURCE is defined by the gnu platform to specify the
availability of their extensions. Unfortunately they don't have a
finer grained tool to distinguish different types of extensions they
provide. (BTW the same holds for gcc, that you only can tune with
version numbers.)

If I, as a user, define __GNU_SOURCE I expect to have the gnu
extension, if I then use strerror_r I expect to have their interface,
since this is documented like this. At least as it is now, I don't
think I have any means to distinguish the two platforms and to know
which version of strerror_r I would receive.

Jens

-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 13%]

* Re: musl detection by preprocessor
  2013-02-08 16:51  0%   ` Jens Gustedt
@ 2013-02-08 17:07  5%     ` Szabolcs Nagy
  2013-02-08 18:55  0%     ` Rich Felker
  1 sibling, 0 replies; 73+ results
From: Szabolcs Nagy @ 2013-02-08 17:07 UTC (permalink / raw)
  To: musl

* Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:51:41 +0100]:

> Am Freitag, den 08.02.2013, 17:41 +0100 schrieb Szabolcs Nagy:
> > * Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:28:07 +0100]:
> > > In short I have some problem where they (the gnus) deviate from
> > > standard interfaces, here this was triggered by their different
> > > iterface for strerror_r. Now the musl compiler wrapper doesn't allow
> > > to distinguish a linux system with glibc or with musl (or at least I
> > > didn'find one).
> > > 
> > > Inspecting the wrapper, it looks quite easy to add something like
> > > 
> > > -D__MUSL__=000909UL
> > > 
> > 
> > can you use #ifdef __GLIBC__ ?
> 
> Hm, I don't think that this comes timely enough. Where would this be
> defined, probably in some header file that I'd include, no?
> 
> I'd like to distinguish the platform as early as possible, ideally
> *before* I include any files, such that I can base decisions on which
> files to include only on #defines that the pure compiler provides.
> 

ok now i understand what you want

i think you should use featuretest macros
to get a subset of the interfaces
(eg specify -D_BSD_SOURCE for all bsd things
or -D_POSIX_C_SOURCE=200809L for posix etc)

you can check the default setting in
include/features.h

strerror_r may be bad to provide under _GNU_SOURCE
but by that logic we should not provide ptrintf
under _GNU_SOURCE either as the gnu printf is
non-conformant but musl's printf is


^ permalink raw reply	[relevance 5%]

* Re: guard bug for strerror_r
  2013-02-08 16:48 13% guard bug for strerror_r Jens Gustedt
@ 2013-02-08 16:55  6% ` Szabolcs Nagy
  2013-02-08 17:30 13%   ` Jens Gustedt
  0 siblings, 1 reply; 73+ results
From: Szabolcs Nagy @ 2013-02-08 16:55 UTC (permalink / raw)
  To: musl

* Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:48:18 +0100]:
> The linux man page says
> 
>        The XSI-compliant version of strerror_r() is provided if:
>        (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
>        Otherwise, the GNU-specific version is provided.
> 
> but the musl code has
> 
> #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
>  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
>  || defined(_BSD_SOURCE)
> ...
> int strerror_r (int, char *, size_t);
> ...
> #endif
> 
> So if __GNU_SOURCE is set, glibc chooses their own interface and
> musl choose the POSIX interface.
> 
> Why is musl touching __GNU_SOURCE at all?
> 

musl provides the posix api when requested

musl provides many gnu specific apis when _GNU_SOURCE is set

but when posix and gnu collides it's always the posix api,
musl never provides broken gnu apis

at least this was the policy so far


^ permalink raw reply	[relevance 6%]

* Re: musl detection by preprocessor
  2013-02-08 16:41  0% ` Szabolcs Nagy
@ 2013-02-08 16:51  0%   ` Jens Gustedt
  2013-02-08 17:07  5%     ` Szabolcs Nagy
  2013-02-08 18:55  0%     ` Rich Felker
  0 siblings, 2 replies; 73+ results
From: Jens Gustedt @ 2013-02-08 16:51 UTC (permalink / raw)
  To: musl

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

Am Freitag, den 08.02.2013, 17:41 +0100 schrieb Szabolcs Nagy:
> * Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:28:07 +0100]:
> > In short I have some problem where they (the gnus) deviate from
> > standard interfaces, here this was triggered by their different
> > iterface for strerror_r. Now the musl compiler wrapper doesn't allow
> > to distinguish a linux system with glibc or with musl (or at least I
> > didn'find one).
> > 
> > Inspecting the wrapper, it looks quite easy to add something like
> > 
> > -D__MUSL__=000909UL
> > 
> 
> can you use #ifdef __GLIBC__ ?

Hm, I don't think that this comes timely enough. Where would this be
defined, probably in some header file that I'd include, no?

I'd like to distinguish the platform as early as possible, ideally
*before* I include any files, such that I can base decisions on which
files to include only on #defines that the pure compiler provides.

Jens

-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 0%]

* guard bug for strerror_r
@ 2013-02-08 16:48 13% Jens Gustedt
  2013-02-08 16:55  6% ` Szabolcs Nagy
  0 siblings, 1 reply; 73+ results
From: Jens Gustedt @ 2013-02-08 16:48 UTC (permalink / raw)
  To: musl

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

hi,
me again.

Digging a bit deeper in strerror_r I think the #if condition that
triggers the declaration of the POSIX version is wrong. 

The linux man page says

       The XSI-compliant version of strerror_r() is provided if:
       (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
       Otherwise, the GNU-specific version is provided.

but the musl code has

#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
 || defined(_BSD_SOURCE)
...
int strerror_r (int, char *, size_t);
...
#endif

So if __GNU_SOURCE is set, glibc chooses their own interface and
musl choose the POSIX interface.

Why is musl touching __GNU_SOURCE at all?

Jens


-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 13%]

* Re: musl detection by preprocessor
  2013-02-08 16:28  5% musl detection by preprocessor Jens Gustedt
@ 2013-02-08 16:41  0% ` Szabolcs Nagy
  2013-02-08 16:51  0%   ` Jens Gustedt
  0 siblings, 1 reply; 73+ results
From: Szabolcs Nagy @ 2013-02-08 16:41 UTC (permalink / raw)
  To: musl

* Jens Gustedt <jens.gustedt@inria.fr> [2013-02-08 17:28:07 +0100]:
> In short I have some problem where they (the gnus) deviate from
> standard interfaces, here this was triggered by their different
> iterface for strerror_r. Now the musl compiler wrapper doesn't allow
> to distinguish a linux system with glibc or with musl (or at least I
> didn'find one).
> 
> Inspecting the wrapper, it looks quite easy to add something like
> 
> -D__MUSL__=000909UL
> 

can you use #ifdef __GLIBC__ ?



^ permalink raw reply	[relevance 0%]

* musl detection by preprocessor
@ 2013-02-08 16:28  5% Jens Gustedt
  2013-02-08 16:41  0% ` Szabolcs Nagy
  0 siblings, 1 reply; 73+ results
From: Jens Gustedt @ 2013-02-08 16:28 UTC (permalink / raw)
  To: musl

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

Hi everybody,
I was trying to compile my P99 test cases with musl and ran into
difficulties. Not because it has bugs, but the inverse, because it is
missing bugs that glibc has :)

In short I have some problem where they (the gnus) deviate from
standard interfaces, here this was triggered by their different
iterface for strerror_r. Now the musl compiler wrapper doesn't allow
to distinguish a linux system with glibc or with musl (or at least I
didn'find one).

Inspecting the wrapper, it looks quite easy to add something like

-D__MUSL__=000909UL

to the cpp_options section of musl-gcc.specs.sh

(I wouldn' know how to produce that version number automatically)

What do you think?

Best

Jens

-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[relevance 5%]

* Compiling musl with pcc...
@ 2012-09-24  1:19  1% Isaac Dunham
  0 siblings, 0 replies; 73+ results
From: Isaac Dunham @ 2012-09-24  1:19 UTC (permalink / raw)
  To: pcc-list; +Cc: musl

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

With the new -print-file-name option for pcc, I've managed to get musl's configure to recognize pcc. (See pcc-configure.diff)
But I've run into one other problem: when 
-mtune=generic -march=486
is passed to pcc in the linking stage, it appears that pcc passes some invalid option to ld (I get "Unrecognized option: tune=generic", as shown at the very end of make.pcc).
Should the -m... options be omitted from what pcc passes to ld?

Additionally, if I work around that, I get a segfault when running hello world (via .../lib/libc.so a.out):
(gdb output)
program received signal SIGSEGV, Segmentation fault.
0x755b91d9 in __syscall_cp ()
(gdb) where
#0  0x755b91d9 in __syscall_cp ()
#1  0x7557268a in open64 ()
#2  0x755779ad in __dynlink ()
#3  0x7557858d in _start ()
I'll try rebuilding with -O0 -g3.
(Rich: in case you're wondering, -Bsymbolic-functions is being properly passed)

Thanks,
Isaac Dunham <idunham@lavabit.com>

[-- Attachment #2: make.pcc --]
[-- Type: application/octet-stream, Size: 85450 bytes --]

cp crt/crt1.o lib/crt1.o
cp crt/Scrt1.o lib/Scrt1.o
cp crt/crti.o lib/crti.o
cp crt/crtn.o lib/crtn.o
rm -f lib/libc.a
ar rc lib/libc.a src/aio/aio_cancel.o src/aio/aio_error.o src/aio/aio_fsync.o src/aio/aio_readwrite.o src/aio/aio_return.o src/aio/aio_suspend.o src/aio/lio_listio.o src/complex/__cexp.o src/complex/__cexpf.o src/complex/cabs.o src/complex/cabsf.o src/complex/cabsl.o src/complex/cacos.o src/complex/cacosf.o src/complex/cacosh.o src/complex/cacoshf.o src/complex/cacoshl.o src/complex/cacosl.o src/complex/carg.o src/complex/cargf.o src/complex/cargl.o src/complex/casin.o src/complex/casinf.o src/complex/casinh.o src/complex/casinhf.o src/complex/casinhl.o src/complex/casinl.o src/complex/catan.o src/complex/catanf.o src/complex/catanh.o src/complex/catanhf.o src/complex/catanhl.o src/complex/catanl.o src/complex/ccos.o src/complex/ccosf.o src/complex/ccosh.o src/complex/ccoshf.o src/complex/ccoshl.o src/complex/ccosl.o src/complex/cexp.o src/complex/cexpf.o src/complex/cexpl.o src/complex/cimag.o src/complex/cimagf.o src/complex/cimagl.o src/complex/clog.o src/complex/clogf.o src/complex/clogl.o src/complex/conj.o src/complex/conjf.o src/complex/conjl.o src/complex/cpow.o src/complex/cpowf.o src/complex/cpowl.o src/complex/cproj.o src/complex/cprojf.o src/complex/cprojl.o src/complex/creal.o src/complex/crealf.o src/complex/creall.o src/complex/csin.o src/complex/csinf.o src/complex/csinh.o src/complex/csinhf.o src/complex/csinhl.o src/complex/csinl.o src/complex/csqrt.o src/complex/csqrtf.o src/complex/csqrtl.o src/complex/ctan.o src/complex/ctanf.o src/complex/ctanh.o src/complex/ctanhf.o src/complex/ctanhl.o src/complex/ctanl.o src/conf/confstr.o src/conf/fpathconf.o src/conf/pathconf.o src/conf/sysconf.o src/crypt/crypt.o src/crypt/crypt_blowfish.o src/crypt/crypt_des.o src/crypt/crypt_md5.o src/crypt/crypt_r.o src/crypt/crypt_sha256.o src/crypt/crypt_sha512.o src/ctype/__ctype_b_loc.o src/ctype/__ctype_get_mb_cur_max.o src/ctype/__ctype_tolower_loc.o src/ctype/__ctype_toupper_loc.o src/ctype/isalnum.o src/ctype/isalpha.o src/ctype/isascii.o src/ctype/isblank.o src/ctype/iscntrl.o src/ctype/isdigit.o src/ctype/isgraph.o src/ctype/islower.o src/ctype/isprint.o src/ctype/ispunct.o src/ctype/isspace.o src/ctype/isupper.o src/ctype/iswalnum.o src/ctype/iswalpha.o src/ctype/iswblank.o src/ctype/iswcntrl.o src/ctype/iswctype.o src/ctype/iswdigit.o src/ctype/iswgraph.o src/ctype/iswlower.o src/ctype/iswprint.o src/ctype/iswpunct.o src/ctype/iswspace.o src/ctype/iswupper.o src/ctype/iswxdigit.o src/ctype/isxdigit.o src/ctype/toascii.o src/ctype/tolower.o src/ctype/toupper.o src/ctype/towctrans.o src/ctype/wcswidth.o src/ctype/wctrans.o src/ctype/wcwidth.o src/dirent/__getdents.o src/dirent/alphasort.o src/dirent/closedir.o src/dirent/dirfd.o src/dirent/fdopendir.o src/dirent/opendir.o src/dirent/readdir.o src/dirent/readdir_r.o src/dirent/rewinddir.o src/dirent/scandir.o src/dirent/seekdir.o src/dirent/telldir.o src/dirent/versionsort.o src/env/__environ.o src/env/__init_security.o src/env/__libc_csu_fini.o src/env/__libc_csu_init.o src/env/__libc_start_main.o src/env/__stack_chk_fail.o src/env/clearenv.o src/env/getenv.o src/env/putenv.o src/env/setenv.o src/env/unsetenv.o src/errno/__errno_location.o src/errno/strerror.o src/exit/_Exit.o src/exit/abort.o src/exit/assert.o src/exit/at_quick_exit.o src/exit/atexit.o src/exit/exit.o src/exit/quick_exit.o src/fcntl/creat.o src/fcntl/fcntl.o src/fcntl/open.o src/fcntl/openat.o src/fcntl/posix_fadvise.o src/fcntl/posix_fallocate.o src/fenv/fegetexceptflag.o src/fenv/feholdexcept.o src/fenv/fenv.o src/fenv/fesetexceptflag.o src/fenv/feupdateenv.o src/internal/floatscan.o src/internal/intscan.o src/internal/libc.o src/internal/shgetc.o src/internal/syscall.o src/internal/syscall_ret.o src/ipc/ftok.o src/ipc/msgctl.o src/ipc/msgget.o src/ipc/msgrcv.o src/ipc/msgsnd.o src/ipc/semctl.o src/ipc/semget.o src/ipc/semop.o src/ipc/shmat.o src/ipc/shmctl.o src/ipc/shmdt.o src/ipc/shmget.o src/ldso/dladdr.o src/ldso/dlsym.o src/ldso/dynlink.o src/ldso/start.o src/legacy/cuserid.o src/legacy/daemon.o src/legacy/err.o src/legacy/ftw.o src/legacy/futimes.o src/legacy/getdtablesize.o src/legacy/getpagesize.o src/legacy/getpass.o src/legacy/getusershell.o src/legacy/isastream.o src/legacy/lutimes.o src/legacy/ulimit.o src/legacy/utmpx.o src/linux/accept4.o src/linux/adjtime.o src/linux/adjtimex.o src/linux/brk.o src/linux/cap.o src/linux/chroot.o src/linux/clock_adjtime.o src/linux/dup3.o src/linux/epoll.o src/linux/eventfd.o src/linux/fallocate.o src/linux/flock.o src/linux/inotify.o src/linux/ioperm.o src/linux/iopl.o src/linux/klogctl.o src/linux/module.o src/linux/mount.o src/linux/pipe2.o src/linux/pivot_root.o src/linux/ppoll.o src/linux/prctl.o src/linux/prlimit.o src/linux/process_vm.o src/linux/ptrace.o src/linux/readahead.o src/linux/reboot.o src/linux/remap_file_pages.o src/linux/sbrk.o src/linux/sendfile.o src/linux/setfsgid.o src/linux/setfsuid.o src/linux/setgroups.o src/linux/sethostname.o src/linux/setns.o src/linux/settimeofday.o src/linux/signalfd.o src/linux/splice.o src/linux/stime.o src/linux/swap.o src/linux/sync_file_range.o src/linux/syncfs.o src/linux/sysinfo.o src/linux/tee.o src/linux/timerfd.o src/linux/unshare.o src/linux/utimes.o src/linux/vhangup.o src/linux/vmsplice.o src/linux/wait3.o src/linux/wait4.o src/linux/xattr.o src/locale/catclose.o src/locale/catgets.o src/locale/catopen.o src/locale/duplocale.o src/locale/freelocale.o src/locale/iconv.o src/locale/intl.o src/locale/isalnum_l.o src/locale/isalpha_l.o src/locale/isblank_l.o src/locale/iscntrl_l.o src/locale/isdigit_l.o src/locale/isgraph_l.o src/locale/islower_l.o src/locale/isprint_l.o src/locale/ispunct_l.o src/locale/isspace_l.o src/locale/isupper_l.o src/locale/iswalnum_l.o src/locale/iswalpha_l.o src/locale/iswblank_l.o src/locale/iswcntrl_l.o src/locale/iswctype_l.o src/locale/iswdigit_l.o src/locale/iswgraph_l.o src/locale/iswlower_l.o src/locale/iswprint_l.o src/locale/iswpunct_l.o src/locale/iswspace_l.o src/locale/iswupper_l.o src/locale/iswxdigit_l.o src/locale/isxdigit_l.o src/locale/langinfo.o src/locale/localeconv.o src/locale/newlocale.o src/locale/nl_langinfo_l.o src/locale/setlocale.o src/locale/strcasecmp_l.o src/locale/strcoll.o src/locale/strcoll_l.o src/locale/strerror_l.o src/locale/strfmon.o src/locale/strftime_l.o src/locale/strncasecmp_l.o src/locale/strxfrm.o src/locale/strxfrm_l.o src/locale/tolower_l.o src/locale/toupper_l.o src/locale/towctrans_l.o src/locale/towlower_l.o src/locale/towupper_l.o src/locale/uselocale.o src/locale/wcscoll.o src/locale/wcscoll_l.o src/locale/wcsxfrm.o src/locale/wcsxfrm_l.o src/locale/wctrans_l.o src/locale/wctype_l.o src/malloc/__brk.o src/malloc/aligned_alloc.o src/malloc/calloc.o src/malloc/lite_malloc.o src/malloc/malloc.o src/malloc/memalign.o src/malloc/posix_memalign.o src/math/__cos.o src/math/__cosdf.o src/math/__cosl.o src/math/__expo2.o src/math/__expo2f.o src/math/__fpclassify.o src/math/__fpclassifyf.o src/math/__fpclassifyl.o src/math/__invtrigl.o src/math/__polevll.o src/math/__rem_pio2.o src/math/__rem_pio2_large.o src/math/__rem_pio2f.o src/math/__rem_pio2l.o src/math/__signbit.o src/math/__signbitf.o src/math/__signbitl.o src/math/__sin.o src/math/__sindf.o src/math/__sinl.o src/math/__tan.o src/math/__tandf.o src/math/__tanl.o src/math/acos.o src/math/acosf.o src/math/acosh.o src/math/acoshf.o src/math/acoshl.o src/math/acosl.o src/math/asin.o src/math/asinf.o src/math/asinh.o src/math/asinhf.o src/math/asinhl.o src/math/asinl.o src/math/atan.o src/math/atan2.o src/math/atan2f.o src/math/atan2l.o src/math/atanf.o src/math/atanh.o src/math/atanhf.o src/math/atanhl.o src/math/atanl.o src/math/cbrt.o src/math/cbrtf.o src/math/cbrtl.o src/math/ceil.o src/math/ceilf.o src/math/ceill.o src/math/copysign.o src/math/copysignf.o src/math/copysignl.o src/math/cos.o src/math/cosf.o src/math/cosh.o src/math/coshf.o src/math/coshl.o src/math/cosl.o src/math/erf.o src/math/erff.o src/math/erfl.o src/math/exp.o src/math/exp10.o src/math/exp10f.o src/math/exp10l.o src/math/exp2.o src/math/exp2f.o src/math/exp2l.o src/math/expf.o src/math/expl.o src/math/expm1.o src/math/expm1f.o src/math/expm1l.o src/math/fabs.o src/math/fabsf.o src/math/fabsl.o src/math/fdim.o src/math/fdimf.o src/math/fdiml.o src/math/floor.o src/math/floorf.o src/math/floorl.o src/math/fma.o src/math/fmaf.o src/math/fmal.o src/math/fmax.o src/math/fmaxf.o src/math/fmaxl.o src/math/fmin.o src/math/fminf.o src/math/fminl.o src/math/fmod.o src/math/fmodf.o src/math/fmodl.o src/math/frexp.o src/math/frexpf.o src/math/frexpl.o src/math/hypot.o src/math/hypotf.o src/math/hypotl.o src/math/ilogb.o src/math/ilogbf.o src/math/ilogbl.o src/math/j0.o src/math/j0f.o src/math/j1.o src/math/j1f.o src/math/jn.o src/math/jnf.o src/math/ldexp.o src/math/ldexpf.o src/math/ldexpl.o src/math/lgamma.o src/math/lgamma_r.o src/math/lgammaf.o src/math/lgammaf_r.o src/math/lgammal.o src/math/llrint.o src/math/llrintf.o src/math/llrintl.o src/math/llround.o src/math/llroundf.o src/math/llroundl.o src/math/log.o src/math/log10.o src/math/log10f.o src/math/log10l.o src/math/log1p.o src/math/log1pf.o src/math/log1pl.o src/math/log2.o src/math/log2f.o src/math/log2l.o src/math/logb.o src/math/logbf.o src/math/logbl.o src/math/logf.o src/math/logl.o src/math/lrint.o src/math/lrintf.o src/math/lrintl.o src/math/lround.o src/math/lroundf.o src/math/lroundl.o src/math/modf.o src/math/modff.o src/math/modfl.o src/math/nan.o src/math/nanf.o src/math/nanl.o src/math/nearbyint.o src/math/nearbyintf.o src/math/nearbyintl.o src/math/nextafter.o src/math/nextafterf.o src/math/nextafterl.o src/math/nexttoward.o src/math/nexttowardf.o src/math/nexttowardl.o src/math/pow.o src/math/powf.o src/math/powl.o src/math/remainder.o src/math/remainderf.o src/math/remainderl.o src/math/remquo.o src/math/remquof.o src/math/remquol.o src/math/rint.o src/math/rintf.o src/math/rintl.o src/math/round.o src/math/roundf.o src/math/roundl.o src/math/scalb.o src/math/scalbf.o src/math/scalbln.o src/math/scalblnf.o src/math/scalblnl.o src/math/scalbn.o src/math/scalbnf.o src/math/scalbnl.o src/math/signgam.o src/math/significand.o src/math/significandf.o src/math/sin.o src/math/sincos.o src/math/sincosf.o src/math/sincosl.o src/math/sinf.o src/math/sinh.o src/math/sinhf.o src/math/sinhl.o src/math/sinl.o src/math/sqrt.o src/math/sqrtf.o src/math/sqrtl.o src/math/tan.o src/math/tanf.o src/math/tanh.o src/math/tanhf.o src/math/tanhl.o src/math/tanl.o src/math/tgamma.o src/math/tgammaf.o src/math/tgammal.o src/math/trunc.o src/math/truncf.o src/math/truncl.o src/misc/a64l.o src/misc/basename.o src/misc/dirname.o src/misc/ffs.o src/misc/forkpty.o src/misc/get_current_dir_name.o src/misc/getdomainname.o src/misc/getgrouplist.o src/misc/gethostid.o src/misc/getopt.o src/misc/getopt_long.o src/misc/getpriority.o src/misc/getresgid.o src/misc/getresuid.o src/misc/getrlimit.o src/misc/getrusage.o src/misc/getsubopt.o src/misc/initgroups.o src/misc/ioctl.o src/misc/lockf.o src/misc/mntent.o src/misc/nftw.o src/misc/openpty.o src/misc/ptsname.o src/misc/pty.o src/misc/realpath.o src/misc/setdomainname.o src/misc/setpriority.o src/misc/setrlimit.o src/misc/syscall.o src/misc/syslog.o src/misc/uname.o src/misc/wordexp.o src/mman/madvise.o src/mman/mincore.o src/mman/mlock.o src/mman/mlockall.o src/mman/mmap.o src/mman/mprotect.o src/mman/mremap.o src/mman/msync.o src/mman/munlock.o src/mman/munlockall.o src/mman/munmap.o src/mman/posix_madvise.o src/mman/shm_open.o src/mman/shm_unlink.o src/mq/mq_close.o src/mq/mq_getattr.o src/mq/mq_notify.o src/mq/mq_open.o src/mq/mq_receive.o src/mq/mq_send.o src/mq/mq_setattr.o src/mq/mq_timedreceive.o src/mq/mq_timedsend.o src/mq/mq_unlink.o src/multibyte/btowc.o src/multibyte/internal.o src/multibyte/mblen.o src/multibyte/mbrlen.o src/multibyte/mbrtowc.o src/multibyte/mbsinit.o src/multibyte/mbsnrtowcs.o src/multibyte/mbsrtowcs.o src/multibyte/mbstowcs.o src/multibyte/mbtowc.o src/multibyte/wcrtomb.o src/multibyte/wcsnrtombs.o src/multibyte/wcsrtombs.o src/multibyte/wcstombs.o src/multibyte/wctob.o src/multibyte/wctomb.o src/network/__dns.o src/network/__ipparse.o src/network/accept.o src/network/bind.o src/network/connect.o src/network/dn_expand.o src/network/ent.o src/network/freeaddrinfo.o src/network/gai_strerror.o src/network/getaddrinfo.o src/network/gethostbyaddr.o src/network/gethostbyaddr_r.o src/network/gethostbyname.o src/network/gethostbyname2.o src/network/gethostbyname2_r.o src/network/gethostbyname_r.o src/network/getnameinfo.o src/network/getpeername.o src/network/getservbyname.o src/network/getservbyname_r.o src/network/getservbyport.o src/network/getservbyport_r.o src/network/getsockname.o src/network/getsockopt.o src/network/h_errno.o src/network/hstrerror.o src/network/htonl.o src/network/htons.o src/network/if_freenameindex.o src/network/if_indextoname.o src/network/if_nameindex.o src/network/if_nametoindex.o src/network/in6addr_any.o src/network/in6addr_loopback.o src/network/inet_addr.o src/network/inet_aton.o src/network/inet_ntoa.o src/network/inet_ntop.o src/network/inet_pton.o src/network/listen.o src/network/netname.o src/network/ntohl.o src/network/ntohs.o src/network/proto.o src/network/recv.o src/network/recvfrom.o src/network/recvmsg.o src/network/res_init.o src/network/res_query.o src/network/res_state.o src/network/send.o src/network/sendmsg.o src/network/sendto.o src/network/serv.o src/network/setsockopt.o src/network/shutdown.o src/network/sockatmark.o src/network/socket.o src/network/socketpair.o src/passwd/fgetpwent.o src/passwd/getgr_r.o src/passwd/getgrent.o src/passwd/getgrent_a.o src/passwd/getpw_r.o src/passwd/getpwent.o src/passwd/getpwent_a.o src/passwd/getspent.o src/passwd/getspnam.o src/passwd/getspnam_r.o src/passwd/lckpwdf.o src/prng/__rand48_step.o src/prng/__seed48.o src/prng/drand48.o src/prng/lcong48.o src/prng/lrand48.o src/prng/mrand48.o src/prng/rand.o src/prng/rand_r.o src/prng/random.o src/prng/seed48.o src/prng/srand48.o src/process/execl.o src/process/execle.o src/process/execlp.o src/process/execv.o src/process/execve.o src/process/execvp.o src/process/fexecve.o src/process/fork.o src/process/posix_spawn.o src/process/posix_spawn_file_actions_addclose.o src/process/posix_spawn_file_actions_adddup2.o src/process/posix_spawn_file_actions_addopen.o src/process/posix_spawn_file_actions_destroy.o src/process/posix_spawn_file_actions_init.o src/process/posix_spawnattr_destroy.o src/process/posix_spawnattr_getflags.o src/process/posix_spawnattr_getpgroup.o src/process/posix_spawnattr_getsigdefault.o src/process/posix_spawnattr_getsigmask.o src/process/posix_spawnattr_init.o src/process/posix_spawnattr_setflags.o src/process/posix_spawnattr_setpgroup.o src/process/posix_spawnattr_setsigdefault.o src/process/posix_spawnattr_setsigmask.o src/process/posix_spawnp.o src/process/system.o src/process/vfork.o src/process/wait.o src/process/waitid.o src/process/waitpid.o src/regex/fnmatch.o src/regex/glob.o src/regex/regcomp.o src/regex/regerror.o src/regex/regexec.o src/regex/tre-mem.o src/sched/sched_get_priority_max.o src/sched/sched_getparam.o src/sched/sched_getscheduler.o src/sched/sched_rr_get_interval.o src/sched/sched_setparam.o src/sched/sched_setscheduler.o src/sched/sched_yield.o src/search/hsearch.o src/search/insque.o src/search/lsearch.o src/search/tdestroy.o src/search/tsearch_avl.o src/select/poll.o src/select/pselect.o src/select/select.o src/setjmp/longjmp.o src/setjmp/setjmp.o src/signal/getitimer.o src/signal/kill.o src/signal/killpg.o src/signal/psiginfo.o src/signal/psignal.o src/signal/raise.o src/signal/restore.o src/signal/setitimer.o src/signal/sigaction.o src/signal/sigaddset.o src/signal/sigaltstack.o src/signal/sigdelset.o src/signal/sigemptyset.o src/signal/sigfillset.o src/signal/sighold.o src/signal/sigignore.o src/signal/siginterrupt.o src/signal/sigisemptyset.o src/signal/sigismember.o src/signal/siglongjmp.o src/signal/signal.o src/signal/sigpause.o src/signal/sigpending.o src/signal/sigprocmask.o src/signal/sigqueue.o src/signal/sigrelse.o src/signal/sigrtmax.o src/signal/sigrtmin.o src/signal/sigset.o src/signal/sigsetjmp.o src/signal/sigsuspend.o src/signal/sigtimedwait.o src/signal/sigwait.o src/signal/sigwaitinfo.o src/stat/__fxstat.o src/stat/__fxstatat.o src/stat/__lxstat.o src/stat/__xstat.o src/stat/chmod.o src/stat/fchmod.o src/stat/fchmodat.o src/stat/fstat.o src/stat/fstatat.o src/stat/futimens.o src/stat/lchmod.o src/stat/lstat.o src/stat/mkdir.o src/stat/mkdirat.o src/stat/mkfifo.o src/stat/mkfifoat.o src/stat/mknod.o src/stat/mknodat.o src/stat/stat.o src/stat/statvfs.o src/stat/umask.o src/stat/utimensat.o src/stdio/__fclose_ca.o src/stdio/__fdopen.o src/stdio/__fopen_rb_ca.o src/stdio/__lockfile.o src/stdio/__overflow.o src/stdio/__stdio_close.o src/stdio/__stdio_exit.o src/stdio/__stdio_read.o src/stdio/__stdio_seek.o src/stdio/__stdio_write.o src/stdio/__stdout_write.o src/stdio/__string_read.o src/stdio/__toread.o src/stdio/__towrite.o src/stdio/__uflow.o src/stdio/asprintf.o src/stdio/clearerr.o src/stdio/dprintf.o src/stdio/ext.o src/stdio/ext2.o src/stdio/fclose.o src/stdio/feof.o src/stdio/ferror.o src/stdio/fflush.o src/stdio/fgetc.o src/stdio/fgetln.o src/stdio/fgetpos.o src/stdio/fgets.o src/stdio/fgetwc.o src/stdio/fgetws.o src/stdio/fileno.o src/stdio/flockfile.o src/stdio/fmemopen.o src/stdio/fopen.o src/stdio/fprintf.o src/stdio/fputc.o src/stdio/fputs.o src/stdio/fputwc.o src/stdio/fputws.o src/stdio/fread.o src/stdio/freopen.o src/stdio/fscanf.o src/stdio/fseek.o src/stdio/fsetpos.o src/stdio/ftell.o src/stdio/ftrylockfile.o src/stdio/funlockfile.o src/stdio/fwide.o src/stdio/fwprintf.o src/stdio/fwrite.o src/stdio/fwscanf.o src/stdio/getc_unlocked.o src/stdio/getchar.o src/stdio/getchar_unlocked.o src/stdio/getdelim.o src/stdio/getline.o src/stdio/gets.o src/stdio/getw.o src/stdio/getwc.o src/stdio/getwchar.o src/stdio/open_memstream.o src/stdio/open_wmemstream.o src/stdio/pclose.o src/stdio/perror.o src/stdio/popen.o src/stdio/printf.o src/stdio/putc_unlocked.o src/stdio/putchar.o src/stdio/putchar_unlocked.o src/stdio/puts.o src/stdio/putw.o src/stdio/putwc.o src/stdio/putwchar.o src/stdio/remove.o src/stdio/rename.o src/stdio/rewind.o src/stdio/scanf.o src/stdio/setbuf.o src/stdio/setbuffer.o src/stdio/setlinebuf.o src/stdio/setvbuf.o src/stdio/snprintf.o src/stdio/sprintf.o src/stdio/sscanf.o src/stdio/stderr.o src/stdio/stdin.o src/stdio/stdout.o src/stdio/swprintf.o src/stdio/swscanf.o src/stdio/tempnam.o src/stdio/tmpfile.o src/stdio/tmpnam.o src/stdio/ungetc.o src/stdio/ungetwc.o src/stdio/vasprintf.o src/stdio/vdprintf.o src/stdio/vfprintf.o src/stdio/vfscanf.o src/stdio/vfwprintf.o src/stdio/vfwscanf.o src/stdio/vprintf.o src/stdio/vscanf.o src/stdio/vsnprintf.o src/stdio/vsprintf.o src/stdio/vsscanf.o src/stdio/vswprintf.o src/stdio/vswscanf.o src/stdio/vwprintf.o src/stdio/vwscanf.o src/stdio/wprintf.o src/stdio/wscanf.o src/stdlib/abs.o src/stdlib/atof.o src/stdlib/atoi.o src/stdlib/atol.o src/stdlib/atoll.o src/stdlib/bsearch.o src/stdlib/div.o src/stdlib/ecvt.o src/stdlib/fcvt.o src/stdlib/gcvt.o src/stdlib/imaxabs.o src/stdlib/imaxdiv.o src/stdlib/labs.o src/stdlib/ldiv.o src/stdlib/llabs.o src/stdlib/lldiv.o src/stdlib/qsort.o src/stdlib/strtod.o src/stdlib/strtol.o src/stdlib/wcstod.o src/stdlib/wcstol.o src/string/bcmp.o src/string/bcopy.o src/string/bzero.o src/string/index.o src/string/memccpy.o src/string/memchr.o src/string/memcmp.o src/string/memcpy.o src/string/memmove.o src/string/mempcpy.o src/string/memrchr.o src/string/memset.o src/string/rindex.o src/string/stpcpy.o src/string/stpncpy.o src/string/strcasecmp.o src/string/strcasestr.o src/string/strcat.o src/string/strchr.o src/string/strchrnul.o src/string/strcmp.o src/string/strcpy.o src/string/strcspn.o src/string/strdup.o src/string/strerror_r.o src/string/strlcat.o src/string/strlcpy.o src/string/strlen.o src/string/strncasecmp.o src/string/strncat.o src/string/strncmp.o src/string/strncpy.o src/string/strndup.o src/string/strnlen.o src/string/strpbrk.o src/string/strrchr.o src/string/strsep.o src/string/strsignal.o src/string/strspn.o src/string/strstr.o src/string/strtok.o src/string/strtok_r.o src/string/strverscmp.o src/string/swab.o src/string/wcpcpy.o src/string/wcpncpy.o src/string/wcscasecmp.o src/string/wcscasecmp_l.o src/string/wcscat.o src/string/wcschr.o src/string/wcscmp.o src/string/wcscpy.o src/string/wcscspn.o src/string/wcsdup.o src/string/wcslen.o src/string/wcsncasecmp.o src/string/wcsncasecmp_l.o src/string/wcsncat.o src/string/wcsncmp.o src/string/wcsncpy.o src/string/wcsnlen.o src/string/wcspbrk.o src/string/wcsrchr.o src/string/wcsspn.o src/string/wcsstr.o src/string/wcstok.o src/string/wcswcs.o src/string/wmemchr.o src/string/wmemcmp.o src/string/wmemcpy.o src/string/wmemmove.o src/string/wmemset.o src/temp/mkdtemp.o src/temp/mkstemp.o src/temp/mktemp.o src/termios/cfgetospeed.o src/termios/cfmakeraw.o src/termios/cfsetospeed.o src/termios/tcdrain.o src/termios/tcflow.o src/termios/tcflush.o src/termios/tcgetattr.o src/termios/tcgetsid.o src/termios/tcsendbreak.o src/termios/tcsetattr.o src/thread/__futex.o src/thread/__lock.o src/thread/__set_thread_area.o src/thread/__timedwait.o src/thread/__unmapself.o src/thread/__wait.o src/thread/__wake.o src/thread/cancel_dummy.o src/thread/cancel_impl.o src/thread/cancellation.o src/thread/clone.o src/thread/pthread_atfork.o src/thread/pthread_attr_destroy.o src/thread/pthread_attr_getdetachstate.o src/thread/pthread_attr_getguardsize.o src/thread/pthread_attr_getschedparam.o src/thread/pthread_attr_getscope.o src/thread/pthread_attr_getstack.o src/thread/pthread_attr_getstacksize.o src/thread/pthread_attr_init.o src/thread/pthread_attr_setdetachstate.o src/thread/pthread_attr_setguardsize.o src/thread/pthread_attr_setschedparam.o src/thread/pthread_attr_setscope.o src/thread/pthread_attr_setstack.o src/thread/pthread_attr_setstacksize.o src/thread/pthread_barrier_destroy.o src/thread/pthread_barrier_init.o src/thread/pthread_barrier_wait.o src/thread/pthread_barrierattr_destroy.o src/thread/pthread_barrierattr_getpshared.o src/thread/pthread_barrierattr_init.o src/thread/pthread_barrierattr_setpshared.o src/thread/pthread_cond_broadcast.o src/thread/pthread_cond_destroy.o src/thread/pthread_cond_init.o src/thread/pthread_cond_signal.o src/thread/pthread_cond_timedwait.o src/thread/pthread_cond_wait.o src/thread/pthread_condattr_destroy.o src/thread/pthread_condattr_getclock.o src/thread/pthread_condattr_getpshared.o src/thread/pthread_condattr_init.o src/thread/pthread_condattr_setclock.o src/thread/pthread_condattr_setpshared.o src/thread/pthread_create.o src/thread/pthread_detach.o src/thread/pthread_equal.o src/thread/pthread_getconcurrency.o src/thread/pthread_getspecific.o src/thread/pthread_join.o src/thread/pthread_key_create.o src/thread/pthread_kill.o src/thread/pthread_mutex_consistent.o src/thread/pthread_mutex_destroy.o src/thread/pthread_mutex_init.o src/thread/pthread_mutex_lock.o src/thread/pthread_mutex_timedlock.o src/thread/pthread_mutex_trylock.o src/thread/pthread_mutex_unlock.o src/thread/pthread_mutexattr_destroy.o src/thread/pthread_mutexattr_getpshared.o src/thread/pthread_mutexattr_getrobust.o src/thread/pthread_mutexattr_gettype.o src/thread/pthread_mutexattr_init.o src/thread/pthread_mutexattr_setpshared.o src/thread/pthread_mutexattr_setrobust.o src/thread/pthread_mutexattr_settype.o src/thread/pthread_once.o src/thread/pthread_rwlock_destroy.o src/thread/pthread_rwlock_init.o src/thread/pthread_rwlock_rdlock.o src/thread/pthread_rwlock_timedrdlock.o src/thread/pthread_rwlock_timedwrlock.o src/thread/pthread_rwlock_tryrdlock.o src/thread/pthread_rwlock_trywrlock.o src/thread/pthread_rwlock_unlock.o src/thread/pthread_rwlock_wrlock.o src/thread/pthread_rwlockattr_destroy.o src/thread/pthread_rwlockattr_getpshared.o src/thread/pthread_rwlockattr_init.o src/thread/pthread_rwlockattr_setpshared.o src/thread/pthread_self.o src/thread/pthread_setcancelstate.o src/thread/pthread_setcanceltype.o src/thread/pthread_setconcurrency.o src/thread/pthread_setspecific.o src/thread/pthread_sigmask.o src/thread/pthread_spin_destroy.o src/thread/pthread_spin_init.o src/thread/pthread_spin_lock.o src/thread/pthread_spin_trylock.o src/thread/pthread_spin_unlock.o src/thread/pthread_testcancel.o src/thread/sem_destroy.o src/thread/sem_getvalue.o src/thread/sem_init.o src/thread/sem_open.o src/thread/sem_post.o src/thread/sem_timedwait.o src/thread/sem_trywait.o src/thread/sem_unlink.o src/thread/sem_wait.o src/thread/synccall.o src/thread/syscall_cp.o src/thread/vmlock.o src/time/__asctime.o src/time/__time_to_tm.o src/time/__tm_to_time.o src/time/asctime.o src/time/asctime_r.o src/time/clock.o src/time/clock_getcpuclockid.o src/time/clock_getres.o src/time/clock_gettime.o src/time/clock_nanosleep.o src/time/clock_settime.o src/time/ctime.o src/time/ctime_r.o src/time/difftime.o src/time/getdate.o src/time/gettimeofday.o src/time/gmtime.o src/time/gmtime_r.o src/time/localtime.o src/time/localtime_r.o src/time/mktime.o src/time/nanosleep.o src/time/strftime.o src/time/strptime.o src/time/time.o src/time/timegm.o src/time/timer_create.o src/time/timer_delete.o src/time/timer_getoverrun.o src/time/timer_gettime.o src/time/timer_settime.o src/time/times.o src/time/tzset.o src/time/utime.o src/time/wcsftime.o src/unistd/_exit.o src/unistd/access.o src/unistd/acct.o src/unistd/alarm.o src/unistd/chdir.o src/unistd/chown.o src/unistd/close.o src/unistd/ctermid.o src/unistd/dup.o src/unistd/dup2.o src/unistd/faccessat.o src/unistd/fchdir.o src/unistd/fchown.o src/unistd/fchownat.o src/unistd/fdatasync.o src/unistd/fsync.o src/unistd/ftruncate.o src/unistd/getcwd.o src/unistd/getegid.o src/unistd/geteuid.o src/unistd/getgid.o src/unistd/getgroups.o src/unistd/gethostname.o src/unistd/getlogin.o src/unistd/getlogin_r.o src/unistd/getpgid.o src/unistd/getpgrp.o src/unistd/getpid.o src/unistd/getppid.o src/unistd/getsid.o src/unistd/getuid.o src/unistd/isatty.o src/unistd/lchown.o src/unistd/link.o src/unistd/linkat.o src/unistd/lseek.o src/unistd/nice.o src/unistd/pause.o src/unistd/pipe.o src/unistd/pread.o src/unistd/preadv.o src/unistd/pwrite.o src/unistd/pwritev.o src/unistd/read.o src/unistd/readlink.o src/unistd/readlinkat.o src/unistd/readv.o src/unistd/renameat.o src/unistd/rmdir.o src/unistd/setegid.o src/unistd/seteuid.o src/unistd/setgid.o src/unistd/setpgid.o src/unistd/setpgrp.o src/unistd/setregid.o src/unistd/setresgid.o src/unistd/setresuid.o src/unistd/setreuid.o src/unistd/setsid.o src/unistd/setuid.o src/unistd/setxid.o src/unistd/sleep.o src/unistd/symlink.o src/unistd/symlinkat.o src/unistd/sync.o src/unistd/tcgetpgrp.o src/unistd/tcsetpgrp.o src/unistd/truncate.o src/unistd/ttyname.o src/unistd/ttyname_r.o src/unistd/ualarm.o src/unistd/unlink.o src/unistd/unlinkat.o src/unistd/usleep.o src/unistd/write.o src/unistd/writev.o
ranlib lib/libc.a
pcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -falign-functions=1 -falign-labels=1 -falign-loops=1 -falign-jumps=1 -march=i486 -mtune=generic -fno-stack-protector  -fPIC -DSHARED -Wl,--hash-style=both  -nostdlib -shared \
	-Wl,-e,_start -Wl,-Bsymbolic-functions \
	-Wl,-soname=libc.so -o lib/libc.so src/aio/aio_cancel.lo src/aio/aio_error.lo src/aio/aio_fsync.lo src/aio/aio_readwrite.lo src/aio/aio_return.lo src/aio/aio_suspend.lo src/aio/lio_listio.lo src/complex/__cexp.lo src/complex/__cexpf.lo src/complex/cabs.lo src/complex/cabsf.lo src/complex/cabsl.lo src/complex/cacos.lo src/complex/cacosf.lo src/complex/cacosh.lo src/complex/cacoshf.lo src/complex/cacoshl.lo src/complex/cacosl.lo src/complex/carg.lo src/complex/cargf.lo src/complex/cargl.lo src/complex/casin.lo src/complex/casinf.lo src/complex/casinh.lo src/complex/casinhf.lo src/complex/casinhl.lo src/complex/casinl.lo src/complex/catan.lo src/complex/catanf.lo src/complex/catanh.lo src/complex/catanhf.lo src/complex/catanhl.lo src/complex/catanl.lo src/complex/ccos.lo src/complex/ccosf.lo src/complex/ccosh.lo src/complex/ccoshf.lo src/complex/ccoshl.lo src/complex/ccosl.lo src/complex/cexp.lo src/complex/cexpf.lo src/complex/cexpl.lo src/complex/cimag.lo src/complex/cimagf.lo src/complex/cimagl.lo src/complex/clog.lo src/complex/clogf.lo src/complex/clogl.lo src/complex/conj.lo src/complex/conjf.lo src/complex/conjl.lo src/complex/cpow.lo src/complex/cpowf.lo src/complex/cpowl.lo src/complex/cproj.lo src/complex/cprojf.lo src/complex/cprojl.lo src/complex/creal.lo src/complex/crealf.lo src/complex/creall.lo src/complex/csin.lo src/complex/csinf.lo src/complex/csinh.lo src/complex/csinhf.lo src/complex/csinhl.lo src/complex/csinl.lo src/complex/csqrt.lo src/complex/csqrtf.lo src/complex/csqrtl.lo src/complex/ctan.lo src/complex/ctanf.lo src/complex/ctanh.lo src/complex/ctanhf.lo src/complex/ctanhl.lo src/complex/ctanl.lo src/conf/confstr.lo src/conf/fpathconf.lo src/conf/pathconf.lo src/conf/sysconf.lo src/crypt/crypt.lo src/crypt/crypt_blowfish.lo src/crypt/crypt_des.lo src/crypt/crypt_md5.lo src/crypt/crypt_r.lo src/crypt/crypt_sha256.lo src/crypt/crypt_sha512.lo src/ctype/__ctype_b_loc.lo src/ctype/__ctype_get_mb_cur_max.lo src/ctype/__ctype_tolower_loc.lo src/ctype/__ctype_toupper_loc.lo src/ctype/isalnum.lo src/ctype/isalpha.lo src/ctype/isascii.lo src/ctype/isblank.lo src/ctype/iscntrl.lo src/ctype/isdigit.lo src/ctype/isgraph.lo src/ctype/islower.lo src/ctype/isprint.lo src/ctype/ispunct.lo src/ctype/isspace.lo src/ctype/isupper.lo src/ctype/iswalnum.lo src/ctype/iswalpha.lo src/ctype/iswblank.lo src/ctype/iswcntrl.lo src/ctype/iswctype.lo src/ctype/iswdigit.lo src/ctype/iswgraph.lo src/ctype/iswlower.lo src/ctype/iswprint.lo src/ctype/iswpunct.lo src/ctype/iswspace.lo src/ctype/iswupper.lo src/ctype/iswxdigit.lo src/ctype/isxdigit.lo src/ctype/toascii.lo src/ctype/tolower.lo src/ctype/toupper.lo src/ctype/towctrans.lo src/ctype/wcswidth.lo src/ctype/wctrans.lo src/ctype/wcwidth.lo src/dirent/__getdents.lo src/dirent/alphasort.lo src/dirent/closedir.lo src/dirent/dirfd.lo src/dirent/fdopendir.lo src/dirent/opendir.lo src/dirent/readdir.lo src/dirent/readdir_r.lo src/dirent/rewinddir.lo src/dirent/scandir.lo src/dirent/seekdir.lo src/dirent/telldir.lo src/dirent/versionsort.lo src/env/__environ.lo src/env/__init_security.lo src/env/__libc_csu_fini.lo src/env/__libc_csu_init.lo src/env/__libc_start_main.lo src/env/__stack_chk_fail.lo src/env/clearenv.lo src/env/getenv.lo src/env/putenv.lo src/env/setenv.lo src/env/unsetenv.lo src/errno/__errno_location.lo src/errno/strerror.lo src/exit/_Exit.lo src/exit/abort.lo src/exit/assert.lo src/exit/at_quick_exit.lo src/exit/atexit.lo src/exit/exit.lo src/exit/quick_exit.lo src/fcntl/creat.lo src/fcntl/fcntl.lo src/fcntl/open.lo src/fcntl/openat.lo src/fcntl/posix_fadvise.lo src/fcntl/posix_fallocate.lo src/fenv/fegetexceptflag.lo src/fenv/feholdexcept.lo src/fenv/fenv.lo src/fenv/fesetexceptflag.lo src/fenv/feupdateenv.lo src/internal/floatscan.lo src/internal/intscan.lo src/internal/libc.lo src/internal/shgetc.lo src/internal/syscall.lo src/internal/syscall_ret.lo src/ipc/ftok.lo src/ipc/msgctl.lo src/ipc/msgget.lo src/ipc/msgrcv.lo src/ipc/msgsnd.lo src/ipc/semctl.lo src/ipc/semget.lo src/ipc/semop.lo src/ipc/shmat.lo src/ipc/shmctl.lo src/ipc/shmdt.lo src/ipc/shmget.lo src/ldso/dladdr.lo src/ldso/dlsym.lo src/ldso/dynlink.lo src/ldso/start.lo src/legacy/cuserid.lo src/legacy/daemon.lo src/legacy/err.lo src/legacy/ftw.lo src/legacy/futimes.lo src/legacy/getdtablesize.lo src/legacy/getpagesize.lo src/legacy/getpass.lo src/legacy/getusershell.lo src/legacy/isastream.lo src/legacy/lutimes.lo src/legacy/ulimit.lo src/legacy/utmpx.lo src/linux/accept4.lo src/linux/adjtime.lo src/linux/adjtimex.lo src/linux/brk.lo src/linux/cap.lo src/linux/chroot.lo src/linux/clock_adjtime.lo src/linux/dup3.lo src/linux/epoll.lo src/linux/eventfd.lo src/linux/fallocate.lo src/linux/flock.lo src/linux/inotify.lo src/linux/ioperm.lo src/linux/iopl.lo src/linux/klogctl.lo src/linux/module.lo src/linux/mount.lo src/linux/pipe2.lo src/linux/pivot_root.lo src/linux/ppoll.lo src/linux/prctl.lo src/linux/prlimit.lo src/linux/process_vm.lo src/linux/ptrace.lo src/linux/readahead.lo src/linux/reboot.lo src/linux/remap_file_pages.lo src/linux/sbrk.lo src/linux/sendfile.lo src/linux/setfsgid.lo src/linux/setfsuid.lo src/linux/setgroups.lo src/linux/sethostname.lo src/linux/setns.lo src/linux/settimeofday.lo src/linux/signalfd.lo src/linux/splice.lo src/linux/stime.lo src/linux/swap.lo src/linux/sync_file_range.lo src/linux/syncfs.lo src/linux/sysinfo.lo src/linux/tee.lo src/linux/timerfd.lo src/linux/unshare.lo src/linux/utimes.lo src/linux/vhangup.lo src/linux/vmsplice.lo src/linux/wait3.lo src/linux/wait4.lo src/linux/xattr.lo src/locale/catclose.lo src/locale/catgets.lo src/locale/catopen.lo src/locale/duplocale.lo src/locale/freelocale.lo src/locale/iconv.lo src/locale/intl.lo src/locale/isalnum_l.lo src/locale/isalpha_l.lo src/locale/isblank_l.lo src/locale/iscntrl_l.lo src/locale/isdigit_l.lo src/locale/isgraph_l.lo src/locale/islower_l.lo src/locale/isprint_l.lo src/locale/ispunct_l.lo src/locale/isspace_l.lo src/locale/isupper_l.lo src/locale/iswalnum_l.lo src/locale/iswalpha_l.lo src/locale/iswblank_l.lo src/locale/iswcntrl_l.lo src/locale/iswctype_l.lo src/locale/iswdigit_l.lo src/locale/iswgraph_l.lo src/locale/iswlower_l.lo src/locale/iswprint_l.lo src/locale/iswpunct_l.lo src/locale/iswspace_l.lo src/locale/iswupper_l.lo src/locale/iswxdigit_l.lo src/locale/isxdigit_l.lo src/locale/langinfo.lo src/locale/localeconv.lo src/locale/newlocale.lo src/locale/nl_langinfo_l.lo src/locale/setlocale.lo src/locale/strcasecmp_l.lo src/locale/strcoll.lo src/locale/strcoll_l.lo src/locale/strerror_l.lo src/locale/strfmon.lo src/locale/strftime_l.lo src/locale/strncasecmp_l.lo src/locale/strxfrm.lo src/locale/strxfrm_l.lo src/locale/tolower_l.lo src/locale/toupper_l.lo src/locale/towctrans_l.lo src/locale/towlower_l.lo src/locale/towupper_l.lo src/locale/uselocale.lo src/locale/wcscoll.lo src/locale/wcscoll_l.lo src/locale/wcsxfrm.lo src/locale/wcsxfrm_l.lo src/locale/wctrans_l.lo src/locale/wctype_l.lo src/malloc/__brk.lo src/malloc/aligned_alloc.lo src/malloc/calloc.lo src/malloc/lite_malloc.lo src/malloc/malloc.lo src/malloc/memalign.lo src/malloc/posix_memalign.lo src/math/__cos.lo src/math/__cosdf.lo src/math/__cosl.lo src/math/__expo2.lo src/math/__expo2f.lo src/math/__fpclassify.lo src/math/__fpclassifyf.lo src/math/__fpclassifyl.lo src/math/__invtrigl.lo src/math/__polevll.lo src/math/__rem_pio2.lo src/math/__rem_pio2_large.lo src/math/__rem_pio2f.lo src/math/__rem_pio2l.lo src/math/__signbit.lo src/math/__signbitf.lo src/math/__signbitl.lo src/math/__sin.lo src/math/__sindf.lo src/math/__sinl.lo src/math/__tan.lo src/math/__tandf.lo src/math/__tanl.lo src/math/acos.lo src/math/acosf.lo src/math/acosh.lo src/math/acoshf.lo src/math/acoshl.lo src/math/acosl.lo src/math/asin.lo src/math/asinf.lo src/math/asinh.lo src/math/asinhf.lo src/math/asinhl.lo src/math/asinl.lo src/math/atan.lo src/math/atan2.lo src/math/atan2f.lo src/math/atan2l.lo src/math/atanf.lo src/math/atanh.lo src/math/atanhf.lo src/math/atanhl.lo src/math/atanl.lo src/math/cbrt.lo src/math/cbrtf.lo src/math/cbrtl.lo src/math/ceil.lo src/math/ceilf.lo src/math/ceill.lo src/math/copysign.lo src/math/copysignf.lo src/math/copysignl.lo src/math/cos.lo src/math/cosf.lo src/math/cosh.lo src/math/coshf.lo src/math/coshl.lo src/math/cosl.lo src/math/erf.lo src/math/erff.lo src/math/erfl.lo src/math/exp.lo src/math/exp10.lo src/math/exp10f.lo src/math/exp10l.lo src/math/exp2.lo src/math/exp2f.lo src/math/exp2l.lo src/math/expf.lo src/math/expl.lo src/math/expm1.lo src/math/expm1f.lo src/math/expm1l.lo src/math/fabs.lo src/math/fabsf.lo src/math/fabsl.lo src/math/fdim.lo src/math/fdimf.lo src/math/fdiml.lo src/math/floor.lo src/math/floorf.lo src/math/floorl.lo src/math/fma.lo src/math/fmaf.lo src/math/fmal.lo src/math/fmax.lo src/math/fmaxf.lo src/math/fmaxl.lo src/math/fmin.lo src/math/fminf.lo src/math/fminl.lo src/math/fmod.lo src/math/fmodf.lo src/math/fmodl.lo src/math/frexp.lo src/math/frexpf.lo src/math/frexpl.lo src/math/hypot.lo src/math/hypotf.lo src/math/hypotl.lo src/math/ilogb.lo src/math/ilogbf.lo src/math/ilogbl.lo src/math/j0.lo src/math/j0f.lo src/math/j1.lo src/math/j1f.lo src/math/jn.lo src/math/jnf.lo src/math/ldexp.lo src/math/ldexpf.lo src/math/ldexpl.lo src/math/lgamma.lo src/math/lgamma_r.lo src/math/lgammaf.lo src/math/lgammaf_r.lo src/math/lgammal.lo src/math/llrint.lo src/math/llrintf.lo src/math/llrintl.lo src/math/llround.lo src/math/llroundf.lo src/math/llroundl.lo src/math/log.lo src/math/log10.lo src/math/log10f.lo src/math/log10l.lo src/math/log1p.lo src/math/log1pf.lo src/math/log1pl.lo src/math/log2.lo src/math/log2f.lo src/math/log2l.lo src/math/logb.lo src/math/logbf.lo src/math/logbl.lo src/math/logf.lo src/math/logl.lo src/math/lrint.lo src/math/lrintf.lo src/math/lrintl.lo src/math/lround.lo src/math/lroundf.lo src/math/lroundl.lo src/math/modf.lo src/math/modff.lo src/math/modfl.lo src/math/nan.lo src/math/nanf.lo src/math/nanl.lo src/math/nearbyint.lo src/math/nearbyintf.lo src/math/nearbyintl.lo src/math/nextafter.lo src/math/nextafterf.lo src/math/nextafterl.lo src/math/nexttoward.lo src/math/nexttowardf.lo src/math/nexttowardl.lo src/math/pow.lo src/math/powf.lo src/math/powl.lo src/math/remainder.lo src/math/remainderf.lo src/math/remainderl.lo src/math/remquo.lo src/math/remquof.lo src/math/remquol.lo src/math/rint.lo src/math/rintf.lo src/math/rintl.lo src/math/round.lo src/math/roundf.lo src/math/roundl.lo src/math/scalb.lo src/math/scalbf.lo src/math/scalbln.lo src/math/scalblnf.lo src/math/scalblnl.lo src/math/scalbn.lo src/math/scalbnf.lo src/math/scalbnl.lo src/math/signgam.lo src/math/significand.lo src/math/significandf.lo src/math/sin.lo src/math/sincos.lo src/math/sincosf.lo src/math/sincosl.lo src/math/sinf.lo src/math/sinh.lo src/math/sinhf.lo src/math/sinhl.lo src/math/sinl.lo src/math/sqrt.lo src/math/sqrtf.lo src/math/sqrtl.lo src/math/tan.lo src/math/tanf.lo src/math/tanh.lo src/math/tanhf.lo src/math/tanhl.lo src/math/tanl.lo src/math/tgamma.lo src/math/tgammaf.lo src/math/tgammal.lo src/math/trunc.lo src/math/truncf.lo src/math/truncl.lo src/misc/a64l.lo src/misc/basename.lo src/misc/dirname.lo src/misc/ffs.lo src/misc/forkpty.lo src/misc/get_current_dir_name.lo src/misc/getdomainname.lo src/misc/getgrouplist.lo src/misc/gethostid.lo src/misc/getopt.lo src/misc/getopt_long.lo src/misc/getpriority.lo src/misc/getresgid.lo src/misc/getresuid.lo src/misc/getrlimit.lo src/misc/getrusage.lo src/misc/getsubopt.lo src/misc/initgroups.lo src/misc/ioctl.lo src/misc/lockf.lo src/misc/mntent.lo src/misc/nftw.lo src/misc/openpty.lo src/misc/ptsname.lo src/misc/pty.lo src/misc/realpath.lo src/misc/setdomainname.lo src/misc/setpriority.lo src/misc/setrlimit.lo src/misc/syscall.lo src/misc/syslog.lo src/misc/uname.lo src/misc/wordexp.lo src/mman/madvise.lo src/mman/mincore.lo src/mman/mlock.lo src/mman/mlockall.lo src/mman/mmap.lo src/mman/mprotect.lo src/mman/mremap.lo src/mman/msync.lo src/mman/munlock.lo src/mman/munlockall.lo src/mman/munmap.lo src/mman/posix_madvise.lo src/mman/shm_open.lo src/mman/shm_unlink.lo src/mq/mq_close.lo src/mq/mq_getattr.lo src/mq/mq_notify.lo src/mq/mq_open.lo src/mq/mq_receive.lo src/mq/mq_send.lo src/mq/mq_setattr.lo src/mq/mq_timedreceive.lo src/mq/mq_timedsend.lo src/mq/mq_unlink.lo src/multibyte/btowc.lo src/multibyte/internal.lo src/multibyte/mblen.lo src/multibyte/mbrlen.lo src/multibyte/mbrtowc.lo src/multibyte/mbsinit.lo src/multibyte/mbsnrtowcs.lo src/multibyte/mbsrtowcs.lo src/multibyte/mbstowcs.lo src/multibyte/mbtowc.lo src/multibyte/wcrtomb.lo src/multibyte/wcsnrtombs.lo src/multibyte/wcsrtombs.lo src/multibyte/wcstombs.lo src/multibyte/wctob.lo src/multibyte/wctomb.lo src/network/__dns.lo src/network/__ipparse.lo src/network/accept.lo src/network/bind.lo src/network/connect.lo src/network/dn_expand.lo src/network/ent.lo src/network/freeaddrinfo.lo src/network/gai_strerror.lo src/network/getaddrinfo.lo src/network/gethostbyaddr.lo src/network/gethostbyaddr_r.lo src/network/gethostbyname.lo src/network/gethostbyname2.lo src/network/gethostbyname2_r.lo src/network/gethostbyname_r.lo src/network/getnameinfo.lo src/network/getpeername.lo src/network/getservbyname.lo src/network/getservbyname_r.lo src/network/getservbyport.lo src/network/getservbyport_r.lo src/network/getsockname.lo src/network/getsockopt.lo src/network/h_errno.lo src/network/hstrerror.lo src/network/htonl.lo src/network/htons.lo src/network/if_freenameindex.lo src/network/if_indextoname.lo src/network/if_nameindex.lo src/network/if_nametoindex.lo src/network/in6addr_any.lo src/network/in6addr_loopback.lo src/network/inet_addr.lo src/network/inet_aton.lo src/network/inet_ntoa.lo src/network/inet_ntop.lo src/network/inet_pton.lo src/network/listen.lo src/network/netname.lo src/network/ntohl.lo src/network/ntohs.lo src/network/proto.lo src/network/recv.lo src/network/recvfrom.lo src/network/recvmsg.lo src/network/res_init.lo src/network/res_query.lo src/network/res_state.lo src/network/send.lo src/network/sendmsg.lo src/network/sendto.lo src/network/serv.lo src/network/setsockopt.lo src/network/shutdown.lo src/network/sockatmark.lo src/network/socket.lo src/network/socketpair.lo src/passwd/fgetpwent.lo src/passwd/getgr_r.lo src/passwd/getgrent.lo src/passwd/getgrent_a.lo src/passwd/getpw_r.lo src/passwd/getpwent.lo src/passwd/getpwent_a.lo src/passwd/getspent.lo src/passwd/getspnam.lo src/passwd/getspnam_r.lo src/passwd/lckpwdf.lo src/prng/__rand48_step.lo src/prng/__seed48.lo src/prng/drand48.lo src/prng/lcong48.lo src/prng/lrand48.lo src/prng/mrand48.lo src/prng/rand.lo src/prng/rand_r.lo src/prng/random.lo src/prng/seed48.lo src/prng/srand48.lo src/process/execl.lo src/process/execle.lo src/process/execlp.lo src/process/execv.lo src/process/execve.lo src/process/execvp.lo src/process/fexecve.lo src/process/fork.lo src/process/posix_spawn.lo src/process/posix_spawn_file_actions_addclose.lo src/process/posix_spawn_file_actions_adddup2.lo src/process/posix_spawn_file_actions_addopen.lo src/process/posix_spawn_file_actions_destroy.lo src/process/posix_spawn_file_actions_init.lo src/process/posix_spawnattr_destroy.lo src/process/posix_spawnattr_getflags.lo src/process/posix_spawnattr_getpgroup.lo src/process/posix_spawnattr_getsigdefault.lo src/process/posix_spawnattr_getsigmask.lo src/process/posix_spawnattr_init.lo src/process/posix_spawnattr_setflags.lo src/process/posix_spawnattr_setpgroup.lo src/process/posix_spawnattr_setsigdefault.lo src/process/posix_spawnattr_setsigmask.lo src/process/posix_spawnp.lo src/process/system.lo src/process/vfork.lo src/process/wait.lo src/process/waitid.lo src/process/waitpid.lo src/regex/fnmatch.lo src/regex/glob.lo src/regex/regcomp.lo src/regex/regerror.lo src/regex/regexec.lo src/regex/tre-mem.lo src/sched/sched_get_priority_max.lo src/sched/sched_getparam.lo src/sched/sched_getscheduler.lo src/sched/sched_rr_get_interval.lo src/sched/sched_setparam.lo src/sched/sched_setscheduler.lo src/sched/sched_yield.lo src/search/hsearch.lo src/search/insque.lo src/search/lsearch.lo src/search/tdestroy.lo src/search/tsearch_avl.lo src/select/poll.lo src/select/pselect.lo src/select/select.lo src/setjmp/longjmp.lo src/setjmp/setjmp.lo src/signal/getitimer.lo src/signal/kill.lo src/signal/killpg.lo src/signal/psiginfo.lo src/signal/psignal.lo src/signal/raise.lo src/signal/restore.lo src/signal/setitimer.lo src/signal/sigaction.lo src/signal/sigaddset.lo src/signal/sigaltstack.lo src/signal/sigdelset.lo src/signal/sigemptyset.lo src/signal/sigfillset.lo src/signal/sighold.lo src/signal/sigignore.lo src/signal/siginterrupt.lo src/signal/sigisemptyset.lo src/signal/sigismember.lo src/signal/siglongjmp.lo src/signal/signal.lo src/signal/sigpause.lo src/signal/sigpending.lo src/signal/sigprocmask.lo src/signal/sigqueue.lo src/signal/sigrelse.lo src/signal/sigrtmax.lo src/signal/sigrtmin.lo src/signal/sigset.lo src/signal/sigsetjmp.lo src/signal/sigsuspend.lo src/signal/sigtimedwait.lo src/signal/sigwait.lo src/signal/sigwaitinfo.lo src/stat/__fxstat.lo src/stat/__fxstatat.lo src/stat/__lxstat.lo src/stat/__xstat.lo src/stat/chmod.lo src/stat/fchmod.lo src/stat/fchmodat.lo src/stat/fstat.lo src/stat/fstatat.lo src/stat/futimens.lo src/stat/lchmod.lo src/stat/lstat.lo src/stat/mkdir.lo src/stat/mkdirat.lo src/stat/mkfifo.lo src/stat/mkfifoat.lo src/stat/mknod.lo src/stat/mknodat.lo src/stat/stat.lo src/stat/statvfs.lo src/stat/umask.lo src/stat/utimensat.lo src/stdio/__fclose_ca.lo src/stdio/__fdopen.lo src/stdio/__fopen_rb_ca.lo src/stdio/__lockfile.lo src/stdio/__overflow.lo src/stdio/__stdio_close.lo src/stdio/__stdio_exit.lo src/stdio/__stdio_read.lo src/stdio/__stdio_seek.lo src/stdio/__stdio_write.lo src/stdio/__stdout_write.lo src/stdio/__string_read.lo src/stdio/__toread.lo src/stdio/__towrite.lo src/stdio/__uflow.lo src/stdio/asprintf.lo src/stdio/clearerr.lo src/stdio/dprintf.lo src/stdio/ext.lo src/stdio/ext2.lo src/stdio/fclose.lo src/stdio/feof.lo src/stdio/ferror.lo src/stdio/fflush.lo src/stdio/fgetc.lo src/stdio/fgetln.lo src/stdio/fgetpos.lo src/stdio/fgets.lo src/stdio/fgetwc.lo src/stdio/fgetws.lo src/stdio/fileno.lo src/stdio/flockfile.lo src/stdio/fmemopen.lo src/stdio/fopen.lo src/stdio/fprintf.lo src/stdio/fputc.lo src/stdio/fputs.lo src/stdio/fputwc.lo src/stdio/fputws.lo src/stdio/fread.lo src/stdio/freopen.lo src/stdio/fscanf.lo src/stdio/fseek.lo src/stdio/fsetpos.lo src/stdio/ftell.lo src/stdio/ftrylockfile.lo src/stdio/funlockfile.lo src/stdio/fwide.lo src/stdio/fwprintf.lo src/stdio/fwrite.lo src/stdio/fwscanf.lo src/stdio/getc_unlocked.lo src/stdio/getchar.lo src/stdio/getchar_unlocked.lo src/stdio/getdelim.lo src/stdio/getline.lo src/stdio/gets.lo src/stdio/getw.lo src/stdio/getwc.lo src/stdio/getwchar.lo src/stdio/open_memstream.lo src/stdio/open_wmemstream.lo src/stdio/pclose.lo src/stdio/perror.lo src/stdio/popen.lo src/stdio/printf.lo src/stdio/putc_unlocked.lo src/stdio/putchar.lo src/stdio/putchar_unlocked.lo src/stdio/puts.lo src/stdio/putw.lo src/stdio/putwc.lo src/stdio/putwchar.lo src/stdio/remove.lo src/stdio/rename.lo src/stdio/rewind.lo src/stdio/scanf.lo src/stdio/setbuf.lo src/stdio/setbuffer.lo src/stdio/setlinebuf.lo src/stdio/setvbuf.lo src/stdio/snprintf.lo src/stdio/sprintf.lo src/stdio/sscanf.lo src/stdio/stderr.lo src/stdio/stdin.lo src/stdio/stdout.lo src/stdio/swprintf.lo src/stdio/swscanf.lo src/stdio/tempnam.lo src/stdio/tmpfile.lo src/stdio/tmpnam.lo src/stdio/ungetc.lo src/stdio/ungetwc.lo src/stdio/vasprintf.lo src/stdio/vdprintf.lo src/stdio/vfprintf.lo src/stdio/vfscanf.lo src/stdio/vfwprintf.lo src/stdio/vfwscanf.lo src/stdio/vprintf.lo src/stdio/vscanf.lo src/stdio/vsnprintf.lo src/stdio/vsprintf.lo src/stdio/vsscanf.lo src/stdio/vswprintf.lo src/stdio/vswscanf.lo src/stdio/vwprintf.lo src/stdio/vwscanf.lo src/stdio/wprintf.lo src/stdio/wscanf.lo src/stdlib/abs.lo src/stdlib/atof.lo src/stdlib/atoi.lo src/stdlib/atol.lo src/stdlib/atoll.lo src/stdlib/bsearch.lo src/stdlib/div.lo src/stdlib/ecvt.lo src/stdlib/fcvt.lo src/stdlib/gcvt.lo src/stdlib/imaxabs.lo src/stdlib/imaxdiv.lo src/stdlib/labs.lo src/stdlib/ldiv.lo src/stdlib/llabs.lo src/stdlib/lldiv.lo src/stdlib/qsort.lo src/stdlib/strtod.lo src/stdlib/strtol.lo src/stdlib/wcstod.lo src/stdlib/wcstol.lo src/string/bcmp.lo src/string/bcopy.lo src/string/bzero.lo src/string/index.lo src/string/memccpy.lo src/string/memchr.lo src/string/memcmp.lo src/string/memcpy.lo src/string/memmove.lo src/string/mempcpy.lo src/string/memrchr.lo src/string/memset.lo src/string/rindex.lo src/string/stpcpy.lo src/string/stpncpy.lo src/string/strcasecmp.lo src/string/strcasestr.lo src/string/strcat.lo src/string/strchr.lo src/string/strchrnul.lo src/string/strcmp.lo src/string/strcpy.lo src/string/strcspn.lo src/string/strdup.lo src/string/strerror_r.lo src/string/strlcat.lo src/string/strlcpy.lo src/string/strlen.lo src/string/strncasecmp.lo src/string/strncat.lo src/string/strncmp.lo src/string/strncpy.lo src/string/strndup.lo src/string/strnlen.lo src/string/strpbrk.lo src/string/strrchr.lo src/string/strsep.lo src/string/strsignal.lo src/string/strspn.lo src/string/strstr.lo src/string/strtok.lo src/string/strtok_r.lo src/string/strverscmp.lo src/string/swab.lo src/string/wcpcpy.lo src/string/wcpncpy.lo src/string/wcscasecmp.lo src/string/wcscasecmp_l.lo src/string/wcscat.lo src/string/wcschr.lo src/string/wcscmp.lo src/string/wcscpy.lo src/string/wcscspn.lo src/string/wcsdup.lo src/string/wcslen.lo src/string/wcsncasecmp.lo src/string/wcsncasecmp_l.lo src/string/wcsncat.lo src/string/wcsncmp.lo src/string/wcsncpy.lo src/string/wcsnlen.lo src/string/wcspbrk.lo src/string/wcsrchr.lo src/string/wcsspn.lo src/string/wcsstr.lo src/string/wcstok.lo src/string/wcswcs.lo src/string/wmemchr.lo src/string/wmemcmp.lo src/string/wmemcpy.lo src/string/wmemmove.lo src/string/wmemset.lo src/temp/mkdtemp.lo src/temp/mkstemp.lo src/temp/mktemp.lo src/termios/cfgetospeed.lo src/termios/cfmakeraw.lo src/termios/cfsetospeed.lo src/termios/tcdrain.lo src/termios/tcflow.lo src/termios/tcflush.lo src/termios/tcgetattr.lo src/termios/tcgetsid.lo src/termios/tcsendbreak.lo src/termios/tcsetattr.lo src/thread/__futex.lo src/thread/__lock.lo src/thread/__set_thread_area.lo src/thread/__timedwait.lo src/thread/__unmapself.lo src/thread/__wait.lo src/thread/__wake.lo src/thread/cancel_dummy.lo src/thread/cancel_impl.lo src/thread/cancellation.lo src/thread/clone.lo src/thread/pthread_atfork.lo src/thread/pthread_attr_destroy.lo src/thread/pthread_attr_getdetachstate.lo src/thread/pthread_attr_getguardsize.lo src/thread/pthread_attr_getschedparam.lo src/thread/pthread_attr_getscope.lo src/thread/pthread_attr_getstack.lo src/thread/pthread_attr_getstacksize.lo src/thread/pthread_attr_init.lo src/thread/pthread_attr_setdetachstate.lo src/thread/pthread_attr_setguardsize.lo src/thread/pthread_attr_setschedparam.lo src/thread/pthread_attr_setscope.lo src/thread/pthread_attr_setstack.lo src/thread/pthread_attr_setstacksize.lo src/thread/pthread_barrier_destroy.lo src/thread/pthread_barrier_init.lo src/thread/pthread_barrier_wait.lo src/thread/pthread_barrierattr_destroy.lo src/thread/pthread_barrierattr_getpshared.lo src/thread/pthread_barrierattr_init.lo src/thread/pthread_barrierattr_setpshared.lo src/thread/pthread_cond_broadcast.lo src/thread/pthread_cond_destroy.lo src/thread/pthread_cond_init.lo src/thread/pthread_cond_signal.lo src/thread/pthread_cond_timedwait.lo src/thread/pthread_cond_wait.lo src/thread/pthread_condattr_destroy.lo src/thread/pthread_condattr_getclock.lo src/thread/pthread_condattr_getpshared.lo src/thread/pthread_condattr_init.lo src/thread/pthread_condattr_setclock.lo src/thread/pthread_condattr_setpshared.lo src/thread/pthread_create.lo src/thread/pthread_detach.lo src/thread/pthread_equal.lo src/thread/pthread_getconcurrency.lo src/thread/pthread_getspecific.lo src/thread/pthread_join.lo src/thread/pthread_key_create.lo src/thread/pthread_kill.lo src/thread/pthread_mutex_consistent.lo src/thread/pthread_mutex_destroy.lo src/thread/pthread_mutex_init.lo src/thread/pthread_mutex_lock.lo src/thread/pthread_mutex_timedlock.lo src/thread/pthread_mutex_trylock.lo src/thread/pthread_mutex_unlock.lo src/thread/pthread_mutexattr_destroy.lo src/thread/pthread_mutexattr_getpshared.lo src/thread/pthread_mutexattr_getrobust.lo src/thread/pthread_mutexattr_gettype.lo src/thread/pthread_mutexattr_init.lo src/thread/pthread_mutexattr_setpshared.lo src/thread/pthread_mutexattr_setrobust.lo src/thread/pthread_mutexattr_settype.lo src/thread/pthread_once.lo src/thread/pthread_rwlock_destroy.lo src/thread/pthread_rwlock_init.lo src/thread/pthread_rwlock_rdlock.lo src/thread/pthread_rwlock_timedrdlock.lo src/thread/pthread_rwlock_timedwrlock.lo src/thread/pthread_rwlock_tryrdlock.lo src/thread/pthread_rwlock_trywrlock.lo src/thread/pthread_rwlock_unlock.lo src/thread/pthread_rwlock_wrlock.lo src/thread/pthread_rwlockattr_destroy.lo src/thread/pthread_rwlockattr_getpshared.lo src/thread/pthread_rwlockattr_init.lo src/thread/pthread_rwlockattr_setpshared.lo src/thread/pthread_self.lo src/thread/pthread_setcancelstate.lo src/thread/pthread_setcanceltype.lo src/thread/pthread_setconcurrency.lo src/thread/pthread_setspecific.lo src/thread/pthread_sigmask.lo src/thread/pthread_spin_destroy.lo src/thread/pthread_spin_init.lo src/thread/pthread_spin_lock.lo src/thread/pthread_spin_trylock.lo src/thread/pthread_spin_unlock.lo src/thread/pthread_testcancel.lo src/thread/sem_destroy.lo src/thread/sem_getvalue.lo src/thread/sem_init.lo src/thread/sem_open.lo src/thread/sem_post.lo src/thread/sem_timedwait.lo src/thread/sem_trywait.lo src/thread/sem_unlink.lo src/thread/sem_wait.lo src/thread/synccall.lo src/thread/syscall_cp.lo src/thread/vmlock.lo src/time/__asctime.lo src/time/__time_to_tm.lo src/time/__tm_to_time.lo src/time/asctime.lo src/time/asctime_r.lo src/time/clock.lo src/time/clock_getcpuclockid.lo src/time/clock_getres.lo src/time/clock_gettime.lo src/time/clock_nanosleep.lo src/time/clock_settime.lo src/time/ctime.lo src/time/ctime_r.lo src/time/difftime.lo src/time/getdate.lo src/time/gettimeofday.lo src/time/gmtime.lo src/time/gmtime_r.lo src/time/localtime.lo src/time/localtime_r.lo src/time/mktime.lo src/time/nanosleep.lo src/time/strftime.lo src/time/strptime.lo src/time/time.lo src/time/timegm.lo src/time/timer_create.lo src/time/timer_delete.lo src/time/timer_getoverrun.lo src/time/timer_gettime.lo src/time/timer_settime.lo src/time/times.lo src/time/tzset.lo src/time/utime.lo src/time/wcsftime.lo src/unistd/_exit.lo src/unistd/access.lo src/unistd/acct.lo src/unistd/alarm.lo src/unistd/chdir.lo src/unistd/chown.lo src/unistd/close.lo src/unistd/ctermid.lo src/unistd/dup.lo src/unistd/dup2.lo src/unistd/faccessat.lo src/unistd/fchdir.lo src/unistd/fchown.lo src/unistd/fchownat.lo src/unistd/fdatasync.lo src/unistd/fsync.lo src/unistd/ftruncate.lo src/unistd/getcwd.lo src/unistd/getegid.lo src/unistd/geteuid.lo src/unistd/getgid.lo src/unistd/getgroups.lo src/unistd/gethostname.lo src/unistd/getlogin.lo src/unistd/getlogin_r.lo src/unistd/getpgid.lo src/unistd/getpgrp.lo src/unistd/getpid.lo src/unistd/getppid.lo src/unistd/getsid.lo src/unistd/getuid.lo src/unistd/isatty.lo src/unistd/lchown.lo src/unistd/link.lo src/unistd/linkat.lo src/unistd/lseek.lo src/unistd/nice.lo src/unistd/pause.lo src/unistd/pipe.lo src/unistd/pread.lo src/unistd/preadv.lo src/unistd/pwrite.lo src/unistd/pwritev.lo src/unistd/read.lo src/unistd/readlink.lo src/unistd/readlinkat.lo src/unistd/readv.lo src/unistd/renameat.lo src/unistd/rmdir.lo src/unistd/setegid.lo src/unistd/seteuid.lo src/unistd/setgid.lo src/unistd/setpgid.lo src/unistd/setpgrp.lo src/unistd/setregid.lo src/unistd/setresgid.lo src/unistd/setresuid.lo src/unistd/setreuid.lo src/unistd/setsid.lo src/unistd/setuid.lo src/unistd/setxid.lo src/unistd/sleep.lo src/unistd/symlink.lo src/unistd/symlinkat.lo src/unistd/sync.lo src/unistd/tcgetpgrp.lo src/unistd/tcsetpgrp.lo src/unistd/truncate.lo src/unistd/ttyname.lo src/unistd/ttyname_r.lo src/unistd/ualarm.lo src/unistd/unlink.lo src/unistd/unlinkat.lo src/unistd/usleep.lo src/unistd/write.lo src/unistd/writev.lo -L/usr/local/lib/pcc/i686-pc-linux-gnu/1.1.0.DEVEL/lib -lpcc
--hash-style=both:
-e:
_start:
-Bsymbolic-functions:
-soname=libc.so:
src/aio/aio_cancel.lo:
src/aio/aio_error.lo:
src/aio/aio_fsync.lo:
src/aio/aio_readwrite.lo:
src/aio/aio_return.lo:
src/aio/aio_suspend.lo:
src/aio/lio_listio.lo:
src/complex/__cexp.lo:
src/complex/__cexpf.lo:
src/complex/cabs.lo:
src/complex/cabsf.lo:
src/complex/cabsl.lo:
src/complex/cacos.lo:
src/complex/cacosf.lo:
src/complex/cacosh.lo:
src/complex/cacoshf.lo:
src/complex/cacoshl.lo:
src/complex/cacosl.lo:
src/complex/carg.lo:
src/complex/cargf.lo:
src/complex/cargl.lo:
src/complex/casin.lo:
src/complex/casinf.lo:
src/complex/casinh.lo:
src/complex/casinhf.lo:
src/complex/casinhl.lo:
src/complex/casinl.lo:
src/complex/catan.lo:
src/complex/catanf.lo:
src/complex/catanh.lo:
src/complex/catanhf.lo:
src/complex/catanhl.lo:
src/complex/catanl.lo:
src/complex/ccos.lo:
src/complex/ccosf.lo:
src/complex/ccosh.lo:
src/complex/ccoshf.lo:
src/complex/ccoshl.lo:
src/complex/ccosl.lo:
src/complex/cexp.lo:
src/complex/cexpf.lo:
src/complex/cexpl.lo:
src/complex/cimag.lo:
src/complex/cimagf.lo:
src/complex/cimagl.lo:
src/complex/clog.lo:
src/complex/clogf.lo:
src/complex/clogl.lo:
src/complex/conj.lo:
src/complex/conjf.lo:
src/complex/conjl.lo:
src/complex/cpow.lo:
src/complex/cpowf.lo:
src/complex/cpowl.lo:
src/complex/cproj.lo:
src/complex/cprojf.lo:
src/complex/cprojl.lo:
src/complex/creal.lo:
src/complex/crealf.lo:
src/complex/creall.lo:
src/complex/csin.lo:
src/complex/csinf.lo:
src/complex/csinh.lo:
src/complex/csinhf.lo:
src/complex/csinhl.lo:
src/complex/csinl.lo:
src/complex/csqrt.lo:
src/complex/csqrtf.lo:
src/complex/csqrtl.lo:
src/complex/ctan.lo:
src/complex/ctanf.lo:
src/complex/ctanh.lo:
src/complex/ctanhf.lo:
src/complex/ctanhl.lo:
src/complex/ctanl.lo:
src/conf/confstr.lo:
src/conf/fpathconf.lo:
src/conf/pathconf.lo:
src/conf/sysconf.lo:
src/crypt/crypt.lo:
src/crypt/crypt_blowfish.lo:
src/crypt/crypt_des.lo:
src/crypt/crypt_md5.lo:
src/crypt/crypt_r.lo:
src/crypt/crypt_sha256.lo:
src/crypt/crypt_sha512.lo:
src/ctype/__ctype_b_loc.lo:
src/ctype/__ctype_get_mb_cur_max.lo:
src/ctype/__ctype_tolower_loc.lo:
src/ctype/__ctype_toupper_loc.lo:
src/ctype/isalnum.lo:
src/ctype/isalpha.lo:
src/ctype/isascii.lo:
src/ctype/isblank.lo:
src/ctype/iscntrl.lo:
src/ctype/isdigit.lo:
src/ctype/isgraph.lo:
src/ctype/islower.lo:
src/ctype/isprint.lo:
src/ctype/ispunct.lo:
src/ctype/isspace.lo:
src/ctype/isupper.lo:
src/ctype/iswalnum.lo:
src/ctype/iswalpha.lo:
src/ctype/iswblank.lo:
src/ctype/iswcntrl.lo:
src/ctype/iswctype.lo:
src/ctype/iswdigit.lo:
src/ctype/iswgraph.lo:
src/ctype/iswlower.lo:
src/ctype/iswprint.lo:
src/ctype/iswpunct.lo:
src/ctype/iswspace.lo:
src/ctype/iswupper.lo:
src/ctype/iswxdigit.lo:
src/ctype/isxdigit.lo:
src/ctype/toascii.lo:
src/ctype/tolower.lo:
src/ctype/toupper.lo:
src/ctype/towctrans.lo:
src/ctype/wcswidth.lo:
src/ctype/wctrans.lo:
src/ctype/wcwidth.lo:
src/dirent/__getdents.lo:
src/dirent/alphasort.lo:
src/dirent/closedir.lo:
src/dirent/dirfd.lo:
src/dirent/fdopendir.lo:
src/dirent/opendir.lo:
src/dirent/readdir.lo:
src/dirent/readdir_r.lo:
src/dirent/rewinddir.lo:
src/dirent/scandir.lo:
src/dirent/seekdir.lo:
src/dirent/telldir.lo:
src/dirent/versionsort.lo:
src/env/__environ.lo:
src/env/__init_security.lo:
src/env/__libc_csu_fini.lo:
src/env/__libc_csu_init.lo:
src/env/__libc_start_main.lo:
src/env/__stack_chk_fail.lo:
src/env/clearenv.lo:
src/env/getenv.lo:
src/env/putenv.lo:
src/env/setenv.lo:
src/env/unsetenv.lo:
src/errno/__errno_location.lo:
src/errno/strerror.lo:
src/exit/_Exit.lo:
src/exit/abort.lo:
src/exit/assert.lo:
src/exit/at_quick_exit.lo:
src/exit/atexit.lo:
src/exit/exit.lo:
src/exit/quick_exit.lo:
src/fcntl/creat.lo:
src/fcntl/fcntl.lo:
src/fcntl/open.lo:
src/fcntl/openat.lo:
src/fcntl/posix_fadvise.lo:
src/fcntl/posix_fallocate.lo:
src/fenv/fegetexceptflag.lo:
src/fenv/feholdexcept.lo:
src/fenv/fenv.lo:
src/fenv/fesetexceptflag.lo:
src/fenv/feupdateenv.lo:
src/internal/floatscan.lo:
src/internal/intscan.lo:
src/internal/libc.lo:
src/internal/shgetc.lo:
src/internal/syscall.lo:
src/internal/syscall_ret.lo:
src/ipc/ftok.lo:
src/ipc/msgctl.lo:
src/ipc/msgget.lo:
src/ipc/msgrcv.lo:
src/ipc/msgsnd.lo:
src/ipc/semctl.lo:
src/ipc/semget.lo:
src/ipc/semop.lo:
src/ipc/shmat.lo:
src/ipc/shmctl.lo:
src/ipc/shmdt.lo:
src/ipc/shmget.lo:
src/ldso/dladdr.lo:
src/ldso/dlsym.lo:
src/ldso/dynlink.lo:
src/ldso/start.lo:
src/legacy/cuserid.lo:
src/legacy/daemon.lo:
src/legacy/err.lo:
src/legacy/ftw.lo:
src/legacy/futimes.lo:
src/legacy/getdtablesize.lo:
src/legacy/getpagesize.lo:
src/legacy/getpass.lo:
src/legacy/getusershell.lo:
src/legacy/isastream.lo:
src/legacy/lutimes.lo:
src/legacy/ulimit.lo:
src/legacy/utmpx.lo:
src/linux/accept4.lo:
src/linux/adjtime.lo:
src/linux/adjtimex.lo:
src/linux/brk.lo:
src/linux/cap.lo:
src/linux/chroot.lo:
src/linux/clock_adjtime.lo:
src/linux/dup3.lo:
src/linux/epoll.lo:
src/linux/eventfd.lo:
src/linux/fallocate.lo:
src/linux/flock.lo:
src/linux/inotify.lo:
src/linux/ioperm.lo:
src/linux/iopl.lo:
src/linux/klogctl.lo:
src/linux/module.lo:
src/linux/mount.lo:
src/linux/pipe2.lo:
src/linux/pivot_root.lo:
src/linux/ppoll.lo:
src/linux/prctl.lo:
src/linux/prlimit.lo:
src/linux/process_vm.lo:
src/linux/ptrace.lo:
src/linux/readahead.lo:
src/linux/reboot.lo:
src/linux/remap_file_pages.lo:
src/linux/sbrk.lo:
src/linux/sendfile.lo:
src/linux/setfsgid.lo:
src/linux/setfsuid.lo:
src/linux/setgroups.lo:
src/linux/sethostname.lo:
src/linux/setns.lo:
src/linux/settimeofday.lo:
src/linux/signalfd.lo:
src/linux/splice.lo:
src/linux/stime.lo:
src/linux/swap.lo:
src/linux/sync_file_range.lo:
src/linux/syncfs.lo:
src/linux/sysinfo.lo:
src/linux/tee.lo:
src/linux/timerfd.lo:
src/linux/unshare.lo:
src/linux/utimes.lo:
src/linux/vhangup.lo:
src/linux/vmsplice.lo:
src/linux/wait3.lo:
src/linux/wait4.lo:
src/linux/xattr.lo:
src/locale/catclose.lo:
src/locale/catgets.lo:
src/locale/catopen.lo:
src/locale/duplocale.lo:
src/locale/freelocale.lo:
src/locale/iconv.lo:
src/locale/intl.lo:
src/locale/isalnum_l.lo:
src/locale/isalpha_l.lo:
src/locale/isblank_l.lo:
src/locale/iscntrl_l.lo:
src/locale/isdigit_l.lo:
src/locale/isgraph_l.lo:
src/locale/islower_l.lo:
src/locale/isprint_l.lo:
src/locale/ispunct_l.lo:
src/locale/isspace_l.lo:
src/locale/isupper_l.lo:
src/locale/iswalnum_l.lo:
src/locale/iswalpha_l.lo:
src/locale/iswblank_l.lo:
src/locale/iswcntrl_l.lo:
src/locale/iswctype_l.lo:
src/locale/iswdigit_l.lo:
src/locale/iswgraph_l.lo:
src/locale/iswlower_l.lo:
src/locale/iswprint_l.lo:
src/locale/iswpunct_l.lo:
src/locale/iswspace_l.lo:
src/locale/iswupper_l.lo:
src/locale/iswxdigit_l.lo:
src/locale/isxdigit_l.lo:
src/locale/langinfo.lo:
src/locale/localeconv.lo:
src/locale/newlocale.lo:
src/locale/nl_langinfo_l.lo:
src/locale/setlocale.lo:
src/locale/strcasecmp_l.lo:
src/locale/strcoll.lo:
src/locale/strcoll_l.lo:
src/locale/strerror_l.lo:
src/locale/strfmon.lo:
src/locale/strftime_l.lo:
src/locale/strncasecmp_l.lo:
src/locale/strxfrm.lo:
src/locale/strxfrm_l.lo:
src/locale/tolower_l.lo:
src/locale/toupper_l.lo:
src/locale/towctrans_l.lo:
src/locale/towlower_l.lo:
src/locale/towupper_l.lo:
src/locale/uselocale.lo:
src/locale/wcscoll.lo:
src/locale/wcscoll_l.lo:
src/locale/wcsxfrm.lo:
src/locale/wcsxfrm_l.lo:
src/locale/wctrans_l.lo:
src/locale/wctype_l.lo:
src/malloc/__brk.lo:
src/malloc/aligned_alloc.lo:
src/malloc/calloc.lo:
src/malloc/lite_malloc.lo:
src/malloc/malloc.lo:
src/malloc/memalign.lo:
src/malloc/posix_memalign.lo:
src/math/__cos.lo:
src/math/__cosdf.lo:
src/math/__cosl.lo:
src/math/__expo2.lo:
src/math/__expo2f.lo:
src/math/__fpclassify.lo:
src/math/__fpclassifyf.lo:
src/math/__fpclassifyl.lo:
src/math/__invtrigl.lo:
src/math/__polevll.lo:
src/math/__rem_pio2.lo:
src/math/__rem_pio2_large.lo:
src/math/__rem_pio2f.lo:
src/math/__rem_pio2l.lo:
src/math/__signbit.lo:
src/math/__signbitf.lo:
src/math/__signbitl.lo:
src/math/__sin.lo:
src/math/__sindf.lo:
src/math/__sinl.lo:
src/math/__tan.lo:
src/math/__tandf.lo:
src/math/__tanl.lo:
src/math/acos.lo:
src/math/acosf.lo:
src/math/acosh.lo:
src/math/acoshf.lo:
src/math/acoshl.lo:
src/math/acosl.lo:
src/math/asin.lo:
src/math/asinf.lo:
src/math/asinh.lo:
src/math/asinhf.lo:
src/math/asinhl.lo:
src/math/asinl.lo:
src/math/atan.lo:
src/math/atan2.lo:
src/math/atan2f.lo:
src/math/atan2l.lo:
src/math/atanf.lo:
src/math/atanh.lo:
src/math/atanhf.lo:
src/math/atanhl.lo:
src/math/atanl.lo:
src/math/cbrt.lo:
src/math/cbrtf.lo:
src/math/cbrtl.lo:
src/math/ceil.lo:
src/math/ceilf.lo:
src/math/ceill.lo:
src/math/copysign.lo:
src/math/copysignf.lo:
src/math/copysignl.lo:
src/math/cos.lo:
src/math/cosf.lo:
src/math/cosh.lo:
src/math/coshf.lo:
src/math/coshl.lo:
src/math/cosl.lo:
src/math/erf.lo:
src/math/erff.lo:
src/math/erfl.lo:
src/math/exp.lo:
src/math/exp10.lo:
src/math/exp10f.lo:
src/math/exp10l.lo:
src/math/exp2.lo:
src/math/exp2f.lo:
src/math/exp2l.lo:
src/math/expf.lo:
src/math/expl.lo:
src/math/expm1.lo:
src/math/expm1f.lo:
src/math/expm1l.lo:
src/math/fabs.lo:
src/math/fabsf.lo:
src/math/fabsl.lo:
src/math/fdim.lo:
src/math/fdimf.lo:
src/math/fdiml.lo:
src/math/floor.lo:
src/math/floorf.lo:
src/math/floorl.lo:
src/math/fma.lo:
src/math/fmaf.lo:
src/math/fmal.lo:
src/math/fmax.lo:
src/math/fmaxf.lo:
src/math/fmaxl.lo:
src/math/fmin.lo:
src/math/fminf.lo:
src/math/fminl.lo:
src/math/fmod.lo:
src/math/fmodf.lo:
src/math/fmodl.lo:
src/math/frexp.lo:
src/math/frexpf.lo:
src/math/frexpl.lo:
src/math/hypot.lo:
src/math/hypotf.lo:
src/math/hypotl.lo:
src/math/ilogb.lo:
src/math/ilogbf.lo:
src/math/ilogbl.lo:
src/math/j0.lo:
src/math/j0f.lo:
src/math/j1.lo:
src/math/j1f.lo:
src/math/jn.lo:
src/math/jnf.lo:
src/math/ldexp.lo:
src/math/ldexpf.lo:
src/math/ldexpl.lo:
src/math/lgamma.lo:
src/math/lgamma_r.lo:
src/math/lgammaf.lo:
src/math/lgammaf_r.lo:
src/math/lgammal.lo:
src/math/llrint.lo:
src/math/llrintf.lo:
src/math/llrintl.lo:
src/math/llround.lo:
src/math/llroundf.lo:
src/math/llroundl.lo:
src/math/log.lo:
src/math/log10.lo:
src/math/log10f.lo:
src/math/log10l.lo:
src/math/log1p.lo:
src/math/log1pf.lo:
src/math/log1pl.lo:
src/math/log2.lo:
src/math/log2f.lo:
src/math/log2l.lo:
src/math/logb.lo:
src/math/logbf.lo:
src/math/logbl.lo:
src/math/logf.lo:
src/math/logl.lo:
src/math/lrint.lo:
src/math/lrintf.lo:
src/math/lrintl.lo:
src/math/lround.lo:
src/math/lroundf.lo:
src/math/lroundl.lo:
src/math/modf.lo:
src/math/modff.lo:
src/math/modfl.lo:
src/math/nan.lo:
src/math/nanf.lo:
src/math/nanl.lo:
src/math/nearbyint.lo:
src/math/nearbyintf.lo:
src/math/nearbyintl.lo:
src/math/nextafter.lo:
src/math/nextafterf.lo:
src/math/nextafterl.lo:
src/math/nexttoward.lo:
src/math/nexttowardf.lo:
src/math/nexttowardl.lo:
src/math/pow.lo:
src/math/powf.lo:
src/math/powl.lo:
src/math/remainder.lo:
src/math/remainderf.lo:
src/math/remainderl.lo:
src/math/remquo.lo:
src/math/remquof.lo:
src/math/remquol.lo:
src/math/rint.lo:
src/math/rintf.lo:
src/math/rintl.lo:
src/math/round.lo:
src/math/roundf.lo:
src/math/roundl.lo:
src/math/scalb.lo:
src/math/scalbf.lo:
src/math/scalbln.lo:
src/math/scalblnf.lo:
src/math/scalblnl.lo:
src/math/scalbn.lo:
src/math/scalbnf.lo:
src/math/scalbnl.lo:
src/math/signgam.lo:
src/math/significand.lo:
src/math/significandf.lo:
src/math/sin.lo:
src/math/sincos.lo:
src/math/sincosf.lo:
src/math/sincosl.lo:
src/math/sinf.lo:
src/math/sinh.lo:
src/math/sinhf.lo:
src/math/sinhl.lo:
src/math/sinl.lo:
src/math/sqrt.lo:
src/math/sqrtf.lo:
src/math/sqrtl.lo:
src/math/tan.lo:
src/math/tanf.lo:
src/math/tanh.lo:
src/math/tanhf.lo:
src/math/tanhl.lo:
src/math/tanl.lo:
src/math/tgamma.lo:
src/math/tgammaf.lo:
src/math/tgammal.lo:
src/math/trunc.lo:
src/math/truncf.lo:
src/math/truncl.lo:
src/misc/a64l.lo:
src/misc/basename.lo:
src/misc/dirname.lo:
src/misc/ffs.lo:
src/misc/forkpty.lo:
src/misc/get_current_dir_name.lo:
src/misc/getdomainname.lo:
src/misc/getgrouplist.lo:
src/misc/gethostid.lo:
src/misc/getopt.lo:
src/misc/getopt_long.lo:
src/misc/getpriority.lo:
src/misc/getresgid.lo:
src/misc/getresuid.lo:
src/misc/getrlimit.lo:
src/misc/getrusage.lo:
src/misc/getsubopt.lo:
src/misc/initgroups.lo:
src/misc/ioctl.lo:
src/misc/lockf.lo:
src/misc/mntent.lo:
src/misc/nftw.lo:
src/misc/openpty.lo:
src/misc/ptsname.lo:
src/misc/pty.lo:
src/misc/realpath.lo:
src/misc/setdomainname.lo:
src/misc/setpriority.lo:
src/misc/setrlimit.lo:
src/misc/syscall.lo:
src/misc/syslog.lo:
src/misc/uname.lo:
src/misc/wordexp.lo:
src/mman/madvise.lo:
src/mman/mincore.lo:
src/mman/mlock.lo:
src/mman/mlockall.lo:
src/mman/mmap.lo:
src/mman/mprotect.lo:
src/mman/mremap.lo:
src/mman/msync.lo:
src/mman/munlock.lo:
src/mman/munlockall.lo:
src/mman/munmap.lo:
src/mman/posix_madvise.lo:
src/mman/shm_open.lo:
src/mman/shm_unlink.lo:
src/mq/mq_close.lo:
src/mq/mq_getattr.lo:
src/mq/mq_notify.lo:
src/mq/mq_open.lo:
src/mq/mq_receive.lo:
src/mq/mq_send.lo:
src/mq/mq_setattr.lo:
src/mq/mq_timedreceive.lo:
src/mq/mq_timedsend.lo:
src/mq/mq_unlink.lo:
src/multibyte/btowc.lo:
src/multibyte/internal.lo:
src/multibyte/mblen.lo:
src/multibyte/mbrlen.lo:
src/multibyte/mbrtowc.lo:
src/multibyte/mbsinit.lo:
src/multibyte/mbsnrtowcs.lo:
src/multibyte/mbsrtowcs.lo:
src/multibyte/mbstowcs.lo:
src/multibyte/mbtowc.lo:
src/multibyte/wcrtomb.lo:
src/multibyte/wcsnrtombs.lo:
src/multibyte/wcsrtombs.lo:
src/multibyte/wcstombs.lo:
src/multibyte/wctob.lo:
src/multibyte/wctomb.lo:
src/network/__dns.lo:
src/network/__ipparse.lo:
src/network/accept.lo:
src/network/bind.lo:
src/network/connect.lo:
src/network/dn_expand.lo:
src/network/ent.lo:
src/network/freeaddrinfo.lo:
src/network/gai_strerror.lo:
src/network/getaddrinfo.lo:
src/network/gethostbyaddr.lo:
src/network/gethostbyaddr_r.lo:
src/network/gethostbyname.lo:
src/network/gethostbyname2.lo:
src/network/gethostbyname2_r.lo:
src/network/gethostbyname_r.lo:
src/network/getnameinfo.lo:
src/network/getpeername.lo:
src/network/getservbyname.lo:
src/network/getservbyname_r.lo:
src/network/getservbyport.lo:
src/network/getservbyport_r.lo:
src/network/getsockname.lo:
src/network/getsockopt.lo:
src/network/h_errno.lo:
src/network/hstrerror.lo:
src/network/htonl.lo:
src/network/htons.lo:
src/network/if_freenameindex.lo:
src/network/if_indextoname.lo:
src/network/if_nameindex.lo:
src/network/if_nametoindex.lo:
src/network/in6addr_any.lo:
src/network/in6addr_loopback.lo:
src/network/inet_addr.lo:
src/network/inet_aton.lo:
src/network/inet_ntoa.lo:
src/network/inet_ntop.lo:
src/network/inet_pton.lo:
src/network/listen.lo:
src/network/netname.lo:
src/network/ntohl.lo:
src/network/ntohs.lo:
src/network/proto.lo:
src/network/recv.lo:
src/network/recvfrom.lo:
src/network/recvmsg.lo:
src/network/res_init.lo:
src/network/res_query.lo:
src/network/res_state.lo:
src/network/send.lo:
src/network/sendmsg.lo:
src/network/sendto.lo:
src/network/serv.lo:
src/network/setsockopt.lo:
src/network/shutdown.lo:
src/network/sockatmark.lo:
src/network/socket.lo:
src/network/socketpair.lo:
src/passwd/fgetpwent.lo:
src/passwd/getgr_r.lo:
src/passwd/getgrent.lo:
src/passwd/getgrent_a.lo:
src/passwd/getpw_r.lo:
src/passwd/getpwent.lo:
src/passwd/getpwent_a.lo:
src/passwd/getspent.lo:
src/passwd/getspnam.lo:
src/passwd/getspnam_r.lo:
src/passwd/lckpwdf.lo:
src/prng/__rand48_step.lo:
src/prng/__seed48.lo:
src/prng/drand48.lo:
src/prng/lcong48.lo:
src/prng/lrand48.lo:
src/prng/mrand48.lo:
src/prng/rand.lo:
src/prng/rand_r.lo:
src/prng/random.lo:
src/prng/seed48.lo:
src/prng/srand48.lo:
src/process/execl.lo:
src/process/execle.lo:
src/process/execlp.lo:
src/process/execv.lo:
src/process/execve.lo:
src/process/execvp.lo:
src/process/fexecve.lo:
src/process/fork.lo:
src/process/posix_spawn.lo:
src/process/posix_spawn_file_actions_addclose.lo:
src/process/posix_spawn_file_actions_adddup2.lo:
src/process/posix_spawn_file_actions_addopen.lo:
src/process/posix_spawn_file_actions_destroy.lo:
src/process/posix_spawn_file_actions_init.lo:
src/process/posix_spawnattr_destroy.lo:
src/process/posix_spawnattr_getflags.lo:
src/process/posix_spawnattr_getpgroup.lo:
src/process/posix_spawnattr_getsigdefault.lo:
src/process/posix_spawnattr_getsigmask.lo:
src/process/posix_spawnattr_init.lo:
src/process/posix_spawnattr_setflags.lo:
src/process/posix_spawnattr_setpgroup.lo:
src/process/posix_spawnattr_setsigdefault.lo:
src/process/posix_spawnattr_setsigmask.lo:
src/process/posix_spawnp.lo:
src/process/system.lo:
src/process/vfork.lo:
src/process/wait.lo:
src/process/waitid.lo:
src/process/waitpid.lo:
src/regex/fnmatch.lo:
src/regex/glob.lo:
src/regex/regcomp.lo:
src/regex/regerror.lo:
src/regex/regexec.lo:
src/regex/tre-mem.lo:
src/sched/sched_get_priority_max.lo:
src/sched/sched_getparam.lo:
src/sched/sched_getscheduler.lo:
src/sched/sched_rr_get_interval.lo:
src/sched/sched_setparam.lo:
src/sched/sched_setscheduler.lo:
src/sched/sched_yield.lo:
src/search/hsearch.lo:
src/search/insque.lo:
src/search/lsearch.lo:
src/search/tdestroy.lo:
src/search/tsearch_avl.lo:
src/select/poll.lo:
src/select/pselect.lo:
src/select/select.lo:
src/setjmp/longjmp.lo:
src/setjmp/setjmp.lo:
src/signal/getitimer.lo:
src/signal/kill.lo:
src/signal/killpg.lo:
src/signal/psiginfo.lo:
src/signal/psignal.lo:
src/signal/raise.lo:
src/signal/restore.lo:
src/signal/setitimer.lo:
src/signal/sigaction.lo:
src/signal/sigaddset.lo:
src/signal/sigaltstack.lo:
src/signal/sigdelset.lo:
src/signal/sigemptyset.lo:
src/signal/sigfillset.lo:
src/signal/sighold.lo:
src/signal/sigignore.lo:
src/signal/siginterrupt.lo:
src/signal/sigisemptyset.lo:
src/signal/sigismember.lo:
src/signal/siglongjmp.lo:
src/signal/signal.lo:
src/signal/sigpause.lo:
src/signal/sigpending.lo:
src/signal/sigprocmask.lo:
src/signal/sigqueue.lo:
src/signal/sigrelse.lo:
src/signal/sigrtmax.lo:
src/signal/sigrtmin.lo:
src/signal/sigset.lo:
src/signal/sigsetjmp.lo:
src/signal/sigsuspend.lo:
src/signal/sigtimedwait.lo:
src/signal/sigwait.lo:
src/signal/sigwaitinfo.lo:
src/stat/__fxstat.lo:
src/stat/__fxstatat.lo:
src/stat/__lxstat.lo:
src/stat/__xstat.lo:
src/stat/chmod.lo:
src/stat/fchmod.lo:
src/stat/fchmodat.lo:
src/stat/fstat.lo:
src/stat/fstatat.lo:
src/stat/futimens.lo:
src/stat/lchmod.lo:
src/stat/lstat.lo:
src/stat/mkdir.lo:
src/stat/mkdirat.lo:
src/stat/mkfifo.lo:
src/stat/mkfifoat.lo:
src/stat/mknod.lo:
src/stat/mknodat.lo:
src/stat/stat.lo:
src/stat/statvfs.lo:
src/stat/umask.lo:
src/stat/utimensat.lo:
src/stdio/__fclose_ca.lo:
src/stdio/__fdopen.lo:
src/stdio/__fopen_rb_ca.lo:
src/stdio/__lockfile.lo:
src/stdio/__overflow.lo:
src/stdio/__stdio_close.lo:
src/stdio/__stdio_exit.lo:
src/stdio/__stdio_read.lo:
src/stdio/__stdio_seek.lo:
src/stdio/__stdio_write.lo:
src/stdio/__stdout_write.lo:
src/stdio/__string_read.lo:
src/stdio/__toread.lo:
src/stdio/__towrite.lo:
src/stdio/__uflow.lo:
src/stdio/asprintf.lo:
src/stdio/clearerr.lo:
src/stdio/dprintf.lo:
src/stdio/ext.lo:
src/stdio/ext2.lo:
src/stdio/fclose.lo:
src/stdio/feof.lo:
src/stdio/ferror.lo:
src/stdio/fflush.lo:
src/stdio/fgetc.lo:
src/stdio/fgetln.lo:
src/stdio/fgetpos.lo:
src/stdio/fgets.lo:
src/stdio/fgetwc.lo:
src/stdio/fgetws.lo:
src/stdio/fileno.lo:
src/stdio/flockfile.lo:
src/stdio/fmemopen.lo:
src/stdio/fopen.lo:
src/stdio/fprintf.lo:
src/stdio/fputc.lo:
src/stdio/fputs.lo:
src/stdio/fputwc.lo:
src/stdio/fputws.lo:
src/stdio/fread.lo:
src/stdio/freopen.lo:
src/stdio/fscanf.lo:
src/stdio/fseek.lo:
src/stdio/fsetpos.lo:
src/stdio/ftell.lo:
src/stdio/ftrylockfile.lo:
src/stdio/funlockfile.lo:
src/stdio/fwide.lo:
src/stdio/fwprintf.lo:
src/stdio/fwrite.lo:
src/stdio/fwscanf.lo:
src/stdio/getc_unlocked.lo:
src/stdio/getchar.lo:
src/stdio/getchar_unlocked.lo:
src/stdio/getdelim.lo:
src/stdio/getline.lo:
src/stdio/gets.lo:
src/stdio/getw.lo:
src/stdio/getwc.lo:
src/stdio/getwchar.lo:
src/stdio/open_memstream.lo:
src/stdio/open_wmemstream.lo:
src/stdio/pclose.lo:
src/stdio/perror.lo:
src/stdio/popen.lo:
src/stdio/printf.lo:
src/stdio/putc_unlocked.lo:
src/stdio/putchar.lo:
src/stdio/putchar_unlocked.lo:
src/stdio/puts.lo:
src/stdio/putw.lo:
src/stdio/putwc.lo:
src/stdio/putwchar.lo:
src/stdio/remove.lo:
src/stdio/rename.lo:
src/stdio/rewind.lo:
src/stdio/scanf.lo:
src/stdio/setbuf.lo:
src/stdio/setbuffer.lo:
src/stdio/setlinebuf.lo:
src/stdio/setvbuf.lo:
src/stdio/snprintf.lo:
src/stdio/sprintf.lo:
src/stdio/sscanf.lo:
src/stdio/stderr.lo:
src/stdio/stdin.lo:
src/stdio/stdout.lo:
src/stdio/swprintf.lo:
src/stdio/swscanf.lo:
src/stdio/tempnam.lo:
src/stdio/tmpfile.lo:
src/stdio/tmpnam.lo:
src/stdio/ungetc.lo:
src/stdio/ungetwc.lo:
src/stdio/vasprintf.lo:
src/stdio/vdprintf.lo:
src/stdio/vfprintf.lo:
src/stdio/vfscanf.lo:
src/stdio/vfwprintf.lo:
src/stdio/vfwscanf.lo:
src/stdio/vprintf.lo:
src/stdio/vscanf.lo:
src/stdio/vsnprintf.lo:
src/stdio/vsprintf.lo:
src/stdio/vsscanf.lo:
src/stdio/vswprintf.lo:
src/stdio/vswscanf.lo:
src/stdio/vwprintf.lo:
src/stdio/vwscanf.lo:
src/stdio/wprintf.lo:
src/stdio/wscanf.lo:
src/stdlib/abs.lo:
src/stdlib/atof.lo:
src/stdlib/atoi.lo:
src/stdlib/atol.lo:
src/stdlib/atoll.lo:
src/stdlib/bsearch.lo:
src/stdlib/div.lo:
src/stdlib/ecvt.lo:
src/stdlib/fcvt.lo:
src/stdlib/gcvt.lo:
src/stdlib/imaxabs.lo:
src/stdlib/imaxdiv.lo:
src/stdlib/labs.lo:
src/stdlib/ldiv.lo:
src/stdlib/llabs.lo:
src/stdlib/lldiv.lo:
src/stdlib/qsort.lo:
src/stdlib/strtod.lo:
src/stdlib/strtol.lo:
src/stdlib/wcstod.lo:
src/stdlib/wcstol.lo:
src/string/bcmp.lo:
src/string/bcopy.lo:
src/string/bzero.lo:
src/string/index.lo:
src/string/memccpy.lo:
src/string/memchr.lo:
src/string/memcmp.lo:
src/string/memcpy.lo:
src/string/memmove.lo:
src/string/mempcpy.lo:
src/string/memrchr.lo:
src/string/memset.lo:
src/string/rindex.lo:
src/string/stpcpy.lo:
src/string/stpncpy.lo:
src/string/strcasecmp.lo:
src/string/strcasestr.lo:
src/string/strcat.lo:
src/string/strchr.lo:
src/string/strchrnul.lo:
src/string/strcmp.lo:
src/string/strcpy.lo:
src/string/strcspn.lo:
src/string/strdup.lo:
src/string/strerror_r.lo:
src/string/strlcat.lo:
src/string/strlcpy.lo:
src/string/strlen.lo:
src/string/strncasecmp.lo:
src/string/strncat.lo:
src/string/strncmp.lo:
src/string/strncpy.lo:
src/string/strndup.lo:
src/string/strnlen.lo:
src/string/strpbrk.lo:
src/string/strrchr.lo:
src/string/strsep.lo:
src/string/strsignal.lo:
src/string/strspn.lo:
src/string/strstr.lo:
src/string/strtok.lo:
src/string/strtok_r.lo:
src/string/strverscmp.lo:
src/string/swab.lo:
src/string/wcpcpy.lo:
src/string/wcpncpy.lo:
src/string/wcscasecmp.lo:
src/string/wcscasecmp_l.lo:
src/string/wcscat.lo:
src/string/wcschr.lo:
src/string/wcscmp.lo:
src/string/wcscpy.lo:
src/string/wcscspn.lo:
src/string/wcsdup.lo:
src/string/wcslen.lo:
src/string/wcsncasecmp.lo:
src/string/wcsncasecmp_l.lo:
src/string/wcsncat.lo:
src/string/wcsncmp.lo:
src/string/wcsncpy.lo:
src/string/wcsnlen.lo:
src/string/wcspbrk.lo:
src/string/wcsrchr.lo:
src/string/wcsspn.lo:
src/string/wcsstr.lo:
src/string/wcstok.lo:
src/string/wcswcs.lo:
src/string/wmemchr.lo:
src/string/wmemcmp.lo:
src/string/wmemcpy.lo:
src/string/wmemmove.lo:
src/string/wmemset.lo:
src/temp/mkdtemp.lo:
src/temp/mkstemp.lo:
src/temp/mktemp.lo:
src/termios/cfgetospeed.lo:
src/termios/cfmakeraw.lo:
src/termios/cfsetospeed.lo:
src/termios/tcdrain.lo:
src/termios/tcflow.lo:
src/termios/tcflush.lo:
src/termios/tcgetattr.lo:
src/termios/tcgetsid.lo:
src/termios/tcsendbreak.lo:
src/termios/tcsetattr.lo:
src/thread/__futex.lo:
src/thread/__lock.lo:
src/thread/__set_thread_area.lo:
src/thread/__timedwait.lo:
src/thread/__unmapself.lo:
src/thread/__wait.lo:
src/thread/__wake.lo:
src/thread/cancel_dummy.lo:
src/thread/cancel_impl.lo:
src/thread/cancellation.lo:
src/thread/clone.lo:
src/thread/pthread_atfork.lo:
src/thread/pthread_attr_destroy.lo:
src/thread/pthread_attr_getdetachstate.lo:
src/thread/pthread_attr_getguardsize.lo:
src/thread/pthread_attr_getschedparam.lo:
src/thread/pthread_attr_getscope.lo:
src/thread/pthread_attr_getstack.lo:
src/thread/pthread_attr_getstacksize.lo:
src/thread/pthread_attr_init.lo:
src/thread/pthread_attr_setdetachstate.lo:
src/thread/pthread_attr_setguardsize.lo:
src/thread/pthread_attr_setschedparam.lo:
src/thread/pthread_attr_setscope.lo:
src/thread/pthread_attr_setstack.lo:
src/thread/pthread_attr_setstacksize.lo:
src/thread/pthread_barrier_destroy.lo:
src/thread/pthread_barrier_init.lo:
src/thread/pthread_barrier_wait.lo:
src/thread/pthread_barrierattr_destroy.lo:
src/thread/pthread_barrierattr_getpshared.lo:
src/thread/pthread_barrierattr_init.lo:
src/thread/pthread_barrierattr_setpshared.lo:
src/thread/pthread_cond_broadcast.lo:
src/thread/pthread_cond_destroy.lo:
src/thread/pthread_cond_init.lo:
src/thread/pthread_cond_signal.lo:
src/thread/pthread_cond_timedwait.lo:
src/thread/pthread_cond_wait.lo:
src/thread/pthread_condattr_destroy.lo:
src/thread/pthread_condattr_getclock.lo:
src/thread/pthread_condattr_getpshared.lo:
src/thread/pthread_condattr_init.lo:
src/thread/pthread_condattr_setclock.lo:
src/thread/pthread_condattr_setpshared.lo:
src/thread/pthread_create.lo:
src/thread/pthread_detach.lo:
src/thread/pthread_equal.lo:
src/thread/pthread_getconcurrency.lo:
src/thread/pthread_getspecific.lo:
src/thread/pthread_join.lo:
src/thread/pthread_key_create.lo:
src/thread/pthread_kill.lo:
src/thread/pthread_mutex_consistent.lo:
src/thread/pthread_mutex_destroy.lo:
src/thread/pthread_mutex_init.lo:
src/thread/pthread_mutex_lock.lo:
src/thread/pthread_mutex_timedlock.lo:
src/thread/pthread_mutex_trylock.lo:
src/thread/pthread_mutex_unlock.lo:
src/thread/pthread_mutexattr_destroy.lo:
src/thread/pthread_mutexattr_getpshared.lo:
src/thread/pthread_mutexattr_getrobust.lo:
src/thread/pthread_mutexattr_gettype.lo:
src/thread/pthread_mutexattr_init.lo:
src/thread/pthread_mutexattr_setpshared.lo:
src/thread/pthread_mutexattr_setrobust.lo:
src/thread/pthread_mutexattr_settype.lo:
src/thread/pthread_once.lo:
src/thread/pthread_rwlock_destroy.lo:
src/thread/pthread_rwlock_init.lo:
src/thread/pthread_rwlock_rdlock.lo:
src/thread/pthread_rwlock_timedrdlock.lo:
src/thread/pthread_rwlock_timedwrlock.lo:
src/thread/pthread_rwlock_tryrdlock.lo:
src/thread/pthread_rwlock_trywrlock.lo:
src/thread/pthread_rwlock_unlock.lo:
src/thread/pthread_rwlock_wrlock.lo:
src/thread/pthread_rwlockattr_destroy.lo:
src/thread/pthread_rwlockattr_getpshared.lo:
src/thread/pthread_rwlockattr_init.lo:
src/thread/pthread_rwlockattr_setpshared.lo:
src/thread/pthread_self.lo:
src/thread/pthread_setcancelstate.lo:
src/thread/pthread_setcanceltype.lo:
src/thread/pthread_setconcurrency.lo:
src/thread/pthread_setspecific.lo:
src/thread/pthread_sigmask.lo:
src/thread/pthread_spin_destroy.lo:
src/thread/pthread_spin_init.lo:
src/thread/pthread_spin_lock.lo:
src/thread/pthread_spin_trylock.lo:
src/thread/pthread_spin_unlock.lo:
src/thread/pthread_testcancel.lo:
src/thread/sem_destroy.lo:
src/thread/sem_getvalue.lo:
src/thread/sem_init.lo:
src/thread/sem_open.lo:
src/thread/sem_post.lo:
src/thread/sem_timedwait.lo:
src/thread/sem_trywait.lo:
src/thread/sem_unlink.lo:
src/thread/sem_wait.lo:
src/thread/synccall.lo:
src/thread/syscall_cp.lo:
src/thread/vmlock.lo:
src/time/__asctime.lo:
src/time/__time_to_tm.lo:
src/time/__tm_to_time.lo:
src/time/asctime.lo:
src/time/asctime_r.lo:
src/time/clock.lo:
src/time/clock_getcpuclockid.lo:
src/time/clock_getres.lo:
src/time/clock_gettime.lo:
src/time/clock_nanosleep.lo:
src/time/clock_settime.lo:
src/time/ctime.lo:
src/time/ctime_r.lo:
src/time/difftime.lo:
src/time/getdate.lo:
src/time/gettimeofday.lo:
src/time/gmtime.lo:
src/time/gmtime_r.lo:
src/time/localtime.lo:
src/time/localtime_r.lo:
src/time/mktime.lo:
src/time/nanosleep.lo:
src/time/strftime.lo:
src/time/strptime.lo:
src/time/time.lo:
src/time/timegm.lo:
src/time/timer_create.lo:
src/time/timer_delete.lo:
src/time/timer_getoverrun.lo:
src/time/timer_gettime.lo:
src/time/timer_settime.lo:
src/time/times.lo:
src/time/tzset.lo:
src/time/utime.lo:
src/time/wcsftime.lo:
src/unistd/_exit.lo:
src/unistd/access.lo:
src/unistd/acct.lo:
src/unistd/alarm.lo:
src/unistd/chdir.lo:
src/unistd/chown.lo:
src/unistd/close.lo:
src/unistd/ctermid.lo:
src/unistd/dup.lo:
src/unistd/dup2.lo:
src/unistd/faccessat.lo:
src/unistd/fchdir.lo:
src/unistd/fchown.lo:
src/unistd/fchownat.lo:
src/unistd/fdatasync.lo:
src/unistd/fsync.lo:
src/unistd/ftruncate.lo:
src/unistd/getcwd.lo:
src/unistd/getegid.lo:
src/unistd/geteuid.lo:
src/unistd/getgid.lo:
src/unistd/getgroups.lo:
src/unistd/gethostname.lo:
src/unistd/getlogin.lo:
src/unistd/getlogin_r.lo:
src/unistd/getpgid.lo:
src/unistd/getpgrp.lo:
src/unistd/getpid.lo:
src/unistd/getppid.lo:
src/unistd/getsid.lo:
src/unistd/getuid.lo:
src/unistd/isatty.lo:
src/unistd/lchown.lo:
src/unistd/link.lo:
src/unistd/linkat.lo:
src/unistd/lseek.lo:
src/unistd/nice.lo:
src/unistd/pause.lo:
src/unistd/pipe.lo:
src/unistd/pread.lo:
src/unistd/preadv.lo:
src/unistd/pwrite.lo:
src/unld: unrecognised emulation mode: tune=generic
Supported emulations: elf_i386 i386linux elf_x86_64 elf_l1om
istd/pwritev.lo:
src/unistd/read.lo:
src/unistd/readlink.lo:
src/unistd/readlinkat.lo:
src/unistd/readv.lo:
src/unistd/renameat.lo:
src/unistd/rmdir.lo:
src/unistd/setegid.lo:
src/unistd/seteuid.lo:
src/unistd/setgid.lo:
src/unistd/setpgid.lo:
src/unistd/setpgrp.lo:
src/unistd/setregid.lo:
src/unistd/setresgid.lo:
src/unistd/setresuid.lo:
src/unistd/setreuid.lo:
src/unistd/setsid.lo:
src/unistd/setuid.lo:
src/unistd/setxid.lo:
src/unistd/sleep.lo:
src/unistd/symlink.lo:
src/unistd/symlinkat.lo:
src/unistd/sync.lo:
src/unistd/tcgetpgrp.lo:
src/unistd/tcsetpgrp.lo:
src/unistd/truncate.lo:
src/unistd/ttyname.lo:
src/unistd/ttyname_r.lo:
src/unistd/ualarm.lo:
src/unistd/unlink.lo:
src/unistd/unlinkat.lo:
src/unistd/usleep.lo:
src/unistd/write.lo:
src/unistd/writev.lo:
-L/usr/local/lib/pcc/i686-pc-linux-gnu/1.1.0.DEVEL/lib:
-lpcc:
ld terminated with status 1
make: *** [lib/libc.so] Error 1

[-- Attachment #3: pcc-configure.diff --]
[-- Type: text/x-diff, Size: 943 bytes --]

diff --git a/configure b/configure
index 93518a7..cafb64f 100755
--- a/configure
+++ b/configure
@@ -83,6 +83,21 @@ return 1
 fi
 }
 
+tryccprint () {
+printf "checking CC -print-file-name for %s... " "$2"
+CC_FILE="`$CC -print-file-name=$2`"
+L="-L`dirname $CC_FILE` `basename $CC_FILE .a |sed -e 's/^lib/-l/'`"
+echo "typedef int x;" > "$tmpc"
+if "$CC" -nostdlib -shared "$L" -o /dev/null "$tmpc" 2>/dev/null ; then
+printf "yes\n"
+eval "$1=\"\${$1} \$L\""
+eval "$1=\${$1# }"
+return 0
+else
+printf "no\n"
+return 1
+fi
+}
 
 
 # Beginning of actual script
@@ -291,6 +306,7 @@ shared=no
 # Find compiler runtime library
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
+test -z "$LIBCC" && tryccprint LIBCC libpcc.a &&
 printf "using compiler runtime libraries: %s\n" "$LIBCC"
 
 
diff --git a/lib/empty b/lib/empty
deleted file mode 100644
index e69de29..0000000

^ permalink raw reply	[relevance 1%]

* Re: Best bikeshed ever (feature test macros)
  @ 2012-09-02 15:19  5%   ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2012-09-02 15:19 UTC (permalink / raw)
  To: musl

On Sun, Sep 02, 2012 at 10:48:13AM +0200, Arvid E. Picciani wrote:
> Heya,
> 
> i'm a bit confused over 1 vs 2.

With option 1 (leaving things as-is), invoking the compiler with no
feature test macros gives the same effect as invoking "gcc -std=c99"
on glibc: only stuff from plain C is visible. It's pretty much
impossible to find or write software where this mode has any practical
value, so the only values of option 1 are:

- The ideological purity of providing a straight conforming C
  environment by default

- Breaking "bad software" that's failing to use feature test macros to
  request the functionality it needs.

It's the latter of these two points that seems to be the point of
interest and controversy.

On the one hand, there's the argument that programs that want to use
whatever extension features the system offers cannot portably request
this; there are systems where ANY use of feature test macros removes
some extensions that are visible by default, and provides no way to
get them back.

On the other hand, relying on the default environment to be sane is
fundamentally broken. For example, glibc by default gives you an
incorrect version of strerror_r that doesn't even have the right
prototype, and misbehaving versions of basename, scanf, and other
functions. I'm pretty sure that at one point, certain proprietary
unices like Solaris were even worse, providing horribly non-conforming
legacy environments with bug-compatibility for legacy versions unless
you used the right feature test macros. No idea if they've all been
fixed or if they're even still relevant.

At this point it sounds like programs that are omitting all feature
test macros by default are hopelessly broken and not even worth trying
to support. However, the fact of the matter is that they "work" on a
large portion of systems, and on systems where the above issues are
show-stoppers, you can _add_ some feature test macros (rather than
having to remove them) to get the app to work. Right now, we're in the
situation where musl is one of the systems where such apps don't work,
and the issue can be solved by adding -D_GNU_SOURCE (or often just a
POSIX/XSI feature).

The question is whether it would be more valuable to change things so
that musl is a system where the default environment is "just working"
even better than glibc's (by virtue of exposing all the useful
extensions but not doing broken things like exposing the wrong
versions of strerror_r, basename, etc.).

> On Fri, 24 Aug 2012 17:41:38 -0400, Rich Felker wrote:
> 
> >Using -D_GNU_SOURCE works 99%
> >of the time, but the other 1% of the time it will _break_ programs
> >that are already correctly using -D_XOPEN_SOURCE=700
> >
> >2. Making the kitchen sink (_GNU_SOURCE) available by default.
> >
> >PROS: Works with most software and won't break software that's
> >already
> >correctly using feature test macros.
> 
> I see how _GNU_SOURCE breaks stuff, but how does it not break if its
> the default?

If software is already correctly using feature test macros, it's
getting an environment it selected, not the default environment, so
changing the default will have no effect on such software.

Rich


^ permalink raw reply	[relevance 5%]

* Re: Re: musl bugs found through gnulib
  2012-06-17 22:49  5%     ` musl bugs found through gnulib Bruno Haible
  2012-06-20  3:04  4%       ` Rich Felker
@ 2012-06-20 19:28  0%       ` Rich Felker
  1 sibling, 0 replies; 73+ results
From: Rich Felker @ 2012-06-20 19:28 UTC (permalink / raw)
  To: musl; +Cc: bug-gnulib, Isaac Dunham, Paul Eggert, Reuben Thomas

On Mon, Jun 18, 2012 at 12:49:44AM +0200, Bruno Haible wrote:
> [CCing the musl list]
> Isaac Dunham wrote in
> <http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00101.html>:
> > musl is designed for standards conformance,
> 
> There is a recipe, in <http://sourceware.org/glibc/wiki/Testing/Gnulib>,
> that explains how to use gnulib to check a libc against bugs. When I apply
> this to musl-0.9.1, I get this list of problems:
> 
> Replacements of *printf, because of
>   checking whether printf supports infinite 'long double' arguments... no

Fixed. (Not really a bug, but fixed anyway.)

>   checking whether printf supports the 'ls' directive... no

Previously fixed.

>   checking whether printf survives out-of-memory conditions... no

Fixed.

> Replacement of duplocale, because of
>   checking whether duplocale(LC_GLOBAL_LOCALE) works... no

Fixed.

> Replacement of fdopen, because of
>   checking whether fdopen sets errno... no

Not a bug. I believe this was fixed in gnulib.

> Replacement of futimens, because of
>   checking whether futimens works... no

Not a bug; just confusing message.

> Replacement of getcwd, because of
>   checking whether getcwd handles long file names properly... no, but it is partly working
>   checking whether getcwd aborts when 4k < cwd_length < 16k... no

Still open; probably not a bug.

> Replacement of getopt, because of
>   checking whether getopt is POSIX compatible... no

Not a bug.

> Replacement of glob, because of
>   checking for GNU glob interface version 1... no
> (not sure this is a bug or just an incompatibility compared to glibc)

Not supported.

> Replacement of iconv and iconv_open, because of
>   checking whether iconv supports conversion between UTF-8 and UTF-{16,32}{BE,LE}... no

Fixed.

> 
> Replacement of mktime, because of
>   checking for working mktime... no

Still open.

> Replacement of perror, because of
>   checking whether perror matches strerror... no

Fixed.

> Replacement of popen, because of
>   checking whether popen works with closed stdin... no

Fixed.

> Replacement of regex, because of
>   checking for working re_compile_pattern... no

Not supported.

> Replacement of strtod, because of
>   checking whether strtod obeys C99... no

Previously fixed.

> test-duplocale.c:70: assertion failed
> FAIL: test-duplocale

Fixed.

> test-fcntl.c:382: assertion failed
> FAIL: test-fcntl

Pending; intend to fix.

> test-fdatasync.c:50: assertion failed
> FAIL: test-fdatasync

Fixed.

> test-fma2.h:116: assertion failed
> FAIL: test-fma2

Unknown. Asking nsz..

> test-fsync.c:50: assertion failed
> FAIL: test-fsync

Fixed.

> test-fwrite.c:53: assertion failed
> FAIL: test-fwrite

Fixed.

> test-getlogin_r.c:88: assertion failed
> FAIL: test-getlogin_r

Fixed.

> test-grantpt.c:34: assertion failed
> FAIL: test-grantpt

Buggy/useless test.

> test-localeconv.c:41: assertion failed
> FAIL: test-localeconv

Fixed.

> Segmentation fault
> FAIL: test-localename

Still open.

> test-ptsname_r.c:118: assertion failed
> FAIL: test-ptsname_r

Fixed.

> test-strerror_r.c:118: assertion failed
> FAIL: test-strerror_r

Fixed.

> test-wcwidth.c:71: assertion failed
> FAIL: test-wcwidth

Fixed.

> When I compile all of gnulib, I also get a compilation error
> (may be a musl or a gnulib problem, haven't investigated):
> fsusage.c: In function 'get_fs_usage':
> fsusage.c:222:17: error: storage size of 'fsd' isn't known
> fsusage.c:224:3: warning: implicit declaration of function 'statfs' [-Wimplicit-function-declaration]
> fsusage.c:222:17: warning: unused variable 'fsd' [-Wunused-variable]
> make[4]: *** [fsusage.o] Error 1

OK, this is valid fallback code for when statvfs fails, but the
headers required for it have not been included.

Basically the only still-open issues are getcwd, mktime, fma,
localename, so I'll avoid future spam by just addressing them. I've
kept all the Cc's so far, but if this is getting OT for gnulib folks,
I'll be happy to drop the Cc. Just let me know.

Rich


^ permalink raw reply	[relevance 0%]

* Re: Re: musl bugs found through gnulib
  2012-06-20  4:10  0%         ` [musl] " Eric Blake
@ 2012-06-20 13:27  0%           ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2012-06-20 13:27 UTC (permalink / raw)
  To: musl; +Cc: Isaac Dunham, Paul Eggert, bug-gnulib, Reuben Thomas

On Tue, Jun 19, 2012 at 10:10:11PM -0600, Eric Blake wrote:
> Unfortunately, you are out of date.  POSIX _does_ require
> duplocale(LC_GLOBAL_LOCALE) to work:
> 
> http://austingroupbugs.net/view.php?id=301

OK. I'll add support. For now all it requires is avoiding
dereferencing the pointer, anyway.

> Yes, Linux 2.6.32 introduced F_GETOWN_EX for precisely this reason, and
> you should be using it.

When I wrote that code, 2.6.32 was new enough, and the issue seemed
minor enough, that I didn't bother. Now I agree it would be nice
though.

> >> test-grantpt.c:34: assertion failed
> >> FAIL: test-grantpt
> > 
> > This is an invalid test. POSIX specifies this function "may fail", not
> > "shall fail", and since the function is inherently a no-op, it would
> > be idiotic to make it perform a syscall to check the validity of the
> > file descriptor...
> 
> This is one of the cases where gnulib prefers to emulate the shall fail
> semantics of glibc, as they are more useful to program around.

I don't see how it's nicer. All it does it make pty acquisition
slightly slower (one extra useless syscall). The only time you would
call grantpt without knowing that the fd is valid is right after
calling posix_openpt without checking the return value, and in that
case, it seems unlikely that you'd check the return value of grantpt.
And last time I asked, I remember being told that gnulib does not
intend to facilitate this sort of lazy programming anyway.

In any case, if you are relying on lazy error checking like that,
unlockpt will already report the error...

> >> test-ptsname_r.c:118: assertion failed
> >> FAIL: test-ptsname_r
> > 
> > It's testing that ptsname_r both sets errno and returns the error
> > code, and that they're the same. Since this function is nonstandard,
> > there's no spec for it, so perhaps this is desirable; I was assuming
> > it should return -1 on failure.
> 
> There _is_ a proposed standard for it now:
> 
> http://austingroupbugs.net/view.php?id=508
> 
> which requires only the return value to be 0 or an errno value, and not
> that errno be set.  gnulib should only be checking for a valid return value.

Okay, I'll update it to match this.

I wish they'd just standardized the superior BSD openpty function
instead...

> >> test-strerror_r.c:118: assertion failed
> >> FAIL: test-strerror_r
> > 
> > This test is looking for a null terminator at the n-1 position of the
> > buffer if strerror_r fails with ERANGE (buffer too small). I don't see
> > anywhere the function is specified to write to the buffer AT ALL on
> > failure, so this test seems invalid.
> 
> This is a case where POSIX is rather weak, but where quality of
> implementation demands that the most useful interface is one that
> provides the most information back to the user.  glibc had a number of
> bugs that were fixed in this area to improve QoI, and gnulib now prefers
> to rely on those improvements.

I don't see anything which forbids it from writing in this case, so I
suppose I could change it.

Rich


^ permalink raw reply	[relevance 0%]

* Re: [musl] Re: musl bugs found through gnulib
  2012-06-20  3:04  4%       ` Rich Felker
@ 2012-06-20  4:10  0%         ` Eric Blake
  2012-06-20 13:27  0%           ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Eric Blake @ 2012-06-20  4:10 UTC (permalink / raw)
  To: Rich Felker; +Cc: bug-gnulib, Isaac Dunham, Paul Eggert, musl, Reuben Thomas

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

On 06/19/2012 09:04 PM, Rich Felker wrote:

>> Replacement of duplocale, because of
>>   checking whether duplocale(LC_GLOBAL_LOCALE) works... no
> 
> POSIX does not specify any use of LC_GLOBAL_LOCALE except as an
> argument to uselocale. Is there a reason it's needed? Perhaps more
> importantly, is the replacement when libc doesn't provide this
> functionality bloated/painful?

Unfortunately, you are out of date.  POSIX _does_ require
duplocale(LC_GLOBAL_LOCALE) to work:

http://austingroupbugs.net/view.php?id=301


    If the locobj argument is LC_GLOBAL_LOCALE, duplocale() shall
    create a new locale object containing a copy of the global locale
    determined by the setlocale() function.

    The behavior is undefined if the locobj argument is not a valid
    locale object handle.

  After line 24978 add a new paragraph to APPLICATION USAGE:

    The duplocale() function can also be used in conjunction with
    uselocale((locale_t)0). This returns the locale in effect for
    the calling thread, but can have the value LC_GLOBAL_LOCALE.
    Passing LC_GLOBAL_LOCALE to functions such as isalnum_l()
    results in undefined behavior, but applications can convert
    it into a usable locale object by using duplocale().

>> test-fcntl.c:382: assertion failed
>> FAIL: test-fcntl
> 
> This is caused by the fact that the F_GETOWN fcntl on Linux is broken;
> there's no way to distinguish error returns from non-error negative
> return values. So we never set errno when calling F_GETOWN and assume
> the return value is not an error. There's a new-ish Linux-specific
> F_GETOWN_EX we could use when it's available, but the fallback code
> would still fail just like it does now, because it's a fundamental
> limitation in the API.

Yes, Linux 2.6.32 introduced F_GETOWN_EX for precisely this reason, and
you should be using it.


>> test-grantpt.c:34: assertion failed
>> FAIL: test-grantpt
> 
> This is an invalid test. POSIX specifies this function "may fail", not
> "shall fail", and since the function is inherently a no-op, it would
> be idiotic to make it perform a syscall to check the validity of the
> file descriptor...

This is one of the cases where gnulib prefers to emulate the shall fail
semantics of glibc, as they are more useful to program around.


>> test-ptsname_r.c:118: assertion failed
>> FAIL: test-ptsname_r
> 
> It's testing that ptsname_r both sets errno and returns the error
> code, and that they're the same. Since this function is nonstandard,
> there's no spec for it, so perhaps this is desirable; I was assuming
> it should return -1 on failure.

There _is_ a proposed standard for it now:

http://austingroupbugs.net/view.php?id=508

which requires only the return value to be 0 or an errno value, and not
that errno be set.  gnulib should only be checking for a valid return value.

> 
>> test-strerror_r.c:118: assertion failed
>> FAIL: test-strerror_r
> 
> This test is looking for a null terminator at the n-1 position of the
> buffer if strerror_r fails with ERANGE (buffer too small). I don't see
> anywhere the function is specified to write to the buffer AT ALL on
> failure, so this test seems invalid.

This is a case where POSIX is rather weak, but where quality of
implementation demands that the most useful interface is one that
provides the most information back to the user.  glibc had a number of
bugs that were fixed in this area to improve QoI, and gnulib now prefers
to rely on those improvements.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

^ permalink raw reply	[relevance 0%]

* Re: Re: musl bugs found through gnulib
  2012-06-17 22:49  5%     ` musl bugs found through gnulib Bruno Haible
@ 2012-06-20  3:04  4%       ` Rich Felker
  2012-06-20  4:10  0%         ` [musl] " Eric Blake
  2012-06-20 19:28  0%       ` Rich Felker
  1 sibling, 1 reply; 73+ results
From: Rich Felker @ 2012-06-20  3:04 UTC (permalink / raw)
  To: musl; +Cc: bug-gnulib, Isaac Dunham, Paul Eggert, Reuben Thomas

Some more updates..

On Mon, Jun 18, 2012 at 12:49:44AM +0200, Bruno Haible wrote:
> Replacements of *printf, because of
> [...]
>   checking whether printf survives out-of-memory conditions... no

This was caused by the pointer-arithmetic overflow bug I just fixed in
git. It should no longer fail, and never failed before except in i386
binaries running on x86_64 kernels.

> Replacement of duplocale, because of
>   checking whether duplocale(LC_GLOBAL_LOCALE) works... no

POSIX does not specify any use of LC_GLOBAL_LOCALE except as an
argument to uselocale. Is there a reason it's needed? Perhaps more
importantly, is the replacement when libc doesn't provide this
functionality bloated/painful?

> Replacement of fdopen, because of
>   checking whether fdopen sets errno... no

Seems to have been fixed in gnulib.

> Replacement of getcwd, because of
>   checking whether getcwd handles long file names properly... no, but it is partly working
>   checking whether getcwd aborts when 4k < cwd_length < 16k... no

Still unclear what the cause of these failures is. Anyone else looked
into them, or do I still need to?

> Replacement of iconv and iconv_open, because of
>   checking whether iconv supports conversion between UTF-8 and UTF-{16,32}{BE,LE}... no

I fixed all the UTF-16-related bugs that were breaking this test. It
should pass now.

> Replacement of mktime, because of
>   checking for working mktime... no
> 
> Replacement of perror, because of
>   checking whether perror matches strerror... no
> 
> Replacement of popen, because of
>   checking whether popen works with closed stdin... no
> 
> Replacement of regex, because of
>   checking for working re_compile_pattern... no
> 
> Replacement of strtod, because of
>   checking whether strtod obeys C99... no
> 
> For each of the replacements, first look at the test program's results
> (in config.log), then look at the test program's source code (in m4/*.m4).
> 
> Furthermore we have test failures:
> 
> test-duplocale.c:70: assertion failed
> FAIL: test-duplocale
> 
> test-fcntl.c:382: assertion failed
> FAIL: test-fcntl

This is caused by the fact that the F_GETOWN fcntl on Linux is broken;
there's no way to distinguish error returns from non-error negative
return values. So we never set errno when calling F_GETOWN and assume
the return value is not an error. There's a new-ish Linux-specific
F_GETOWN_EX we could use when it's available, but the fallback code
would still fail just like it does now, because it's a fundamental
limitation in the API.

> test-fdatasync.c:50: assertion failed
> FAIL: test-fdatasync

This function was dummied-out for some reason. Fixed.

> test-fsync.c:50: assertion failed
> FAIL: test-fsync

Same.

> test-fwrite.c:53: assertion failed
> FAIL: test-fwrite

This seems like it might be a real bug. On musl, unbuffered files
actually have a one-byte buffer, but on writing, the buffer is
supposed to be flushed as soon as it fills, rather than waiting for
another write when it's full. I'll have to run some tests...

> test-getlogin_r.c:88: assertion failed
> FAIL: test-getlogin_r

This was broken; it should be fixed now.

> test-grantpt.c:34: assertion failed
> FAIL: test-grantpt

This is an invalid test. POSIX specifies this function "may fail", not
"shall fail", and since the function is inherently a no-op, it would
be idiotic to make it perform a syscall to check the validity of the
file descriptor...

> test-localeconv.c:41: assertion failed
> FAIL: test-localeconv

Fixed lots of issues; not sure if it works now.

> Segmentation fault
> FAIL: test-localename

This might be due to our incomplete locale implementation, or because
the test uses locale names that don't exist. I doubt it should
segfault though. I'll look into this one later.

> test-ptsname_r.c:118: assertion failed
> FAIL: test-ptsname_r

It's testing that ptsname_r both sets errno and returns the error
code, and that they're the same. Since this function is nonstandard,
there's no spec for it, so perhaps this is desirable; I was assuming
it should return -1 on failure.

> test-strerror_r.c:118: assertion failed
> FAIL: test-strerror_r

This test is looking for a null terminator at the n-1 position of the
buffer if strerror_r fails with ERANGE (buffer too small). I don't see
anywhere the function is specified to write to the buffer AT ALL on
failure, so this test seems invalid.

> test-wcwidth.c:71: assertion failed
> FAIL: test-wcwidth

It's checking for wcwidth(0x3000)==2. This definitely used to work,
but it might have been broken when I overhauled wcwidth. I'll look
into it..

> When I compile all of gnulib, I also get a compilation error
> (may be a musl or a gnulib problem, haven't investigated):
> fsusage.c: In function 'get_fs_usage':
> fsusage.c:222:17: error: storage size of 'fsd' isn't known
> fsusage.c:224:3: warning: implicit declaration of function 'statfs' [-Wimplicit-function-declaration]
> fsusage.c:222:17: warning: unused variable 'fsd' [-Wunused-variable]
> make[4]: *** [fsusage.o] Error 1

This looks like a gnulib problem. On musl, statvfs should get used,
and this code should not even be compiled... Judging from the
comments, it looks like a hard-coded workaround for broken glibc
and/or Linux versions, but the header include seems to be missing in
the workaround case...

Rich


^ permalink raw reply	[relevance 4%]

* Re: musl bugs found through gnulib
       [not found]       ` <20120611182202.1ee4d019@newbook>
@ 2012-06-17 22:49  5%     ` Bruno Haible
  2012-06-20  3:04  4%       ` Rich Felker
  2012-06-20 19:28  0%       ` Rich Felker
  0 siblings, 2 replies; 73+ results
From: Bruno Haible @ 2012-06-17 22:49 UTC (permalink / raw)
  To: bug-gnulib, musl; +Cc: Isaac Dunham, Paul Eggert, Reuben Thomas

[CCing the musl list]
Isaac Dunham wrote in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00101.html>:
> musl is designed for standards conformance,

There is a recipe, in <http://sourceware.org/glibc/wiki/Testing/Gnulib>,
that explains how to use gnulib to check a libc against bugs. When I apply
this to musl-0.9.1, I get this list of problems:

Replacements of *printf, because of
  checking whether printf supports infinite 'long double' arguments... no
  checking whether printf supports the 'ls' directive... no
  checking whether printf survives out-of-memory conditions... no

Replacement of duplocale, because of
  checking whether duplocale(LC_GLOBAL_LOCALE) works... no

Replacement of fdopen, because of
  checking whether fdopen sets errno... no

Replacement of futimens, because of
  checking whether futimens works... no

Replacement of getcwd, because of
  checking whether getcwd handles long file names properly... no, but it is partly working
  checking whether getcwd aborts when 4k < cwd_length < 16k... no

Replacement of getopt, because of
  checking whether getopt is POSIX compatible... no

Replacement of glob, because of
  checking for GNU glob interface version 1... no
(not sure this is a bug or just an incompatibility compared to glibc)

Replacement of iconv and iconv_open, because of
  checking whether iconv supports conversion between UTF-8 and UTF-{16,32}{BE,LE}... no

Replacement of mktime, because of
  checking for working mktime... no

Replacement of perror, because of
  checking whether perror matches strerror... no

Replacement of popen, because of
  checking whether popen works with closed stdin... no

Replacement of regex, because of
  checking for working re_compile_pattern... no

Replacement of strtod, because of
  checking whether strtod obeys C99... no

For each of the replacements, first look at the test program's results
(in config.log), then look at the test program's source code (in m4/*.m4).

Furthermore we have test failures:

test-duplocale.c:70: assertion failed
FAIL: test-duplocale

test-fcntl.c:382: assertion failed
FAIL: test-fcntl

test-fdatasync.c:50: assertion failed
FAIL: test-fdatasync

test-fma2.h:116: assertion failed
FAIL: test-fma2

test-fsync.c:50: assertion failed
FAIL: test-fsync

test-fwrite.c:53: assertion failed
FAIL: test-fwrite

test-getlogin_r.c:88: assertion failed
FAIL: test-getlogin_r

test-grantpt.c:34: assertion failed
FAIL: test-grantpt

test-localeconv.c:41: assertion failed
FAIL: test-localeconv

Segmentation fault
FAIL: test-localename

test-ptsname_r.c:118: assertion failed
FAIL: test-ptsname_r

test-strerror_r.c:118: assertion failed
FAIL: test-strerror_r

test-wcwidth.c:71: assertion failed
FAIL: test-wcwidth

When I compile all of gnulib, I also get a compilation error
(may be a musl or a gnulib problem, haven't investigated):
fsusage.c: In function 'get_fs_usage':
fsusage.c:222:17: error: storage size of 'fsd' isn't known
fsusage.c:224:3: warning: implicit declaration of function 'statfs' [-Wimplicit-function-declaration]
fsusage.c:222:17: warning: unused variable 'fsd' [-Wunused-variable]
make[4]: *** [fsusage.o] Error 1

Bruno



^ permalink raw reply	[relevance 5%]

* [PATCH]_BSD_SOURCE for musl, take 2.
  @ 2012-05-21 18:31  2%   ` Isaac Dunham
  0 siblings, 0 replies; 73+ results
From: Isaac Dunham @ 2012-05-21 18:31 UTC (permalink / raw)
  To: musl

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

Here's a second verion of the patch, with all the issues below
addressed.
I'm still declaring bsd_signal if _BSD_SOURCE is defined, because it
uses the signature of BSD signal().
On Mon, 21 May 2012 09:36:29 -0400
Rich Felker <dalias@aerifal.cx> wrote
> On Sun, May 20, 2012 at 11:26:51PM -0700, Isaac Dunham wrote:
> > diff --git a/include/fcntl.h b/include/fcntl.h
> > index 63f1beb..b776d38 100644
> > --- a/include/fcntl.h
> > +++ b/include/fcntl.h
> > [...]
> > +
> > +#ifndef _UNISTD_H
> > +#define F_OK 0
> > +#define R_OK 4
> > [...]
> 
> All _XXX_H macros should be considered entirely internal to the header
> they're used to protect. Aside from that, this sort of mechanism makes
> the logic in unistd.h very ugly (since it would have to check if
> fcntl.h was already included with _GNU_SOURCE or _BSD_SOURCE defined).
Fixed.
> > diff --git a/include/netdb.h b/include/netdb.h
> > index 33b7a0a..d1fe9a8 100644
> > --- a/include/netdb.h
> > +++ b/include/netdb.h
> > @@ -5,7 +5,7 @@
> > [...]
> > +
> > +int innetgr(const char *, const char *, const char *, const char
> > *);
> 
> This should be a separate patch, and should add stubs for the rest of
> the netgr functions at the same time (weak aliases in ent.c). Of
> course innetgr needs to be in its own file since it's not a weak alias
> and would pollute the standard namespace if put in ent.c.
Dropped from headers, along with logwtmp.h
Stubs have been left in place for now, so don't merge src/ ...
> > diff --git a/include/signal.h b/include/signal.h
> > [...]
> > -#ifdef _GNU_SOURCE
> > +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
> >  typedef void (*sighandler_t)(int);
> > +typedef sighandler_t sig_t;
> >  void (*bsd_signal(int, void (*)(int)))(int);
> > +#endif
> 
> I think sig_t should be BSD-only. That's how it is in glibc, and since
> it's so illogically named and short, I'd rather keep it out of the
> namespace even with _GNU_SOURCE. 
> In glibc, sighandler_t is GNU-only (not in BSD). So it might make
> sense to just have these be separate #ifdefs.
Fixed
> > diff --git a/include/string.h b/include/string.h
> > index 8cf0ee9..9715713 100644
> > --- a/include/string.h
> > +++ b/include/string.h
> > [...]
> >  
> > +#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
> > +int bcmp (const void *, const void *, size_t);
> > +void bcopy (const void *, void *, size_t);
> > +void bzero (void *, size_t);
> > +int strcasecmp (const char *, const char *);
> > +int strncasecmp (const char *, const char *, size_t);
> > +char *index (const char *, int);
> > +char *rindex (const char *, int);
> > +int ffs (int);
> > +#endif
> 
> Wasn't all of this already coming from strings.h?
On inclusion of string.h with _GNU_SOURCE ? It doesn't seem so.
Fixed.

Isaac Dunham


[-- Attachment #2: master-bsd.diff --]
[-- Type: text/x-patch, Size: 16749 bytes --]

diff --git a/include/ctype.h b/include/ctype.h
index a85e907..8ceaa9f 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -30,7 +30,8 @@ int   toupper(int);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #define __NEED_locale_t
 #include <bits/alltypes.h>
diff --git a/include/dirent.h b/include/dirent.h
index d0a6b44..8162356 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -36,7 +36,7 @@ int            dirfd(DIR *);
 int alphasort(const struct dirent **, const struct dirent **);
 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define DT_UNKNOWN 0
 #define DT_FIFO 1
 #define DT_CHR 2
diff --git a/include/fcntl.h b/include/fcntl.h
index 63f1beb..f826a5e 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -80,12 +80,24 @@ int posix_fallocate(int, off_t, off_t);
 #define S_IRWXO 0007
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define FAPPEND O_APPEND
 #define FFSYNC O_FSYNC
 #define FASYNC O_ASYNC
 #define FNONBLOCK O_NONBLOCK
 #define FNDELAY O_NDELAY
+
+#ifndef F_OK
+#define F_OK 0
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+#define F_ULOCK 0
+#define F_LOCK  1
+#define F_TLOCK 2
+#define F_TEST  3
+int lockf(int, int, off_t);
+#endif
 #endif
 
 #ifdef _LARGEFILE64_SOURCE
diff --git a/include/grp.h b/include/grp.h
index 5185185..0a55c62 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -28,7 +28,7 @@ struct group  *getgrent(void);
 void           endgrent(void);
 void           setgrent(void);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int getgrouplist(const char *, gid_t, gid_t *, int *);
 int setgroups(size_t, const gid_t *);
 int initgroups(const char *, gid_t);
diff --git a/include/math.h b/include/math.h
index 61738e6..d732648 100644
--- a/include/math.h
+++ b/include/math.h
@@ -330,8 +330,7 @@ double      trunc(double);
 float       truncf(float);
 long double truncl(long double);
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
-#define MAXFLOAT        3.40282347e+38F
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define M_E             2.7182818284590452354   /* e */
 #define M_LOG2E         1.4426950408889634074   /* log_2 e */
 #define M_LOG10E        0.43429448190325182765  /* log_10 e */
@@ -345,7 +344,13 @@ long double truncl(long double);
 #define M_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
 #define M_SQRT2         1.41421356237309504880  /* sqrt(2) */
 #define M_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
+#endif
 
+#if defined(_XOPEN_SOURCE)
+#define MAXFLOAT        3.40282347e+38F
+#endif
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 extern int signgam;
 
 double      j0(double);
@@ -358,6 +363,7 @@ double      yn(int, double);
 #endif
 
 #ifdef _GNU_SOURCE
+#define HUGE        3.40282347e+38F
 double      scalb(double, double);
 float       scalbf(float, float);
 long double scalbl(long double, long double);
diff --git a/include/net/if.h b/include/net/if.h
index 00c763a..e862c7c 100644
--- a/include/net/if.h
+++ b/include/net/if.h
@@ -21,7 +21,7 @@ void if_freenameindex (struct if_nameindex *);
 
 
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 
 #include <sys/socket.h>
 
diff --git a/include/netdb.h b/include/netdb.h
index 33b7a0a..82c78dc 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -5,7 +5,7 @@
 extern "C" {
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define __NEED_size_t
 #endif
 
@@ -118,7 +118,7 @@ struct protoent *getprotoent (void);
 struct protoent *getprotobyname (const char *);
 struct protoent *getprotobynumber (int);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 const char *hstrerror(int);
 struct hostent *gethostbyname (const char *);
 int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index c8a1a4b..797ce68 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -2,5 +2,22 @@
 #define _NETINET_TCP_H
 
 #define TCP_NODELAY 1
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#include <sys/types.h>
+#include <sys/socket.h>
+#define TCP_MAXSEG	 2
+#define TCP_CORK	 3
+#define TCP_KEEPIDLE	 4
+#define TCP_KEEPINTVL	 5
+#define TCP_KEEPCNT	 6
+#define TCP_SYNCNT	 7
+#define TCP_LINGER2	 8
+#define TCP_DEFER_ACCEPT 9
+#define TCP_WINDOW_CLAMP 10
+#define TCP_INFO	 11
+#define	TCP_QUICKACK	 12
+#define TCP_CONGESTION	 13
+#define TCP_MD5SIG	 14
+#endif
 
 #endif
diff --git a/include/setjmp.h b/include/setjmp.h
index b024c44..88fb950 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -9,7 +9,8 @@ extern "C" {
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 typedef unsigned long sigjmp_buf[(128+sizeof(jmp_buf))/sizeof(long)];
 #ifdef _GNU_SOURCE
 #define jmp_buf sigjmp_buf
@@ -19,7 +20,8 @@ void siglongjmp (sigjmp_buf, int);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 int _setjmp (jmp_buf);
 void _longjmp (jmp_buf, int);
 #endif
diff --git a/include/signal.h b/include/signal.h
index 38f369b..616801b 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -6,7 +6,8 @@ extern "C" {
 #endif
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #ifdef _GNU_SOURCE
 #define __siginfo siginfo
@@ -204,9 +205,16 @@ void (*sigset(int, void (*)(int)))(int);
 #define SIGSTKSZ 8192
 #endif
 
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+void (*bsd_signal(int, void (*)(int)))(int);
+#endif
+
+#ifdef _BSD_SOURCE
+typedef void (*sig_t)(int);
+#endif
+
 #ifdef _GNU_SOURCE
 typedef void (*sighandler_t)(int);
-void (*bsd_signal(int, void (*)(int)))(int);
 int sigisemptyset(const sigset_t *);
 #define SA_NOMASK SA_NODEFER
 #define SA_ONESHOT SA_RESETHAND
diff --git a/include/stdio.h b/include/stdio.h
index 355f425..e4740eb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -10,7 +10,8 @@ extern "C" {
 #define __NEED_size_t
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_ssize_t
 #define __NEED_off_t
 #endif
@@ -120,7 +121,8 @@ char *tmpnam(char *);
 FILE *tmpfile(void);
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 FILE *fmemopen(void *, size_t, const char *);
 FILE *open_memstream(char **, size_t *);
 FILE *fdopen(int, const char *);
@@ -146,12 +148,13 @@ char *ctermid(char *);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define P_tmpdir "/tmp"
 char *tempnam(const char *, const char *);
 #endif
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define L_cuserid 20
 char *cuserid(char *);
 #undef off64_t
diff --git a/include/stdlib.h b/include/stdlib.h
index 11331d9..644325e 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -78,7 +78,8 @@ size_t wcstombs (char *, const wchar_t *, size_t);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #ifndef WEXITSTATUS
 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
@@ -102,20 +103,24 @@ int rand_r (unsigned *);
 #endif
 
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
+char *realpath (const char *, char *);
+long int random (void);
+void srandom (unsigned int);
+char *initstate (unsigned int, char *, size_t);
+char *setstate (char *);
+#endif
+
 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 int putenv (char *);
 int posix_openpt (int);
 int grantpt (int);
 int unlockpt (int);
 char *ptsname (int);
-char *realpath (const char *, char *);
 char *l64a (long);
 long a64l (const char *);
 void setkey (const char *);
-long int random (void);
-void srandom (unsigned int);
-char *initstate (unsigned int, char *, size_t);
-char *setstate (char *);
 double drand48 (void);
 double erand48 (unsigned short [3]);
 long int lrand48 (void);
@@ -127,11 +132,14 @@ unsigned short *seed48 (unsigned short [3]);
 void lcong48 (unsigned short [7]);
 #endif
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #include <alloca.h>
 char *mktemp (char *);
 void *valloc (size_t);
 void *memalign(size_t, size_t);
+#endif
+
+#ifdef _GNU_SOURCE
 int clearenv(void);
 int ptsname_r(int, char *, size_t);
 char *ecvt(double, int, int *, int *);
diff --git a/include/string.h b/include/string.h
index 8cf0ee9..24cb1ca 100644
--- a/include/string.h
+++ b/include/string.h
@@ -14,7 +14,8 @@ extern "C" {
 
 #define __NEED_size_t
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_locale_t
 #endif
 
@@ -51,9 +52,13 @@ size_t strlen (const char *);
 
 char *strerror (int);
 
+#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
+#include <strings.h>
+#endif
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 char *strtok_r (char *, const char *, char **);
 int strerror_r (int, char *, size_t);
 char *stpcpy(char *, const char *);
@@ -67,7 +72,8 @@ int strcoll_l (const char *, const char *, locale_t);
 size_t strxfrm_l (char *, const char *, size_t, locale_t);
 #endif
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 void *memccpy (void *, const void *, int, size_t);
 #endif
 
@@ -77,9 +83,10 @@ size_t strlcpy (char *, const char *, size_t);
 #endif
 
 #ifdef _GNU_SOURCE
+#define	strdupa(x)	strcpy(alloca(strlen(x)+1),x)
 int strverscmp (const char *, const char *);
-int strcasecmp (const char *, const char *);
-int strncasecmp (const char *, const char *, size_t);
+int strcasecmp_l (const char *, const char *, locale_t);
+int strncasecmp_l (const char *, const char *, size_t, locale_t);
 char *strchrnul(const char *, int);
 char *strcasestr(const char *, const char *);
 char *strsep(char **, const char *);
diff --git a/include/sys/mman.h b/include/sys/mman.h
index a48c2b4..a45f11d 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -27,6 +27,9 @@ int munlockall (void);
 
 #ifdef _GNU_SOURCE
 void *mremap (void *, size_t, size_t, int, ...);
+#endif
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int madvise (void *, size_t, int);
 #endif
 
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 5d50ae7..14a5424 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -90,7 +90,7 @@ int utimensat(int, const char *, const struct timespec [2], int);
 int lchmod(const char *, mode_t);
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define S_IREAD S_IRUSR
 #define S_IWRITE S_IWUSR
 #define S_IEXEC S_IXUSR
diff --git a/include/sys/time.h b/include/sys/time.h
index fa98944..144dd23 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -8,7 +8,8 @@ extern "C" {
 
 int gettimeofday (struct timeval *, void *);
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #define ITIMER_REAL    0
 #define ITIMER_VIRTUAL 1
@@ -26,7 +27,7 @@ int utimes (const char *, const struct timeval [2]);
 
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int futimes(int, const struct timeval [2]);
 int lutimes(const char *, const struct timeval [2]);
 int settimeofday (const struct timeval *, void *);
diff --git a/include/sys/types.h b/include/sys/types.h
index b9b65f6..4b1e374 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -58,7 +58,7 @@ typedef __uint16_t u_int16_t;
 typedef __uint32_t u_int32_t;
 typedef __uint64_t u_int64_t;
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef char *caddr_t;
 typedef unsigned char u_char;
 typedef unsigned short u_short, ushort;
diff --git a/include/sys/wait.h b/include/sys/wait.h
index e73594a..5e3012b 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -17,7 +17,7 @@ pid_t wait (int *);
 int waitid (idtype_t, id_t, siginfo_t *, int);
 pid_t waitpid (pid_t, int *, int );
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #include <sys/resource.h>
 pid_t wait3 (int *, int, struct rusage *);
 pid_t wait4 (pid_t, int *, int, struct rusage *);
diff --git a/include/syslog.h b/include/syslog.h
index e0d86c0..278945f 100644
--- a/include/syslog.h
+++ b/include/syslog.h
@@ -59,7 +59,8 @@ void openlog (const char *, int, int);
 int setlogmask (int);
 void syslog (int, const char *, ...);
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define _PATH_LOG "/dev/log"
 #define __NEED_va_list
 #include <bits/alltypes.h>
 void vsyslog (int, const char *, va_list);
diff --git a/include/termios.h b/include/termios.h
index 7690883..1041759 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -32,7 +32,7 @@ int tcflow (int, int);
 
 pid_t tcgetsid (int);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 void cfmakeraw(struct termios *);
 int cfsetspeed(struct termios *, speed_t);
 #endif
diff --git a/include/time.h b/include/time.h
index 98d0111..067b519 100644
--- a/include/time.h
+++ b/include/time.h
@@ -18,7 +18,8 @@ extern "C" {
 #define __NEED_clock_t
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_struct_timespec
 #define __NEED_clockid_t
 #define __NEED_timer_t
@@ -57,7 +58,8 @@ char *ctime (const time_t *);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 size_t strftime_l (char *, size_t, const char *, const struct tm *, locale_t);
 
diff --git a/include/unistd.h b/include/unistd.h
index b1a84d7..0112276 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -16,6 +16,12 @@ extern "C" {
 #define SEEK_CUR 1
 #define SEEK_END 2
 
+#if defined(_BSD_SOURCE) && !defined(L_SET)
+#define L_SET	SEEK_SET
+#define L_INCR	SEEK_CUR
+#define L_XTND	SEEK_END
+#endif
+
 #undef NULL
 #ifdef __cplusplus
 #define NULL 0
@@ -63,10 +69,13 @@ int rmdir(const char *);
 int truncate(const char *, off_t);
 int ftruncate(int, off_t);
 
+#ifndef F_OK
 #define F_OK 0
 #define R_OK 4
 #define W_OK 2
 #define X_OK 1
+#endif
+
 int access(const char *, int);
 int faccessat(int, const char *, int, int);
 
@@ -127,10 +136,12 @@ long fpathconf(int, int);
 long sysconf(int);
 size_t confstr(int, char *, size_t);
 
+#ifndef F_ULOCK
 #define F_ULOCK 0
 #define F_LOCK  1
 #define F_TLOCK 2
 #define F_TEST  3
+#endif
 
 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 int lockf(int, int, off_t);
@@ -143,10 +154,9 @@ int nice(int);
 void sync(void);
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int brk(void *);
 void *sbrk(intptr_t);
-pid_t forkall(void);
 pid_t vfork(void);
 int vhangup(void);
 int chroot(const char *);
@@ -155,6 +165,11 @@ int sethostname(const char *, size_t);
 int usleep(unsigned);
 unsigned ualarm(unsigned, unsigned);
 int setgroups(size_t, const gid_t []);
+char *getpass(const char *);
+#endif
+
+#ifdef _GNU_SOURCE
+pid_t forkall(void);
 int setresuid(uid_t, uid_t, uid_t);
 int setresgid(gid_t, gid_t, gid_t);
 int getresuid(uid_t *, uid_t *, uid_t *);
@@ -166,7 +181,6 @@ int getdtablesize(void);
 void setusershell(void);
 void endusershell(void);
 char *getusershell(void);
-char *getpass(const char *);
 #endif
 
 #ifdef _LARGEFILE64_SOURCE

^ permalink raw reply	[relevance 2%]

* _BSD_SOURCE support for musl ready
@ 2012-05-21  6:26  2% Isaac Dunham
    0 siblings, 1 reply; 73+ results
From: Isaac Dunham @ 2012-05-21  6:26 UTC (permalink / raw)
  To: musl

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

I think the _BSD_SOURCE support is ready to merge now.
It is available from 
https://github.com/idunham/musl bsd

Alternately, I attached the diff against master (master-bsd.diff, 604
lines total touching about 25 files)

If there are any issues with this, I can try to fix them.

Isaac Dunham

[-- Attachment #2: master-bsd.diff --]
[-- Type: text/x-patch, Size: 17723 bytes --]

diff --git a/include/ctype.h b/include/ctype.h
index a85e907..8ceaa9f 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -30,7 +30,8 @@ int   toupper(int);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #define __NEED_locale_t
 #include <bits/alltypes.h>
diff --git a/include/dirent.h b/include/dirent.h
index d0a6b44..8162356 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -36,7 +36,7 @@ int            dirfd(DIR *);
 int alphasort(const struct dirent **, const struct dirent **);
 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define DT_UNKNOWN 0
 #define DT_FIFO 1
 #define DT_CHR 2
diff --git a/include/fcntl.h b/include/fcntl.h
index 63f1beb..b776d38 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -80,12 +80,24 @@ int posix_fallocate(int, off_t, off_t);
 #define S_IRWXO 0007
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define FAPPEND O_APPEND
 #define FFSYNC O_FSYNC
 #define FASYNC O_ASYNC
 #define FNONBLOCK O_NONBLOCK
 #define FNDELAY O_NDELAY
+
+#ifndef _UNISTD_H
+#define F_OK 0
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+#define F_ULOCK 0
+#define F_LOCK  1
+#define F_TLOCK 2
+#define F_TEST  3
+int lockf(int, int, off_t);
+#endif
 #endif
 
 #ifdef _LARGEFILE64_SOURCE
diff --git a/include/grp.h b/include/grp.h
index 5185185..0a55c62 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -28,7 +28,7 @@ struct group  *getgrent(void);
 void           endgrent(void);
 void           setgrent(void);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int getgrouplist(const char *, gid_t, gid_t *, int *);
 int setgroups(size_t, const gid_t *);
 int initgroups(const char *, gid_t);
diff --git a/include/math.h b/include/math.h
index 61738e6..d732648 100644
--- a/include/math.h
+++ b/include/math.h
@@ -330,8 +330,7 @@ double      trunc(double);
 float       truncf(float);
 long double truncl(long double);
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
-#define MAXFLOAT        3.40282347e+38F
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define M_E             2.7182818284590452354   /* e */
 #define M_LOG2E         1.4426950408889634074   /* log_2 e */
 #define M_LOG10E        0.43429448190325182765  /* log_10 e */
@@ -345,7 +344,13 @@ long double truncl(long double);
 #define M_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
 #define M_SQRT2         1.41421356237309504880  /* sqrt(2) */
 #define M_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
+#endif
 
+#if defined(_XOPEN_SOURCE)
+#define MAXFLOAT        3.40282347e+38F
+#endif
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 extern int signgam;
 
 double      j0(double);
@@ -358,6 +363,7 @@ double      yn(int, double);
 #endif
 
 #ifdef _GNU_SOURCE
+#define HUGE        3.40282347e+38F
 double      scalb(double, double);
 float       scalbf(float, float);
 long double scalbl(long double, long double);
diff --git a/include/net/if.h b/include/net/if.h
index 00c763a..e862c7c 100644
--- a/include/net/if.h
+++ b/include/net/if.h
@@ -21,7 +21,7 @@ void if_freenameindex (struct if_nameindex *);
 
 
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 
 #include <sys/socket.h>
 
diff --git a/include/netdb.h b/include/netdb.h
index 33b7a0a..d1fe9a8 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -5,7 +5,7 @@
 extern "C" {
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define __NEED_size_t
 #endif
 
@@ -118,7 +118,7 @@ struct protoent *getprotoent (void);
 struct protoent *getprotobyname (const char *);
 struct protoent *getprotobynumber (int);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 const char *hstrerror(int);
 struct hostent *gethostbyname (const char *);
 int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
@@ -147,6 +147,8 @@ int *__h_errno_location(void);
 #define TRY_AGAIN      2
 #define NO_RECOVERY    3
 #define NO_DATA        4
+
+int innetgr(const char *, const char *, const char *, const char *);
 #endif
 
 
diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index c8a1a4b..8180a83 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -2,5 +2,22 @@
 #define _NETINET_TCP_H
 
 #define TCP_NODELAY 1
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#include <sys/types.h>
+#include <sys/socket.h>
+#define	TCP_MAXSEG	 2
+#define TCP_CORK	 3
+#define TCP_KEEPIDLE	 4
+#define TCP_KEEPINTVL	 5
+#define TCP_KEEPCNT	 6
+#define TCP_SYNCNT	 7
+#define TCP_LINGER2	 8
+#define TCP_DEFER_ACCEPT 9
+#define TCP_WINDOW_CLAMP 10
+#define TCP_INFO	 11
+#define	TCP_QUICKACK	 12
+#define TCP_CONGESTION	 13
+#define TCP_MD5SIG	 14
+#endif
 
 #endif
diff --git a/include/setjmp.h b/include/setjmp.h
index b024c44..88fb950 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -9,7 +9,8 @@ extern "C" {
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 typedef unsigned long sigjmp_buf[(128+sizeof(jmp_buf))/sizeof(long)];
 #ifdef _GNU_SOURCE
 #define jmp_buf sigjmp_buf
@@ -19,7 +20,8 @@ void siglongjmp (sigjmp_buf, int);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 int _setjmp (jmp_buf);
 void _longjmp (jmp_buf, int);
 #endif
diff --git a/include/signal.h b/include/signal.h
index 38f369b..ba3b3a5 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -6,7 +6,8 @@ extern "C" {
 #endif
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #ifdef _GNU_SOURCE
 #define __siginfo siginfo
@@ -204,9 +205,13 @@ void (*sigset(int, void (*)(int)))(int);
 #define SIGSTKSZ 8192
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef void (*sighandler_t)(int);
+typedef sighandler_t sig_t;
 void (*bsd_signal(int, void (*)(int)))(int);
+#endif
+
+#ifdef _GNU_SOURCE
 int sigisemptyset(const sigset_t *);
 #define SA_NOMASK SA_NODEFER
 #define SA_ONESHOT SA_RESETHAND
diff --git a/include/stdio.h b/include/stdio.h
index 355f425..e4740eb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -10,7 +10,8 @@ extern "C" {
 #define __NEED_size_t
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_ssize_t
 #define __NEED_off_t
 #endif
@@ -120,7 +121,8 @@ char *tmpnam(char *);
 FILE *tmpfile(void);
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 FILE *fmemopen(void *, size_t, const char *);
 FILE *open_memstream(char **, size_t *);
 FILE *fdopen(int, const char *);
@@ -146,12 +148,13 @@ char *ctermid(char *);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define P_tmpdir "/tmp"
 char *tempnam(const char *, const char *);
 #endif
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define L_cuserid 20
 char *cuserid(char *);
 #undef off64_t
diff --git a/include/stdlib.h b/include/stdlib.h
index 11331d9..644325e 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -78,7 +78,8 @@ size_t wcstombs (char *, const wchar_t *, size_t);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #ifndef WEXITSTATUS
 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
@@ -102,20 +103,24 @@ int rand_r (unsigned *);
 #endif
 
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
+char *realpath (const char *, char *);
+long int random (void);
+void srandom (unsigned int);
+char *initstate (unsigned int, char *, size_t);
+char *setstate (char *);
+#endif
+
 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 int putenv (char *);
 int posix_openpt (int);
 int grantpt (int);
 int unlockpt (int);
 char *ptsname (int);
-char *realpath (const char *, char *);
 char *l64a (long);
 long a64l (const char *);
 void setkey (const char *);
-long int random (void);
-void srandom (unsigned int);
-char *initstate (unsigned int, char *, size_t);
-char *setstate (char *);
 double drand48 (void);
 double erand48 (unsigned short [3]);
 long int lrand48 (void);
@@ -127,11 +132,14 @@ unsigned short *seed48 (unsigned short [3]);
 void lcong48 (unsigned short [7]);
 #endif
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #include <alloca.h>
 char *mktemp (char *);
 void *valloc (size_t);
 void *memalign(size_t, size_t);
+#endif
+
+#ifdef _GNU_SOURCE
 int clearenv(void);
 int ptsname_r(int, char *, size_t);
 char *ecvt(double, int, int *, int *);
diff --git a/include/string.h b/include/string.h
index 8cf0ee9..9715713 100644
--- a/include/string.h
+++ b/include/string.h
@@ -14,7 +14,7 @@ extern "C" {
 
 #define __NEED_size_t
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define __NEED_locale_t
 #endif
 
@@ -53,7 +53,7 @@ char *strerror (int);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 char *strtok_r (char *, const char *, char **);
 int strerror_r (int, char *, size_t);
 char *stpcpy(char *, const char *);
@@ -67,19 +67,31 @@ int strcoll_l (const char *, const char *, locale_t);
 size_t strxfrm_l (char *, const char *, size_t, locale_t);
 #endif
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 void *memccpy (void *, const void *, int, size_t);
 #endif
 
+#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
+int bcmp (const void *, const void *, size_t);
+void bcopy (const void *, void *, size_t);
+void bzero (void *, size_t);
+int strcasecmp (const char *, const char *);
+int strncasecmp (const char *, const char *, size_t);
+char *index (const char *, int);
+char *rindex (const char *, int);
+int ffs (int);
+#endif
+
 #ifdef _BSD_SOURCE
 size_t strlcat (char *, const char *, size_t);
 size_t strlcpy (char *, const char *, size_t);
 #endif
 
 #ifdef _GNU_SOURCE
+#define	strdupa(x)	strcpy(alloca(strlen(x)+1),x)
 int strverscmp (const char *, const char *);
-int strcasecmp (const char *, const char *);
-int strncasecmp (const char *, const char *, size_t);
+int strcasecmp_l (const char *, const char *, locale_t);
+int strncasecmp_l (const char *, const char *, size_t, locale_t);
 char *strchrnul(const char *, int);
 char *strcasestr(const char *, const char *);
 char *strsep(char **, const char *);
diff --git a/include/sys/mman.h b/include/sys/mman.h
index a48c2b4..a45f11d 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -27,6 +27,9 @@ int munlockall (void);
 
 #ifdef _GNU_SOURCE
 void *mremap (void *, size_t, size_t, int, ...);
+#endif
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int madvise (void *, size_t, int);
 #endif
 
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 5d50ae7..14a5424 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -90,7 +90,7 @@ int utimensat(int, const char *, const struct timespec [2], int);
 int lchmod(const char *, mode_t);
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define S_IREAD S_IRUSR
 #define S_IWRITE S_IWUSR
 #define S_IEXEC S_IXUSR
diff --git a/include/sys/time.h b/include/sys/time.h
index fa98944..144dd23 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -8,7 +8,8 @@ extern "C" {
 
 int gettimeofday (struct timeval *, void *);
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 #define ITIMER_REAL    0
 #define ITIMER_VIRTUAL 1
@@ -26,7 +27,7 @@ int utimes (const char *, const struct timeval [2]);
 
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int futimes(int, const struct timeval [2]);
 int lutimes(const char *, const struct timeval [2]);
 int settimeofday (const struct timeval *, void *);
diff --git a/include/sys/types.h b/include/sys/types.h
index b9b65f6..4b1e374 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -58,7 +58,7 @@ typedef __uint16_t u_int16_t;
 typedef __uint32_t u_int32_t;
 typedef __uint64_t u_int64_t;
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef char *caddr_t;
 typedef unsigned char u_char;
 typedef unsigned short u_short, ushort;
diff --git a/include/sys/wait.h b/include/sys/wait.h
index e73594a..5e3012b 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -17,7 +17,7 @@ pid_t wait (int *);
 int waitid (idtype_t, id_t, siginfo_t *, int);
 pid_t waitpid (pid_t, int *, int );
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #include <sys/resource.h>
 pid_t wait3 (int *, int, struct rusage *);
 pid_t wait4 (pid_t, int *, int, struct rusage *);
diff --git a/include/syslog.h b/include/syslog.h
index e0d86c0..278945f 100644
--- a/include/syslog.h
+++ b/include/syslog.h
@@ -59,7 +59,8 @@ void openlog (const char *, int, int);
 int setlogmask (int);
 void syslog (int, const char *, ...);
 
-#if defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define _PATH_LOG "/dev/log"
 #define __NEED_va_list
 #include <bits/alltypes.h>
 void vsyslog (int, const char *, va_list);
diff --git a/include/termios.h b/include/termios.h
index 7690883..1041759 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -32,7 +32,7 @@ int tcflow (int, int);
 
 pid_t tcgetsid (int);
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 void cfmakeraw(struct termios *);
 int cfsetspeed(struct termios *, speed_t);
 #endif
diff --git a/include/time.h b/include/time.h
index 98d0111..067b519 100644
--- a/include/time.h
+++ b/include/time.h
@@ -18,7 +18,8 @@ extern "C" {
 #define __NEED_clock_t
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_struct_timespec
 #define __NEED_clockid_t
 #define __NEED_timer_t
@@ -57,7 +58,8 @@ char *ctime (const time_t *);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 size_t strftime_l (char *, size_t, const char *, const struct tm *, locale_t);
 
diff --git a/include/unistd.h b/include/unistd.h
index b1a84d7..12f8feb 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -16,6 +16,12 @@ extern "C" {
 #define SEEK_CUR 1
 #define SEEK_END 2
 
+#if defined(_BSD_SOURCE) && !defined(L_SET)
+#define L_SET	SEEK_SET
+#define L_INCR	SEEK_CUR
+#define L_XTND	SEEK_END
+#endif
+
 #undef NULL
 #ifdef __cplusplus
 #define NULL 0
@@ -143,10 +149,9 @@ int nice(int);
 void sync(void);
 #endif
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int brk(void *);
 void *sbrk(intptr_t);
-pid_t forkall(void);
 pid_t vfork(void);
 int vhangup(void);
 int chroot(const char *);
@@ -155,6 +160,11 @@ int sethostname(const char *, size_t);
 int usleep(unsigned);
 unsigned ualarm(unsigned, unsigned);
 int setgroups(size_t, const gid_t []);
+char *getpass(const char *);
+#endif
+
+#ifdef _GNU_SOURCE
+pid_t forkall(void);
 int setresuid(uid_t, uid_t, uid_t);
 int setresgid(gid_t, gid_t, gid_t);
 int getresuid(uid_t *, uid_t *, uid_t *);
@@ -166,7 +176,6 @@ int getdtablesize(void);
 void setusershell(void);
 void endusershell(void);
 char *getusershell(void);
-char *getpass(const char *);
 #endif
 
 #ifdef _LARGEFILE64_SOURCE
diff --git a/include/utmp.h b/include/utmp.h
index b145a11..8ffe3d7 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -33,6 +33,7 @@ struct utmp *pututline(const struct utmp *);
 void         setutent(void);
 
 void updwtmp(const char *, const struct utmp *);
+void logwtmp(const char *, const char *, const char *);
 
 #define _PATH_UTMP "/dev/null"
 #define _PATH_WTMP "/dev/null"
diff --git a/src/stub/innetgr.c b/src/stub/innetgr.c
new file mode 100644
index 0000000..a9495a5
--- /dev/null
+++ b/src/stub/innetgr.c
@@ -0,0 +1,8 @@
+/* stub for innetgr */
+#define _GNU_SOURCE
+#include <netdb.h>
+int innetgr(const char *netgroup, const char *host, 
+	const char *user, const char *domain) 
+{
+	return 0;
+}
diff --git a/src/stub/utmpx.c b/src/stub/utmpx.c
index c483e4e..1d51d96 100644
--- a/src/stub/utmpx.c
+++ b/src/stub/utmpx.c
@@ -34,6 +34,10 @@ void updwtmpx(const char *f, const struct utmpx *u)
 {
 }
 
+void logwtmp(const char *l, const char *n, const char *h)
+{
+}
+
 weak_alias(endutxent, endutent);
 weak_alias(setutxent, setutent);
 weak_alias(getutxent, getutent);

^ permalink raw reply	[relevance 2%]

* [PATCH] string.h, _BSD_SOURCE, and *index()
@ 2012-04-13  1:45  4% Isaac Dunham
  0 siblings, 0 replies; 73+ results
From: Isaac Dunham @ 2012-04-13  1:45 UTC (permalink / raw)
  To: musl

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

I was working on _BSD_SOURCE for string.h.
Warning: several of the functions are mislabeled as _GNU_SOURCE in the
manpages. 
Everything in strings.h should be available if _GNU_SOURCE ||
BSD_SOURCE is defined and  string.h is included.
Actually, that's slightly an oversimplification-there are two
functions (*_l) that should be _GNU_SOURCE only.

(r)index was X/Open legacy, and has been dropped. The Open Group
recommended using 
#define index(a,b) strchr((a),(b))
#define rindex(a,b) strrchr((a),(b))
Which will let us remove two more files if we do it (rindex.c & index.c)
However, would removing those break the ABI?

There are two patches attached: the first (string.diff) will define
everything from strings.h if defined _BSD_SOURCE || _GNU_SOURCE
The second patch (rindex.diff) applies the second change, but does not
remove (r)index.c, to prevent ABI breakage.

Isaac Dunham

[-- Attachment #2: string.diff --]
[-- Type: text/x-patch, Size: 2056 bytes --]

diff --git a/include/string.h b/include/string.h
index 4aa930e..cd09513 100644
--- a/include/string.h
+++ b/include/string.h
@@ -14,7 +14,7 @@ extern "C" {
 
 #define __NEED_size_t
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define __NEED_locale_t
 #endif
 
@@ -53,7 +53,7 @@ char *strerror (int);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 char *strtok_r (char *, const char *, char **);
 int strerror_r (int, char *, size_t);
 char *stpcpy(char *, const char *);
@@ -67,10 +67,21 @@ int strcoll_l (const char *, const char *, locale_t);
 size_t strxfrm_l (char *, const char *, size_t, locale_t);
 #endif
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 void *memccpy (void *, const void *, int, size_t);
 #endif
 
+#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
+int bcmp (const void *, const void *, size_t);
+void bcopy (const void *, void *, size_t);
+void bzero (void *, size_t);
+int strcasecmp (const char *, const char *);
+int strncasecmp (const char *, const char *, size_t);
+char *index (const char *, int);
+char *rindex (const char *, int);
+int ffs (int);
+#endif
+
 #ifdef _BSD_SOURCE
 size_t strlcat (char *, const char *, size_t);
 size_t strlcpy (char *, const char *, size_t);
@@ -78,8 +89,8 @@ size_t strlcpy (char *, const char *, size_t);
 
 #ifdef _GNU_SOURCE
 int strverscmp (const char *, const char *);
-int strcasecmp (const char *, const char *);
-int strncasecmp (const char *, const char *, size_t);
+int strcasecmp_l (const char *, const char *, locale_t);
+int strncasecmp_l (const char *, const char *, size_t, locale_t);
 char *strchrnul(const char *, int);
 char *strcasestr(const char *, const char *);
 char *strsep(char **, const char *);

[-- Attachment #3: index.diff --]
[-- Type: text/x-patch, Size: 928 bytes --]

diff --git a/include/string.h b/include/string.h
index cd09513..ab9ba2d 100644
--- a/include/string.h
+++ b/include/string.h
@@ -77,8 +77,8 @@ void bcopy (const void *, void *, size_t);
 void bzero (void *, size_t);
 int strcasecmp (const char *, const char *);
 int strncasecmp (const char *, const char *, size_t);
-char *index (const char *, int);
-char *rindex (const char *, int);
+#define index(a,b) strchr((a),(b))
+#define rindex(a,b) strrchr((a),(b))
 int ffs (int);
 #endif
 
diff --git a/include/strings.h b/include/strings.h
index 345c651..f8fd255 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -17,8 +17,8 @@ void bzero (void *, size_t);
 
 int ffs (int);
 
-char *index (const char *, int);
-char *rindex (const char *, int);
+#define index(a,b) strchr((a),(b))
+#define rindex(a,b) strrchr((a),(b))
 
 int strcasecmp (const char *, const char *);
 int strncasecmp (const char *, const char *, size_t);

^ permalink raw reply	[relevance 4%]

* Re: [PATCH 0/4] Fix function definitions.
  2012-03-09 15:11  0%       ` Rob Landley
@ 2012-03-09 16:38  3%         ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2012-03-09 16:38 UTC (permalink / raw)
  To: musl

On Fri, Mar 09, 2012 at 09:11:05AM -0600, Rob Landley wrote:
> Why are you doing feature test macros at _all_ in a 2012 Linux libc?  If
> you don't #define any of them (which most code doesn't), you get (from
> /usr/lib/features.h):

features.h is part of glibc, and not a part I like, for several
reasons:

1. Each additional nested header increases base compile time
significantly, and makes a big difference for small translation units
that only includes one header themselves, due to extra path search,
open, read, parse, close, etc.

2. The way glibc does features.h, with _xxx_SOURCE macros as the input
and __USE_xxx macros as the output, obfuscates in the actual headers
which macros are necessary or sufficient to get the desired interface
declared. This makes them less useful as documentation, and encourages
programmers both to define extraneous/unwanted feature test macros due
to lack of awareness that one implies another, and (much worse) to
actually #define __USE_POSIX, etc. in their own sources rather than
defining the correct feature test macro.

3. Others I'm forgetting at the moment.. :-)

> /* If nothing (other than _GNU_SOURCE) is defined,
>    define _BSD_SOURCE and _SVID_SOURCE.  */
> #if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
>      !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
>      !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
>      !defined _BSD_SOURCE && !defined _SVID_SOURCE)
> # define _BSD_SOURCE    1
> # define _SVID_SOURCE   1
> #endif
> 
> and then a bit later...
> 
> /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
>    (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined).  */
> #if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \
>      !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
> # define _POSIX_SOURCE  1
> # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
> #  define _POSIX_C_SOURCE       2
> # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
> #  define _POSIX_C_SOURCE       199506L
> # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
> #  define _POSIX_C_SOURCE       200112L
> # else
> #  define _POSIX_C_SOURCE       200809L
> # endif
> # define __USE_POSIX_IMPLICITLY 1
> #endif
> 
> I.E. you get _BSD_SOURCE, _SVID_SOURCE, _POSIX_SOURCE, and
> _POSIX_C_SOURCE=200809L all #defined _FOR_ you if you just avoid
> mentioning any of these macros ever.

Relying on that is not portable, and musl does not do it. On
Linux/glibc you get the kitchen sink when you define nothing. On most
other unices, you get an intentionally-broken legacy environment
that's not conformant to modern standards.

All projects should explicitly define the feature test macros they
want. This also assists you in profiling the portability of your code
(switching out _GNU_SOURCE and you see exactly what extensions you're
using). Thankfully for ones that fail to do this, you can just add the
appropriate -D's to CPPFLAGS.

There's been some discussion of the "kitchen sink by default" approach
in musl, and I'm not entirely opposed to it, but the main issue is
that there's no portable way to select "plain ISO C" with a feature
test macro. There are glibc/gcc ways to request specific versions of
ISO C with feature test macros, but they took the silly approach of
renaming the macro for each version rather than something like #define
_ISO_C_SOURCE 199901L which would have been much cleaner...

Also note that glibc's version of "kitchen sink by default" is broken.
Several functions like strerror_r, basename, and perhaps still scanf
get *broken* GNU versions by default unless you specify an appropriate
feature test macro. So if you want to use them, you're stuck; you have
to use _POSIX_C_SOURCE or _XOPEN_SOURCE and then define some
additional macros to try to get back what you lost. And I'm not even
sure it's possible without breaking the standard functions again...

> And that's exactly what my code did before Georgi tried to build it
> against musl and suddenly that didn't work anymore because musl is weird.
> 
> (A sane development team would have implemented _negative_ macros, ala
> _ANSI_ONLY, to switch stuff _off_.)

There are very good reasons why this was not done; you could ask the
committees if you care.

> >> At present musl makes no attempt to support(*) the _BSD_SOURCE or
> >> _SVID_SOURCE feature test macros; every nonstandard (non-POSIX)
> >> extention offered by glibc is grouped together under _GNU_SOURCE, and
> >> this works for musl because (unlike with glibc), musl's _GNU_SOURCE
> >> only enables features; it does not alter standard interfaces like
> >> strerror_r or basename to be broken GNU versions of the functions.
> 
> A lot of those "nonstandard" things were in BSD circa 1982, before the
> FSF even existed.

I agree. But most of them were omitted from the standards for good
reasons, and even many of the ones that were included (like bcopy)
were redundant.

Anyway, the reason I've not focused on adding _BSD_SOURCE is mainly
lack of necessity. I don't think I've encountered a single package
that was defining _BSD_SOURCE and failed to build because of things it
expected to get from _BSD_SOURCE. If there are major packages that
could be made easier to build by adding it, I'd be a lot more
interested in doing so.

> I don't care about granularity, I just want my code to work.  But I
> refuse to #define _ALL_HAIL_RICHARD_STALLMAN as a condition of using
> standard Linux functions.
> 
> I will not say _GNU_SOURCE when implementing a project that has nothing
> whatsoever to do with the FSF's GNU project, and acts to replace large
> chunks of its' userspace.

OK, so basically you want alternate macros to request the kitchen sink
to avoid writing the word "GNU" anywhere in your project. :-)

All joking aside, at least this is the first *reason* I've seen for
possible changes in this area, so it's worth considering.

> >> I think there's a good (nontrivial) discussion to be had about whether
> >> it's worthwhile to have the _BSD_SOURCE and _SVID_SOURCE feature test
> >> macros supported in musl.
> 
> Given that the "nothing is #defined" behavior gives you most of this
> anyway on both glibc and uClibc, why musl is bothering with it at _all_
> is kinda inexplicable to me.

Because unlike uClibc, musl does not just copy all the mess from
glibc. I like the uClibc project and the people involved, but I don't
like the fact that basically everything but the internal
implementation details of stdio and locale are nearly direct copies
from glibc.

> Yes, I'm aware that Posix 2008 mentions feature test macros:
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02
> 
> And silently ignoring them is reasonably compliant behavior.  (You can
> even be technically compliant with Item 3 under _POSIX_C_SOURCE if you
> consider __linux__ a feature test macro.  It's got the double underscore!)

As long as you don't define additional things outside the reserved
namespace, it's compliant to ignore them. I agree totally.

Of course then your implementation complies only to POSIX, but not to
ISO C. For instance, this strictly conforming program cannot be
compiled (intentionally detailed to make it plausible):

#include <stdio.h>
#include <stdarg.h>
int debugging = 1;
int dprintf(const char *fmt, ...)
{
	int ret;
	if (debugging) return 0;
	va_list ap = va_start(fmt);
	ret = vprintf(fmt, ap);
	va_end(ap);
	return ret;
}
int main()
{
	dprintf("hello, world\n");
}

The same issue happens with conforming POSIX programs if you add
extensions outside the reserved namespaces.

> Which shows you all the compiler builtin #defines.  See __linux__ in
> that list?  If you _have_ to test for something, what's wrong with
> testing for __linux__?

This is not POSIX conformant. POSIX requires invoking the compiler
with -D_POSIX_C_SOURCE=200809L to respect the namespace. With your
suggestion, it would also be necessary to add -U__linux__ to the
command line.

In other words, your proposed change would break all correct programs
that are using feature test macros properly, for the sake of avoiding
adding a -D option to the CPPFLAGS of programs that aren't doing it
right.

> >>> Should the headers be filled with feature checks (that would make them
> >>> quite ugly) or assume we have _GNU_SOURCE defined and remove any
> >>> _GNU_SOURCE
> >>> checks?
> >>
> >> I'm confused what you mean by "assume we have _GNU_SOURCE defined".
> > 
> > Well, ignore my suggestion. I was thinking of removing most _GNU_SOURCE
> > checks in headers (except for pure GNU extensions) but reading what you
> > wrote above I remembered what PITA feature_macros were. Unfortunately
> > it seems that defining _GNU_SOURCE to get the kitchen sink is easier...
> 
> It's also wrong.  And it means that Musl can't build code that not just
> glibc and uClibc can build out of the box, but BSD can too.  (chroot()
> was _not_ invented by the gnu/dammit project.)

It's not my intent to imply that any of these features were invented
by the GNU project. Rather, _GNU_SOURCE is simply the only existing
feature test macro for "kitchen sink" that exists on Linux systems.
(Blame glibc for naming it this rather than _LINUX_SOURCE!) As such,
existing real-world software that's conforming to the standards and
using _POSIX_C_SOURCE or _XOPEN_SOURCE is already testing for the
availability of _GNU_SOURCE and adding that when it wants the kitchen
sink. While using a different name would be *cosmetically* better, it
would simply have the effect of making you add -D_BETTER_NAME_HERE to
all apps' CPPFLAGS since they'd no longer be able to find a working
option themselves...

> The feature test macros actually means that musl goes out of its _way_
> not to build them. You have extra code that's just there to break stuff.

One could also say that not having the internals of FILE defined in
stdio.h, and not using the same struct member names as glibc, is
"going out of its way" to break stuff...

In any case, the feature test macro issue is easily solved, if you
always want full extensions, by just using "CC=gcc -D_GNU_SOURCE".

If there's demand for a way to do this without ever having to write
that dirty word "GNU", we could consider adding an alias..

Rich


^ permalink raw reply	[relevance 3%]

* Re: [PATCH 0/4] Fix function definitions.
  2012-03-09  9:16  0%     ` Georgi Chorbadzhiyski
@ 2012-03-09 15:11  0%       ` Rob Landley
  2012-03-09 16:38  3%         ` Rich Felker
  0 siblings, 1 reply; 73+ results
From: Rob Landley @ 2012-03-09 15:11 UTC (permalink / raw)
  To: Georgi Chorbadzhiyski; +Cc: musl, Rich Felker, toybox

On 03/09/2012 03:16 AM, Georgi Chorbadzhiyski wrote:
> On 3/9/12 10:33 AM, Rich Felker wrote:
>> On Fri, Mar 09, 2012 at 10:21:04AM +0200, Georgi Chorbadzhiyski wrote:
>>> Subject: Re: [musl] [PATCH 0/4] Fix function definitions.
>>
>> I think you mean declarations. :-)
>>
>>> Hmm...it seems this is not enough. See include/unistd.h
>>>
>>> #ifdef _GNU_SOURCE
>>> int brk(void *);
>>> void *sbrk(intptr_t);
>>> pid_t forkall(void);
>>> int vhangup(void);
>>> int getpagesize(void);
>>> int usleep(unsigned);
>>> unsigned ualarm(unsigned, unsigned);
>>> int setgroups(size_t, const gid_t []);
>>> int setresuid(uid_t, uid_t, uid_t);
>>> int setresgid(gid_t, gid_t, gid_t);
>>> char *get_current_dir_name(void);
>>> #endif

Why are you doing feature test macros at _all_ in a 2012 Linux libc?  If
you don't #define any of them (which most code doesn't), you get (from
/usr/lib/features.h):

/* If nothing (other than _GNU_SOURCE) is defined,
   define _BSD_SOURCE and _SVID_SOURCE.  */
#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
     !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
     !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
     !defined _BSD_SOURCE && !defined _SVID_SOURCE)
# define _BSD_SOURCE    1
# define _SVID_SOURCE   1
#endif

and then a bit later...

/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
   (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined).  */
#if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \
     !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
# define _POSIX_SOURCE  1
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
#  define _POSIX_C_SOURCE       2
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
#  define _POSIX_C_SOURCE       199506L
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
#  define _POSIX_C_SOURCE       200112L
# else
#  define _POSIX_C_SOURCE       200809L
# endif
# define __USE_POSIX_IMPLICITLY 1
#endif

I.E. you get _BSD_SOURCE, _SVID_SOURCE, _POSIX_SOURCE, and
_POSIX_C_SOURCE=200809L all #defined _FOR_ you if you just avoid
mentioning any of these macros ever.

And that's exactly what my code did before Georgi tried to build it
against musl and suddenly that didn't work anymore because musl is weird.

(A sane development team would have implemented _negative_ macros, ala
_ANSI_ONLY, to switch stuff _off_.)

>>> Most of the above according to their man pages should be defined if
>>> _BSD_SOURCE is set.
>>
>> At present musl makes no attempt to support(*) the _BSD_SOURCE or
>> _SVID_SOURCE feature test macros; every nonstandard (non-POSIX)
>> extention offered by glibc is grouped together under _GNU_SOURCE, and
>> this works for musl because (unlike with glibc), musl's _GNU_SOURCE
>> only enables features; it does not alter standard interfaces like
>> strerror_r or basename to be broken GNU versions of the functions.

A lot of those "nonstandard" things were in BSD circa 1982, before the
FSF even existed.

I do not write code for Gnu Hurd.  I write code for Linux.  Saying
"GNU/Linux" is an obvious oxymoron because the licenses aren't even
compatible: GNU is GPLv3 (only), Linux is GPLv2 (only), they can't share
code with each other.

I don't care about granularity, I just want my code to work.  But I
refuse to #define _ALL_HAIL_RICHARD_STALLMAN as a condition of using
standard Linux functions.

I will not say _GNU_SOURCE when implementing a project that has nothing
whatsoever to do with the FSF's GNU project, and acts to replace large
chunks of its' userspace.

>> I think there's a good (nontrivial) discussion to be had about whether
>> it's worthwhile to have the _BSD_SOURCE and _SVID_SOURCE feature test
>> macros supported in musl.

Given that the "nothing is #defined" behavior gives you most of this
anyway on both glibc and uClibc, why musl is bothering with it at _all_
is kinda inexplicable to me.

Yes, I'm aware that Posix 2008 mentions feature test macros:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02

And silently ignoring them is reasonably compliant behavior.  (You can
even be technically compliant with Item 3 under _POSIX_C_SOURCE if you
consider __linux__ a feature test macro.  It's got the double underscore!)

>> The main benefit I can see is that
>> applications which define _BSD_SOURCE or _SVID_SOURCE in their default
>> CFLAGS for the sake of getting certain important traditional
>> interfaces (like MAP_ANONYMOUS) but without bringing in broken GNU
>> behavior could perhaps be made to work out-of-the-box on musl without
>> manually adding -D_GNU_SOURCE to the CFLAGS. On the other hand, since
>> musl's _GNU_SOURCE is "non-destructive", I'm not sure that's a huge
>> benefit.

It's not non-destructive to a program that didn't #define _any_ of this
stuff.  It requires you to #define stuff other libc's don't to get what
should be default behavior.

>> (*) _BSD_SOURCE appears in some places in musl's headers now, but that
>> was due to a (rather ill-thought-out) attempt to add some BSD
>> functions like strlcpy which glibc refuses to support, and avoid
>> making them visible when just _GNU_SOURCE is used. I'm largely
>> convinced this approach was a mistake, but how it should work is still
>> a topic for discussion...
> 
> Umm, like I expected all those declarations open a big can of worms :(

Allow me to introduce you to:

  cc -E -dM - < /dev/null

Which shows you all the compiler builtin #defines.  See __linux__ in
that list?  If you _have_ to test for something, what's wrong with
testing for __linux__?

>>> Should the headers be filled with feature checks (that would make them
>>> quite ugly) or assume we have _GNU_SOURCE defined and remove any
>>> _GNU_SOURCE
>>> checks?
>>
>> I'm confused what you mean by "assume we have _GNU_SOURCE defined".
> 
> Well, ignore my suggestion. I was thinking of removing most _GNU_SOURCE
> checks in headers (except for pure GNU extensions) but reading what you
> wrote above I remembered what PITA feature_macros were. Unfortunately
> it seems that defining _GNU_SOURCE to get the kitchen sink is easier...

It's also wrong.  And it means that Musl can't build code that not just
glibc and uClibc can build out of the box, but BSD can too.  (chroot()
was _not_ invented by the gnu/dammit project.)

The feature test macros actually means that musl goes out of its _way_
not to build them. You have extra code that's just there to break stuff.

Rob


^ permalink raw reply	[relevance 0%]

* Re: [PATCH 0/4] Fix function definitions.
  2012-03-09  8:33  5%   ` Rich Felker
@ 2012-03-09  9:16  0%     ` Georgi Chorbadzhiyski
  2012-03-09 15:11  0%       ` Rob Landley
  0 siblings, 1 reply; 73+ results
From: Georgi Chorbadzhiyski @ 2012-03-09  9:16 UTC (permalink / raw)
  To: musl; +Cc: Rich Felker, Rob Landley, toybox

On 3/9/12 10:33 AM, Rich Felker wrote:
> On Fri, Mar 09, 2012 at 10:21:04AM +0200, Georgi Chorbadzhiyski wrote:
>> Subject: Re: [musl] [PATCH 0/4] Fix function definitions.
>
> I think you mean declarations. :-)
>
>> Hmm...it seems this is not enough. See include/unistd.h
>>
>> #ifdef _GNU_SOURCE
>> int brk(void *);
>> void *sbrk(intptr_t);
>> pid_t forkall(void);
>> int vhangup(void);
>> int getpagesize(void);
>> int usleep(unsigned);
>> unsigned ualarm(unsigned, unsigned);
>> int setgroups(size_t, const gid_t []);
>> int setresuid(uid_t, uid_t, uid_t);
>> int setresgid(gid_t, gid_t, gid_t);
>> char *get_current_dir_name(void);
>> #endif
>>
>> Most of the above according to their man pages should be defined if
>> _BSD_SOURCE is set.
>
> At present musl makes no attempt to support(*) the _BSD_SOURCE or
> _SVID_SOURCE feature test macros; every nonstandard (non-POSIX)
> extention offered by glibc is grouped together under _GNU_SOURCE, and
> this works for musl because (unlike with glibc), musl's _GNU_SOURCE
> only enables features; it does not alter standard interfaces like
> strerror_r or basename to be broken GNU versions of the functions.
>
> I think there's a good (nontrivial) discussion to be had about whether
> it's worthwhile to have the _BSD_SOURCE and _SVID_SOURCE feature test
> macros supported in musl. The main benefit I can see is that
> applications which define _BSD_SOURCE or _SVID_SOURCE in their default
> CFLAGS for the sake of getting certain important traditional
> interfaces (like MAP_ANONYMOUS) but without bringing in broken GNU
> behavior could perhaps be made to work out-of-the-box on musl without
> manually adding -D_GNU_SOURCE to the CFLAGS. On the other hand, since
> musl's _GNU_SOURCE is "non-destructive", I'm not sure that's a huge
> benefit.
>
> (*) _BSD_SOURCE appears in some places in musl's headers now, but that
> was due to a (rather ill-thought-out) attempt to add some BSD
> functions like strlcpy which glibc refuses to support, and avoid
> making them visible when just _GNU_SOURCE is used. I'm largely
> convinced this approach was a mistake, but how it should work is still
> a topic for discussion...

Umm, like I expected all those declarations open a big can of worms :(

>> Should the headers be filled with feature checks (that would make them
>> quite ugly) or assume we have _GNU_SOURCE defined and remove any _GNU_SOURCE
>> checks?
>
> I'm confused what you mean by "assume we have _GNU_SOURCE defined".

Well, ignore my suggestion. I was thinking of removing most _GNU_SOURCE
checks in headers (except for pure GNU extensions) but reading what you
wrote above I remembered what PITA feature_macros were. Unfortunately
it seems that defining _GNU_SOURCE to get the kitchen sink is easier...

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


^ permalink raw reply	[relevance 0%]

* Re: [PATCH 0/4] Fix function definitions.
  @ 2012-03-09  8:33  5%   ` Rich Felker
  2012-03-09  9:16  0%     ` Georgi Chorbadzhiyski
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2012-03-09  8:33 UTC (permalink / raw)
  To: musl

On Fri, Mar 09, 2012 at 10:21:04AM +0200, Georgi Chorbadzhiyski wrote:
> Subject: Re: [musl] [PATCH 0/4] Fix function definitions.

I think you mean declarations. :-)

> Hmm...it seems this is not enough. See include/unistd.h
> 
> #ifdef _GNU_SOURCE
> int brk(void *);
> void *sbrk(intptr_t);
> pid_t forkall(void);
> int vhangup(void);
> int getpagesize(void);
> int usleep(unsigned);
> unsigned ualarm(unsigned, unsigned);
> int setgroups(size_t, const gid_t []);
> int setresuid(uid_t, uid_t, uid_t);
> int setresgid(gid_t, gid_t, gid_t);
> char *get_current_dir_name(void);
> #endif
> 
> Most of the above according to their man pages should be defined if
> _BSD_SOURCE is set.

At present musl makes no attempt to support(*) the _BSD_SOURCE or
_SVID_SOURCE feature test macros; every nonstandard (non-POSIX)
extention offered by glibc is grouped together under _GNU_SOURCE, and
this works for musl because (unlike with glibc), musl's _GNU_SOURCE
only enables features; it does not alter standard interfaces like
strerror_r or basename to be broken GNU versions of the functions.

I think there's a good (nontrivial) discussion to be had about whether
it's worthwhile to have the _BSD_SOURCE and _SVID_SOURCE feature test
macros supported in musl. The main benefit I can see is that
applications which define _BSD_SOURCE or _SVID_SOURCE in their default
CFLAGS for the sake of getting certain important traditional
interfaces (like MAP_ANONYMOUS) but without bringing in broken GNU
behavior could perhaps be made to work out-of-the-box on musl without
manually adding -D_GNU_SOURCE to the CFLAGS. On the other hand, since
musl's _GNU_SOURCE is "non-destructive", I'm not sure that's a huge
benefit.


(*) _BSD_SOURCE appears in some places in musl's headers now, but that
was due to a (rather ill-thought-out) attempt to add some BSD
functions like strlcpy which glibc refuses to support, and avoid
making them visible when just _GNU_SOURCE is used. I'm largely
convinced this approach was a mistake, but how it should work is still
a topic for discussion...

> Should the headers be filled with feature checks (that would make them
> quite ugly) or assume we have _GNU_SOURCE defined and remove any _GNU_SOURCE
> checks?

I'm confused what you mean by "assume we have _GNU_SOURCE defined".

Rich


^ permalink raw reply	[relevance 5%]

* Re: New daily reports - nothing
  @ 2011-08-10 12:09  5%                     ` Luka Marčetić
  0 siblings, 0 replies; 73+ results
From: Luka Marčetić @ 2011-08-10 12:09 UTC (permalink / raw)
  To: musl

On 08/10/2011 06:59 AM, Rich Felker wrote:
> Here are the things I would like you to focus on right now, roughly in
> order of priority:
>
> 1. Fixing issues with test validity, like the buffer overflow/heap
> corruption issues that make it impossible to actually detect failure.
> This is a must.

Of course.

> 2. Documenting the tests you have: what assertions they test. As
> examples, "memcpy does not read past the end of the source buffer", or
> "pthread_mutex_lock does not return EINTR when a signal is handled
> while waiting for the lock". Along with that, a description of what
> conditions the test covers (since for most of the tests, there's
> theoretically a near-infinite set of possible inputs, and you can only
> test a "representative" subset).
> (I know you already have pretty good comments in the code, but what
> I'm talking about is higher-level documentation, whether in comments
> or separate from the source, about the larger purpose of the code and
> what each test is checking.)

This is from buf.c:

/**
  ** \file
  ** Tests functions for writing beyond string lenght and errno's they set
  ** tests: confstr, getcwd, getdelim, gethostname, iconv, mbstowcs, 
snprintf,
  **        readlink, strfmon, strftime, wcstombs, ttyname_r, strerror_r
     [...]
  **/

If I wrote similar descriptions for all the tests, would that do? It 
says what the test collection tests, and for which functions. I reckon 
that, for example, the fact that `confstr` is tested using _CS_PATH 
should stay in the source code. Esp. for things like numeric.c where 
test data is huge.

> 3. Cleaning up the build system and source to make sure it builds
> without modification (except perhaps CFLAGS tweaks) on fairly recent
> glibc and musl version.

I'll make sure it builds with the newest musl as well. If you have some 
more specific instructions, let me know. Or if there's something I miss, 
please tell me. Thanks

> 4. Finish testing additional areas in the categories you're already
> working on.

I suppose you mean finish adding remaining tests to pthread_eintr.c. Or 
is there something I missed in collections that I only call broken, 
implying they would be done when fixed?

> 5. Test categories 4 and 5. I think it would be nice to pull in some
> existing third-party (e.g. GNU) tests for these, but clean them up (as
> in the project description) to avoid checking for GNU-specific stuff
> and not to bail out as soon as the first test fails.

So huge format string for snprintf, and weeding out glibc-specific tests 
from autoconf tests? Where can I get the latter? Do I rewrite them, or 
just try to incorporate into cluts (I'm guessing they're GPL, so...).

> One thing I'd like you to drop for now is working on the setuid test.
> It's been a time sink, and based on the work and discussion we already
> did (which were very valuable in themselves), I have a working test
> for it. You're welcome to incorporate that in cluts (preferably after
> GSoC). I know this is kinda frustrating, but we really don't have time
> for you to keep trying to fix it alongside all the other work that
> remains to be done.

Ok, I'll do that.
Thanks for the instructions, Rich.
Luka


^ permalink raw reply	[relevance 5%]

* Re: New daily reports - nothing
  @ 2011-08-10 11:47  5%                     ` Luka Marčetić
  0 siblings, 0 replies; 73+ results
From: Luka Marčetić @ 2011-08-10 11:47 UTC (permalink / raw)
  To: musl

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

On 08/10/2011 03:38 AM, Rich Felker wrote:

(Thanks for explaining mprotect first of all)

> Especially as you're nearing the deadline, I'd like to ask you to
> please listen when I make recommendations like this. Sure learning
> about mprotect is educational, but in terms of getting stuff done, if
> you'd taken my advice several days (a week now?) back about how to
> check for writes past the end of the buffer, you would have been able
> to spend your time today getting something done rather than wondering
> why mprotect wasn't doing what you wanted....
>
> Rich

The worst thing is, I already do check that: I write '\r' in the last 
byte of the buffer, and then call the function saying the buffer is 
size-1 long (so it shows if it gets overwritten). It doesn't even make 
sense to test for reading/writing beyond size+1, except to test for 
implementation lunacy. I have no idea why I did that anymore. I 
should've just removed sigset altogether. I didn't need mprotect, nor 
wrappers... :-(
P.S. Final buf.c thus won't look like the attached file. In it, 
alloc_bounded() is the broken one - a fixed version may appear somewhere 
else in the future though.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: buf.c --]
[-- Type: text/x-csrc; name="buf.c", Size: 20092 bytes --]

#include <errno.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/mman.h>
#include <fcntl.h>
#include "common/common.h"
#include <string.h>   //strerror_r
#include <limits.h>   //PATH_MAX
#include <stdlib.h>   //mbstowcs
#include <stdio.h>    //getdelim, snprintf
#include <unistd.h>   //confstr, getcwd, gethostname, readlink
#include <iconv.h>    //iconv
#include <time.h>     //time, gmtime
#include <monetary.h> //strfmon

/*
 * Copyright (c) 2011 Luka Marčetić<paxcoder@gmail.com>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted.
 *
 * There's ABSOLUTELY NO WARRANTY, express or implied.
 */

/**
 ** \file
 ** Tests functions for writing beyond string lenght and errno's they set
 ** tests: confstr, getcwd, getdelim, gethostname, iconv, mbstowcs, snprintf,
 **        readlink, strfmon, strftime, wcstombs, ttyname_r, strerror_r
 ** depends: malloc, sigaction, strlen, mkstemp, fdopen,fclose,fileno, strptime
 **          iconv_open,iconv_close, free, setjmp, longjmp, open,close,
 **          mmap,mprotect,munmap
 **/

jmp_buf env;
struct sigaction act, oldact[2]; //set by main, used in wrappers:

void bridge_sig_jmp(int sig);
static void* malloc_bounded(size_t size);
static int   free_bounded(void* vp);
static int wrap_confstr(int name, char *buf, size_t len);
static int wrap_getcwd(char *buf, size_t size);
static int wrap_getdelim(char **lineptr, size_t *n, int delimiter,FILE *stream);
static int wrap_gethostname(char *name, size_t namelen);
static int wrap_mbstowcs(wchar_t *pwcs, char *s, size_t n);
static int wrap_snprintf(char *s, size_t n, char *format/*, ...*/);
static int wrap_readlink(char *path, char *buf, size_t bufsize);
static int wrap_strfmon(char *s, size_t maxsize, char *format/*,...*/, float F);
static int wrap_strftime(char *s,size_t maxsize,char *format,struct tm *timeptr);
static int wrap_wcstombs(char *s, wchar_t *pwcs, size_t n);
static int wrap_strerror_r(int errnum, char *strerrbuf, size_t buflen);
static int wrap_ttyname_r(int fildes, char *name, size_t namesize);
static int wrap_iconv(iconv_t cd, char **inbuf,  size_t *inbytesleft,
                                  char **outbuf, size_t *outbytesleft);

//još malloc wrapper thingy----
int main()
{
    iconv_t cd;
    wchar_t *ws;
    size_t size;
    struct tm tm;
    FILE *stream = NULL;
    char *s, *fun, *tmp, filename[] = "/tmp/clutsXXXXXX";
    int fd, sig, function, wrong, failed, err, err_expected;
    int ffun[] = {2, 3,8}; //functions that depend on the temporary file(two do)
    
    //GLOBAL:
    act=(struct sigaction){.sa_handler=bridge_sig_jmp, .sa_flags=SA_NODEFER};

    failed = 0;
    function = 1;
    do {
        err = wrong = 0;
        s = fun = tmp = NULL;
        ws = NULL;
        stream = NULL;
        if (seq_has(function, ffun) && (fd=mkstemp(filename)) != -1) {
            if ((stream=fdopen(fd, "w+b")) == NULL)
                wrong = -1;
        }
        switch(function) {
            case 1:
                fun = sreturnf("confstr(_CS_PATH, s, sizeof(s)-1)");
                size = confstr(_CS_PATH, NULL, 0);
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                
                if ((err=wrap_confstr(_CS_PATH, s, size-1)) == -1)
                    wrong = 1;
                else
                    /*if ((err))
                        wrong = 5;
                    else */if (s[size-1] != '\r')
                        wrong = 2;
            break;
            case 2:
                fun = sreturnf("getcwd(s, sizeof(s)-1)");
                s = malloc(PATH_MAX);
                size = strlen(getcwd(s, PATH_MAX))+1;
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err=wrap_getcwd(s, size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = ERANGE))
                    wrong = 3;
            break;
            case 3:
                //same for getline
                fun = sreturnf("getdelim(&s, &<strlen(s)>, '\\n', stream)");
                if (stream == NULL)
                    break;
                fwrite("123\n", (size = 4), 1, stream);
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if((err=wrap_getdelim(&s,(size_t[]){size-1},'\n',stream)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
            break;
            case 4:
                fun = sreturnf("gethostname(s, sizeof(s)-1)");
                s = malloc(HOST_NAME_MAX);
                gethostname(s, HOST_NAME_MAX);
                size = strlen(s) + 1;
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err=wrap_gethostname(s, size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = ERANGE))
                    wrong = 3;
            break;
            case 5:
                fun = sreturnf("iconv(&<\"abcd\">, &<4>, &s, &<3>)");
                s = malloc_bounded((size = 4));
                s[size-1] = '\r';
                
                cd = iconv_open("", "");
                err = wrap_iconv(
                        cd, 
                        (char **)(char *[]){"abcd"},
                        (size_t *)(size_t []){size},
                        (char **)(char *[]){s},
                        (size_t *)(size_t []){size-1}
                );
                iconv_close(cd);
                if (err == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = E2BIG))
                    wrong = 3;
            break;
            case 6:
                fun = sreturnf("mbstowcs(ws, \"abc\", 3)");
                size = 4;
                ws = malloc_bounded(size * sizeof(wchar_t));
                ws[size-1] = L'\r';
                
                if ((err=wrap_mbstowcs(ws, "abcd", size-1)) == -1)
                    wrong = 1;
                else if (ws[size-1] != L'\r')
                    wrong = 2;
                else if (err != (err_expected = E2BIG))
                    wrong = 3;
            break;
            case 7:
                fun = sreturnf("snprintf(s, 3, \"abc\")");
                s = malloc_bounded((size = 4));
                s[size-1] = '\r';
                
                if ((err=wrap_snprintf(s, size-1, "abc")) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
            break;
            case 8:
                fun=sreturnf("readlink(\"%s.sym\", s, sizeof(s)-1)", filename);
                tmp = sreturnf("%s.sym", filename);
                if (stream == NULL)
                    break;
                else if (symlink(filename, tmp)) {
                    wrong = 4;
                    break;
                }
                s = malloc(PATH_MAX);
                size = readlink(tmp, s, PATH_MAX);
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err=wrap_readlink(tmp, s, size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
            break;
            case 9:
                fun = sreturnf("strerror_r(1, s, sizeof(s)-1)");
                s = malloc(80);
                strerror_r(1, s, 80);
                size = strlen(s);
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err = wrap_strerror_r(1, s, size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = ERANGE))
                    wrong = 3;
            break;
            case 10:
                fun = sreturnf("strfmon(s, sizeof(s)-1, \"%%!i\", 123.0)");
                s = malloc(80);
                size = strfmon(s, 80, "%!i", 123.0) + 1;
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err=wrap_strfmon(s, size-1, "%!i", 123.0)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = E2BIG))
                    wrong = 3;
            break;
            case 11:
                fun = sreturnf("strftime(s, sizeof(s)-1, \"%Y\", tm)");
                s = malloc(80);
                tm = *gmtime((time_t []){time(NULL)});
                strftime(s, 80, "%Y", &tm);
                size = strlen(s) + 1;
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err=wrap_strftime(s, size-1, "%Y", &tm)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
            break;
            case 12:
                fun = sreturnf("ttyname_r(STDERR_FILENO, s, sizeof(s)-1)");
                s = malloc(TTY_NAME_MAX);
                err = ttyname_r(STDERR_FILENO, s, TTY_NAME_MAX);
                size = strlen(s) + 1;
                free(s); s = NULL;
                if (size < 2) {
                    wrong = -2;
                    break;
                }
                s = malloc_bounded(size);
                s[size-1] = '\r';
                
                if ((err = wrap_ttyname_r(STDERR_FILENO, s, size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
                else if (err != (err_expected = ERANGE))
                    wrong = 3;
            break;
            case 13:
                fun = sreturnf("wcstombs(s, L\"abc\" 3)");
                s = malloc_bounded((size = 4));
                s[size-1] = '\r';
                
                if ((err=wrap_wcstombs(s, L"abcd", size-1)) == -1)
                    wrong = 1;
                else if (s[size-1] != '\r')
                    wrong = 2;
            break;
            default:
                function = 0; //exit while
            break;
        }
        if(((sig=free_bounded(ws)) || (sig=free_bounded(s))) && !wrong)
            wrong = 6;

        if (wrong) {
            ++failed;
            if (wrong == -2)
                fprintf(
                    stderr,
                    "%s could not be tested, because a preceeding call to the"
                    " same function returned length (of s) lesser than 2\n",
                    fun
                );
            else if (wrong == -1)
                fprintf(stderr, "%s is unable to run, opening \"%s\" failed\n",
                        fun, filename);
            else if (wrong == 1)
                fprintf(stderr, "%s caused a SIGSEGV!\n", fun);
            else if (wrong == 2)
                fprintf(stderr, "%s wrote too many bytes to the buffer\n",fun);
            else if (wrong == 3) {
                free(tmp);
                fprintf(stderr, "%s failed to set errno=%s",
                        fun, (tmp = e_name(err_expected)));
                free(tmp);
                fprintf(stderr, " (it is %s)\n", (tmp = e_name(err)));
            }
            else if (wrong == 4)
                fprintf(stderr,
                        "%s was not called,"
                        " symlink(\"%s\", \"%s.sym\") failed\n",
                        fun, filename, filename);
            else if (wrong == 5) {
                free(tmp);
                fprintf(stderr, "%s set errno = %s\n", fun, (tmp=e_name(err)));
            }
            else if (wrong == 6)
                fprintf(
                    stderr,
                    "%s caused a signal %d to be received. A pointer passed to"
                    " the function might be errorneously redirected\n",
                    fun, sig
                );
        }
        free(fun);
        free(tmp);
        if (stream != NULL && seq_has(function, ffun))
            fclose(stream);
    } while(function++);
    
    return failed;
}

///A bridge function for sigaction(), jumps via longjmp() back to a setjmp()
void bridge_sig_jmp(int sig)
{
    longjmp(env, sig);
    return;
}

/**
 ** A quasi-implementation of malloc(), which allocates 2 additional words, one
 ** before the memory segment of the requested size, one after. It protects
 ** those words against reading/writing, so accessing them raises a SIGSEGV.
 ** \param size length of the memory segment to be allocated for reading/writing
 ** \returns a pointer to the allocated memory, NULL on failure
 ** \warning Needs to be freed by free_bounded(), not the regular free()
 **/
static void* malloc_bounded(size_t size) {
    int fd = open("/dev/zero", O_RDWR);
    size_t *stp = NULL;
    
    if (fd != -1) {
        size   +=  2 * sizeof(size_t);  //+boundry words
        stp    =   mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
        if (stp != MAP_FAILED) {
            *stp   =   size;                //write metadata to the first word
            //seal both ends:
            mprotect(stp,                                sizeof(size_t), PROT_NONE);
            mprotect((((char*)stp)+size)-sizeof(size_t), sizeof(size_t), PROT_NONE);
            ++stp;
        }
        else
            stp = NULL;
        close(fd);
    }
    return (void *)stp;
}
/**
 ** A quasi-implementation of free, which uses the metadata hidden in boundry
 ** words (allocated by malloc_bounded()) to unmap space.
 ** \param vp the pointer returned by malloc_bounded()
 ** \returns a caught signal on failure
 **/
static int free_bounded(void* vp) {
    size_t *stp = ((size_t *)vp)-1;
    int sig = 0;
    
    if(vp != NULL) {
        sigaction(SIGABRT, &act, &oldact[0]);
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!(sig = setjmp(env))) {
            mprotect(stp, sizeof(size_t), PROT_READ);
            munmap(stp, *stp);
        }   
        sigaction(SIGSEGV, &oldact[0], NULL);
        sigaction(SIGABRT, &oldact[0], NULL);
    }
    return sig;
}

///< Wrappers start here: They take the same~ arguments as the functions that
///< they call, but catch SIGSEGVs, and return error codes on failure
static int wrap_confstr(int name, char *buf, size_t len)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (confstr(name, buf, len)  ==  0)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_getcwd(char *buf, size_t size)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (getcwd(buf, size)  ==  NULL)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_getdelim(char **lineptr, size_t *n, int delimiter, FILE *stream)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (getdelim(lineptr, n, delimiter, stream)  ==  -1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_gethostname(char *name, size_t namelen)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (gethostname(name, namelen)  ==  -1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_iconv(iconv_t cd, char **inbuf,  size_t *inbytesleft,
                                  char **outbuf, size_t *outbytesleft)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft)==(size_t)-1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_mbstowcs(wchar_t *pwcs, char *s, size_t n)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (mbstowcs(pwcs, s, n)  ==  (size_t)-1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_snprintf(char *s, size_t n, char *format/*, ...*/)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (snprintf(s, n, format)  <  0)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_readlink(char *path, char *buf, size_t bufsize)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (readlink(path, buf, bufsize)  ==  -1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_strfmon(char *s, size_t maxsize, char *format/*, ...*/, float F)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (strfmon(s, maxsize, format, F)  ==  -1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_strftime(char *s,size_t maxsize,char *format,struct tm *timeptr)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (strftime(s, maxsize, format, timeptr)  ==  0)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_wcstombs(char *s, wchar_t *pwcs, size_t n)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env)) {
            if (wcstombs(s, pwcs, n)  ==  (size_t)-1)
                err = errno;
        }else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_strerror_r(int errnum, char *strerrbuf, size_t buflen)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env))
            err = strerror_r(errnum, strerrbuf, buflen);
        else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}
static int wrap_ttyname_r(int fildes, char *name, size_t namesize)
{
        int err = 0;
        sigaction(SIGSEGV, &act, &oldact[0]);
        if(!setjmp(env))
            err = ttyname_r(fildes, name, namesize);
        else
            err = -1;
        sigaction(SIGSEGV, &oldact[0], NULL);
        return err;
}

^ permalink raw reply	[relevance 5%]

* Re: cluts: strerror_r() test
  2011-07-14 17:55  6%                   ` Rich Felker
@ 2011-07-14 19:35  6%                     ` Luka Marčetić
  0 siblings, 0 replies; 73+ results
From: Luka Marčetić @ 2011-07-14 19:35 UTC (permalink / raw)
  To: musl

On 07/14/2011 07:55 PM, Rich Felker wrote:
> On Thu, Jul 14, 2011 at 12:41:35PM +0200, Luka Marčetić wrote:
>> one). Strerror_r implementations are free to redirect a passed
>> pointer to immutable memory if size(buflen) argument is sufficiently
> I don't see how this can be. [...]

Neither does the standard, ##C lied to me ;-)

>> large. Of course, wanting to write to s[size-1] would SIGSEGV in
> Actually it would probably just corrupt malloc data structures and
> lead to havoc much later in the program. To test you could use a trick
> like the string function tests, but that's really overkill. Just
> allocating a buffer that's large enough, pre-filling it with an
> unusual value, and calling the function with a shorter length
> parameter should work. Then you can check that none of the fill bytes
> were clobbered past the allowed length.
>
> I hope this makes sense...

Unfortunately, no, I don't get any of it.


^ permalink raw reply	[relevance 6%]

* Re: cluts: strerror_r() test
  2011-07-14 10:41 13%                 ` cluts: strerror_r() test Luka Marčetić
  2011-07-14 10:47  6%                   ` Solar Designer
@ 2011-07-14 17:55  6%                   ` Rich Felker
  2011-07-14 19:35  6%                     ` Luka Marčetić
  1 sibling, 1 reply; 73+ results
From: Rich Felker @ 2011-07-14 17:55 UTC (permalink / raw)
  To: musl

On Thu, Jul 14, 2011 at 12:41:35PM +0200, Luka Marčetić wrote:
> one). Strerror_r implementations are free to redirect a passed
> pointer to immutable memory if size(buflen) argument is sufficiently

I don't see how this can be. sterror_r (the correct standard function
not the GNU bastardization) has no way of returning a pointer to a
string. Due to the interface design, it must write into the provided
buffer. By the way, this is another reason _POSIX_C_SOURCE or
_XOPEN_SOURCE must be defined - glibc likes to give you nonstandard
GNU functions by default...

> large. Of course, wanting to write to s[size-1] would SIGSEGV in

Actually it would probably just corrupt malloc data structures and
lead to havoc much later in the program. To test you could use a trick
like the string function tests, but that's really overkill. Just
allocating a buffer that's large enough, pre-filling it with an
unusual value, and calling the function with a shorter length
parameter should work. Then you can check that none of the fill bytes
were clobbered past the allowed length.

I hope this makes sense...

Rich


^ permalink raw reply	[relevance 6%]

* Re: cluts: strerror_r() test
  2011-07-14 10:41 13%                 ` cluts: strerror_r() test Luka Marčetić
@ 2011-07-14 10:47  6%                   ` Solar Designer
  2011-07-14 17:55  6%                   ` Rich Felker
  1 sibling, 0 replies; 73+ results
From: Solar Designer @ 2011-07-14 10:47 UTC (permalink / raw)
  To: musl

Luka,

On Thu, Jul 14, 2011 at 12:41:35PM +0200, Luka Mar??eti?? wrote:
> The test was uncommented yesterday morning,

Oh, I am using a tree I pulled yesterday morning as well, apparently
before that change.

Thank you for explaining this.

Alexander


^ permalink raw reply	[relevance 6%]

* Re: cluts: strerror_r() test
  2011-07-14  9:57 11%               ` cluts: strerror_r() test (was: Daily cluts reports) Solar Designer
@ 2011-07-14 10:41 13%                 ` Luka Marčetić
  2011-07-14 10:47  6%                   ` Solar Designer
  2011-07-14 17:55  6%                   ` Rich Felker
  0 siblings, 2 replies; 73+ results
From: Luka Marčetić @ 2011-07-14 10:41 UTC (permalink / raw)
  To: musl

On 07/14/2011 11:57 AM, Solar Designer wrote:
> Luka, Rich -
>
> I've uncommented the test for strerror_r(), which you marked "glibc
> fail", and it passed the test on glibc 2.3.6 for me.  What exactly was
> wrong with it (or rather with glibc) in your testing?
>
> Thanks,
>
> Alexander

The test was uncommented yesterday morning, as I found it was my fault 
that it crashed, not glibc's. Actually, I think it was -O2 that helped 
me realize that, after I had uncommented the function. Here's the 
relevant diff:
https://github.com/lmarcetic/cluts/commit/803ebc888ebe6656287034739229baa93376d0fc#tests/buf.c
You can see that strerror_r was passed size-1, although size was not 
initialized (or rather, it was initialized by a test before that one). 
Strerror_r implementations are free to redirect a passed pointer to 
immutable memory if size(buflen) argument is sufficiently large. Of 
course, wanting to write to s[size-1] would SIGSEGV in that case. My 
assumption was that glibc redirected the pointer even though I gave it 
size-1, in which case it's incorrect behavior and it should simply copy 
to the provided buffer. Turns out that's not the case, and the fail was 
mine.
Luka.


^ permalink raw reply	[relevance 13%]

* cluts: strerror_r() test (was: Daily cluts reports)
  @ 2011-07-14  9:57 11%               ` Solar Designer
  2011-07-14 10:41 13%                 ` cluts: strerror_r() test Luka Marčetić
  0 siblings, 1 reply; 73+ results
From: Solar Designer @ 2011-07-14  9:57 UTC (permalink / raw)
  To: musl

Luka, Rich -

On Tue, Jul 12, 2011 at 12:59:13AM +0200, Luka Mar??eti?? wrote:
> I've finished what was previously known as strn.c, and now is buf.c, and 
> committed it (task VI. Functions which return strings in caller-provided 
> buffers). If I missed any functions, let me know. You'll notice probably 
> right of the back that tests for two functions are commented out. Well 
> that's because one is faulty in glibc, and the other I assume not 
> implemented in musl (that's in order).

I've uncommented the test for strerror_r(), which you marked "glibc
fail", and it passed the test on glibc 2.3.6 for me.  What exactly was
wrong with it (or rather with glibc) in your testing?

Thanks,

Alexander


^ permalink raw reply	[relevance 11%]

* Re: cluts: Incorrect test expectations in buf module (errno)
  2011-07-13 13:51  5% cluts: Incorrect test expectations in buf module (errno) Rich Felker
@ 2011-07-13 17:01  0% ` Luka Marčetić
  0 siblings, 0 replies; 73+ results
From: Luka Marčetić @ 2011-07-13 17:01 UTC (permalink / raw)
  To: musl

On 07/13/2011 03:51 PM, Rich Felker wrote:
> Hi,
> It seems cluts' buf module is surprised that strerror_r and ttyname_r
> did not set errno to ERANGE. However these functions are not specified
> to report anything in errno. Instead they return the error code
> directly. This is an unfortunate inconsistency created in the early
> days of "reentrant" (_r) functions due to confusion over whether errno
> could be safely used in multithreaded programs. Note that some other
> functions which return error codes directly are:
>
> posix_* (posix_memalign etc.)
> pthread_*
>
> Rich

Thanks, fixed (will push changes when I hear about SA_NODEFER).
I guess when you write your own implementation of those, you get to know 
them intimately ;-)
Luka.


^ permalink raw reply	[relevance 0%]

* Re: cluts review
  @ 2011-07-13 14:00  5%         ` Rich Felker
  0 siblings, 0 replies; 73+ results
From: Rich Felker @ 2011-07-13 14:00 UTC (permalink / raw)
  To: musl

On Wed, Jul 13, 2011 at 05:54:23PM +0400, Solar Designer wrote:
> > But thanks for the patch. Anyway, here:
> > https://github.com/lmarcetic/cluts/commit/7c836ff779c1f9ffecdae9f7d469772e88d3bc68
> 
> OK.  Why the "#define _POSIX_C_SOURCE 200809L //sigaction" vs. "#define
> _XOPEN_SOURCE //sigaction" inconsistency, though?  I think _XOPEN_SOURCE
> is a safer bet here.

I would really put this in the makefile for consistency. In principle,
the values of feature test macros could lead to different versions of
certain functions being used, possibly even with different
interfaces/ABI, and cause problems with linking together object files
compiled with different settings.

The default with no feature test macro defined is not "_GNU_SOURCE" or
"variety bag". In principle it's supposed to be pure C, and in reality
it varies a lot and you shouldn't rely on it. Especially proprietary
unices, but also GNU, like to expose their traditional non-conformant
versions of certain functions (e.g. strerror_r) when no feature test
macro is present, which is a major issue for testing.

> And I generally avoid C++ comments in C source
> files, even though this became legal in C99 (and many C compilers
> recognized C++ comments before then).  If we enable/require C99 anyway,
> this is a non-issue, and perhaps I am too old-fashioned. ;-)  Testing
> cluts on some older systems could make sense, though - not so much to
> test those systems' libc's, but rather to better test cluts itself.

I think it's pretty hard to test functions that are part of a standard
that depends on and includes C99, while not requiring a (mostly)
C99-supporting compiler. I do tend to think // comments look "lazy",
but it's not a big deal either way.

> > Why do you think *snprintf and *asprintf aren't portable?
> 
> They just are less portable than older functions such as sprintf().
> In practice, I think *snprintf() are portable enough these days and for
> this specific application, so your use of vsnprintf() is fine (although
> calling it with "NULL, 0" is a stress-test).  asprintf() may or may not
> be portable enough depending on what systems cluts is meant to run on.

snprintf is C99 and POSIX and I think it's pretty reasonable to rely
on it. Legacy systems can implement it as a hideous wrapper for
tmpfile(), fprintf(), and fread() if they're not willing to fix their
libcs. :-)

Rich


^ permalink raw reply	[relevance 5%]

* cluts: Incorrect test expectations in buf module (errno)
@ 2011-07-13 13:51  5% Rich Felker
  2011-07-13 17:01  0% ` Luka Marčetić
  0 siblings, 1 reply; 73+ results
From: Rich Felker @ 2011-07-13 13:51 UTC (permalink / raw)
  To: musl

Hi,
It seems cluts' buf module is surprised that strerror_r and ttyname_r
did not set errno to ERANGE. However these functions are not specified
to report anything in errno. Instead they return the error code
directly. This is an unfortunate inconsistency created in the early
days of "reentrant" (_r) functions due to confusion over whether errno
could be safely used in multithreaded programs. Note that some other
functions which return error codes directly are:

posix_* (posix_memalign etc.)
pthread_*

Rich


^ permalink raw reply	[relevance 5%]

* Re: Help assessing status of musl
  2011-05-29 16:44  1%   ` gs
@ 2011-05-29 17:32  2%     ` gs
  0 siblings, 0 replies; 73+ results
From: gs @ 2011-05-29 17:32 UTC (permalink / raw)
  To: musl

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

using a better posix list now, as recommended by nsz.
there are a few false positives, namely macros.
but afaik they can be counted on two hands.
> ok, tweaked it a bit more
>>
>> see attached perl script and output.
>> i recommend you rerun it since i didnt have the most recent musl 
>> version installed.
>>
>> On 05/29/2011 01:41 AM, Rich Felker wrote:
>>> Apologies for the somewhat-slower progress on musl lately. The past
>>> few weeks I've had a good bit less contiguous time to devote to it.
>>> One thing that would help me make better use of my time is if I had a
>>> good list of the remaining areas of functionality that musl is
>>> missing, so I could use smaller blocks of time to write code that's
>>> simple and largely independent of everything else.
>>>
>>> Would anyone be willing to go through a list of symbols from musl,
>>> comparing it to the list of functions in the POSIX standard
>>> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html) 
>>>
>>> and break it down into a list of functions and some categories of
>>> functionality? For the most part anything in non-essential option
>>> groups could be omitted or put in a separate list to address later.
>>>
>>> Rich
>>>
>>
>


[-- Attachment #2: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1019 bytes --]

[-- Attachment #3: musl-diff.txt --]
[-- Type: text/plain, Size: 4782 bytes --]

a64l
acoshl
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinhl
asinl
assert
atan2l
atanhl
atanl
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
ceill
cexp
cexpf
cexpl
cimag
cimagf
cimagl
clog
clogf
clogl
conj
conjf
conjl
copysignl
coshl
cosl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
daylight
dbm_clearerr
dbm_close
dbm_delete
dbm_error
dbm_fetch
dbm_firstkey
dbm_nextkey
dbm_open
dbm_store
dlclose
dlerror
dlopen
dlsym
encrypt
environ
erfcl
erfl
errno
exp2
exp2f
exp2l
expl
expm1l
fabsl
fattach
FD_CLR
fdetach
fdim
fdimf
fdiml
FD_ISSET
FD_SET
FD_ZERO
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmemopen
fmin
fminf
fminl
fmodl
fmtmsg
fpclassify
getdate
getdate_err
getgrgid_r
getmsg
getnetbyaddr
getnetbyname
getpmsg
hcreate
hdestroy
hsearch
hypotl
if_freenameindex
if_nameindex
ilogbl
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
iswalnum_l
iswalpha_l
iswblank_l
iswcntrl_l
iswctype_l
iswdigit_l
iswgraph_l
iswlower_l
iswprint_l
iswpunct_l
iswspace_l
iswupper_l
iswxdigit_l
j0
j1
jn
l64a
ldexpl
lfind
lgamma
lgammaf
lgammal
lio_listio
llrintf
llrintl
llround
llroundf
llroundl
log10l
log1pl
log2
log2f
log2l
logbl
logl
lrintl
lround
lroundf
lroundl
lsearch
modfl
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
nan
nanf
nanl
nearbyint
nearbyintf
nearbyintl
nextafterl
nexttoward
nexttowardf
nexttowardl
nl_langinfo_l
open_memstream
open_wmemstream
optarg
opterr
optind
optopt
posix_mem_offset
posix_spawnattr_destroy
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_init
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getcreatetime
posix_trace_attr_getgenversion
posix_trace_attr_getinherited
posix_trace_attr_getlogfullpolicy
posix_trace_attr_getlogsize
posix_trace_attr_getmaxdatasize
posix_trace_attr_getmaxsystemeventsize
posix_trace_attr_getmaxusereventsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogfullpolicy
posix_trace_attr_setlogsize
posix_trace_attr_setmaxdatasize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_create_withlog
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_get_name
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventset_del
posix_trace_eventset_empty
posix_trace_eventset_fill
posix_trace_eventset_ismember
posix_trace_eventtypelist_getnext_id
posix_trace_eventtypelist_rewind
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_rewind
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_stop
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
powl
psiginfo
psignal
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cleanup_pop
pthread_cleanup_push
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putmsg
putpmsg
remainderl
remque
remquol
rintl
roundl
scalblnl
scalbnl
sched_getparam
sched_get_priority_max
sched_get_priority_min
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
setkey
setstate
signbit
signgam
sinhl
sinl
sqrtl
stderr
stdin
stdout
strcasecmp_l
strcoll_l
strerror_l
strfmon
strfmon_l
strftime_l
strncasecmp_l
strxfrm_l
tanhl
tanl
tdelete
tfind
tgamma
tgammaf
tgammal
timezone
_tolower
_toupper
towctrans_l
towlower_l
towupper_l
truncl
tsearch
twalk
tzname
ulimit
uselocale
va_arg
va_copy
va_end
va_start
wcpcpy
wcpncpy
wcscasecmp
wcscasecmp_l
wcscoll_l
wcsdup
wcsftime
wcsncasecmp
wcsncasecmp_l
wcsnlen
wcstod
wcstof
wcstok
wcstold
wcsxfrm_l
wctrans_l
wctype_l
y0
y1
yn

[-- Attachment #4: posix-syms.txt --]
[-- Type: text/plain, Size: 12706 bytes --]

unlinkat
fchownat
setuid
isgraph_l
ccoshl
stpncpy
lrintf
scandir
casinh
posix_trace_close
wcsxfrm_l
iswcntrl_l
sched_get_priority_min
getrlimit
posix_trace_attr_setstreamsize
ctanhl
pathconf
longjmp
cpow
ilogbf
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
munlock
pthread_condattr_setclock
strxfrm_l
access
getlogin_r
fesetround
posix_trace_getnext_event
dbm_open
pthread_condattr_getpshared
wcstof
wait
sigpending
seekdir
fputc
mkstemp
vsprintf
erfl
posix_spawnattr_getsigmask
mrand48
ioctl
getservbyname
setsockopt
floorl
pthread_rwlockattr_destroy
posix_trace_flush
siginterrupt
opterr
msgctl
nice
hypot
va_copy
vdprintf
setkey
mq_open
atan2f
cacos
cosl
readdir_r
tcflow
htons
strftime_l
wmemcmp
sigpause
pthread_mutexattr_destroy
wcstoll
remainder
acosf
setregid
aio_error
timer_getoverrun
iswlower
ilogbl
mq_receive
setstate
cexp
posix_trace_eventset_add
expm1l
powl
cfgetispeed
remquof
newlocale
isnormal
execvp
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
shmat
pthread_mutexattr_setrobust
fegetround
clock_nanosleep
toupper_l
timer_delete
getdate_err
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_end
va_arg
log2l
mq_timedsend
pclose
isnan
regcomp
clock_getres
pipe
atanh
y0
posix_trace_eventid_open
errno
posix_trace_trygetnext_event
nanf
copysignl
isupper_l
getuid
fileno
tanh
strspn
isinf
wcstoimax
cacoshl
pthread_cond_init
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
mblen
sigaction
memccpy
dbm_delete
tmpnam
iswdigit_l
feholdexcept
aio_write
symlink
remainderf
j1
fgetws
iswpunct_l
strcasecmp_l
putwc
cimagl
munmap
islessequal
strerror
msgsnd
syslog
tolower_l
iswgraph_l
munlockall
lockf
lsearch
getsubopt
rename
setpgid
posix_trace_attr_getcreatetime
ftok
conjl
fputwc
fexecve
execve
casinf
pthread_rwlock_timedrdlock
getpeername
atexit
aio_return
strstr
cabsl
cargl
getprotobynumber
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
catopen
getlogin
strcoll_l
iswcntrl
sigignore
fgets
getgrgid_r
pthread_mutex_timedlock
assert
strtok_r
wordexp
fmaxl
fgetwc
csinhl
pthread_cond_timedwait
posix_trace_event
posix_spawn_file_actions_destroy
_Exit
posix_spawnattr_init
posix_fadvise
tanf
duplocale
remquo
openlog
endutxent
sem_trywait
ldiv
tanhl
pselect
free
fchown
pthread_kill
getopt
powf
posix_trace_attr_getlogsize
erand48
gmtime
strncmp
fgetc
dbm_store
strpbrk
floorf
wcscmp
open_wmemstream
fattach
swscanf
posix_trace_eventtypelist_getnext_id
dup2
posix_trace_eventid_get_name
pthread_cleanup_pop
nanl
pthread_attr_setguardsize
pthread_rwlock_trywrlock
llround
twalk
iswupper_l
rand_r
posix_spawn_file_actions_addclose
fsetpos
posix_spawnattr_setpgroup
chown
catanl
acosh
inet_pton
fmodl
fchdir
iconv
acoshf
fminl
aio_fsync
clog
cexpl
alarm
mkfifo
strerror_l
ctime
ccosh
lgammal
fchmodat
clock_settime
iswalpha_l
modfl
iswblank_l
lrint
iswalnum_l
setjmp
lrand48
pthread_attr_getstack
vfwscanf
iswspace_l
timer_settime
sem_getvalue
strtold
bind
getpid
mkdtemp
recv
casinhl
pthread_mutexattr_settype
lrintl
ceil
endhostent
tmpfile
pthread_mutex_lock
cpowf
wctrans
scanf
pthread_condattr_setpshared
pthread_getspecific
lgammaf
fstat
tfind
getgrnam
memchr
connect
link
posix_trace_trid_eventid_open
strtok
wcsnrtombs
strerror_r
iswdigit
sleep
cimagf
conj
execlp
pthread_key_delete
pthread_create
ctermid
pthread_atfork
scalbnf
posix_trace_attr_setlogfullpolicy
getenv
csinh
drand48
logbl
pthread_attr_setdetachstate
isblank_l
getpwent
malloc
setnetent
killpg
putmsg
coshf
utimensat
ntohl
wcrtomb
popen
if_freenameindex
strncasecmp
pthread_barrierattr_init
atoi
remove
cbrtf
kill
readdir
ungetwc
ttyname_r
sigfillset
abort
lround
csinf
ccosl
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
rintf
posix_trace_attr_setname
pthread_equal
fputws
posix_trace_attr_getname
nftw
pthread_setconcurrency
btowc
atanhl
dbm_nextkey
tcgetpgrp
sched_rr_get_interval
tgammal
posix_spawnattr_setschedpolicy
sysconf
logf
strtof
ntohs
getgrent
getutxent
strcasecmp
isalpha
wctob
fcntl
sscanf
llrintl
fsync
wcschr
getpmsg
fclose
semctl
mktime
fmaf
psignal
posix_trace_attr_getmaxdatasize
abs
fmodf
vfscanf
optarg
cpowl
fesetenv
truncf
inet_ntoa
posix_trace_attr_getstreamfullpolicy
sem_post
cacosf
tcsetpgrp
mlock
ptsname
wcstombs
mlockall
wcstod
setutxent
scalbnl
mbsinit
sigrelse
signal
ldexpl
mkdir
hypotl
asinhf
fputs
yn
wcsnlen
isgraph
posix_trace_attr_getstreamsize
wcsncasecmp
pthread_self
strftime
strchr
msgget
_exit
iconv_open
srand
flockfile
gettimeofday
vwprintf
tanl
ctan
fesetexceptflag
nl_langinfo_l
dbm_error
realloc
asinf
grantpt
putpmsg
setitimer
sigwaitinfo
posix_trace_create_withlog
memcmp
log10f
lroundl
rewind
roundl
dbm_firstkey
wcpcpy
stderr
mkdirat
signgam
openat
hsearch
posix_trace_clear
pthread_spin_trylock
pthread_cleanup_push
open
getpwuid
log10l
dlsym
pthread_barrier_init
expf
ccosf
pthread_attr_getschedpolicy
carg
pthread_attr_setschedparam
remainderl
vsscanf
strtol
_setjmp
pthread_rwlock_destroy
wctype
gets
sem_wait
mq_notify
freopen
pthread_detach
posix_spawn_file_actions_init
clock_gettime
exit
isprint_l
posix_spawnattr_destroy
getitimer
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
write
unsetenv
pthread_attr_getdetachstate
ungetc
readlinkat
scalblnf
setprotoent
freeaddrinfo
toupper
putchar_unlocked
atol
fmal
getpgrp
strcspn
bsearch
printf
getpgid
csin
fprintf
fstatat
select
l64a
getchar_unlocked
isdigit
fork
iswxdigit_l
cprojl
vswprintf
posix_trace_open
creall
atanf
wcsrtombs
setvbuf
fmaxf
localtime_r
execl
difftime
getsockname
strfmon
poll
pthread_sigmask
vscanf
tcdrain
wcsdup
iswxdigit
setlocale
llrintf
uselocale
gethostname
sinh
pthread_mutexattr_getprioceiling
isunordered
msync
strncasecmp_l
sigemptyset
wcscspn
islower
FD_CLR
fgetpos
getsockopt
sem_close
getgid
ftruncate
posix_trace_attr_destroy
tgamma
fwprintf
vfprintf
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
FD_ZERO
pthread_attr_getinheritsched
fchmod
readlink
mq_send
isastream
isupper
isxdigit
utime
shm_unlink
jrand48
pthread_attr_setschedpolicy
erfc
ispunct
signbit
posix_trace_attr_getinherited
endnetent
iswupper
getline
pthread_rwlockattr_init
initstate
getgrgid
ttyname
rint
lseek
lchown
modf
log2
linkat
ilogb
exp2f
nextafterf
cacosh
posix_trace_eventset_empty
iswgraph
posix_trace_attr_setstreamfullpolicy
getutxid
islower_l
wcsncmp
fopen
tzset
trunc
sigprocmask
fmemopen
strtoul
cexpf
if_nametoindex
stat
unlockpt
confstr
iscntrl_l
asctime_r
system
fegetexceptflag
nearbyintl
posix_trace_attr_init
getprotobyname
ldexp
getpriority
isspace
strncat
isless
fminf
nrand48
getgrnam_r
wcscat
expl
pthread_key_create
isgreaterequal
posix_trace_attr_getlogfullpolicy
csinl
casinhf
optind
crealf
environ
wcsspn
catan
clearerr
cbrt
exp
pthread_barrier_wait
acosl
strsignal
copysign
fmin
fnmatch
pthread_cond_destroy
putenv
writev
tcsendbreak
cfsetospeed
dprintf
logb
remque
fseeko
cimag
creat
utimes
exp2l
accept
log2f
perror
fread
dlopen
pthread_mutexattr_gettype
endpwent
posix_spawnattr_setsigdefault
atan2
globfree
putwchar
optopt
daylight
closedir
posix_spawnattr_getpgroup
getservbyport
atan
aio_cancel
isalpha_l
sigtimedwait
pthread_cond_broadcast
pthread_mutexattr_getpshared
ispunct_l
pthread_attr_getschedparam
cabs
rintl
posix_trace_eventid_equal
pthread_setschedparam
sem_destroy
nexttowardf
ceill
strlen
vprintf
pthread_spin_init
gethostent
ctanhf
posix_spawnattr_getflags
posix_spawn
posix_trace_attr_getgenversion
sem_init
asin
glob
fscanf
snprintf
wcstold
posix_spawnattr_setschedparam
ccoshf
getnetbyname
getegid
sigwait
setenv
localeconv
wmemmove
lstat
readv
wcsncpy
getc
tcgetsid
symlinkat
recvfrom
setbuf
wctomb
putchar
towlower_l
sigsetjmp
feraiseexcept
dlerror
catanhf
aio_suspend
frexpf
isgreater
sigset
log10
FD_ISSET
feupdateenv
log
wcscasecmp
fabsl
posix_trace_attr_setinherited
csqrtl
pthread_spin_unlock
getprotoent
sigqueue
erfcf
towupper
pow
islessgreater
_longjmp
atanhf
ldexpf
tzname
posix_madvise
qsort
wmemset
strptime
ctanh
pthread_attr_getscope
posix_spawnattr_getsigdefault
mknodat
strtoull
ftello
ftrylockfile
srandom
pthread_mutex_setprioceiling
asinh
cacoshf
posix_trace_set_filter
pthread_setschedprio
FD_SET
execv
lgamma
posix_mem_offset
sinl
nearbyintf
llroundf
isblank
fstatvfs
sigsuspend
mq_setattr
posix_trace_eventset_ismember
llabs
posix_typed_mem_open
sendto
sched_setparam
ftell
pthread_barrierattr_getpshared
log1pl
nl_langinfo
posix_trace_start
mq_timedreceive
unlink
sinhf
j0
pthread_barrierattr_setpshared
pthread_condattr_getclock
fdopendir
pthread_cond_wait
wcsxfrm
posix_openpt
pthread_setcanceltype
ferror
remquol
_toupper
strnlen
ctime_r
memcpy
getc_unlocked
frexpl
random
tcsetattr
fdetach
getsid
imaxdiv
tsearch
strtoumax
iswspace
posix_fallocate
pthread_rwlockattr_getpshared
hcreate
iswalnum
swab
mbrlen
statvfs
csqrtf
conjf
pthread_once
sethostent
dirfd
towlower
stdout
ftw
log1pf
timezone
clogl
wcstok
tdelete
nanosleep
fmax
pthread_attr_getstacksize
strfmon_l
pthread_mutex_unlock
wctrans_l
posix_spawnattr_getschedpolicy
if_nameindex
endgrent
pthread_attr_init
atan2l
scalbln
setservent
fetestexcept
mkfifoat
setpwent
feclearexcept
cbrtl
hypotf
getdelim
posix_trace_rewind
gai_strerror
getnetbyaddr
posix_memalign
regfree
cprojf
getchar
wcsstr
exp2
mbtowc
psiginfo
cabsf
lfind
semget
wscanf
wcwidth
mbstowcs
pause
posix_trace_get_attr
pthread_rwlock_init
shutdown
inet_ntop
posix_spawnattr_setsigmask
read
wmemcpy
iswpunct
posix_trace_eventset_del
mq_unlink
mbrtowc
sched_getparam
sqrtf
puts
mbsnrtowcs
socket
sighold
pthread_mutex_consistent
pwrite
fdatasync
fabs
getmsg
sigdelset
jn
towctrans_l
getwchar
pthread_exit
posix_trace_attr_setlogsize
putc
iswprint_l
sched_getscheduler
getaddrinfo
cacosl
atof
wcscoll
posix_spawnattr_getschedparam
pthread_setcancelstate
iswprint
pthread_condattr_init
pthread_mutexattr_init
posix_typed_mem_get_info
llrint
floor
cosh
iswctype
posix_trace_timedgetnext_event
fmod
llroundl
isalnum
cargf
scalblnl
scalbn
wordfree
pthread_rwlock_tryrdlock
expm1f
setpriority
setlogmask
iconv_close
dbm_fetch
atoll
pthread_getconcurrency
time
shmget
round
lroundf
posix_trace_get_status
nextafterl
putc_unlocked
dbm_close
lldiv
getwc
getnameinfo
gethostid
ctanf
dup
nexttoward
shm_open
setgid
fflush
setsid
fpathconf
memmove
isascii
modff
vswscanf
stdin
va_start
pthread_testcancel
creal
tan
csinhf
setgrent
wcstoull
div
copysignf
nearbyint
inet_addr
msgrcv
ccos
expm1
isfinite
posix_trace_attr_setmaxdatasize
strdup
posix_trace_attr_getmaxsystemeventsize
closelog
clock
recvmsg
isdigit_l
fpclassify
y1
fma
regerror
frexp
sigaltstack
posix_spawnp
tcgetattr
posix_trace_eventtypelist_rewind
sigaddset
fegetenv
pthread_mutexattr_setpshared
sqrtl
wcstoul
iswblank
pthread_join
fwrite
cproj
a64l
cfsetispeed
mq_close
nan
pthread_rwlock_wrlock
fabsf
insque
pthread_rwlock_unlock
wprintf
posix_trace_stop
vwscanf
fdim
sem_timedwait
funlockfile
waitid
sendmsg
sigismember
strrchr
semop
posix_trace_get_filter
srand48
fdopen
wcscasecmp_l
getpwuid_r
sinhl
aio_read
wcsftime
getdate
telldir
raise
gmtime_r
wcpncpy
pthread_spin_destroy
fdimf
pread
setpgrp
faccessat
send
lcong48
pthread_attr_setstack
renameat
iswlower_l
wcstoumax
crypt
getgroups
isalnum_l
tgammaf
ffs
basename
fwide
pthread_cond_signal
_tolower
acoshl
seed48
sqrt
asinhl
ceilf
ctanl
posix_trace_attr_getmaxusereventsize
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
truncl
pututxline
sem_unlink
posix_spawnattr_setflags
tcflush
geteuid
htonl
setegid
asctime
tolower
sync
dirname
truncate
sched_setscheduler
sched_yield
chdir
logl
posix_trace_eventset_fill
labs
opendir
pthread_mutex_destroy
setreuid
if_indextoname
pthread_mutex_init
getservent
posix_trace_attr_getclockres
erf
log1p
wcscpy
fdiml
sinf
pthread_condattr_destroy
asinl
mmap
sin
towupper_l
coshl
toascii
endprotoent
cosf
pthread_getschedparam
wcsncasecmp_l
feof
close
calloc
casin
nexttowardl
acos
chmod
nextafter
rewinddir
lio_listio
uname
wcstol
pthread_attr_setstacksize
listen
casinl
wcscoll_l
localtime
vfwprintf
strtoll
iscntrl
catanh
strcoll
sched_get_priority_max
seteuid
pthread_barrierattr_destroy
logbf
posix_trace_shutdown
pthread_mutexattr_getrobust
posix_spawn_file_actions_addopen
freelocale
mbsrtowcs
pthread_attr_setscope
strncpy
timer_gettime
erfcl
pthread_setspecific
wmemchr
getnetent
memset
vsnprintf
isxdigit_l
isprint
hdestroy
realpath
clogf
imaxabs
dlclose
waitpid
times
catanhl
pthread_getcpuclockid
tanhf
timer_create
sem_open
getutxline
strtod
wcsncat
erff
stpcpy
strxfrm
execle
roundf
getpwnam_r
getcwd
atanl
csqrt
fseek
isspace_l
pthread_attr_setinheritsched
wctype_l
socketpair
futimens
mq_getattr
wcsrchr
catgets
catanf
getpwnam
siglongjmp
cos
endservent
swprintf
sprintf
encrypt
posix_trace_create
rand
pthread_rwlockattr_setpshared
regexec
shmdt
mknod
setrlimit
pthread_barrier_destroy
umask
pthread_attr_getguardsize
iswctype_l

^ permalink raw reply	[relevance 2%]

* Re: Help assessing status of musl
  2011-05-29 16:19  2% ` gs
@ 2011-05-29 16:44  1%   ` gs
  2011-05-29 17:32  2%     ` gs
  0 siblings, 1 reply; 73+ results
From: gs @ 2011-05-29 16:44 UTC (permalink / raw)
  To: musl

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

ok, tweaked it a bit more
>
> see attached perl script and output.
> i recommend you rerun it since i didnt have the most recent musl 
> version installed.
>
> On 05/29/2011 01:41 AM, Rich Felker wrote:
>> Apologies for the somewhat-slower progress on musl lately. The past
>> few weeks I've had a good bit less contiguous time to devote to it.
>> One thing that would help me make better use of my time is if I had a
>> good list of the remaining areas of functionality that musl is
>> missing, so I could use smaller blocks of time to write code that's
>> simple and largely independent of everything else.
>>
>> Would anyone be willing to go through a list of symbols from musl,
>> comparing it to the list of functions in the POSIX standard
>> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html) 
>>
>> and break it down into a list of functions and some categories of
>> functionality? For the most part anything in non-essential option
>> groups could be omitted or put in a separate list to address later.
>>
>> Rich
>>
>


[-- Attachment #2: musl-diff.txt --]
[-- Type: text/plain, Size: 2940 bytes --]

a64l
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinl
assert
atanl
cabs
cacos
cacosh
cacosl
carg
casin
casinh
casinl
catan
catanh
catanl
ccos
ccosh
ccosl
cexp
cimag
clog
conj
contents
cosl
cpow
cproj
creal
csin
csinh
csinl
csqrt
ctan
ctanh
ctanl
daylight
dbm_clearerr
dlclose
dlerror
dlopen
dlsym
encrypt
environ
errno
exec
exp2
fattach
FD_CLR
fdetach
fdim
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fma
fmax
fmemopen
fmin
fmtmsg
fpclassify
getdate
getmsg
getnetbyaddr
getpmsg
hcreate
if_freenameindex
if_nameindex
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
j0
l64a
lfind
lgamma
lio_listio
llround
log2
lround
lsearch
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
nan
nearbyint
open_memstream
optarg
posix_mem_offset
posix_spawnattr_destroy
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_init
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getinherited
posix_trace_attr_getlogsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogsize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventtypelist_getnext_id
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
psiginfo
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cleanup_pop
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putmsg
remque
sched_getparam
sched_get_priority_max
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
setkey
setstate
signbit
signgam
sinl
stdin
strfmon
tanl
tdelete
tfind
tgamma
timezone
_tolower
_toupper
tsearch
twalk
ulimit
uselocale
V2_chap01
V2_chap02
V2_chap03
va_arg
wcpcpy
wcpncpy
wcscasecmp
wcsdup
wcsftime
wcsncasecmp
wcsnlen
wcstod
wcstok
wcstold
y0

[-- Attachment #3: musl-syms.txt --]
[-- Type: text/plain, Size: 10998 bytes --]

unlinkat
fchownat
setuid
scalbf
__kernel_sinf
isgraph_l
stpncpy
lrintf
scandir
vwarn
__cancel
getrlimit
pathconf
longjmp
ilogbf
getrusage
bind_textdomain_codeset
pthread_attr_destroy
munlock
pthread_condattr_setclock
__fputwc_unlocked
__fpclassifyl
access
getlogin_r
pthread_condattr_getpshared
umount
sigpending
wait
fputc
seekdir
mkstemp
vsprintf
__stdio_read
__dns_count_addrs
posix_spawnattr_getsigmask
mrand48
ioctl
getservbyname
setsockopt
ualarm
pthread_rwlockattr_destroy
siginterrupt
__getgrent_a
msgctl
nice
hypot
gethostbyname
vdprintf
verr
atan2f
prctl
readdir_r
tcflow
vasprintf
htons
wmemcmp
sigpause
textdomain
pthread_mutexattr_destroy
wcstoll
remainder
acosf
setregid
timer_getoverrun
iswlower
setresuid
cfgetispeed
eventfd_write
remquof
newlocale
__fdopen
fstatfs
execvp
pthread_cancel
pthread_rwlock_timedwrlock
strndup
shmat
pthread_mutexattr_setrobust
clock_nanosleep
timer_delete
toupper_l
fwscanf
shmctl
gethostbyname2_r
pclose
regcomp
clock_getres
pipe
atanh
inet_aton
isupper_l
getuid
fileno
strspn
tanh
wcstoimax
pthread_cond_init
hasmntopt
catclose
wcspbrk
sethostname
getmntent
mblen
memccpy
sigaction
tmpnam
symlink
remainderf
fgetws
putwc
munmap
strerror
msgsnd
syslog
setutent
tolower_l
__restore
munlockall
gettext
lockf
getsubopt
rename
__assert_fail
setpgid
ftok
fputwc
fexecve
sincos
execve
getopt_long_only
__kernel_rem_pio2
getservbyport_r
pthread_rwlock_timedrdlock
getpeername
atexit
strstr
getprotobynumber
strcmp
bcopy
__tm_to_time
pthread_spin_lock
iswalpha
strcat
catopen
getlogin
index
iswcntrl
fgets
sigignore
pthread_mutex_timedlock
strtok_r
wordexp
fgetwc
pthread_cond_timedwait
posix_spawn_file_actions_destroy
_Exit
__strdup
dngettext
wait3
posix_fadvise
tanf
duplocale
remquo
openlog
endutxent
sem_trywait
ldiv
usleep
pselect
free
fchown
pthread_kill
getopt
powf
__ptsname_r
erand48
gmtime
__toread
strncmp
__uflow
fgetc
strpbrk
floorf
wcscmp
__fseeko
__posix_spawnx
swscanf
dup2
__set_thread_area
pthread_attr_setguardsize
pthread_rwlock_trywrlock
mount
fsetpos
posix_spawn_file_actions_addclose
rand_r
chown
posix_spawnattr_setpgroup
acosh
inet_pton
fchdir
getgruid_r
iconv
acoshf
alarm
mkfifo
ctime
fchmodat
clock_settime
getspent
lrint
setjmp
getdomainname
__ieee754_rem_pio2
__rsyscall_unlock
lrand48
vfwscanf
swapon
__stpcpy
timer_settime
sem_getvalue
fgetws_unlocked
__overflow
dgettext
strtold
bind
getpid
mkdtemp
recv
pthread_mutexattr_settype
endhostent
ceil
tmpfile
pthread_mutex_lock
scanf
wctrans
pthread_condattr_setpshared
pthread_getspecific
fstat
getgrnam
memchr
connect
link
strtok
wcsnrtombs
strerror_r
iswdigit
__pthread_unregister_cancel
sleep
execlp
feof_unlocked
__kernel_cosf
pthread_key_delete
pthread_create
ctermid
pthread_atfork
__sigaction
scalbnf
getenv
drand48
pthread_attr_setdetachstate
isblank_l
getpwent
malloc
setnetent
getwchar_unlocked
updwtmpx
killpg
coshf
warnx
__ctype_get_mb_cur_max
utimensat
getdtablesize
ntohl
wcrtomb
popen
epoll_create1
cuserid
strncasecmp
pthread_barrierattr_init
atoi
dcngettext
remove
cbrtf
kill
readdir
ungetwc
ttyname_r
epoll_wait
sigfillset
abort
getdents
posix_spawn_file_actions_adddup2
isatty
strcpy
tempnam
fgetwc_unlocked
rintf
setgroups
pthread_equal
fputws
nftw
btowc
tcgetpgrp
__wait
__timedwait
sysconf
logf
strtof
ntohs
getutxent
getgrent
strcasecmp
isalpha
__lock
wctob
fcntl
dn_expand
sscanf
fsync
wcschr
fclose
semctl
initgroups
__lockfile
mktime
abs
fmodf
vfscanf
getspnam_r
__dst_adjust
__tzset
truncf
inet_ntoa
sem_post
__unmapself
tcsetpgrp
mlock
ptsname
wcstombs
mlockall
syscall
setutxent
mbsinit
sigrelse
signal
mkdir
fputs
asinhf
__rsyscall_lock
isgraph
pthread_self
_exit
strftime
__timedwait_cp
strchr
msgget
iconv_open
srand
gettimeofday
flockfile
__kernel_rem_pio2f
memrchr
vwprintf
clearenv
scalb
realloc
asinf
mktemp
grantpt
getutid
errx
setitimer
crypt_r
res_query
sigwaitinfo
memcmp
log10f
rewind
__dns_query
mkdirat
openat
pthread_spin_trylock
mempcpy
__setjmp
open
getpwuid
__kernel_cos
rindex
sbrk
pthread_barrier_init
expf
setmntent
pthread_attr_setschedparam
warn
vsscanf
strtol
_setjmp
pthread_rwlock_destroy
gets
wctype
getspnam
sem_wait
freopen
pthread_detach
posix_spawn_file_actions_init
ferror_unlocked
clock_gettime
exit
isprint_l
getitimer
wcswidth
towctrans
clock_getcpuclockid
sendfile
write
unsetenv
pthread_attr_getdetachstate
ungetc
readlinkat
scalblnf
__stdio_seek
setprotoent
freeaddrinfo
toupper
putchar_unlocked
gethostbyaddr_r
getpgrp
atol
strcspn
bsearch
fputws_unlocked
__dns_get_rr
endutent
getpgid
printf
__fwritex
fprintf
fstatat
select
umount2
getchar_unlocked
isdigit
fork
putw
vswprintf
getutline
endmntent
atanf
setvbuf
wcsrtombs
localtime_r
difftime
getsockname
execl
poll
pthread_sigmask
vscanf
__syscall_cp_asm
__tre_mem_alloc_impl
tcdrain
fflush_unlocked
iswxdigit
setlocale
__libc_current_sigrtmax
__ieee754_rem_pio2f
__uniclone
gethostname
sinh
msync
sigemptyset
wcscspn
islower
pututline
fgetpos
stime
getsockopt
sem_close
getgid
__fopen_rb_ca
ftruncate
getwc_unlocked
fwprintf
vfprintf
pthread_mutex_trylock
__crypt_r
hstrerror
pthread_rwlock_rdlock
rmdir
fchmod
readlink
isxdigit
isupper
utime
__putenv
shm_unlink
jrand48
erfc
ispunct
cfmakeraw
iswupper
endnetent
getline
pthread_rwlockattr_init
strcasestr
getgrgid
ttyname
rint
lseek
lchown
modf
linkat
__errno_location
ilogb
vfork
nextafterf
iswgraph
islower_l
getutxid
wcsncmp
fopen
trunc
tzset
sigprocmask
strtoul
if_nametoindex
stat
unlockpt
confstr
iscntrl_l
__ftello_unlocked
openpty
bsd_signal
asctime_r
system
getprotobyname
ldexp
isspace
getpriority
strncat
brk
nrand48
getgrnam_r
wcscat
pthread_key_create
__tre_mem_new_impl
__res_state
clearerr_unlocked
wcsspn
clearerr
exp
cbrt
pthread_barrier_wait
strsignal
getpass
copysign
fnmatch
ptsname_r
pthread_cond_destroy
__mmap
putenv
writev
__libc_sigaction
tcsendbreak
cfsetospeed
logb
dprintf
fseeko
creat
__libc_csu_init
utimes
accept
perror
klogctl
fread
pthread_mutexattr_gettype
endpwent
fputwc_unlocked
setlinebuf
posix_spawnattr_setsigdefault
atan2
globfree
putwchar
closedir
posix_spawnattr_getpgroup
getservbyport
atan
isalpha_l
sigtimedwait
pthread_cond_broadcast
pthread_mutexattr_getpshared
ispunct_l
pthread_attr_getschedparam
__fseeko_unlocked
sem_destroy
strlen
vprintf
pthread_spin_init
getmntent_r
gethostent
posix_spawn
posix_spawnattr_getflags
sem_init
asin
glob
fscanf
snprintf
__towrite
getegid
sigwait
setenv
localeconv
lstat
wmemmove
__munmap
readv
putwchar_unlocked
__libc_start_main
getc
wcsncpy
tcgetsid
symlinkat
recvfrom
setbuf
wctomb
putchar
eventfd
sigsetjmp
frexpf
dcgettext
sigset
log10
__pthread_register_cancel
strlcat
log
daemon
pthread_spin_unlock
getprotoent
sigqueue
erfcf
setbuffer
towupper
pow
memalign
_longjmp
atanhf
ldexpf
posix_madvise
qsort
wmemset
__memrchr
strptime
pthread_attr_getscope
posix_spawnattr_getsigdefault
mremap
__stdout_write
madvise
mknodat
ftello
ftrylockfile
strtoull
getpagesize
srandom
asinh
fputs_unlocked
__brk
signalfd
getopt_long
execv
bzero
isblank
sigsuspend
fstatvfs
llabs
sendto
ftell
pthread_barrierattr_getpshared
nl_langinfo
vsyslog
unlink
sinhf
pthread_barrierattr_setpshared
pthread_condattr_getclock
swapoff
fdopendir
pthread_cond_wait
wcsxfrm
posix_openpt
pthread_setcanceltype
ferror
strnlen
__wake
epoll_create
ctime_r
memcpy
getc_unlocked
sysinfo
frexpl
random
tcsetattr
getsid
reboot
imaxdiv
strtoumax
iswspace
posix_fallocate
pthread_rwlockattr_getpshared
iswalnum
mbrlen
statvfs
swab
wait4
bcmp
getservbyname_r
pthread_once
sethostent
dirfd
towlower
log1pf
ftw
strsep
nanosleep
__ftello
pthread_attr_getstacksize
pthread_mutex_unlock
__vsyslog
endgrent
pthread_attr_init
scalbln
setservent
__stdio_close
setpwent
mkfifoat
hypotf
getdelim
fwrite_unlocked
gai_strerror
posix_memalign
regfree
getchar
lchmod
wcsstr
mbtowc
gethostbyaddr
semget
wcwidth
wscanf
mbstowcs
pause
pthread_rwlock_init
shutdown
read
inet_ntop
posix_spawnattr_setsigmask
wmemcpy
iswpunct
__fpending
sqrtf
mbrtowc
puts
mbsnrtowcs
socket
sighold
eventfd_read
__stdio_write
__syscall_ret
pthread_mutex_consistent
pwrite
fabs
fdatasync
sigdelset
getwchar
pthread_exit
__kernel_tan
statfs
putc
fgets_unlocked
getaddrinfo
atof
wcscoll
pthread_setcancelstate
iswprint
pthread_condattr_init
pthread_mutexattr_init
llrint
endspent
getutent
floor
cosh
iswctype
fmod
__fgetwc_unlocked
__restore_rt
isalnum
__mremap
scalbn
wordfree
pthread_rwlock_tryrdlock
lckpwdf
expm1f
strlcpy
setpriority
setlogmask
adjtimex
iconv_close
__tre_mem_destroy
atoll
shmget
time
round
putc_unlocked
lldiv
getwc
getnameinfo
gethostid
__dns_doqueries
shm_open
dup
setgid
setspent
fflush
setsid
ulckpwdf
__fpclassify
fpathconf
memmove
isascii
modff
__rand48_step
vswscanf
__syscall_cp
pthread_testcancel
epoll_pwait
tan
fread_unlocked
setgrent
wcstoull
__time_to_tm
div
copysignf
inet_addr
msgrcv
expm1
updwtmp
strdup
__futex
closelog
clock
recvmsg
isdigit_l
fgetc_unlocked
__fclose_ca
__pthread_unwind_next
regerror
sigaltstack
frexp
posix_spawnp
tcgetattr
sigaddset
fputc_unlocked
__fpclassifyf
pthread_mutexattr_setpshared
getgrouplist
iswblank
wcstoul
pthread_join
fwrite
gethostbyname2
cfsetispeed
pthread_rwlock_wrlock
fabsf
fileno_unlocked
pthread_rwlock_unlock
wprintf
vwscanf
__syscall
sem_timedwait
funlockfile
waitid
sendmsg
sigismember
strrchr
semop
srand48
fdopen
adjtime
__pthread_tsd_run_dtors
__libc_csu_fini
getpwuid_r
inotify_add_watch
telldir
raise
gmtime_r
pthread_spin_destroy
pread
setpgrp
send
faccessat
lcong48
renameat
crypt
wcstoumax
__madvise
getgroups
isalnum_l
_start
__asctime
ffs
basename
fwide
pthread_cond_signal
epoll_ctl
seed48
__rsyscall
sqrt
ceilf
strtoimax
mprotect
getppid
alphasort
setresgid
wcslen
vwarnx
sockatmark
cfgetospeed
flock
pututxline
__kernel_tanf
sem_unlink
posix_spawnattr_setflags
tcflush
inotify_rm_watch
geteuid
htonl
setegid
cfsetspeed
asctime
settimeofday
sync
dirname
tolower
truncate
sched_yield
__getpwent_a
verrx
chdir
res_init
gethostbyname_r
opendir
labs
pthread_mutex_destroy
setreuid
if_indextoname
err
pthread_mutex_init
getservent
erf
log1p
sinf
wcscpy
pthread_condattr_destroy
mmap
inotify_init
__simple_malloc
sin
pivot_root
__scanf
inotify_init1
__getdents
asprintf
endprotoent
toascii
cosf
feof
close
forkpty
calloc
__libc_current_sigrtmin
__ipparse
acos
chmod
nextafter
rewinddir
wcswcs
uname
wcstol
pthread_attr_setstacksize
listen
__yield
__stpncpy
localtime
vfwprintf
strtoll
iscntrl
strcoll
seteuid
pthread_barrierattr_destroy
logbf
pthread_mutexattr_getrobust
posix_spawn_file_actions_addopen
freelocale
mbsrtowcs
strncpy
pthread_attr_setscope
timer_gettime
pthread_setspecific
wmemchr
getnetent
__kernel_sin
memset
vsnprintf
isprint
isxdigit_l
realpath
__langinfo
imaxabs
waitpid
times
tanhf
bindtextdomain
sem_open
timer_create
strtod
getutxline
putwc_unlocked
strchrnul
__mktemp
erff
stpcpy
wcsncat
execle
roundf
strxfrm
chroot
getpwnam_r
getcwd
fseek
isspace_l
socketpair
futimens
addmntent
catgets
wcsrchr
getpwnam
siglongjmp
ngettext
getw
endservent
cos
swprintf
sprintf
rand
pthread_rwlockattr_setpshared
regexec
shmdt
setrlimit
mknod
pthread_barrier_destroy
umask
pthread_attr_getguardsize

[-- Attachment #4: posix-syms.txt --]
[-- Type: text/plain, Size: 9697 bytes --]

iswgraph
fchownat
posix_trace_attr_setstreamfullpolicy
V2_chap01
setuid
wcsncmp
fopen
tzset
trunc
stpncpy
sigprocmask
fmemopen
scandir
casinh
posix_trace_close
strtoul
if_nametoindex
stat
unlockpt
confstr
getrlimit
posix_trace_attr_setstreamsize
pathconf
system
longjmp
cpow
fegetexceptflag
posix_trace_attr_init
getprotobyname
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
isspace
getpriority
strncat
access
fesetround
posix_trace_getnext_event
pthread_condattr_getpshared
isless
nrand48
wait
sigpending
wcscat
seekdir
pthread_key_create
fputc
isgreaterequal
csinl
mkstemp
environ
wcsspn
clearerr
catan
posix_spawnattr_getsigmask
pthread_barrier_wait
exp
cbrt
strsignal
acosl
mrand48
ioctl
getservbyname
fmin
copysign
setsockopt
fnmatch
pthread_rwlockattr_destroy
pthread_cond_destroy
posix_trace_flush
siginterrupt
putenv
writev
tcsendbreak
cfsetospeed
msgctl
logb
dprintf
remque
nice
hypot
cimag
creat
setkey
mq_open
accept
perror
cacos
cosl
tcflow
fread
pthread_mutexattr_gettype
dlopen
endpwent
wmemcmp
posix_spawnattr_setsigdefault
sigpause
atan2
pthread_mutexattr_destroy
wcstoll
remainder
putwchar
daylight
closedir
setregid
posix_spawnattr_getpgroup
aio_error
timer_getoverrun
iswlower
aio_cancel
atan
sigtimedwait
pthread_mutexattr_getpshared
pthread_cond_broadcast
mq_receive
setstate
cexp
posix_trace_eventset_add
pthread_attr_getschedparam
cabs
V2_chap03
posix_trace_eventid_equal
cfgetispeed
sem_destroy
pthread_setschedparam
newlocale
strlen
isnormal
vprintf
gethostent
posix_spawnattr_getflags
posix_spawn
sem_init
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
glob
asin
snprintf
shmat
fscanf
pthread_mutexattr_setrobust
fegetround
wcstold
posix_spawnattr_setschedparam
clock_nanosleep
timer_delete
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_arg
getegid
sigwait
setenv
mq_timedsend
pclose
isnan
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
atanh
readv
y0
posix_trace_eventid_open
errno
wcsncpy
getc
tcgetsid
posix_trace_trygetnext_event
getuid
fileno
tanh
strspn
recvfrom
exec
isinf
wcstoimax
setbuf
wctomb
putchar
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
sigsetjmp
mblen
feraiseexcept
sigaction
memccpy
dlerror
tmpnam
aio_suspend
feholdexcept
isgreater
aio_write
symlink
log10
fgetws
log
feupdateenv
wcscasecmp
posix_trace_attr_setinherited
pthread_spin_unlock
putwc
sigqueue
munmap
towupper
pow
islessgreater
islessequal
strerror
msgsnd
_longjmp
syslog
posix_madvise
qsort
wmemset
strptime
munlockall
ctanh
pthread_attr_getscope
lockf
posix_spawnattr_getsigdefault
lsearch
getsubopt
rename
setpgid
ftok
fexecve
fputwc
ftrylockfile
srandom
pthread_mutex_setprioceiling
pthread_rwlock_timedrdlock
getpeername
asinh
atexit
aio_return
strstr
posix_trace_set_filter
pthread_setschedprio
sinl
posix_mem_offset
lgamma
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
isblank
sigsuspend
fstatvfs
mq_setattr
catopen
llabs
getlogin
iswcntrl
sendto
posix_typed_mem_open
fgets
sched_setparam
pthread_mutex_timedlock
pthread_barrierattr_getpshared
assert
ftell
posix_trace_start
nl_langinfo
mq_timedreceive
wordexp
unlink
pthread_condattr_getclock
pthread_barrierattr_setpshared
j0
fgetwc
pthread_cond_timedwait
posix_trace_event
fdopendir
wcsxfrm
posix_spawn_file_actions_destroy
posix_openpt
_Exit
ferror
posix_spawnattr_init
posix_fadvise
_toupper
strnlen
duplocale
remquo
openlog
endutxent
sem_trywait
memcpy
ldiv
getc_unlocked
pselect
random
tcsetattr
free
fchown
pthread_kill
fdetach
getsid
getopt
imaxdiv
posix_trace_attr_getlogsize
tsearch
erand48
gmtime
strtoumax
strncmp
iswspace
fgetc
strpbrk
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
fattach
iswalnum
hcreate
swscanf
swab
statvfs
mbrlen
posix_trace_eventtypelist_getnext_id
contents
pthread_cleanup_pop
pthread_once
sethostent
pthread_attr_setguardsize
dirfd
towlower
pthread_rwlock_trywrlock
llround
twalk
ftw
timezone
wcstok
tdelete
nanosleep
posix_spawn_file_actions_addclose
fsetpos
fmax
posix_spawnattr_setpgroup
chown
pthread_attr_getstacksize
catanl
acosh
posix_spawnattr_getschedpolicy
fchdir
iconv
if_nameindex
endgrent
pthread_attr_init
setservent
scalbln
setpwent
aio_fsync
fetestexcept
clog
feclearexcept
alarm
getdelim
mkfifo
ctime
gai_strerror
ccosh
getnetbyaddr
posix_memalign
fchmodat
getchar
clock_settime
wcsstr
lrint
psiginfo
mbtowc
exp2
lfind
setjmp
semget
lrand48
pthread_attr_getstack
wscanf
wcwidth
mbstowcs
vfwscanf
pause
posix_trace_get_attr
shutdown
sem_getvalue
read
posix_spawnattr_setsigmask
inet_ntop
wmemcpy
iswpunct
mq_unlink
strtold
sched_getparam
mbrtowc
bind
puts
socket
sighold
getpid
mkdtemp
recv
pthread_mutexattr_settype
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fabs
fdatasync
wctrans
sigdelset
scanf
getmsg
pthread_condattr_setpshared
pthread_getspecific
fstat
tfind
pthread_exit
getwchar
posix_trace_attr_setlogsize
getgrnam
memchr
putc
connect
link
sched_getscheduler
posix_trace_trid_eventid_open
strtok
getaddrinfo
wcsnrtombs
cacosl
iswdigit
atof
wcscoll
pthread_setcancelstate
posix_spawnattr_getschedparam
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
conj
posix_typed_mem_get_info
llrint
pthread_key_delete
floor
pthread_create
cosh
iswctype
posix_trace_timedgetnext_event
fmod
ctermid
pthread_atfork
isalnum
getenv
csinh
drand48
pthread_rwlock_tryrdlock
pthread_attr_setdetachstate
setpriority
setlogmask
getpwent
iconv_close
malloc
setnetent
pthread_getconcurrency
time
shmget
round
killpg
posix_trace_get_status
putmsg
putc_unlocked
utimensat
lldiv
ntohl
wcrtomb
getwc
getnameinfo
if_freenameindex
popen
gethostid
strncasecmp
pthread_barrierattr_init
shm_open
dup
atoi
setgid
fflush
remove
setsid
kill
fpathconf
readdir
memmove
ungetwc
isascii
vswscanf
stdin
sigfillset
abort
pthread_testcancel
lround
ccosl
creal
tan
setgrent
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
div
nearbyint
posix_trace_attr_setname
inet_addr
msgrcv
pthread_equal
fputws
nftw
posix_trace_attr_getname
pthread_setconcurrency
ccos
btowc
tcgetpgrp
sched_rr_get_interval
expm1
isfinite
strdup
posix_spawnattr_setschedpolicy
sysconf
closelog
logf
clock
recvmsg
fpclassify
getgrent
getutxent
fma
strcasecmp
sigaltstack
frexp
isalpha
wctob
posix_spawnp
fcntl
tcgetattr
sscanf
sigaddset
fsync
wcschr
getpmsg
fclose
fegetenv
semctl
pthread_mutexattr_setpshared
mktime
wcstoul
iswblank
abs
pthread_join
vfscanf
cproj
fwrite
a64l
optarg
cfsetispeed
fesetenv
mq_close
nan
truncf
posix_trace_attr_getstreamfullpolicy
sem_post
pthread_rwlock_wrlock
tcsetpgrp
mlock
ptsname
wcstombs
pthread_rwlock_unlock
insque
wprintf
vwscanf
fdim
mlockall
sem_timedwait
wcstod
setutxent
funlockfile
mbsinit
waitid
strrchr
sigismember
sendmsg
sigrelse
semop
srand48
signal
posix_trace_get_filter
fdopen
mkdir
fputs
wcsnlen
isgraph
posix_trace_attr_getstreamsize
aio_read
wcsncasecmp
wcsftime
pthread_self
strftime
strchr
getdate
msgget
iconv_open
srand
flockfile
gettimeofday
telldir
raise
wcpncpy
pthread_spin_destroy
vwprintf
tanl
ctan
fesetexceptflag
pread
setpgrp
send
faccessat
lcong48
realloc
grantpt
pthread_attr_setstack
wcstoumax
crypt
setitimer
getgroups
sigwaitinfo
memcmp
ffs
basename
fwide
pthread_cond_signal
rewind
_tolower
seed48
sqrt
wcpcpy
signgam
openat
posix_trace_clear
ctanl
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
open
getpwuid
pututxline
sem_unlink
dlsym
posix_spawnattr_setflags
tcflush
pthread_attr_getschedpolicy
carg
geteuid
pthread_attr_setschedparam
vsscanf
strtol
htonl
setegid
asctime
tolower
sync
pthread_rwlock_destroy
dirname
truncate
sched_setscheduler
sched_yield
wctype
gets
sem_wait
mq_notify
freopen
chdir
pthread_detach
pthread_mutex_destroy
labs
opendir
setreuid
exit
if_indextoname
pthread_mutex_init
getitimer
posix_spawnattr_destroy
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
posix_trace_attr_getclockres
erf
write
unsetenv
log1p
pthread_attr_getdetachstate
wcscpy
ungetc
pthread_condattr_destroy
setprotoent
freeaddrinfo
asinl
mmap
sin
toupper
putchar_unlocked
toascii
getpgrp
endprotoent
atol
strcspn
bsearch
pthread_getschedparam
feof
close
getpgid
printf
fstatat
fprintf
csin
select
calloc
casin
l64a
chmod
acos
getchar_unlocked
isdigit
nextafter
fork
V2_chap02
rewinddir
vswprintf
lio_listio
posix_trace_open
uname
atanf
wcsrtombs
setvbuf
wcstol
pthread_attr_setstacksize
difftime
getsockname
strfmon
casinl
listen
poll
pthread_sigmask
vscanf
tcdrain
localtime
wcsdup
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
catanh
seteuid
sched_get_priority_max
pthread_barrierattr_destroy
pthread_mutexattr_getrobust
posix_trace_shutdown
posix_spawn_file_actions_addopen
freelocale
uselocale
gethostname
strncpy
mbsrtowcs
pthread_attr_setscope
sinh
pthread_mutexattr_getprioceiling
isunordered
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
islower
memset
vsnprintf
FD_CLR
fgetpos
isprint
getsockopt
sem_close
realpath
getgid
ftruncate
imaxabs
dlclose
waitpid
posix_trace_attr_destroy
times
pthread_getcpuclockid
tgamma
fwprintf
timer_create
sem_open
vfprintf
strtod
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
wcsncat
stpcpy
erff
strxfrm
pthread_attr_getinheritsched
getcwd
fchmod
atanl
readlink
mq_send
csqrt
isastream
fseek
isupper
isxdigit
utime
shm_unlink
jrand48
erfc
pthread_attr_setschedpolicy
pthread_attr_setinheritsched
ispunct
signbit
socketpair
futimens
mq_getattr
wcsrchr
catgets
siglongjmp
getpwnam
posix_trace_attr_getinherited
endnetent
iswupper
getline
cos
endservent
pthread_rwlockattr_init
initstate
swprintf
sprintf
getgrgid
ttyname
rint
encrypt
rand
posix_trace_create
pthread_rwlockattr_setpshared
lchown
lseek
modf
log2
ilogb
shmdt
setrlimit
mknod
pthread_barrier_destroy
cacosh
umask
pthread_attr_getguardsize

[-- Attachment #5: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1024 bytes --]

^ permalink raw reply	[relevance 1%]

* Re: Help assessing status of musl
  @ 2011-05-29 16:19  2% ` gs
  2011-05-29 16:44  1%   ` gs
  0 siblings, 1 reply; 73+ results
From: gs @ 2011-05-29 16:19 UTC (permalink / raw)
  To: musl; +Cc: Rich Felker

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


see attached perl script and output.
i recommend you rerun it since i didnt have the most recent musl version 
installed.

On 05/29/2011 01:41 AM, Rich Felker wrote:
> Apologies for the somewhat-slower progress on musl lately. The past
> few weeks I've had a good bit less contiguous time to devote to it.
> One thing that would help me make better use of my time is if I had a
> good list of the remaining areas of functionality that musl is
> missing, so I could use smaller blocks of time to write code that's
> simple and largely independent of everything else.
>
> Would anyone be willing to go through a list of symbols from musl,
> comparing it to the list of functions in the POSIX standard
> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html)
> and break it down into a list of functions and some categories of
> functionality? For the most part anything in non-essential option
> groups could be omitted or put in a separate list to address later.
>
> Rich
>


[-- Attachment #2: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1014 bytes --]

[-- Attachment #3: musl-diff.txt --]
[-- Type: text/plain, Size: 3651 bytes --]

a64l
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinl
assert
atanl
atexit
cabs
cacos
cacosh
cacosl
carg
casin
casinh
casinl
catan
catanh
catanl
ccos
ccosh
ccosl
cexp
cimag
clog
conj
contents
cosl
cpow
cproj
creal
csin
csinh
csinl
csqrt
ctan
ctanh
ctanl
daylight
dbm_clearerr
dlclose
dlerror
dlopen
dlsym
encrypt
endgrent
endnetent
endpwent
environ
errno
exec
exp2
fattach
FD_CLR
fdetach
fdim
fdopen
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fma
fmax
fmemopen
fmin
fmtmsg
fpclassify
fwrite
getc
getdate
getgrgid
getgrnam
getmsg
getnetbyaddr
getpmsg
grantpt
hcreate
iconv
iconv_close
if_freenameindex
if_nameindex
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
j0
l64a
lfind
lgamma
lio_listio
llround
log2
lround
lsearch
malloc
mmap
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
munmap
nan
nearbyint
nl_langinfo
open_memstream
optarg
posix_mem_offset
posix_spawn
posix_spawnattr_destroy
posix_spawnattr_getflags
posix_spawnattr_getpgroup
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_getsigdefault
posix_spawnattr_getsigmask
posix_spawnattr_init
posix_spawnattr_setflags
posix_spawnattr_setpgroup
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_spawnattr_setsigdefault
posix_spawnattr_setsigmask
posix_spawn_file_actions_addclose
posix_spawn_file_actions_adddup2
posix_spawn_file_actions_addopen
posix_spawn_file_actions_destroy
posix_spawnp
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getinherited
posix_trace_attr_getlogsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogsize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventtypelist_getnext_id
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
psiginfo
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cancel
pthread_cleanup_pop
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_key_delete
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_self
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putc
putmsg
pututxline
qsort
remque
sched_getparam
sched_get_priority_max
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
sched_yield
sem_open
setkey
setlogmask
setnetent
setprotoent
setstate
sigaction
signbit
signgam
sigprocmask
sinl
stdin
stpcpy
stpncpy
strdup
strfmon
strtold
syslog
tanl
tdelete
tfind
tgamma
timezone
_tolower
_toupper
tsearch
twalk
ulimit
uselocale
V2_chap01
V2_chap02
V2_chap03
va_arg
vfscanf
vswprintf
wcpcpy
wcpncpy
wcscasecmp
wcsdup
wcsftime
wcsncasecmp
wcsnlen
wcstod
wcstok
wcstold
wordexp
y0

[-- Attachment #4: musl-syms.txt --]
[-- Type: text/plain, Size: 9501 bytes --]

unlinkat
fchownat
iswgraph
setuid
getutxid
scalbf
islower_l
wcsncmp
__kernel_sinf
isgraph_l
fopen
tzset
trunc
lrintf
scandir
strtoul
if_nametoindex
stat
vwarn
unlockpt
confstr
__cancel
__ftello_unlocked
iscntrl_l
getrlimit
openpty
pathconf
asctime_r
longjmp
system
ilogbf
getprotobyname
getrusage
bind_textdomain_codeset
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
getpriority
isspace
__fputwc_unlocked
__fpclassifyl
strncat
brk
access
getlogin_r
pthread_condattr_getpshared
umount
nrand48
sigpending
wait
getgrnam_r
pthread_key_create
wcscat
fputc
seekdir
__tre_mem_new_impl
__res_state
mkstemp
vsprintf
__stdio_read
wcsspn
__dns_count_addrs
clearerr
pthread_barrier_wait
cbrt
exp
strsignal
mrand48
ioctl
getservbyname
copysign
getpass
setsockopt
fnmatch
ualarm
pthread_rwlockattr_destroy
pthread_cond_destroy
siginterrupt
__mmap
putenv
writev
tcsendbreak
__libc_sigaction
__getgrent_a
cfsetospeed
dprintf
logb
msgctl
nice
hypot
gethostbyname
vdprintf
creat
verr
__libc_csu_init
utimes
atan2f
prctl
accept
perror
klogctl
readdir_r
tcflow
fread
pthread_mutexattr_gettype
vasprintf
htons
setlinebuf
wmemcmp
sigpause
atan2
pthread_mutexattr_destroy
globfree
wcstoll
putwchar
remainder
acosf
closedir
setregid
timer_getoverrun
getservbyport
iswlower
atan
sigtimedwait
isalpha_l
pthread_mutexattr_getpshared
pthread_cond_broadcast
ispunct_l
setresuid
pthread_attr_getschedparam
__fseeko_unlocked
cfgetispeed
sem_destroy
remquof
newlocale
__fdopen
strlen
pthread_spin_init
vprintf
getmntent_r
gethostent
execvp
sem_init
pthread_rwlock_timedwrlock
strndup
glob
asin
snprintf
fscanf
shmat
pthread_mutexattr_setrobust
clock_nanosleep
timer_delete
__towrite
toupper_l
fwscanf
shmctl
getegid
sigwait
gethostbyname2_r
setenv
pclose
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
__munmap
atanh
readv
inet_aton
__libc_start_main
wcsncpy
tcgetsid
symlinkat
isupper_l
getuid
fileno
strspn
recvfrom
tanh
wcstoimax
pthread_cond_init
setbuf
putchar
wctomb
catclose
wcspbrk
sethostname
sigsetjmp
mblen
memccpy
tmpnam
frexpf
sigset
dcgettext
symlink
remainderf
log10
__pthread_register_cancel
fgetws
strlcat
log
daemon
pthread_spin_unlock
putwc
sigqueue
getprotoent
setbuffer
pow
towupper
memalign
strerror
_longjmp
msgsnd
ldexpf
atanhf
posix_madvise
tolower_l
__restore
wmemset
strptime
__memrchr
munlockall
gettext
pthread_attr_getscope
lockf
getsubopt
rename
__assert_fail
__stdout_write
setpgid
ftok
fputwc
fexecve
sincos
mknodat
execve
getopt_long_only
strtoull
ftrylockfile
getpagesize
__kernel_rem_pio2
srandom
getservbyport_r
pthread_rwlock_timedrdlock
getpeername
asinh
strstr
__sigprocmask
__brk
signalfd
execv
strcmp
bzero
bcopy
__tm_to_time
pthread_spin_lock
iswalpha
strcat
isblank
fstatvfs
sigsuspend
catopen
getlogin
llabs
index
iswcntrl
sendto
fgets
sigignore
pthread_mutex_timedlock
pthread_barrierattr_getpshared
ftell
strtok_r
unlink
sinhf
pthread_condattr_getclock
pthread_barrierattr_setpshared
fgetwc
pthread_cond_timedwait
swapoff
pthread_cond_wait
fdopendir
wcsxfrm
posix_openpt
_Exit
pthread_setcanceltype
__strdup
ferror
dngettext
wait3
posix_fadvise
tanf
strnlen
duplocale
remquo
__wake
openlog
ctime_r
endutxent
epoll_create
sem_trywait
memcpy
ldiv
usleep
getc_unlocked
frexpl
pselect
sysinfo
random
tcsetattr
free
fchown
pthread_kill
getsid
getopt
imaxdiv
reboot
powf
__ptsname_r
erand48
gmtime
strtoumax
__toread
strncmp
__uflow
fgetc
iswspace
strpbrk
floorf
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
__fseeko
iswalnum
swscanf
swab
statvfs
mbrlen
dup2
bcmp
wait4
pthread_once
__set_thread_area
getservbyname_r
sethostent
pthread_attr_setguardsize
dirfd
pthread_rwlock_trywrlock
towlower
ftw
log1pf
strsep
nanosleep
mount
fsetpos
rand_r
chown
pthread_attr_getstacksize
pthread_mutex_unlock
acosh
inet_pton
fchdir
__vsyslog
acoshf
pthread_attr_init
__stdio_close
setservent
scalbln
mkfifoat
setpwent
alarm
hypotf
getdelim
mkfifo
ctime
gai_strerror
posix_memalign
getchar
fchmodat
clock_settime
wcsstr
lchmod
getspent
lrint
mbtowc
setjmp
gethostbyaddr
getdomainname
semget
__ieee754_rem_pio2
__rsyscall_unlock
lrand48
wscanf
wcwidth
mbstowcs
vfwscanf
swapon
pause
pthread_rwlock_init
__stpcpy
timer_settime
sem_getvalue
__overflow
shutdown
read
inet_ntop
wmemcpy
dgettext
iswpunct
__fpending
bind
mbrtowc
sqrtf
puts
socket
mbsnrtowcs
sighold
getpid
__stdio_write
mkdtemp
recv
pthread_mutexattr_settype
__syscall_ret
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fdatasync
fabs
scanf
sigdelset
wctrans
pthread_condattr_setpshared
pthread_getspecific
fstat
pthread_exit
getwchar
memchr
__kernel_tan
connect
link
__libc_sigprocmask
strtok
getaddrinfo
wcsnrtombs
strerror_r
iswdigit
atof
pthread_setcancelstate
wcscoll
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
execlp
llrint
__kernel_cosf
endspent
floor
pthread_create
cosh
iswctype
fmod
ctermid
__fgetwc_unlocked
pthread_atfork
__restore_rt
__sigaction
isalnum
getenv
__mremap
scalbn
drand48
pthread_rwlock_tryrdlock
wordfree
lckpwdf
expm1f
pthread_attr_setdetachstate
strlcpy
setpriority
isblank_l
adjtimex
getpwent
atoll
time
shmget
round
killpg
coshf
putc_unlocked
warnx
__ctype_get_mb_cur_max
lldiv
utimensat
getdtablesize
ntohl
getwc
wcrtomb
getnameinfo
popen
epoll_create1
cuserid
gethostid
strncasecmp
pthread_barrierattr_init
__dns_doqueries
dup
shm_open
atoi
setgid
setspent
dcngettext
fflush
remove
setsid
ulckpwdf
cbrtf
__fpclassify
kill
fpathconf
memmove
readdir
ungetwc
isascii
ttyname_r
modff
__rand48_step
vswscanf
__syscall_cp
epoll_wait
abort
sigfillset
pthread_testcancel
epoll_pwait
tan
setgrent
isatty
__time_to_tm
strcpy
wcstoull
tempnam
div
copysignf
rintf
setgroups
msgrcv
inet_addr
pthread_equal
fputws
nftw
btowc
tcgetpgrp
expm1
__wait
__timedwait
__futex
sysconf
closelog
logf
clock
recvmsg
strtof
isdigit_l
ntohs
getutxent
getgrent
__fclose_ca
__pthread_unwind_next
strcasecmp
regerror
frexp
sigaltstack
isalpha
__lock
wctob
fcntl
dn_expand
tcgetattr
sscanf
fsync
sigaddset
wcschr
fclose
semctl
pthread_mutexattr_setpshared
__fpclassifyf
initgroups
__lockfile
mktime
getgrouplist
wcstoul
iswblank
abs
fmodf
pthread_join
cfsetispeed
gethostbyname2
getspnam_r
__tzset
truncf
inet_ntoa
sem_post
pthread_rwlock_wrlock
__unmapself
tcsetpgrp
fabsf
mlock
ptsname
pthread_rwlock_unlock
wcstombs
wprintf
vwscanf
mlockall
sem_timedwait
__syscall
syscall
setutxent
funlockfile
mbsinit
waitid
strrchr
sendmsg
sigismember
semop
sigrelse
srand48
signal
mkdir
fputs
asinhf
__rsyscall_lock
adjtime
isgraph
__libc_csu_fini
getpwuid_r
inotify_add_watch
_exit
strftime
__timedwait_cp
strchr
msgget
iconv_open
srand
gettimeofday
flockfile
telldir
raise
gmtime_r
__kernel_rem_pio2f
pthread_spin_destroy
vwprintf
pread
setpgrp
clearenv
faccessat
send
scalb
lcong48
realloc
asinf
renameat
wcstoumax
errx
crypt
__madvise
getgroups
setitimer
isalnum_l
res_query
_start
sigwaitinfo
memcmp
__asctime
ffs
log10f
basename
fwide
pthread_cond_signal
rewind
epoll_ctl
seed48
__rsyscall
__dns_query
sqrt
mkdirat
openat
ceilf
strtoimax
getppid
mprotect
pthread_spin_trylock
alphasort
setresgid
wcslen
vwarnx
sockatmark
cfgetospeed
mempcpy
__setjmp
open
getpwuid
flock
__kernel_cos
sem_unlink
__kernel_tanf
rindex
sbrk
tcflush
pthread_barrier_init
inotify_rm_watch
expf
setmntent
geteuid
pthread_attr_setschedparam
warn
vsscanf
strtol
htonl
setegid
_setjmp
asctime
settimeofday
sync
pthread_rwlock_destroy
tolower
dirname
truncate
gets
wctype
__getpwent_a
getspnam
sem_wait
chdir
freopen
res_init
pthread_detach
pthread_mutex_destroy
labs
opendir
gethostbyname_r
setreuid
clock_gettime
exit
if_indextoname
pthread_mutex_init
isprint_l
getitimer
wcswidth
towctrans
clock_getcpuclockid
getservent
sendfile
erf
write
log1p
unsetenv
pthread_attr_getdetachstate
wcscpy
sinf
ungetc
readlinkat
pthread_condattr_destroy
scalblnf
__stdio_seek
__simple_malloc
inotify_init
freeaddrinfo
pivot_root
sin
inotify_init1
toupper
putchar_unlocked
__getdents
asprintf
gethostbyaddr_r
getpgrp
atol
toascii
endprotoent
cosf
strcspn
bsearch
feof
close
getpgid
printf
__fwritex
fprintf
fstatat
forkpty
select
calloc
__libc_current_sigrtmin
__ipparse
acos
umount2
chmod
getchar_unlocked
isdigit
nextafter
fork
putw
rewinddir
wcswcs
endmntent
atanf
uname
setvbuf
wcsrtombs
wcstol
pthread_attr_setstacksize
localtime_r
difftime
getsockname
execl
listen
poll
pthread_sigmask
vscanf
__syscall_cp_asm
__tre_mem_alloc_impl
__stpncpy
__yield
tcdrain
localtime
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
seteuid
__libc_current_sigrtmax
pthread_barrierattr_destroy
logbf
pthread_mutexattr_getrobust
__ieee754_rem_pio2f
__uniclone
freelocale
gethostname
pthread_attr_setscope
strncpy
mbsrtowcs
timer_gettime
sinh
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
memset
__kernel_sin
islower
vsnprintf
fgetpos
isxdigit_l
isprint
stime
getsockopt
sem_close
realpath
getgid
__fopen_rb_ca
ftruncate
imaxabs
__langinfo
waitpid
times
fwprintf
tanhf
timer_create
getutxline
strtod
vfprintf
pthread_mutex_trylock
__crypt_r
strchrnul
hstrerror
pthread_rwlock_rdlock
rmdir
__mktemp
wcsncat
erff
strxfrm
roundf
execle
chroot
getcwd
getpwnam_r
fchmod
readlink
fseek
isxdigit
isupper
utime
__putenv
shm_unlink
jrand48
erfc
isspace_l
ispunct
socketpair
futimens
wcsrchr
catgets
addmntent
cfmakeraw
getpwnam
siglongjmp
getw
iswupper
getline
cos
endservent
pthread_rwlockattr_init
swprintf
strcasestr
sprintf
ttyname
rint
rand
lseek
lchown
pthread_rwlockattr_setpshared
modf
regexec
linkat
ilogb
__errno_location
shmdt
setrlimit
mknod
pthread_barrier_destroy
vfork
nextafterf
pthread_attr_getguardsize
umask

[-- Attachment #5: posix-syms.txt --]
[-- Type: text/plain, Size: 9697 bytes --]

iswgraph
fchownat
posix_trace_attr_setstreamfullpolicy
V2_chap01
setuid
wcsncmp
fopen
tzset
trunc
stpncpy
sigprocmask
fmemopen
scandir
casinh
posix_trace_close
strtoul
if_nametoindex
stat
unlockpt
confstr
getrlimit
posix_trace_attr_setstreamsize
pathconf
system
longjmp
cpow
fegetexceptflag
posix_trace_attr_init
getprotobyname
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
isspace
getpriority
strncat
access
fesetround
posix_trace_getnext_event
pthread_condattr_getpshared
isless
nrand48
wait
sigpending
wcscat
seekdir
pthread_key_create
fputc
isgreaterequal
csinl
mkstemp
environ
wcsspn
clearerr
catan
posix_spawnattr_getsigmask
pthread_barrier_wait
exp
cbrt
strsignal
acosl
mrand48
ioctl
getservbyname
fmin
copysign
setsockopt
fnmatch
pthread_rwlockattr_destroy
pthread_cond_destroy
posix_trace_flush
siginterrupt
putenv
writev
tcsendbreak
cfsetospeed
msgctl
logb
dprintf
remque
nice
hypot
cimag
creat
setkey
mq_open
accept
perror
cacos
cosl
tcflow
fread
pthread_mutexattr_gettype
dlopen
endpwent
wmemcmp
posix_spawnattr_setsigdefault
sigpause
atan2
pthread_mutexattr_destroy
wcstoll
remainder
putwchar
daylight
closedir
setregid
posix_spawnattr_getpgroup
aio_error
timer_getoverrun
iswlower
aio_cancel
atan
sigtimedwait
pthread_mutexattr_getpshared
pthread_cond_broadcast
mq_receive
setstate
cexp
posix_trace_eventset_add
pthread_attr_getschedparam
cabs
V2_chap03
posix_trace_eventid_equal
cfgetispeed
sem_destroy
pthread_setschedparam
newlocale
strlen
isnormal
vprintf
gethostent
posix_spawnattr_getflags
posix_spawn
sem_init
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
glob
asin
snprintf
shmat
fscanf
pthread_mutexattr_setrobust
fegetround
wcstold
posix_spawnattr_setschedparam
clock_nanosleep
timer_delete
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_arg
getegid
sigwait
setenv
mq_timedsend
pclose
isnan
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
atanh
readv
y0
posix_trace_eventid_open
errno
wcsncpy
getc
tcgetsid
posix_trace_trygetnext_event
getuid
fileno
tanh
strspn
recvfrom
exec
isinf
wcstoimax
setbuf
wctomb
putchar
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
sigsetjmp
mblen
feraiseexcept
sigaction
memccpy
dlerror
tmpnam
aio_suspend
feholdexcept
isgreater
aio_write
symlink
log10
fgetws
log
feupdateenv
wcscasecmp
posix_trace_attr_setinherited
pthread_spin_unlock
putwc
sigqueue
munmap
towupper
pow
islessgreater
islessequal
strerror
msgsnd
_longjmp
syslog
posix_madvise
qsort
wmemset
strptime
munlockall
ctanh
pthread_attr_getscope
lockf
posix_spawnattr_getsigdefault
lsearch
getsubopt
rename
setpgid
ftok
fexecve
fputwc
ftrylockfile
srandom
pthread_mutex_setprioceiling
pthread_rwlock_timedrdlock
getpeername
asinh
atexit
aio_return
strstr
posix_trace_set_filter
pthread_setschedprio
sinl
posix_mem_offset
lgamma
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
isblank
sigsuspend
fstatvfs
mq_setattr
catopen
llabs
getlogin
iswcntrl
sendto
posix_typed_mem_open
fgets
sched_setparam
pthread_mutex_timedlock
pthread_barrierattr_getpshared
assert
ftell
posix_trace_start
nl_langinfo
mq_timedreceive
wordexp
unlink
pthread_condattr_getclock
pthread_barrierattr_setpshared
j0
fgetwc
pthread_cond_timedwait
posix_trace_event
fdopendir
wcsxfrm
posix_spawn_file_actions_destroy
posix_openpt
_Exit
ferror
posix_spawnattr_init
posix_fadvise
_toupper
strnlen
duplocale
remquo
openlog
endutxent
sem_trywait
memcpy
ldiv
getc_unlocked
pselect
random
tcsetattr
free
fchown
pthread_kill
fdetach
getsid
getopt
imaxdiv
posix_trace_attr_getlogsize
tsearch
erand48
gmtime
strtoumax
strncmp
iswspace
fgetc
strpbrk
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
fattach
iswalnum
hcreate
swscanf
swab
statvfs
mbrlen
posix_trace_eventtypelist_getnext_id
contents
pthread_cleanup_pop
pthread_once
sethostent
pthread_attr_setguardsize
dirfd
towlower
pthread_rwlock_trywrlock
llround
twalk
ftw
timezone
wcstok
tdelete
nanosleep
posix_spawn_file_actions_addclose
fsetpos
fmax
posix_spawnattr_setpgroup
chown
pthread_attr_getstacksize
catanl
acosh
posix_spawnattr_getschedpolicy
fchdir
iconv
if_nameindex
endgrent
pthread_attr_init
setservent
scalbln
setpwent
aio_fsync
fetestexcept
clog
feclearexcept
alarm
getdelim
mkfifo
ctime
gai_strerror
ccosh
getnetbyaddr
posix_memalign
fchmodat
getchar
clock_settime
wcsstr
lrint
psiginfo
mbtowc
exp2
lfind
setjmp
semget
lrand48
pthread_attr_getstack
wscanf
wcwidth
mbstowcs
vfwscanf
pause
posix_trace_get_attr
shutdown
sem_getvalue
read
posix_spawnattr_setsigmask
inet_ntop
wmemcpy
iswpunct
mq_unlink
strtold
sched_getparam
mbrtowc
bind
puts
socket
sighold
getpid
mkdtemp
recv
pthread_mutexattr_settype
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fabs
fdatasync
wctrans
sigdelset
scanf
getmsg
pthread_condattr_setpshared
pthread_getspecific
fstat
tfind
pthread_exit
getwchar
posix_trace_attr_setlogsize
getgrnam
memchr
putc
connect
link
sched_getscheduler
posix_trace_trid_eventid_open
strtok
getaddrinfo
wcsnrtombs
cacosl
iswdigit
atof
wcscoll
pthread_setcancelstate
posix_spawnattr_getschedparam
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
conj
posix_typed_mem_get_info
llrint
pthread_key_delete
floor
pthread_create
cosh
iswctype
posix_trace_timedgetnext_event
fmod
ctermid
pthread_atfork
isalnum
getenv
csinh
drand48
pthread_rwlock_tryrdlock
pthread_attr_setdetachstate
setpriority
setlogmask
getpwent
iconv_close
malloc
setnetent
pthread_getconcurrency
time
shmget
round
killpg
posix_trace_get_status
putmsg
putc_unlocked
utimensat
lldiv
ntohl
wcrtomb
getwc
getnameinfo
if_freenameindex
popen
gethostid
strncasecmp
pthread_barrierattr_init
shm_open
dup
atoi
setgid
fflush
remove
setsid
kill
fpathconf
readdir
memmove
ungetwc
isascii
vswscanf
stdin
sigfillset
abort
pthread_testcancel
lround
ccosl
creal
tan
setgrent
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
div
nearbyint
posix_trace_attr_setname
inet_addr
msgrcv
pthread_equal
fputws
nftw
posix_trace_attr_getname
pthread_setconcurrency
ccos
btowc
tcgetpgrp
sched_rr_get_interval
expm1
isfinite
strdup
posix_spawnattr_setschedpolicy
sysconf
closelog
logf
clock
recvmsg
fpclassify
getgrent
getutxent
fma
strcasecmp
sigaltstack
frexp
isalpha
wctob
posix_spawnp
fcntl
tcgetattr
sscanf
sigaddset
fsync
wcschr
getpmsg
fclose
fegetenv
semctl
pthread_mutexattr_setpshared
mktime
wcstoul
iswblank
abs
pthread_join
vfscanf
cproj
fwrite
a64l
optarg
cfsetispeed
fesetenv
mq_close
nan
truncf
posix_trace_attr_getstreamfullpolicy
sem_post
pthread_rwlock_wrlock
tcsetpgrp
mlock
ptsname
wcstombs
pthread_rwlock_unlock
insque
wprintf
vwscanf
fdim
mlockall
sem_timedwait
wcstod
setutxent
funlockfile
mbsinit
waitid
strrchr
sigismember
sendmsg
sigrelse
semop
srand48
signal
posix_trace_get_filter
fdopen
mkdir
fputs
wcsnlen
isgraph
posix_trace_attr_getstreamsize
aio_read
wcsncasecmp
wcsftime
pthread_self
strftime
strchr
getdate
msgget
iconv_open
srand
flockfile
gettimeofday
telldir
raise
wcpncpy
pthread_spin_destroy
vwprintf
tanl
ctan
fesetexceptflag
pread
setpgrp
send
faccessat
lcong48
realloc
grantpt
pthread_attr_setstack
wcstoumax
crypt
setitimer
getgroups
sigwaitinfo
memcmp
ffs
basename
fwide
pthread_cond_signal
rewind
_tolower
seed48
sqrt
wcpcpy
signgam
openat
posix_trace_clear
ctanl
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
open
getpwuid
pututxline
sem_unlink
dlsym
posix_spawnattr_setflags
tcflush
pthread_attr_getschedpolicy
carg
geteuid
pthread_attr_setschedparam
vsscanf
strtol
htonl
setegid
asctime
tolower
sync
pthread_rwlock_destroy
dirname
truncate
sched_setscheduler
sched_yield
wctype
gets
sem_wait
mq_notify
freopen
chdir
pthread_detach
pthread_mutex_destroy
labs
opendir
setreuid
exit
if_indextoname
pthread_mutex_init
getitimer
posix_spawnattr_destroy
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
posix_trace_attr_getclockres
erf
write
unsetenv
log1p
pthread_attr_getdetachstate
wcscpy
ungetc
pthread_condattr_destroy
setprotoent
freeaddrinfo
asinl
mmap
sin
toupper
putchar_unlocked
toascii
getpgrp
endprotoent
atol
strcspn
bsearch
pthread_getschedparam
feof
close
getpgid
printf
fstatat
fprintf
csin
select
calloc
casin
l64a
chmod
acos
getchar_unlocked
isdigit
nextafter
fork
V2_chap02
rewinddir
vswprintf
lio_listio
posix_trace_open
uname
atanf
wcsrtombs
setvbuf
wcstol
pthread_attr_setstacksize
difftime
getsockname
strfmon
casinl
listen
poll
pthread_sigmask
vscanf
tcdrain
localtime
wcsdup
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
catanh
seteuid
sched_get_priority_max
pthread_barrierattr_destroy
pthread_mutexattr_getrobust
posix_trace_shutdown
posix_spawn_file_actions_addopen
freelocale
uselocale
gethostname
strncpy
mbsrtowcs
pthread_attr_setscope
sinh
pthread_mutexattr_getprioceiling
isunordered
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
islower
memset
vsnprintf
FD_CLR
fgetpos
isprint
getsockopt
sem_close
realpath
getgid
ftruncate
imaxabs
dlclose
waitpid
posix_trace_attr_destroy
times
pthread_getcpuclockid
tgamma
fwprintf
timer_create
sem_open
vfprintf
strtod
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
wcsncat
stpcpy
erff
strxfrm
pthread_attr_getinheritsched
getcwd
fchmod
atanl
readlink
mq_send
csqrt
isastream
fseek
isupper
isxdigit
utime
shm_unlink
jrand48
erfc
pthread_attr_setschedpolicy
pthread_attr_setinheritsched
ispunct
signbit
socketpair
futimens
mq_getattr
wcsrchr
catgets
siglongjmp
getpwnam
posix_trace_attr_getinherited
endnetent
iswupper
getline
cos
endservent
pthread_rwlockattr_init
initstate
swprintf
sprintf
getgrgid
ttyname
rint
encrypt
rand
posix_trace_create
pthread_rwlockattr_setpshared
lchown
lseek
modf
log2
ilogb
shmdt
setrlimit
mknod
pthread_barrier_destroy
cacosh
umask
pthread_attr_getguardsize

^ permalink raw reply	[relevance 2%]

Results 1-73 of 73 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2011-05-28 23:41     Help assessing status of musl Rich Felker
2011-05-29 16:19  2% ` gs
2011-05-29 16:44  1%   ` gs
2011-05-29 17:32  2%     ` gs
2011-07-05  0:41     Daily reports: Monday Luka Marčetić
2011-07-05 14:24     ` Daily reports: Tuesday Luka Marčetić
2011-07-06 20:28       ` Daily reports: Wednesday Luka Marčetić
2011-07-07 20:16         ` Daily reports: Thursday Luka Marčetić
2011-07-08 22:41           ` Daily reports: Friday Luka Marčetić
2011-07-09 11:53             ` Solar Designer
2011-07-10 14:52               ` Daily reports: Friday (threaded setuid testing) Rich Felker
2011-07-11 22:59                 ` Daily cluts reports Luka Marčetić
2011-07-14  9:57 11%               ` cluts: strerror_r() test (was: Daily cluts reports) Solar Designer
2011-07-14 10:41 13%                 ` cluts: strerror_r() test Luka Marčetić
2011-07-14 10:47  6%                   ` Solar Designer
2011-07-14 17:55  6%                   ` Rich Felker
2011-07-14 19:35  6%                     ` Luka Marčetić
2011-07-13 11:07     cluts review Solar Designer
2011-07-13 12:02     ` Luka Marčetić
2011-07-13 12:21       ` Solar Designer
2011-07-13 12:57         ` Luka Marčetić
2011-07-13 13:54           ` Solar Designer
2011-07-13 14:00  5%         ` Rich Felker
2011-07-13 13:51  5% cluts: Incorrect test expectations in buf module (errno) Rich Felker
2011-07-13 17:01  0% ` Luka Marčetić
2011-08-03 22:14     New daily reports Luka Marčetić
2011-08-03 22:46     ` Solar Designer
2011-08-04 10:51       ` Luka Marčetić
2011-08-05  0:02         ` New daily reports - started pthread_eintr.c Luka Marčetić
2011-08-06  4:40           ` New daily reports - debugging alloc.c et al Luka Marčetić
2011-08-07  2:41             ` New daily reports - debugging alloc.c still Luka Marčetić
2011-08-07  7:32               ` Rich Felker
2011-08-07 22:25                 ` Luka Marčetić
2011-08-09  3:02                   ` New daily reports - buf.c Luka Marčetić
2011-08-10  1:34                     ` New daily reports - nothing Luka Marčetić
2011-08-10  1:38                       ` Rich Felker
2011-08-10 11:47  5%                     ` Luka Marčetić
2011-08-10  4:59                       ` Rich Felker
2011-08-10 12:09  5%                     ` Luka Marčetić
2012-03-09  8:14     [PATCH 0/4] Fix function definitions Georgi Chorbadzhiyski
2012-03-09  8:21     ` Georgi Chorbadzhiyski
2012-03-09  8:33  5%   ` Rich Felker
2012-03-09  9:16  0%     ` Georgi Chorbadzhiyski
2012-03-09 15:11  0%       ` Rob Landley
2012-03-09 16:38  3%         ` Rich Felker
2012-04-13  1:45  4% [PATCH] string.h, _BSD_SOURCE, and *index() Isaac Dunham
2012-05-21  6:26  2% _BSD_SOURCE support for musl ready Isaac Dunham
2012-05-21 13:36     ` Rich Felker
2012-05-21 18:31  2%   ` [PATCH]_BSD_SOURCE for musl, take 2 Isaac Dunham
     [not found]     <20120609230541.47eac2de@newbook>
     [not found]     ` <4FD55156.7050302@cs.ucla.edu>
     [not found]       ` <20120611182202.1ee4d019@newbook>
2012-06-17 22:49  5%     ` musl bugs found through gnulib Bruno Haible
2012-06-20  3:04  4%       ` Rich Felker
2012-06-20  4:10  0%         ` [musl] " Eric Blake
2012-06-20 13:27  0%           ` Rich Felker
2012-06-20 19:28  0%       ` Rich Felker
2012-08-24 21:41     Best bikeshed ever (feature test macros) Rich Felker
2012-09-02  8:48     ` Arvid E. Picciani
2012-09-02 15:19  5%   ` Rich Felker
2012-09-24  1:19  1% Compiling musl with pcc Isaac Dunham
2013-02-08 16:28  5% musl detection by preprocessor Jens Gustedt
2013-02-08 16:41  0% ` Szabolcs Nagy
2013-02-08 16:51  0%   ` Jens Gustedt
2013-02-08 17:07  5%     ` Szabolcs Nagy
2013-02-08 18:55  0%     ` Rich Felker
2013-02-08 16:48 13% guard bug for strerror_r Jens Gustedt
2013-02-08 16:55  6% ` Szabolcs Nagy
2013-02-08 17:30 13%   ` Jens Gustedt
2013-02-08 18:01  6%     ` Isaac Dunham
2013-02-08 18:59 13%       ` Rich Felker
2013-02-08 19:53 13%         ` Jens Gustedt
2013-02-08 20:01 12%           ` Rich Felker
2013-02-08 20:31  5%             ` Jens Gustedt
2013-02-08 20:38 11%               ` Rich Felker
2013-02-10 23:08  6%     ` Rob Landley
2014-01-21 13:57     dlopen'ing glibc linked libraries Gabriel Jacobo
2014-01-21 14:31     ` John Spencer
2014-01-21 14:44       ` Gabriel Jacobo
2014-01-21 16:28  6%     ` John Spencer
2014-04-04 20:47     build with clang-3.4 warnings report Rich Felker
2014-04-05  1:06     ` Abdoulaye Walsimou Gaye
2014-04-05  1:54       ` Rich Felker
2014-04-05  9:04         ` Jens Gustedt
2014-04-05 13:07           ` Rich Felker
2014-04-05 14:37             ` Jens Gustedt
2014-04-05 16:35               ` Rich Felker
2014-04-05 22:08                 ` Jens Gustedt
2014-04-06  1:57                   ` Rich Felker
2014-04-06 16:37                     ` Jens Gustedt
2014-04-06 16:49  5%                   ` Rich Felker
2014-09-11 11:00     why is there no __MUSL__ macro? Jörg Krause
2014-09-11 11:09     ` Laurent Bercot
2014-09-11 11:17       ` Szabolcs Nagy
2014-09-11 12:02         ` Jörg Krause
2014-09-11 12:38           ` Szabolcs Nagy
2014-09-11 13:33  5%         ` Jörg Krause
2014-09-11 14:48  0%           ` Szabolcs Nagy
2014-09-11 14:47     ` Natanael Copa
2014-09-12  7:35       ` Jörg Krause
2014-09-12 15:37  5%     ` Rich Felker
2015-03-10  1:07     pthread object sizes for new archs Rich Felker
2015-03-10  8:30     ` Jens Gustedt
2015-03-10 18:24  5%   ` Rich Felker
2016-01-17 23:15     Open/pending issues as of Jan 17 Rich Felker
2016-01-18 12:12     ` Christian Neukirchen
2016-01-29  2:37       ` Rich Felker
2016-01-29  7:54         ` Natanael Copa
2016-01-29 18:19           ` Rich Felker
2016-02-19 10:30  3%         ` netflix support (WAS: Open/pending issues as of Jan 17) Natanael Copa
2016-04-04  5:26     [PATCH v2] add powerpc64 port Bobby Bingham
2016-04-13 23:05     ` Szabolcs Nagy
2016-04-14  8:01       ` Bobby Bingham
2016-04-14 13:42         ` Szabolcs Nagy
2016-04-15 20:38  4%       ` Szabolcs Nagy
2018-08-05  0:54 14% strerror_r and _GNU_SOURCE W. Michael Petullo
2018-08-05  1:04  6% ` Rich Felker
2019-02-27  3:30     C Annex K safe C functions Jonny Grant
2019-02-27 13:11     ` Rich Felker
2019-02-27 16:34  3%   ` Rich Felker
2019-11-08 18:43  2% OpenEmbedded systemd+musl patch status Rich Felker
2021-07-16 11:58  5% [musl] [PATCH] support the __STDC_WANT_LIB_EXT2__ feature test macro John Scott
2022-04-12 20:43 13% [musl] ✘strerror_r() bug in musl Gary E. Miller
2022-04-12 20:48  6% ` alice
2022-04-12 21:04  6%   ` Gary E. Miller
2022-04-12 20:56 13% ` Alex Xu (Hello71)
2022-04-12 21:07  6%   ` Gary E. Miller
2022-04-12 23:16  6%     ` Wolf
2022-04-13  0:15 11%       ` Gary E. Miller
2022-04-12 21:13 11%   ` Gary E. Miller
2022-04-13  3:44 10% ` Rich Felker
2022-04-13 12:24 11% ` [musl] *strerror_r() " Natanael Copa
2022-04-13 14:05 11%   ` Rich Felker
2022-04-13 17:36 10%     ` Gary E. Miller
2022-04-13 20:38 11%       ` Rich Felker
2022-04-13 21:16 11%         ` Gary E. Miller
2022-04-13 22:27  5%           ` Rich Felker
2022-04-13 22:43  6%             ` Gary E. Miller
2022-04-13 22:58  6%               ` Rich Felker
2022-04-13 23:07  6%                 ` Gary E. Miller

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).