Changed all the platform-specific ifdefs wrt XP_RANDOM to use HAVE_RANDOM instead.
This commit is contained in:
Родитель
5d311254ff
Коммит
e2165f5ea2
|
@ -150,27 +150,13 @@ XP_END_PROTOS
|
||||||
|
|
||||||
#define XP_BZERO(a,b) memset(a,0,b)
|
#define XP_BZERO(a,b) memset(a,0,b)
|
||||||
|
|
||||||
#ifdef XP_WIN
|
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#endif
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#endif
|
|
||||||
#ifdef XP_UNIX
|
|
||||||
#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
|
#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
|
||||||
#if defined(UNIXWARE) || defined(_INCLUDE_HPUX_SOURCE) || defined(SOLARIS) || defined(SNI) || defined(NCR)
|
#ifdef HAVE_RANDOM
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#else
|
|
||||||
#define XP_RANDOM random
|
#define XP_RANDOM random
|
||||||
#define XP_SRANDOM(seed) srandom((seed))
|
#define XP_SRANDOM(seed) srandom((seed))
|
||||||
#endif
|
#else
|
||||||
|
#define XP_RANDOM rand
|
||||||
|
#define XP_SRANDOM(seed) srand((seed))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -122,23 +122,13 @@
|
||||||
/*
|
/*
|
||||||
Random stuff in a random place
|
Random stuff in a random place
|
||||||
*/
|
*/
|
||||||
#if defined (XP_WIN) || defined (XP_OS2)
|
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#endif
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#endif
|
|
||||||
#ifdef XP_UNIX
|
|
||||||
#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
|
#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
|
||||||
#if defined(UNIXWARE) || defined(_INCLUDE_HPUX_SOURCE) || defined(SOLARIS) || defined(SNI) || defined(NCR)
|
#ifdef HAVE_RANDOM
|
||||||
#define XP_RANDOM rand
|
|
||||||
#define XP_SRANDOM(seed) srand((seed))
|
|
||||||
#else
|
|
||||||
#define XP_RANDOM random
|
#define XP_RANDOM random
|
||||||
#define XP_SRANDOM(seed) srandom((seed))
|
#define XP_SRANDOM(seed) srandom((seed))
|
||||||
#endif
|
#else
|
||||||
|
#define XP_RANDOM rand
|
||||||
|
#define XP_SRANDOM(seed) srand((seed))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче