Commit bc395e7f8d7a9c36f51a44499b3e9fd11c50a5a5
- Diff rendering mode:
- inline
- side by side
stlport/stl/_algo.c
(1 / 1)
|   | |||
| 527 | 527 | ||
| 528 | 528 | template <class _Distance> | |
| 529 | 529 | inline _Distance __random_number(_Distance __n) { | |
| 530 | #ifdef _STLP_NO_DRAND48 | ||
| 530 | #ifndef _STLP_RAND48 | ||
| 531 | 531 | return rand() % __n; | |
| 532 | 532 | #else | |
| 533 | 533 | return lrand48() % __n; |
stlport/stl/config/_gcc.h
(0 / 2)
|   | |||
| 55 | 55 | /* For gcc before version 3 this macro is defined below */ | |
| 56 | 56 | # define _STLP_VENDOR_GLOBAL_CSTD | |
| 57 | 57 | # endif | |
| 58 | # undef _STLP_NO_DRAND48 | ||
| 59 | # define _STLP_NO_DRAND48 | ||
| 60 | 58 | # define _STLP_CALL | |
| 61 | 59 | #endif /* __MINGW32__ */ | |
| 62 | 60 |
stlport/stl/config/_linux.h
(9 / 0)
|   | |||
| 47 | 47 | # define _STLP_VENDOR_GLOBAL_CSTD 1 | |
| 48 | 48 | #endif | |
| 49 | 49 | ||
| 50 | /* At least glibc has ?rand48 family; SVr4, POSIX.1-2001 */ | ||
| 51 | |||
| 52 | /* Note, that 'rand' (alternative to ?rand48) conforming to SVr4, | ||
| 53 | 4.3BSD, C89, C99, POSIX.1-2001. */ | ||
| 54 | |||
| 55 | /* In Linux, under 'rand' R.N.G. not worse then under lrand48, | ||
| 56 | so prefer 'rand' for integer numbers */ | ||
| 57 | |||
| 58 | /* #define _STLP_RAND48 1 */ | ||
| 50 | 59 | ||
| 51 | 60 | #if defined(_PTHREADS) | |
| 52 | 61 | # define _STLP_THREADS |
|   | |||
| 557 | 557 | # define _STLP_SIMPLE_TYPE(T) T | |
| 558 | 558 | #endif | |
| 559 | 559 | ||
| 560 | #ifndef _STLP_RAND48 | ||
| 561 | # define _STLP_NO_DRAND48 | ||
| 562 | #endif | ||
| 563 | |||
| 564 | 560 | /* advanced keywords usage */ | |
| 565 | 561 | #define __C_CAST(__x, __y) ((__x)(__y)) | |
| 566 | 562 | #ifndef _STLP_NO_NEW_STYLE_CASTS |
|   | |||
| 29 | 29 | # define _STLP_HAS_NO_NAMESPACES | |
| 30 | 30 | #endif | |
| 31 | 31 | ||
| 32 | #if defined (__MINGW32__) | ||
| 33 | # define _STLP_NO_DRAND48 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | 32 | /* Modena C++ library */ | |
| 37 | 33 | #if defined (__MWERKS__) && __MWERKS__ <= 0x2303 || (defined (__KCC) && __KCC_VERSION < 3400) | |
| 38 | 34 | # include <mcompile.h> |

