]> git.pond.sub.org Git - empserver/blobdiff - include/misc.h
Update copyright notice
[empserver] / include / misc.h
index 74515dd8e651c35df608fa19728bbf78615ebc47..6169d1bfc31437ba644a19a74e43ee49044ac551 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  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
-#ifndef S_IRUSR
-#define S_IRUSR            _S_IREAD
-#define S_IWUSR            _S_IWRITE
-#define S_IXUSR            _S_IEXEC
-#define S_IRWXU            S_IRUSR | S_IWUSR | S_IXUSR
-#endif
-#ifndef S_IRGRP
-#define S_IRGRP            0
-#define S_IWGRP            0
-#define S_IXGRP            0
-#define S_IRWXG            S_IRGRP | S_IWGRP | S_IXGRP
-#endif
-#ifndef S_IROTH
-#define S_IROTH            0
-#define S_IWOTH            0
-#define S_IXOTH            0
-#define S_IRWXO            S_IROTH | S_IWOTH | S_IXOTH
-#endif
+#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