Changeset - r19500:ce430c37f336
[Not reviewed]
master
0 3 0
michi_cc - 12 years ago 2012-07-19 19:21:47
michi_cc@openttd.org
(svn r24417) -Codechange: [Win32] Don't needlessly include windows.h in a commonly used header.
3 files changed with 14 insertions and 14 deletions:
0 comments (0 inline, 0 general)
src/fileio_func.h
Show inline comments
 
@@ -116,7 +116,6 @@ DECLARE_ENUM_AS_BIT_SET(TarScanner::Mode
 

	
 
/* Implementation of opendir/readdir/closedir for Windows */
 
#if defined(WIN32)
 
#include <windows.h>
 
struct DIR;
 

	
 
struct dirent { // XXX - only d_name implemented
 
@@ -127,19 +126,6 @@ struct dirent { // XXX - only d_name imp
 
	DIR *dir;
 
};
 

	
 
struct DIR {
 
	HANDLE hFind;
 
	/* the dirent returned by readdir.
 
	 * note: having only one global instance is not possible because
 
	 * multiple independent opendir/readdir sequences must be supported. */
 
	dirent ent;
 
	WIN32_FIND_DATA fd;
 
	/* since opendir calls FindFirstFile, we need a means of telling the
 
	 * first call to readdir that we already have a file.
 
	 * that's the case iff this is true */
 
	bool at_first_entry;
 
};
 

	
 
DIR *opendir(const TCHAR *path);
 
struct dirent *readdir(DIR *d);
 
int closedir(DIR *d);
src/ini.cpp
Show inline comments
 
@@ -21,6 +21,7 @@
 
#endif
 

	
 
#ifdef WIN32
 
# include <windows.h>
 
# include <shellapi.h>
 
# include "core/mem_func.hpp"
 
#endif
src/os/windows/win32.cpp
Show inline comments
 
@@ -89,6 +89,19 @@ void OSOpenBrowser(const char *url)
 
 * modified from Jan Wassenberg's GPL implementation posted over at
 
 * http://www.gamedev.net/community/forums/topic.asp?topic_id=364584&whichpage=1&#2398903 */
 

	
 
struct DIR {
 
	HANDLE hFind;
 
	/* the dirent returned by readdir.
 
	 * note: having only one global instance is not possible because
 
	 * multiple independent opendir/readdir sequences must be supported. */
 
	dirent ent;
 
	WIN32_FIND_DATA fd;
 
	/* since opendir calls FindFirstFile, we need a means of telling the
 
	 * first call to readdir that we already have a file.
 
	 * that's the case iff this is true */
 
	bool at_first_entry;
 
};
 

	
 
/* suballocator - satisfies most requests with a reusable static instance.
 
 * this avoids hundreds of alloc/free which would fragment the heap.
 
 * To guarantee concurrency, we fall back to malloc if the instance is
0 comments (0 inline, 0 general)