Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:52

0001 #ifndef __XPTYPES_H
0002 #define __XPTYPES_H
0003 /******************************************************************************/
0004 /*                                                                            */
0005 /*                            X P t y p e s . h h                             */
0006 /*                                                                            */
0007 /* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University  */
0008 /*                            All Rights Reserved                             */
0009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
0010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
0011 /*                                                                            */
0012 /* This file is part of the XRootD software suite.                            */
0013 /*                                                                            */
0014 /* XRootD is free software: you can redistribute it and/or modify it under    */
0015 /* the terms of the GNU Lesser General Public License as published by the     */
0016 /* Free Software Foundation, either version 3 of the License, or (at your     */
0017 /* option) any later version.                                                 */
0018 /*                                                                            */
0019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
0020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
0021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
0022 /* License for more details.                                                  */
0023 /*                                                                            */
0024 /* The XRootD protocol definition, documented in this file, is distributed    */
0025 /* under a modified BSD license and may be freely used to reimplement it.     */
0026 /* Any references to "source" in this license refers to this file or any      */
0027 /* other file that specifically contains the following license.               */
0028 /*                                                                            */
0029 /* Redistribution and use in source and binary forms, with or without         */
0030 /* modification, are permitted provided that the following conditions         */
0031 /* are met:                                                                   */
0032 /*                                                                            */
0033 /* 1. Redistributions of source code must retain the above copyright notice,  */
0034 /*    this list of conditions and the following disclaimer.                   */
0035 /*                                                                            */
0036 /* 2. Redistributions in binary form must reproduce the above copyright       */
0037 /*    notice, this list of conditions and the following disclaimer in the     */
0038 /*    documentation and/or other materials provided with the distribution.    */
0039 /*                                                                            */
0040 /* 3. Neither the name of the copyright holder nor the names of its           */
0041 /*    contributors may be used to endorse or promote products derived from    */
0042 /*    this software without specific prior written permission.                */
0043 /*                                                                            */
0044 /* 4. Derived software may not use the name XRootD or cmsd (regardless of     */
0045 /*    capitilization) in association with the derived work if the protocol    */
0046 /*    documented in this file is changed in any way.                          */
0047 /*                                                                            */
0048 /*    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     */
0049 /*    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       */
0050 /*    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR   */
0051 /*    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT    */
0052 /*    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  */
0053 /*    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        */
0054 /*    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   */
0055 /*    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   */
0056 /*    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     */
0057 /*    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   */
0058 /******************************************************************************/
0059 
0060 // Full range type compatibility work done by Gerardo Ganis, CERN.
0061 
0062 // Typical data types
0063 //
0064 // Only char and short are truly portable types
0065 typedef unsigned char  kXR_char;
0066 typedef short          kXR_int16;
0067 typedef unsigned short kXR_unt16;
0068 
0069 // Signed integer 4 bytes
0070 //
0071 #ifndef XR__INT16
0072 #   if defined(LP32) || defined(__LP32) || defined(__LP32__) || \
0073        defined(BORLAND)
0074 #      define XR__INT16
0075 #   endif
0076 #endif
0077 #ifndef XR__INT64
0078 #   if defined(ILP64) || defined(__ILP64) || defined(__ILP64__)
0079 #      define XR__INT64
0080 #   endif
0081 #endif
0082 #if defined(XR__INT16)
0083 typedef long           kXR_int32;
0084 typedef unsigned long  kXR_unt32;
0085 #elif defined(XR__INT64)
0086 typedef int32          kXR_int32;
0087 typedef unsigned int32 kXR_unt32;
0088 #else
0089 typedef int            kXR_int32;
0090 typedef unsigned int   kXR_unt32;
0091 #endif
0092 
0093 // Signed integer 8 bytes
0094 //
0095 //#if defined(_WIN32)
0096 //typedef __int64        kXR_int64;
0097 //#else
0098 typedef long long          kXR_int64;
0099 typedef unsigned long long kXR_unt64;
0100 //#endif
0101 #endif