diff --git a/xrootd-3.1.0-add-GetHandle-XrdClientAbs-header.patch b/xrootd-3.1.0-add-GetHandle-XrdClientAbs-header.patch deleted file mode 100644 index ab06b15e47f..00000000000 --- a/xrootd-3.1.0-add-GetHandle-XrdClientAbs-header.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/XrdClient/XrdClientAbs.hh b/src/XrdClient/XrdClientAbs.hh -index cf639d8..ef88cd0 100644 ---- a/src/XrdClient/XrdClientAbs.hh -+++ b/src/XrdClient/XrdClientAbs.hh -@@ -65,6 +65,8 @@ public: - // Hook to the open connection (needed by TXNetFile) - XrdClientConn *GetClientConn() const { return fConnModule; } - -+ const char * GetHandle () const { return fHandle; } -+ - inline XrdClientUrlInfo GetCurrentUrl() { - if (fConnModule) - return fConnModule->GetCurrentUrl(); diff --git a/xrootd-3.1.0-fix-infinite-loop-bug.patch b/xrootd-3.1.0-fix-infinite-loop-bug.patch deleted file mode 100644 index 163e6faa77f..00000000000 --- a/xrootd-3.1.0-fix-infinite-loop-bug.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 4dd4cfa4340cc3ff61684f943392eeeff793c3a5 Mon Sep 17 00:00:00 2001 -From: Lukasz Janyst -Date: Thu, 05 Jul 2012 16:58:46 +0200 -Subject: Properly chceck the redirect counter - ---- -diff --git a/src/XrdClient/XrdClient.cc b/src/XrdClient/XrdClient.cc -index aa504e1..e2fffbe 100644 ---- a/src/XrdClient/XrdClient.cc -+++ b/src/XrdClient/XrdClient.cc -@@ -1017,7 +1017,7 @@ bool XrdClient::TryOpen(kXR_unt16 mode, kXR_unt16 options, bool doitparallel) { - while( fConnModule->LastServerError.errnum == kXR_NotAuthorized ) - { - -- if( fConnModule->GetRedirCnt() > fConnModule->GetMaxRedirCnt() ) -+ if( fConnModule->GetRedirCnt() >= fConnModule->GetMaxRedirCnt() ) - break; - - //---------------------------------------------------------------------- --- -cgit v0.9.0.3 diff --git a/xrootd-3.1.0-fix-read-after-read.patch b/xrootd-3.1.0-fix-read-after-read.patch deleted file mode 100644 index 3b01066453f..00000000000 --- a/xrootd-3.1.0-fix-read-after-read.patch +++ /dev/null @@ -1,21 +0,0 @@ -From d10c528900539891037566b5d26c26be1c662132 Mon Sep 17 00:00:00 2001 -From: Lukasz Janyst -Date: Thu, 03 Nov 2011 12:22:33 +0100 -Subject: [bug #87880] Properly unpack the incomming data in the case when the actual readv vector length modulo READV_MAXCHUNKS was 1 - ---- -diff --git a/src/XrdClient/XrdClient.cc b/src/XrdClient/XrdClient.cc -index 963f110..44ab171 100644 ---- a/src/XrdClient/XrdClient.cc -+++ b/src/XrdClient/XrdClient.cc -@@ -763,7 +763,7 @@ kXR_int64 XrdClient::ReadV(char *buf, kXR_int64 *offsets, int *lens, int nbuf) - fCounters.ReadVSubRequests++; - fCounters.ReadVSubChunks++; - fCounters.ReadVBytes += reqvect[startitem].len; -- res = Read(buf, reqvect[startitem].offset, reqvect[startitem].len); -+ res = Read(buf+bytesread, reqvect[startitem].offset, reqvect[startitem].len); - - } else { - // Asynchronous, res stays the same --- -cgit v0.9 diff --git a/xrootd-3.1.0-gcc-470-literals-whitespace.patch b/xrootd-3.1.0-gcc-470-literals-whitespace.patch deleted file mode 100644 index 844e36af145..00000000000 --- a/xrootd-3.1.0-gcc-470-literals-whitespace.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -arupN xrootd-3.1.0.orig/src/XrdClient/XrdCommandLine.cc xrootd-3.1.0/src/XrdClient/XrdCommandLine.cc ---- xrootd-3.1.0.orig/src/XrdClient/XrdCommandLine.cc 2012-04-06 11:57:15.000000000 +0200 -+++ xrootd-3.1.0/src/XrdClient/XrdCommandLine.cc 2012-04-06 11:59:40.000000000 +0200 -@@ -37,7 +37,7 @@ - #undef NOMACROS - #endif - --#define XRDCLI_VERSION "(C) 2004-2010 by the Xrootd group. Xrootd version: "XrdVSTRING -+#define XRDCLI_VERSION "(C) 2004-2010 by the Xrootd group. Xrootd version: " XrdVSTRING - - //------------------------------------------------------------------------------ - // Some globals -diff -arupN xrootd-3.1.0.orig/src/XrdClient/Xrdcp.cc xrootd-3.1.0/src/XrdClient/Xrdcp.cc ---- xrootd-3.1.0.orig/src/XrdClient/Xrdcp.cc 2012-04-06 11:57:15.000000000 +0200 -+++ xrootd-3.1.0/src/XrdClient/Xrdcp.cc 2012-04-06 11:58:40.000000000 +0200 -@@ -89,7 +89,7 @@ struct XrdCpInfo { - - #define XRDCP_BLOCKSIZE (8*1024*1024) - #define XRDCP_XRDRASIZE (30*XRDCP_BLOCKSIZE) --#define XRDCP_VERSION "(C) 2004-2011 by the XRootD collaboration. Version: "XrdVSTRING -+#define XRDCP_VERSION "(C) 2004-2011 by the XRootD collaboration. Version: " XrdVSTRING - - /////////////////////////////////////////////////////////////////////// - // Coming from parameters on the cmd line diff --git a/xrootd-3.1.0-narrowing-conversion.patch b/xrootd-3.1.0-narrowing-conversion.patch deleted file mode 100644 index 6b190d1d5fc..00000000000 --- a/xrootd-3.1.0-narrowing-conversion.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/src/XrdCms/XrdCmsManager.cc b/src/XrdCms/XrdCmsManager.cc -index d7f1a01..131df9b 100644 ---- a/src/XrdCms/XrdCmsManager.cc -+++ b/src/XrdCms/XrdCmsManager.cc -@@ -153,7 +153,8 @@ void XrdCmsManager::Inform(const char *What, struct iovec *vP, int vN, int vT) - void XrdCmsManager::Inform(XrdCms::CmsReqCode rCode, int rMod, - const char *Arg, int Alen) - { -- CmsRRHdr Hdr = {0, rCode, rMod, htons(static_cast(Alen))}; -+ CmsRRHdr Hdr = {0, static_cast(rCode), static_cast(rMod), -+ htons(static_cast(Alen))}; - struct iovec ioV[2] = {{(char *)&Hdr, sizeof(Hdr)},{(char *)Arg, Alen}}; - - Inform(Router.getName((int)rCode), ioV, (Arg ? 2 : 1), Alen+sizeof(Hdr)); -diff --git a/src/XrdCms/XrdCmsNode.cc b/src/XrdCms/XrdCmsNode.cc -index ca0002c..fe65491 100644 ---- a/src/XrdCms/XrdCmsNode.cc -+++ b/src/XrdCms/XrdCmsNode.cc -@@ -1168,7 +1168,8 @@ void XrdCmsNode::do_StateDFS(XrdCmsBaseFR *rP, int rc) - { - EPNAME("StateDFs"); - static const SMask_t allNodes(~0); -- CmsRRHdr Request = {rP->Sid, 0, rP->Mod | kYR_raw}; -+ CmsRRHdr Request = {rP->Sid, static_cast(0), -+ static_cast(rP->Mod | kYR_raw)}; - XrdCmsSelect Sel(0, rP->Path, rP->PathLen); - int isNew; - -diff --git a/src/XrdCms/XrdCmsReq.cc b/src/XrdCms/XrdCmsReq.cc -index 1eb944e..1094c7f 100644 ---- a/src/XrdCms/XrdCmsReq.cc -+++ b/src/XrdCms/XrdCmsReq.cc -@@ -347,7 +347,7 @@ void XrdCmsReq::Reply( int respCode, unsigned int respVal, - struct iovec *iov, int iovnum) - { - EPNAME("Reply"); -- CmsResponse Resp = {{ReqID, respCode, 0, 0}, htonl(respVal)}; -+ CmsResponse Resp = {{ReqID, static_cast(respCode), 0, 0}, htonl(respVal)}; - struct iovec myiov[2], *iovP; - XrdCmsNode *nP; - -diff --git a/src/XrdCms/XrdCmsTalk.cc b/src/XrdCms/XrdCmsTalk.cc -index 7c00f3b..9f9c635 100644 ---- a/src/XrdCms/XrdCmsTalk.cc -+++ b/src/XrdCms/XrdCmsTalk.cc -@@ -103,7 +103,7 @@ const char *XrdCmsTalk::Respond(XrdLink *Link, XrdCms::CmsRspCode rcode, - char *buff, int blen) - { - static const unsigned short ovhd = sizeof(kXR_unt32); -- CmsResponse Resp = {{0, rcode, 0, -+ CmsResponse Resp = {{0, static_cast(rcode), 0, - htons(static_cast(blen+ovhd))}, 0}; - struct iovec ioV[2] = {{(char *)&Resp, sizeof(Resp)}, - { buff, blen}}; -diff --git a/src/XrdFrm/XrdFrmConfig.cc b/src/XrdFrm/XrdFrmConfig.cc -index 189812f..d8e7a2b 100644 ---- a/src/XrdFrm/XrdFrmConfig.cc -+++ b/src/XrdFrm/XrdFrmConfig.cc -@@ -1133,7 +1133,7 @@ int XrdFrmConfig::Grab(const char *var, char **Dest, int nosubs) - XrdOucTList *XrdFrmConfig::InsertPL(XrdOucTList *pL, const char *Path, - int Plen, int isRW) - { -- short sval[4] = {isRW, Plen}; -+ int sval[4] = {isRW, Plen}; - XrdOucTList *pP = 0, *tP = pL; - - // Find insertion point -diff --git a/src/XrdSut/XrdSutAux.cc b/src/XrdSut/XrdSutAux.cc -index d4300bf..db4a98d 100644 ---- a/src/XrdSut/XrdSutAux.cc -+++ b/src/XrdSut/XrdSutAux.cc -@@ -598,7 +598,7 @@ XrdSutFileLocker::XrdSutFileLocker(int fd, ELockType lock) - fdesk = fd; - - // Exclusive lock of the whole file -- int lockmode = (lock == XrdSutFileLocker::kExcl) ? (F_WRLCK | F_RDLCK) -+ short int lockmode = (lock == XrdSutFileLocker::kExcl) ? (F_WRLCK | F_RDLCK) - : F_RDLCK; - #ifdef __macos__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; -diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc -index 5d0bf15..6c8d519 100644 ---- a/src/XrdSut/XrdSutPFile.cc -+++ b/src/XrdSut/XrdSutPFile.cc -@@ -378,7 +378,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - - // - // Shared or exclusive lock of the whole file -- int lockmode = (opt > 0) ? (F_WRLCK | F_RDLCK) : F_RDLCK; -+ short int lockmode = (opt > 0) ? (F_WRLCK | F_RDLCK) : F_RDLCK; - int lck = kMaxLockTries; - int rc = 0; - while (lck && rc == -1) { diff --git a/xrootd-3.1.0-rename-macos-to-apple.patch b/xrootd-3.1.0-rename-macos-to-apple.patch deleted file mode 100644 index cd8ce949e05..00000000000 --- a/xrootd-3.1.0-rename-macos-to-apple.patch +++ /dev/null @@ -1,784 +0,0 @@ -diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake -index 5a96792..88e6adc 100644 ---- a/cmake/XRootDOSDefs.cmake -+++ b/cmake/XRootDOSDefs.cmake -@@ -26,7 +26,6 @@ endif() - #------------------------------------------------------------------------------- - if( APPLE ) - set( MacOSX TRUE ) -- add_definitions( -D__macos__=1 ) - add_definitions( -DLT_MODULE_EXT=".dylib" ) - set( CMAKE_INSTALL_LIBDIR "lib" ) - set( CMAKE_INSTALL_BINDIR "bin" ) -diff --git a/src/Xrd/XrdBuffer.cc b/src/Xrd/XrdBuffer.cc -index b840fbb..0b0409e 100644 ---- a/src/Xrd/XrdBuffer.cc -+++ b/src/Xrd/XrdBuffer.cc -@@ -10,7 +10,7 @@ - - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc -index 0d3faf3..678a1ac 100644 ---- a/src/Xrd/XrdConfig.cc -+++ b/src/Xrd/XrdConfig.cc -@@ -44,7 +44,7 @@ - #ifdef __linux__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -592,7 +592,7 @@ int XrdConfig::setFDL() - // Set the limit to the maximum allowed - // - rlim.rlim_cur = rlim.rlim_max; --#if (defined(__macos__) && defined(MAC_OS_X_VERSION_10_5)) -+#if (defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_5)) - if (rlim.rlim_cur == RLIM_INFINITY || rlim.rlim_cur > OPEN_MAX) - rlim.rlim_cur = OPEN_MAX; - #endif -diff --git a/src/Xrd/XrdLink.cc b/src/Xrd/XrdLink.cc -index d2e7994..adaf81f 100644 ---- a/src/Xrd/XrdLink.cc -+++ b/src/Xrd/XrdLink.cc -@@ -25,7 +25,7 @@ - - #ifdef HAVE_SENDFILE - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/Xrd/XrdPollE.icc b/src/Xrd/XrdPollE.icc -index 6491b8e..8e031e8 100644 ---- a/src/Xrd/XrdPollE.icc -+++ b/src/Xrd/XrdPollE.icc -@@ -8,7 +8,7 @@ - /* DE-AC02-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #include -diff --git a/src/Xrd/XrdPollPoll.icc b/src/Xrd/XrdPollPoll.icc -index c311e42..5bd15f0 100644 ---- a/src/Xrd/XrdPollPoll.icc -+++ b/src/Xrd/XrdPollPoll.icc -@@ -8,7 +8,7 @@ - /* DE-AC03-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdScheduler.cc b/src/Xrd/XrdScheduler.cc -index 8a49c48..de9e99a 100644 ---- a/src/Xrd/XrdScheduler.cc -+++ b/src/Xrd/XrdScheduler.cc -@@ -13,7 +13,7 @@ - #include - #include - #include --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -208,7 +208,7 @@ void *XrdScheduler::Reaper() - int status; - pid_t pid; - XrdSchedulerPID *tp, *ptp, *xtp; --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - struct timespec ts = { 1, 0 }; - #else - sigset_t Sset; -@@ -236,7 +236,7 @@ void *XrdScheduler::Reaper() - } else {ptp = tp; tp = tp->next;} - } - ReaperMutex.UnLock(); --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - // Mac OS X sigwait() is broken on <= 10.4. - } while (nanosleep(&ts, 0) <= 0); - #else -diff --git a/src/Xrd/XrdStats.cc b/src/Xrd/XrdStats.cc -index 15389bf..a08dab2 100644 ---- a/src/Xrd/XrdStats.cc -+++ b/src/Xrd/XrdStats.cc -@@ -8,7 +8,7 @@ - /* DE-AC03-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/XrdClient/XrdClientConn.cc b/src/XrdClient/XrdClientConn.cc -index ec048dc..aefcf70 100644 ---- a/src/XrdClient/XrdClientConn.cc -+++ b/src/XrdClient/XrdClientConn.cc -@@ -46,7 +46,7 @@ - - #ifndef WIN32 - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #endif -diff --git a/src/XrdClient/XrdClientConst.hh b/src/XrdClient/XrdClientConst.hh -index 2928e1e..43c0086 100644 ---- a/src/XrdClient/XrdClientConst.hh -+++ b/src/XrdClient/XrdClientConst.hh -@@ -120,7 +120,7 @@ - // which enables window scaling on some platforms (linux, MacOsX) - // but may be to small on others (solaris); the preprocessor macro - // is set based on the platform information found in configure --#if defined(__linux__) || defined(__macos__) -+#if defined(__linux__) || defined(__APPLE__) - #define DFLT_DFLTTCPWINDOWSIZE (0) - #else - #define DFLT_DFLTTCPWINDOWSIZE (262144) -diff --git a/src/XrdCms/XrdCmsSecurity.cc b/src/XrdCms/XrdCmsSecurity.cc -index ba5553d..5ef1aa0 100644 ---- a/src/XrdCms/XrdCmsSecurity.cc -+++ b/src/XrdCms/XrdCmsSecurity.cc -@@ -20,7 +20,7 @@ - #endif - - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/XrdFfs/XrdFfsXrootdfs.cc b/src/XrdFfs/XrdFfsXrootdfs.cc -index e3e6b51..ce64bcb 100644 ---- a/src/XrdFfs/XrdFfsXrootdfs.cc -+++ b/src/XrdFfs/XrdFfsXrootdfs.cc -@@ -741,7 +741,7 @@ static int xrootdfs_statfs(const char *path, struct statvfs *stbuf) - // long long size; - - // XrdFfsMisc_xrd_secsss_register(fuse_get_context()->uid, fuse_get_context()->gid); --#ifndef __macos__ -+#ifndef __APPLE__ - stbuf->f_bsize = 1024; - #else - stbuf->f_bsize = 1024 * 128; // work around 32 bit fsblkcnt_t in struct statvfs on Mac OSX -diff --git a/src/XrdNet/XrdNetBuffer.cc b/src/XrdNet/XrdNetBuffer.cc -index 18dc6c4..c44355d 100644 ---- a/src/XrdNet/XrdNetBuffer.cc -+++ b/src/XrdNet/XrdNetBuffer.cc -@@ -17,7 +17,7 @@ const char *XrdNetBufferCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - #endif - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - -diff --git a/src/XrdOss/XrdOssAio.cc b/src/XrdOss/XrdOssAio.cc -index 9b030ef..3a41b7d 100644 ---- a/src/XrdOss/XrdOssAio.cc -+++ b/src/XrdOss/XrdOssAio.cc -@@ -19,7 +19,7 @@ const char *XrdOssAioCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - #ifdef __FreeBSD__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #else - #include -@@ -41,7 +41,7 @@ const char *XrdOssAioCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - // 1) No implementation of sigwaitinfo(). Though we can simulate it... - // 2) Event notification returns an incomplete siginfo structure. - // --#ifdef __macos__ -+#ifdef __APPLE__ - #undef _POSIX_ASYNCHRONOUS_IO - #endif - -@@ -382,7 +382,7 @@ void *XrdOssAioWait(void *mySigarg) - continue; - } - --#ifdef __macos__ -+#ifdef __APPLE__ - aiop = (XrdSfsAio *)myInfo.si_value.sigval_ptr; - #else - aiop = (XrdSfsAio *)myInfo.si_value.sival_ptr; -@@ -442,7 +442,7 @@ void XrdOssAioRSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoR->si_signo = info->si_signo; - XrdOssAioInfoR->si_errno = info->si_errno; - XrdOssAioInfoR->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoR->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoR->si_value.sival_ptr = info->si_value.sival_ptr; -@@ -470,7 +470,7 @@ void XrdOssAioWSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoW->si_signo = info->si_signo; - XrdOssAioInfoW->si_errno = info->si_errno; - XrdOssAioInfoW->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoW->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoW->si_value.sival_ptr = info->si_value.sival_ptr; -diff --git a/src/XrdOss/XrdOssCache.hh b/src/XrdOss/XrdOssCache.hh -index e82e7dd..faaec11 100644 ---- a/src/XrdOss/XrdOssCache.hh -+++ b/src/XrdOss/XrdOssCache.hh -@@ -43,7 +43,7 @@ - #define FS_BLKSZ f_bsize - #define FS_FFREE f_ffree - #endif --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #define STATFS_t struct statfs -diff --git a/src/XrdOss/XrdOssMSS.cc b/src/XrdOss/XrdOssMSS.cc -index 254c6be..8192667 100644 ---- a/src/XrdOss/XrdOssMSS.cc -+++ b/src/XrdOss/XrdOssMSS.cc -@@ -279,7 +279,7 @@ int XrdOssSys::MSS_Stat(const char *path, struct stat *buff) - buff->st_mtime = static_cast(mtime); - buff->st_size = static_cast(xt_size); - buff->st_blksize=static_cast(xt_blksize); --#ifdef __macos__ -+#ifdef __APPLE__ - buff->st_blocks = xt_blocks; - #else - buff->st_blocks =static_cast(xt_blocks); -diff --git a/src/XrdOss/XrdOssMio.cc b/src/XrdOss/XrdOssMio.cc -index 8a3d4b7..a3396c6 100644 ---- a/src/XrdOss/XrdOssMio.cc -+++ b/src/XrdOss/XrdOssMio.cc -@@ -40,7 +40,7 @@ char XrdOssMio::MM_chk = 0; - char XrdOssMio::MM_okmlock = 1; - char XrdOssMio::MM_preld = 0; - long long XrdOssMio::MM_pagsz = (long long)sysconf(_SC_PAGESIZE); --#ifdef __macos__ -+#ifdef __APPLE__ - long long XrdOssMio::MM_pages = 1024*1024*1024; - #else - long long XrdOssMio::MM_pages = (long long)sysconf(_SC_PHYS_PAGES); -diff --git a/src/XrdOuc/XrdOucCacheReal.cc b/src/XrdOuc/XrdOucCacheReal.cc -index fabbc89..ca5d1e5 100644 ---- a/src/XrdOuc/XrdOucCacheReal.cc -+++ b/src/XrdOuc/XrdOucCacheReal.cc -@@ -19,7 +19,7 @@ - #include "XrdOuc/XrdOucCacheData.hh" - #include "XrdSys/XrdSysHeaders.hh" - --#ifdef __macos__ -+#ifdef __APPLE__ - #ifndef MAP_ANONYMOUS - #define MAP_ANONYMOUS MAP_ANON - #endif -diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc -index b10cc1d..aa92be4 100644 ---- a/src/XrdPosix/XrdPosix.cc -+++ b/src/XrdPosix/XrdPosix.cc -@@ -293,7 +293,7 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream) - #if defined(__linux__) - else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN; - else stream->_flags |= _IO_EOF_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else if (bytes < 0) stream->_flags |= __SEOF; - else stream->_flags |= __SERR; - #else -@@ -459,7 +459,7 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream - #ifndef SUNX86 - #if defined(__linux__) - else stream->_flags |= _IO_ERR_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else stream->_flags |= __SERR; - #else - else stream->_flag |= _IOERR; -diff --git a/src/XrdPosix/XrdPosixLinkage.cc b/src/XrdPosix/XrdPosixLinkage.cc -index 7a9e838..e8a7d48 100644 ---- a/src/XrdPosix/XrdPosixLinkage.cc -+++ b/src/XrdPosix/XrdPosixLinkage.cc -@@ -24,7 +24,7 @@ const char *XrdPosixLinkageCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - #endif - - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - -diff --git a/src/XrdPosix/XrdPosixOsDep.hh b/src/XrdPosix/XrdPosixOsDep.hh -index bb16830..14b55cc 100644 ---- a/src/XrdPosix/XrdPosixOsDep.hh -+++ b/src/XrdPosix/XrdPosixOsDep.hh -@@ -26,7 +26,7 @@ - // appropriate type for the next 25 years). The Posix interface only supports - // 64-bit offsets. - // --#if defined(__macos__) -+#if defined(__APPLE__) - #if !defined(dirent64) - #define dirent64 dirent - #endif -diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc -index f5afe02..d24bab1 100644 ---- a/src/XrdPosix/XrdPosixPreload.cc -+++ b/src/XrdPosix/XrdPosixPreload.cc -@@ -150,7 +150,7 @@ int fcntl64(int fd, int cmd, ...) - /* f d a t a s y n c */ - /******************************************************************************/ - // On Mac it is the same as fsync --#if !defined(__macos__) -+#if !defined(__APPLE__) - extern "C" - { - int fdatasync(int fildes) -@@ -392,7 +392,7 @@ off64_t lseek64(int fildes, off64_t offset, int whence) - - extern "C" - { --#if defined(__linux__) || defined(__macos__) -+#if defined(__linux__) || defined(__APPLE__) - off_t llseek(int fildes, off_t offset, int whence) - #else - offset_t llseek(int fildes, offset_t offset, int whence) -diff --git a/src/XrdPosix/XrdPosixPreload32.cc b/src/XrdPosix/XrdPosixPreload32.cc -index 3147abc..eecbbab 100644 ---- a/src/XrdPosix/XrdPosixPreload32.cc -+++ b/src/XrdPosix/XrdPosixPreload32.cc -@@ -31,7 +31,7 @@ - #include - #include - --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #else -@@ -63,7 +63,7 @@ extern XrdPosixLinkage Xunix; - // making CopyDirent() superfluous. In Solaris x86 there are no 32 bit interfaces. - // - #if !defined(__LP64__) && !defined(_LP64) --#if !defined( __macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined( __APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - int XrdPosix_CopyDirent(struct dirent *dent, struct dirent64 *dent64) - { - const unsigned long long LLMask = 0xffffffff00000000LL; -@@ -362,7 +362,7 @@ struct dirent* readdir(DIR *dirp) - - if (!(dp64 = XrdPosix_Readdir64(dirp))) return 0; - --#if !defined(__macos__) && !defined(_LP64) && !defined(__LP64__) -+#if !defined(__APPLE__) && !defined(_LP64) && !defined(__LP64__) - if (XrdPosix_CopyDirent((struct dirent *)dp64, dp64)) return 0; - #endif - -@@ -381,7 +381,7 @@ extern "C" - int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) - { - static int Init = Xunix.Init(&Init); --#if defined(__macos__) || defined(__LP64__) || defined(_LP64) -+#if defined(__APPLE__) || defined(__LP64__) || defined(_LP64) - return XrdPosix_Readdir_r(dirp, entry, result); - #else - char buff[sizeof(struct dirent64) + 2048]; -@@ -459,7 +459,7 @@ int stat( const char *path, struct stat *buf) - /* s t a t f s */ - /******************************************************************************/ - --#if !defined(__solaris__) && !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__solaris__) && !defined(__APPLE__) && !defined(__FreeBSD__) - extern "C" - { - int statfs( const char *path, struct statfs *buf) -@@ -487,7 +487,7 @@ int statfs( const char *path, struct statfs *buf) - /* s t a t v f s */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - extern "C" - { - int statvfs( const char *path, struct statvfs *buf) -diff --git a/src/XrdPosix/XrdPosixXrootd.cc b/src/XrdPosix/XrdPosixXrootd.cc -index a89b5ee..3f7c727 100644 ---- a/src/XrdPosix/XrdPosixXrootd.cc -+++ b/src/XrdPosix/XrdPosixXrootd.cc -@@ -323,7 +323,7 @@ dirent64 *XrdPosixDir::nextEntry(dirent64 *dp) - cp = (fentries[fentry]).c_str(); - reclen = strlen(cp); - if (reclen > maxname) reclen = maxname; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - dp->d_fileno = fentry; - dp->d_type = DT_UNKNOWN; - dp->d_namlen = reclen; -@@ -1078,7 +1078,7 @@ struct dirent* XrdPosixXrootd::Readdir(DIR *dirp) - dp32 = (struct dirent *)dp64; - if (dp32->d_name != dp64->d_name) - {dp32->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - dp32->d_off = dp64->d_off; - #endif - dp32->d_reclen = dp64->d_reclen; -@@ -1119,7 +1119,7 @@ int XrdPosixXrootd::Readdir_r(DIR *dirp, struct dirent *entry, - if ((rc = Readdir64_r(dirp, 0, &dp64)) <= 0) {*result = 0; return rc;} - - entry->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - entry->d_off = dp64->d_off; - #endif - entry->d_reclen = dp64->d_reclen; -@@ -1274,12 +1274,12 @@ int XrdPosixXrootd::Statfs(const char *path, struct statfs *buf) - buf->f_bfree = myVfs.f_bfree; - buf->f_files = myVfs.f_files; - buf->f_ffree = myVfs.f_ffree; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - buf->f_iosize = myVfs.f_frsize; - #else - buf->f_frsize = myVfs.f_frsize; - #endif --#if defined(__linux__) || defined(__macos__) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) - buf->f_bavail = myVfs.f_bavail; - #endif - #if defined(__linux__) -diff --git a/src/XrdPosix/XrdPosixXrootd.hh b/src/XrdPosix/XrdPosixXrootd.hh -index ed83079..f69f8a4 100644 ---- a/src/XrdPosix/XrdPosixXrootd.hh -+++ b/src/XrdPosix/XrdPosixXrootd.hh -@@ -17,7 +17,7 @@ - #include - #include - --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #else -diff --git a/src/XrdSec/XrdSecPManager.cc b/src/XrdSec/XrdSecPManager.cc -index 9528cad..8056607 100644 ---- a/src/XrdSec/XrdSecPManager.cc -+++ b/src/XrdSec/XrdSecPManager.cc -@@ -24,7 +24,7 @@ const char *XrdSecPManagerCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - #endif - - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - #include -diff --git a/src/XrdSecpwd/XrdSecpwdPlatform.hh b/src/XrdSecpwd/XrdSecpwdPlatform.hh -index 0744ef8..dc45d58 100644 ---- a/src/XrdSecpwd/XrdSecpwdPlatform.hh -+++ b/src/XrdSecpwd/XrdSecpwdPlatform.hh -@@ -17,7 +17,7 @@ - #if defined(__solaris__) - #include - #endif --#if defined(__osf__) || defined(__sgi) || defined(__macos__) -+#if defined(__osf__) || defined(__sgi) || defined(__APPLE__) - extern "C" char *crypt(const char *, const char *); - #endif - -diff --git a/src/XrdSfs/XrdSfsAio.hh b/src/XrdSfs/XrdSfsAio.hh -index 91aaeae..81e0a01 100644 ---- a/src/XrdSfs/XrdSfsAio.hh -+++ b/src/XrdSfs/XrdSfsAio.hh -@@ -15,7 +15,7 @@ - #include - #include - #ifdef _POSIX_ASYNCHRONOUS_IO --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #include - #else -@@ -58,7 +58,7 @@ virtual void doneWrite() = 0; - virtual void Recycle() = 0; - - XrdSfsAio() { --#if defined(__macos__) && (!defined(MAC_OS_X_VERSION_10_4) || \ -+#if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_10_4) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4) - sfsAio.aio_sigevent.sigev_value.sigval_ptr = (void *)this; - #else -diff --git a/src/XrdSut/XrdSutAux.cc b/src/XrdSut/XrdSutAux.cc -index db4a98d..25d87bb 100644 ---- a/src/XrdSut/XrdSutAux.cc -+++ b/src/XrdSut/XrdSutAux.cc -@@ -600,7 +600,7 @@ XrdSutFileLocker::XrdSutFileLocker(int fd, ELockType lock) - // Exclusive lock of the whole file - short int lockmode = (lock == XrdSutFileLocker::kExcl) ? (F_WRLCK | F_RDLCK) - : F_RDLCK; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -621,7 +621,7 @@ XrdSutFileLocker::~XrdSutFileLocker() - return; - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc -index 6c8d519..2c7d118 100644 ---- a/src/XrdSut/XrdSutPFile.cc -+++ b/src/XrdSut/XrdSutPFile.cc -@@ -382,7 +382,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - int lck = kMaxLockTries; - int rc = 0; - while (lck && rc == -1) { --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -399,7 +399,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - if (errno == EACCES || errno == EAGAIN) { - // File locked by other process - int pid = -1; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -434,7 +434,7 @@ kXR_int32 XrdSutPFile::Close(kXR_int32 fd) - - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSys/XrdSysDNS.cc b/src/XrdSys/XrdSysDNS.cc -index 5f6dd87..2cf3417 100644 ---- a/src/XrdSys/XrdSysDNS.cc -+++ b/src/XrdSys/XrdSysDNS.cc -@@ -95,8 +95,8 @@ int XrdSysDNS::getHostAddr(const char *InetName, - // default /etc/hosts on some platforms, e.g. MacOsX) - // - // if (!strncmp(InetName,"localhost",9)) myhints.ai_family = AF_INET; --// pcal: force ipv4 (was only for MacOS: ifdef __macos____) --//#ifdef __macos__ -+// pcal: force ipv4 (was only for MacOS: ifdef __APPLE____) -+//#ifdef __APPLE__ - // Disable IPv6 for MacOS X altogether for the time being - // - myhints.ai_family = AF_INET; -@@ -257,7 +257,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - // Some platforms have nameinfo but getnameinfo() is broken. If so, we revert - // to using the gethostbyaddr(). - // --#if defined(HAVE_NAMEINFO) && !defined(__macos__) -+#if defined(HAVE_NAMEINFO) && !defined(__APPLE__) - struct addrinfo *rp, *np; - struct addrinfo myhints = {AI_CANONNAME}; - #elif defined(HAVE_GETHBYXR) -@@ -282,7 +282,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - if (InetAddr.sa_family == AF_UNIX) - {InetName[0] = strdup("localhost"); return 1;} - --#if !defined(HAVE_NAMEINFO) || defined(__macos__) -+#if !defined(HAVE_NAMEINFO) || defined(__APPLE__) - - // Convert it to a host name - // -diff --git a/src/XrdSys/XrdSysFAttr.cc b/src/XrdSys/XrdSysFAttr.cc -index c847d57..212c558 100644 ---- a/src/XrdSys/XrdSysFAttr.cc -+++ b/src/XrdSys/XrdSysFAttr.cc -@@ -37,7 +37,7 @@ XrdSysError *XrdSysFAttr::Say = 0; - #include "XrdSys/XrdSysFAttrBsd.icc" - #elif defined(__linux__) - #include "XrdSys/XrdSysFAttrLnx.icc" --#elif defined(__macos__) -+#elif defined(__APPLE__) - #include "XrdSys/XrdSysFAttrMac.icc" - #elif defined(__solaris__) - #include "XrdSys/XrdSysFAttrSun.icc" -diff --git a/src/XrdSys/XrdSysPlatform.cc b/src/XrdSys/XrdSysPlatform.cc -index fd290c9..7c5448d 100644 ---- a/src/XrdSys/XrdSysPlatform.cc -+++ b/src/XrdSys/XrdSysPlatform.cc -@@ -23,7 +23,7 @@ const char *XrdSysPlatformCVSID = "$Id: xrootd-3.1.0-rename-macos-to-apple.patch,v 1.1 2012/09/14 08:04:04 davidlt Exp $"; - #if defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || \ - defined(__IEEE_LITTLE_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) --#if !defined(__GNUC__) || defined(__macos__) -+#if !defined(__GNUC__) || defined(__APPLE__) - extern "C" - { - unsigned long long Swap_n2hll(unsigned long long x) -@@ -54,7 +54,7 @@ size_t strlcpy(char *dst, const char *src, size_t sz) - } - } - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - // This is not re-enetrant or mt-safe but it's all we have - // -diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh -index 5de8085..7fad4a0 100644 ---- a/src/XrdSys/XrdSysPlatform.hh -+++ b/src/XrdSys/XrdSysPlatform.hh -@@ -23,7 +23,7 @@ - #include - #define MAXNAMELEN NAME_MAX - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #include - #define fdatasync(x) fsync(x) -@@ -50,7 +50,7 @@ - ((*memp = memalign(algn, sz)) ? 0 : ENOMEM) - #endif - --#if defined(__linux__) || defined(__macos__) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) - - #define S_IAMB 0x1FF /* access mode bits */ - -@@ -89,7 +89,7 @@ typedef off_t offset_t; - - // For alternative platforms - // --#ifdef __macos__ -+#ifdef __APPLE__ - #include - extern char *cuserid(char *s); - #ifndef POLLRDNORM -@@ -140,7 +140,7 @@ typedef off_t off64_t; - #elif defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || \ - defined(__IEEE_LITTLE_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) --#if !defined(__GNUC__) || defined(__macos__) -+#if !defined(__GNUC__) || defined(__APPLE__) - - #if !defined(__sun) || (defined(__sun) && (!defined(_LP64) || defined(__SunOS_5_10))) - extern "C" unsigned long long Swap_n2hll(unsigned long long x); -@@ -207,7 +207,7 @@ extern "C" - # define SOCKLEN_t size_t - #elif defined(XR__GLIBC) || \ - defined(__FreeBSD__) || \ -- (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__macos__) -+ (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) - # ifndef SOCKLEN_t - # define SOCKLEN_t socklen_t - # endif -diff --git a/src/XrdSys/XrdSysPlugin.cc b/src/XrdSys/XrdSysPlugin.cc -index ecdb5c5..e51ddf7 100644 ---- a/src/XrdSys/XrdSysPlugin.cc -+++ b/src/XrdSys/XrdSysPlugin.cc -@@ -21,7 +21,7 @@ - - #ifndef WIN32 - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - #include -@@ -77,7 +77,7 @@ void *XrdSysPlugin::getPlugin(const char *pname, int errok, bool global) - // - if (!(msgPath = libPath)) - {msgPath = "executable image"; --#if defined(__macos__) -+#if defined(__APPLE__) - flags = RTLD_FIRST; - #elif defined(__linux__) - flags = RTLD_NOW | RTLD_NODELETE; -diff --git a/src/XrdSys/XrdSysPthread.cc b/src/XrdSys/XrdSysPthread.cc -index 503c598..0adf52e 100644 ---- a/src/XrdSys/XrdSysPthread.cc -+++ b/src/XrdSys/XrdSysPthread.cc -@@ -73,7 +73,7 @@ void *XrdSysThread_Xeq(void *myargs) - myNum = static_cast(getpid()); - #elif defined(__solaris__) - myNum = static_cast(pthread_self()); --#elif defined(__macos__) -+#elif defined(__APPLE__) - myNum = static_cast(pthread_mach_thread_np(pthread_self())); - #else - static XrdSysMutex numMutex; -@@ -185,7 +185,7 @@ int XrdSysCondVar::WaitMS(int msec) - /* C o n d W a i t */ - /******************************************************************************/ - --#ifdef __macos__ -+#ifdef __APPLE__ - - int XrdSysSemaphore::CondWait() - { -diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh -index eb44161..5fc1b42 100644 ---- a/src/XrdSys/XrdSysPthread.hh -+++ b/src/XrdSys/XrdSysPthread.hh -@@ -274,7 +274,7 @@ XrdSysRWLock *lck; - // semaphores need to be implemented based on condition - // variables since no native implementation is available. - --#ifdef __macos__ -+#ifdef __APPLE__ - class XrdSysSemaphore - { - public: -diff --git a/src/XrdXrootd/XrdXrootdLoadLib.cc b/src/XrdXrootd/XrdXrootdLoadLib.cc -index bde8509..f60e6e5 100644 ---- a/src/XrdXrootd/XrdXrootdLoadLib.cc -+++ b/src/XrdXrootd/XrdXrootdLoadLib.cc -@@ -20,7 +20,7 @@ - #endif - - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/XrdXrootd/XrdXrootdMonitor.cc b/src/XrdXrootd/XrdXrootdMonitor.cc -index d1e3ffd..44c0dac 100644 ---- a/src/XrdXrootd/XrdXrootdMonitor.cc -+++ b/src/XrdXrootd/XrdXrootdMonitor.cc -@@ -14,7 +14,7 @@ - #include - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - diff --git a/xrootd-3.2.3-rename-macos-to-apple.patch b/xrootd-3.2.3-rename-macos-to-apple.patch deleted file mode 100644 index a8000a49278..00000000000 --- a/xrootd-3.2.3-rename-macos-to-apple.patch +++ /dev/null @@ -1,775 +0,0 @@ -diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake -index b3b183b..ab38043 100644 ---- a/cmake/XRootDOSDefs.cmake -+++ b/cmake/XRootDOSDefs.cmake -@@ -26,7 +26,6 @@ endif() - #------------------------------------------------------------------------------- - if( APPLE ) - set( MacOSX TRUE ) -- add_definitions( -D__macos__=1 ) - add_definitions( -DLT_MODULE_EXT=".dylib" ) - set( CMAKE_INSTALL_LIBDIR "lib" ) - set( CMAKE_INSTALL_BINDIR "bin" ) -diff --git a/src/Xrd/XrdBuffer.cc b/src/Xrd/XrdBuffer.cc -index b840fbb..0b0409e 100644 ---- a/src/Xrd/XrdBuffer.cc -+++ b/src/Xrd/XrdBuffer.cc -@@ -10,7 +10,7 @@ - - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc -index d14a7ea..bba99c9 100644 ---- a/src/Xrd/XrdConfig.cc -+++ b/src/Xrd/XrdConfig.cc -@@ -44,7 +44,7 @@ - #ifdef __linux__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -595,7 +595,7 @@ int XrdConfig::setFDL() - // Set the limit to the maximum allowed - // - rlim.rlim_cur = rlim.rlim_max; --#if (defined(__macos__) && defined(MAC_OS_X_VERSION_10_5)) -+#if (defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_5)) - if (rlim.rlim_cur == RLIM_INFINITY || rlim.rlim_cur > OPEN_MAX) - rlim.rlim_cur = OPEN_MAX; - #endif -diff --git a/src/Xrd/XrdLink.cc b/src/Xrd/XrdLink.cc -index 118fd4b..c8f978e 100644 ---- a/src/Xrd/XrdLink.cc -+++ b/src/Xrd/XrdLink.cc -@@ -25,7 +25,7 @@ - - #ifdef HAVE_SENDFILE - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/Xrd/XrdPollE.icc b/src/Xrd/XrdPollE.icc -index 6491b8e..8e031e8 100644 ---- a/src/Xrd/XrdPollE.icc -+++ b/src/Xrd/XrdPollE.icc -@@ -8,7 +8,7 @@ - /* DE-AC02-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #include -diff --git a/src/Xrd/XrdPollPoll.icc b/src/Xrd/XrdPollPoll.icc -index c311e42..5bd15f0 100644 ---- a/src/Xrd/XrdPollPoll.icc -+++ b/src/Xrd/XrdPollPoll.icc -@@ -8,7 +8,7 @@ - /* DE-AC03-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdScheduler.cc b/src/Xrd/XrdScheduler.cc -index 8a49c48..de9e99a 100644 ---- a/src/Xrd/XrdScheduler.cc -+++ b/src/Xrd/XrdScheduler.cc -@@ -13,7 +13,7 @@ - #include - #include - #include --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -208,7 +208,7 @@ void *XrdScheduler::Reaper() - int status; - pid_t pid; - XrdSchedulerPID *tp, *ptp, *xtp; --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - struct timespec ts = { 1, 0 }; - #else - sigset_t Sset; -@@ -236,7 +236,7 @@ void *XrdScheduler::Reaper() - } else {ptp = tp; tp = tp->next;} - } - ReaperMutex.UnLock(); --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - // Mac OS X sigwait() is broken on <= 10.4. - } while (nanosleep(&ts, 0) <= 0); - #else -diff --git a/src/Xrd/XrdStats.cc b/src/Xrd/XrdStats.cc -index 15389bf..a08dab2 100644 ---- a/src/Xrd/XrdStats.cc -+++ b/src/Xrd/XrdStats.cc -@@ -8,7 +8,7 @@ - /* DE-AC03-76-SFO0515 with the Department of Energy */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/XrdClient/XrdClientConn.cc b/src/XrdClient/XrdClientConn.cc -index fd6d7cd..6cb0e2b 100644 ---- a/src/XrdClient/XrdClientConn.cc -+++ b/src/XrdClient/XrdClientConn.cc -@@ -47,7 +47,7 @@ - - #ifndef WIN32 - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #endif -diff --git a/src/XrdClient/XrdClientConst.hh b/src/XrdClient/XrdClientConst.hh -index fe2bf17..6e304dc 100644 ---- a/src/XrdClient/XrdClientConst.hh -+++ b/src/XrdClient/XrdClientConst.hh -@@ -120,7 +120,7 @@ - // which enables window scaling on some platforms (linux, MacOsX) - // but may be to small on others (solaris); the preprocessor macro - // is set based on the platform information found in configure --#if defined(__linux__) || defined(__macos__) -+#if defined(__linux__) || defined(__APPLE__) - #define DFLT_DFLTTCPWINDOWSIZE (0) - #else - #define DFLT_DFLTTCPWINDOWSIZE (262144) -diff --git a/src/XrdCms/XrdCmsSecurity.cc b/src/XrdCms/XrdCmsSecurity.cc -index ba5553d..5ef1aa0 100644 ---- a/src/XrdCms/XrdCmsSecurity.cc -+++ b/src/XrdCms/XrdCmsSecurity.cc -@@ -20,7 +20,7 @@ - #endif - - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/XrdFfs/XrdFfsXrootdfs.cc b/src/XrdFfs/XrdFfsXrootdfs.cc -index b0dbc48..dc23680 100644 ---- a/src/XrdFfs/XrdFfsXrootdfs.cc -+++ b/src/XrdFfs/XrdFfsXrootdfs.cc -@@ -752,7 +752,7 @@ static int xrootdfs_statfs(const char *path, struct statvfs *stbuf) - // long long size; - - // XrdFfsMisc_xrd_secsss_register(fuse_get_context()->uid, fuse_get_context()->gid); --#ifndef __macos__ -+#ifndef __APPLE__ - stbuf->f_bsize = 1024; - #else - stbuf->f_bsize = 1024 * 128; // work around 32 bit fsblkcnt_t in struct statvfs on Mac OSX -diff --git a/src/XrdNet/XrdNetBuffer.cc b/src/XrdNet/XrdNetBuffer.cc -index 18dc6c4..c44355d 100644 ---- a/src/XrdNet/XrdNetBuffer.cc -+++ b/src/XrdNet/XrdNetBuffer.cc -@@ -17,7 +17,7 @@ const char *XrdNetBufferCVSID = "$Id: xrootd-3.2.3-rename-macos-to-apple.patch,v 1.1 2012/09/05 21:55:55 davidlt Exp $"; - #endif - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - -diff --git a/src/XrdOss/XrdOssAio.cc b/src/XrdOss/XrdOssAio.cc -index 8e75663..9fedd8b 100644 ---- a/src/XrdOss/XrdOssAio.cc -+++ b/src/XrdOss/XrdOssAio.cc -@@ -16,7 +16,7 @@ - #ifdef __FreeBSD__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #else - #include -@@ -38,7 +38,7 @@ - // 1) No implementation of sigwaitinfo(). Though we can simulate it... - // 2) Event notification returns an incomplete siginfo structure. - // --#ifdef __macos__ -+#ifdef __APPLE__ - #undef _POSIX_ASYNCHRONOUS_IO - #endif - -@@ -379,7 +379,7 @@ void *XrdOssAioWait(void *mySigarg) - continue; - } - --#ifdef __macos__ -+#ifdef __APPLE__ - aiop = (XrdSfsAio *)myInfo.si_value.sigval_ptr; - #else - aiop = (XrdSfsAio *)myInfo.si_value.sival_ptr; -@@ -439,7 +439,7 @@ void XrdOssAioRSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoR->si_signo = info->si_signo; - XrdOssAioInfoR->si_errno = info->si_errno; - XrdOssAioInfoR->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoR->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoR->si_value.sival_ptr = info->si_value.sival_ptr; -@@ -467,7 +467,7 @@ void XrdOssAioWSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoW->si_signo = info->si_signo; - XrdOssAioInfoW->si_errno = info->si_errno; - XrdOssAioInfoW->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoW->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoW->si_value.sival_ptr = info->si_value.sival_ptr; -diff --git a/src/XrdOss/XrdOssCache.hh b/src/XrdOss/XrdOssCache.hh -index e82e7dd..faaec11 100644 ---- a/src/XrdOss/XrdOssCache.hh -+++ b/src/XrdOss/XrdOssCache.hh -@@ -43,7 +43,7 @@ - #define FS_BLKSZ f_bsize - #define FS_FFREE f_ffree - #endif --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #define STATFS_t struct statfs -diff --git a/src/XrdOss/XrdOssMSS.cc b/src/XrdOss/XrdOssMSS.cc -index 254c6be..8192667 100644 ---- a/src/XrdOss/XrdOssMSS.cc -+++ b/src/XrdOss/XrdOssMSS.cc -@@ -279,7 +279,7 @@ int XrdOssSys::MSS_Stat(const char *path, struct stat *buff) - buff->st_mtime = static_cast(mtime); - buff->st_size = static_cast(xt_size); - buff->st_blksize=static_cast(xt_blksize); --#ifdef __macos__ -+#ifdef __APPLE__ - buff->st_blocks = xt_blocks; - #else - buff->st_blocks =static_cast(xt_blocks); -diff --git a/src/XrdOss/XrdOssMio.cc b/src/XrdOss/XrdOssMio.cc -index 8a3d4b7..a3396c6 100644 ---- a/src/XrdOss/XrdOssMio.cc -+++ b/src/XrdOss/XrdOssMio.cc -@@ -40,7 +40,7 @@ char XrdOssMio::MM_chk = 0; - char XrdOssMio::MM_okmlock = 1; - char XrdOssMio::MM_preld = 0; - long long XrdOssMio::MM_pagsz = (long long)sysconf(_SC_PAGESIZE); --#ifdef __macos__ -+#ifdef __APPLE__ - long long XrdOssMio::MM_pages = 1024*1024*1024; - #else - long long XrdOssMio::MM_pages = (long long)sysconf(_SC_PHYS_PAGES); -diff --git a/src/XrdOuc/XrdOucCacheReal.cc b/src/XrdOuc/XrdOucCacheReal.cc -index fabbc89..ca5d1e5 100644 ---- a/src/XrdOuc/XrdOucCacheReal.cc -+++ b/src/XrdOuc/XrdOucCacheReal.cc -@@ -19,7 +19,7 @@ - #include "XrdOuc/XrdOucCacheData.hh" - #include "XrdSys/XrdSysHeaders.hh" - --#ifdef __macos__ -+#ifdef __APPLE__ - #ifndef MAP_ANONYMOUS - #define MAP_ANONYMOUS MAP_ANON - #endif -diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc -index b10cc1d..aa92be4 100644 ---- a/src/XrdPosix/XrdPosix.cc -+++ b/src/XrdPosix/XrdPosix.cc -@@ -293,7 +293,7 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream) - #if defined(__linux__) - else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN; - else stream->_flags |= _IO_EOF_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else if (bytes < 0) stream->_flags |= __SEOF; - else stream->_flags |= __SERR; - #else -@@ -459,7 +459,7 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream - #ifndef SUNX86 - #if defined(__linux__) - else stream->_flags |= _IO_ERR_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else stream->_flags |= __SERR; - #else - else stream->_flag |= _IOERR; -diff --git a/src/XrdPosix/XrdPosixLinkage.cc b/src/XrdPosix/XrdPosixLinkage.cc -index 7a9e838..e8a7d48 100644 ---- a/src/XrdPosix/XrdPosixLinkage.cc -+++ b/src/XrdPosix/XrdPosixLinkage.cc -@@ -24,7 +24,7 @@ const char *XrdPosixLinkageCVSID = "$Id: xrootd-3.2.3-rename-macos-to-apple.patch,v 1.1 2012/09/05 21:55:55 davidlt Exp $"; - #endif - - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - -diff --git a/src/XrdPosix/XrdPosixOsDep.hh b/src/XrdPosix/XrdPosixOsDep.hh -index bb16830..14b55cc 100644 ---- a/src/XrdPosix/XrdPosixOsDep.hh -+++ b/src/XrdPosix/XrdPosixOsDep.hh -@@ -26,7 +26,7 @@ - // appropriate type for the next 25 years). The Posix interface only supports - // 64-bit offsets. - // --#if defined(__macos__) -+#if defined(__APPLE__) - #if !defined(dirent64) - #define dirent64 dirent - #endif -diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc -index f5afe02..d24bab1 100644 ---- a/src/XrdPosix/XrdPosixPreload.cc -+++ b/src/XrdPosix/XrdPosixPreload.cc -@@ -150,7 +150,7 @@ int fcntl64(int fd, int cmd, ...) - /* f d a t a s y n c */ - /******************************************************************************/ - // On Mac it is the same as fsync --#if !defined(__macos__) -+#if !defined(__APPLE__) - extern "C" - { - int fdatasync(int fildes) -@@ -392,7 +392,7 @@ off64_t lseek64(int fildes, off64_t offset, int whence) - - extern "C" - { --#if defined(__linux__) || defined(__macos__) -+#if defined(__linux__) || defined(__APPLE__) - off_t llseek(int fildes, off_t offset, int whence) - #else - offset_t llseek(int fildes, offset_t offset, int whence) -diff --git a/src/XrdPosix/XrdPosixPreload32.cc b/src/XrdPosix/XrdPosixPreload32.cc -index 3147abc..eecbbab 100644 ---- a/src/XrdPosix/XrdPosixPreload32.cc -+++ b/src/XrdPosix/XrdPosixPreload32.cc -@@ -31,7 +31,7 @@ - #include - #include - --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #else -@@ -63,7 +63,7 @@ extern XrdPosixLinkage Xunix; - // making CopyDirent() superfluous. In Solaris x86 there are no 32 bit interfaces. - // - #if !defined(__LP64__) && !defined(_LP64) --#if !defined( __macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined( __APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - int XrdPosix_CopyDirent(struct dirent *dent, struct dirent64 *dent64) - { - const unsigned long long LLMask = 0xffffffff00000000LL; -@@ -362,7 +362,7 @@ struct dirent* readdir(DIR *dirp) - - if (!(dp64 = XrdPosix_Readdir64(dirp))) return 0; - --#if !defined(__macos__) && !defined(_LP64) && !defined(__LP64__) -+#if !defined(__APPLE__) && !defined(_LP64) && !defined(__LP64__) - if (XrdPosix_CopyDirent((struct dirent *)dp64, dp64)) return 0; - #endif - -@@ -381,7 +381,7 @@ extern "C" - int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) - { - static int Init = Xunix.Init(&Init); --#if defined(__macos__) || defined(__LP64__) || defined(_LP64) -+#if defined(__APPLE__) || defined(__LP64__) || defined(_LP64) - return XrdPosix_Readdir_r(dirp, entry, result); - #else - char buff[sizeof(struct dirent64) + 2048]; -@@ -459,7 +459,7 @@ int stat( const char *path, struct stat *buf) - /* s t a t f s */ - /******************************************************************************/ - --#if !defined(__solaris__) && !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__solaris__) && !defined(__APPLE__) && !defined(__FreeBSD__) - extern "C" - { - int statfs( const char *path, struct statfs *buf) -@@ -487,7 +487,7 @@ int statfs( const char *path, struct statfs *buf) - /* s t a t v f s */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - extern "C" - { - int statvfs( const char *path, struct statvfs *buf) -diff --git a/src/XrdPosix/XrdPosixXrootd.cc b/src/XrdPosix/XrdPosixXrootd.cc -index 89a45d7..71d6a3d 100644 ---- a/src/XrdPosix/XrdPosixXrootd.cc -+++ b/src/XrdPosix/XrdPosixXrootd.cc -@@ -325,7 +325,7 @@ dirent64 *XrdPosixDir::nextEntry(dirent64 *dp) - cp = (fentries[fentry]).c_str(); - reclen = strlen(cp); - if (reclen > maxname) reclen = maxname; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - dp->d_fileno = fentry; - dp->d_type = DT_UNKNOWN; - dp->d_namlen = reclen; -@@ -1090,7 +1090,7 @@ struct dirent* XrdPosixXrootd::Readdir(DIR *dirp) - dp32 = (struct dirent *)dp64; - if (dp32->d_name != dp64->d_name) - {dp32->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - dp32->d_off = dp64->d_off; - #endif - dp32->d_reclen = dp64->d_reclen; -@@ -1131,7 +1131,7 @@ int XrdPosixXrootd::Readdir_r(DIR *dirp, struct dirent *entry, - if ((rc = Readdir64_r(dirp, 0, &dp64)) <= 0) {*result = 0; return rc;} - - entry->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - entry->d_off = dp64->d_off; - #endif - entry->d_reclen = dp64->d_reclen; -@@ -1286,12 +1286,12 @@ int XrdPosixXrootd::Statfs(const char *path, struct statfs *buf) - buf->f_bfree = myVfs.f_bfree; - buf->f_files = myVfs.f_files; - buf->f_ffree = myVfs.f_ffree; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - buf->f_iosize = myVfs.f_frsize; - #else - buf->f_frsize = myVfs.f_frsize; - #endif --#if defined(__linux__) || defined(__macos__) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) - buf->f_bavail = myVfs.f_bavail; - #endif - #if defined(__linux__) -diff --git a/src/XrdPosix/XrdPosixXrootd.hh b/src/XrdPosix/XrdPosixXrootd.hh -index c70713a..33bd67c 100644 ---- a/src/XrdPosix/XrdPosixXrootd.hh -+++ b/src/XrdPosix/XrdPosixXrootd.hh -@@ -17,7 +17,7 @@ - #include - #include - --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #else -diff --git a/src/XrdSec/XrdSecPManager.cc b/src/XrdSec/XrdSecPManager.cc -index 9528cad..8056607 100644 ---- a/src/XrdSec/XrdSecPManager.cc -+++ b/src/XrdSec/XrdSecPManager.cc -@@ -24,7 +24,7 @@ const char *XrdSecPManagerCVSID = "$Id: xrootd-3.2.3-rename-macos-to-apple.patch,v 1.1 2012/09/05 21:55:55 davidlt Exp $"; - #endif - - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - #include -diff --git a/src/XrdSecpwd/XrdSecpwdPlatform.hh b/src/XrdSecpwd/XrdSecpwdPlatform.hh -index 0744ef8..dc45d58 100644 ---- a/src/XrdSecpwd/XrdSecpwdPlatform.hh -+++ b/src/XrdSecpwd/XrdSecpwdPlatform.hh -@@ -17,7 +17,7 @@ - #if defined(__solaris__) - #include - #endif --#if defined(__osf__) || defined(__sgi) || defined(__macos__) -+#if defined(__osf__) || defined(__sgi) || defined(__APPLE__) - extern "C" char *crypt(const char *, const char *); - #endif - -diff --git a/src/XrdSfs/XrdSfsAio.hh b/src/XrdSfs/XrdSfsAio.hh -index 91aaeae..81e0a01 100644 ---- a/src/XrdSfs/XrdSfsAio.hh -+++ b/src/XrdSfs/XrdSfsAio.hh -@@ -15,7 +15,7 @@ - #include - #include - #ifdef _POSIX_ASYNCHRONOUS_IO --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #include - #else -@@ -58,7 +58,7 @@ virtual void doneWrite() = 0; - virtual void Recycle() = 0; - - XrdSfsAio() { --#if defined(__macos__) && (!defined(MAC_OS_X_VERSION_10_4) || \ -+#if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_10_4) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4) - sfsAio.aio_sigevent.sigev_value.sigval_ptr = (void *)this; - #else -diff --git a/src/XrdSut/XrdSutAux.cc b/src/XrdSut/XrdSutAux.cc -index 6fbcf04..e53f4de 100644 ---- a/src/XrdSut/XrdSutAux.cc -+++ b/src/XrdSut/XrdSutAux.cc -@@ -600,7 +600,7 @@ XrdSutFileLocker::XrdSutFileLocker(int fd, ELockType lock) - // Exclusive lock of the whole file - short int lockmode = (lock == XrdSutFileLocker::kExcl) ? (F_WRLCK | F_RDLCK) - : F_RDLCK; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -621,7 +621,7 @@ XrdSutFileLocker::~XrdSutFileLocker() - return; - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc -index 6c8d519..2c7d118 100644 ---- a/src/XrdSut/XrdSutPFile.cc -+++ b/src/XrdSut/XrdSutPFile.cc -@@ -382,7 +382,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - int lck = kMaxLockTries; - int rc = 0; - while (lck && rc == -1) { --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -399,7 +399,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - if (errno == EACCES || errno == EAGAIN) { - // File locked by other process - int pid = -1; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -434,7 +434,7 @@ kXR_int32 XrdSutPFile::Close(kXR_int32 fd) - - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSys/XrdSysDNS.cc b/src/XrdSys/XrdSysDNS.cc -index 5f6dd87..2cf3417 100644 ---- a/src/XrdSys/XrdSysDNS.cc -+++ b/src/XrdSys/XrdSysDNS.cc -@@ -95,8 +95,8 @@ int XrdSysDNS::getHostAddr(const char *InetName, - // default /etc/hosts on some platforms, e.g. MacOsX) - // - // if (!strncmp(InetName,"localhost",9)) myhints.ai_family = AF_INET; --// pcal: force ipv4 (was only for MacOS: ifdef __macos____) --//#ifdef __macos__ -+// pcal: force ipv4 (was only for MacOS: ifdef __APPLE____) -+//#ifdef __APPLE__ - // Disable IPv6 for MacOS X altogether for the time being - // - myhints.ai_family = AF_INET; -@@ -257,7 +257,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - // Some platforms have nameinfo but getnameinfo() is broken. If so, we revert - // to using the gethostbyaddr(). - // --#if defined(HAVE_NAMEINFO) && !defined(__macos__) -+#if defined(HAVE_NAMEINFO) && !defined(__APPLE__) - struct addrinfo *rp, *np; - struct addrinfo myhints = {AI_CANONNAME}; - #elif defined(HAVE_GETHBYXR) -@@ -282,7 +282,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - if (InetAddr.sa_family == AF_UNIX) - {InetName[0] = strdup("localhost"); return 1;} - --#if !defined(HAVE_NAMEINFO) || defined(__macos__) -+#if !defined(HAVE_NAMEINFO) || defined(__APPLE__) - - // Convert it to a host name - // -diff --git a/src/XrdSys/XrdSysFAttr.cc b/src/XrdSys/XrdSysFAttr.cc -index c847d57..212c558 100644 ---- a/src/XrdSys/XrdSysFAttr.cc -+++ b/src/XrdSys/XrdSysFAttr.cc -@@ -37,7 +37,7 @@ XrdSysError *XrdSysFAttr::Say = 0; - #include "XrdSys/XrdSysFAttrBsd.icc" - #elif defined(__linux__) - #include "XrdSys/XrdSysFAttrLnx.icc" --#elif defined(__macos__) -+#elif defined(__APPLE__) - #include "XrdSys/XrdSysFAttrMac.icc" - #elif defined(__solaris__) - #include "XrdSys/XrdSysFAttrSun.icc" -diff --git a/src/XrdSys/XrdSysPlatform.cc b/src/XrdSys/XrdSysPlatform.cc -index 457b54e..3ef965e 100644 ---- a/src/XrdSys/XrdSysPlatform.cc -+++ b/src/XrdSys/XrdSysPlatform.cc -@@ -19,7 +19,7 @@ - #if defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || \ - defined(__IEEE_LITTLE_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) --#if !defined(__GNUC__) || defined(__macos__) -+#if !defined(__GNUC__) || defined(__APPLE__) - extern "C" - { - unsigned long long Swap_n2hll(unsigned long long x) -diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh -index 334a89d..3ba652e 100644 ---- a/src/XrdSys/XrdSysPlatform.hh -+++ b/src/XrdSys/XrdSysPlatform.hh -@@ -23,7 +23,7 @@ - #include - #define MAXNAMELEN NAME_MAX - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #include - #define fdatasync(x) fsync(x) -@@ -50,7 +50,7 @@ - ((*memp = memalign(algn, sz)) ? 0 : ENOMEM) - #endif - --#if defined(__linux__) || defined(__macos__) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) - - #define S_IAMB 0x1FF /* access mode bits */ - -@@ -89,7 +89,7 @@ typedef off_t offset_t; - - // For alternative platforms - // --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #ifndef POLLRDNORM - #define POLLRDNORM 0 -@@ -139,7 +139,7 @@ typedef off_t off64_t; - #elif defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || \ - defined(__IEEE_LITTLE_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) --#if !defined(__GNUC__) || defined(__macos__) -+#if !defined(__GNUC__) || defined(__APPLE__) - - #if !defined(__sun) || (defined(__sun) && (!defined(_LP64) || defined(__SunOS_5_10))) - extern "C" unsigned long long Swap_n2hll(unsigned long long x); -@@ -206,7 +206,7 @@ extern "C" - # define SOCKLEN_t size_t - #elif defined(XR__GLIBC) || \ - defined(__FreeBSD__) || \ -- (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__macos__) || \ -+ (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) || \ - (defined(__sun) && defined(_SOCKLEN_T)) - # ifndef SOCKLEN_t - # define SOCKLEN_t socklen_t -diff --git a/src/XrdSys/XrdSysPlugin.cc b/src/XrdSys/XrdSysPlugin.cc -index ecdb5c5..e51ddf7 100644 ---- a/src/XrdSys/XrdSysPlugin.cc -+++ b/src/XrdSys/XrdSysPlugin.cc -@@ -21,7 +21,7 @@ - - #ifndef WIN32 - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - #include -@@ -77,7 +77,7 @@ void *XrdSysPlugin::getPlugin(const char *pname, int errok, bool global) - // - if (!(msgPath = libPath)) - {msgPath = "executable image"; --#if defined(__macos__) -+#if defined(__APPLE__) - flags = RTLD_FIRST; - #elif defined(__linux__) - flags = RTLD_NOW | RTLD_NODELETE; -diff --git a/src/XrdSys/XrdSysPthread.cc b/src/XrdSys/XrdSysPthread.cc -index a22550d..d64dd38 100644 ---- a/src/XrdSys/XrdSysPthread.cc -+++ b/src/XrdSys/XrdSysPthread.cc -@@ -165,7 +165,7 @@ int XrdSysCondVar::WaitMS(int msec) - /* C o n d W a i t */ - /******************************************************************************/ - --#ifdef __macos__ -+#ifdef __APPLE__ - - int XrdSysSemaphore::CondWait() - { -@@ -232,7 +232,7 @@ unsigned long XrdSysThread::Num() - return static_cast(syscall(SYS_gettid)); - #elif defined(__solaris__) - return static_cast(pthread_self()); --#elif defined(__macos__) -+#elif defined(__APPLE__) - return static_cast(pthread_mach_thread_np(pthread_self())); - #else - return static_cast(getpid()); -diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh -index 07196d0..6125933 100644 ---- a/src/XrdSys/XrdSysPthread.hh -+++ b/src/XrdSys/XrdSysPthread.hh -@@ -272,7 +272,7 @@ XrdSysRWLock *lck; - // semaphores need to be implemented based on condition - // variables since no native implementation is available. - --#ifdef __macos__ -+#ifdef __APPLE__ - class XrdSysSemaphore - { - public: -diff --git a/src/XrdXrootd/XrdXrootdLoadLib.cc b/src/XrdXrootd/XrdXrootdLoadLib.cc -index bde8509..f60e6e5 100644 ---- a/src/XrdXrootd/XrdXrootdLoadLib.cc -+++ b/src/XrdXrootd/XrdXrootdLoadLib.cc -@@ -20,7 +20,7 @@ - #endif - - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -diff --git a/src/XrdXrootd/XrdXrootdMonitor.cc b/src/XrdXrootd/XrdXrootdMonitor.cc -index 9e5ed22..efe8676 100644 ---- a/src/XrdXrootd/XrdXrootdMonitor.cc -+++ b/src/XrdXrootd/XrdXrootdMonitor.cc -@@ -14,7 +14,7 @@ - #include - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - diff --git a/xrootd-3.2.4-missing-zlib-include.patch b/xrootd-3.2.4-missing-zlib-include.patch deleted file mode 100644 index 4b8c0aa30be..00000000000 --- a/xrootd-3.2.4-missing-zlib-include.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/XrdApps.cmake b/src/XrdApps.cmake -index e175a4e..1410749 100644 ---- a/src/XrdApps.cmake -+++ b/src/XrdApps.cmake -@@ -1,4 +1,4 @@ -- -+include_directories( ${ZLIB_INCLUDE_DIRS} ) - include( XRootDCommon ) - - #------------------------------------------------------------------------------- -diff --git a/src/XrdClient.cmake b/src/XrdClient.cmake -index 5bf54d5..fc65b90 100644 ---- a/src/XrdClient.cmake -+++ b/src/XrdClient.cmake -@@ -1,4 +1,4 @@ -- -+include_directories( ${ZLIB_INCLUDE_DIRS} ) - include( XRootDCommon ) - - #------------------------------------------------------------------------------- diff --git a/xrootd-3.2.4-xrdclient.patch b/xrootd-3.2.4-xrdclient.patch deleted file mode 100644 index 2e1407197d8..00000000000 --- a/xrootd-3.2.4-xrdclient.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- a/src/XrdClient/XrdClient.cc -+++ b/src/XrdClient/XrdClient.cc -@@ -216,24 +216,10 @@ - - fConnModule->SetOpTimeLimit(EnvGetLong(NAME_TRANSACTIONTIMEOUT)); - -- // Construction of the url set coming from the resolution of the hosts given -- XrdClientUrlSet urlArray(fInitialUrl); -- if (!urlArray.IsValid()) { -- Error("Open", "The URL provided is incorrect."); -- return FALSE; -- } -- -- XrdClientUrlInfo unfo(fInitialUrl); -- if (unfo.File == "") { -- Error("Open", "The URL provided is incorrect."); -- return FALSE; -- } -- -- - // - // Now start the connection phase, picking randomly from UrlArray - // -- urlArray.Rewind(); -+ unsigned int seed = static_cast(getpid() ^ getppid()); // Once! - locallogid = -1; - int urlstried = 0; - for (int connectTry = 0; -@@ -241,6 +227,11 @@ - connectTry++) { - - XrdClientUrlSet urlArray(fInitialUrl); -+ if (!urlArray.IsValid()) { -+ Error("Open", "The URL provided is incorrect."); -+ return FALSE; -+ } -+ int urlCount = urlArray.Size(); - urlArray.Rewind(); - - XrdClientUrlInfo *thisUrl = 0; -@@ -254,9 +245,7 @@ - } - - bool nogoodurl = TRUE; -- while (urlArray.Size() > 0) { -- -- unsigned int seed = XrdOucCRC::CRC32((const unsigned char*)unfo.File.c_str(), unfo.File.length()); -+ while (urlCount--) { - - // Get an url from the available set - if ((thisUrl = urlArray.GetARandomUrl(seed))) { -@@ -270,6 +259,7 @@ - locallogid = fConnModule->Connect(*thisUrl, this); - // To find out if we have tried the whole URLs set - urlstried++; -+ if (!(fConnModule->IsConnected())) continue; - break; - } else { - // Invalid domain: drop the url and move to next, if any diff --git a/xrootd-3.3.3-add-private-headers.patch b/xrootd-3.3.3-add-private-headers.patch deleted file mode 100644 index 742126de20a..00000000000 --- a/xrootd-3.3.3-add-private-headers.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/XrdHeaders.cmake b/src/XrdHeaders.cmake -index 6402a32..08c0cf2 100644 ---- a/src/XrdHeaders.cmake -+++ b/src/XrdHeaders.cmake -@@ -95,6 +95,8 @@ set( XROOTD_PRIVATE_HEADERS - XrdClient/XrdClientPhyConnection.hh - XrdClient/XrdClientReadCache.hh - XrdClient/XrdClientSock.hh -+ XrdClient/XrdClientProtocol.hh -+ XrdClient/XrdClientSid.hh - XrdNet/XrdNetPeer.hh - XrdNet/XrdNetBuffer.hh - XrdOfs/XrdOfs.hh -@@ -102,7 +104,6 @@ set( XROOTD_PRIVATE_HEADERS - XrdOfs/XrdOfsHandle.hh - XrdOfs/XrdOfsTrace.hh - XrdSys/XrdSysPriv.hh -- - XrdOss/XrdOssApi.hh - XrdOss/XrdOssConfig.hh - XrdOss/XrdOssError.hh diff --git a/xrootd-3.3.3-rc1-gcc47.patch b/xrootd-3.3.3-rc1-gcc47.patch deleted file mode 100644 index 99b848b4fbd..00000000000 --- a/xrootd-3.3.3-rc1-gcc47.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/src/XrdApps/XrdCpy.cc b/src/XrdApps/XrdCpy.cc -index 131b6d5..9cc1e73 100644 ---- a/src/XrdApps/XrdCpy.cc -+++ b/src/XrdApps/XrdCpy.cc -@@ -157,7 +157,7 @@ struct XrdCpInfo { - - #define XRDCP_BLOCKSIZE (8*1024*1024) - #define XRDCP_XRDRASIZE (30*XRDCP_BLOCKSIZE) --#define XRDCP_VERSION "(C) 2004-2011 by the XRootD collaboration. Version: "XrdVSTRING -+#define XRDCP_VERSION "(C) 2004-2011 by the XRootD collaboration. Version: " XrdVSTRING - - /////////////////////////////////////////////////////////////////////// - // Coming from parameters on the cmd line -diff --git a/src/XrdCl/XrdClFileStateHandler.cc b/src/XrdCl/XrdClFileStateHandler.cc -index c05a080..9bd1ec4 100644 ---- a/src/XrdCl/XrdClFileStateHandler.cc -+++ b/src/XrdCl/XrdClFileStateHandler.cc -@@ -186,8 +186,8 @@ namespace - XrdCl::HostList *hostList ) - { - using namespace XrdCl; -- std::auto_ptr statusPtr( status ); -- std::auto_ptr responsePtr( response ); -+ std::unique_ptr statusPtr( status ); -+ std::unique_ptr responsePtr( response ); - pSendParams.hostList = hostList; - - //---------------------------------------------------------------------- -diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc -index 73150df..f37707e 100644 ---- a/src/XrdCl/XrdClXRootDMsgHandler.cc -+++ b/src/XrdCl/XrdClXRootDMsgHandler.cc -@@ -313,7 +313,7 @@ namespace XrdCl - //------------------------------------------------------------------------ - case kXR_redirect: - { -- std::auto_ptr msgPtr( pResponse ); -+ std::unique_ptr msgPtr( pResponse ); - pResponse = 0; - - if( rsp->hdr.dlen < 4 ) -@@ -443,7 +443,7 @@ namespace XrdCl - //------------------------------------------------------------------------ - case kXR_wait: - { -- std::auto_ptr msgPtr( pResponse ); -+ std::unique_ptr msgPtr( pResponse ); - pResponse = 0; - uint32_t waitSeconds = 0; - -@@ -493,7 +493,7 @@ namespace XrdCl - //------------------------------------------------------------------------ - case kXR_waitresp: - { -- std::auto_ptr msgPtr( pResponse ); -+ std::unique_ptr msgPtr( pResponse ); - pResponse = 0; - - if( rsp->hdr.dlen < 4 ) -@@ -517,7 +517,7 @@ namespace XrdCl - //------------------------------------------------------------------------ - default: - { -- std::auto_ptr msgPtr( pResponse ); -+ std::unique_ptr msgPtr( pResponse ); - pResponse = 0; - log->Dump( XRootDMsg, "[%s] Got unrecognized response %d to " - "message %s", pUrl.GetHostId().c_str(), diff --git a/xrootd-3.3.3-rc1-rename-macos-to-apple.patch b/xrootd-3.3.3-rc1-rename-macos-to-apple.patch deleted file mode 100644 index 9c41fd2fb28..00000000000 --- a/xrootd-3.3.3-rc1-rename-macos-to-apple.patch +++ /dev/null @@ -1,696 +0,0 @@ -diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake -index b3b183b..ab38043 100644 ---- a/cmake/XRootDOSDefs.cmake -+++ b/cmake/XRootDOSDefs.cmake -@@ -26,7 +26,6 @@ endif() - #------------------------------------------------------------------------------- - if( APPLE ) - set( MacOSX TRUE ) -- add_definitions( -D__macos__=1 ) - add_definitions( -DLT_MODULE_EXT=".dylib" ) - set( CMAKE_INSTALL_LIBDIR "lib" ) - set( CMAKE_INSTALL_BINDIR "bin" ) -diff --git a/src/Xrd/XrdBuffer.cc b/src/Xrd/XrdBuffer.cc -index 8b6c05f..4d63332 100644 ---- a/src/Xrd/XrdBuffer.cc -+++ b/src/Xrd/XrdBuffer.cc -@@ -29,7 +29,7 @@ - - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc -index 7c18bb7..2768224 100644 ---- a/src/Xrd/XrdConfig.cc -+++ b/src/Xrd/XrdConfig.cc -@@ -64,7 +64,7 @@ - #ifdef __linux__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -617,7 +617,7 @@ int XrdConfig::setFDL() - // Set the limit to the maximum allowed - // - rlim.rlim_cur = rlim.rlim_max; --#if (defined(__macos__) && defined(MAC_OS_X_VERSION_10_5)) -+#if (defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_5)) - if (rlim.rlim_cur == RLIM_INFINITY || rlim.rlim_cur > OPEN_MAX) - rlim.rlim_cur = OPEN_MAX; - #endif -diff --git a/src/Xrd/XrdLink.cc b/src/Xrd/XrdLink.cc -index c6d763b..c23eee2 100644 ---- a/src/Xrd/XrdLink.cc -+++ b/src/Xrd/XrdLink.cc -@@ -44,7 +44,7 @@ - - #ifdef HAVE_SENDFILE - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - -@@ -782,7 +782,7 @@ int XrdLink::Send(const struct iovec *iov, int iocnt, int bytes) - /******************************************************************************/ - int XrdLink::Send(const struct sfVec *sfP, int sfN) - { --#if !defined(HAVE_SENDFILE) || defined(__macos__) -+#if !defined(HAVE_SENDFILE) || defined(__APPLE__) - return -1; - #else - // Make sure we have valid vector count -diff --git a/src/Xrd/XrdPollE.icc b/src/Xrd/XrdPollE.icc -index 4279534..6d115ea 100644 ---- a/src/Xrd/XrdPollE.icc -+++ b/src/Xrd/XrdPollE.icc -@@ -28,7 +28,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #include -diff --git a/src/Xrd/XrdPollPoll.icc b/src/Xrd/XrdPollPoll.icc -index c39eb74..d5ab165 100644 ---- a/src/Xrd/XrdPollPoll.icc -+++ b/src/Xrd/XrdPollPoll.icc -@@ -27,7 +27,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/Xrd/XrdScheduler.cc b/src/Xrd/XrdScheduler.cc -index 903b9c4..58148e8 100644 ---- a/src/Xrd/XrdScheduler.cc -+++ b/src/Xrd/XrdScheduler.cc -@@ -32,7 +32,7 @@ - #include - #include - #include --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -228,7 +228,7 @@ void *XrdScheduler::Reaper() - int status; - pid_t pid; - XrdSchedulerPID *tp, *ptp, *xtp; --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - struct timespec ts = { 1, 0 }; - #else - sigset_t Sset; -@@ -256,7 +256,7 @@ void *XrdScheduler::Reaper() - } else {ptp = tp; tp = tp->next;} - } - ReaperMutex.UnLock(); --#if defined(__macos__) && !defined(MAC_OS_X_VERSION_10_5) -+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5) - // Mac OS X sigwait() is broken on <= 10.4. - } while (nanosleep(&ts, 0) <= 0); - #else -diff --git a/src/Xrd/XrdStats.cc b/src/Xrd/XrdStats.cc -index 5051506..0b8befa 100644 ---- a/src/Xrd/XrdStats.cc -+++ b/src/Xrd/XrdStats.cc -@@ -27,7 +27,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/XrdClient/XrdClientConn.cc b/src/XrdClient/XrdClientConn.cc -index 52f9541..56e2ab1 100644 ---- a/src/XrdClient/XrdClientConn.cc -+++ b/src/XrdClient/XrdClientConn.cc -@@ -70,7 +70,7 @@ - - #ifndef WIN32 - #include --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #endif -diff --git a/src/XrdFfs/XrdFfsXrootdfs.cc b/src/XrdFfs/XrdFfsXrootdfs.cc -index c00c4c0..3df3321 100644 ---- a/src/XrdFfs/XrdFfsXrootdfs.cc -+++ b/src/XrdFfs/XrdFfsXrootdfs.cc -@@ -772,7 +772,7 @@ static int xrootdfs_statfs(const char *path, struct statvfs *stbuf) - // long long size; - - // XrdFfsMisc_xrd_secsss_register(fuse_get_context()->uid, fuse_get_context()->gid); --#ifndef __macos__ -+#ifndef __APPLE__ - stbuf->f_bsize = 1024; - #else - stbuf->f_bsize = 1024 * 128; // work around 32 bit fsblkcnt_t in struct statvfs on Mac OSX -diff --git a/src/XrdNet/XrdNetBuffer.cc b/src/XrdNet/XrdNetBuffer.cc -index f1fcd3b..5d5be42 100644 ---- a/src/XrdNet/XrdNetBuffer.cc -+++ b/src/XrdNet/XrdNetBuffer.cc -@@ -33,7 +33,7 @@ - #endif - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - -diff --git a/src/XrdOss/XrdOssAio.cc b/src/XrdOss/XrdOssAio.cc -index 6856676..cba9089 100644 ---- a/src/XrdOss/XrdOssAio.cc -+++ b/src/XrdOss/XrdOssAio.cc -@@ -36,7 +36,7 @@ - #ifdef __FreeBSD__ - #include - #endif --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #else - #include -@@ -58,7 +58,7 @@ - // 1) No implementation of sigwaitinfo(). Though we can simulate it... - // 2) Event notification returns an incomplete siginfo structure. - // --#ifdef __macos__ -+#ifdef __APPLE__ - #undef _POSIX_ASYNCHRONOUS_IO - #endif - -@@ -399,7 +399,7 @@ void *XrdOssAioWait(void *mySigarg) - continue; - } - --#ifdef __macos__ -+#ifdef __APPLE__ - aiop = (XrdSfsAio *)myInfo.si_value.sigval_ptr; - #else - aiop = (XrdSfsAio *)myInfo.si_value.sival_ptr; -@@ -459,7 +459,7 @@ void XrdOssAioRSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoR->si_signo = info->si_signo; - XrdOssAioInfoR->si_errno = info->si_errno; - XrdOssAioInfoR->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoR->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoR->si_value.sival_ptr = info->si_value.sival_ptr; -@@ -487,7 +487,7 @@ void XrdOssAioWSH(int signum, siginfo_t *info, void *ucontext) - XrdOssAioInfoW->si_signo = info->si_signo; - XrdOssAioInfoW->si_errno = info->si_errno; - XrdOssAioInfoW->si_code = info->si_code; --#ifdef __macos__ -+#ifdef __APPLE__ - XrdOssAioInfoW->si_value.sigval_ptr = info->si_addr; - #else - XrdOssAioInfoW->si_value.sival_ptr = info->si_value.sival_ptr; -diff --git a/src/XrdOss/XrdOssCache.hh b/src/XrdOss/XrdOssCache.hh -index d731d41..07a8b6e 100644 ---- a/src/XrdOss/XrdOssCache.hh -+++ b/src/XrdOss/XrdOssCache.hh -@@ -61,7 +61,7 @@ - #define FS_BLKSZ f_bsize - #define FS_FFREE f_ffree - #endif --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #define STATFS_t struct statfs -diff --git a/src/XrdOss/XrdOssMSS.cc b/src/XrdOss/XrdOssMSS.cc -index 76742bc..1536db1 100644 ---- a/src/XrdOss/XrdOssMSS.cc -+++ b/src/XrdOss/XrdOssMSS.cc -@@ -295,7 +295,7 @@ int XrdOssSys::MSS_Stat(const char *path, struct stat *buff) - buff->st_mtime = static_cast(mtime); - buff->st_size = static_cast(xt_size); - buff->st_blksize=static_cast(xt_blksize); --#ifdef __macos__ -+#ifdef __APPLE__ - buff->st_blocks = xt_blocks; - #else - buff->st_blocks =static_cast(xt_blocks); -diff --git a/src/XrdOss/XrdOssMio.cc b/src/XrdOss/XrdOssMio.cc -index 2e2218c..a613ea5 100644 ---- a/src/XrdOss/XrdOssMio.cc -+++ b/src/XrdOss/XrdOssMio.cc -@@ -60,7 +60,7 @@ char XrdOssMio::MM_chk = 0; - char XrdOssMio::MM_okmlock = 1; - char XrdOssMio::MM_preld = 0; - long long XrdOssMio::MM_pagsz = (long long)sysconf(_SC_PAGESIZE); --#ifdef __macos__ -+#ifdef __APPLE__ - long long XrdOssMio::MM_pages = 1024*1024*1024; - #else - long long XrdOssMio::MM_pages = (long long)sysconf(_SC_PHYS_PAGES); -diff --git a/src/XrdOuc/XrdOucCacheReal.cc b/src/XrdOuc/XrdOucCacheReal.cc -index c74e9b0..e608853 100644 ---- a/src/XrdOuc/XrdOucCacheReal.cc -+++ b/src/XrdOuc/XrdOucCacheReal.cc -@@ -39,7 +39,7 @@ - #include "XrdOuc/XrdOucCacheData.hh" - #include "XrdSys/XrdSysHeaders.hh" - --#ifdef __macos__ -+#ifdef __APPLE__ - #ifndef MAP_ANONYMOUS - #define MAP_ANONYMOUS MAP_ANON - #endif -diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc -index 635ca5a..0fa7ffa 100644 ---- a/src/XrdPosix/XrdPosix.cc -+++ b/src/XrdPosix/XrdPosix.cc -@@ -313,7 +313,7 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream) - #if defined(__linux__) - else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN; - else stream->_flags |= _IO_EOF_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else if (bytes < 0) stream->_flags |= __SEOF; - else stream->_flags |= __SERR; - #else -@@ -479,7 +479,7 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream - #ifndef SUNX86 - #if defined(__linux__) - else stream->_flags |= _IO_ERR_SEEN; --#elif defined(__macos__) -+#elif defined(__APPLE__) - else stream->_flags |= __SERR; - #else - else stream->_flag |= _IOERR; -diff --git a/src/XrdPosix/XrdPosixLinkage.cc b/src/XrdPosix/XrdPosixLinkage.cc -index 84df57c..12c15c8 100644 ---- a/src/XrdPosix/XrdPosixLinkage.cc -+++ b/src/XrdPosix/XrdPosixLinkage.cc -@@ -40,7 +40,7 @@ - #endif - - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - -diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc -index 206a238..10491f5 100644 ---- a/src/XrdPosix/XrdPosixPreload.cc -+++ b/src/XrdPosix/XrdPosixPreload.cc -@@ -170,7 +170,7 @@ int fcntl64(int fd, int cmd, ...) - /* f d a t a s y n c */ - /******************************************************************************/ - // On Mac it is the same as fsync --#if !defined(__macos__) -+#if !defined(__APPLE__) - extern "C" - { - int fdatasync(int fildes) -@@ -412,7 +412,7 @@ off64_t lseek64(int fildes, off64_t offset, int whence) - - extern "C" - { --#if defined(__linux__) || defined(__macos__) -+#if defined(__linux__) || defined(__APPLE__) - off_t llseek(int fildes, off_t offset, int whence) - #else - offset_t llseek(int fildes, offset_t offset, int whence) -diff --git a/src/XrdPosix/XrdPosixPreload32.cc b/src/XrdPosix/XrdPosixPreload32.cc -index c2bcf73..5e5a8fd 100644 ---- a/src/XrdPosix/XrdPosixPreload32.cc -+++ b/src/XrdPosix/XrdPosixPreload32.cc -@@ -50,7 +50,7 @@ - #include - #include - --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - #include - #include - #else -@@ -82,7 +82,7 @@ extern XrdPosixLinkage Xunix; - // making CopyDirent() superfluous. In Solaris x86 there are no 32 bit interfaces. - // - #if !defined(__LP64__) && !defined(_LP64) --#if !defined( __macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined( __APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - int XrdPosix_CopyDirent(struct dirent *dent, struct dirent64 *dent64) - { - const unsigned long long LLMask = 0xffffffff00000000LL; -@@ -381,7 +381,7 @@ struct dirent* readdir(DIR *dirp) - - if (!(dp64 = XrdPosix_Readdir64(dirp))) return 0; - --#if !defined(__macos__) && !defined(_LP64) && !defined(__LP64__) -+#if !defined(__APPLE__) && !defined(_LP64) && !defined(__LP64__) - if (XrdPosix_CopyDirent((struct dirent *)dp64, dp64)) return 0; - #endif - -@@ -400,7 +400,7 @@ extern "C" - int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) - { - static int Init = Xunix.Init(&Init); --#if defined(__macos__) || defined(__LP64__) || defined(_LP64) -+#if defined(__APPLE__) || defined(__LP64__) || defined(_LP64) - return XrdPosix_Readdir_r(dirp, entry, result); - #else - char buff[sizeof(struct dirent64) + 2048]; -@@ -478,7 +478,7 @@ int stat( const char *path, struct stat *buf) - /* s t a t f s */ - /******************************************************************************/ - --#if !defined(__solaris__) && !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__solaris__) && !defined(__APPLE__) && !defined(__FreeBSD__) - extern "C" - { - int statfs( const char *path, struct statfs *buf) -@@ -506,7 +506,7 @@ int statfs( const char *path, struct statfs *buf) - /* s t a t v f s */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(SUNX86) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(SUNX86) && !defined(__FreeBSD__) - extern "C" - { - int statvfs( const char *path, struct statvfs *buf) -diff --git a/src/XrdPosix/XrdPosixXrootd.cc b/src/XrdPosix/XrdPosixXrootd.cc -index 9be0a4a..357b7c9 100644 ---- a/src/XrdPosix/XrdPosixXrootd.cc -+++ b/src/XrdPosix/XrdPosixXrootd.cc -@@ -349,7 +349,7 @@ dirent64 *XrdPosixDir::nextEntry(dirent64 *dp) - cp = (fentries[fentry]).c_str(); - reclen = strlen(cp); - if (reclen > maxname) reclen = maxname; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - dp->d_fileno = fentry; - dp->d_type = DT_UNKNOWN; - dp->d_namlen = reclen; -@@ -1135,7 +1135,7 @@ struct dirent* XrdPosixXrootd::Readdir(DIR *dirp) - dp32 = (struct dirent *)dp64; - if (dp32->d_name != dp64->d_name) - {dp32->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - dp32->d_off = dp64->d_off; - #endif - dp32->d_reclen = dp64->d_reclen; -@@ -1176,7 +1176,7 @@ int XrdPosixXrootd::Readdir_r(DIR *dirp, struct dirent *entry, - if ((rc = Readdir64_r(dirp, 0, &dp64)) <= 0) {*result = 0; return rc;} - - entry->d_ino = dp64->d_ino; --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - entry->d_off = dp64->d_off; - #endif - entry->d_reclen = dp64->d_reclen; -@@ -1331,12 +1331,12 @@ int XrdPosixXrootd::Statfs(const char *path, struct statfs *buf) - buf->f_bfree = myVfs.f_bfree; - buf->f_files = myVfs.f_files; - buf->f_ffree = myVfs.f_ffree; --#if defined(__macos__) || defined(__FreeBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) - buf->f_iosize = myVfs.f_frsize; - #else - buf->f_frsize = myVfs.f_frsize; - #endif --#if defined(__linux__) || defined(__macos__) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) - buf->f_bavail = myVfs.f_bavail; - #endif - #if defined(__linux__) -diff --git a/src/XrdSecpwd/XrdSecpwdPlatform.hh b/src/XrdSecpwd/XrdSecpwdPlatform.hh -index 506bfd3..71f2174 100644 ---- a/src/XrdSecpwd/XrdSecpwdPlatform.hh -+++ b/src/XrdSecpwd/XrdSecpwdPlatform.hh -@@ -34,7 +34,7 @@ - #if defined(__solaris__) - #include - #endif --#if defined(__osf__) || defined(__sgi) || defined(__macos__) -+#if defined(__osf__) || defined(__sgi) || defined(__APPLE__) - extern "C" char *crypt(const char *, const char *); - #endif - -diff --git a/src/XrdSut/XrdSutAux.cc b/src/XrdSut/XrdSutAux.cc -index 55b926b..bcc60f3 100644 ---- a/src/XrdSut/XrdSutAux.cc -+++ b/src/XrdSut/XrdSutAux.cc -@@ -618,7 +618,7 @@ XrdSutFileLocker::XrdSutFileLocker(int fd, ELockType lock) - // Exclusive lock of the whole file - short int lockmode = (lock == XrdSutFileLocker::kExcl) ? (F_WRLCK | F_RDLCK) - : F_RDLCK; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -639,7 +639,7 @@ XrdSutFileLocker::~XrdSutFileLocker() - return; - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc -index aaa439b..fb7d470 100644 ---- a/src/XrdSut/XrdSutPFile.cc -+++ b/src/XrdSut/XrdSutPFile.cc -@@ -407,7 +407,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - int lck = kMaxLockTries; - int rc = 0; - while (lck && rc == -1) { --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -424,7 +424,7 @@ kXR_int32 XrdSutPFile::Open(kXR_int32 opt, bool *wasopen, - if (errno == EACCES || errno == EAGAIN) { - // File locked by other process - int pid = -1; --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, lockmode, SEEK_SET}; - #else - struct flock flck = {lockmode, SEEK_SET, 0, 0}; -@@ -459,7 +459,7 @@ kXR_int32 XrdSutPFile::Close(kXR_int32 fd) - - // - // Unlock the file --#ifdef __macos__ -+#ifdef __APPLE__ - struct flock flck = {0, 0, 0, F_UNLCK, SEEK_SET}; - #else - struct flock flck = {F_UNLCK, SEEK_SET, 0, 0}; -diff --git a/src/XrdSys/XrdSysDNS.cc b/src/XrdSys/XrdSysDNS.cc -index 1d4bc87..b3e474b 100644 ---- a/src/XrdSys/XrdSysDNS.cc -+++ b/src/XrdSys/XrdSysDNS.cc -@@ -115,8 +115,8 @@ int XrdSysDNS::getHostAddr(const char *InetName, - // default /etc/hosts on some platforms, e.g. MacOsX) - // - // if (!strncmp(InetName,"localhost",9)) myhints.ai_family = AF_INET; --// pcal: force ipv4 (was only for MacOS: ifdef __macos____) --//#ifdef __macos__ -+// pcal: force ipv4 (was only for MacOS: ifdef __APPLE____) -+//#ifdef __APPLE__ - // Disable IPv6 for MacOS X altogether for the time being - // - myhints.ai_family = AF_INET; -@@ -277,7 +277,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - // Some platforms have nameinfo but getnameinfo() is broken. If so, we revert - // to using the gethostbyaddr(). - // --#if defined(HAVE_NAMEINFO) && !defined(__macos__) -+#if defined(HAVE_NAMEINFO) && !defined(__APPLE__) - struct addrinfo *rp, *np; - struct addrinfo myhints = {AI_CANONNAME}; - #elif defined(HAVE_GETHBYXR) -@@ -302,7 +302,7 @@ int XrdSysDNS::getHostName(struct sockaddr &InetAddr, - if (InetAddr.sa_family == AF_UNIX) - {InetName[0] = strdup("localhost"); return 1;} - --#if !defined(HAVE_NAMEINFO) || defined(__macos__) -+#if !defined(HAVE_NAMEINFO) || defined(__APPLE__) - - // Convert it to a host name - // -diff --git a/src/XrdSys/XrdSysFAttr.cc b/src/XrdSys/XrdSysFAttr.cc -index 67beeba..b58f8b1 100644 ---- a/src/XrdSys/XrdSysFAttr.cc -+++ b/src/XrdSys/XrdSysFAttr.cc -@@ -57,7 +57,7 @@ XrdSysError *XrdSysFAttr::Say = 0; - #include "XrdSys/XrdSysFAttrBsd.icc" - #elif defined(__linux__) - #include "XrdSys/XrdSysFAttrLnx.icc" --#elif defined(__macos__) -+#elif defined(__APPLE__) - #include "XrdSys/XrdSysFAttrMac.icc" - #elif defined(__solaris__) - #include "XrdSys/XrdSysFAttrSun.icc" -diff --git a/src/XrdSys/XrdSysIOEventsPollE.icc b/src/XrdSys/XrdSysIOEventsPollE.icc -index c24bd04..7149b71 100644 ---- a/src/XrdSys/XrdSysIOEventsPollE.icc -+++ b/src/XrdSys/XrdSysIOEventsPollE.icc -@@ -28,7 +28,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #include -diff --git a/src/XrdSys/XrdSysIOEventsPollPoll.icc b/src/XrdSys/XrdSysIOEventsPollPoll.icc -index e4df3e6..e56c2b1 100644 ---- a/src/XrdSys/XrdSysIOEventsPollPoll.icc -+++ b/src/XrdSys/XrdSysIOEventsPollPoll.icc -@@ -27,7 +27,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - #include -diff --git a/src/XrdSys/XrdSysIOEventsPollPort.icc b/src/XrdSys/XrdSysIOEventsPollPort.icc -index 6412358..b614003 100644 ---- a/src/XrdSys/XrdSysIOEventsPollPort.icc -+++ b/src/XrdSys/XrdSysIOEventsPollPort.icc -@@ -28,7 +28,7 @@ - /* specific prior written permission of the institution or contributor. */ - /******************************************************************************/ - --#ifndef __macos__ -+#ifndef __APPLE__ - #include - #endif - #include -diff --git a/src/XrdSys/XrdSysPlatform.cc b/src/XrdSys/XrdSysPlatform.cc -index 768932f..d5d9fe1 100644 ---- a/src/XrdSys/XrdSysPlatform.cc -+++ b/src/XrdSys/XrdSysPlatform.cc -@@ -38,7 +38,7 @@ - #if defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || \ - defined(__IEEE_LITTLE_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) --#if !defined(__GNUC__) || defined(__macos__) -+#if !defined(__GNUC__) || defined(__APPLE__) - extern "C" - { - unsigned long long Swap_n2hll(unsigned long long x) -diff --git a/src/XrdSys/XrdSysPlugin.cc b/src/XrdSys/XrdSysPlugin.cc -index cc10130..80219ea 100644 ---- a/src/XrdSys/XrdSysPlugin.cc -+++ b/src/XrdSys/XrdSysPlugin.cc -@@ -41,7 +41,7 @@ - - #ifndef WIN32 - #include --#if !defined(__macos__) && !defined(__CYGWIN__) -+#if !defined(__APPLE__) && !defined(__CYGWIN__) - #include - #endif - #include -@@ -204,7 +204,7 @@ XrdSysPlugin::cvResult XrdSysPlugin::chkVersion(XrdVersionInfo &urInfo, - - int XrdSysPlugin::DLflags() - { --#if defined(__macos__) -+#if defined(__APPLE__) - return RTLD_FIRST; - #elif defined(__linux__) - return RTLD_NOW; -diff --git a/src/XrdSys/XrdSysPthread.cc b/src/XrdSys/XrdSysPthread.cc -index 752fafb..7d58dd5 100644 ---- a/src/XrdSys/XrdSysPthread.cc -+++ b/src/XrdSys/XrdSysPthread.cc -@@ -184,7 +184,7 @@ int XrdSysCondVar::WaitMS(int msec) - /* C o n d W a i t */ - /******************************************************************************/ - --#ifdef __macos__ -+#ifdef __APPLE__ - - int XrdSysSemaphore::CondWait() - { -@@ -265,7 +265,7 @@ unsigned long XrdSysThread::Num() - return static_cast(syscall(SYS_gettid)); - #elif defined(__solaris__) - return static_cast(pthread_self()); --#elif defined(__macos__) -+#elif defined(__APPLE__) - return static_cast(pthread_mach_thread_np(pthread_self())); - #else - return static_cast(getpid()); -diff --git a/src/XrdSys/XrdSysTimer.cc b/src/XrdSys/XrdSysTimer.cc -index d83057a..af1d5a7 100644 ---- a/src/XrdSys/XrdSysTimer.cc -+++ b/src/XrdSys/XrdSysTimer.cc -@@ -236,7 +236,7 @@ void XrdSysTimer::Wait4Midnight() - - // Wait until midnight arrives - // --#ifndef __macos__ -+#ifndef __APPLE__ - timespec Midnite = {Midnight(1), 0}; - while(clock_nanosleep(CLOCK_REALTIME,TIMER_ABSTIME,&Midnite,0) == EINTR) {} - #else -diff --git a/src/XrdSys/XrdSysUtils.cc b/src/XrdSys/XrdSysUtils.cc -index c0073b2..887ffc7 100644 ---- a/src/XrdSys/XrdSysUtils.cc -+++ b/src/XrdSys/XrdSysUtils.cc -@@ -35,7 +35,7 @@ - #include - #include - --#ifdef __macos__ -+#ifdef __APPLE__ - #include - #endif - -@@ -77,7 +77,7 @@ const char *XrdSysUtils::ExecName() - return myEname; - } - } --#elif defined(__macos__) -+#elif defined(__APPLE__) - {char epBuff[2048]; - uint32_t epLen = sizeof(epBuff)-1; - if (!_NSGetExecutablePath(epBuff, &epLen)) -diff --git a/src/XrdXrootd/XrdXrootdMonitor.cc b/src/XrdXrootd/XrdXrootdMonitor.cc -index f6e93d2..c9f0d7c 100644 ---- a/src/XrdXrootd/XrdXrootdMonitor.cc -+++ b/src/XrdXrootd/XrdXrootdMonitor.cc -@@ -35,7 +35,7 @@ - #include - #include - #include --#if !defined(__macos__) && !defined(__FreeBSD__) -+#if !defined(__APPLE__) && !defined(__FreeBSD__) - #include - #endif - diff --git a/xrootd-5.28-00d-forkv2.patch b/xrootd-5.28-00d-forkv2.patch deleted file mode 100644 index 66bcce8679f..00000000000 --- a/xrootd-5.28-00d-forkv2.patch +++ /dev/null @@ -1,372 +0,0 @@ -diff -aur xrootd.orig/src/XrdClient/Makefile.am xrootd/src/XrdClient/Makefile.am ---- xrootd.orig/src/XrdClient/Makefile.am 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/Makefile.am 2011-06-08 15:42:50.000000000 +0200 -@@ -83,7 +83,7 @@ - ../XrdNet/libXrdNet.la \ - ../XrdOuc/libXrdOuc.la \ - ../XrdSys/libXrdSys.la \ -- ../XrdNet/libXrdNetUtil.la -+ ../XrdNet/libXrdNetUtil.la -lpthread - - clientlibs = libXrdClient.la \ - -ldl $(LIBZ) -diff -aur xrootd.orig/src/XrdClient/XrdClient.cc xrootd/src/XrdClient/XrdClient.cc ---- xrootd.orig/src/XrdClient/XrdClient.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClient.cc 2011-06-08 15:42:50.000000000 +0200 -@@ -1228,9 +1228,10 @@ - fConnModule->SendGenCommand(&closeFileRequest, - 0, - 0, 0 , FALSE, (char *)"Close"); -- -+ - // No file is opened for now - fOpenPars.opened = FALSE; -+ fConnModule->Disconnect( false ); - - return TRUE; - } -diff -aur xrootd.orig/src/XrdClient/XrdClientConn.cc xrootd/src/XrdClient/XrdClientConn.cc ---- xrootd.orig/src/XrdClient/XrdClientConn.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientConn.cc 2011-06-08 15:42:50.000000000 +0200 -@@ -274,8 +274,8 @@ - void XrdClientConn::Disconnect(bool ForcePhysicalDisc) - { - // Disconnect... is it so difficult? Yes! -- -- ConnectionManager->SidManager()->GetAllOutstandingWriteRequests(fPrimaryStreamid, fWriteReqsToRetry); -+ if( ConnectionManager->SidManager() ) -+ ConnectionManager->SidManager()->GetAllOutstandingWriteRequests(fPrimaryStreamid, fWriteReqsToRetry); - - if (fMainReadCache && (DebugLevel() >= XrdClientDebug::kDUMPDEBUG) ) fMainReadCache->PrintCache(); - -diff -aur xrootd.orig/src/XrdClient/XrdClientConn.hh xrootd/src/XrdClient/XrdClientConn.hh ---- xrootd.orig/src/XrdClient/XrdClientConn.hh 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientConn.hh 2011-06-08 15:42:50.000000000 +0200 -@@ -27,6 +27,7 @@ - #include "XrdOuc/XrdOucHash.hh" - - #define ConnectionManager XrdClientConn::GetConnectionMgr() -+#define SessionIDRepo XrdClientConn::GetSessionIDRepo() - - class XrdClientAbs; - class XrdSecProtocol; -@@ -289,6 +290,9 @@ - static XrdClientConnectionMgr *GetConnectionMgr() - { return fgConnectionMgr;} //Instance of the conn manager - -+ static XrdOucHash &GetSessionIDRepo() -+ { return fSessionIDRepo; } -+ - void GetSessionID(SessionIDInfo &sess) { - XrdOucString sessname; - char buf[20]; -diff -aur xrootd.orig/src/XrdClient/XrdClientConnMgr.cc xrootd/src/XrdClient/XrdClientConnMgr.cc ---- xrootd.orig/src/XrdClient/XrdClientConnMgr.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientConnMgr.cc 2011-06-08 15:42:50.000000000 +0200 -@@ -137,11 +137,12 @@ - XrdClientPhyConnection *p, void *voidcmgr) - { - // Function applied to the hash table to destroy all the phyconns -- - XrdClientConnectionMgr *cmgr = (XrdClientConnectionMgr *)voidcmgr; - assert(cmgr != 0); - - if (p) { -+ p->Touch(); -+ p->Disconnect(); - p->UnsolicitedMsgHandler = 0; - delete(p); - } -@@ -158,55 +159,81 @@ - // XrdClientConnectionMgr constructor. - // Creates a Connection Manager object. - // Starts the garbage collector thread. -+ BootUp(); - -- fLastLogIdUsed = 0; -+} - -- fGarbageColl = new XrdClientThread(GarbageCollectorThread); -- -- if (!fGarbageColl) -- Error("ConnectionMgr", -- "Can't create garbage collector thread: out of system resources"); -- -- fGarbageColl->Run(this); -+//_____________________________________________________________________________ -+XrdClientConnectionMgr::~XrdClientConnectionMgr() -+{ -+ // Deletes mutex locks, stops garbage collector thread. -+ ShutDown(); -+} -+ -+//------------------------------------------------------------------------------ -+// Initializer -+//------------------------------------------------------------------------------ -+bool XrdClientConnectionMgr::BootUp() -+{ -+ fLastLogIdUsed = 0; - -+ fGarbageColl = new XrdClientThread(GarbageCollectorThread); - -- fSidManager = new XrdClientSid(); -- if (!fSidManager) { -+ if (!fGarbageColl) - Error("ConnectionMgr", -- "Can't create sid manager: out of system resources"); -- abort(); -- } -+ "Can't create garbage collector thread: out of system resources"); -+ -+ fGarbageColl->Run(this); -+ -+ fSidManager = new XrdClientSid(); -+ if (!fSidManager) { -+ Error("ConnectionMgr", -+ "Can't create sid manager: out of system resources"); -+ abort(); -+ } - -+ return true; - } - --//_____________________________________________________________________________ --XrdClientConnectionMgr::~XrdClientConnectionMgr() -+bool XrdClientConnectionMgr::ShutDown() - { -- // Deletes mutex locks, stops garbage collector thread. -+ fPhyHash.Apply(DumpPhyConn, this); - -- int i=0; -+ { -+ XrdSysMutexHelper mtx(fMutex); - -- { -- XrdSysMutexHelper mtx(fMutex); -+ for( int i = 0; i < fLogVec.GetSize(); i++) -+ if (fLogVec[i]) Disconnect(i, TRUE); -+ } - -- for (i = 0; i < fLogVec.GetSize(); i++) -- if (fLogVec[i]) Disconnect(i, FALSE); -+ if (fGarbageColl) -+ { -+ void *ret; -+ fGarbageColl->Cancel(); -+ fGarbageColl->Join(&ret); -+ delete fGarbageColl; -+ } - -- } -+ GarbageCollect(); - -- if (fGarbageColl) { -- void *ret; -- fGarbageColl->Cancel(); -- fGarbageColl->Join(&ret); -- delete fGarbageColl; -- } -+ fPhyHash.Apply(DestroyPhyConn, this); -+ -+ for(int i = fPhyTrash.GetSize()-1; i >= 0; i--) -+ DestroyPhyConn( "Trashed connection", fPhyTrash[i], this); -+ -+ fPhyTrash.Clear(); -+ fPhyHash.Purge(); -+ fLogVec.Clear(); -+ -+ delete fSidManager; - -- GarbageCollect(); -+ fSidManager = 0; -+ fGarbageColl = 0; - -- fPhyHash.Apply(DestroyPhyConn, this); -- delete fSidManager; -+ return true; - } - -+ - //_____________________________________________________________________________ - void XrdClientConnectionMgr::GarbageCollect() - { -@@ -521,7 +548,7 @@ - return; - } - -- -+ fLogVec[LogConnectionID]->GetPhyConnection()->WipeStreamid(fLogVec[LogConnectionID]->Streamid()); - if (ForcePhysicalDisc) { - // We disconnect the phyconn - // But it will be removed by the garbagecollector as soon as possible -@@ -532,8 +559,7 @@ - fLogVec[LogConnectionID]->GetPhyConnection()->Disconnect(); - GarbageCollect(); - } -- else -- fLogVec[LogConnectionID]->GetPhyConnection()->WipeStreamid(fLogVec[LogConnectionID]->Streamid()); -+ - - fLogVec[LogConnectionID]->GetPhyConnection()->Touch(); - delete fLogVec[LogConnectionID]; -diff -aur xrootd.orig/src/XrdClient/XrdClientConnMgr.hh xrootd/src/XrdClient/XrdClientConnMgr.hh ---- xrootd.orig/src/XrdClient/XrdClientConnMgr.hh 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientConnMgr.hh 2011-06-08 15:42:50.000000000 +0200 -@@ -80,6 +80,10 @@ - - virtual ~XrdClientConnectionMgr(); - -+ bool BootUp(); -+ bool ShutDown(); -+ -+ - int Connect(XrdClientUrlInfo RemoteAddress); - void Disconnect(int LogConnectionID, bool ForcePhysicalDisc); - -diff -aur xrootd.orig/src/XrdClient/XrdClientEnv.cc xrootd/src/XrdClient/XrdClientEnv.cc ---- xrootd.orig/src/XrdClient/XrdClientEnv.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientEnv.cc 2011-06-08 15:42:50.000000000 +0200 -@@ -14,6 +14,9 @@ - #include "XrdSys/XrdSysHeaders.hh" - #include "XrdClient/XrdClientConst.hh" - #include "XrdClient/XrdClientEnv.hh" -+#include "XrdClient/XrdClientConn.hh" -+#include "XrdClient/XrdClientConnMgr.hh" -+#include - #include - #include - #include -@@ -152,3 +155,51 @@ - - fgInstance = 0; - } -+ -+//------------------------------------------------------------------------------ -+// To be called prior to forking -+//------------------------------------------------------------------------------ -+static void prepare() -+{ -+ ConnectionManager->ShutDown(); -+ SessionIDRepo.Purge(); -+} -+ -+//------------------------------------------------------------------------------ -+// To be called in the parent just after forking -+//------------------------------------------------------------------------------ -+static void parent() -+{ -+ ConnectionManager->BootUp(); -+} -+ -+//------------------------------------------------------------------------------ -+// To be called in the child just after forking -+//------------------------------------------------------------------------------ -+static void child() -+{ -+ ConnectionManager->BootUp(); -+} -+ -+//------------------------------------------------------------------------------ -+// Install the fork handlers on application startup -+//------------------------------------------------------------------------------ -+namespace -+{ -+ static struct Initializer -+ { -+ Initializer() -+ { -+ //------------------------------------------------------------------------ -+ // Install the fork handlers -+ //------------------------------------------------------------------------ -+#ifndef WIN32 -+ if( pthread_atfork( prepare, parent, child ) != 0 ) -+ { -+ std::cerr << "Unable to install the fork handlers - safe forking not "; -+ std::cerr << "possible" << std::endl; -+ } -+#endif -+ } -+ } initializer; -+} -diff -aur xrootd.orig/src/XrdClient/XrdClientEnv.hh xrootd/src/XrdClient/XrdClientEnv.hh ---- xrootd.orig/src/XrdClient/XrdClientEnv.hh 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientEnv.hh 2011-06-08 15:42:50.000000000 +0200 -@@ -91,8 +91,7 @@ - fOucEnv->PutInt(varname, value); - } - -- static XrdClientEnv *Instance(); -- -+ static XrdClientEnv *Instance(); - }; - - #endif -diff -aur xrootd.orig/src/XrdClient/XrdClientPhyConnection.cc xrootd/src/XrdClient/XrdClientPhyConnection.cc ---- xrootd.orig/src/XrdClient/XrdClientPhyConnection.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdClient/XrdClientPhyConnection.cc 2011-06-08 15:42:50.000000000 +0200 -@@ -45,21 +45,16 @@ - - XrdClientPhyConnection *thisObj; - -+ - Info(XrdClientDebug::kHIDEBUG, - "SocketReaderThread", - "Reader Thread starting."); - -- thr->SetCancelDeferred(); -- thr->SetCancelOn(); -- - thisObj = (XrdClientPhyConnection *)arg; -- - thisObj->StartedReader(); - - while (1) { -- thr->SetCancelOff(); - thisObj->BuildMessage(TRUE, TRUE); -- thr->SetCancelOn(); - - if (thisObj->CheckAutoTerm()) - break; -@@ -110,6 +105,15 @@ - "Destroying. [" << fServer.Host << ":" << fServer.Port << "]"); - - Disconnect(); -+ if (fReaderthreadrunning) -+ for (int i = 0; i < READERCOUNT; i++) -+ if(fReaderthreadhandler[i]) -+ { -+ fReaderthreadhandler[i]->Join(); -+ delete fReaderthreadhandler[i]; -+ } -+ -+ - - if (fSocket) { - delete fSocket; -@@ -118,13 +122,6 @@ - - UnlockChannel(); - -- if (fReaderthreadrunning) -- for (int i = 0; i < READERCOUNT; i++) -- if (fReaderthreadhandler[i]) { -- fReaderthreadhandler[i]->Cancel(); -- fReaderthreadhandler[i]->Join(); -- delete fReaderthreadhandler[i]; -- } - - if (fSecProtocol) { - // This insures that the right destructor is called -@@ -232,12 +229,6 @@ - exit(-1); - } - -- if (fReaderthreadhandler[i]->Detach()) -- { -- Error("PhyConnection", "Thread detach failed"); -- //return; -- } -- - } - // sleep until at least one thread starts running, which hopefully - // is not forever. diff --git a/xrootd-5.30.00-fix-gcc46.patch b/xrootd-5.30.00-fix-gcc46.patch deleted file mode 100644 index 6a0a475b585..00000000000 --- a/xrootd-5.30.00-fix-gcc46.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/XrdMon/XrdMonSndCoder.hh b/src/XrdMon/XrdMonSndCoder.hh -index 569d18c..db4fdca 100644 ---- a/src/XrdMon/XrdMonSndCoder.hh -+++ b/src/XrdMon/XrdMonSndCoder.hh -@@ -26,6 +26,7 @@ - #include - #include // for pair - #include -+#include - using std::cerr; - using std::cout; - using std::endl; diff --git a/xrootd-gcc44.patch b/xrootd-gcc44.patch deleted file mode 100644 index 97680d2f21b..00000000000 --- a/xrootd-gcc44.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -aur xrootd.orig/src/XrdBwm/XrdBwmHandle.cc xrootd/src/XrdBwm/XrdBwmHandle.cc ---- xrootd.orig/src/XrdBwm/XrdBwmHandle.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdBwm/XrdBwmHandle.cc 2011-06-08 15:39:02.000000000 +0200 -@@ -23,6 +23,7 @@ - #include "XrdSys/XrdSysPlatform.hh" - - #include "XProtocol/XProtocol.hh" -+#include - - /******************************************************************************/ - /* S t a t i c O b j e c t s */ -diff -aur xrootd.orig/src/XrdCms/XrdCmsAdmin.cc xrootd/src/XrdCms/XrdCmsAdmin.cc ---- xrootd.orig/src/XrdCms/XrdCmsAdmin.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdCms/XrdCmsAdmin.cc 2011-06-08 15:39:02.000000000 +0200 -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - - #include "XProtocol/YProtocol.hh" - -diff -aur xrootd.orig/src/XrdCms/XrdCmsCache.cc xrootd/src/XrdCms/XrdCmsCache.cc ---- xrootd.orig/src/XrdCms/XrdCmsCache.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdCms/XrdCmsCache.cc 2011-06-08 15:39:02.000000000 +0200 -@@ -25,6 +25,7 @@ - - #include "Xrd/XrdJob.hh" - #include "Xrd/XrdScheduler.hh" -+#include - - namespace XrdCms - { -diff -aur xrootd.orig/src/XrdCms/XrdCmsParser.cc xrootd/src/XrdCms/XrdCmsParser.cc ---- xrootd.orig/src/XrdCms/XrdCmsParser.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdCms/XrdCmsParser.cc 2011-06-08 15:39:02.000000000 +0200 -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #include "XrdCms/XrdCmsParser.hh" - #include "XrdCms/XrdCmsRRData.hh" -diff -aur xrootd.orig/src/XrdCms/XrdCmsResp.cc xrootd/src/XrdCms/XrdCmsResp.cc ---- xrootd.orig/src/XrdCms/XrdCmsResp.cc 2011-06-08 15:37:12.000000000 +0200 -+++ xrootd/src/XrdCms/XrdCmsResp.cc 2011-06-08 15:39:02.000000000 +0200 -@@ -27,6 +27,7 @@ - #include "XrdNet/XrdNetBuffer.hh" - #include "XrdSfs/XrdSfsInterface.hh" - #include "XrdSys/XrdSysError.hh" -+#include - - using namespace XrdCms; - diff --git a/xrootd.spec b/xrootd.spec index 3f43e527989..65925291343 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -1,17 +1,11 @@ -### RPM external xrootd 3.2.4 +### RPM external xrootd 4.0.2 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 %define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac) -Source: http://xrootd.cern.ch/cgi-bin/cgit.cgi/xrootd/snapshot/%n-%{realversion}.tar.gz -Patch0: xrootd-gcc44 -Patch1: xrootd-5.30.00-fix-gcc46 -Patch3: xrootd-3.1.0-fixed-library-location-all-os -Patch4: xrootd-3.1.0-client-send-moninfo -Patch5: xrootd-3.1.0-gcc-470-literals-whitespace -Patch6: xrootd-3.1.0-add-GetHandle-XrdClientAbs-header -Patch7: xrootd-3.1.0-narrowing-conversion -Patch8: xrootd-3.2.3-rename-macos-to-apple -Patch9: xrootd-3.2.4-xrdclient +Source: http://xrootd.org/download/v%{realversion}/%{n}-%{realversion}.tar.gz +Patch0: xrootd-3.1.0-fixed-library-location-all-os +Patch1: xrootd-3.1.0-client-send-moninfo +Patch2: xrootd-3.3.3-rc1-add-GetHandle-XrdClientAbs-header BuildRequires: cmake %if "%online" != "true" @@ -25,17 +19,11 @@ Requires: gcc openssl %define cms_cxxflags -std=c++0x -O2 %endif -%prep +%prep %setup -n %n-%{realversion} -%patch0 -p1 +%patch0 -p0 %patch1 -p1 -%patch3 -p0 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 +%patch2 -p1 # need to fix these from xrootd git perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/cleanup.pl