Mercurial > ~mikael > mcabber > hg
comparison mcabber/configure.ac @ 1497:35020a2ed115
Do not use srand()/rand() if better alternatives exist (mirabilos)
arc4random(3) is a self-seeding PRNG available on a lot of OSes (all BSDs,
Darwin / Mac OSX, Interix / Microsoft® Services for Unix, Windows® 2003SR1,
Windows® Vista, Debian with the new libbsd package installed, ???) and much
better than srand(3)/rand(3).
Thanks to GNU autoconf, this can be made portable.
http://www.mirbsd.org/man/arc4random.3
//mirabilos
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 30 Jun 2008 23:13:50 +0200 |
parents | af4aed348baf |
children | 1eb27a3bb457 |
comparison
equal
deleted
inserted
replaced
1496:b9f8c1fddb23 | 1497:35020a2ed115 |
---|---|
53 AC_FUNC_REALLOC | 53 AC_FUNC_REALLOC |
54 AC_FUNC_SELECT_ARGTYPES | 54 AC_FUNC_SELECT_ARGTYPES |
55 AC_TYPE_SIGNAL | 55 AC_TYPE_SIGNAL |
56 AC_FUNC_STRFTIME | 56 AC_FUNC_STRFTIME |
57 AC_FUNC_VPRINTF | 57 AC_FUNC_VPRINTF |
58 AC_CHECK_FUNCS([alarm bzero gethostbyname gethostname inet_ntoa isascii \ | 58 AC_CHECK_FUNCS([alarm arc4random bzero gethostbyname gethostname inet_ntoa \ |
59 memmove memset modf select setlocale socket strcasecmp \ | 59 isascii memmove memset modf select setlocale socket strcasecmp \ |
60 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf]) | 60 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf]) |
61 | 61 |
62 | 62 |
63 AC_CHECK_DECLS([strptime],,, | 63 AC_CHECK_DECLS([strptime],,, |
64 [#define _GNU_SOURCE | 64 [#define _GNU_SOURCE |