From bf36536c9fa398161b24668ad1c29f12f86556e8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 22 Jul 2014 07:28:09 -0700 Subject: * configure: Add a check, in the case that we cannot make an executable, whether this is due to being required to use C99. For instance, the Solaris environment requires compilation using the C99 dialect if _XOPEN_SOURCE is set to 600 or higher. * debug.c: When compiling as C99, we have to obey the special C99 conventions for instantiating inline functions. * hash.c: Likewise. * lib.c: Likewise. * parser.y: Likewise. * unwind.c: Likewise. --- lib.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 9443fb88..b7e24e12 100644 --- a/lib.c +++ b/lib.c @@ -105,6 +105,28 @@ static val env_list; mem_t *(*oom_realloc)(mem_t *, size_t); +/* C99 inline instantiations. */ +#if __STDC_VERSION__ >= 199901L +loc mkloc_fun(val *ptr, val obj); +cnum tag(val obj); +int is_ptr(val obj); +int is_num(val obj); +int is_chr(val obj); +int is_lit(val obj); +type_t type(val obj); +val auto_str(const wchli_t *str); +val static_str(const wchli_t *str); +wchar_t *litptr(val obj); +val num_fast(cnum n); +mp_int *mp(val bign); +val chr(wchar_t ch); +val eq(val a, val b); +val null(val v); +int null_or_missing_p(val v); +val default_arg(val arg, val dfl); +val default_bool_arg(val arg); +#endif + val identity(val obj) { return obj; -- cgit v1.2.3