Index: libcfa/src/bits/random.hfa
===================================================================
--- libcfa/src/bits/random.hfa	(revision 8a3d5e7b4938c05c62072d5842a42552fee98198)
+++ libcfa/src/bits/random.hfa	(revision 258aaab8f90625381d932c828e7ad0101b54997e)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jan 14 07:18:11 2022
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Dec  1 11:52:08 2022
-// Update Count     : 115
+// Last Modified On : Mon Dec  5 13:13:14 2022
+// Update Count     : 128
 // 
 
@@ -30,9 +30,9 @@
 #define XORSHIFT_13_7_17
 #define XORSHIFT_6_21_7
-//#define XOSHIRO256PP
-//#define XOSHIRO128PP
 #endif // __x86_64__
 
-// C/CFA PRNG name and random-state.
+// Define C/CFA PRNG name and random-state.
+
+// SKULLDUGGERY: typedefs name struct and typedef with the same name to deal with CFA typedef numbering problem.
 
 #ifdef LEHMER64
@@ -53,12 +53,18 @@
 #ifdef XOSHIRO256PP
 #define PRNG_NAME_64 xoshiro256pp
-#define PRNG_STATE_64_T struct GLUE(PRNG_NAME_64,_t)
-PRNG_STATE_64_T { uint64_t s[4]; };
+#define PRNG_STATE_64_T GLUE(PRNG_NAME_64,_t)
+typedef struct PRNG_STATE_64_T { uint64_t s[4]; } PRNG_STATE_64_T;
 #endif // XOSHIRO256PP
 
 #ifdef XOSHIRO128PP
 #define PRNG_NAME_32 xoshiro128pp
-#define PRNG_STATE_32_T struct GLUE(PRNG_NAME_32,_t)
-PRNG_STATE_32_T { uint32_t s[4]; };
+#define PRNG_STATE_32_T GLUE(PRNG_NAME_32,_t)
+typedef struct PRNG_STATE_32_T { uint32_t s[4]; } PRNG_STATE_32_T;
+#endif // XOSHIRO128PP
+
+#ifdef XORWOW
+#define PRNG_NAME_32 xorwow
+#define PRNG_STATE_32_T GLUE(PRNG_NAME_32,_t)
+typedef struct PRNG_STATE_32_T { uint32_t a, b, c, d, counter; } PRNG_STATE_32_T;
 #endif // XOSHIRO128PP
 
@@ -81,4 +87,39 @@
 #ifdef __cforall										// don't include in C code (invoke.h)
 
+// https://prng.di.unimi.it/xoshiro256starstar.c
+//
+// This is xoshiro256++ 1.0, one of our all-purpose, rock-solid generators.  It has excellent (sub-ns) speed, a state
+// (256 bits) that is large enough for any parallel application, and it passes all tests we are aware of.
+//
+// For generating just floating-point numbers, xoshiro256+ is even faster.
+//
+// The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a
+// splitmix64 generator and use its output to fill s.
+
+#ifndef XOSHIRO256PP
+typedef struct xoshiro256pp_t { uint64_t s[4]; } xoshiro256pp_t;
+#endif // ! XOSHIRO256PP
+
+static inline uint64_t xoshiro256pp( xoshiro256pp_t & rs ) with(rs) {
+	inline uint64_t rotl(const uint64_t x, int k) {
+		return (x << k) | (x >> (64 - k));
+	} // rotl
+
+	const uint64_t result = rotl( s[0] + s[3], 23 ) + s[0];
+	const uint64_t t = s[1] << 17;
+
+	s[2] ^= s[0];
+	s[3] ^= s[1];
+	s[1] ^= s[2];
+	s[0] ^= s[3];
+	s[2] ^= t;
+	s[3] = rotl( s[3], 45 );
+	return result;
+} // xoshiro256pp
+
+static inline void xoshiro256pp_set_seed( xoshiro256pp_t & state,  uint64_t seed ) {
+	state = (xoshiro256pp_t){ {seed, seed, seed, seed} };
+} // xoshiro256pp_set_seed
+
 // https://prng.di.unimi.it/xoshiro128plusplus.c
 //
@@ -91,5 +132,5 @@
 
 #ifndef XOSHIRO128PP
-struct xoshiro128pp_t { uint32_t s[4]; };
+typedef struct xoshiro128pp_t { uint32_t s[4]; } xoshiro128pp_t;
 #endif // ! XOSHIRO128PP
 
@@ -97,5 +138,5 @@
 	inline uint32_t rotl( const uint32_t x, int k ) {
 		return (x << k) | (x >> (32 - k));
-	}
+	} // rotl
 
 	const uint32_t result = rotl( s[0] + s[3], 7 ) + s[0];
@@ -109,42 +150,9 @@
 	s[3] = rotl( s[3], 11 );
 	return result;
-}
+} // xoshiro128pp
 
 static inline void xoshiro128pp_set_seed( xoshiro128pp_t & state, uint32_t seed ) {
 	state = (xoshiro128pp_t){ {seed, seed, seed, seed} };
 } // xoshiro128pp_set_seed
-
-// This is xoshiro256++ 1.0, one of our all-purpose, rock-solid generators.  It has excellent (sub-ns) speed, a state
-// (256 bits) that is large enough for any parallel application, and it passes all tests we are aware of.
-//
-// For generating just floating-point numbers, xoshiro256+ is even faster.
-//
-// The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a
-// splitmix64 generator and use its output to fill s.
-
-#ifndef XOSHIRO256PP
-struct xoshiro256pp_t { uint64_t s[4]; };
-#endif // ! XOSHIRO256PP
-
-static inline uint64_t xoshiro256pp( xoshiro256pp_t & rs ) with(rs) {
-	inline uint64_t rotl(const uint64_t x, int k) {
-		return (x << k) | (x >> (64 - k));
-	}
-
-	const uint64_t result = rotl( s[0] + s[3], 23 ) + s[0];
-	const uint64_t t = s[1] << 17;
-
-	s[2] ^= s[0];
-	s[3] ^= s[1];
-	s[1] ^= s[2];
-	s[0] ^= s[3];
-	s[2] ^= t;
-	s[3] = rotl( s[3], 45 );
-	return result;
-}
-
-static inline void xoshiro256pp_set_seed( xoshiro256pp_t & state,  uint64_t seed ) {
-	state = (xoshiro256pp_t){ {seed, seed, seed, seed} };
-} // xoshiro256pp_set_seed
 
 #ifdef __SIZEOF_INT128__
@@ -185,11 +193,15 @@
 	state ^= state << 17;
 	return ret;
-}
+} // xorshift_13_7_17
 
 static inline void xorshift_13_7_17_set_seed( uint64_t & state, uint32_t seed ) {
 	state = seed;
-}
-
-//--------------------------------------------------
+} // xorshift_13_7_17_set_seed
+
+//--------------------------------------------------
+// Marsaglia shift-XOR PRNG with thread-local state
+// Period is 4G-1
+// 0 is absorbing and must be avoided
+// Low-order bits are not particularly random
 static inline uint32_t xorshift_6_21_7( uint32_t & state ) {
 	uint32_t ret = state;
@@ -202,14 +214,13 @@
 static inline void xorshift_6_21_7_set_seed( uint32_t & state, uint32_t seed ) {
 	state = seed;
-}
-
-//--------------------------------------------------
-typedef struct {
-	uint32_t a, b, c, d;
-	uint32_t counter;
-} xorwow__state_t;
-
-// The state array must be initialized to not be all zero in the first four words.
-static inline uint32_t xorwow( xorwow__state_t & state ) {
+} // xorshift_6_21_7_set_seed
+
+//--------------------------------------------------
+// The state array must be initialized to non-zero in the first four words.
+#ifndef XORWOW
+typedef struct xorwow_t { uint32_t a, b, c, d, counter; } xorwow_t;
+#endif // ! XORWOW
+
+static inline uint32_t xorwow( xorwow_t & state ) {
 	// Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs".
 	uint32_t ret = state.a + state.counter;
@@ -228,8 +239,12 @@
 	state.counter += 362437;
 	return ret;
-}
-
+} // xorwow
+
+static inline void xorwow_set_seed( xorwow_t & state, uint32_t seed ) {
+	state = (xorwow_t){ seed, seed, seed, seed, 0 };
+} // xorwow_set_seed
+
+//--------------------------------------------------
 // Used in __tls_rand_fwd
-//--------------------------------------------------
 #define M  (1_l64u << 48_l64u)
 #define A  (25214903917_l64u)
@@ -242,5 +257,5 @@
 	state = (A * state + C) & (M - 1);
 	return state >> D;
-}
+} // LCGBI_fwd
 
 static inline uint32_t LCGBI_bck( uint64_t & state ) {
@@ -248,5 +263,5 @@
 	state = AI * (state - C) & (M - 1);
 	return r;
-}
+} // LCGBI_bck
 
 #undef M
Index: libcfa/src/startup.cfa
===================================================================
--- libcfa/src/startup.cfa	(revision 8a3d5e7b4938c05c62072d5842a42552fee98198)
+++ libcfa/src/startup.cfa	(revision 258aaab8f90625381d932c828e7ad0101b54997e)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jul 24 16:21:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Nov 30 18:14:06 2022
-// Update Count     : 68
+// Last Modified On : Mon Dec  5 11:41:58 2022
+// Update Count     : 73
 //
 
@@ -71,4 +71,5 @@
 		__global_random_seed = rdtscl();
 		PRNG_SET_SEED( __global_random_state, __global_random_seed );
+
 		__cfaabi_interpose_startup();
 		__cfaabi_device_startup();
Index: libcfa/src/stdlib.cfa
===================================================================
--- libcfa/src/stdlib.cfa	(revision 8a3d5e7b4938c05c62072d5842a42552fee98198)
+++ libcfa/src/stdlib.cfa	(revision 258aaab8f90625381d932c828e7ad0101b54997e)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Dec  3 17:14:13 2022
-// Update Count     : 623
+// Last Modified On : Mon Dec  5 11:59:03 2022
+// Update Count     : 628
 //
 
@@ -233,5 +233,6 @@
 	PRNG_SET_SEED( __global_random_state, seed );
 	PRNG_NAME( __global_random_state );
-}
+} // set_seed
+
 size_t get_seed() { return __global_random_seed; }
 size_t prng( void ) { return PRNG_NAME( __global_random_state ); } // [0,UINT_MAX]
