Skip to content

Commit 6bc2760

Browse files
committed
[ZH] Fix fstream include errors for Zero Hour Tools build (TheSuperHackers#509)
1 parent 16eb0f1 commit 6bc2760

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// TheSuperHackers
2+
// This file includes the fstream that is compatible with vs6, STLPort and modern c++.
3+
4+
#pragma once
5+
6+
#ifdef USING_STLPORT
7+
8+
#include <fstream.h>
9+
10+
#else
11+
12+
#include <fstream>
13+
14+
#endif

GeneralsMD/Code/GameEngine/Include/Precompiled/PreRTS.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ class STLSpecialAlloc;
4949
#include <direct.h>
5050
#include <excpt.h>
5151
#include <float.h>
52-
#ifdef USING_STLPORT
53-
#include <fstream.h>
54-
#else
55-
#include <fstream>
56-
#endif
52+
#include <Utility/fstream_adapter.h>
5753
#include <imagehlp.h>
5854
#include <io.h>
5955
#include <limits.h>

GeneralsMD/Code/Tools/Autorun/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ add_executable(${appname} WIN32)
5454
target_sources(${appname} PRIVATE ${AUTORUN_SRC})
5555

5656
target_link_libraries(${appname} PRIVATE
57+
gz_utility
5758
winmm
5859
zi_libraries_include
5960
)

GeneralsMD/Code/Tools/Autorun/autorun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#include <dos.h>
7878
#include <errno.h>
7979
#include <fcntl.h>
80-
#include <fstream.h>
80+
#include <Utility/fstream_adapter.h>
8181
#include <io.h>
8282
#include <locale.h>
8383
#include <math.h>

0 commit comments

Comments
 (0)