From 281669d1137206bf06a591128e849c400dcfcd75 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Thu, 12 Sep 2019 13:04:36 +0000 Subject: [PATCH] Update: Moved igloo_error_t into types.h so it is more generic --- include/igloo/error.h | 11 +---------- include/igloo/types.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/include/igloo/error.h b/include/igloo/error.h index 930b62f..01267d5 100644 --- a/include/igloo/error.h +++ b/include/igloo/error.h @@ -30,16 +30,7 @@ extern "C" { /* Put stuff here */ #include - -#ifdef IGLOO_CTC_HAVE_STDINT_H -#include -#endif - -#ifdef IGLOO_CTC_HAVE_STDINT_H -typedef int_least16_t igloo_error_t; -#else -typedef long int igloo_error_t; -#endif +#include typedef struct { igloo_error_t error; diff --git a/include/igloo/types.h b/include/igloo/types.h index a93138d..52b018a 100644 --- a/include/igloo/types.h +++ b/include/igloo/types.h @@ -29,6 +29,11 @@ extern "C" { /* For size_t and ssize_t */ #include +/* for {,u}int_{,least}{8,16,32,64}_t */ +#ifdef IGLOO_CTC_HAVE_STDINT_H +#include +#endif + #include /* Included in case is not yet included */ @@ -52,6 +57,13 @@ typedef struct igloo_reportxml_database_tag igloo_reportxml_database_t; typedef struct igloo_ro_base_tag igloo_ro_base_t; igloo_RO_FORWARD_TYPE(igloo_ro_base_t); +/* For error.h */ +#ifdef IGLOO_CTC_HAVE_STDINT_H +typedef int_least16_t igloo_error_t; +#else +typedef long int igloo_error_t; +#endif + #ifdef IGLOO_CTC_HAVE_TYPE_ATTRIBUTE_TRANSPARENT_UNION typedef union __attribute__ ((__transparent_union__)) { /* Those are libigloo's own types */