/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
#include <fcntl.h>
#include <math.h>
-#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
init_genrand(seed);
}
-static uint32_t
-djb_hash(uint32_t hash, void *buf, size_t sz)
+/*
+ * Note: this is DJB's hash function when unsigned is 32 bits and hash
+ * is initially 5381.
+ */
+static unsigned
+djb_hash(unsigned hash, void *buf, size_t sz)
{
unsigned char *bp;
pick_seed(void)
{
int fd;
- uint32_t seed;
+ unsigned seed;
int got_seed = 0;
struct timeval tv;
pid_t pid;