* libedit build, missing sys/ttydefaults.h & sys/errno.h
@ 2012-12-13 10:29 ojab
2012-12-13 17:25 ` John Spencer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: ojab @ 2012-12-13 10:29 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 759 bytes --]
Hi list,
libedit-3.0 build fails with
> editline/readline.h:79:29: fatal error: sys/ttydefaults.h: No such file or directory
> fileman.c:14:23: fatal error: sys/errno.h: No such file or directory
After adding sys/ttydefaults.h from NetBSD [1] (cleaned up version in
the attached file) and replacing <sys/errno.h> with <errno.h> it
builds/works fine.
As far as I can see the same issues was reported about sysvinit [2].
Can sys/ttydefaults.h be added to musl? Will <sys/errno.h> alias be
added to musl? Or I should report issue to libedit developer instead?
[1]
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/ttydefaults.h?rev=1.16&content-type=text/plain&only_with_tag=MAIN
[2] http://www.openwall.com/lists/musl/2012/04/24/9
//wbr ojab
[-- Attachment #2: ttydefaults.h --]
[-- Type: text/plain, Size: 1396 bytes --]
#ifndef _SYS_TTYDEFAULTS_H_
#define _SYS_TTYDEFAULTS_H_
#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#define TTYDEF_SPEED (B9600)
#define CTRL(x) (x&037)
#define CEOF CTRL('d')
#define CEOL ((unsigned char)'\377')
#define CERASE 0177
#define CINTR CTRL('c')
#define CSTATUS CTRL('t')
#define CKILL CTRL('u')
#define CMIN 1
#define CQUIT 034
#define CSUSP CTRL('z')
#define CTIME 0
#define CDSUSP CTRL('y')
#define CSTART CTRL('q')
#define CSTOP CTRL('s')
#define CLNEXT CTRL('v')
#define CDISCARD CTRL('o')
#define CWERASE CTRL('w')
#define CREPRINT CTRL('r')
#define CEOT CEOF
#define CBRK CEOL
#define CRPRNT CREPRINT
#define CFLUSH CDISCARD
#endif
#ifdef _KERNEL
#ifdef TTYDEFCHARS
const cc_t ttydefchars[NCCS] = {
[VEOF] = CEOF,
[VEOL] = CEOL,
[VEOL2] = CEOL,
[VERASE] = CERASE,
[VWERASE] = CWERASE,
[VKILL] = CKILL,
[VREPRINT] = CREPRINT,
[7] = _POSIX_VDISABLE,
[VINTR] = CINTR,
[VQUIT] = CQUIT,
[VSUSP] = CSUSP,
[VDSUSP] = CDSUSP,
[VSTART] = CSTART,
[VSTOP] = CSTOP,
[VLNEXT] = CLNEXT,
[VDISCARD] = CDISCARD,
[VMIN] = CMIN,
[VTIME] = CTIME,
[VSTATUS] = CSTATUS,
[19] = _POSIX_VDISABLE,
};
#undef TTYDEFCHARS
#else
extern const cc_t ttydefchars[NCCS];
#endif
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libedit build, missing sys/ttydefaults.h & sys/errno.h
2012-12-13 10:29 libedit build, missing sys/ttydefaults.h & sys/errno.h ojab
@ 2012-12-13 17:25 ` John Spencer
2012-12-13 18:58 ` Rich Felker
2012-12-13 20:40 ` John Spencer
2 siblings, 0 replies; 5+ messages in thread
From: John Spencer @ 2012-12-13 17:25 UTC (permalink / raw)
To: musl
On 12/13/2012 11:29 AM, ojab wrote:
> Hi list,
>
> libedit-3.0 build fails with
>
>> editline/readline.h:79:29: fatal error: sys/ttydefaults.h: No such
>> file or directory
>> fileman.c:14:23: fatal error: sys/errno.h: No such file or directory
>
> After adding sys/ttydefaults.h from NetBSD [1] (cleaned up version in
> the attached file) and replacing <sys/errno.h> with <errno.h> it
> builds/works fine.
> As far as I can see the same issues was reported about sysvinit [2].
>
> Can sys/ttydefaults.h be added to musl? Will <sys/errno.h> alias be
> added to musl? Or I should report issue to libedit developer instead?
>
> [1]
> http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/ttydefaults.h?rev=1.16&content-type=text/plain&only_with_tag=MAIN
> [2] http://www.openwall.com/lists/musl/2012/04/24/9
>
> //wbr ojab
at least the #ifdef KERNEL part is bogus.
btw, it seems the line that includes sys/ttydefaults.h is not needed to
build libedit 3.0.
in sabotage, the include line is simply removed and that works:
https://github.com/rofl0r/sabotage/blob/master/KEEP/libedit_readlineh.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libedit build, missing sys/ttydefaults.h & sys/errno.h
2012-12-13 10:29 libedit build, missing sys/ttydefaults.h & sys/errno.h ojab
2012-12-13 17:25 ` John Spencer
@ 2012-12-13 18:58 ` Rich Felker
2012-12-13 20:15 ` ojab
2012-12-13 20:40 ` John Spencer
2 siblings, 1 reply; 5+ messages in thread
From: Rich Felker @ 2012-12-13 18:58 UTC (permalink / raw)
To: musl
On Thu, Dec 13, 2012 at 02:29:28PM +0400, ojab wrote:
> Hi list,
>
> libedit-3.0 build fails with
>
> >editline/readline.h:79:29: fatal error: sys/ttydefaults.h: No such file or directory
> >fileman.c:14:23: fatal error: sys/errno.h: No such file or directory
>
> After adding sys/ttydefaults.h from NetBSD [1] (cleaned up version
> in the attached file) and replacing <sys/errno.h> with <errno.h> it
> builds/works fine.
> As far as I can see the same issues was reported about sysvinit [2].
>
> Can sys/ttydefaults.h be added to musl? Will <sys/errno.h> alias be
> added to musl? Or I should report issue to libedit developer
> instead?
So far, support for wrong-location headers like <sys/errno.h> is
inconsistent; we support some of them but not others. The long-term
plan is to support all of the ones glibc does, but with #warning in
the wrong version of it. I think you should report the bug upstream
and try to get it fixed. It's definitely been more than 20 years since
there was a system where <sys/errno.h> was needed, and I doubt such
systems existed even back then.
As for <sys/ttydefaults.h>, I'll look at it. I'm not familiar with
what it's for. But it seems unused...
Rich
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libedit build, missing sys/ttydefaults.h & sys/errno.h
2012-12-13 18:58 ` Rich Felker
@ 2012-12-13 20:15 ` ojab
0 siblings, 0 replies; 5+ messages in thread
From: ojab @ 2012-12-13 20:15 UTC (permalink / raw)
To: musl
On 13.12.2012 22:58, Rich Felker wrote:
> On Thu, Dec 13, 2012 at 02:29:28PM +0400, ojab wrote:
>> >Hi list,
>> >
>> >libedit-3.0 build fails with
>> >
>>> > >editline/readline.h:79:29: fatal error: sys/ttydefaults.h: No such file or directory
>>> > >fileman.c:14:23: fatal error: sys/errno.h: No such file or directory
>> >
>> >After adding sys/ttydefaults.h from NetBSD [1] (cleaned up version
>> >in the attached file) and replacing <sys/errno.h> with <errno.h> it
>> >builds/works fine.
>> >As far as I can see the same issues was reported about sysvinit [2].
>> >
>> >Can sys/ttydefaults.h be added to musl? Will <sys/errno.h> alias be
>> >added to musl? Or I should report issue to libedit developer
>> >instead?
> So far, support for wrong-location headers like <sys/errno.h> is
> inconsistent; we support some of them but not others. The long-term
> plan is to support all of the ones glibc does, but with #warning in
> the wrong version of it. I think you should report the bug upstream
> and try to get it fixed. It's definitely been more than 20 years since
> there was a system where <sys/errno.h> was needed, and I doubt such
> systems existed even back then.
>
> As for <sys/ttydefaults.h>, I'll look at it. I'm not familiar with
> what it's for. But it seems unused...
>
> Rich
>
Just FIY: issue with <errno.h> reported and already fixed in libedit.
//wbr ojab
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libedit build, missing sys/ttydefaults.h & sys/errno.h
2012-12-13 10:29 libedit build, missing sys/ttydefaults.h & sys/errno.h ojab
2012-12-13 17:25 ` John Spencer
2012-12-13 18:58 ` Rich Felker
@ 2012-12-13 20:40 ` John Spencer
2 siblings, 0 replies; 5+ messages in thread
From: John Spencer @ 2012-12-13 20:40 UTC (permalink / raw)
To: musl
On 12/13/2012 11:29 AM, ojab wrote:
>
> libedit-3.0 build fails with
>
>> editline/readline.h:79:29: fatal error: sys/ttydefaults.h: No such
>> file or directory
>> fileman.c:14:23: fatal error: sys/errno.h: No such file or directory
>
> After adding sys/ttydefaults.h from NetBSD [1] (cleaned up version in
> the attached file)
btw additionally to the superfluous KERNEL part, there are a lot of
missing declarations
e.g. BRKINT which is used by the TTYDEF_IFLAG macro.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-13 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13 10:29 libedit build, missing sys/ttydefaults.h & sys/errno.h ojab
2012-12-13 17:25 ` John Spencer
2012-12-13 18:58 ` Rich Felker
2012-12-13 20:15 ` ojab
2012-12-13 20:40 ` John Spencer
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).