Fix clang -std=c99 compilation

PUBLISHED_FROM=fc3f24d40f92f206e5de4a2fd15100430db87717
This commit is contained in:
Alexander Alashkin 2016-08-24 14:46:30 +02:00 committed by Cesanta Bot
parent 1b324510cc
commit 2deaf084e4

View File

@ -684,6 +684,33 @@ double cs_time() {
return now;
}
#ifdef MG_MODULE_LINES
#line 1 "./src/../../common/cs_endian.h"
#endif
/*
* Copyright (c) 2014-2016 Cesanta Software Limited
* All rights reserved
*/
#ifndef CS_COMMON_CS_ENDIAN_H_
#define CS_COMMON_CS_ENDIAN_H_
/*
* clang with std=-c99 uses __LITTLE_ENDIAN, by default
* while for ex, RTOS gcc - LITTLE_ENDIAN, by default
* it depends on __USE_BSD, but let's have everything
*/
#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
#define BYTE_ORDER __BYTE_ORDER
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN __LITTLE_ENDIAN
#endif /* LITTLE_ENDIAN */
#ifndef BIG_ENDIAN
#define BIG_ENDIAN __LITTLE_ENDIAN
#endif /* BIG_ENDIAN */
#endif /* BYTE_ORDER */
#endif /* CS_COMMON_CS_ENDIAN_H_ */
#ifdef MG_MODULE_LINES
#line 1 "./src/../../common/md5.c"
#endif
/*