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

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

gawk latest 3.1.3 build on SunOS 4.1.4


From: Marchant, Stephen
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.

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))

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.

Thanks.
-- Steve

Stephen Marchant - Hardware Engineer
_________________________________
COGNEX Corp
Phone: 508-650-3258
Fax: 508-650-3321





reply via email to

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