🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #2363

Perl 3.0 PL12 -- patches for Xenix/386 2.3

#2363
From: Chip Salzenberg
Date: Wed, 07 Mar 1990 22:35
105 lines
3684 bytes
Compiling Perl 3.0 PL12 on Xenix/386, I fixed four small bugs:

1.  The Xenix C compiler automatically defines "M_XENIX", not "xenix".
    In perl.h, the wrong macro was being tested; as well, the presence
    of <sys/dir.h> was preventing the correct use of <sys/ndir.h>.
    Patch is below.

2.  In stab.h, an ifdef checks for specific variations of readdir() headers.
    It should simply check for READDIR.  Patch is below.

3.  The Configure script runs cc with the -D options after the source file
    when trying to determine the correct time headers to use.  Xenix cc
    requires that the options go before the source file.  Patch is below.

4.  Configure tries to compile a varargs program, but it doesn't include
    <stdio.h> before <varargs.h>, so it fails under Xenix.  Patch is below.

Incidentally, Larry, the regression testing doesn't check readdir().
Perhaps we need an io.readdir module in there.

Index: perl.h
***************
*** 198,215 ****
  #endif
  
! #if defined(I_DIRENT) && !defined(xenix)
  #   include <dirent.h>
  #   define DIRENT dirent
  #else
! #   ifdef I_SYSDIR
! #	ifdef hp9000s500
! #	    include <ndir.h>	/* may be wrong in the future */
! #	else
! #	    include <sys/dir.h>
! #	endif
  #	define DIRENT direct
  #   else
! #	ifdef I_SYSNDIR
! #	    include <sys/ndir.h>
  #	    define DIRENT direct
  #	endif
--- 198,215 ----
  #endif
  
! #if defined(I_DIRENT) && !defined(M_XENIX)
  #   include <dirent.h>
  #   define DIRENT dirent
  #else
! #   ifdef I_SYSNDIR
! #	include <sys/ndir.h>
  #	define DIRENT direct
  #   else
! #	ifdef I_SYSDIR
! #	    ifdef hp9000s500
! #		include <ndir.h>	/* may be wrong in the future */
! #	    else
! #		include <sys/dir.h>
! #	    endif
  #	    define DIRENT direct
  #	endif

Index: stab.h
***************
*** 64,68 ****
      FILE	*ifp;		/* ifp and ofp are normally the same */
      FILE	*ofp;		/* but sockets need separate streams */
! #if defined(I_DIRENT) || defined(I_SYSDIR)
      DIR		*dirp;		/* for opendir, readdir, etc */
  #endif
--- 64,68 ----
      FILE	*ifp;		/* ifp and ofp are normally the same */
      FILE	*ofp;		/* but sockets need separate streams */
! #ifdef READDIR
      DIR		*dirp;		/* for opendir, readdir, etc */
  #endif

Index: Configure
***************
*** 1516,1519 ****
--- 1516,1520 ----
      d_vprintf="$define"
      cat >.ucbsprf.c <<'EOF'
+ #include <stdio.h>
  #include <varargs.h>
  
***************
*** 2010,2016 ****
  		case "$flags" in
  		'') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
! 		    if $cc try.c $ccflags \
  			    $i_time $i_systime $d_systimekernel $s_timeval \
! 			    -o try >/dev/null 2>&1 ; then
  			set X $i_time $i_systime $d_systimekernel $s_timeval
  			shift
--- 2011,2017 ----
  		case "$flags" in
  		'') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
! 		    if $cc $ccflags \
  			    $i_time $i_systime $d_systimekernel $s_timeval \
! 			    try.c -o try >/dev/null 2>&1 ; then
  			set X $i_time $i_systime $d_systimekernel $s_timeval
  			shift
-- 
Chip Salzenberg at ComDev/TCT   <chip%tct@ateng.com>, <uunet!ateng!tct!chip>
          "The Usenet, in a very real sense, does not exist."
Technical Details
Message-ID: <25F58C9C.1415@tct.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!ziggy!usfvax2!tct!chip

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!ziggy!usfvax2!tct!chip
From: chip@tct.uucp (Chip Salzenberg)
Newsgroups: comp.sources.bugs,comp.lang.perl
Subject: Perl 3.0 PL12 -- patches for Xenix/386 2.3
Message-ID: <25F58C9C.1415@tct.uucp>
Date: 7 Mar 90 22:35:07 GMT
Organization: ComDev/TCT, Sarasota, FL
Lines: 105