diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:59 +0200 |
commit | a1c91f4695e208d5a8f80dc37b1818169b7829ff (patch) | |
tree | 52f5134376d17c99b6c9e53133a2eb5cf171377c /zenxml/io.h | |
parent | 5.16 (diff) | |
download | FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.gz FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.bz2 FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.zip |
5.17
Diffstat (limited to 'zenxml/io.h')
-rw-r--r-- | zenxml/io.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/zenxml/io.h b/zenxml/io.h index 4286ae6c..596d7acf 100644 --- a/zenxml/io.h +++ b/zenxml/io.h @@ -1,5 +1,5 @@ // ************************************************************************** -// * This file is part of the zenXML project. It is distributed under the * +// * This file is part of the zen::Xml project. It is distributed under the * // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt * // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** @@ -20,10 +20,11 @@ namespace zen \brief Save and load byte streams from files */ -#if !defined(ZEN_PLATFORM_WINDOWS) && !defined(ZEN_PLATFORM_OTHER) -#error Please specify your platform: #define ZEN_PLATFORM_WINDOWS or ZEN_PLATFORM_OTHER +#if !defined(ZEN_WIN) && !defined(ZEN_LINUX) && !defined(ZEN_MAC) +#error Please specify your platform: #define ZEN_WIN, ZEN_LINUX or ZEN_MAC #endif + ///Exception thrown due to failed file I/O struct XmlFileError : public XmlError { @@ -35,7 +36,7 @@ struct XmlFileError : public XmlError }; -#ifdef ZEN_PLATFORM_WINDOWS +#ifdef ZEN_WIN namespace implemenation //sad but true { template <class String> inline @@ -64,7 +65,7 @@ FILE* fopen(const String& filename, const wchar_t* mode) template <class String> void saveStream(const std::string& stream, const String& filename) //throw XmlFileError { -#ifdef ZEN_PLATFORM_WINDOWS +#ifdef ZEN_WIN FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"wb"); #else FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "w"); @@ -92,7 +93,7 @@ void saveStream(const std::string& stream, const String& filename) //throw XmlFi template <class String> std::string loadStream(const String& filename) //throw XmlFileError { -#ifdef ZEN_PLATFORM_WINDOWS +#ifdef ZEN_WIN FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"rb"); #else FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "r"); |