[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Compiling lynx2-8-3 with openssl-0.9.5a in the cygwin-en

From: Doug Kaufman
Subject: Re: lynx-dev Compiling lynx2-8-3 with openssl-0.9.5a in the cygwin-environment
Date: Wed, 11 Oct 2000 07:56:57 -0700 (PDT)

On Mon, 9 Oct 2000, Fiber McGee wrote:

> The message below from "Thomas E. Dickey"
> <address@hidden> was forwarded by the
> list moderator.
> >On Mon, 9 Oct 2000, Bob Izenberg wrote:
> >
> > > The message below from address@hidden
> > > (martin austen) was forwarded
> > > by the list moderator.
> > >
> > > >cygwin, i coped with the LD-process (there are no s(l)rand48 and -by the
> > > >way- no _lrand or srand-symbols in my openssl-libraries) finally by
> >
> >...nor in your math library?  those are fairly standard functions.

A grep throught the cygwin library files confirms that srand48 and
lrand48 are not present. A search through the cygwin mailing list
archives shows several references to the problem. Mumit Khan (2 March
1999) states that these are neither ANSI nor POSIX. He suggested
getting a free implementation from another distribution (such as
glibc2). John Huddleston suggested on 18 Feb 2000, that the following
be used when using cygwin with lrand48 and srand48:

#ifdef __CYGWIN__
#define lrand48() rand()/32767.0
#define srand48(sv) (srand((unsigned)(sv)))
extern long lrand48();
extern void srand48();

Takeshi Yamada suggested on 2 March 1999 that  you could use code from 

I used that code to successfully compile dev.10 with SSL support under
cygwin, but unfortunately this file has no information that I see
regarding the author or copyright status. Unless someone recognizes
where this code comes from or we get clarification of copyright
status, this will not be a good solution.

The srand48 and lrand48 code from glibc does not extract and compile
easily as independent snippets. I presume that to use this under
cygwin I will need to configure glibc, then make the parts that I
need. I'll try to do this to confirm the glibc code as able to work
with lynx under cygwin.

Pseudo-random number generation is not a subject with which I am
familiar. Does anyone have any suggestions on the simplest way to
make the SSL code portable to platforms such as cygwin which don't
have srand48 and lrand48. Is John Huddleston's suggested define above
acceptable, or do we need to install portable functions (such as the
code from glibc)?


Doug Kaufman
Internet: address@hidden

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]