mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-01 23:26:16 +01:00
Low-level core library that forms the basis for projects such as GTK+ and GNOME.
80591652ff
Fri Dec 19 11:49:21 2003 George Lebl <jirka@5z.com> * glib/grand.c glib/grand.h (g_rand_new) (g_rand_new_with_seed) (g_rand_new_with_seed_array) (g_rand_set_seed_array): Add the init_by_array functionality from the reference implementation of the mersenne twister (mt19937ar.c) and change the naming to fit with the rest of the grand API. New functions are g_rand_new_with_seed_array, g_rand_set_seed_array. This is only reliable/tested for the 2.2 version of the seeding as that's what the reference implementation uses. Also modify g_rand_new to get 4 longs from /dev/urandom since that will always be available anyway and we get more entropy and if /dev/urandom is unavailable use also 4 longs for seeding using secs, usecs, getpid and getppid. For version 2.0 use only a simple seed again but be more careful about seeding with secs/usecs in this case. * glib/grand.c glib/grand.h (g_rand_copy): Add g_rand_copy function to copy the current state of the random number generator. * glib/grand.c (g_rand_new): Add testing for EINTR when reading from /dev/urandom * tests/rand-test.c: add testing of the array seeding stuff against the reference implementation, plus add statistical sanity check to see that the values outputted are truly kind of random. And check that g_rand_copy truly copies the state by checking a few terms. |
||
---|---|---|
debian | ||
docs | ||
glib | ||
gmodule | ||
gobject | ||
gthread | ||
m4macros | ||
po | ||
tests | ||
.cvsignore | ||
acglib.m4 | ||
acinclude.m4 | ||
AUTHORS | ||
autogen.sh | ||
ChangeLog | ||
ChangeLog.pre-1-2 | ||
ChangeLog.pre-2-0 | ||
ChangeLog.pre-2-2 | ||
ChangeLog.pre-2-4 | ||
ChangeLog.pre-2-6 | ||
ChangeLog.pre-2-8 | ||
ChangeLog.pre-2-10 | ||
ChangeLog.pre-2-12 | ||
config.h.win32.in | ||
configure.in | ||
COPYING | ||
glib-2.0-uninstalled.pc.in | ||
glib-2.0.pc.in | ||
glib-gettextize.in | ||
glib-zip.in | ||
glib.spec.in | ||
glibconfig.h.win32.in | ||
gmodule-2.0-uninstalled.pc.in | ||
gmodule-2.0.pc.in | ||
gobject-2.0-uninstalled.pc.in | ||
gobject-2.0.pc.in | ||
gthread-2.0-uninstalled.pc.in | ||
gthread-2.0.pc.in | ||
HACKING | ||
INSTALL | ||
INSTALL.in | ||
Makefile.am | ||
makefile.mingw | ||
makefile.msc | ||
msvc_recommended_pragmas.h | ||
NEWS | ||
NEWS.pre-1-3 | ||
README | ||
README.in | ||
README.win32 | ||
sanity_check | ||
TODO.xml | ||
win32-fixup.pl |
General Information =================== This is GLib version 2.3.1. GLib is the low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system. The official ftp site is: ftp://ftp.gtk.org/pub/gtk The official web site is: http://www.gtk.org/ Information about mailing lists can be found at http://www.gtk.org/mailinglists.html To subscribe: mail -s subscribe gtk-list-request@gnome.org < /dev/null (Send mail to gtk-list-request@gnome.org with the subject "subscribe") Installation ============ See the file 'INSTALL' Notes about GLib-2.2.0 ====================== * GLib changed the seeding algorithm for the pseudo-random number generator Mersenne Twister, as used by GRand and GRandom. This was necessary, because some seeds would yield very bad pseudo-random streams. Further information can be found at: http://www.math.keio.ac.jp/~matumoto/emt.html Also the pseudo-random integers generated by g_rand_int_range and g_random_int_range will have a slightly better equal distribution with the new version of GLib. The original algorithms, as found in GLib-2.0.x, can be used instead of the new ones by setting the environment variable G_RANDOM_VERSION to the value of "2.0". Use the GLib-2.0 algorithms only if you have sequences of numbers generated with Glib-2.0 that you need to reproduce exactly. How to report bugs ================== Bugs should be reported to the GNOME bug tracking system. (http://bugzilla.gnome.org, product glib.) You will need to create an account for yourself. In the bug report please include: * Information about your system. For instance: - What operating system and version - For Linux, what version of the C library And anything else you think is relevant. * How to reproduce the bug. If you can reproduce it with the testgtk program that is built in the gtk/ subdirectory, that will be most convenient. Otherwise, please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded. * If the bug was a crash, the exact text that was printed out when the crash occured. * Further information such as stack traces may be useful, but is not necessary. Patches ======= Patches should also be submitted to bugzilla.gnome.org. If the patch fixes an existing bug, add the patch as an attachment to that bug report. Otherwise, enter a new bug report that describes the patch, and attach the patch to that bug report. Bug reports containing patches should include the PATCH keyword in their keyword fields. If the patch adds to or changes the GLib programming interface, the API keyword should also be included. Patches should be in unified diff form. (The -u option to GNU diff.)