diff --git a/ChangeLog b/ChangeLog index acfb7b1c68..b7991119b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-12-29 Tor Lillqvist + + * 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 * modules/colorsel_triangle.c Argh - converting 16bit colors diff --git a/config.h.win32 b/config.h.win32 index b890508bfa..e6046667c7 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -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 */ diff --git a/plug-ins/flame/cmap.c b/plug-ins/flame/cmap.c index 6a1ea6748d..a7477653d1 100644 --- a/plug-ins/flame/cmap.c +++ b/plug-ins/flame/cmap.c @@ -24,6 +24,8 @@ #include #include +#include /* Needed on Win32 where RAND_FUNC is from GLib */ + #include "config.h" unsigned char the_cmaps[][256][3] = {