/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
#ifndef MISC_H
#define MISC_H
-#include <time.h>
-
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#ifdef _WIN32
-#ifndef __GNUC__
-
-typedef long ssize_t;
-
-/* integral mismatch, due to misuse of sector short */
-#pragma warning (disable : 4761 )
-
-#define strncasecmp(s1, s2, s3) _strnicmp((s1), (s2), (s3))
-
-typedef int pid_t;
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-
-#endif /* !__GNUC__ */
-
-#define mkdir(dir,perm) _mkdir((dir))
-#define random rand
-#define srandom srand
-#define S_IRUSR _S_IREAD
-#define S_IWUSR _S_IWRITE
-#define S_IXUSR _S_IREAD
-#define S_IRGRP _S_IREAD
-#define S_IWGRP _S_IWRITE
-#define S_IXGRP _S_IREAD
-#define S_IROTH _S_IREAD
-#define S_IWOTH _S_IWRITE
-#define S_IXOTH _S_IREAD
-#define S_IRWXU S_IRUSR | S_IWUSR | S_IXUSR
-#define S_IRWXG S_IRGRP | S_IWGRP | S_IXGRP
-#define S_IRWXO S_IROTH | S_IWOTH | S_IXOTH
+#include "w32misc.h"
#endif /* _WIN32 */
#ifndef S_IRWUG
#define S_IRWUG S_IRGRP | S_IWGRP | S_IRUSR | S_IWUSR
#endif
-/* This is the structure we use to keep track of the global mobility
- things, such as when the server is supposed to start/stop updating
- mobility and the timestamp of when the game was last up. These
- times are in seconds. */
-struct mob_acc_globals {
- time_t timestamp; /* Last timestamp of when the game was up */
- time_t starttime; /* When we should start updating mobility again. */
-};
-
#ifdef __GNUC__
#define ATTRIBUTE(attrs) __attribute__ (attrs)
#else