summaryrefslogtreecommitdiff
path: root/zen/zstring.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
commitee1c8c5c25d25dfa42120125a8a45dc9831ee412 (patch)
tree67aa287157db954e0cadeee05b4aad331eb2ecf2 /zen/zstring.h
parent5.13 (diff)
downloadFreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.gz
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.bz2
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.zip
5.14
Diffstat (limited to 'zen/zstring.h')
-rw-r--r--zen/zstring.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/zen/zstring.h b/zen/zstring.h
index f4a79181..435f03a2 100644
--- a/zen/zstring.h
+++ b/zen/zstring.h
@@ -11,7 +11,7 @@
#ifdef FFS_LINUX
#include <cstring> //strcmp
#elif defined FFS_MAC
-#include <strings.h> //strcasecmp
+//#include <strings.h> //strcasecmp
#endif
@@ -101,10 +101,8 @@ Zstring appendSeparator(Zstring path) //support rvalue references!
//################################# inline implementation ########################################
namespace z_impl
{
-#if defined FFS_WIN
-int compareFilenamesNoCase(const Zchar* lhs, const Zchar* rhs, size_t sizeLhs, size_t sizeRhs);
-#endif
#if defined FFS_WIN || defined FFS_MAC
+int compareFilenamesNoCase(const Zchar* lhs, const Zchar* rhs, size_t sizeLhs, size_t sizeRhs);
void makeFilenameUpperCase(Zchar* str, size_t size);
#endif
}
@@ -113,12 +111,12 @@ void makeFilenameUpperCase(Zchar* str, size_t size);
template <template <class, class> class SP, class AP> inline
int cmpFileName(const zen::Zbase<Zchar, SP, AP>& lhs, const zen::Zbase<Zchar, SP, AP>& rhs)
{
-#if defined FFS_WIN
+#if defined FFS_WIN || defined FFS_MAC
return z_impl::compareFilenamesNoCase(lhs.data(), rhs.data(), lhs.length(), rhs.length());
#elif defined FFS_LINUX
return std::strcmp(lhs.c_str(), rhs.c_str()); //POSIX filenames don't have embedded 0
-#elif defined FFS_MAC
- return ::strcasecmp(lhs.c_str(), rhs.c_str()); //locale-dependent!
+ //#elif defined FFS_MAC
+ // return ::strcasecmp(lhs.c_str(), rhs.c_str()); //locale-dependent!
#endif
}
bgstack15