🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #373

Epoch dies in getenv on NeXTstation

#373
From: Chris Paris
Date: Thu, 21 Mar 1991 01:53
26 lines
1758 bytes
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
Technical Details
Message-ID: <1991Mar21.015356.857@cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!netnews

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!netnews
From: cap@cs.cmu.edu (Chris Paris)
Newsgroups: gnu.epoch.misc,comp.sys.next
Subject: Epoch dies in getenv on NeXTstation
Message-ID: <1991Mar21.015356.857@cs.cmu.edu>
Date: 21 Mar 91 01:53:56 GMT
Sender: netnews@cs.cmu.edu (USENET News Group Software)
Organization: School of Computer Science, Carnegie Mellon
Lines: 26