[comp.windows.x] realloc/xtalk/HPUX7.0/cc/R4 problem

dmartin@cs.iastate.edu (07/05/90)

I just installed R4 with patches 1-12 under HPUX 7.0 (not gcc).  The
core clients seem to work, but there are several contrib clients that
all die with the same error message:

    Error: Cannot perform realloc

For instance: xtalk (Yaser Doleh, Kent State), a pretty darned simple
program, dies right after realizing its widgets while executing
XtOverrideTranslations. If I link with -lmalloc, the message becomes:

    Error: Cannot perform calloc

Can anyone help?


David M. Martin Jr.		  dmartin@atanasoff.cs.iastate.edu
Department of Computer Science    Iowa State University

edwin@praxis.cs.ruu.nl (Edwin Kremer) (07/05/90)

In <2155@dino.cs.iastate.edu> dmartin@cs.iastate.edu writes:

   | I just installed R4 with patches 1-12 under HPUX 7.0 (not gcc).  The
   | core clients seem to work, but there are several contrib clients that
   | all die with the same error message:

   |     Error: Cannot perform realloc

When I installed X11R4 on HP-UX 7.0 the latest fix available was #5 so
things might have changed by now. Anyway, there was a problem in the
"hp.cf" config file: the -DMALLOC_0_RETURNS_NULL should be defined.
Well, I did that and still it didn't work, probably my own stupidity,
but I solved it by putting this at the beginning of the file
"mit/lib/X/Xlibos.h":

	#ifdef hpux
	#	define MALLOC_0_RETURNS_NULL
	#endif hpux

Next I did a 'make World' again, and it's runs great since then...


			good luck,
						--[ Edwin ]--
--
Edwin Kremer (SysAdm), Dept. of Computer Science, Utrecht University
Padualaan 14,   P.O. Box 80.089,  3508 TB  Utrecht,  The Netherlands
Telephone: +31-30-534104  | UUCP: ...!uunet!mcsun!hp4nl!ruuinf!edwin
Telefax  : +31-30-513791  | Email: edwin@cs.ruu.nl    [131.211.80.5]