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 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.

--
Yaakov


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