From 68c08aeeff7cedfaa7b1a92f7f20270128e830c5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 2 May 2019 06:49:57 -0700 Subject: C99: get rid of useless inline instantiations. * hash.c, lib.c, parser.y, unwind.c: Remove useless declarations that were believed to be C99 inline instantiations. This was mistakenly added at the time the Solaris issue was discovered that _XOPEN_SOURCE values of 600 or greater require compiling in C99 mode. We use "static inline" under C99 for inline functions; instantiation is not applicable at all to inline functions that don't have external linkage. --- hash.c | 5 ----- lib.c | 21 --------------------- parser.y | 5 ----- unwind.c | 5 ----- 4 files changed, 36 deletions(-) diff --git a/hash.c b/hash.c index 1aaaa375..857cd3c4 100644 --- a/hash.c +++ b/hash.c @@ -100,11 +100,6 @@ static struct hash_iter *reachable_iters; static int hash_str_limit = INT_MAX, hash_rec_limit = 32; -/* C99 inline instantiations. */ -#if __STDC_VERSION__ >= 199901L -loc gethash_l(val self, val hash, val key, loc new_p); -#endif - static u32_t randbox[] = { 0x49848f1bU, 0xe6255dbaU, 0x36da5bdcU, 0x47bf94e9U, 0x8cbcce22U, 0x559fc06aU, 0xd268f536U, 0xe10af79aU, diff --git a/lib.c b/lib.c index 2446bf17..6ac23b46 100644 --- a/lib.c +++ b/lib.c @@ -131,27 +131,6 @@ val year_s, month_s, day_s, hour_s, min_s, sec_s, dst_s, gmtoff_s, zone_s; static val env_list; static val recycled_conses; -/* 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_null_arg(val arg); -#endif - const seq_kind_t seq_kind_tab[MAXTYPE+1] = { SEQ_NIL, /* NIL */ SEQ_NOTSEQ, /* NUM */ diff --git a/parser.y b/parser.y index e878d636..c5e843fb 100644 --- a/parser.y +++ b/parser.y @@ -1305,11 +1305,6 @@ const int have_yydebug = YYDEBUG; int yylex(YYSTYPE *, yyscan_t scanner); -/* C99 inline instantiations. */ -#if __STDC_VERSION__ >= 199901L -val rlcp(val to, val from); -#endif - void yydebug_onoff(int val) { #if YYDEBUG diff --git a/unwind.c b/unwind.c index 0f362c4b..b2e315b4 100644 --- a/unwind.c +++ b/unwind.c @@ -75,11 +75,6 @@ static val deferred_warnings, tentative_defs; static int uw_break_on_error; #endif -/* C99 inline instantiations. */ -#if __STDC_VERSION__ >= 199901L -val uw_block_return(val tag, val result); -#endif - static void uw_unwind_to_exit_point(void) { uw_frame_t *orig_stack = uw_stack; -- cgit v1.2.3