ROOT
6.10/09
Reference Guide
proof
proofd
inc
XrdProofdPlatform.h
Go to the documentation of this file.
1
// @(#)root/proofd:$Id$
2
// Author: G. Ganis June 2007
3
4
/*************************************************************************
5
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_XrdProofdPlatform
13
#define ROOT_XrdProofdPlatform
14
15
//////////////////////////////////////////////////////////////////////////
16
// //
17
// XrdProofdPlatform //
18
// //
19
// Authors: G. Ganis, CERN, 2007 //
20
// //
21
// System settings used in XrdProofd classes, possibly platform //
22
// dependent //
23
// //
24
//////////////////////////////////////////////////////////////////////////
25
26
#include "
RConfig.h
"
27
28
// 32 or 64 bits
29
#if ((defined(__hpux) && defined(__LP64__)) || \
30
(defined(linux) && (defined(__ia64__) || defined(__x86_64__))) || \
31
(defined(linux) && defined(__powerpc__) && defined(R__ppc64)) || \
32
(defined(__APPLE__) && (defined(__ppc64__) || defined(__x86_64__))))
33
# define XPD__B64
34
#endif
35
36
#ifdef __APPLE__
37
# ifndef __macos__
38
# define __macos__
39
# endif
40
#endif
41
#ifdef __sun
42
# ifndef __solaris__
43
# define __solaris__
44
# endif
45
#endif
46
47
#include <errno.h>
48
#include <stdio.h>
49
#include <stdlib.h>
50
#include <string.h>
51
#include <unistd.h>
52
#include <sys/types.h>
53
#ifndef ROOT_XrdFour
54
# include <sys/socket.h>
55
# include <netinet/in.h>
56
#endif
57
#include <sys/stat.h>
58
#include <sys/un.h>
59
#include <pwd.h>
60
#include <sys/resource.h>
61
#include <sys/file.h>
62
#include <dirent.h>
63
#include <libgen.h>
64
65
// Bypass Solaris ELF madness
66
//
67
#if (defined(SUNCC) || defined(__sun))
68
#include <sys/isa_defs.h>
69
#if defined(_ILP32) && (_FILE_OFFSET_BITS != 32)
70
#undef _FILE_OFFSET_BITS
71
#define _FILE_OFFSET_BITS 32
72
#undef _LARGEFILE_SOURCE
73
#endif
74
#endif
75
76
// System info on Solaris
77
#if (defined(SUNCC) || defined(__sun)) && !defined(__KCC)
78
# define XPD__SUNCC
79
# include <sys/systeminfo.h>
80
# include <sys/filio.h>
81
# include <sys/sockio.h>
82
# include <fcntl.h>
83
# define HASNOT_INETATON
84
# ifndef INADDR_NONE
85
# define INADDR_NONE (UInt_t)-1
86
# endif
87
#endif
88
89
#include <dlfcn.h>
90
#if !defined(__APPLE__)
91
#include <link.h>
92
#endif
93
94
#if defined(linux) || defined(__sun) || defined(__sgi) || \
95
defined(_AIX) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
96
defined(__APPLE__) || defined(__MACH__) || defined(cygwingcc)
97
#include <grp.h>
98
#endif
99
100
// For process info
101
#if defined(__sun)
102
#include <procfs.h>
103
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
104
#include <sys/sysctl.h>
105
#endif
106
107
// Poll
108
#include <sys/poll.h>
109
110
// Name of the env variable used to define the library path
111
#if defined(__hpux) || defined(_HIUX_SOURCE)
112
#define XPD_LIBPATH "SHLIB_PATH"
113
#elif defined(_AIX)
114
#define XPD_LIBPATH "LIBPATH"
115
#elif defined(__APPLE__)
116
#define XPD_LIBPATH "DYLD_LIBRARY_PATH"
117
#else
118
#define XPD_LIBPATH "LD_LIBRARY_PATH"
119
#endif
120
121
// Time related
122
#include <sys/time.h>
123
#include <utime.h>
124
125
// Macros to check ranges
126
#ifdef XPD__B64
127
# define XPD_LONGOK(x) (1)
128
#else
129
# define XPD_LONGOK(x) (x > LONG_MIN && x < LONG_MAX)
130
#endif
131
132
// Wait related
133
#include <sys/wait.h>
134
135
#endif
RConfig.h