/usr/include/dar/integers.hpp is in libdar-dev 2.4.2-1.
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 | /*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2052 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// to contact the author : http://dar.linux.free.fr/email.html
/*********************************************************************/
// $Id: integers.hpp,v 1.17 2011/02/17 21:45:22 edrusb Rel $
//
/*********************************************************************/
/// \file integers.hpp
/// \brief are defined here basic integer types that tend to be portable
/// \ingroup Private
#ifndef INTEGERS_HPP
#define INTEGERS_HPP
#include "/usr/include/dar/libdar_my_config.h"
#include <string>
/// \addtogroup Private
/// @{
#ifndef LIBDAR_OS_BITS
#if LIBDAR_HAS_INTTYPES_H
extern "C"
{
#if LIBDAR_HAS_INTTYPES_H
#include <inttypes.h>
#endif
#if LIBDAR_HAS_LIMITS_H
#include <limits.h>
#endif
} // end extern "C"
namespace libdar
{
typedef unsigned char U_8;
typedef uint16_t U_16;
typedef uint32_t U_32;
typedef uint64_t U_64;
typedef size_t U_I;
// configure will define size_t as "unsigned int" if it not defined by system headers
// thus using U_I we are sure we can compare buffer sizes with SSIZE_MAX
typedef signed char S_8;
typedef int16_t S_16;
typedef int32_t S_32;
typedef int64_t S_64;
typedef signed int S_I;
}
#else // LIBDAR_HAS_INTTYPES_H
#error "Cannot determine interger types, use --enable-os-bits=... with the 'configure' script according to your system's CPU register size"
#endif // LIBDAR_HAS_INTTYPES_H
#else // LIBDAR_OS_BITS is defined
#if LIBDAR_OS_BITS == 32
namespace libdar
{
typedef unsigned char U_8;
typedef unsigned short U_16;
typedef unsigned long U_32;
typedef unsigned long long U_64;
typedef size_t U_I;
typedef signed char S_8;
typedef signed short S_16;
typedef signed long S_32;
typedef signed long long S_64;
typedef signed int S_I;
}
#else // LIBDAR_OS_BITS != 32
#if LIBDAR_OS_BITS == 64
namespace libdar
{
typedef unsigned char U_8;
typedef unsigned short U_16;
typedef unsigned int U_32;
typedef unsigned long long U_64;
typedef size_t U_I;
typedef signed char S_8;
typedef signed short S_16;
typedef signed int S_32;
typedef signed long long S_64;
typedef signed int S_I;
}
#else // LIBDAR_OS_BITS != 32 and LIBDAR_OS_BITS != 64
#error "unknown value given to --enable-os-bits=... check the 'configure' script arguments"
// unknown LIBDAR_OS_BITS value ! use --enable-os-bits=... option to configure script
//
// the previous line should not compile, this is the expected behaviour
#endif // LIBDAR_OS_BITS == 64
#endif // LIBDAR_OS_BITS == 32
#endif // LIBDAR_OS_BITS not defined
namespace libdar
{
/// checks sign and width of integer types
/// \note this call may throws an Ehardware exception
void integer_check();
/// returns true if the system is big endian, false else
/// \note this call may throw an Ehardware() exception if the
/// system is not coherent for all integer types
bool integers_system_is_big_endian();
}
/// @}
#endif // header file multiple inclusion protection
|