xrootd
Classes | Defines | Typedefs | Functions
XrdWin32.hh File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <time.h>
#include <direct.h>
#include <sys/types.h>
#include <Winsock2.h>
Include dependency graph for XrdWin32.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pollfd
struct  timezone
struct  iovec
struct  sockaddr_un

Defines

#define POLLIN   0x0001
#define POLLPRI   0x0002
#define POLLOUT   0x0004
#define POLLERR   0x0008
#define POLLHUP   0x0010
#define POLLNVAL   0x0020
#define POLLRDNORM   0x0001
#define POLLWRNORM   0x0002
#define POLLRDBAND   0x0000
#define EMSGSIZE   WSAEMSGSIZE
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EWOULDBLOCK   WSAEWOULDBLOCK
#define ECONNRESET   WSAECONNRESET
#define EINPROGRESS   WSAEINPROGRESS
#define ENOBUFS   WSAENOBUFS
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ECONNREFUSED   WSAECONNREFUSED
#define EBADFD   WSAENOTSOCK
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define ENETUNREACH   WSAENETUNREACH
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define EHOSTDOWN   WSAEHOSTDOWN
#define EISCONN   WSAEISCONN
#define ECONNABORTED   WSAECONNABORTED
#define ESHUTDOWN   WSAESHUTDOWN
#define ETIMEDOUT   WSAETIMEDOUT
#define ETXTBSY   26
#define WEXITSTATUS(w)   (((w) >> 8) & 0xff)
#define WIFEXITED(w)   (((w) & 0xff) == 0)
#define WTERMSIG(w)   ((w) & 0x7f)
#define WIFSIGNALED(w)   (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#define S_ISDIR(m)   (((m)&(S_IFMT)) == (S_IFDIR))
#define S_ISREG(m)   (((m)&(S_IFMT)) == (S_IFREG))
#define S_IXUSR   00100
#define S_IRGRP   00040
#define S_IXGRP   00010
#define S_IROTH   00004
#define S_IXOTH   00001
#define S_IRUSR   S_IREAD
#define S_IWUSR   S_IWRITE
#define S_IWGRP   000020
#define S_IWOTH   000002
#define S_IRWXU   0000700
#define S_IRWXG   0000070
#define S_IFIFO   0010000
#define S_ISFIFO(m)   ((m & S_IFMT) == S_IFIFO)
#define S_IFSOCK   0140000
#define _SC_PAGESIZE   1
#define F_GETFL   1
#define F_SETFL   2
#define F_GETFD   4
#define F_SETFD   8
#define FD_CLOEXEC   1
#define O_NDELAY   2
#define O_NONBLOCK   4
#define X_OK   1
#define W_OK   2
#define R_OK   4
#define RTLD_NOW   0x0001
#define STDIN_FILENO   0
#define STDOUT_FILENO   1
#define STDERR_FILENO   2
#define fsync(a)   _commit(a)
#define socklen_t   int
#define SOCKLEN_t   int
#define snprintf   _snprintf
#define localtime_r(_clock, _result)
#define pipe(a)   _pipe(a, 256, O_BINARY)
#define rindex   strrchr
#define sleep(s)   Sleep(s*1000)
#define strtoll(a, b, c)   _strtoi64(a, b, c)
#define ntohll(x)   (((_int64)(ntohl((int)((x << 32) >> 32))) << 32) | (unsigned int)ntohl(((int)(x >> 32))))
#define htonll(x)   ntohll(x)
#define random()   rand()
#define usleep(x)   Sleep(x / 1000)
#define lstat(a, b)   stat(a, b)
#define memalign(a, b)   _aligned_malloc(b, a)
#define setpgid(x, y)
#define fsync(a)   _commit(a)
#define ssize_t   SSIZE_T

Typedefs

typedef char * caddr_t
typedef int pid_t
typedef unsigned int mode_t
typedef unsigned short uint16_t

Functions

int poll (struct pollfd *fds, unsigned int nfds, int timeout)
int lrint (double n)
void gethostbyname_r (const char *inetName, struct hostent *hent, char *buff, int buffsize, struct hostent **hp, int *rc)
void gethostbyaddr_r (char *addr, size_t len, int type, struct hostent *hent, char *buff, size_t buffsize, struct hostent **hp, int *rc)
int getservbyname_r (const char *servname, const char *servtype, struct servent *sent, char *buff, size_t buffsize, struct servent **sp)
int gettimeofday (struct timeval *tp, struct timezone *tzp)
void * dlopen (const char *libPath, int opt)
BOOL dlclose (void *lib)
void * dlsym (void *libHandle, const char *pname)
char * dlerror ()
pid_t fork ()
const char * inet_ntop (int af, const void *src, char *dst, size_t size)
int sysconf (int what)
int fcntl (int fd, int cmd, long arg)
int close (int fd)
int writev (int sock, const struct iovec iov[], int nvecs)
int posix_memalign (void **memptr, size_t alignment, size_t size)
char * index (const char *str, int c)

Define Documentation

#define _SC_PAGESIZE   1
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EBADFD   WSAENOTSOCK
#define ECONNABORTED   WSAECONNABORTED
#define ECONNREFUSED   WSAECONNREFUSED
#define ECONNRESET   WSAECONNRESET
#define EHOSTDOWN   WSAEHOSTDOWN
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define EINPROGRESS   WSAEINPROGRESS
#define EISCONN   WSAEISCONN
#define EMSGSIZE   WSAEMSGSIZE
#define ENETUNREACH   WSAENETUNREACH
#define ENOBUFS   WSAENOBUFS
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ESHUTDOWN   WSAESHUTDOWN
#define ETIMEDOUT   WSAETIMEDOUT
#define ETXTBSY   26
#define EWOULDBLOCK   WSAEWOULDBLOCK
#define F_GETFD   4
#define F_GETFL   1
#define F_SETFD   8
#define F_SETFL   2
#define FD_CLOEXEC   1
#define fsync (   a)    _commit(a)
#define fsync (   a)    _commit(a)
#define htonll (   x)    ntohll(x)
#define localtime_r (   _clock,
  _result 
)
#define lstat (   a,
 
)    stat(a, b)
#define memalign (   a,
 
)    _aligned_malloc(b, a)
#define ntohll (   x)    (((_int64)(ntohl((int)((x << 32) >> 32))) << 32) | (unsigned int)ntohl(((int)(x >> 32))))
#define O_NDELAY   2
#define O_NONBLOCK   4
#define pipe (   a)    _pipe(a, 256, O_BINARY)
#define POLLERR   0x0008
#define POLLHUP   0x0010
#define POLLIN   0x0001
#define POLLNVAL   0x0020
#define POLLOUT   0x0004
#define POLLPRI   0x0002
#define POLLRDBAND   0x0000
#define POLLRDNORM   0x0001
#define POLLWRNORM   0x0002
#define R_OK   4
#define random ( )    rand()

Referenced by Think().

#define rindex   strrchr
#define RTLD_NOW   0x0001
#define S_IFIFO   0010000
#define S_IFSOCK   0140000
#define S_IRGRP   00040
#define S_IROTH   00004
#define S_IRUSR   S_IREAD
#define S_IRWXG   0000070
#define S_IRWXU   0000700
#define S_ISDIR (   m)    (((m)&(S_IFMT)) == (S_IFDIR))
#define S_ISFIFO (   m)    ((m & S_IFMT) == S_IFIFO)
#define S_ISREG (   m)    (((m)&(S_IFMT)) == (S_IFREG))
#define S_IWGRP   000020
#define S_IWOTH   000002
#define S_IWUSR   S_IWRITE
#define S_IXGRP   00010
#define S_IXOTH   00001
#define S_IXUSR   00100
#define setpgid (   x,
 
)

Referenced by XrdOucStream::Exec().

#define sleep (   s)    Sleep(s*1000)
#define snprintf   _snprintf

Referenced by XrdAccAudit::Deny(), XrdAccAudit::Grant(), XrdAccConfig::ConfigDB(), XrdAccConfig::ConfigFile(), XrdBuffManager::Stats(), XrdBwm::Emsg(), XrdBwmLogger::Event(), XrdClientConn::DoLogin(), XrdClientConn::DoAuthentication(), XrdClientInputBuffer::GetSyncObjOrMakeOne(), XrdCmsCluster::Select(), XrdCmsCluster::Stats(), XrdCmsCluster::Statt(), XrdCmsConfig::PidFile(), XrdCmsManTree::Connect(), XrdCmsManTree::setMaxCon(), XrdCmsNode::do_Load(), XrdCryptoFactory::GetCryptoFactory(), XrdFrmTransfer::Fetch(), XrdLink::setID(), XrdLink::Stats(), XrdLink::Terminate(), XrdOfs::Emsg(), XrdOfs::Stall(), XrdOfs::WaitTime(), XrdOfs::Config_Display(), XrdOfsEvsFormat::SNP(), XrdOssCache::List(), XrdOssSys::Config_Display(), XrdOssSys::List_Path(), XrdOssMio::Display(), XrdOssSys::Rename(), XrdOssSys::StatFS(), XrdOssSys::StatLS(), XrdOssSys::StatXA(), XrdOssSys::getStats(), XrdOucBonjourRecord::AddTXTRecord(), XrdOucBonjourNode::Print(), XrdOucReqID::XrdOucReqID(), XrdOucReqID::isMine(), XrdOucReqID::ID(), XrdOucUtils::fmtBytes(), XrdOucUtils::PidFile(), XrdPoll::Stats(), XrdPollPoll::LogEvent(), XrdPosixXrootd::endPoint(), XrdPssSys::P2URL(), XrdPssSys::buildHdr(), XrdRootdProtocol::Stats(), XrdScheduler::Stats(), XrdSecPManager::ldPO(), XrdSecProtocolkrb5::Authenticate(), XrdSecProtocolkrb5::Init(), XrdSecProtocolpwd::QueryCreds(), XrdSecProtocolpwd::QueryUser(), XrdSecProtocolsss::Decode(), XrdSecProtocolunix::Authenticate(), XrdSecServer::ConfigFile(), XrdSecsssKT::genFN(), XrdSfsNative::Emsg(), XrdStats::Stats(), XrdStats::InfoStats(), XrdStats::ProcStats(), XrdSutPFile::Err(), XrdSysDNS::IPFormat(), XrdSysDNS::IP2String(), XrdSysError::Emsg(), XrdSysFAttr::Diagnose(), XrdSysLogger::Time(), XrdSysTimer::s2hms(), XrdXrootdAdmin::do_Login(), XrdXrootdAdmin::sendErr(), XrdXrootdAdmin::sendOK(), XrdXrootdAioReq::sendError(), XrdXrootdProtocol::PidFile(), XrdXrootdPrepare::List(), XrdXrootdPrepare::Log(), XrdXrootdProtocol::Recycle(), XrdXrootdStats::Stats(), XrdXrootdProtocol::do_Dirlist(), XrdXrootdProtocol::do_Open(), XrdXrootdProtocol::MonAuth(), XrdXrootdProtocol::rpEmsg(), XrdXrootdProtocol::vpEmsg(), and XrdXrootdProtocol::aio_Error().

#define socklen_t   int
#define SOCKLEN_t   int
#define ssize_t   SSIZE_T
#define STDERR_FILENO   2
#define STDIN_FILENO   0
#define STDOUT_FILENO   1
#define strtoll (   a,
  b,
 
)    _strtoi64(a, b, c)
#define usleep (   x)    Sleep(x / 1000)

Referenced by main().

#define W_OK   2
#define WEXITSTATUS (   w)    (((w) >> 8) & 0xff)
#define WIFEXITED (   w)    (((w) & 0xff) == 0)
#define WIFSIGNALED (   w)    (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#define WTERMSIG (   w)    ((w) & 0x7f)
#define X_OK   1

Typedef Documentation

typedef char* caddr_t
typedef unsigned int mode_t
typedef int pid_t
typedef unsigned short uint16_t

Function Documentation

int close ( int  fd)
BOOL dlclose ( void *  lib)
char* dlerror ( )
void* dlopen ( const char *  libPath,
int  opt 
)
void* dlsym ( void *  libHandle,
const char *  pname 
)
int fcntl ( int  fd,
int  cmd,
long  arg 
)
pid_t fork ( )
void gethostbyaddr_r ( char *  addr,
size_t  len,
int  type,
struct hostent *  hent,
char *  buff,
size_t  buffsize,
struct hostent **  hp,
int *  rc 
)
void gethostbyname_r ( const char *  inetName,
struct hostent *  hent,
char *  buff,
int  buffsize,
struct hostent **  hp,
int *  rc 
)

Referenced by XrdSysDNS::getHostAddr().

int getservbyname_r ( const char *  servname,
const char *  servtype,
struct servent *  sent,
char *  buff,
size_t  buffsize,
struct servent **  sp 
)

Referenced by XrdSysDNS::getPort().

int gettimeofday ( struct timeval *  tp,
struct timezone tzp 
)
char* index ( const char *  str,
int  c 
)

Referenced by XrdBwmFile::open(), XrdClientVector::BufRealloc(), XrdCmsClientConfig::xmang(), XrdCmsClientMan::XrdCmsClientMan(), XrdCmsConfig::PidFile(), XrdCmsConfig::xmang(), XrdCmsConfig::xrmtrt(), XrdCmsManList::Add(), XrdCmsNode::XrdCmsNode(), XrdCmsNode::do_Select(), XrdCmsPrepare::Add(), XrdCmsPrepare::Inform(), XrdCmsReq::Reply_Redirect(), XrdCnsConfig::Configure(), XrdCnsDaemon::getLFN(), XrdCnsLog::isEP(), XrdCnsLogServer::Massage(), XrdCnsSsi::AddDel(), XrdCnsSsi::AddFile(), XrdConfig::Configure(), XrdConfig::xprot(), XrdConfig::xrep(), XrdFfsMisc_get_current_url(), XrdFfsMisc_get_all_urls_real(), XrdFrcUtils::chkURL(), XrdFrcUtils::MapM2O(), XrdFrmAdmin::ParseKeep(), XrdFrmAdmin::ParseOwner(), XrdFrmAdmin::ParseSpace(), XrdFrmConfig::Configure(), XrdFrmConfig::ConfigCmd(), XrdFrmConfig::ConfigOTO(), XrdFrmConfig::xmon(), XrdFrmTransfer::TrackDC(), XrdFrmXfrAgent::Add(), XrdFrmXfrQueue::Notify(), XrdLink::Terminate(), XrdLinkMatch::Set(), XrdMpxXml::Format(), XrdMpxXml::getVars(), XrdOfs::fsctl(), XrdOfs::xforward(), XrdOfsEvs::Parse(), XrdOfsHandle::PoscSet(), XrdOssSys::Mkpath(), XrdOssCache::Parse(), XrdOssSys::ConfigStageC(), XrdOssPath::Extract(), XrdOssPath::genPath(), XrdOssPath::genPFN(), XrdOssPath::posCname(), XrdOucArgs::getopt(), XrdOucMsubs::Parse(), XrdOucNList::XrdOucNList(), XrdOucReqID::isMine(), XrdOucStream::XrdOucStream(), XrdOucStream::isSet(), XrdOucStream::vSubs(), XrdOucUtils::makePath(), XrdPosixXrootPath::XrdPosixXrootPath(), XrdPssSys::P2URL(), XrdPssSys::T2UID(), XrdPssSys::xorig(), XrdSecProtocolsss::getLID(), XrdSecProtBind::XrdSecProtBind(), main(), getXDate(), XrdSfsNative::Mkpath(), XrdSysDNS::Host2Dest(), XrdSysDNS::isMatch(), XrdXrootdAdmin::do_Red(), XrdXrootdProtocol::xmon(), XrdXrootdProtocol::xred(), XrdXrootdPrepare::List(), XrdXrootdPrepare::Scrub(), and XrdXrootdProtocol::rpCheck().

const char* inet_ntop ( int  af,
const void *  src,
char *  dst,
size_t  size 
)
int lrint ( double  n) [inline]
int poll ( struct pollfd fds,
unsigned int  nfds,
int  timeout 
) [inline]
int posix_memalign ( void **  memptr,
size_t  alignment,
size_t  size 
)
int sysconf ( int  what)
int writev ( int  sock,
const struct iovec  iov[],
int  nvecs 
)

References is_socket(), and iovec::iov_len.