From bc14cb50b1c005ffa4442fb2f59c9e7fb74b1dd2 Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 8 Feb 2009 15:45:37 +0000 Subject: 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 --- crawl-ref/source/AppHdr.h | 1 - crawl-ref/source/acr.cc | 1 + crawl-ref/source/debug.cc | 10 ---------- crawl-ref/source/files.cc | 1 + 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 #include -#include #include #include 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 #endif +#include #include #include #include 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 #include #include - -#ifdef UNIX #include -#endif #ifdef DOS #include @@ -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 #include #include #include 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 #include -#include #include #if !_MSC_VER -- cgit v1.2.3-54-g00ecf