Commit 567bb54a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdilib.c: prevent include of include files if they are already included

parent 01cd5887
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
#define _GRIBAPI_H #define _GRIBAPI_H
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
# include "error.h" #include <grib_api.h>
# include <grib_api.h> #ifndef _ERROR_H
#include "error.h"
#endif
#endif #endif
#ifndef _CDI_INT_H
#include "cdi_int.h" #include "cdi_int.h"
#endif
#define GRIBAPI_MISSVAL -9.E33 #define GRIBAPI_MISSVAL -9.E33
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
#define _GRID_H #define _GRID_H
#include "cdi.h" #include "cdi.h"
#ifndef RESOURCE_HANDLE_H
#include "resource_handle.h" #include "resource_handle.h"
#endif
typedef unsigned char mask_t; typedef unsigned char mask_t;
......
...@@ -8,8 +8,12 @@ ...@@ -8,8 +8,12 @@
#include <string.h> #include <string.h>
#include "cdi.h" #include "cdi.h"
#ifndef CDI_CKSUM_H_
#include "cdi_cksum.h" #include "cdi_cksum.h"
#endif
#ifndef _ERROR_H
#include "error.h" #include "error.h"
#endif
/* /*
* Generic interfaces for (de-)marshalling * Generic interfaces for (de-)marshalling
......
#ifndef STREAM_FCOMMON_H #ifndef STREAM_FCOMMON_H
#define STREAM_FCOMMON_H #define STREAM_FCOMMON_H
#ifndef _CDI_INT_H
#include "cdi_int.h" #include "cdi_int.h"
#endif
enum { enum {
SINGLE_PRECISION = 4, SINGLE_PRECISION = 4,
......
#ifndef _STREAM_GRIBAPI_H #ifndef _STREAM_GRIBAPI_H
#define _STREAM_GRIBAPI_H #define _STREAM_GRIBAPI_H
#ifndef _CDI_INT_H
#include "cdi_int.h" #include "cdi_int.h"
#endif
int gribapiScanTimestep1(stream_t * streamptr); int gribapiScanTimestep1(stream_t * streamptr);
int gribapiScanTimestep2(stream_t * streamptr); int gribapiScanTimestep2(stream_t * streamptr);
......
...@@ -5,12 +5,14 @@ ...@@ -5,12 +5,14 @@
#include "config.h" #include "config.h"
#endif #endif
#ifndef _ERROR_H
#include "error.h" #include "error.h"
#endif
#include <stddef.h> /* size_t */ #include <stddef.h> /* size_t */
#ifndef _CDI_LIMITS_H #ifndef _CDI_LIMITS_H
# include "cdi_limits.h" #include "cdi_limits.h"
#endif #endif
#define VALIDMISS 1.e+303 #define VALIDMISS 1.e+303
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment