Glib rand() function




    Howdy,
	Is rand() a system-independent function?  Should there be 

gint g_rand(void);
void g_srand(guint seed);

	functions?  I'm writing a new data structure that might be a
candidate for inclusion into Glib, but I need to use rand().  Considering
that it returns an "int", I don't think rand is architecture independent.

	I would be happy to submit a rand()-based implementation of
g_rand() and g_srand() if people think it's necessary.  In the meantime,
I'll just use rand() in my code.


--Derek Simkowiak




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]