XRootD
XrdSysPlatform.hh File Reference
#include <cstdint>
#include <cstdlib>
+ Include dependency graph for XrdSysPlatform.hh:

Go to the source code of this file.

Namespaces

 XrdSys
 

Macros

#define CHMOD(path, mode)   chmod(path,mode)
 
#define FLOCK_t   flock_t
 
#define FS_BLKFACT   1
 
#define GTZ_NULL   (void *)0
 
#define IOV_INIT(data, dlen)   data,dlen
 
#define LT_MODULE_EXT   ".so"
 
#define MAKEDIR(path, mode)   mkdir(path,mode)
 
#define net_errno   errno
 
#define Netdata_t   char *
 
#define O_BINARY   0
 
#define PTR2INT(x)   int(x)
 
#define SHMDT_t   char *
 
#define SOCKLEN_t   socklen_t
 
#define Sokdata_t   void *
 
#define STATFS   statvfs
 
#define STATFS_BUFF   struct statvfs
 
#define XRDABS(x)   (x < 0 ? -x : x)
 

Functions

static uint16_t bswap (uint16_t x)
 
static uint32_t bswap (uint32_t x)
 
static uint64_t bswap (uint64_t x)
 
int XrdSys::getIovMax ()
 
size_t strlcpy (char *dst, const char *src, size_t size)
 

Macro Definition Documentation

◆ CHMOD

#define CHMOD (   path,
  mode 
)    chmod(path,mode)

Definition at line 292 of file XrdSysPlatform.hh.

◆ FLOCK_t

#define FLOCK_t   flock_t

Definition at line 129 of file XrdSysPlatform.hh.

◆ FS_BLKFACT

#define FS_BLKFACT   1

Definition at line 125 of file XrdSysPlatform.hh.

◆ GTZ_NULL

#define GTZ_NULL   (void *)0

Definition at line 131 of file XrdSysPlatform.hh.

◆ IOV_INIT

#define IOV_INIT (   data,
  dlen 
)    data,dlen

Definition at line 290 of file XrdSysPlatform.hh.

◆ LT_MODULE_EXT

#define LT_MODULE_EXT   ".so"

Definition at line 301 of file XrdSysPlatform.hh.

◆ MAKEDIR

#define MAKEDIR (   path,
  mode 
)    mkdir(path,mode)

Definition at line 291 of file XrdSysPlatform.hh.

◆ net_errno

#define net_errno   errno

Definition at line 293 of file XrdSysPlatform.hh.

◆ Netdata_t

#define Netdata_t   char *

Definition at line 288 of file XrdSysPlatform.hh.

◆ O_BINARY

#define O_BINARY   0

Definition at line 287 of file XrdSysPlatform.hh.

◆ PTR2INT

#define PTR2INT (   x)    int(x)

Definition at line 275 of file XrdSysPlatform.hh.

◆ SHMDT_t

#define SHMDT_t   char *

Definition at line 127 of file XrdSysPlatform.hh.

◆ SOCKLEN_t

#define SOCKLEN_t   socklen_t

Definition at line 269 of file XrdSysPlatform.hh.

◆ Sokdata_t

#define Sokdata_t   void *

Definition at line 289 of file XrdSysPlatform.hh.

◆ STATFS

#define STATFS   statvfs

Definition at line 122 of file XrdSysPlatform.hh.

◆ STATFS_BUFF

#define STATFS_BUFF   struct statvfs

Definition at line 123 of file XrdSysPlatform.hh.

◆ XRDABS

#define XRDABS (   x)    (x < 0 ? -x : x)

Definition at line 298 of file XrdSysPlatform.hh.

Function Documentation

◆ bswap() [1/3]

static uint16_t bswap ( uint16_t  x)
inlinestatic

Definition at line 176 of file XrdSysPlatform.hh.

176 { return bswap_16(x); }

Referenced by XrdZip::from_buffer(), and XrdZip::to().

+ Here is the caller graph for this function:

◆ bswap() [2/3]

static uint32_t bswap ( uint32_t  x)
inlinestatic

Definition at line 177 of file XrdSysPlatform.hh.

177 { return bswap_32(x); }

◆ bswap() [3/3]

static uint64_t bswap ( uint64_t  x)
inlinestatic

Definition at line 178 of file XrdSysPlatform.hh.

178 { return bswap_64(x); }

◆ strlcpy()

size_t strlcpy ( char *  dst,
const char *  src,
size_t  size 
)

Definition at line 60 of file XrdSysPlatform.cc.

61 {
62  size_t slen = strlen(src);
63  size_t tlen =sz-1;
64 
65  if (slen <= tlen) strcpy(dst, src);
66  else if (tlen > 0) {strncpy(dst, src, tlen); dst[tlen] = '\0';}
67  else if (tlen == 0) dst[0] = '\0';
68 
69  return slen;
70 }

Referenced by XrdFrcProxy::Add(), XrdOfsPoscq::Add(), XrdFrcReqAgent::Add(), XrdLinkCtl::Alloc(), XrdCmsResp::Alloc(), XrdSecProtocolsss::Authenticate(), XrdOssSys::ConfigXeq(), XrdOfs::ConfigXeq(), XrdFrcProxy::Del(), XrdCmsNode::do_Locate(), XrdCmsNode::do_StatFS(), XrdOucUtils::eText(), XrdOssCache::Find(), XrdOucERoute::Format(), XrdOucUtils::genPath(), XrdFrcCID::Get(), XrdOucCallBack::Init(), XrdFrcReqFile::List(), XrdFrcReqFile::ListL(), XrdSecProtocolsss::Load_Server(), XrdXrootdPrepare::Log(), XrdFrmMonitor::Map(), XrdOssCache::MapDevs(), XrdOfsTPCAllow::Match(), XrdOssSys::MSS_Readdir(), XrdCmsManList::Next(), XrdOssCache::Parse(), XrdOucExport::ParsePath(), XrdOucPsx::ParseSet(), XrdOucN2N::pfn2lfn(), XrdCmsFinderRMT::Prepare(), XrdFrmMigrate::Queue(), XrdOssDir::Readdir(), XrdPssDir::Readdir(), XrdLinkXeq::Register(), XrdCmsCluster::Remove(), XrdCmsResp::Reply(), XrdOfsHandle::Retire(), XrdLinkMatch::Set(), XrdOucErrInfo::setErrData(), XrdOucErrInfo::setErrInfo(), XrdNetSocket::socketPath(), XrdFrcReqAgent::Start(), XrdSecProtocolgsiInit(), XrdSecProtocolkrb5Init(), and XrdSecProtocolpwdInit().

+ Here is the caller graph for this function: