bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash 4 and ECHOCTL


From: Joachim Schmitz
Subject: Bash 4 and ECHOCTL
Date: Thu, 19 Nov 2009 18:32:49 +0100

Hi folks

When trying to port bash 4 (actually 4.0.35) to NonStop Kernel, I stumbled accross lib/readline/rltty.c to use ECHOCTL, which that platform doesn't seem to provide.

My fix:

diff -u ./lib/readline/rltty.c.orig ./lib/readline/rltty.c

--- ./lib/readline/rltty.c.orig 2008-10-05 04:39:24.000000000 +0100

+++ ./lib/readline/rltty.c 2009-11-17 17:24:59.000000000 +0000

@@ -517,7 +517,11 @@

TIOTYPE oldtio, *tiop;

{

_rl_echoing_p = (oldtio.c_lflag & ECHO);

+#ifdef __TANDEM /* doesn't have ECHOCTL ?!? */

+ _rl_echoctl = oldtio.c_lflag;

+#else

_rl_echoctl = (oldtio.c_lflag & ECHOCTL);

+#endif

tiop->c_lflag &= ~(ICANON | ECHO);

?

But I guess it should rather be '#ifdef HAVE_ECHOCTL' and a corresponding chek in configure?

BTW: I also had to extend support/config.sub to recognize my platform:

diff -u ./support/config.sub.orig ./support/config.sub

--- ./support/config.sub.orig 2009-01-04 19:41:43.000000000 +0000

+++ ./support/config.sub 2009-11-17 11:21:36.000000000 +0000

@@ -807,6 +807,9 @@

np1)

basic_machine=np1-gould

;;

+ nse-tandem)

+ basic_machine=nse-tandem

+ ;;

nsr-tandem)

basic_machine=nsr-tandem

;;

?

There were some other oddities too, lib/sh/fpurge.c didn't compile, my mean hack was:

diff -u ./lib/sh/fpurge.c.orig ./lib/sh/fpurge.c

--- ./lib/sh/fpurge.c.orig 2008-08-12 16:52:35.000000000 +0100

+++ ./lib/sh/fpurge.c 2009-11-17 13:59:02.000000000 +0000

@@ -115,6 +115,7 @@

fp->__bufpos = fp->__bufread;

# endif

return 0;

+# elif defined __TANDEM /* TODO */

# else

#error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."

# endif

So I just do without (?) and that seems to work just fine.

In siglist.c the compiler complained bitterly about having to convert the reseult of _() into a char * (sometimes comming from int, somtimes coming from const char *) My nasty workaround:

diff -u ./siglist.c.orig ./siglist.c

--- ./siglist.c.orig 2009-01-04 19:32:41.000000000 +0000

+++ ./siglist.c 2009-11-17 13:24:16.000000000 +0000

@@ -34,6 +34,9 @@

#include "xmalloc.h"

+#ifdef __TANDEM /* picky compiler... or mean hack? */

+#define _(msgid) ((char *)gettext(msgid))

+#endif

char *sys_siglist[NSIG];

void

?

With these changed I got it to compile cleanly and the resuling bash seems to work just fine.

Any idea how to properly fix those issues?

Bye, Jojo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]