Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/random.cc8
-rw-r--r--winsup/cygwin/release/3.4.103
2 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/random.cc b/winsup/cygwin/random.cc
index 51f5a6e96..ddba6fb94 100644
--- a/winsup/cygwin/random.cc
+++ b/winsup/cygwin/random.cc
@@ -293,6 +293,8 @@ srandom(unsigned x)
__random_unlock();
}
+EXPORT_ALIAS (srandom, srand)
+
/*
* initstate:
*
@@ -481,4 +483,10 @@ random()
return (r);
}
+int
+rand()
+{
+ return ((int) random());
+}
+
}
diff --git a/winsup/cygwin/release/3.4.10 b/winsup/cygwin/release/3.4.10
index 3bbbca381..758a6e071 100644
--- a/winsup/cygwin/release/3.4.10
+++ b/winsup/cygwin/release/3.4.10
@@ -15,3 +15,6 @@ Bug Fixes
- Updates to profiler and gmondump: error display mechanics, buffer sizing,
and output formatting.
+
+- Align behaviour of rand(3) to ISO C.
+ Adresses: https://cygwin.com/pipermail/cygwin/2023-November/254735.html