Avis Client Library: avis/stdtypes.h Source File

- Main Page
- Data Structures
- Files

# avis/stdtypes.h

Go to the documentation of this file.

    00001 /*
    00002  *  Avis Elvin client library for C.
    00003  *
    00004  *  Copyright (C) 2008 Matthew Phillips <avis@mattp.name>
    00005  *
    00006  *  This program is free software; you can redistribute it and/or
    00007  *  modify it under the terms of version 3 of the GNU Lesser General
    00008  *  Public License as published by the Free Software Foundation.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    00013  *  General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU General Public License
    00016  *  along with this program. If not, see <http://www.gnu.org/licenses/>.
    00017  */
    00021 #ifndef AVIS_STDTYPES_H
    00022 #define AVIS_STDTYPES_H
    00023
    00024 typedef double real64_t;
    00025
    00026 #include "avis_client_config.h"
    00027
    00028 #ifdef HAVE_STDINT_H
    00029   #include <stdint.h>
    00030 #elif defined(HAVE_INTTYPES_H)
    00031   #include <inttypes.h>
    00032 #elif defined(_MSC_VER)
    00033   #include "stdint_msvc.h"
    00034
    00035   #define ssize_t size_t
    00036 #else
    00037   typedef signed char int8_t;
    00038   typedef signed short int16_t;
    00039   typedef signed int int32_t;
    00040   typedef signed long long int64_t;
    00041
    00042   typedef unsigned char uint8_t;
    00043   typedef unsigned short uint16_t;
    00044   typedef unsigned int uint32_t;
    00045   typedef unsigned long long uint64_t;
    00046 #endif
    00047
    00048 #ifdef HAVE_STDBOOL_H
    00049   #include <stdbool.h>
    00050 #else
    00051   #ifndef __cplusplus
    00052     #define bool int
    00053     #define true 1
    00054     #define false 0
    00055   #endif /* __cplusplus */
    00056 #endif
    00057
    00058 #endif /* AVIS_STDTYPES_H */