]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/rdsched.c
Fix build for systems that don't provide POSIX.1-2001 by default
[empserver] / src / lib / common / rdsched.c
index 88f5c6e2348b3d9ab49333e46f50ac809a6660a4..05b518c2e5ae117e470ef414ba0c933711050e67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -30,9 +30,6 @@
  *     Markus Armbruster, 2007-2011
  */
 
-/* Required for strptime() */
-#define _XOPEN_SOURCE 500
-
 #include <config.h>
 
 #include <ctype.h>
@@ -100,7 +97,7 @@ read_schedule(char *fname, time_t sched[], int n, time_t t0, time_t anchor)
 /*
  * Parse an update schedule directive from @line.
  * Update @sched[] and @anchor accordingly.
- * @sched[] holds the first N-1 updates after @t0 in ascending order.
+ * @sched[] holds the first @n-1 updates after @t0 in ascending order.
  * @fname and @lno file name and line number for reporting errors.
  */
 static int
@@ -316,7 +313,7 @@ find_update(time_t t, time_t sched[])
  * Insert update at @t into @sched[].
  * @sched[] holds the first @n-1 updates after @t0 in ascending order.
  * If @t is before @t0 or outside game_days/game_hours, return -1.
- * If there's no space for @t in @sched[], return N-1.
+ * If there's no space for @t in @sched[], return @n-1.
  * Else insert @t into @sched[] and return its index in @sched[].
  */
 static int