2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; only version 2 of the License is applicable.
6 * This program is distributed in the hope that it will be useful, but
7 * WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 * General Public License for more details.
11 * You should have received a copy of the GNU General Public License along
12 * with this program; if not, write to the Free Software Foundation, Inc.,
13 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 # define random() rand()
22 # define srandom(x) srand(x)
26 /* make sure that the random number generator seeded EXACTLY ONCE */
29 static int rand_init = 0;
31 srandom((unsigned int) time(NULL) + (unsigned int) getpid());