Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!mintaka!think.com!spool2.mu.edu!sdd.hp.com!hp-pcd!hpcvlx!harry From: harry@hpcvlx.cv.hp.com (Harry Phinney) Newsgroups: comp.windows.x Subject: Re: Re: X11 on HP-UX 7.0 -- what I fixed in XtRealloc() Message-ID: <100920285@hpcvlx.cv.hp.com> Date: 29 Jan 91 22:36:46 GMT References: <1991Jan28.063829.161@shawn.uucp> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 13 root@shawn.uucp writes: > My guess is that realloc(2) had a subtle change between HP-UX 6.5 and 7.0, > since 1) X11R4 is advertised to compile "off-the-shelf" on 6.5 and > 2) everything else seems just fine on 7.0. It depends on which malloc() package is used. The malloc/realloc in libc.a will return a valid pointer when asked to allocate 0 bytes. The malloc/realloc in libmalloc.a(3x) will return NULL when asked to allocate 0 bytes. If you are linking with libmalloc.a, then you need to define MALLOC_0_RETURNS_NULL in the StandardDefines in the hp.cf file in $(TOP)/config. There's no need to hack the library code. Harry Phinney harry@hp-pcd.cv.hp.com