tUse #define to move rand and srand to p9rand and p9srand. - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 623979856321b997ebd32386eb2fbb3302aa33ad
(DIR) parent 7ee1ac96893a000763b937ed03a51bba61acedbe
(HTM) Author: wkj <devnull@localhost>
Date: Wed, 29 Dec 2004 01:33:33 +0000
Use #define to move rand and srand to p9rand and p9srand.
Diffstat:
M include/libc.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/include/libc.h b/include/libc.h
t@@ -234,11 +234,15 @@ extern int quoterunestrfmt(Fmt*);
extern int needsrcquote(int);
/*
- * random number (in <stdlib.h>)
- *
+ * random number (also in <stdlib.h>)
+ */
+#ifndef NOPLAN9DEFINES
+#define rand p9rand
+#define srand p9srand
+#endif
+
extern void srand(long);
extern int rand(void);
- */
extern int nrand(int);
extern long lrand(void);
extern long lnrand(long);