/*
 * (C) Copyright 1996-2012 ECMWF.
 *
 * This software is licensed under the terms of the Apache Licence Version 2.0
 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
 * In applying this licence, ECMWF does not waive the privileges and immunities 
 * granted to it by virtue of its status as an intergovernmental organisation nor
 * does it submit to any jurisdiction.
 */

#ifndef ecbuild_platform_h
#define ecbuild_platform_h

/* cpu arch info */

/* #undef EC_BIG_ENDIAN */
#define EC_LITTLE_ENDIAN    1

/* compiler support */

#define EC_HAVE_FUNCTION_DEF

/* os capability checks */

/* --- symbols --- */

#define EC_HAVE_FSEEK
#define EC_HAVE_FSEEKO
#define EC_HAVE_FTELLO
#define EC_HAVE_LSEEK
#define EC_HAVE_FTRUNCATE
#define EC_HAVE_OPEN
#define EC_HAVE_FOPEN
#define EC_HAVE_FLOCK
#define EC_HAVE_MMAP

#define EC_HAVE_POSIX_MEMALIGN

#define EC_HAVE_F_GETLK
#define EC_HAVE_F_SETLKW
#define EC_HAVE_F_SETLK

#define EC_HAVE_F_GETLK64
#define EC_HAVE_F_SETLKW64
#define EC_HAVE_F_SETLK64

#define EC_HAVE_MAP_ANONYMOUS
#define EC_HAVE_MAP_ANON

/* --- include files --- */

#define EC_HAVE_ASSERT_H      
#define EC_HAVE_STDLIB_H      
#define EC_HAVE_UNISTD_H      
#define EC_HAVE_STRING_H      
#define EC_HAVE_STRINGS_H     
#define EC_HAVE_SYS_STAT_H    
#define EC_HAVE_SYS_TIME_H    
#define EC_HAVE_SYS_TYPES_H   
#define EC_HAVE_MALLOC_H      
/* #undef EC_HAVE_SYS_MALLOC_H */

#define EC_HAVE_MALLOC_H
/* #undef EC_HAVE_SYS_MALLOC_H */

#define EC_HAVE_SYS_MOUNT_H
#define EC_HAVE_SYS_VFS_H

/* --- capabilities --- */

#define EC_STAT_SIZEOF_OFF_T 8

#define EC_HAVE_OFFT
#define EC_HAVE_OFF64T

#define EC_HAVE_STRUCT_STAT
#define EC_HAVE_STRUCT_STAT64
#define EC_HAVE_STAT
#define EC_HAVE_STAT64
#define EC_HAVE_FSTAT
#define EC_HAVE_FSTAT64

#define EC_HAVE_FSEEKO64
#define EC_HAVE_FTELLO64
#define EC_HAVE_LSEEK64
#define EC_HAVE_OPEN64
#define EC_HAVE_FOPEN64
#define EC_HAVE_FTRUNCATE64
#define EC_HAVE_FLOCK64
#define EC_HAVE_MMAP64

#define EC_HAVE_STRUCT_STATVFS
#define EC_HAVE_STRUCT_STATVFS64
/* #undef EC_HAVE_STATVFS */
/* #undef EC_HAVE_STATVFS64 */

#define EC_HAVE_FSYNC
#define EC_HAVE_FDATASYNC
#define EC_HAVE_DIRFD
/* #undef EC_HAVE_SYSPROC */
#define EC_HAVE_SYSPROCFS

#define EC_HAVE_EXECINFO_BACKTRACE

/* --- asynchronous IO support --- */

#define EC_HAVE_AIO
#define EC_HAVE_AIO64

/* --- reentrant funtions support --- */

#define EC_HAVE_GMTIME_R
#define EC_HAVE_GETPWUID_R
#define EC_HAVE_GETPWNAM_R
#define EC_HAVE_READDIR_R
#define EC_HAVE_GETHOSTBYNAME_R

/* --- c compiler support --- */

#define EC_HAVE_C_INLINE

/* --- c++ compiler support --- */

#define EC_HAVE_FUNCTION_DEF

#define EC_HAVE_CXXABI_H
#define EC_HAVE_CXX_BOOL

#define EC_HAVE_CXX_SSTREAM

#endif /* ecbuild_platform_h */
