fixed build issues

This commit is contained in:
hyung-hwan 2021-08-17 08:23:17 +00:00
parent 97ed324016
commit 3643c98241
3 changed files with 28 additions and 27 deletions

View File

@ -37,23 +37,6 @@
* This file contains various useful macro definitions.
*/
/* =========================================================================
* STATIC ASSERTION
* =========================================================================*/
#define QSE_STATIC_JOIN_INNER(x, y) x ## y
#define QSE_STATIC_JOIN(x, y) QSE_STATIC_JOIN_INNER(x, y)
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define QSE_STATIC_ASSERT(expr) _Static_assert (expr, "invalid assertion")
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
# define QSE_STATIC_ASSERT(expr) static_assert (expr, "invalid assertion")
#else
# define QSE_STATIC_ASSERT(expr) typedef char QSE_STATIC_JOIN(QSE_STATIC_ASSERT_T_, __LINE__)[(expr)? 1: -1] QSE_UNUSED
#endif
#define QSE_STATIC_ASSERT_EXPR(expr) ((void)QSE_SIZEOF(char[(expr)? 1: -1]))
#if defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L))
# define QSE_INLINE inline
# define QSE_HAVE_INLINE
@ -89,14 +72,6 @@
# undef QSE_HAVE_INLINE_NEVER
#endif
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
# define QSE_UNUSED __attribute__((__unused__))
#else
# define QSE_UNUSED
#endif
#if defined(_WIN32) || (defined(__WATCOMC__) && !defined(__WINDOWS_386__))
# define QSE_IMPORT __declspec(dllimport)
# define QSE_EXPORT __declspec(dllexport)

View File

@ -70,6 +70,32 @@
# endif
#endif
/* =========================================================================
* STATIC ASSERTION
* =========================================================================*/
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
# define QSE_UNUSED __attribute__((__unused__))
#else
# define QSE_UNUSED
#endif
#define QSE_STATIC_JOIN_INNER(x, y) x ## y
#define QSE_STATIC_JOIN(x, y) QSE_STATIC_JOIN_INNER(x, y)
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define QSE_STATIC_ASSERT(expr) _Static_assert (expr, "invalid assertion")
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
# define QSE_STATIC_ASSERT(expr) static_assert (expr, "invalid assertion")
#else
# define QSE_STATIC_ASSERT(expr) typedef char QSE_STATIC_JOIN(QSE_STATIC_ASSERT_T_, __LINE__)[(expr)? 1: -1] QSE_UNUSED
#endif
#define QSE_STATIC_ASSERT_EXPR(expr) ((void)QSE_SIZEOF(char[(expr)? 1: -1]))
/* =========================================================================
* BASIC TYPES
* =========================================================================*/
/**
* The qse_bool_t type defines a boolean type that can represent #QSE_TRUE
* and #QSE_FALSE.

View File

@ -1,4 +1,4 @@
%define _prefix /usr/local
%define _prefix /usr
%define _sysconfdir /etc
Summary: QSE Library