This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] epiphany/machine/stdlib.h: Disable epiphany unique random wrappers for RTEMS


On Mar 20 15:20, Yaakov Selkowitz wrote:
> On 2016-03-20 15:17, Joel Sherrill wrote:
> >On 03/20/2016 02:54 PM, Yaakov Selkowitz wrote:
> >>On 2016-03-20 11:02, Joel Sherrill wrote:
> >>>---
> >>>   newlib/libc/machine/epiphany/machine/stdlib.h | 2 ++
> >>>   1 file changed, 2 insertions(+)
> >>Linux rand(3) states: "The versions of rand() and srand() in the Linux C
> >>Library use the same random number generator as random(3) and
> >>srandom(3)".  Does it make any sense to generalize this code for all
> >>targets instead (letting Cygwin replace it with its own, as before)?
> >>
> >>BTW, does RTEMS not have its own<machine/stdlib.h>?
> >
> >No. And apparently  no OS has  one. Only two targets do.
> 
> Cygwin does (winsup/cygwin/include/machine/stdlib.h).
> 
> >I think the powerpc looks like they are extensions for Altivec
> >and SPE so not providing standard methods.
> >
> >If everyone is OK with generalizing srandom(), that would be Ok
> >by me. This was just an odd case where one target provides a
> >standard method and requires special magic on our side. I would
> >rather APIs be the same on all targets.
> 
> Agreed.  There's nothing target-specific about epiphany's header, so the
> question is if that code is correct, then let's generalize it.

ACK.  They should probably be defined non-inlined in their own module to
allow overriding.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]