8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00

Fixed bug with case-sensitive filesystem

This commit is contained in:
alexpeshkoff 2003-06-02 13:55:40 +00:00
parent f72e4f0adf
commit 552ef5d0a0

View File

@ -38,27 +38,33 @@ namespace Firebird
inline PathName(void) : string() {} inline PathName(void) : string() {}
inline bool operator<(const PathName &r) const { inline bool operator<(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this < r) : (STRCASECMP(this->c_str(), r.c_str()) < 0); (string(*this) < string(r)) :
(STRCASECMP(c_str(), r.c_str()) < 0);
} }
inline bool operator<=(const PathName &r) const { inline bool operator<=(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this <= r) : (STRCASECMP(this->c_str(), r.c_str()) <= 0); (string(*this) <= string(r)) :
(STRCASECMP(c_str(), r.c_str()) <= 0);
} }
inline bool operator==(const PathName &r) const { inline bool operator==(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this == r) : (STRCASECMP(this->c_str(), r.c_str()) == 0); (string(*this) == string(r)) :
(STRCASECMP(this->c_str(), r.c_str()) == 0);
} }
inline bool operator>=(const PathName &r) const { inline bool operator>=(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this >= r) : (STRCASECMP(this->c_str(), r.c_str()) >= 0); (string(*this) >= string(r)) :
(STRCASECMP(this->c_str(), r.c_str()) >= 0);
} }
inline bool operator>(const PathName &r) const { inline bool operator>(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this > r) : (STRCASECMP(this->c_str(), r.c_str()) > 0); (string(*this) > string(r)) :
(STRCASECMP(this->c_str(), r.c_str()) > 0);
} }
inline bool operator!=(const PathName &r) const { inline bool operator!=(const PathName &r) const {
return CASE_SENSITIVITY ? return CASE_SENSITIVITY ?
(*this != r) : (STRCASECMP(this->c_str(), r.c_str()) != 0); (string(*this) != string(r)) :
(STRCASECMP(this->c_str(), r.c_str()) != 0);
} }
}; };
} }