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: Wed, 16 Oct 2013 05:34:38 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

This is fixed. It will show up in the git repo shortly.

Thanks for the report.

Arnold

> 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



reply via email to

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