Many platforms with 4 byte integers define RAND_MAX as INT_MAX but some (Solaris and derivatives for example), RAND_MAX is only 32767 but INT_MAX is 2147483647. This change allows falling back to the posix random() and srandom() variants with casts to int if both int and long are 4 bytes, then defining a consistent KAM_RAND_MAX of 2147483647. If both INT_MAX and RAND_MAX are 2 bytes, then we are stuck with ANSI rand().


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/701

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.