diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-08 15:45:37 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-08 15:45:37 +0000 |
commit | bc14cb50b1c005ffa4442fb2f59c9e7fb74b1dd2 (patch) | |
tree | c87d699a25c3721aa5ebe2ffc15bc6bad8d833e0 /crawl-ref/source | |
parent | dbb1ff3329acdd3917201535bd7b65737d76fdb6 (diff) | |
download | crawl-ref-bc14cb50b1c005ffa4442fb2f59c9e7fb74b1dd2.tar.gz crawl-ref-bc14cb50b1c005ffa4442fb2f59c9e7fb74b1dd2.zip |
Fix errno includes, and hopefully DOS compile [2573206].
If errno.h doesn't exist on DOS, this will fail, but then it would have
failed anyway.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8978 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/files.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/maps.cc | 1 |
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 |