[gnu.epoch.misc] Epoch dies in getenv on NeXTstation

cap@cs.cmu.edu (Chris Paris) (03/21/91)

I'm trying to bring up Epoch 3.2, patchlevel 2, on a NeXTstation. I got
it to compile with only two changes outside of config.h, but it dumps
core on the first call to getenv. I presume that the emacs crt0.c isn't 
setting up the environment correctly. It looks good when I look through
it with gdb. When I define MAINTAIN_ENVIRONMENT, the environment code in
emacs itself (i.e., calls to egetenv) work correctly, but the system
getenv is called in time(3).

In NeXTOS 2.0, there is no way (that I know of) to redefine a function
that is in the standard library. Otherwise I could simply rely on the
emacs getenv stuff, since it seems to work.

The real solution is to figure out just what the environment is supposed
to look like to NeXT's getenv. Hint: if I run a Sun 3 binary through the
conversion program atom(1), the resultant binary executes correctly on a
NeXT. This indicates that the operating system is supplying the
environment in the standard format.

Another problem I had in the compilation is that some library function
wants symbols _NXArgc and _NXArgv. I have no idea what these are, but I
defined them and set them equal to argc and argv in crt0.c.

Any clues on these issues would be much appreciated.

Chris Paris
cap@cs.cmu.edu

spa@fct.unl.pt (Salvador Pinto Abreu) (03/26/91)

In article <1991Mar21.015356.857@cs.cmu.edu>,
 cap@cs.cmu.edu (Chris Paris) writes:
 [...]
   In NeXTOS 2.0, there is no way (that I know of) to redefine a function
   that is in the standard library. Otherwise I could simply rely on the
   emacs getenv stuff, since it seems to work.
 [...]

Try linking with /lib/libsys_p.a. It worked for bash...
--
-- Salvador Pinto Abreu		<spa@fct.unl.pt> or <mcsun!unl!spa>
				Universidade Nova de Lisboa, PORTUGAL

kaplan@marula.cs.uiuc.edu (Simon Kaplan) (03/27/91)

In article <SPA.91Mar26121443@alfa.fct.unl.pt> spa@fct.unl.pt (Salvador Pinto Abreu) writes:

   In article <1991Mar21.015356.857@cs.cmu.edu>,
    cap@cs.cmu.edu (Chris Paris) writes:
    [...]
      In NeXTOS 2.0, there is no way (that I know of) to redefine a function
      that is in the standard library. Otherwise I could simply rely on the
      emacs getenv stuff, since it seems to work.
    [...]

   Try linking with /lib/libsys_p.a. It worked for bash...

This is one of several things that needed to be done.  I'm sorry it has
taken me so long to get back to you on this, but I needed to get my NeXT
upgraded to 2.0.  It turns out there are a lot of little things to fix.
Fortunately, I have the source for emacs 18.55 for the next under 2.0
(courtesy of Franz, Inc.'s new lisp distribution for the NeXT), so I could
get the relevent fixes.  I will make up a tar file and put it on
cs.uiuc.edu.  Hopefully tomorrow (Wednesday).

-- Simon
--
Simon Kaplan					kaplan@cs.uiuc.edu 
Department of Computer Science			uiucdcs!kaplan@uunet.uu.net
University of Illinois at Urbana-Champaign	
1304 W. Springfield Ave				phone: +1 217 244 0392
Urbana Illinois 61801, USA			fax:   +1 217 333 3501