RAND_FUNC must not return negative values. Can't use g_random_int as is,

2000-12-29  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32: RAND_FUNC must not return negative values. Can't
	use g_random_int as is, must use g_random_int_range (0, G_MAXINT).

	* plug-ins/flame/cmap.c: Include glib.h for G_MAXINT.
This commit is contained in:
Tor Lillqvist 2000-12-29 21:02:57 +00:00 committed by Tor Lillqvist
parent b5a63f6c6c
commit a76b992023
3 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2000-12-29 Tor Lillqvist <tml@iki.fi>
* config.h.win32: RAND_FUNC must not return negative values. Can't
use g_random_int as is, must use g_random_int_range (0, G_MAXINT).
* plug-ins/flame/cmap.c: Include glib.h for G_MAXINT.
2000-12-29 Simon Budig <simon@gimp.org>
* modules/colorsel_triangle.c Argh - converting 16bit colors

View file

@ -98,7 +98,7 @@
/* #undef NO_DIFFTIME */
/* #undef NO_FD_SET */
#define RAND_FUNC g_random_int
#define RAND_FUNC() g_random_int_range (0, G_MAXINT)
#define SRAND_FUNC g_random_set_seed
/* #undef USE_PTHREADS */

View file

@ -24,6 +24,8 @@
#include <math.h>
#include <stdlib.h>
#include <glib.h> /* Needed on Win32 where RAND_FUNC is from GLib */
#include "config.h"
unsigned char the_cmaps[][256][3] = {