🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.groff.bug
Article #102

putenv() on BSD 4.3 systems

#102
From: Calvin Clark
Date: Tue, 26 Jan 1993 01:53
84 lines
3199 bytes
If you use GCC 2 on a BSD 4.3 system to build groff, putenv() is
declared in the <stdlib.h> provided with the g++ include files, but it
is not available in the C library.  The groff configuration should check
for the existence of putenv() and provide it in libgroff.a if it is not
in libc.  The following patch provides the necessary configuration
changes, except for libgroff/putenv.c itself, which I have not included
because I don't know what you want to use.  There are, however, several
options: 1) roll your own, 2) use the putenv.c from the BSD Network 2
release, or 3) snatch and modify the one from the GNU libc (not
necessarily in that order of preference.)

(BTW: If you have a working autoconf, not all the changes in this patch
are needed---it should be obvious what to do.)

-Calvin
--
Calvin Clark <ckclark@mit.edu>

*** 1.1	1993/01/25 08:08:27
--- configure.in	1993/01/25 08:08:57
***************
*** 26,32 ****
  AC_VFORK
  saved_libs="$LIBS"
  LIBS="$LIBS -lm"
! AC_REPLACE_FUNCS(fmod strtol getcwd strerror)
  LIBS="$saved_libs"
  AC_HAVE_FUNCS(rename mkstemp)
  GROFF_SYS_SIGLIST
--- 26,32 ----
  AC_VFORK
  saved_libs="$LIBS"
  LIBS="$LIBS -lm"
! AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv)
  LIBS="$saved_libs"
  AC_HAVE_FUNCS(rename mkstemp)
  GROFF_SYS_SIGLIST
*** 1.1	1993/01/25 08:55:43
--- configure	1993/01/25 09:12:30
***************
*** 605,611 ****
  rm -f conftest*
  saved_libs="$LIBS"
  LIBS="$LIBS -lm"
! for func in fmod strtol getcwd strerror
  do
  echo checking for ${func}
  echo "
--- 605,611 ----
  rm -f conftest*
  saved_libs="$LIBS"
  LIBS="$LIBS -lm"
! for func in fmod strtol getcwd strerror putenv
  do
  echo checking for ${func}
  echo "
*** 1.1	1993/01/25 07:26:03
--- libgroff/Makefile.sub	1993/01/25 09:01:58
***************
*** 7,13 ****
    fatal.cc filename.cc font.cc fontfile.cc lf.cc lineno.cc macropath.cc \
    nametoindex.cc new.cc prime.cc progname.cc ptable.cc searchpath.cc \
    string.cc strsave.cc tmpfile.cc version.cc illegal.cc
! CSRCS=fmod.c getcwd.c iftoa.c itoa.c matherr.c strerror.c strtol.c
  GENSRCS=version.cc
  
  version.cc: $(srcdir)/../VERSION
--- 7,13 ----
    fatal.cc filename.cc font.cc fontfile.cc lf.cc lineno.cc macropath.cc \
    nametoindex.cc new.cc prime.cc progname.cc ptable.cc searchpath.cc \
    string.cc strsave.cc tmpfile.cc version.cc illegal.cc
! CSRCS=fmod.c getcwd.c iftoa.c itoa.c matherr.c strerror.c strtol.c putenv.c
  GENSRCS=version.cc
  
  version.cc: $(srcdir)/../VERSION
*** 1.1	1993/01/25 07:25:11
--- libgroff/Makefile.dep	1993/01/25 09:01:58
***************
*** 36,38 ****
--- 36,39 ----
  matherr.o : matherr.c
  strerror.o : strerror.c
  strtol.o : strtol.c
+ putenv.o : putenv.c
Technical Details
Message-ID: <9301250933.AA14044@diminished.MIT.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mit.edu!ckclark

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mit.edu!ckclark
From: ckclark@mit.edu (Calvin Clark)
Newsgroups: gnu.groff.bug
Subject: putenv() on BSD 4.3 systems
Date: 25 Jan 1993 20:53:29 -0500
Organization: GNUs Not Usenet
Lines: 85
Sender: daemon@cis.ohio-state.edu
Approved: bug-groff@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9301250933.AA14044@diminished.MIT.EDU>
Reply-To: ckclark@mit.edu