jantypas@csvax.ucsd.edu (03/25/86)
Does absolutely ANYONE know the answer to this?!??!?!?! We are running SCO Xenix on a PC AT. We are porting vnews to it. However, when code for pathinit() exits (or just as it is about to) it loses a return address or two and dies. We have tried more models than most agensies. Help?!?! John Antypas - Systens N Software uucp: ...!sdcsvax!sdchem!wolf!jantypas arpa: sdchem!wolf!jantypas@sdcsvax.ucsd.edu
baron@transys.UUCP (03/28/86)
> Does absolutely ANYONE know the answer to this?!??!?!?! > > We are running SCO Xenix on a PC AT. We are porting vnews to it. However, > when code for pathinit() exits (or just as it is about to) it loses a > return address or two and dies. We have tried more models than > most agensies. Help?!?! > > > John Antypas - Systens N Software > > uucp: ...!sdcsvax!sdchem!wolf!jantypas > arpa: sdchem!wolf!jantypas@sdcsvax.ucsd.edu Yes I do know what happens there, as I ported the netnews stuff to SCO xenix about three weeks ago. The problem with pathinit: REPLACE THE ^^*^*%&^%*&^% uname() call!!!. Uname fails for some damn reason when compiled middle,large or huge model, and when it does it pops a couple of extra levels off the stack, returning you to the previous caller. This sets up an infinitely recursive call to the pathinit() code. REPLACE the uname() call in every program. It will fail on all of them, since you must compile large model to get enough memory out of the malloc() calls. Check all the strcpy's VERY carefully. Some of those pointers are Un-initialized and will give you memory faults. I personally changed all the strcpy calls to AllocCpy(),just to make sure. That is about all you have to do, except for replacing the ndir.c and ndir.h file declarations. (Use the ones that come with the system). This will get you started. BTW inews,(rnews), readnews, vnews and checknews all use the pathinit code. Only readnews will run with the code unmodified. If you would like my copy of the source ( modified to run on xenix V from SCO) email to me and I will try to send it to you. Same goes for everybody. -- **************************************************** * These are my own opinions, not those of * * my employer (self), or any one * * connected with the company (mine) * **************************************************** Joe Portman (SA) USPS: TransSystems Incorporated AT&T: 1-206-453-5560 1280 116th Avenue NE Bellevue WA 98009 /-- uw-beaver!\ /-- camco! \ ... ihnp4! --< >-tikal!< >-- transys!root \-- microsoft!/ \-- teldata!/
baron@transys.UUCP (03/28/86)
> Does absolutely ANYONE know the answer to this?!??!?!?! > > We are running SCO Xenix on a PC AT. We are porting vnews to it. However, > when code for pathinit() exits (or just as it is about to) it loses a > return address or two and dies. We have tried more models than > most agensies. Help?!?! In my previous article, I forgot to mention that the getuser() routine also fails due to some un-initialized pointers. It apparenly checks the environment for some variables, and if not found tries to do a strcpy() into a null pointer. I beleive the variable is USERNAME or some such. I can't remember off hand ( there was a lot of code ). Basically, make the previously mentioned fixes to pathinit.c, then compile the program being tested. Here are the definitions used in the Makefile. I have found these to work very well. > # @(#)Makefile.usg 2.27 9/17/84 > # Makefile for System III, System V and other USG based systems > > # definitions > > NEWSUSR = news > NEWSGRP = news > # This is either usg or v7 > OSTYPE= usg > # HOME is the user name whose home dir has all the news stuff in it. > HOME = > # Use the -DHOME line if you want dynamic lookup in /etc/passwd > #HOMENAME= -DHOME=\"$(HOME)\" > HOMENAME= > SPOOLDIR = /news > BATCHDIR = /usr/spool/batch > LIBDIR = /usr/lib/news > BINDIR = /usr/bin > UUXFLAGS = -r > > DEBUG = > IBMFLAGS = -M2le -i -K -F 5000 -DDBM > > DEFS = -DRNEWS=\"$(BINDIR)/rnews\" -DSPOOLDIR=\"$(SPOOLDIR)\" \ > -DBATCHDIR=\"$(BATCHDIR)\" -DLIBDIR=\"$(LIBDIR)\" \ > -DBINDIR=\"$(BINDIR)\" -DNEWSUSR=\"$(NEWSUSR)\" \ > -DNEWSGRP=\"$(NEWSGRP)\" > CFLAGS = ${DEBUG} -O $(IBMFLAGS) -DUSG -Dindex=strchr -Drindex=strrchr ${DEFS} > LFLAGS = -s -i $(IBMFLAGS) > LIBS = -ldbm -lx Hope this information helps, -- **************************************************** * These are my own opinions, not those of * * my employer (self), or any one * * connected with the company (mine) * **************************************************** Joe Portman (SA) USPS: TransSystems Incorporated AT&T: 1-206-453-5560 1280 116th Avenue NE Bellevue WA 98009 /-- uw-beaver!\ /-- camco! \ ... ihnp4! --< >-tikal!< >-- transys!root \-- microsoft!/ \-- teldata!/