Cnews ported to V/AT?

Jay "you ignorant splut!" Maynard jay at splut.conmicro.com
Sun Feb 11 09:15:12 AEST 1990


I went looking, and found (again) what the problem in making C news on
System V/AT was. The problem comes because, in large model only, the
nnfree() and nnafree() macros give the compiler indigestion. I had to do
the following, wherever it appeared (this example is from
libsmall/sys.slow.c):

/*
 * Free current sys entry & associated memory.  Zero currsys too.
 */
STATIC void
freecurrsys()
{
	if (currsys != NULL) {
/*		nnfree(&currsys->sy_name);
		nnfree(&currsys->sy_excl);
		nnfree(&currsys->sy_ngs);
		nnfree(&currsys->sy_distr);
		nnfree(&currsys->sy_cmd);
		nnafree(&currsys);
*/
		if (currsys->sy_name != 0) free(currsys->sy_name);
		if (currsys->sy_excl != 0) free(currsys->sy_excl);
		if (currsys->sy_ngs != 0) free(currsys->sy_ngs);
		if (currsys->sy_distr != 0) free(currsys->sy_distr);
		if (currsys->sy_cmd != 0) free(currsys->sy_cmd);
		free(currsys);
		currsys = 0;
	}
}

Expanding the macro by hand resolves the problem. Analogous changes need
to be made wherever nnfree() and nnafree() are used.

-- 
Jay Maynard, EMT-P, K5ZC, PP-ASEL   | Never ascribe to malice that which can
jay at splut.conmicro.com       (eieio)| adequately be explained by stupidity.
{attctc,bellcore}!texbell!splut!jay +----------------------------------------
                             Free the DC-10!



More information about the Comp.unix.microport mailing list