bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Detection of libreadline fails on Solaris for gawk 4.1.0


From: Aharon Robbins
Subject: Re: [bug-gawk] Detection of libreadline fails on Solaris for gawk 4.1.0
Date: Thu, 10 Oct 2013 11:23:15 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.  Re this:

> From: Dagobert Michelsen <address@hidden>
> Date: Fri, 4 Oct 2013 14:10:14 +0200
> To: address@hidden
> Subject: [bug-gawk] Detection of libreadline fails on Solaris for gawk 4.1.0
>
> Hi,
>
> the detection of libreadline is failing for gawk 4.1.0 on Solaris 10 Sparc
> with Sun Studio 12. The detection code in m4/readline.m4 says:
>
> >         fd = open("/dev/null", 2);      /* should get fd 0 */
> >         dup(fd);
> >         line = readline("giveittome> ");
> > 
> >         printf("got <%s>\n", line);
>
> However, readline(3) indicates that the result of deadline() is NULL if
> EOF is encountered:
>
> > "If EOF is encountered while reading a line, and the line is empty, NULL is 
> > returned"
>
> The resulting is a coredumping test as printf does not print NULL on
> zero pointers to strings. I suggest something like
>
>   printf("got <%s>\n", line ? line : "(NULL)");
>
>
> Best regards
>
>   -- Dago

I don't have easy access to this environment.

Have you tried this and verified that it works?  The easiest way
would be to modify the code buried down in configure and run it
to see it succeeds.

Can you do so and let me know?  If it works I'll make the
change.

Much thanks,

Arnold



reply via email to

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