~ chicken-core (chicken-5) 82ec4c59c28e5f342234b9cbec1141186ea7ae70


commit 82ec4c59c28e5f342234b9cbec1141186ea7ae70
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sun Mar 12 20:22:54 2017 +0100
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Fri Mar 17 12:03:30 2017 +1300

    Replace C_inline definitions with "inline static".
    
    Now that we officially require C99, there's no reason to make this
    configurable, and it complicates the source a bit.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/chicken.h b/chicken.h
index 0753629c..35f9845b 100644
--- a/chicken.h
+++ b/chicken.h
@@ -274,12 +274,6 @@ void *alloca ();
 # define C_aligned
 #endif
 
-#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__cplusplus)
-# define C_inline                  inline static
-#else
-# define C_inline                  static
-#endif
-
 /* Thread Local Storage */
 #ifdef C_ENABLE_TLS
 # if defined(__GNUC__)
@@ -2222,7 +2216,7 @@ C_fctexport C_cpsproc(C_default_5fstub_toplevel);
 
 #ifndef HAVE_STATEMENT_EXPRESSIONS
 
-C_inline C_word *C_a_i(C_word **a, int n)
+inline static C_word *C_a_i(C_word **a, int n)
 {
   C_word *p = *a;
   
@@ -2232,21 +2226,21 @@ C_inline C_word *C_a_i(C_word **a, int n)
 
 #endif
 
-C_inline C_word 
+inline static C_word
 C_mutate(C_word *slot, C_word val)
 {
   if(!C_immediatep(val)) return C_mutate_slot(slot, val);
   else return *slot = val;
 }
 
-C_inline C_word 
+inline static C_word
 C_mutate2(C_word *slot, C_word val) /* OBSOLETE */
 {
   if(!C_immediatep(val)) return C_mutate_slot(slot, val);
   else return *slot = val;
 }
 
-C_inline C_word C_permanentp(C_word x)
+inline static C_word C_permanentp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) &&
                    !C_in_stackp(x) &&
@@ -2255,7 +2249,7 @@ C_inline C_word C_permanentp(C_word x)
 }
 
 
-C_inline C_word C_flonum(C_word **ptr, double n)
+inline static C_word C_flonum(C_word **ptr, double n)
 {
   C_word 
     *p = *ptr,
@@ -2276,14 +2270,14 @@ C_inline C_word C_flonum(C_word **ptr, double n)
 }
 
 
-C_inline C_word C_string_to_pbytevector(C_word s)
+inline static C_word C_string_to_pbytevector(C_word s)
 {
   return C_pbytevector(C_header_size(s), (C_char *)C_data_pointer(s));
 }
 
 
 /* XXX TODO OBSOLETE: This can be removed after recompiling c-platform.scm */
-C_inline C_word C_flonum_in_fixnum_range_p(C_word n)
+inline static C_word C_flonum_in_fixnum_range_p(C_word n)
 {
   double f = C_flonum_magnitude(n);
 
@@ -2291,7 +2285,7 @@ C_inline C_word C_flonum_in_fixnum_range_p(C_word n)
 }
 
 /* XXX TODO OBSOLETE: This can be removed after recompiling c-backend.scm */
-C_inline C_word C_double_to_number(C_word n)
+inline static C_word C_double_to_number(C_word n)
 {
   double m, f = C_flonum_magnitude(n);
 
@@ -2301,7 +2295,7 @@ C_inline C_word C_double_to_number(C_word n)
   else return n;
 }
 
-C_inline C_word C_a_i_record1(C_word **ptr, int n, C_word x1)
+inline static C_word C_a_i_record1(C_word **ptr, int n, C_word x1)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2312,7 +2306,7 @@ C_inline C_word C_a_i_record1(C_word **ptr, int n, C_word x1)
 }
 
 
-C_inline C_word C_a_i_record2(C_word **ptr, int n, C_word x1, C_word x2)
+inline static C_word C_a_i_record2(C_word **ptr, int n, C_word x1, C_word x2)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2324,7 +2318,7 @@ C_inline C_word C_a_i_record2(C_word **ptr, int n, C_word x1, C_word x2)
 }
 
 
-C_inline C_word C_a_i_record3(C_word **ptr, int n, C_word x1, C_word x2, C_word x3)
+inline static C_word C_a_i_record3(C_word **ptr, int n, C_word x1, C_word x2, C_word x3)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2337,7 +2331,7 @@ C_inline C_word C_a_i_record3(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_record4(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4)
+inline static C_word C_a_i_record4(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2351,7 +2345,7 @@ C_inline C_word C_a_i_record4(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_record5(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_record5(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 				 C_word x5)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -2367,7 +2361,7 @@ C_inline C_word C_a_i_record5(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_record6(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_record6(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 				 C_word x5, C_word x6)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -2384,7 +2378,7 @@ C_inline C_word C_a_i_record6(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_record7(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_record7(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 				 C_word x5, C_word x6, C_word x7)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -2402,7 +2396,7 @@ C_inline C_word C_a_i_record7(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_record8(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_record8(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 				 C_word x5, C_word x6, C_word x7, C_word x8)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -2420,7 +2414,7 @@ C_inline C_word C_a_i_record8(C_word **ptr, int n, C_word x1, C_word x2, C_word
   return (C_word)p0;
 }
 
-C_inline C_word C_cplxnum(C_word **ptr, C_word r, C_word i)
+inline static C_word C_cplxnum(C_word **ptr, C_word r, C_word i)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2431,7 +2425,7 @@ C_inline C_word C_cplxnum(C_word **ptr, C_word r, C_word i)
   return (C_word)p0;
 }
 
-C_inline C_word C_ratnum(C_word **ptr, C_word n, C_word d)
+inline static C_word C_ratnum(C_word **ptr, C_word n, C_word d)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2442,7 +2436,7 @@ C_inline C_word C_ratnum(C_word **ptr, C_word n, C_word d)
   return (C_word)p0;
 }
 
-C_inline C_word C_a_i_bignum_wrapper(C_word **ptr, C_word vec)
+inline static C_word C_a_i_bignum_wrapper(C_word **ptr, C_word vec)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -2453,7 +2447,7 @@ C_inline C_word C_a_i_bignum_wrapper(C_word **ptr, C_word vec)
 }
 
 /* Silly (this is not normalized) but in some cases needed internally */
-C_inline C_word C_bignum0(C_word **ptr)
+inline static C_word C_bignum0(C_word **ptr)
 {
   C_word *p = *ptr, p0 = (C_word)p;
 
@@ -2464,7 +2458,7 @@ C_inline C_word C_bignum0(C_word **ptr)
   return C_a_i_bignum_wrapper(ptr, p0);
 }
 
-C_inline C_word C_bignum1(C_word **ptr, int negp, C_uword d1)
+inline static C_word C_bignum1(C_word **ptr, int negp, C_uword d1)
 {
   C_word *p = *ptr, p0 = (C_word)p;
 
@@ -2477,7 +2471,7 @@ C_inline C_word C_bignum1(C_word **ptr, int negp, C_uword d1)
 }
 
 /* Here d1, d2, ... are low to high (ie, little endian)! */
-C_inline C_word C_bignum2(C_word **ptr, int negp, C_uword d1, C_uword d2)
+inline static C_word C_bignum2(C_word **ptr, int negp, C_uword d1, C_uword d2)
 {
   C_word *p = *ptr, p0 = (C_word)p;
 
@@ -2490,7 +2484,7 @@ C_inline C_word C_bignum2(C_word **ptr, int negp, C_uword d1, C_uword d2)
   return C_a_i_bignum_wrapper(ptr, p0);
 }
 
-C_inline C_word C_i_bignump(C_word x)
+inline static C_word C_i_bignump(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_BIGNUM_TAG);
 }
@@ -2498,7 +2492,7 @@ C_inline C_word C_i_bignump(C_word x)
 
 
 /* XXX TODO OBSOLETE: This can be removed after recompiling c-platform.scm */
-C_inline C_word C_fits_in_int_p(C_word x)
+inline static C_word C_fits_in_int_p(C_word x)
 {
   double n, m;
 
@@ -2516,7 +2510,7 @@ C_inline C_word C_fits_in_int_p(C_word x)
 
 
 /* XXX TODO OBSOLETE: This can be removed after recompiling c-platform.scm */
-C_inline C_word C_fits_in_unsigned_int_p(C_word x)
+inline static C_word C_fits_in_unsigned_int_p(C_word x)
 {
   double n, m;
 
@@ -2529,19 +2523,19 @@ C_inline C_word C_fits_in_unsigned_int_p(C_word x)
 }
 
 
-C_inline double C_c_double(C_word x)
+inline static double C_c_double(C_word x)
 {
   if(x & C_FIXNUM_BIT) return (double)C_unfix(x);
   else return C_flonum_magnitude(x);
 }
 
-C_inline C_word C_a_u_i_int_to_flo(C_word **ptr, int n, C_word x)
+inline static C_word C_a_u_i_int_to_flo(C_word **ptr, int n, C_word x)
 {
   if(x & C_FIXNUM_BIT) return C_a_i_fix_to_flo(ptr, n, x);
   else return C_a_u_i_big_to_flo(ptr, n, x);
 }
 
-C_inline C_word C_num_to_int(C_word x)
+inline static C_word C_num_to_int(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return C_unfix(x);
@@ -2555,7 +2549,7 @@ C_inline C_word C_num_to_int(C_word x)
 }
 
 
-C_inline C_s64 C_num_to_int64(C_word x)
+inline static C_s64 C_num_to_int64(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return (C_s64)C_unfix(x);
@@ -2573,7 +2567,7 @@ C_inline C_s64 C_num_to_int64(C_word x)
 }
 
 
-C_inline C_u64 C_num_to_uint64(C_word x)
+inline static C_u64 C_num_to_uint64(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return (C_u64)C_unfix(x);
@@ -2590,7 +2584,7 @@ C_inline C_u64 C_num_to_uint64(C_word x)
 }
 
 
-C_inline C_uword C_num_to_unsigned_int(C_word x)
+inline static C_uword C_num_to_unsigned_int(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return (C_uword)C_unfix(x);
@@ -2603,20 +2597,20 @@ C_inline C_uword C_num_to_unsigned_int(C_word x)
 }
 
 
-C_inline C_word C_int_to_num(C_word **ptr, C_word n)
+inline static C_word C_int_to_num(C_word **ptr, C_word n)
 {
   if(C_fitsinfixnump(n)) return C_fix(n);
   else return C_bignum1(ptr, n < 0, labs(n));
 }
 
 
-C_inline C_word C_unsigned_int_to_num(C_word **ptr, C_uword n)
+inline static C_word C_unsigned_int_to_num(C_word **ptr, C_uword n)
 {
   if(C_ufitsinfixnump(n)) return C_fix(n);
   else return C_bignum1(ptr, 0, n);
 }
 
-C_inline C_word C_int64_to_num(C_word **ptr, C_s64 n)
+inline static C_word C_int64_to_num(C_word **ptr, C_s64 n)
 {
 #ifdef C_SIXTY_FOUR
   if(C_fitsinfixnump(n)) {
@@ -2632,7 +2626,7 @@ C_inline C_word C_int64_to_num(C_word **ptr, C_s64 n)
 #endif
 }
 
-C_inline C_word C_uint64_to_num(C_word **ptr, C_u64 n)
+inline static C_word C_uint64_to_num(C_word **ptr, C_u64 n)
 {
   if(C_ufitsinfixnump(n)) {
     return C_fix(n);
@@ -2646,7 +2640,7 @@ C_inline C_word C_uint64_to_num(C_word **ptr, C_u64 n)
   }
 }
 
-C_inline C_word C_long_to_num(C_word **ptr, C_long n)
+inline static C_word C_long_to_num(C_word **ptr, C_long n)
 {
   if(C_fitsinfixnump(n)) {
     return C_fix(n);
@@ -2655,7 +2649,7 @@ C_inline C_word C_long_to_num(C_word **ptr, C_long n)
   }
 }
 
-C_inline C_word C_unsigned_long_to_num(C_word **ptr, C_ulong n)
+inline static C_word C_unsigned_long_to_num(C_word **ptr, C_ulong n)
 {
   if(C_ufitsinfixnump(n)) {
     return C_fix(n);
@@ -2665,43 +2659,43 @@ C_inline C_word C_unsigned_long_to_num(C_word **ptr, C_ulong n)
 }
 
 
-C_inline char *C_string_or_null(C_word x)
+inline static char *C_string_or_null(C_word x)
 {
   return C_truep(x) ? C_c_string(x) : NULL;
 }
 
 
-C_inline void *C_data_pointer_or_null(C_word x) 
+inline static void *C_data_pointer_or_null(C_word x)
 {
   return C_truep(x) ? C_data_pointer(x) : NULL;
 }
 
 
-C_inline void *C_srfi_4_vector_or_null(C_word x) 
+inline static void *C_srfi_4_vector_or_null(C_word x)
 {
   return C_truep(x) ? C_srfi_4_vector(x) : NULL;
 }
 
 
-C_inline void *C_c_pointer_vector_or_null(C_word x) 
+inline static void *C_c_pointer_vector_or_null(C_word x)
 {
   return C_truep(x) ? C_data_pointer(C_block_item(x, 2)) : NULL;
 }
 
 
-C_inline void *C_c_pointer_or_null(C_word x) 
+inline static void *C_c_pointer_or_null(C_word x)
 {
   return C_truep(x) ? (void *)C_block_item(x, 0) : NULL;
 }
 
 
-C_inline void *C_scheme_or_c_pointer(C_word x) 
+inline static void *C_scheme_or_c_pointer(C_word x)
 {
   return C_anypointerp(x) ? (void *)C_block_item(x, 0) : C_data_pointer(x);
 }
 
 
-C_inline C_long C_num_to_long(C_word x)
+inline static C_long C_num_to_long(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return (C_long)C_unfix(x);
@@ -2715,7 +2709,7 @@ C_inline C_long C_num_to_long(C_word x)
 }
 
 
-C_inline C_ulong C_num_to_unsigned_long(C_word x)
+inline static C_ulong C_num_to_unsigned_long(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return (C_ulong)C_unfix(x);
@@ -2728,7 +2722,7 @@ C_inline C_ulong C_num_to_unsigned_long(C_word x)
 }
 
 
-C_inline C_word C_u_i_string_equal_p(C_word x, C_word y)
+inline static C_word C_u_i_string_equal_p(C_word x, C_word y)
 {
   C_word n;
 
@@ -2738,7 +2732,7 @@ C_inline C_word C_u_i_string_equal_p(C_word x, C_word y)
 }
 
 /* Like memcmp but case insensitive (to strncasecmp as memcmp is to strncmp) */
-C_inline int C_memcasecmp(const char *x, const char *y, unsigned int len)
+inline static int C_memcasecmp(const char *x, const char *y, unsigned int len)
 {
   const unsigned char *ux = (const unsigned char *)x;
   const unsigned char *uy = (const unsigned char *)y;
@@ -2750,7 +2744,7 @@ C_inline int C_memcasecmp(const char *x, const char *y, unsigned int len)
   return 0;
 }
 
-C_inline C_word basic_eqvp(C_word x, C_word y)
+inline static C_word basic_eqvp(C_word x, C_word y)
 {
   return (x == y ||
 
@@ -2765,7 +2759,7 @@ C_inline C_word basic_eqvp(C_word x, C_word y)
              C_i_bignum_cmp(x, y) == C_fix(0)))));
 }
 
-C_inline C_word C_i_eqvp(C_word x, C_word y)
+inline static C_word C_i_eqvp(C_word x, C_word y)
 {
    return C_mk_bool(basic_eqvp(x, y) ||
                     (!C_immediatep(x) && !C_immediatep(y) &&
@@ -2776,12 +2770,12 @@ C_inline C_word C_i_eqvp(C_word x, C_word y)
                      basic_eqvp(C_block_item(x, 1), C_block_item(y, 1))));
 }
 
-C_inline C_word C_i_symbolp(C_word x)
+inline static C_word C_i_symbolp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_SYMBOL_TAG);
 }
 
-C_inline int C_persistable_symbol(C_word x)
+inline static int C_persistable_symbol(C_word x)
 {
   C_word val = C_symbol_value(x);
   /* Symbol is bound (and not a keyword), or has a non-empty plist */
@@ -2789,42 +2783,42 @@ C_inline int C_persistable_symbol(C_word x)
           C_symbol_plist(x) != C_SCHEME_END_OF_LIST);
 }
 
-C_inline C_word C_i_pairp(C_word x)
+inline static C_word C_i_pairp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_PAIR_TAG);
 }
 
 
-C_inline C_word C_i_stringp(C_word x)
+inline static C_word C_i_stringp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_header_bits(x) == C_STRING_TYPE);
 }
 
 
-C_inline C_word C_i_locativep(C_word x)
+inline static C_word C_i_locativep(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_LOCATIVE_TAG);
 }
 
 
-C_inline C_word C_i_vectorp(C_word x)
+inline static C_word C_i_vectorp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_header_bits(x) == C_VECTOR_TYPE);
 }
 
 
-C_inline C_word C_i_portp(C_word x)
+inline static C_word C_i_portp(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_header_bits(x) == C_PORT_TYPE);
 }
 
 
-C_inline C_word C_i_closurep(C_word x)
+inline static C_word C_i_closurep(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_header_bits(x) == C_CLOSURE_TYPE);
 }
 
-C_inline C_word C_i_numberp(C_word x)
+inline static C_word C_i_numberp(C_word x)
 {
   return C_mk_bool((x & C_FIXNUM_BIT) ||
                    (!C_immediatep(x) && 
@@ -2835,7 +2829,7 @@ C_inline C_word C_i_numberp(C_word x)
 }
 
 /* All numbers are real, except for cplxnums */
-C_inline C_word C_i_realp(C_word x)
+inline static C_word C_i_realp(C_word x)
 {
   return C_mk_bool((x & C_FIXNUM_BIT) ||
                    (!C_immediatep(x) && 
@@ -2845,7 +2839,7 @@ C_inline C_word C_i_realp(C_word x)
 }
 
 /* All finite real numbers are rational */
-C_inline C_word C_i_rationalp(C_word x)
+inline static C_word C_i_rationalp(C_word x)
 {
   if(x & C_FIXNUM_BIT) {
     return C_SCHEME_TRUE;
@@ -2861,7 +2855,7 @@ C_inline C_word C_i_rationalp(C_word x)
 }
 
 
-C_inline C_word C_u_i_fpintegerp(C_word x)
+inline static C_word C_u_i_fpintegerp(C_word x)
 {
   double dummy, val;
 
@@ -2873,19 +2867,19 @@ C_inline C_word C_u_i_fpintegerp(C_word x)
 }
 
 
-C_inline int C_ub_i_fpintegerp(double x)
+inline static int C_ub_i_fpintegerp(double x)
 {
   double dummy;
 
   return C_modf(x, &dummy) == 0.0;
 }
 
-C_inline C_word C_i_exact_integerp(C_word x)
+inline static C_word C_i_exact_integerp(C_word x)
 {
   return C_mk_bool((x) & C_FIXNUM_BIT || C_truep(C_i_bignump(x)));
 }
 
-C_inline C_word C_u_i_exactp(C_word x)
+inline static C_word C_u_i_exactp(C_word x)
 {
   if (C_truep(C_i_exact_integerp(x))) {
     return C_SCHEME_TRUE;
@@ -2904,7 +2898,7 @@ C_inline C_word C_u_i_exactp(C_word x)
   }
 }
 
-C_inline C_word C_u_i_inexactp(C_word x)
+inline static C_word C_u_i_inexactp(C_word x)
 {
   if (C_immediatep(x)) {
     return C_SCHEME_FALSE;
@@ -2918,7 +2912,7 @@ C_inline C_word C_u_i_inexactp(C_word x)
   }
 }
 
-C_inline C_word C_i_integerp(C_word x)
+inline static C_word C_i_integerp(C_word x)
 {
   double dummy, val;
 
@@ -2934,23 +2928,23 @@ C_inline C_word C_i_integerp(C_word x)
 }
 
 
-C_inline C_word C_i_flonump(C_word x)
+inline static C_word C_i_flonump(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_FLONUM_TAG);
 }
 
-C_inline C_word C_i_cplxnump(C_word x)
+inline static C_word C_i_cplxnump(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_CPLXNUM_TAG);
 }
 
-C_inline C_word C_i_ratnump(C_word x)
+inline static C_word C_i_ratnump(C_word x)
 {
   return C_mk_bool(!C_immediatep(x) && C_block_header(x) == C_RATNUM_TAG);
 }
 
 /* TODO: Is this correctly named?  Shouldn't it accept an argcount? */
-C_inline C_word C_a_u_i_fix_to_big(C_word **ptr, C_word x)
+inline static C_word C_a_u_i_fix_to_big(C_word **ptr, C_word x)
 {
   x = C_unfix(x);
   if (x < 0)
@@ -2961,18 +2955,18 @@ C_inline C_word C_a_u_i_fix_to_big(C_word **ptr, C_word x)
     return C_bignum1(ptr, 0, x);
 }
 
-C_inline C_word C_i_fixnum_min(C_word x, C_word y)
+inline static C_word C_i_fixnum_min(C_word x, C_word y)
 {
   return ((C_word)x < (C_word)y) ? x : y;
 }
 
 
-C_inline C_word C_i_fixnum_max(C_word x, C_word y)
+inline static C_word C_i_fixnum_max(C_word x, C_word y)
 {
   return ((C_word)x > (C_word)y) ? x : y;
 }
 
-C_inline C_word C_i_fixnum_gcd(C_word x, C_word y)
+inline static C_word C_i_fixnum_gcd(C_word x, C_word y)
 {
    x = (x & C_INT_SIGN_BIT) ? -C_unfix(x) : C_unfix(x);
    y = (y & C_INT_SIGN_BIT) ? -C_unfix(y) : C_unfix(y);
@@ -2985,14 +2979,14 @@ C_inline C_word C_i_fixnum_gcd(C_word x, C_word y)
    return C_fix(x);
 }
 
-C_inline C_word C_fixnum_divide(C_word x, C_word y)
+inline static C_word C_fixnum_divide(C_word x, C_word y)
 {
   if(y == C_fix(0)) C_div_by_zero_error(C_text("fx/"));
   return C_u_fixnum_divide(x, y);
 }
 
 
-C_inline C_word C_fixnum_modulo(C_word x, C_word y)
+inline static C_word C_fixnum_modulo(C_word x, C_word y)
 {
   if(y == C_fix(0)) {
     C_div_by_zero_error(C_text("fxmod"));
@@ -3007,7 +3001,7 @@ C_inline C_word C_fixnum_modulo(C_word x, C_word y)
 /* XXX: Naming convention is inconsistent!  There's C_fixnum_divide()
  * but also C_a_i_flonum_quotient_checked()
  */
-C_inline C_word
+inline static C_word
 C_a_i_fixnum_quotient_checked(C_word **ptr, int c, C_word x, C_word y)
 {
   if (y == C_fix(0)) {
@@ -3019,7 +3013,7 @@ C_a_i_fixnum_quotient_checked(C_word **ptr, int c, C_word x, C_word y)
   }
 }
 
-C_inline C_word C_i_fixnum_remainder_checked(C_word x, C_word y)
+inline static C_word C_i_fixnum_remainder_checked(C_word x, C_word y)
 {
   if (y == C_fix(0)) {
     C_div_by_zero_error(C_text("fxrem"));
@@ -3030,13 +3024,13 @@ C_inline C_word C_i_fixnum_remainder_checked(C_word x, C_word y)
   }
 }
 
-C_inline C_word C_i_fixnum_arithmetic_shift(C_word n, C_word c)
+inline static C_word C_i_fixnum_arithmetic_shift(C_word n, C_word c)
 {
   if(C_unfix(c) < 0) return C_fixnum_shift_right(n, C_u_fixnum_negate(c));
   else return C_fixnum_shift_left(n, c);
 }
 
-C_inline C_word C_a_i_fixnum_negate(C_word **ptr, C_word n, C_word x)
+inline static C_word C_a_i_fixnum_negate(C_word **ptr, C_word n, C_word x)
 {
   /* Exceptional situation: this will cause an overflow to itself */
   if (x == C_fix(C_MOST_NEGATIVE_FIXNUM)) /* C_fitsinfixnump(x) */
@@ -3045,7 +3039,7 @@ C_inline C_word C_a_i_fixnum_negate(C_word **ptr, C_word n, C_word x)
     return C_fix(-C_unfix(x));
 }
 
-C_inline C_word C_s_a_u_i_integer_abs(C_word **ptr, C_word n, C_word x)
+inline static C_word C_s_a_u_i_integer_abs(C_word **ptr, C_word n, C_word x)
 {
   if (x & C_FIXNUM_BIT) {
     return C_a_i_fixnum_abs(ptr, 1, x);
@@ -3056,7 +3050,7 @@ C_inline C_word C_s_a_u_i_integer_abs(C_word **ptr, C_word n, C_word x)
   }
 }
 
-C_inline C_word C_i_fixnum_bit_setp(C_word n, C_word i)
+inline static C_word C_i_fixnum_bit_setp(C_word n, C_word i)
 {
     if (i & C_INT_SIGN_BIT) {
       C_not_an_uinteger_error(C_text("bit-set?"), i);
@@ -3067,7 +3061,7 @@ C_inline C_word C_i_fixnum_bit_setp(C_word n, C_word i)
     }
 }
 
-C_inline C_word C_a_i_fixnum_difference(C_word **ptr, C_word n, C_word x, C_word y)
+inline static C_word C_a_i_fixnum_difference(C_word **ptr, C_word n, C_word x, C_word y)
 {
   C_word z = C_unfix(x) - C_unfix(y);
 
@@ -3078,7 +3072,7 @@ C_inline C_word C_a_i_fixnum_difference(C_word **ptr, C_word n, C_word x, C_word
   }
 }
 
-C_inline C_word C_a_i_fixnum_plus(C_word **ptr, C_word n, C_word x, C_word y)
+inline static C_word C_a_i_fixnum_plus(C_word **ptr, C_word n, C_word x, C_word y)
 {
   C_word z = C_unfix(x) + C_unfix(y);
 
@@ -3089,7 +3083,7 @@ C_inline C_word C_a_i_fixnum_plus(C_word **ptr, C_word n, C_word x, C_word y)
   }
 }
 
-C_inline C_word C_a_i_fixnum_times(C_word **ptr, C_word n, C_word x, C_word y)
+inline static C_word C_a_i_fixnum_times(C_word **ptr, C_word n, C_word x, C_word y)
 {
   C_uword negp, xhi, xlo, yhi, ylo, p, rhi, rlo;
 
@@ -3123,7 +3117,7 @@ C_inline C_word C_a_i_fixnum_times(C_word **ptr, C_word n, C_word x, C_word y)
   }
 }
 
-C_inline C_word C_i_flonum_min(C_word x, C_word y)
+inline static C_word C_i_flonum_min(C_word x, C_word y)
 {
   double 
     xf = C_flonum_magnitude(x),
@@ -3133,7 +3127,7 @@ C_inline C_word C_i_flonum_min(C_word x, C_word y)
 }
 
 
-C_inline C_word C_i_flonum_max(C_word x, C_word y)
+inline static C_word C_i_flonum_max(C_word x, C_word y)
 {
   double 
     xf = C_flonum_magnitude(x),
@@ -3142,13 +3136,13 @@ C_inline C_word C_i_flonum_max(C_word x, C_word y)
   return xf > yf ? x : y;
 }
 
-C_inline C_word C_u_i_integer_signum(C_word x)
+inline static C_word C_u_i_integer_signum(C_word x)
 {
   if (x & C_FIXNUM_BIT) return C_i_fixnum_signum(x);
   else return (C_bignum_negativep(x) ? C_fix(-1) : C_fix(1));
 }
 
-C_inline C_word
+inline static C_word
 C_a_i_flonum_quotient_checked(C_word **ptr, int c, C_word n1, C_word n2)
 {
   double n3 = C_flonum_magnitude(n2);
@@ -3158,7 +3152,7 @@ C_a_i_flonum_quotient_checked(C_word **ptr, int c, C_word n1, C_word n2)
 }
 
 
-C_inline double
+inline static double
 C_ub_i_flonum_quotient_checked(double n1, double n2)
 {
   if(n2 == 0.0) C_div_by_zero_error(C_text("fp/?"));
@@ -3168,7 +3162,7 @@ C_ub_i_flonum_quotient_checked(double n1, double n2)
 /* More weirdness: the other flonum_quotient macros and inline functions
  * do not compute the quotient but the "plain" division!
  */
-C_inline C_word
+inline static C_word
 C_a_i_flonum_actual_quotient_checked(C_word **ptr, int c, C_word x, C_word y)
 {
   double dy = C_flonum_magnitude(y), r;
@@ -3185,7 +3179,7 @@ C_a_i_flonum_actual_quotient_checked(C_word **ptr, int c, C_word x, C_word y)
   }
 }
 
-C_inline C_word
+inline static C_word
 C_a_i_flonum_remainder_checked(C_word **ptr, int c, C_word x, C_word y)
 {
   double dx = C_flonum_magnitude(x),
@@ -3203,7 +3197,7 @@ C_a_i_flonum_remainder_checked(C_word **ptr, int c, C_word x, C_word y)
   }
 }
 
-C_inline C_word
+inline static C_word
 C_a_i_flonum_modulo_checked(C_word **ptr, int c, C_word x, C_word y)
 {
   double dx = C_flonum_magnitude(x),
@@ -3223,7 +3217,7 @@ C_a_i_flonum_modulo_checked(C_word **ptr, int c, C_word x, C_word y)
   }
 }
 
-C_inline C_word C_i_safe_pointerp(C_word x)
+inline static C_word C_i_safe_pointerp(C_word x)
 {
   if(C_immediatep(x)) return C_SCHEME_FALSE;
 
@@ -3237,7 +3231,7 @@ C_inline C_word C_i_safe_pointerp(C_word x)
 }
 
 
-C_inline C_word C_u_i_assq(C_word x, C_word lst)
+inline static C_word C_u_i_assq(C_word x, C_word lst)
 {
   C_word a;
 
@@ -3252,7 +3246,7 @@ C_inline C_word C_u_i_assq(C_word x, C_word lst)
 }
 
 
-C_inline C_word
+inline static C_word
 C_fast_retrieve(C_word sym)
 {
   C_word val = C_block_item(sym, 0);
@@ -3263,7 +3257,7 @@ C_fast_retrieve(C_word sym)
   return val;
 }
 
-C_inline void *
+inline static void *
 C_fast_retrieve_proc(C_word closure)
 {
   if(C_immediatep(closure) || C_header_bits(closure) != C_CLOSURE_TYPE) 
@@ -3273,14 +3267,14 @@ C_fast_retrieve_proc(C_word closure)
 }
 
 
-C_inline void *
+inline static void *
 C_fast_retrieve_symbol_proc(C_word sym)
 {
   return C_fast_retrieve_proc(C_fast_retrieve(sym));
 }
 
 
-C_inline C_word C_a_i_vector1(C_word **ptr, int n, C_word x1)
+inline static C_word C_a_i_vector1(C_word **ptr, int n, C_word x1)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -3291,7 +3285,7 @@ C_inline C_word C_a_i_vector1(C_word **ptr, int n, C_word x1)
 }
 
 
-C_inline C_word C_a_i_vector2(C_word **ptr, int n, C_word x1, C_word x2)
+inline static C_word C_a_i_vector2(C_word **ptr, int n, C_word x1, C_word x2)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -3303,7 +3297,7 @@ C_inline C_word C_a_i_vector2(C_word **ptr, int n, C_word x1, C_word x2)
 }
 
 
-C_inline C_word C_a_i_vector3(C_word **ptr, int n, C_word x1, C_word x2, C_word x3)
+inline static C_word C_a_i_vector3(C_word **ptr, int n, C_word x1, C_word x2, C_word x3)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -3316,7 +3310,7 @@ C_inline C_word C_a_i_vector3(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_vector4(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4)
+inline static C_word C_a_i_vector4(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4)
 {
   C_word *p = *ptr, *p0 = p; 
 
@@ -3330,7 +3324,7 @@ C_inline C_word C_a_i_vector4(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_vector5(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_vector5(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			      C_word x5)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -3346,7 +3340,7 @@ C_inline C_word C_a_i_vector5(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_vector6(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_vector6(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			      C_word x5, C_word x6)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -3363,7 +3357,7 @@ C_inline C_word C_a_i_vector6(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_vector7(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_vector7(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			      C_word x5, C_word x6, C_word x7)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -3381,7 +3375,7 @@ C_inline C_word C_a_i_vector7(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_a_i_vector8(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_vector8(C_word **ptr, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			      C_word x5, C_word x6, C_word x7, C_word x8)
 {
   C_word *p = *ptr, *p0 = p; 
@@ -3400,7 +3394,7 @@ C_inline C_word C_a_i_vector8(C_word **ptr, int n, C_word x1, C_word x2, C_word
 }
 
 
-C_inline C_word C_fcall C_a_pair(C_word **ptr, C_word car, C_word cdr)
+inline static C_word C_fcall C_a_pair(C_word **ptr, C_word car, C_word cdr)
 {
   C_word *p = *ptr, *p0 = p;
  
@@ -3411,7 +3405,7 @@ C_inline C_word C_fcall C_a_pair(C_word **ptr, C_word car, C_word cdr)
   return (C_word)p0;
 }
 
-C_inline C_word C_fcall C_a_weak_pair(C_word **ptr, C_word head, C_word tail)
+inline static C_word C_fcall C_a_weak_pair(C_word **ptr, C_word head, C_word tail)
 {
   C_word *p = *ptr, *p0 = p;
 
@@ -3423,13 +3417,13 @@ C_inline C_word C_fcall C_a_weak_pair(C_word **ptr, C_word head, C_word tail)
 }
 
 
-C_inline C_word C_a_i_list1(C_word **a, int n, C_word x1)
+inline static C_word C_a_i_list1(C_word **a, int n, C_word x1)
 {
   return C_a_pair(a, x1, C_SCHEME_END_OF_LIST);
 }
 
 
-C_inline C_word C_a_i_list2(C_word **a, int n, C_word x1, C_word x2)
+inline static C_word C_a_i_list2(C_word **a, int n, C_word x1, C_word x2)
 {
   C_word x = C_a_pair(a, x2, C_SCHEME_END_OF_LIST);
 
@@ -3437,7 +3431,7 @@ C_inline C_word C_a_i_list2(C_word **a, int n, C_word x1, C_word x2)
 }
 
 
-C_inline C_word C_a_i_list3(C_word **a, int n, C_word x1, C_word x2, C_word x3)
+inline static C_word C_a_i_list3(C_word **a, int n, C_word x1, C_word x2, C_word x3)
 {
   C_word x = C_pair(a, x3, C_SCHEME_END_OF_LIST);
 
@@ -3446,7 +3440,7 @@ C_inline C_word C_a_i_list3(C_word **a, int n, C_word x1, C_word x2, C_word x3)
 }
 
 
-C_inline C_word C_a_i_list4(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4)
+inline static C_word C_a_i_list4(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4)
 {
   C_word x = C_pair(a, x4, C_SCHEME_END_OF_LIST);
 
@@ -3456,7 +3450,7 @@ C_inline C_word C_a_i_list4(C_word **a, int n, C_word x1, C_word x2, C_word x3,
 }
 
 
-C_inline C_word C_a_i_list5(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_list5(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			    C_word x5)
 {
   C_word x = C_pair(a, x5, C_SCHEME_END_OF_LIST);
@@ -3468,7 +3462,7 @@ C_inline C_word C_a_i_list5(C_word **a, int n, C_word x1, C_word x2, C_word x3,
 }
 
 
-C_inline C_word C_a_i_list6(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_list6(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			    C_word x5, C_word x6)
 {
   C_word x = C_pair(a, x6, C_SCHEME_END_OF_LIST);
@@ -3481,7 +3475,7 @@ C_inline C_word C_a_i_list6(C_word **a, int n, C_word x1, C_word x2, C_word x3,
 }
 
 
-C_inline C_word C_a_i_list7(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_list7(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			    C_word x5, C_word x6, C_word x7)
 {
   C_word x = C_pair(a, x7, C_SCHEME_END_OF_LIST);
@@ -3495,7 +3489,7 @@ C_inline C_word C_a_i_list7(C_word **a, int n, C_word x1, C_word x2, C_word x3,
 }
 
 
-C_inline C_word C_a_i_list8(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
+inline static C_word C_a_i_list8(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4,
 			    C_word x5, C_word x6, C_word x7, C_word x8)
 {
   C_word x = C_pair(a, x8, C_SCHEME_END_OF_LIST);
@@ -3514,7 +3508,7 @@ C_inline C_word C_a_i_list8(C_word **a, int n, C_word x1, C_word x2, C_word x3,
  * From Hacker's Delight by Henry S. Warren
  * based on a modified nlz() from section 5-3 (fig. 5-7)
  */
-C_inline int C_ilen(C_uword x)
+inline static int C_ilen(C_uword x)
 {
   C_uword y;
   C_word n = 0;
@@ -3534,7 +3528,7 @@ C_inline int C_ilen(C_uword x)
 #ifdef HAVE_STRLCPY
 # define C_strlcpy                  strlcpy
 #else
-C_inline size_t C_strlcpy(char *dst, const char *src, size_t sz)
+inline static size_t C_strlcpy(char *dst, const char *src, size_t sz)
 {
    const char *start = src;
 
@@ -3554,7 +3548,7 @@ C_inline size_t C_strlcpy(char *dst, const char *src, size_t sz)
 #ifdef HAVE_STRLCAT
 # define C_strlcat                  strlcat
 #else
-C_inline size_t C_strlcat(char *dst, const char *src, size_t sz)
+inline static size_t C_strlcat(char *dst, const char *src, size_t sz)
 {
    char  *start = dst;
 
@@ -3569,7 +3563,7 @@ C_inline size_t C_strlcat(char *dst, const char *src, size_t sz)
 #ifdef PATH_MAX
 # define C_realpath realpath
 #else
-C_inline char *C_realpath(const char *path, char *resolved)
+inline static char *C_realpath(const char *path, char *resolved)
 {
 # if _POSIX_C_SOURCE >= 200809L
   char *p;
diff --git a/runtime.c b/runtime.c
index dd4b6682..ffeee772 100644
--- a/runtime.c
+++ b/runtime.c
@@ -5906,7 +5906,7 @@ C_s_a_i_negate(C_word **ptr, C_word n, C_word x)
  * there.  If target is larger than source, the most significant
  * digits will remain untouched.
  */
-C_inline void bignum_digits_destructive_copy(C_word target, C_word source)
+inline static void bignum_digits_destructive_copy(C_word target, C_word source)
 {
   C_memcpy(C_bignum_digits(target), C_bignum_digits(source),
            C_wordstobytes(C_bignum_size(source)));
@@ -5976,7 +5976,7 @@ C_regparm C_word C_fcall C_a_i_bitwise_xor(C_word **a, int c, C_word n1, C_word
 }
 
 /* Faster version that ignores sign in bignums. TODO: Omit labs() too? */
-C_inline int integer_length_abs(C_word x)
+inline static int integer_length_abs(C_word x)
 {
   if (x & C_FIXNUM_BIT) {
     return C_ilen(labs(C_unfix(x)));
@@ -6053,7 +6053,7 @@ bignum_extract_digits(C_word **ptr, C_word n, C_word x, C_word start, C_word end
  * the number is negative, or #f if it doesn't need to be negated.
  * The size can be larger or smaller than X (it may be 1-padded).
  */
-C_inline C_word maybe_negate_bignum_for_bitwise_op(C_word x, C_word size)
+inline static C_word maybe_negate_bignum_for_bitwise_op(C_word x, C_word size)
 {
   C_word nx = C_SCHEME_FALSE, xsize;
   if (C_bignum_negativep(x)) {
@@ -10585,7 +10585,7 @@ C_a_i_flonum_gcd(C_word **p, C_word n, C_word x, C_word y)
  * much.  This can be detected by dividing only the leading k bits.
  * In our case, k = C_WORD_SIZE - 2.
  */
-C_inline void lehmer_gcd(C_word **ptr, C_word u, C_word v, C_word *x, C_word *y)
+inline static void lehmer_gcd(C_word **ptr, C_word u, C_word v, C_word *x, C_word *y)
 {
   int i_even = 1, done = 0;
   C_word shift_amount = integer_length_abs(u) - (C_WORD_SIZE - 2),
@@ -10924,7 +10924,7 @@ C_s_a_i_digits_to_integer(C_word **ptr, C_word n, C_word str, C_word start, C_wo
   }
 }
 
-C_inline int hex_char_to_digit(int ch)
+inline static int hex_char_to_digit(int ch)
 {
   if (ch == (int)'#') return 0; /* Hash characters in numbers are mapped to 0 */
   else if (ch >= (int)'a') return ch - (int)'a' + 10; /* lower hex */
diff --git a/scheduler.scm b/scheduler.scm
index 8527f277..c77c786b 100644
--- a/scheduler.scm
+++ b/scheduler.scm
@@ -79,7 +79,7 @@ static fd_set C_fdset_input, C_fdset_output;
 #define C_fd_input_ready(fd,pos)  C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_input))
 #define C_fd_output_ready(fd,pos)  C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_output))
 
-C_inline int C_ready_fds_timeout(int to, unsigned int tm) {
+inline static int C_ready_fds_timeout(int to, unsigned int tm) {
   struct timeval timeout;
   timeout.tv_sec = tm / 1000;
   timeout.tv_usec = fmod(tm, 1000) * 1000;
@@ -87,12 +87,12 @@ C_inline int C_ready_fds_timeout(int to, unsigned int tm) {
   return select(FD_SETSIZE, &C_fdset_input, &C_fdset_output, NULL, to ? &timeout : NULL);
 }
 
-C_inline void C_prepare_fdset(int length) {
+inline static void C_prepare_fdset(int length) {
   FD_ZERO(&C_fdset_input);
   FD_ZERO(&C_fdset_output);
 }
 
-C_inline void C_fdset_add(int fd, int input, int output) {
+inline static void C_fdset_add(int fd, int input, int output) {
   if (input) FD_SET(fd, &C_fdset_input);
   if (output) FD_SET(fd, &C_fdset_output);
 }
@@ -104,7 +104,7 @@ C_inline void C_fdset_add(int fd, int input, int output) {
 static int C_fdset_nfds;
 static struct pollfd *C_fdset_set = NULL;
 
-C_inline int C_fd_ready(int fd, int pos, int what) {
+inline static int C_fd_ready(int fd, int pos, int what) {
   assert(fd == C_fdset_set[pos].fd); /* Must match position in ##sys#fd-list! */
   return(C_fdset_set[pos].revents & what);
 }
@@ -112,11 +112,11 @@ C_inline int C_fd_ready(int fd, int pos, int what) {
 #define C_fd_input_ready(fd,pos)  C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLIN|POLLERR|POLLHUP|POLLNVAL))
 #define C_fd_output_ready(fd,pos)  C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLOUT|POLLERR|POLLHUP|POLLNVAL))
 
-C_inline int C_ready_fds_timeout(int to, unsigned int tm) {
+inline static int C_ready_fds_timeout(int to, unsigned int tm) {
   return poll(C_fdset_set, C_fdset_nfds, to ? tm : -1);
 }
 
-C_inline void C_prepare_fdset(int length) {
+inline static void C_prepare_fdset(int length) {
   /* TODO: Only realloc when needed? */
   C_fdset_set = realloc(C_fdset_set, sizeof(struct pollfd) * length);
   if (C_fdset_set == NULL)
@@ -125,7 +125,7 @@ C_inline void C_prepare_fdset(int length) {
 }
 
 /* This *must* be called in order, so position will match ##sys#fd-list */
-C_inline void C_fdset_add(int fd, int input, int output) {
+inline static void C_fdset_add(int fd, int input, int output) {
   C_fdset_set[C_fdset_nfds].events = ((input ? POLLIN : 0) | (output ? POLLOUT : 0));
   C_fdset_set[C_fdset_nfds++].fd = fd;
 }
Trap