In gnuradio-core/src/lib/general/random.h, RNADOM_MAX is defined unconditionally:
Recently NetBSD-current has added RANDOM_MAX, for essentially the same reason, to parallel with RAND_MAX. (random(3)'s definition is 0 to 2**31-1, so this shouldn't be different). So, is it ok to commit this patch? I would also update the comment (it's not a bug that Solaris RAND_MAX is 32767 if rand(3) on Solaris returns from 0 to 2**15-1 - standards don't require 2**31-1 that I know of)? $NetBSD: patch-ag,v 1.3 2008/03/15 15:09:54 joerg Exp $ --- gnuradio-core/src/lib/general/random.h.orig 2008-03-15 15:34:46.000000000 +0 100 +++ gnuradio-core/src/lib/general/random.h @@ -24,8 +24,9 @@ #define _RANDOM_H_ // we use this because some systems (solaris) define RAND_MAX as 32767 - +#ifndef RANDOM_MAX static const int RANDOM_MAX = 2147483647; +#endif #include <stdlib.h> _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio