* getpass misplaced
@ 2012-05-21 2:25 Isaac Dunham
2012-05-21 3:01 ` Rich Felker
0 siblings, 1 reply; 5+ messages in thread
From: Isaac Dunham @ 2012-05-21 2:25 UTC (permalink / raw)
To: musl
I know getpass is an atrocious security mistake of years ago, but
if we are going to support it, glibc defines it with GNU, BSD, or *old*
X/Open feature macros in <unistd.h>, not <pwd.h>.
Also, I've found two more headers that actually don't need _BSD_SOURCE
added before they offer the BSD functionality (all BSD functions are
also available in every other relevant namespace): pwd.h and utmp.h.
This has me down to 22 headers that still need work/reviewing. Here's
the TODO for _BSD_SOURCE:
include/tgmath.h
include/glob.h
include/arpa/inet.h
include/sys/select.h
include/sys/wait.h
include/sys/socket.h
include/sys/un.h
include/sys/uio.h
include/sys/mman.h
include/sys/stat.h
include/setjmp.h
include/dirent.h
include/time.h
include/netinet/ip.h
include/netinet/tcp.h
include/netinet/ip_icmp.h
include/netinet/in.h Missing structs
include/netinet/if_ether.h
include/shadow.h
include/endian.h
include/grp.h
include/net/if.h
<netinet/in.h> could cause breakage without extension. I forget
exactly what the problem was, though.
Isaac Dunham
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: getpass misplaced
2012-05-21 2:25 getpass misplaced Isaac Dunham
@ 2012-05-21 3:01 ` Rich Felker
2012-05-21 3:38 ` Isaac Dunham
2012-05-21 4:52 ` Question on setjmp.h Isaac Dunham
0 siblings, 2 replies; 5+ messages in thread
From: Rich Felker @ 2012-05-21 3:01 UTC (permalink / raw)
To: musl
On Sun, May 20, 2012 at 07:25:50PM -0700, Isaac Dunham wrote:
> I know getpass is an atrocious security mistake of years ago, but
> if we are going to support it, glibc defines it with GNU, BSD, or *old*
> X/Open feature macros in <unistd.h>, not <pwd.h>.
Fixed.
> Also, I've found two more headers that actually don't need _BSD_SOURCE
> added before they offer the BSD functionality (all BSD functions are
> also available in every other relevant namespace): pwd.h and utmp.h.
OK.
> This has me down to 22 headers that still need work/reviewing. Here's
> the TODO for _BSD_SOURCE:
>
> include/tgmath.h
This is purely C99 stuff; I don't think GNU would add anything.
> include/glob.h
We don't support the extensions here, and even if we want to have the
macros for extension flags, they seem to be in the reserved namespace
and thus ok to defined unconditionall.
> include/shadow.h
> include/endian.h
These are nonstandard and in principle don't need any feature test
macros. However, we use them in endian.h so that other headers can
include endian.h.
> <netinet/in.h> could cause breakage without extension. I forget
> exactly what the problem was, though.
..what?
Rich
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: getpass misplaced
2012-05-21 3:01 ` Rich Felker
@ 2012-05-21 3:38 ` Isaac Dunham
2012-05-21 4:52 ` Question on setjmp.h Isaac Dunham
1 sibling, 0 replies; 5+ messages in thread
From: Isaac Dunham @ 2012-05-21 3:38 UTC (permalink / raw)
To: musl
On Sun, 20 May 2012 23:01:06 -0400
Rich Felker <dalias@aerifal.cx> wrote:
> > This has me down to 22 headers that still need work/reviewing.
> > Here's the TODO for _BSD_SOURCE:
Note: the TODO is a list of files to review autogenerated by grepping
for MISC or BSD in headers from glibc. Some of these can be expected
to work with _BSD_SOURCE already, because glibc uses so many feature
tests.
> >
> > include/tgmath.h
>
> This is purely C99 stuff; I don't think GNU would add anything.
>
> > include/glob.h
>
> We don't support the extensions here, and even if we want to have the
> macros for extension flags, they seem to be in the reserved namespace
> and thus ok to defined unconditionall.
>
> > include/shadow.h
> > include/endian.h
>
> These are nonstandard and in principle don't need any feature test
> macros. However, we use them in endian.h so that other headers can
> include endian.h.
>
> > <netinet/in.h> could cause breakage without extension. I forget
> > exactly what the problem was, though.
> ..what?
Extremely bad wording on my part.
_BSD_SOURCE or _GNU_SOURCE make these structs available in glibc:
group_req, group_source_req, group_filter, ip_msfilter
I had forgotten which structs as of the last mail.
I'd expect breakage without them, though I guess we could wait and see.
Isaac Dunham
^ permalink raw reply [flat|nested] 5+ messages in thread
* Question on setjmp.h
2012-05-21 3:01 ` Rich Felker
2012-05-21 3:38 ` Isaac Dunham
@ 2012-05-21 4:52 ` Isaac Dunham
2012-05-21 4:53 ` Rich Felker
1 sibling, 1 reply; 5+ messages in thread
From: Isaac Dunham @ 2012-05-21 4:52 UTC (permalink / raw)
To: musl
I'm looking at setjmp.h, and see:
#ifdef _GNU_SOURCE
#define jmp_buf sigjmp_buf /* no other definition for jmp_buf in view */
#endif
..
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
/* Where did jmp_buf get defined for XOPEN_SOURCE? */
int _setjmp (jmp_buf);
void _longjmp (jmp_buf, int);
#endif
Still working on _BSD_SOURCE, about 13 headers left now.
I may be optimistic, but it looks like I should have a patch by the end
of the month or perhaps week (assuming I can do something after work).
Isaac Dunham
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question on setjmp.h
2012-05-21 4:52 ` Question on setjmp.h Isaac Dunham
@ 2012-05-21 4:53 ` Rich Felker
0 siblings, 0 replies; 5+ messages in thread
From: Rich Felker @ 2012-05-21 4:53 UTC (permalink / raw)
To: musl
On Sun, May 20, 2012 at 09:52:01PM -0700, Isaac Dunham wrote:
> I'm looking at setjmp.h, and see:
> #ifdef _GNU_SOURCE
> #define jmp_buf sigjmp_buf /* no other definition for jmp_buf in view */
> #endif
It's defined in bits. By the way, this #define is unnecessary; I
mistakenly thought it would be useful back when musl's relationship to
glibc behavior was less defined. I think I'll remove it.
> Still working on _BSD_SOURCE, about 13 headers left now.
> I may be optimistic, but it looks like I should have a patch by the end
> of the month or perhaps week (assuming I can do something after work).
Great!
Rich
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-21 4:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 2:25 getpass misplaced Isaac Dunham
2012-05-21 3:01 ` Rich Felker
2012-05-21 3:38 ` Isaac Dunham
2012-05-21 4:52 ` Question on setjmp.h Isaac Dunham
2012-05-21 4:53 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).