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: Dagobert Michelsen
Subject: Re: [bug-gawk] Detection of libreadline fails on Solaris for gawk 4.1.0
Date: Thu, 10 Oct 2013 11:26:57 +0200

Hi Aharon,

Am 10.10.2013 um 10:23 schrieb Aharon Robbins <address@hidden>:
>> 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.

If you want I can give you access to our build, there are already lots of GNU 
projects
using it to ensure Solaris compatibility:
  http://www.opencsw.org/extend-it/signup/to-upstream-maintainers/

> Have you tried this and verified that it works?

Pathching the respective line in configure directly 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.

I also tried patching m4/readline.m4, but autoreconf -fi fails with

> automake: warnings are treated as errors
> Makefile.am:113: warning: AM_GNU_GETTEXT used but 'po' not in SUBDIRS
> autoreconf: /opt/csw/bin/automake failed with exit status: 1

This may be an easy fix, but my autotools knowledge is limited.


Best regards

  -- Dago


-- 
"You don't become great by trying to be great, you become great by wanting to 
do something,
and then doing it so hard that you become great in the process." - xkcd #896

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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