/* Begin PBXFileReference section */
09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+ 18308CB41303370800AA309E /* stat_utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stat_utf8.h; sourceTree = "<group>"; };
+ 18308CB51303370800AA309E /* stdio_utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdio_utf8.h; sourceTree = "<group>"; };
183FDF8811AF0B0500B81E9C /* PluginSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginSource.cpp; sourceTree = "<group>"; };
183FDF8911AF0B0500B81E9C /* PluginSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginSource.h; sourceTree = "<group>"; };
184C472D1296BC6E0006DB3E /* Service.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Service.cpp; sourceTree = "<group>"; };
E38E1D690D25F9FD00618676 /* linux */ = {
isa = PBXGroup;
children = (
+ 18308CB41303370800AA309E /* stat_utf8.h */,
+ 18308CB51303370800AA309E /* stdio_utf8.h */,
E3D87AE90D3182F4000CF031 /* XCriticalSection.cpp */,
E3D87AEA0D3182F4000CF031 /* XCriticalSection.h */,
E38E1D6A0D25F9FD00618676 /* ConvUtils.cpp */,
--- /dev/null
+/*
+ * Copyright (C) 2005-2011 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#ifndef STAT_UTF8_H__
+#define STAT_UTF8_H__
+
+#define stat64_utf8 stat64
+
+#endif //STAT_UTF8_H__
+
--- /dev/null
+/*
+ * Copyright (C) 2005-2011 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#ifndef STDIO_UTF8_H__
+#define STDIO_UTF8_H__
+
+#include <cstdio>
+
+#define remove_utf8 remove
+#define rename_utf8 rename
+#define fopen64_utf8 fopen
+
+#endif // STDIO_UTF8_H__
+
#ifndef _LINUX
#include <share.h>
#include "CharsetConverter.h"
+#else
+#include "stdio_utf8.h"
+#include "stat_utf8.h"
#endif
#include "threads/CriticalSection.h"
#include "threads/SingleLock.h"
strLogFileOld.Format("%sxbmc.old.log", path);
struct stat64 info;
- if (stat64(strLogFileOld.c_str(),&info) == 0 &&
- remove(strLogFileOld.c_str()) != 0)
+ if (stat64_utf8(strLogFileOld.c_str(),&info) == 0 &&
+ remove_utf8(strLogFileOld.c_str()) != 0)
return false;
- if (stat64(strLogFile.c_str(),&info) == 0 &&
- rename(strLogFile.c_str(),strLogFileOld.c_str()) != 0)
+ if (stat64_utf8(strLogFile.c_str(),&info) == 0 &&
+ rename_utf8(strLogFile.c_str(),strLogFileOld.c_str()) != 0)
return false;
- m_file = fopen(strLogFile.c_str(),"wb");
+ m_file = fopen64_utf8(strLogFile.c_str(),"wb");
#endif
}