/* VectorNav HSI Calibration Library v1.0.0.2
 *
 * Copyright (c) 2018 VectorNav Technologies, LLC
 *
 * This source code is proprietary to and copyrighted by VectorNav Technologies, LLC and is
 * available solely under license from VectorNav. All rights reserved. If you do not have a
 * license to use this source code from VectorNav, any use hereof is strictly prohibited by
 * U.S. law and other applicable law. This source code is restricted for use solely with the
 * products of VectorNav and as otherwise set forth in any agreement with VectorNav. Any
 * disclosure of this source code to the public or to any third party is also prohibited.
 */
#ifndef VNBOOL_H_INCLUDED
#define VNBOOL_H_INCLUDED

/** \brief Boolean definition. */

#include "vncompiler.h"
#include "vnint.h"

#if !defined(__cplusplus)

  #if VN_HAVE_STDBOOL_H
    #include <stdbool.h>
  #else
    #if !defined(__GNUC__)
      /* _Bool builtin type is included in GCC. */
      /* ISO C Standard: 5.2.5 An object declared as type _Bool is large
      * enough to store the values 0 and 1. */
      typedef int8_t _Bool;
    #endif

    /* ISO C Standard: 7.16 Boolean type */

    #if defined(__STDC__) && defined(__GNUC__)
      /* Avoid warning "ISO C90/89 does not support boolean types" */
      #define bool int8_t
    #else
      #define bool _Bool
    #endif

    #define true 1
    #define false 0
    #define __bool_true_false_are_defined 1
  #endif

#endif

#endif
