XrdProofdPlatform.h

Go to the documentation of this file.
00001 // @(#)root/proofd:$Id: XrdProofdPlatform.h 34045 2010-06-22 09:36:20Z rdm $
00002 // Author: G. Ganis  June 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_XrdProofdPlatform
00013 #define ROOT_XrdProofdPlatform
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // XrdProofdPlatform                                                    //
00018 //                                                                      //
00019 // Authors: G. Ganis, CERN, 2007                                        //
00020 //                                                                      //
00021 // System settings used in XrdProofd classes, possibly platform         //
00022 // dependent                                                            //
00023 //                                                                      //
00024 //////////////////////////////////////////////////////////////////////////
00025 
00026 // 32 or 64 bits
00027 #if ((defined(__hpux) && defined(__LP64__)) || \
00028      (defined(__alpha) && !defined(linux) && !defined(__VMS)) || \
00029      (defined(__sgi) && (defined(__mips64) || defined(_ABI64))) || \
00030      (defined(linux) && (defined(__ia64__) || defined(__x86_64__) || defined(__alpha__))) || \
00031      (defined(__linux) && defined(__mips__) && (_MIPS_SIM == _ABI64)) || \
00032      (defined(linux) && defined(__powerpc__) && defined(R__ppc64)) || \
00033      (defined(__APPLE__) && (defined(__ppc64__) || defined(__x86_64__))))
00034 #  define XPD__B64
00035 #endif
00036 
00037 #ifdef __APPLE__
00038 #   ifndef __macos__
00039 #      define __macos__
00040 #   endif
00041 #endif
00042 #ifdef __sun
00043 #   ifndef __solaris__
00044 #      define __solaris__
00045 #   endif
00046 #endif
00047 
00048 #include <errno.h>
00049 #include <stdio.h>
00050 #include <stdlib.h>
00051 #include <string.h>
00052 #include <unistd.h>
00053 #include <sys/types.h>
00054 #include <sys/socket.h>
00055 #include <netinet/in.h>
00056 #include <sys/stat.h>
00057 #include <pwd.h>
00058 #include <sys/resource.h>
00059 #include <sys/file.h>
00060 #include <dirent.h>
00061 #include <libgen.h>
00062 
00063 // Bypass Solaris ELF madness
00064 //
00065 #if (defined(SUNCC) || defined(__sun))
00066 #include <sys/isa_defs.h>
00067 #if defined(_ILP32) && (_FILE_OFFSET_BITS != 32)
00068 #undef  _FILE_OFFSET_BITS
00069 #define _FILE_OFFSET_BITS 32
00070 #undef  _LARGEFILE_SOURCE
00071 #endif
00072 #endif
00073 
00074 // System info on Solaris
00075 #if (defined(SUNCC) || defined(__sun)) && !defined(__KCC)
00076 #   define XPD__SUNCC
00077 #   include <sys/systeminfo.h>
00078 #   include <sys/filio.h>
00079 #   include <sys/sockio.h>
00080 #   include <fcntl.h>
00081 #   define HASNOT_INETATON
00082 #   ifndef INADDR_NONE
00083 #   define INADDR_NONE (UInt_t)-1
00084 #   endif
00085 #endif
00086 
00087 #include <dlfcn.h>
00088 #if !defined(__APPLE__)
00089 #include <link.h>
00090 #endif
00091 
00092 #if defined(linux) || defined(__sun) || defined(__sgi) || \
00093     defined(_AIX) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
00094     defined(__APPLE__) || defined(__MACH__) || defined(cygwingcc)
00095 #include <grp.h>
00096 #endif
00097 
00098 // For process info
00099 #if defined(__sun)
00100 #include <procfs.h>
00101 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
00102 #include <sys/sysctl.h>
00103 #endif
00104 
00105 // Poll
00106 #include <sys/poll.h>
00107 
00108 // Name of the env variable used to define the library path
00109 #if defined(__hpux) || defined(_HIUX_SOURCE)
00110 #define XPD_LIBPATH "SHLIB_PATH"
00111 #elif defined(_AIX)
00112 #define XPD_LIBPATH "LIBPATH"
00113 #elif defined(__APPLE__)
00114 #define XPD_LIBPATH "DYLD_LIBRARY_PATH"
00115 #else
00116 #define XPD_LIBPATH "LD_LIBRARY_PATH"
00117 #endif
00118 
00119 // Time related
00120 #include <sys/time.h>
00121 #include <utime.h>
00122 
00123 // Macros to check ranges
00124 #ifdef XPD__B64
00125 #  define XPD_LONGOK(x) (1)
00126 #else
00127 #  define XPD_LONGOK(x) (x > LONG_MIN && x < LONG_MAX)
00128 #endif
00129 
00130 // Wait related
00131 #include <sys/wait.h>
00132 
00133 #endif

Generated on Tue Jul 5 14:51:45 2011 for ROOT_528-00b_version by  doxygen 1.5.1