summaryrefslogtreecommitdiff
path: root/lib/random.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv3+ notices in source files where appropriate.Bruno Haible2021-06-041-10/+9
| | | | | * lib/**.{h,c}: Use LGPLv3+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Update some URLsPaul Eggert2019-09-221-1/+1
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* random: Fix build error on native Windows (regression from 2018-06-21).Assaf Gordon2018-12-161-0/+8
| | | | | | * lib/random.c (__srandom, __initstate, __setstate, __random, __srandom_r, __initstate_r, __setstate_r, __random_r) [!_LIBC]: Redirect to the symbols without '__' prefix.
* random, random_r: merge from glibcPaul Eggert2018-06-211-49/+172
| | | | | | | | | | | | | | | | | | | | | * lib/random.c, lib/random_r.c: Include libc-config.h if !_LIBC, not config.h unilaterally. * lib/random.c: Do not include stdint.h or time.h; not needed. Include libc-lock.h if _LIBC, and define substitute macros otherwise. (unsafe_state): Rename from generator. All uses changed. Use C99-style initializers. (__random, __srandom, __initstate, __setstate): Rename from non-underscored version, but define it to non-underscored version on Gnulib. Add a lock. * lib/random_r.c (__srandom_r, __initstate_r, __setstate_r, __random_r): Likewise. Do not include <stdint.h>; not needed since stdlib.h defines int32_t. (weak_alias, __set_errno) [!_LIBC]: Remove; now done by libc-config. (__srandom_r): Use int32_t instead of long int where int32_t will do. (__random_r): Use uint32 to fix glibc bug 17343. * modules/random, modules/random_r (Depends-on): Add libc-config. Depend on stdint only if $HAVE_RANDOM = 0.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* New module 'random'.Bruno Haible2012-01-141-0/+187
* lib/stdlib.in.h (random, srandom, initstate, setstate): New declarations. * lib/random.c: New file, based on glibc/stdlib/random.c. * m4/random.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM, HAVE_RANDOM. * modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM. * modules/random: New file. * config/srclist.txt: Add an entry for random.c. * doc/posix-functions/random.texi: Mention the 'random' module. * doc/posix-functions/initstate.texi: Likewise. * doc/posix-functions/setstate.texi: Likewise. * doc/posix-functions/srandom.texi: Likewise.