ECC-409: GNU Hurd support

This commit is contained in:
Shahram Najm 2017-01-12 18:17:58 +00:00
parent 66ff19382e
commit a1cee78876
2 changed files with 12 additions and 4 deletions

View File

@ -171,12 +171,16 @@ extern "C" {
#define DebugAssert(a)
#endif
/* Compile time assertion - Thanks to Ralf Holly */
#define COMPILE_TIME_ASSERT(e) \
#ifdef __gnu_hurd__
#define COMPILE_TIME_ASSERT(condition) \
extern int compile_time_assert[!!(condition) - 1]
#else
/* Compile time assertion - Thanks to Ralf Holly */
#define COMPILE_TIME_ASSERT(condition) \
do { \
enum { assert_static__ = 1/(e) }; \
enum { assert_static__ = 1/(condition) }; \
} while (0)
#endif
#ifndef NDEBUG
#define DebugAssertAccess(array, index, size) \

View File

@ -8,6 +8,10 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
#ifdef __gnu_hurd__
#define _FILE_OFFSET_BITS 64 /* 64-bit offsets off_t not the default on Hurd/i386 */
#endif
#include "grib_api_internal.h"
#include <stdio.h>
#ifndef ECCODES_ON_WINDOWS