----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115878/#review50183 -----------------------------------------------------------
src/file/lib/baloo_xattr_p.h <https://git.reviewboard.kde.org/r/115878/#comment35288> I've to admit that i'm not sure how various compilers or the xattr headers will react to this, but you might want to try: namespace BalooXattrInternal { #if defined(Q_OS_LINUX) #include <sys/xattr.h> ... #endif } namespace Baloo { inline ssize_t getxattr(const char* path, const char* name, void* value, size_t size) { #if defined(Q_OS_LINUX) return BalooXattrInternal::getxattr(path, name, value, size); .... } using namespace BalooXattrInternal; using Baloo::getxattr; using Baloo::setxattr; ----------- getxattr & setxattr should then always be in scope and refer to the Baloo variants (ie. the wrappers) - Thomas Lübking On Feb. 18, 2014, 10:51 p.m., Raphael Kubo da Costa wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/115878/ > ----------------------------------------------------------- > > (Updated Feb. 18, 2014, 10:51 p.m.) > > > Review request for Baloo and Vishesh Handa. > > > Repository: baloo > > > Description > ------- > > File: Add a thin wrapper around different xattr implementations. > > OS X, Linux and some BSDs all support extended file attributes in a way or > another, but the API differs among the operating systems. > > Introduce baloo_getxattr() and baloo_setxattr(), named after the OS X and > Linux APIs for getting and setting extended attributes, to perform the right > calls depending on the operating system. > > These functions accept as parameters the arguments that are common across > all xattr implementations -- this means one cannot pass custom |flags| on > Linux or |options| on OS X, but that should be fine for now as the code was > not doing that anyway. > > > Diffs > ----- > > src/file/lib/autotests/filefetchjobtest.cpp > a738c62a58d29ca092e53702d4852a48634d4315 > src/file/lib/autotests/filemodifyjobtest.cpp > 4ad1a6d2138d9754356a573eaf5f2487fcbe220f > src/file/lib/baloo_xattr_p.h PRE-CREATION > src/file/lib/filecustommetadata.cpp > 3a01520947a324dc1674f304e44eca1ae4a19ed7 > src/file/lib/xattrdetector.cpp e05984e611e8582d0e18d08f93b325381222d280 > > Diff: https://git.reviewboard.kde.org/r/115878/diff/ > > > Testing > ------- > > baloo finally builds on FreeBSD. filefetchjobtest and filemodifyjobtest fail > just like they do on Linux :-) > > > Thanks, > > Raphael Kubo da Costa > >
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<