mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-20 11:11:51 +00:00
[Core] Add new switch_rand() a compliant random number generator API. Add a unit-test.
* [Core] Add new switch_rand() a compliant random number generator API. Add a unit-test. * Fall back to rand() on unsupported platforms compile time.
This commit is contained in:
@@ -1514,6 +1514,11 @@ SWITCH_DECLARE(switch_status_t) switch_digest_string(const char *digest_name, ch
|
||||
SWITCH_DECLARE(char *) switch_must_strdup(const char *_s);
|
||||
SWITCH_DECLARE(const char *) switch_memory_usage_stream(switch_stream_handle_t *stream);
|
||||
|
||||
/**
|
||||
/ Compliant random number generator. Returns the value between 0 and 0x7fff (RAND_MAX).
|
||||
**/
|
||||
SWITCH_DECLARE(int) switch_rand(void);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
Reference in New Issue
Block a user