/usr/include/lam/portable.h is in lam4-dev 7.1.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | /*
* Copyright (c) 2001-2002 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 1998-2001 University of Notre Dame.
* All rights reserved.
* Copyright (c) 1994-1998 The Ohio State University.
* All rights reserved.
*
* This file is part of the LAM/MPI software package. For license
* information, see the LICENSE file in the top level directory of the
* LAM/MPI source distribution.
*
* $HEADER$
*
* $Id: portable.h,v 6.8 2002/10/09 20:57:25 brbarret Exp $
*
* Function: - Put some order into a world of chaos.
* - Anybody without an 8 bit byte can get lost.
*/
#ifndef _PORTABLE
#define _PORTABLE
#include <lam_config.h>
#include <limits.h>
/*
* To const or not to const.
*/
#ifndef CONST
#if __STDC__ || defined(c_plusplus) || defined(__cplusplus)
#define CONST const
#else
#define CONST
#endif
#endif
/*
* Can you believe that some compilers would default char to unsigned char?
*/
#ifndef SIGNED
#if __STDC__ || defined(c_plusplus) || defined(__cplusplus)
#define SIGNED signed
#else
#define SIGNED
#endif
#endif
/*
* Path name separator.
*/
#ifndef DOS
#define STRDIR '/'
#define STRSDIR "/"
#else
#define STRDIR '\\'
#define STRSDIR "\\"
#endif
/*
* Maximum size of a filename path.
*/
#if defined(PATH_MAX)
#define LAM_PATH_MAX (PATH_MAX + 1)
#elif defined(_POSIX_PATH_MAX)
#define LAM_PATH_MAX (_POSIX_PATH_MAX + 1)
#else
#define LAM_PATH_MAX 256
#endif
/*
* Portable datatypes.
*/
#if LAM_SIZEOF_SHORT == 2
#if !LAM_HAVE_int2
typedef short int2;
#endif
#if !LAM_HAVE_uint2
typedef unsigned short uint2;
#endif
#elif LAM_SIZEOF_INT == 2
#if !LAM_HAVE_int2
typedef int int2;
#endif
#if !LAM_HAVE_uint2
typedef unsigned int uint2;
#endif
#endif
#if LAM_SIZEOF_INT == 4
#if !LAM_HAVE_int4
typedef int int4;
#endif
#if !LAM_HAVE_uint4
typedef unsigned int uint4;
#endif
#define stoi4 stoi
#define atoi4 atoi
#elif LAM_SIZEOF_SHORT == 4
#if !LAM_HAVE_int4
typedef short int4;
#endif
#if !LAM_HAVE_uint4
typedef unsigned short uint4;
#endif
#define stoi4 stos
#define atoi4 atos
#elif LAM_SIZEOF_LONG == 4
#if !LAM_HAVE_int4
typedef long int4;
#endif
#if !LAM_HAVE_uint4
typedef unsigned long uint4;
#endif
#define stoi4 stol
#define atoi4 atol
#endif
#if LAM_SIZEOF_LONG == 8
#if !LAM_HAVE_int8
typedef long int8;
#endif
#if !LAM_HAVE_uint8
typedef unsigned long uint8;
#endif
#elif LAM_SIZEOF_INT == 8
#if !LAM_HAVE_int8
typedef int int8;
#endif
#if !LAM_HAVE_uint8
typedef unsigned int uint8;
#endif
#elif LAM_SIZEOF_LONG_LONG == 8
#if !LAM_HAVE_int8
typedef long long int8;
#endif
#if !LAM_HAVE_uint8
typedef unsigned long long uint8;
#endif
#endif
#if !LAM_HAVE_float4
#if LAM_SIZEOF_FLOAT == 4
typedef float float4;
#endif
#endif
#if !LAM_HAVE_float8
#if LAM_SIZEOF_FLOAT == 8
typedef float float8;
#elif LAM_SIZEOF_DOUBLE == 8
typedef double float8;
#endif
#endif
#define INT4_NIL ((int4) 0)
#define INT4_MAX ((int4) 0x7FFFFFFF)
#define INT4_MIN ((int4) 0x80000000)
#define INT4_LSB ((int4) 0xFF) /* least significant byte */
#define INT4_LSN ((int4) 0x0F) /* least significant nibble */
#define INT4_MSN ((int4) 0xF0) /* most significant nibble */
#define INT4_SIGN ((int4) 0x80000000) /* sign bit of an int4 */
#define UINT4_MAX ((uint4) 0xFFFFFFFF) /* maximum uint4 */
#endif
|