bug-gnu-utils
[Top][All Lists]
Advanced

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

RE: gawk latest 3.1.3 build on SunOS 4.1.4


From: Marchant, Stephen
Subject: RE: gawk latest 3.1.3 build on SunOS 4.1.4
Date: Tue, 1 Jun 2004 15:24:49 -0400

Hi Aharon!
It's been awhile since I last emailed you regarding the gawk 3.1.3 build on 
SunOS since I haven't really made any progress since my last report of failing 
a few of the Makefile 'check' scripts.

Specifically, I've found that the 'substr.awk' script function fails, although 
it is simply using a few fixed substr calls.

>> more substr.awk
-------------------------------------------------------------------------------
BEGIN {
        x = "A"
        printf("%-39s\n", substr(x,1,39))
        print substr("abcdef", 0, 2)
        print substr("abcdef", 2.3, 2)
        print substr("abcdef", -1, 2)
        print substr("abcdef", 1, 0)
        print substr("abcdef", 1, -3)
        print substr("abcdef", 1, 2.3)
        print substr("", 1, 2)
        print substr("abcdef", 5, 5)
        print substr("abcdef", 7, 2)
        exit (0)
}
-------------------------------------------------------------------------------

Here's the output:

>> ../gawk -f substr.awk
                                       
gawk: substr.awk:4: fatal: print to "standard output" failed (reason unknown)
EXIT CODE: 2

I haven't 'debugged' this failure, but undoubtedly this function impairs full 
functionality of other 'check' awk scripts that rely on the operation. It is 
apparent however that using the substr function with a third parameter is 
causing the problem. Since the failure message doesn't say much else, I'm not 
sure where to go from here...

Regards,
-- Steve

Stephen Marchant - Hardware Engineer
_________________________________
COGNEX Corp
http://www.cognex.com
Phone: 508-650-3258
Fax: 508-650-3335





-----Original Message-----
From: Aharon Robbins [mailto:address@hidden
Sent: Tuesday, June 01, 2004 11:44 AM
To: Marchant, Stephen
Subject: Re: gawk latest 3.1.3 build on SunOS 4.1.4


Greetings. I am going through some old mail.

> From: "Marchant, Stephen" <address@hidden>
> To: address@hidden, address@hidden, address@hidden
> Cc: address@hidden
> Subject: gawk latest 3.1.3 build on SunOS 4.1.4
> Date: Thu, 30 Oct 2003 13:11:42 -0500
>
> Hi,
> I've been working with the gawk latest "released" 3.1.3 sources and trying
> to build on my SunOS 4.1.4 machine and came across a few problems.
>
> uname -a "SunOS sparcstation 4.1.4 2 sun4c"
> gcc -v "gcc version 2.7-97r1"
>
> The first (obvious) problem is that there is no "memmove" function, so gcc
> cannot link the final program unless you define "memmove" as "bcopy" with
> the args switched (dest,source,len)->(source,dest,len).
> I don't know if this is taken care of by "standard" patches to the system
> (include,etc) files, or not, but I think it could be easy to add the
> appropriate check in the "configure" script so this wouldn't be a hassle.

This is done.

> The next (not-so-obvious) problem is that realloc doesn't work with NULL
> pointers. This is something that definitely needs a work-around in the gawk
> sources.
> I used the following: (awk.h, regex_internal.h)
>
> regex_internal.h : 
> #define re_realloc(p,t,n) ( (p!=NULL) ? (t *) realloc (p,(n)*sizeof(t)) : (t
> *) calloc(n,sizeof(t)) )
>
> awk.h : 
> #define erealloc(var,ty,x,str)  (void)((var=(var!=NULL)?(ty)realloc((char
> *)var,\
>  
> (MALLOC_ARG_T)(x)):(ty)malloc((MALLOC_ARG_T)(x))) ||\
>                                  (fatal(_("%s: %s: can't allocate %ld bytes
> of memory (%s)"),\
>                                         (str), "var", (long) (x),
> strerror(errno)),0))

I have made these changes. They'll be in 3.1.4.

> After fixing this, I have just now found that about a dozen of the "make
> check" tests fail, so I still have to track these down.

Did you ever get to do this?

I see that you're on my list to get pre-releases, so keep an eye out for one
sometime soon, I hope.

Thanks,

Arnold




reply via email to

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