summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/AppHdr.h1
-rw-r--r--crawl-ref/source/acr.cc1
-rw-r--r--crawl-ref/source/debug.cc10
-rw-r--r--crawl-ref/source/files.cc1
-rw-r--r--crawl-ref/source/maps.cc1
5 files changed, 2 insertions, 12 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h
index e06da1fa3f..17740f7c98 100644
--- a/crawl-ref/source/AppHdr.h
+++ b/crawl-ref/source/AppHdr.h
@@ -427,7 +427,6 @@
// some files needed for file locking
#include <unistd.h>
#include <fcntl.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 60c93c8774..067a37f80e 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -22,6 +22,7 @@ REVISION("$Rev$");
#include <float.h>
#endif
+#include <errno.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 4d3f12e994..5b467b6475 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -19,10 +19,7 @@ REVISION("$Rev$");
#include <time.h>
#include <ctype.h>
#include <algorithm>
-
-#ifdef UNIX
#include <errno.h>
-#endif
#ifdef DOS
#include <conio.h>
@@ -3588,9 +3585,7 @@ void debug_item_statistics( void )
if (!ostat)
{
-#ifndef DOS
mprf(MSGCH_ERROR, "Can't write items.stat: %s", strerror(errno));
-#endif
return;
}
@@ -4475,12 +4470,7 @@ static bool debug_fight_sim(int mindex, int missile_slot,
FILE *ostat = fopen("fight.stat", "a");
if (!ostat)
{
- // I'm not sure what header provides errno on djgpp,
- // and it's insufficiently important for a wizmode-only
- // feature.
-#ifndef DOS
mprf(MSGCH_ERROR, "Can't write fight.stat: %s", strerror(errno));
-#endif
return (false);
}
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 5db2f4294b..ae58bc66d8 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -14,6 +14,7 @@ REVISION("$Rev$");
#include "monplace.h"
#include "version.h"
+#include <errno.h>
#include <string.h>
#include <string>
#include <stdlib.h>
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 255ab80fbe..d24790f89f 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -14,7 +14,6 @@ REVISION("$Rev$");
#include <cstring>
#include <cstdlib>
-#include <errno.h>
#include <algorithm>
#if !_MSC_VER