🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99854

X-compilation with 18.55.2

#99854
From: William Walker
Date: Sat, 21 Apr 1990 17:58
50 lines
1841 bytes
Machines:         hp9000s800 (850, 835, 815)
OS-Version:       hp/ux 3.10, 7.0

Emacs Version:    18.55.2
X Version:        X11r4

Description:
	The compilation of X11's library libX11.a under HP/ux requires
the addition of Berklib to simulate the random() and srandom() calls
using rand() and srand().  Therefore, when compiling emacs, ld found
two random() and srandom() routines during the link.  With X11R4,
defining USG means that random() and srandom() will be in the lib.

Solution:
	In ~emacs/src/config.h

#define X11R4   /* only relevant on USG Systems */

	In ~emacs/src/sysdep.c

#ifdef USG
#ifndef X11R4   /* This is the change for R4  wrwalke */
/*
 *	The BSD random(3) returns numbers in the range of
 *	0 to 2e31 - 1.  The USG rand(3C) returns numbers in the
 *	range of 0 to 2e15 - 1.  This is probably not significant
 *	in this usage.
 */

long
random ()
{
  /* Arrange to return a range centered on zero.  */
  return rand () - (1 << 14);
}

srandom (arg)
     int arg;
{
  srand (arg);
}
#endif /* X11R4 */
#endif /* USG */

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
bill.

prcrs!wrwalke@uunet.uu.net  
wrwalke@prc.com              (alternative after june 1, uunet will still feed)
Technical Details
Message-ID: <9004211954.AA11185@uunet.uu.net>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!prcrs!wrwalke

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,881b90f2ae50ed46,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-04-22 04:54:57 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!prcrs!wrwalke
From: prcrs!wrwalke@UUNET.UU.NET (William Walker)
Newsgroups: gnu.emacs.bug
Subject: X-compilation with 18.55.2
Message-ID: <9004211954.AA11185@uunet.uu.net>
Date: 21 Apr 90 17:58:58 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 50
Posted: Sat Apr 21 18:58:58 1990