From cd14663e7ec477baa4b8498db370b976d4583132 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 10 Sep 2023 20:04:07 +0200 Subject: [PATCH 01/40] directory: fix a bug leading to missing matches in some cases If a directory component followed :wild-inferior for paths like **/some-dir/some-file, we were not finding all possible matches. This came about because if we did not match in dir_recursive, we were returning nil instead of the list of previously found matches. Fixes #712. --- src/c/pathname.d | 1 - src/c/unixfsys.d | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/c/pathname.d b/src/c/pathname.d index c267fa0e7..efeca5cab 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -785,7 +785,6 @@ cl_logical_pathname(cl_object x) @(return x); } -/* FIXME! WILD-PATHNAME-P is missing! */ @(defun wild-pathname-p (pathname &optional component) bool checked = 0; @ diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index 351a638d8..f83f53d6c 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -1012,7 +1012,7 @@ dir_recursive(cl_object base_dir, cl_object directory, cl_object filemask, int f * for the file part. */ if (Null(base_dir)) - return ECL_NIL; + return output; directory = ECL_CONS_CDR(directory); goto AGAIN; } From d3e4cb5442ce4089bb92a4ecaad469f5724321e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 19 Sep 2023 09:32:40 +0200 Subject: [PATCH 02/40] main: fix ECL_OPT_SIGNAL_HANDLING_THREAD to be adequate unixint ignores the flag that enables the signal handling thread when it can't create one. --- src/c/main.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/c/main.d b/src/c/main.d index fbaae6674..7794f3f84 100644 --- a/src/c/main.d +++ b/src/c/main.d @@ -83,7 +83,11 @@ cl_fixnum ecl_option_values[ECL_OPT_LIMIT+1] = { 1, /* ECL_OPT_TRAP_SIGBUS */ 1, /* ECL_OPT_TRAP_SIGPIPE */ 1, /* ECL_OPT_TRAP_INTERRUPT_SIGNAL */ +#if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK) 1, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ +#else + 0, /* ECL_OPT_SIGNAL_HANDLING_THREAD */ +#endif 16, /* ECL_OPT_SIGNAL_QUEUE_SIZE */ 0, /* ECL_OPT_BOOTED */ 8192, /* ECL_OPT_BIND_STACK_SIZE */ From 142cb47f4716c1e4853b2534d7d463d86376ef8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 19 Sep 2023 09:40:12 +0200 Subject: [PATCH 03/40] cosmetic: reindent file unixint.d --- src/c/unixint.d | 1889 ++++++++++++++++++++++++----------------------- 1 file changed, 945 insertions(+), 944 deletions(-) diff --git a/src/c/unixint.d b/src/c/unixint.d index 9905f8ed1..2248fa0d3 100644 --- a/src/c/unixint.d +++ b/src/c/unixint.d @@ -1,21 +1,16 @@ -/* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */ -/* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ +/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* vim: set filetype=c tabstop=2 shiftwidth=2 expandtab: */ /* - unixint.d -- Unix interrupt interface. -*/ -/* - Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. - Copyright (c) 1990, Giuseppe Attardi. - Copyright (c) 2001, Juan Jose Garcia Ripoll. - Copyright (c) 2016, Daniel Kochmański. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. + * unixint.d -- Unix interrupt interface. + * + * Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. + * Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * Copyright (c) 2016, Daniel Kochmański. + * + * See file 'LICENSE' for the copyright details. + * */ /********************************************************************** @@ -92,112 +87,113 @@ # endif # include #endif + #include #include #include static struct { - int code; - char *name; - cl_object handler; + int code; + char *name; + cl_object handler; } known_signals[] = { #ifdef SIGHUP - { SIGHUP, "+SIGHUP+", ECL_NIL}, + { SIGHUP, "+SIGHUP+", ECL_NIL}, #endif #ifdef SIGINT - { SIGINT, "+SIGINT+", @'si::terminal-interrupt'}, + { SIGINT, "+SIGINT+", @'si::terminal-interrupt'}, #endif #ifdef SIGQUIT - { SIGQUIT, "+SIGQUIT+", ECL_NIL}, + { SIGQUIT, "+SIGQUIT+", ECL_NIL}, #endif #ifdef SIGILL - { SIGILL, "+SIGILL+", @'ext::illegal-instruction'}, + { SIGILL, "+SIGILL+", @'ext::illegal-instruction'}, #endif #ifdef SIGTRAP - { SIGTRAP, "+SIGTRAP+", ECL_NIL}, + { SIGTRAP, "+SIGTRAP+", ECL_NIL}, #endif #ifdef SIGABRT - { SIGABRT, "+SIGABRT+", ECL_NIL}, + { SIGABRT, "+SIGABRT+", ECL_NIL}, #endif #ifdef SIGEMT - { SIGEMT, "+SIGEMT+", ECL_NIL}, + { SIGEMT, "+SIGEMT+", ECL_NIL}, #endif #ifdef SIGFPE - { SIGFPE, "+SIGFPE+", ECL_NIL}, + { SIGFPE, "+SIGFPE+", ECL_NIL}, #endif #ifdef SIGKILL - { SIGKILL, "+SIGKILL+", ECL_NIL}, + { SIGKILL, "+SIGKILL+", ECL_NIL}, #endif #ifdef SIGBUS - { SIGBUS, "+SIGBUS+", @'ext::segmentation-violation'}, + { SIGBUS, "+SIGBUS+", @'ext::segmentation-violation'}, #endif #ifdef SIGSEGV - { SIGSEGV, "+SIGSEGV+", @'ext::segmentation-violation'}, + { SIGSEGV, "+SIGSEGV+", @'ext::segmentation-violation'}, #endif #ifdef SIGSYS - { SIGSYS, "+SIGSYS+", ECL_NIL}, + { SIGSYS, "+SIGSYS+", ECL_NIL}, #endif #ifdef SIGPIPE - { SIGPIPE, "+SIGPIPE+", ECL_NIL}, + { SIGPIPE, "+SIGPIPE+", ECL_NIL}, #endif #ifdef SIGALRM - { SIGALRM, "+SIGALRM+", ECL_NIL}, + { SIGALRM, "+SIGALRM+", ECL_NIL}, #endif #ifdef SIGTERM - { SIGTERM, "+SIGTERM+", ECL_NIL}, + { SIGTERM, "+SIGTERM+", ECL_NIL}, #endif #ifdef SIGURG - { SIGURG, "+SIGURG+", ECL_NIL}, + { SIGURG, "+SIGURG+", ECL_NIL}, #endif #ifdef SIGSTOP - { SIGSTOP, "+SIGSTOP+", ECL_NIL}, + { SIGSTOP, "+SIGSTOP+", ECL_NIL}, #endif #ifdef SIGTSTP - { SIGTSTP, "+SIGTSTP+", ECL_NIL}, + { SIGTSTP, "+SIGTSTP+", ECL_NIL}, #endif #ifdef SIGCONT - { SIGCONT, "+SIGCONT+", ECL_NIL}, + { SIGCONT, "+SIGCONT+", ECL_NIL}, #endif #ifdef SIGCHLD - { SIGCHLD, "+SIGCHLD+", ECL_NIL}, + { SIGCHLD, "+SIGCHLD+", ECL_NIL}, #endif #ifdef SIGTTIN - { SIGTTIN, "+SIGTTIN+", ECL_NIL}, + { SIGTTIN, "+SIGTTIN+", ECL_NIL}, #endif #ifdef SIGTTOU - { SIGTTOU, "+SIGTTOU+", ECL_NIL}, + { SIGTTOU, "+SIGTTOU+", ECL_NIL}, #endif #ifdef SIGIO - { SIGIO, "+SIGIO+", ECL_NIL}, + { SIGIO, "+SIGIO+", ECL_NIL}, #endif #ifdef SIGXCPU - { SIGXCPU, "+SIGXCPU+", ECL_NIL}, + { SIGXCPU, "+SIGXCPU+", ECL_NIL}, #endif #ifdef SIGXFSZ - { SIGXFSZ, "+SIGXFSZ+", ECL_NIL}, + { SIGXFSZ, "+SIGXFSZ+", ECL_NIL}, #endif #ifdef SIGVTALRM - { SIGVTALRM, "+SIGVTALRM+", ECL_NIL}, + { SIGVTALRM, "+SIGVTALRM+", ECL_NIL}, #endif #ifdef SIGPROF - { SIGPROF, "+SIGPROF+", ECL_NIL}, + { SIGPROF, "+SIGPROF+", ECL_NIL}, #endif #ifdef SIGWINCH - { SIGWINCH, "+SIGWINCH+", ECL_NIL}, + { SIGWINCH, "+SIGWINCH+", ECL_NIL}, #endif #ifdef SIGINFO - { SIGINFO, "+SIGINFO+", ECL_NIL}, + { SIGINFO, "+SIGINFO+", ECL_NIL}, #endif #ifdef SIGUSR1 - { SIGUSR1, "+SIGUSR1+", ECL_NIL}, + { SIGUSR1, "+SIGUSR1+", ECL_NIL}, #endif #ifdef SIGUSR2 - { SIGUSR2, "+SIGUSR2+", ECL_NIL}, + { SIGUSR2, "+SIGUSR2+", ECL_NIL}, #endif #ifdef SIGTHR - { SIGTHR, "+SIGTHR+", ECL_NIL}, + { SIGTHR, "+SIGTHR+", ECL_NIL}, #endif - { -1, "", ECL_NIL } + { -1, "", ECL_NIL } }; #ifdef HAVE_SIGPROCMASK @@ -209,23 +205,23 @@ static sigset_t main_thread_sigmask; static void mysignal(int code, void *handler) { - struct sigaction action; - sigaction(code, NULL, &action); - if (handler == SIG_IGN || handler == SIG_DFL) { - action.sa_handler = handler; - } else { + struct sigaction action; + sigaction(code, NULL, &action); + if (handler == SIG_IGN || handler == SIG_DFL) { + action.sa_handler = handler; + } else { #ifdef SA_SIGINFO - /* void (*handler)(int, siginfo_t *, void*) */ - action.sa_sigaction = handler; - action.sa_flags = SA_SIGINFO; + /* void (*handler)(int, siginfo_t *, void*) */ + action.sa_sigaction = handler; + action.sa_flags = SA_SIGINFO; #else - /* void (*handler)(int) */ - action.sa_handler = handler; - action.sa_flags = 0; + /* void (*handler)(int) */ + action.sa_handler = handler; + action.sa_flags = 0; #endif - sigfillset(&action.sa_mask); - } - sigaction(code, &action, NULL); + sigfillset(&action.sa_mask); + } + sigaction(code, &action, NULL); } #else /* HAVE_SIGPROCMASK */ # define handler_fn_prototype(name, sig, info, aux) name(sig) @@ -239,29 +235,29 @@ static bool zombie_process(cl_env_ptr the_env) { #ifdef ECL_THREADS - if (the_env == NULL) { - return 1; - } else { - /* When we are exiting a thread, we simply ignore all signals. */ - cl_object process = the_env->own_process; - return (process->process.phase == ECL_PROCESS_INACTIVE); - } + if (the_env == NULL) { + return 1; + } else { + /* When we are exiting a thread, we simply ignore all signals. */ + cl_object process = the_env->own_process; + return (process->process.phase == ECL_PROCESS_INACTIVE); + } #else - return !the_env; + return !the_env; #endif } static ECL_INLINE bool interrupts_disabled_by_C(cl_env_ptr the_env) { - return the_env->disable_interrupts; + return the_env->disable_interrupts; } static ECL_INLINE bool interrupts_disabled_by_lisp(cl_env_ptr the_env) { - return !ecl_option_values[ECL_OPT_BOOTED] || - Null(ECL_SYM_VAL(the_env, @'ext::*interrupts-enabled*')); + return !ecl_option_values[ECL_OPT_BOOTED] || + Null(ECL_SYM_VAL(the_env, @'ext::*interrupts-enabled*')); } static void early_signal_error() ecl_attr_noreturn; @@ -269,8 +265,8 @@ static void early_signal_error() ecl_attr_noreturn; static void early_signal_error() { - ecl_internal_error("Got signal before environment was installed" - " on our thread"); + ecl_internal_error("Got signal before environment was installed" + " on our thread"); } static void illegal_signal_code(cl_object code) ecl_attr_noreturn; @@ -278,7 +274,7 @@ static void illegal_signal_code(cl_object code) ecl_attr_noreturn; static void illegal_signal_code(cl_object code) { - FEerror("Unknown signal code: ~D", 1, code); + FEerror("Unknown signal code: ~D", 1, code); } /* On platforms in which mprotect() works, we block all write access @@ -289,13 +285,13 @@ static ECL_INLINE void set_guard_page(cl_env_ptr the_env) { #if defined(ECL_USE_MPROTECT) - if (mprotect(the_env, sizeof(*the_env), PROT_READ) < 0) { - ecl_internal_error("Unable to mprotect environment."); - } + if (mprotect(the_env, sizeof(*the_env), PROT_READ) < 0) { + ecl_internal_error("Unable to mprotect environment."); + } #elif defined(ECL_USE_GUARD_PAGE) - if (!VirtualProtect(the_env, sizeof(*the_env), PAGE_GUARD, NULL)) { - ecl_internal_error("Unable to mprotect environment."); - } + if (!VirtualProtect(the_env, sizeof(*the_env), PAGE_GUARD, NULL)) { + ecl_internal_error("Unable to mprotect environment."); + } #endif } @@ -307,14 +303,14 @@ static cl_object pop_signal(cl_env_ptr env); static void unblock_signal(cl_env_ptr the_env, int signal) { - /* - * We do not really "unblock" the signal, but rather restore - * ECL's default sigmask. - */ + /* + * We do not really "unblock" the signal, but rather restore + * ECL's default sigmask. + */ # ifdef ECL_THREADS - pthread_sigmask(SIG_SETMASK, the_env->default_sigmask, NULL); + pthread_sigmask(SIG_SETMASK, the_env->default_sigmask, NULL); # else - sigprocmask(SIG_SETMASK, the_env->default_sigmask, NULL); + sigprocmask(SIG_SETMASK, the_env->default_sigmask, NULL); # endif } #endif @@ -324,248 +320,249 @@ ecl_def_ct_base_string(str_ignore_signal,"Ignore signal",13,static,const); static void handle_signal_now(cl_object signal_code) { - switch (ecl_t_of(signal_code)) { - case t_fixnum: - cl_cerror(4, str_ignore_signal, @'ext::unix-signal-received', - @':code', signal_code); - break; - case t_symbol: - /* - * When we bind a handler to a signal, it may either - * be a function, a symbol denoting a function or - * a symbol denoting a condition. - */ - if (cl_find_class(2, signal_code, ECL_NIL) != ECL_NIL) { - cl_cerror(2, str_ignore_signal, signal_code); - break; - } - /* fallthrough */ - case t_cfun: - case t_cfunfixed: - case t_cclosure: - case t_bytecodes: - case t_bclosure: - _ecl_funcall1(signal_code); - default: - break; - } + switch (ecl_t_of(signal_code)) { + case t_fixnum: + cl_cerror(4, str_ignore_signal, @'ext::unix-signal-received', + @':code', signal_code); + break; + case t_symbol: + /* + * When we bind a handler to a signal, it may either + * be a function, a symbol denoting a function or + * a symbol denoting a condition. + */ + if (cl_find_class(2, signal_code, ECL_NIL) != ECL_NIL) { + cl_cerror(2, str_ignore_signal, signal_code); + break; + } + /* fallthrough */ + case t_cfun: + case t_cfunfixed: + case t_cclosure: + case t_bytecodes: + case t_bclosure: + _ecl_funcall1(signal_code); + default: + break; + } } cl_object si_handle_signal(cl_object signal_code) { - handle_signal_now(signal_code); - @(return) + const cl_env_ptr the_env = ecl_process_env(); + handle_signal_now(signal_code); + ecl_return0(the_env); } static void handle_all_queued(cl_env_ptr env) { - while (env->interrupt_struct->pending_interrupt != ECL_NIL) { - handle_signal_now(pop_signal(env)); - } + while (env->interrupt_struct->pending_interrupt != ECL_NIL) { + handle_signal_now(pop_signal(env)); + } } static void handle_all_queued_interrupt_safe(cl_env_ptr env) { - /* We have to save and later restore thread-local variables to - * ensure that they don't get overwritten by the interrupting - * code */ - /* INV: - IHS stack manipulations are interrupt safe - * - The rest of the thread local variables are - * guaranteed to be used in an interrupt safe way. This - * is not true for the compiler environment and ffi - * data, but it is unclear whether the DFFI or compiler - * are thread safe anyway. */ - cl_object fun = env->function; - cl_index nvalues = env->nvalues; - cl_object values[ECL_MULTIPLE_VALUES_LIMIT]; - memcpy(values, env->values, ECL_MULTIPLE_VALUES_LIMIT*sizeof(cl_object)); - cl_object stack_frame = env->stack_frame; - cl_object packages_to_be_created = env->packages_to_be_created; - cl_object packages_to_be_created_p = env->packages_to_be_created_p; - /* bignum registers need some special handling, because their - * contents are allocated as uncollectable memory. If we did - * not init and clear them before calling the interrupting - * code we would risk memory leaks. */ - cl_object big_register[ECL_BIGNUM_REGISTER_NUMBER]; - memcpy(big_register, env->big_register, ECL_BIGNUM_REGISTER_NUMBER*sizeof(cl_object)); - ecl_init_bignum_registers(env); - /* We might have been interrupted while we push/pop in the - * stack. Increasing env->stack_top ensures that we don't - * overwrite the topmost stack value. */ - env->stack_top++; - /* We also need to save and restore the (top+1)'th frame and - * binding stack value to prevent overwriting it. - * INV: Due to the stack safety areas we don't need to check - * for env->frs/bds_limit */ - struct ecl_frame top_frame; - memcpy(&top_frame, env->frs_top+1, sizeof(struct ecl_frame)); - struct ecl_bds_frame top_binding; - memcpy(&top_binding, env->bds_top+1, sizeof(struct ecl_bds_frame)); - /* Finally we can handle the queued signals ... */ - handle_all_queued(env); - /* ... and restore everything again */ - memcpy(env->bds_top+1, &top_binding, sizeof(struct ecl_bds_frame)); - memcpy(env->frs_top+1, &top_frame, sizeof(struct ecl_frame)); - env->stack_top--; - ecl_clear_bignum_registers(env); - memcpy(env->big_register, big_register, ECL_BIGNUM_REGISTER_NUMBER*sizeof(cl_object)); - env->packages_to_be_created_p = packages_to_be_created_p; - env->packages_to_be_created = packages_to_be_created; - env->stack_frame = stack_frame; - memcpy(env->values, values, ECL_MULTIPLE_VALUES_LIMIT*sizeof(cl_object)); - env->nvalues = nvalues; - env->function = fun; + /* We have to save and later restore thread-local variables to + * ensure that they don't get overwritten by the interrupting + * code */ + /* INV: - IHS stack manipulations are interrupt safe + * - The rest of the thread local variables are + * guaranteed to be used in an interrupt safe way. This + * is not true for the compiler environment and ffi + * data, but it is unclear whether the DFFI or compiler + * are thread safe anyway. */ + cl_object fun = env->function; + cl_index nvalues = env->nvalues; + cl_object values[ECL_MULTIPLE_VALUES_LIMIT]; + memcpy(values, env->values, ECL_MULTIPLE_VALUES_LIMIT*sizeof(cl_object)); + cl_object stack_frame = env->stack_frame; + cl_object packages_to_be_created = env->packages_to_be_created; + cl_object packages_to_be_created_p = env->packages_to_be_created_p; + /* bignum registers need some special handling, because their + * contents are allocated as uncollectable memory. If we did + * not init and clear them before calling the interrupting + * code we would risk memory leaks. */ + cl_object big_register[ECL_BIGNUM_REGISTER_NUMBER]; + memcpy(big_register, env->big_register, ECL_BIGNUM_REGISTER_NUMBER*sizeof(cl_object)); + ecl_init_bignum_registers(env); + /* We might have been interrupted while we push/pop in the + * stack. Increasing env->stack_top ensures that we don't + * overwrite the topmost stack value. */ + env->stack_top++; + /* We also need to save and restore the (top+1)'th frame and + * binding stack value to prevent overwriting it. + * INV: Due to the stack safety areas we don't need to check + * for env->frs/bds_limit */ + struct ecl_frame top_frame; + memcpy(&top_frame, env->frs_top+1, sizeof(struct ecl_frame)); + struct ecl_bds_frame top_binding; + memcpy(&top_binding, env->bds_top+1, sizeof(struct ecl_bds_frame)); + /* Finally we can handle the queued signals ... */ + handle_all_queued(env); + /* ... and restore everything again */ + memcpy(env->bds_top+1, &top_binding, sizeof(struct ecl_bds_frame)); + memcpy(env->frs_top+1, &top_frame, sizeof(struct ecl_frame)); + env->stack_top--; + ecl_clear_bignum_registers(env); + memcpy(env->big_register, big_register, ECL_BIGNUM_REGISTER_NUMBER*sizeof(cl_object)); + env->packages_to_be_created_p = packages_to_be_created_p; + env->packages_to_be_created = packages_to_be_created; + env->stack_frame = stack_frame; + memcpy(env->values, values, ECL_MULTIPLE_VALUES_LIMIT*sizeof(cl_object)); + env->nvalues = nvalues; + env->function = fun; } static void queue_signal(cl_env_ptr env, cl_object code, int allocate) { - /* Note: We don't use ECL_WITH_NATIVE_LOCK_BEGIN/END here - * since it checks for pending interrupts after unlocking the - * mutex. This would lead to the interrupt being handled - * immediately when queueing an interrupt for the current - * thread, even when interrupts are disabled. */ + /* Note: We don't use ECL_WITH_NATIVE_LOCK_BEGIN/END here + * since it checks for pending interrupts after unlocking the + * mutex. This would lead to the interrupt being handled + * immediately when queueing an interrupt for the current + * thread, even when interrupts are disabled. */ - /* INV: interrupts are disabled, therefore the lock will - * always be released */ + /* INV: interrupts are disabled, therefore the lock will + * always be released */ #ifdef ECL_THREADS - ecl_mutex_lock(&env->interrupt_struct->signal_queue_lock); + ecl_mutex_lock(&env->interrupt_struct->signal_queue_lock); #endif - cl_object record; - if (allocate) { - record = ecl_list1(ECL_NIL); - } else { - record = env->interrupt_struct->signal_queue; - if (record != ECL_NIL) { - env->interrupt_struct->signal_queue = ECL_CONS_CDR(record); - } - } - if (record != ECL_NIL) { - ECL_RPLACA(record, code); - ECL_RPLACD(record, ECL_NIL); - env->interrupt_struct->pending_interrupt = - ecl_nconc(env->interrupt_struct->pending_interrupt, - record); - } + cl_object record; + if (allocate) { + record = ecl_list1(ECL_NIL); + } else { + record = env->interrupt_struct->signal_queue; + if (record != ECL_NIL) { + env->interrupt_struct->signal_queue = ECL_CONS_CDR(record); + } + } + if (record != ECL_NIL) { + ECL_RPLACA(record, code); + ECL_RPLACD(record, ECL_NIL); + env->interrupt_struct->pending_interrupt = + ecl_nconc(env->interrupt_struct->pending_interrupt, + record); + } #ifdef ECL_THREADS - ecl_mutex_unlock(&env->interrupt_struct->signal_queue_lock); + ecl_mutex_unlock(&env->interrupt_struct->signal_queue_lock); #endif } static cl_object pop_signal(cl_env_ptr env) { - cl_object record, value; - /* Note: We don't use ECL_WITH_NATIVE_LOCK_BEGIN/END here - * since it checks for pending interrupts after unlocking the - * mutex. This would lead to handle_all_queued and pop_signal - * being called again and the interrupts being handled in the - * wrong order. */ + cl_object record, value; + /* Note: We don't use ECL_WITH_NATIVE_LOCK_BEGIN/END here + * since it checks for pending interrupts after unlocking the + * mutex. This would lead to handle_all_queued and pop_signal + * being called again and the interrupts being handled in the + * wrong order. */ - ecl_disable_interrupts_env(env); + ecl_disable_interrupts_env(env); #ifdef ECL_THREADS - ecl_mutex_lock(&env->interrupt_struct->signal_queue_lock); + ecl_mutex_lock(&env->interrupt_struct->signal_queue_lock); #endif - if (env->interrupt_struct->pending_interrupt == ECL_NIL) { - value = ECL_NIL; - } else { - record = env->interrupt_struct->pending_interrupt; - value = ECL_CONS_CAR(record); - env->interrupt_struct->pending_interrupt = ECL_CONS_CDR(record); - /* Save some conses for future use, to avoid allocating */ - if (ECL_SYMBOLP(value) || ECL_FIXNUMP(value)) { - ECL_RPLACD(record, env->interrupt_struct->signal_queue); - env->interrupt_struct->signal_queue = record; - } - } + if (env->interrupt_struct->pending_interrupt == ECL_NIL) { + value = ECL_NIL; + } else { + record = env->interrupt_struct->pending_interrupt; + value = ECL_CONS_CAR(record); + env->interrupt_struct->pending_interrupt = ECL_CONS_CDR(record); + /* Save some conses for future use, to avoid allocating */ + if (ECL_SYMBOLP(value) || ECL_FIXNUMP(value)) { + ECL_RPLACD(record, env->interrupt_struct->signal_queue); + env->interrupt_struct->signal_queue = record; + } + } #ifdef ECL_THREADS - ecl_mutex_unlock(&env->interrupt_struct->signal_queue_lock); + ecl_mutex_unlock(&env->interrupt_struct->signal_queue_lock); #endif - ecl_enable_interrupts_env(env); - return value; + ecl_enable_interrupts_env(env); + return value; } static void handle_or_queue(cl_env_ptr the_env, cl_object signal_code, int code) { - if (Null(signal_code) || signal_code == NULL) - return; - /* - * If interrupts are disabled by lisp we are not so eager on - * detecting when the interrupts become enabled again. We - * queue the signal and are done with that. - */ - if (interrupts_disabled_by_lisp(the_env)) { - queue_signal(the_env, signal_code, 0); - } - /* - * If interrupts are disabled by C, and we have not pushed a - * pending signal, save this signal and return. - */ - else if (interrupts_disabled_by_C(the_env)) { - the_env->disable_interrupts = 3; - queue_signal(the_env, signal_code, 0); - set_guard_page(the_env); - } - /* - * If interrupts are enabled, that means we are in a safe area - * and may execute arbitrary lisp code. We can thus call the - * appropriate handlers. - */ - else { - if (code) unblock_signal(the_env, code); - si_trap_fpe(@'last', ECL_T); /* Clear FPE exception flag */ - handle_signal_now(signal_code); - } + if (Null(signal_code) || signal_code == NULL) + return; + /* + * If interrupts are disabled by lisp we are not so eager on + * detecting when the interrupts become enabled again. We + * queue the signal and are done with that. + */ + if (interrupts_disabled_by_lisp(the_env)) { + queue_signal(the_env, signal_code, 0); + } + /* + * If interrupts are disabled by C, and we have not pushed a + * pending signal, save this signal and return. + */ + else if (interrupts_disabled_by_C(the_env)) { + the_env->disable_interrupts = 3; + queue_signal(the_env, signal_code, 0); + set_guard_page(the_env); + } + /* + * If interrupts are enabled, that means we are in a safe area + * and may execute arbitrary lisp code. We can thus call the + * appropriate handlers. + */ + else { + if (code) unblock_signal(the_env, code); + si_trap_fpe(@'last', ECL_T); /* Clear FPE exception flag */ + handle_signal_now(signal_code); + } } static void handler_fn_prototype(non_evil_signal_handler, int sig, siginfo_t *siginfo, void *data) { - int old_errno = errno; - cl_env_ptr the_env; - cl_object signal_object; - reinstall_signal(sig, non_evil_signal_handler); - /* The lisp environment might not be installed. */ - the_env = ecl_process_env(); - unlikely_if (zombie_process(the_env)) - return; - signal_object = ecl_gethash_safe(ecl_make_fixnum(sig), - cl_core.known_signals, - ECL_NIL); - handle_or_queue(the_env, signal_object, sig); - errno = old_errno; + int old_errno = errno; + cl_env_ptr the_env; + cl_object signal_object; + reinstall_signal(sig, non_evil_signal_handler); + /* The lisp environment might not be installed. */ + the_env = ecl_process_env(); + unlikely_if (zombie_process(the_env)) + return; + signal_object = ecl_gethash_safe(ecl_make_fixnum(sig), + cl_core.known_signals, + ECL_NIL); + handle_or_queue(the_env, signal_object, sig); + errno = old_errno; } static void handler_fn_prototype(evil_signal_handler, int sig, siginfo_t *siginfo, void *data) { - int old_errno = errno; - cl_env_ptr the_env; - cl_object signal_object; - reinstall_signal(sig, evil_signal_handler); - /* The lisp environment might not be installed. */ - the_env = ecl_process_env(); - unlikely_if (zombie_process(the_env)) - return; - signal_object = ecl_gethash_safe(ecl_make_fixnum(sig), - cl_core.known_signals, - ECL_NIL); - handle_signal_now(signal_object); - errno = old_errno; + int old_errno = errno; + cl_env_ptr the_env; + cl_object signal_object; + reinstall_signal(sig, evil_signal_handler); + /* The lisp environment might not be installed. */ + the_env = ecl_process_env(); + unlikely_if (zombie_process(the_env)) + return; + signal_object = ecl_gethash_safe(ecl_make_fixnum(sig), + cl_core.known_signals, + ECL_NIL); + handle_signal_now(signal_object); + errno = old_errno; } #if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK) typedef struct { - cl_object process; - int signo; + cl_object process; + int signo; } signal_thread_message; static cl_object signal_thread_process = ECL_NIL; static signal_thread_message signal_thread_msg; @@ -575,97 +572,97 @@ static int signal_thread_pipe[2] = {-1,-1}; static void handler_fn_prototype(deferred_signal_handler, int sig, siginfo_t *siginfo, void *data) { - int old_errno = errno; - cl_env_ptr the_env; - signal_thread_message msg; - reinstall_signal(sig, deferred_signal_handler); - /* The lisp environment might not be installed. */ - the_env = ecl_process_env(); - unlikely_if (zombie_process(the_env)) - return; - msg.signo = sig; - msg.process = the_env->own_process; - if (msg.process == signal_thread_process) { - /* The signal handling thread may also receive signals. In - * this case we do not use the pipe, but just copy the message - * Note that read() will abort the thread will get notified. */ - signal_thread_msg = msg; - } else if (signal_thread_pipe[1] > 0) { - ecl_mutex_lock(&signal_thread_lock); - write(signal_thread_pipe[1], &msg, sizeof(msg)); - ecl_mutex_unlock(&signal_thread_lock); - } else { - /* Nothing to do. There is no way to handle this signal because - * the responsible thread is not running */ - } - errno = old_errno; + int old_errno = errno; + cl_env_ptr the_env; + signal_thread_message msg; + reinstall_signal(sig, deferred_signal_handler); + /* The lisp environment might not be installed. */ + the_env = ecl_process_env(); + unlikely_if (zombie_process(the_env)) + return; + msg.signo = sig; + msg.process = the_env->own_process; + if (msg.process == signal_thread_process) { + /* The signal handling thread may also receive signals. In + * this case we do not use the pipe, but just copy the message + * Note that read() will abort the thread will get notified. */ + signal_thread_msg = msg; + } else if (signal_thread_pipe[1] > 0) { + ecl_mutex_lock(&signal_thread_lock); + write(signal_thread_pipe[1], &msg, sizeof(msg)); + ecl_mutex_unlock(&signal_thread_lock); + } else { + /* Nothing to do. There is no way to handle this signal because + * the responsible thread is not running */ + } + errno = old_errno; } static cl_object asynchronous_signal_servicing_thread() { - const cl_env_ptr the_env = ecl_process_env(); - int interrupt_signal = -1; - /* - * We block all signals except the usual interrupt thread and - * GC signals (including SIGSEGV and SIGSEGV which are needed - * when the GC runs in incremental mode). - */ - { - sigset_t handled_set; - sigfillset(&handled_set); - if (ecl_option_values[ECL_OPT_TRAP_INTERRUPT_SIGNAL]) { - interrupt_signal = - ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; - sigdelset(&handled_set, interrupt_signal); - sigdelset(&handled_set, GC_get_suspend_signal()); - sigdelset(&handled_set, GC_get_thr_restart_signal()); - sigdelset(&handled_set, SIGSEGV); - sigdelset(&handled_set, SIGBUS); - } - pthread_sigmask(SIG_BLOCK, &handled_set, NULL); - } - /* - * We create the object for communication. We need a lock to prevent other - * threads from writing before the pipe is created. - */ - ecl_mutex_lock(&signal_thread_lock); - pipe(signal_thread_pipe); - ecl_mutex_unlock(&signal_thread_lock); - signal_thread_msg.process = ECL_NIL; - for (;;) { - cl_object signal_code; - signal_thread_msg.process = ECL_NIL; - if (read(signal_thread_pipe[0], &signal_thread_msg, - sizeof(signal_thread_msg)) < 0) - { - /* Either the pipe errs or we have received an interrupt - * from a different thread */ - if (errno != EINTR || - signal_thread_msg.process != the_env->own_process) - break; - } - /* We have queued ourselves an interrupt event */ - if (signal_thread_msg.signo == interrupt_signal && - signal_thread_msg.process == the_env->own_process) { - break; - } - signal_code = ecl_gethash_safe(ecl_make_fixnum(signal_thread_msg.signo), - cl_core.known_signals, - ECL_NIL); - if (!Null(signal_code)) { - mp_process_run_function(3, @'si::handle-signal', - @'si::handle-signal', - signal_code); - } - } + const cl_env_ptr the_env = ecl_process_env(); + int interrupt_signal = -1; + /* + * We block all signals except the usual interrupt thread and + * GC signals (including SIGSEGV and SIGSEGV which are needed + * when the GC runs in incremental mode). + */ + { + sigset_t handled_set; + sigfillset(&handled_set); + if (ecl_option_values[ECL_OPT_TRAP_INTERRUPT_SIGNAL]) { + interrupt_signal = + ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; + sigdelset(&handled_set, interrupt_signal); + sigdelset(&handled_set, GC_get_suspend_signal()); + sigdelset(&handled_set, GC_get_thr_restart_signal()); + sigdelset(&handled_set, SIGSEGV); + sigdelset(&handled_set, SIGBUS); + } + pthread_sigmask(SIG_BLOCK, &handled_set, NULL); + } + /* + * We create the object for communication. We need a lock to prevent other + * threads from writing before the pipe is created. + */ + ecl_mutex_lock(&signal_thread_lock); + pipe(signal_thread_pipe); + ecl_mutex_unlock(&signal_thread_lock); + signal_thread_msg.process = ECL_NIL; + for (;;) { + cl_object signal_code; + signal_thread_msg.process = ECL_NIL; + if (read(signal_thread_pipe[0], &signal_thread_msg, + sizeof(signal_thread_msg)) < 0) + { + /* Either the pipe errs or we have received an interrupt + * from a different thread */ + if (errno != EINTR || + signal_thread_msg.process != the_env->own_process) + break; + } + /* We have queued ourselves an interrupt event */ + if (signal_thread_msg.signo == interrupt_signal && + signal_thread_msg.process == the_env->own_process) { + break; + } + signal_code = ecl_gethash_safe(ecl_make_fixnum(signal_thread_msg.signo), + cl_core.known_signals, + ECL_NIL); + if (!Null(signal_code)) { + mp_process_run_function(3, @'si::handle-signal', + @'si::handle-signal', + signal_code); + } + } # if defined(ECL_USE_MPROTECT) - /* We might have protected our own environment */ - mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); + /* We might have protected our own environment */ + mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); # endif /* ECL_USE_MPROTECT */ - close(signal_thread_pipe[0]); - close(signal_thread_pipe[1]); - ecl_return0(the_env); + close(signal_thread_pipe[0]); + close(signal_thread_pipe[1]); + ecl_return0(the_env); } #endif /* ECL_THREADS && !ECL_MS_WINDOWS_HOST */ @@ -673,347 +670,351 @@ asynchronous_signal_servicing_thread() static void handler_fn_prototype(process_interrupt_handler, int sig, siginfo_t *siginfo, void *data) { - int old_errno = errno; - cl_env_ptr the_env; - reinstall_signal(sig, process_interrupt_handler); - /* The lisp environment might not be installed. */ - the_env = ecl_process_env(); - if (zombie_process(the_env)) - return; - if (!Null(the_env->interrupt_struct->pending_interrupt)) { - if (interrupts_disabled_by_C(the_env)) { - set_guard_page(the_env); - } else if (!interrupts_disabled_by_lisp(the_env)) { - unblock_signal(the_env, sig); - handle_all_queued_interrupt_safe(the_env); - } - } - errno = old_errno; + int old_errno = errno; + cl_env_ptr the_env; + reinstall_signal(sig, process_interrupt_handler); + /* The lisp environment might not be installed. */ + the_env = ecl_process_env(); + if (zombie_process(the_env)) + return; + if (!Null(the_env->interrupt_struct->pending_interrupt)) { + if (interrupts_disabled_by_C(the_env)) { + set_guard_page(the_env); + } else if (!interrupts_disabled_by_lisp(the_env)) { + unblock_signal(the_env, sig); + handle_all_queued_interrupt_safe(the_env); + } + } + errno = old_errno; } #endif /* ECL_THREADS && !ECL_MS_WINDOWS_HOST */ static void handler_fn_prototype(fpe_signal_handler, int sig, siginfo_t *info, void *data) { - int code; - cl_object condition; - cl_env_ptr the_env; - reinstall_signal(sig, fpe_signal_handler); - /* The lisp environment might not be installed. */ - unlikely_if (!ecl_option_values[ECL_OPT_BOOTED]) { - early_signal_error(); - } - the_env = ecl_process_env(); - unlikely_if (zombie_process(the_env)) - return; - condition = @'arithmetic-error'; - code = 0; + int code; + cl_object condition; + cl_env_ptr the_env; + reinstall_signal(sig, fpe_signal_handler); + /* The lisp environment might not be installed. */ + unlikely_if (!ecl_option_values[ECL_OPT_BOOTED]) { + early_signal_error(); + } + the_env = ecl_process_env(); + unlikely_if (zombie_process(the_env)) + return; + condition = @'arithmetic-error'; + code = 0; #ifdef _MSC_VER - switch (_fpecode) { - case _FPE_INVALID: - condition = @'floating-point-invalid-operation'; - code = FE_INVALID; - break; - case _FPE_OVERFLOW: - condition = @'floating-point-overflow'; - code = FE_OVERFLOW; - break; - case _FPE_UNDERFLOW: - condition = @'floating-point-underflow'; - code = FE_UNDERFLOW; - break; - case _FPE_ZERODIVIDE: - condition = @'division-by-zero'; - code = FE_DIVBYZERO; - break; - } + switch (_fpecode) { + case _FPE_INVALID: + condition = @'floating-point-invalid-operation'; + code = FE_INVALID; + break; + case _FPE_OVERFLOW: + condition = @'floating-point-overflow'; + code = FE_OVERFLOW; + break; + case _FPE_UNDERFLOW: + condition = @'floating-point-underflow'; + code = FE_UNDERFLOW; + break; + case _FPE_ZERODIVIDE: + condition = @'division-by-zero'; + code = FE_DIVBYZERO; + break; + } #else /* !_MSC_VER */ # if defined(HAVE_FENV_H) & !defined(ECL_AVOID_FENV_H) - code = fetestexcept(FE_ALL_EXCEPT); - if (code & FE_DIVBYZERO) { - condition = @'division-by-zero'; - code = FE_DIVBYZERO; - } else if (code & FE_INVALID) { - condition = @'floating-point-invalid-operation'; - code = FE_INVALID; - } else if (code & FE_OVERFLOW) { - condition = @'floating-point-overflow'; - code = FE_OVERFLOW; - } else if (code & FE_UNDERFLOW) { - condition = @'floating-point-underflow'; - code = FE_UNDERFLOW; - } else if (code & FE_INEXACT) { - condition = @'floating-point-inexact'; - code = FE_INEXACT; - } - feclearexcept(FE_ALL_EXCEPT); + code = fetestexcept(FE_ALL_EXCEPT); + if (code & FE_DIVBYZERO) { + condition = @'division-by-zero'; + code = FE_DIVBYZERO; + } else if (code & FE_INVALID) { + condition = @'floating-point-invalid-operation'; + code = FE_INVALID; + } else if (code & FE_OVERFLOW) { + condition = @'floating-point-overflow'; + code = FE_OVERFLOW; + } else if (code & FE_UNDERFLOW) { + condition = @'floating-point-underflow'; + code = FE_UNDERFLOW; + } else if (code & FE_INEXACT) { + condition = @'floating-point-inexact'; + code = FE_INEXACT; + } + feclearexcept(FE_ALL_EXCEPT); # endif #endif /* !_MSC_VER */ #if defined(SA_SIGINFO) && !defined(NACL) - if (info) { - if (info->si_code == FPE_INTDIV || info->si_code == FPE_FLTDIV) { - condition = @'division-by-zero'; - code = FE_DIVBYZERO; - } else if (info->si_code == FPE_FLTOVF) { - condition = @'floating-point-overflow'; - code = FE_OVERFLOW; - } else if (info->si_code == FPE_FLTUND) { - condition = @'floating-point-underflow'; - code = FE_UNDERFLOW; - } else if (info->si_code == FPE_FLTRES) { - condition = @'floating-point-inexact'; - code = FE_INEXACT; - } else if (info->si_code == FPE_FLTINV) { - condition = @'floating-point-invalid-operation'; - code = FE_INVALID; - } - } + if (info) { + if (info->si_code == FPE_INTDIV || info->si_code == FPE_FLTDIV) { + condition = @'division-by-zero'; + code = FE_DIVBYZERO; + } else if (info->si_code == FPE_FLTOVF) { + condition = @'floating-point-overflow'; + code = FE_OVERFLOW; + } else if (info->si_code == FPE_FLTUND) { + condition = @'floating-point-underflow'; + code = FE_UNDERFLOW; + } else if (info->si_code == FPE_FLTRES) { + condition = @'floating-point-inexact'; + code = FE_INEXACT; + } else if (info->si_code == FPE_FLTINV) { + condition = @'floating-point-invalid-operation'; + code = FE_INVALID; + } + } #endif /* SA_SIGINFO */ - /* - if (code && !(code & the_env->trap_fpe_bits)) - condition = ECL_NIL; - */ - si_trap_fpe(@'last', ECL_T); /* Clear FPE exception flag */ - unblock_signal(the_env, code); - handle_signal_now(condition); - /* We will not reach past this point. */ + /* + if (code && !(code & the_env->trap_fpe_bits)) + condition = ECL_NIL; + */ + si_trap_fpe(@'last', ECL_T); /* Clear FPE exception flag */ + unblock_signal(the_env, code); + handle_signal_now(condition); + /* We will not reach past this point. */ } static void handler_fn_prototype(sigsegv_handler, int sig, siginfo_t *info, void *aux) { - int old_errno = errno; - static const char *stack_overflow_msg = - "\n;;;\n;;; Stack overflow.\n" - ";;; Jumping to the outermost toplevel prompt\n" - ";;;\n\n"; - static const char *segv_msg = - "\n;;;\n" - ";;; Detected access to protected memory, " - "also known as 'bus or segmentation fault'.\n" - ";;; Jumping to the outermost toplevel prompt\n" - ";;;\n\n"; - static const char *interrupt_msg = - "\n;;;\n;;; Internal error:\n" - ";;; Detected write access to the environment while " - "interrupts were disabled. Usually this is caused by " - "a missing call to ecl_enable_interrupts.\n" - ";;;\n\n"; - cl_env_ptr the_env; - reinstall_signal(sig, sigsegv_handler); - /* The lisp environment might not be installed. */ - unlikely_if (!ecl_option_values[ECL_OPT_BOOTED]) { - early_signal_error(); - } - the_env = ecl_process_env(); - unlikely_if (zombie_process(the_env)) - return; + int old_errno = errno; + static const char *stack_overflow_msg = + "\n;;;\n;;; Stack overflow.\n" + ";;; Jumping to the outermost toplevel prompt\n" + ";;;\n\n"; + static const char *segv_msg = + "\n;;;\n" + ";;; Detected access to protected memory, " + "also known as 'bus or segmentation fault'.\n" + ";;; Jumping to the outermost toplevel prompt\n" + ";;;\n\n"; + static const char *interrupt_msg = + "\n;;;\n;;; Internal error:\n" + ";;; Detected write access to the environment while " + "interrupts were disabled. Usually this is caused by " + "a missing call to ecl_enable_interrupts.\n" + ";;;\n\n"; + cl_env_ptr the_env; + reinstall_signal(sig, sigsegv_handler); + /* The lisp environment might not be installed. */ + unlikely_if (!ecl_option_values[ECL_OPT_BOOTED]) { + early_signal_error(); + } + the_env = ecl_process_env(); + unlikely_if (zombie_process(the_env)) + return; #if defined(SA_SIGINFO) && !defined(NACL) # if defined(ECL_USE_MPROTECT) - /* We access disable_interrupts when the environment was - * protected. That means there was a pending signal. */ - if (((char*)&the_env->disable_interrupts <= (char*)info->si_addr) && - ((char*)info->si_addr < (char*)(&the_env->disable_interrupts+1))) - { - unblock_signal(the_env, sig); - mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); - the_env->disable_interrupts = 0; - handle_all_queued_interrupt_safe(the_env); - return; - } else if (the_env->disable_interrupts && - ((char*)(&the_env->disable_interrupts+1) <= (char*)info->si_addr) && - ((char*)info->si_addr < (char*)(the_env+1))) { - unblock_signal(the_env, sig); - mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); - the_env->disable_interrupts = 0; - ecl_unrecoverable_error(the_env, interrupt_msg); - return; - } + /* We access disable_interrupts when the environment was + * protected. That means there was a pending signal. */ + if (((char*)&the_env->disable_interrupts <= (char*)info->si_addr) && + ((char*)info->si_addr < (char*)(&the_env->disable_interrupts+1))) + { + unblock_signal(the_env, sig); + mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); + the_env->disable_interrupts = 0; + handle_all_queued_interrupt_safe(the_env); + return; + } else if (the_env->disable_interrupts && + ((char*)(&the_env->disable_interrupts+1) <= (char*)info->si_addr) && + ((char*)info->si_addr < (char*)(the_env+1))) { + unblock_signal(the_env, sig); + mprotect(the_env, sizeof(*the_env), PROT_READ | PROT_WRITE); + the_env->disable_interrupts = 0; + ecl_unrecoverable_error(the_env, interrupt_msg); + return; + } # endif /* ECL_USE_MPROTECT */ # ifdef ECL_DOWN_STACK - if (sig == SIGSEGV && - (char*)info->si_addr > the_env->cs_barrier && - (char*)info->si_addr <= the_env->cs_org) { - unblock_signal(the_env, sig); - ecl_unrecoverable_error(the_env, stack_overflow_msg); - return; - } + if (sig == SIGSEGV && + (char*)info->si_addr > the_env->cs_barrier && + (char*)info->si_addr <= the_env->cs_org) { + unblock_signal(the_env, sig); + ecl_unrecoverable_error(the_env, stack_overflow_msg); + return; + } # else - if (sig == SIGSEGV && - (char*)info->si_addr < the_env->cs_barrier && - (char*)info->si_addr >= the_env->cs_org) { - unblock_signal(the_env, sig); - ecl_unrecoverable_error(the_env, stack_overflow_msg); - return; - } + if (sig == SIGSEGV && + (char*)info->si_addr < the_env->cs_barrier && + (char*)info->si_addr >= the_env->cs_org) { + unblock_signal(the_env, sig); + ecl_unrecoverable_error(the_env, stack_overflow_msg); + return; + } # endif /* ECL_DOWN_STACK */ /* Do not attempt an error handler if we nest two serious * errors in the same thread */ - if (the_env->fault_address == info->si_addr) { - the_env->fault_address = info->si_addr; - unblock_signal(the_env, sig); - ecl_unrecoverable_error(the_env, segv_msg); - } else { - the_env->fault_address = info->si_addr; - handle_or_queue(the_env, @'ext::segmentation-violation', sig); - } + if (the_env->fault_address == info->si_addr) { + the_env->fault_address = info->si_addr; + unblock_signal(the_env, sig); + ecl_unrecoverable_error(the_env, segv_msg); + } else { + the_env->fault_address = info->si_addr; + handle_or_queue(the_env, @'ext::segmentation-violation', sig); + } #else - /* - * We cannot distinguish between a stack overflow and a simple - * access violation. Thus we assume the worst case and jump to - * the outermost handler. - */ - unblock_signal(the_env, sig); - ecl_unrecoverable_error(the_env, segv_msg); + /* + * We cannot distinguish between a stack overflow and a simple + * access violation. Thus we assume the worst case and jump to + * the outermost handler. + */ + unblock_signal(the_env, sig); + ecl_unrecoverable_error(the_env, segv_msg); #endif /* SA_SIGINFO */ - errno = old_errno; + errno = old_errno; } cl_object si_check_pending_interrupts(void) { - handle_all_queued(ecl_process_env()); - @(return) + const cl_env_ptr the_env = ecl_process_env(); + handle_all_queued(ecl_process_env()); + ecl_return0(the_env); } void ecl_check_pending_interrupts(cl_env_ptr env) { - if (env->interrupt_struct->pending_interrupt != ECL_NIL) - handle_all_queued_interrupt_safe(env); + if (env->interrupt_struct->pending_interrupt != ECL_NIL) + handle_all_queued_interrupt_safe(env); } static cl_object do_catch_signal(int code, cl_object action, cl_object process) { - if (action == ECL_NIL || action == @':ignore') { - mysignal(code, SIG_IGN); - return ECL_T; - } else if (action == @':default') { - mysignal(code, SIG_DFL); - return ECL_T; - } else if (action == @':mask' || action == @':unmask') { + if (action == ECL_NIL || action == @':ignore') { + mysignal(code, SIG_IGN); + return ECL_T; + } else if (action == @':default') { + mysignal(code, SIG_DFL); + return ECL_T; + } else if (action == @':mask' || action == @':unmask') { #ifdef HAVE_SIGPROCMASK # ifdef ECL_THREADS - /* When a process object is supplied, the changes take care - * on the process structure and will only take effect when - * the process is enabled. */ - if (ecl_t_of(process) == t_process) { - cl_env_ptr env = process->process.env; - sigset_t *handled_set = (sigset_t *)env->default_sigmask; - if (action == @':mask') { - sigaddset(handled_set, code); - } else { - sigdelset(handled_set, code); - } - return ECL_T; - } else { - sigset_t handled_set; - pthread_sigmask(SIG_SETMASK, NULL, &handled_set); - if (action == @':mask') { - sigaddset(&handled_set, code); - } else { - sigdelset(&handled_set, code); - } - pthread_sigmask(SIG_SETMASK, &handled_set, NULL); - return ECL_T; - } + /* When a process object is supplied, the changes take care + * on the process structure and will only take effect when + * the process is enabled. */ + if (ecl_t_of(process) == t_process) { + cl_env_ptr env = process->process.env; + sigset_t *handled_set = (sigset_t *)env->default_sigmask; + if (action == @':mask') { + sigaddset(handled_set, code); + } else { + sigdelset(handled_set, code); + } + return ECL_T; + } else { + sigset_t handled_set; + pthread_sigmask(SIG_SETMASK, NULL, &handled_set); + if (action == @':mask') { + sigaddset(&handled_set, code); + } else { + sigdelset(&handled_set, code); + } + pthread_sigmask(SIG_SETMASK, &handled_set, NULL); + return ECL_T; + } # else - { - sigset_t handled_set; - sigprocmask(SIG_SETMASK, NULL, &handled_set); - if (action == @':mask') { - sigaddset(&handled_set, code); - } else { - sigdelset(&handled_set, code); - } - sigprocmask(SIG_SETMASK, &handled_set, NULL); - return ECL_T; - } + { + sigset_t handled_set; + sigprocmask(SIG_SETMASK, NULL, &handled_set); + if (action == @':mask') { + sigaddset(&handled_set, code); + } else { + sigdelset(&handled_set, code); + } + sigprocmask(SIG_SETMASK, &handled_set, NULL); + return ECL_T; + } # endif /* !ECL_THREADS */ #else /* !HAVE_SIGPROCMASK */ - return ECL_NIL; + return ECL_NIL; #endif /* !HAVE_SIGPROCMASK */ - } else if (action == ECL_T || action == @':catch') { - if (code == SIGSEGV) { - mysignal(code, sigsegv_handler); - } + } else if (action == ECL_T || action == @':catch') { + if (code == SIGSEGV) { + mysignal(code, sigsegv_handler); + } #ifdef SIGBUS - else if (code == SIGBUS) { - mysignal(code, sigsegv_handler); - } + else if (code == SIGBUS) { + mysignal(code, sigsegv_handler); + } #endif #ifdef SIGILL - else if (code == SIGILL) { - mysignal(SIGILL, evil_signal_handler); - } + else if (code == SIGILL) { + mysignal(SIGILL, evil_signal_handler); + } #endif - else { - mysignal(code, non_evil_signal_handler); - } - return ECL_T; - } else { - FEerror("Unknown 2nd argument to EXT:CATCH-SIGNAL: ~A", 1, - action); - } + else { + mysignal(code, non_evil_signal_handler); + } + return ECL_T; + } else { + FEerror("Unknown 2nd argument to EXT:CATCH-SIGNAL: ~A", 1, + action); + } } cl_object si_get_signal_handler(cl_object code) { - cl_object handler = ecl_gethash_safe(code, cl_core.known_signals, OBJNULL); - unlikely_if (handler == OBJNULL) { - illegal_signal_code(code); - } - @(return handler) + const cl_env_ptr the_env = ecl_process_env(); + cl_object handler = ecl_gethash_safe(code, cl_core.known_signals, OBJNULL); + unlikely_if (handler == OBJNULL) { + illegal_signal_code(code); + } + ecl_return0(the_env); } cl_object si_set_signal_handler(cl_object code, cl_object handler) { - cl_object action = ecl_gethash_safe(code, cl_core.known_signals, OBJNULL); - unlikely_if (action == OBJNULL) { - illegal_signal_code(code); - } - ecl_sethash(code, cl_core.known_signals, handler); - si_catch_signal(2, code, ECL_T); - @(return handler) + const cl_env_ptr the_env = ecl_process_env(); + cl_object action = ecl_gethash_safe(code, cl_core.known_signals, OBJNULL); + unlikely_if (action == OBJNULL) { + illegal_signal_code(code); + } + ecl_sethash(code, cl_core.known_signals, handler); + si_catch_signal(2, code, ECL_T); + ecl_return0(the_env); } @(defun ext::catch-signal (code flag &key process) -@ -{ - int code_int; - unlikely_if (ecl_gethash_safe(code, cl_core.known_signals, OBJNULL) == OBJNULL) { - illegal_signal_code(code); - } - code_int = ecl_fixnum(code); + @ + { + const cl_env_ptr the_env = ecl_process_env(); + int code_int; + unlikely_if (ecl_gethash_safe(code, cl_core.known_signals, OBJNULL) == OBJNULL) { + illegal_signal_code(code); + } + code_int = ecl_fixnum(code); #ifdef GBC_BOEHM # ifdef SIGSEGV - unlikely_if ((code == ecl_make_fixnum(SIGSEGV)) && - ecl_option_values[ECL_OPT_INCREMENTAL_GC]) - FEerror("It is not allowed to change the behavior of SIGSEGV.", - 0); + unlikely_if ((code == ecl_make_fixnum(SIGSEGV)) && + ecl_option_values[ECL_OPT_INCREMENTAL_GC]) + FEerror("It is not allowed to change the behavior of SIGSEGV.", + 0); # endif # ifdef SIGBUS - unlikely_if (code_int == SIGBUS) - FEerror("It is not allowed to change the behavior of SIGBUS.", - 0); + unlikely_if (code_int == SIGBUS) + FEerror("It is not allowed to change the behavior of SIGBUS.", + 0); # endif #endif #if defined(ECL_THREADS) && !defined(ECL_MS_WINDOWS_HOST) - unlikely_if (code_int == ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]) { - FEerror("It is not allowed to change the behavior of signal ~D", 1, - code); - } + unlikely_if (code_int == ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]) { + FEerror("It is not allowed to change the behavior of signal ~D", 1, + code); + } #endif #ifdef SIGFPE - unlikely_if (code_int == SIGFPE) { - FEerror("The signal handler for SIGPFE cannot be uninstalled. Use SI:TRAP-FPE instead.", 0); - } + unlikely_if (code_int == SIGFPE) { + FEerror("The signal handler for SIGPFE cannot be uninstalled. Use SI:TRAP-FPE instead.", 0); + } #endif - @(return do_catch_signal(code_int, flag, process)); -} + ecl_return1(the_env, do_catch_signal(code_int, flag, process)); + } @) #ifdef ECL_THREADS @@ -1021,9 +1022,9 @@ si_set_signal_handler(cl_object code, cl_object handler) static VOID CALLBACK wakeup_function(ULONG_PTR foo) { - cl_env_ptr env = ecl_process_env(); - volatile i = env->nvalues; - env->nvalues = i; + cl_env_ptr env = ecl_process_env(); + volatile i = env->nvalues; + env->nvalues = i; } static VOID CALLBACK @@ -1039,93 +1040,93 @@ do_interrupt_thread(cl_object process) # ifndef ECL_USE_GUARD_PAGE # error "Cannot implement ecl_interrupt_process without guard pages" # endif - HANDLE thread = process->process.thread; - CONTEXT context; - void *trap_address = process->process.env; - DWORD guard = PAGE_GUARD | PAGE_READWRITE; - int ok = 1; - if (SuspendThread(thread) == (DWORD)-1) { - FEwin32_error("Unable to suspend thread ~A", 1, - process); - ok = 0; - goto EXIT; - } - process->process.interrupt = ECL_T; - if (!VirtualProtect(process->process.env, - sizeof(struct cl_env_struct), - guard, - &guard)) - { - FEwin32_error("Unable to protect memory from thread ~A", - 1, process); - ok = 0; - } + HANDLE thread = process->process.thread; + CONTEXT context; + void *trap_address = process->process.env; + DWORD guard = PAGE_GUARD | PAGE_READWRITE; + int ok = 1; + if (SuspendThread(thread) == (DWORD)-1) { + FEwin32_error("Unable to suspend thread ~A", 1, + process); + ok = 0; + goto EXIT; + } + process->process.interrupt = ECL_T; + if (!VirtualProtect(process->process.env, + sizeof(struct cl_env_struct), + guard, + &guard)) + { + FEwin32_error("Unable to protect memory from thread ~A", + 1, process); + ok = 0; + } RESUME: - if (!QueueUserAPC(wakeup_function, thread, 0)) { - FEwin32_error("Unable to queue APC call to thread ~A", - 1, process); - ok = 0; - } - if (ResumeThread(thread) == (DWORD)-1) { - FEwin32_error("Unable to resume thread ~A", 1, - process); - ok = 0; - goto EXIT; - } + if (!QueueUserAPC(wakeup_function, thread, 0)) { + FEwin32_error("Unable to queue APC call to thread ~A", + 1, process); + ok = 0; + } + if (ResumeThread(thread) == (DWORD)-1) { + FEwin32_error("Unable to resume thread ~A", 1, + process); + ok = 0; + goto EXIT; + } EXIT: - return ok; + return ok; # else - int signal = ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; - if (pthread_kill(process->process.thread, signal)) { - FElibc_error("Unable to interrupt process ~A", 1, - process); - } - return 1; + int signal = ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; + if (pthread_kill(process->process.thread, signal)) { + FElibc_error("Unable to interrupt process ~A", 1, + process); + } + return 1; # endif } void ecl_interrupt_process(cl_object process, cl_object function) { - /* - * We first ensure that the process is active and running - * and past the initialization phase, where it has set up - * the environment. Then: - * - In Windows it sets up a trap in the stack, so that the - * uncaught exception handler can catch it and process it. - * - In POSIX systems it sends a user level interrupt to - * the thread, which then decides how to act. - * - * If FUNCTION is NIL, we just intend to wake up the process - * from some call to ecl_musleep() Queue the interrupt for any - * process stage that can potentially receive a signal */ - if (!Null(function) && - (process->process.phase >= ECL_PROCESS_BOOTING)) - { - cl_env_ptr the_env = ecl_process_env(); - function = si_coerce_to_function(function); - /* queue_signal must be called with disabled - * interrupts for the current process */ - ecl_disable_interrupts_env(the_env); - queue_signal(process->process.env, function, 1); - ecl_enable_interrupts_env(the_env); - } - /* ... but only deliver if the process is still alive */ - if (process->process.phase == ECL_PROCESS_ACTIVE) - do_interrupt_thread(process); + /* + * We first ensure that the process is active and running + * and past the initialization phase, where it has set up + * the environment. Then: + * - In Windows it sets up a trap in the stack, so that the + * uncaught exception handler can catch it and process it. + * - In POSIX systems it sends a user level interrupt to + * the thread, which then decides how to act. + * + * If FUNCTION is NIL, we just intend to wake up the process + * from some call to ecl_musleep() Queue the interrupt for any + * process stage that can potentially receive a signal */ + if (!Null(function) && + (process->process.phase >= ECL_PROCESS_BOOTING)) + { + cl_env_ptr the_env = ecl_process_env(); + function = si_coerce_to_function(function); + /* queue_signal must be called with disabled + * interrupts for the current process */ + ecl_disable_interrupts_env(the_env); + queue_signal(process->process.env, function, 1); + ecl_enable_interrupts_env(the_env); + } + /* ... but only deliver if the process is still alive */ + if (process->process.phase == ECL_PROCESS_ACTIVE) + do_interrupt_thread(process); } void ecl_wakeup_process(cl_object process) { # ifdef ECL_WINDOWS_THREADS - HANDLE thread = process->process.thread; - if (!QueueUserAPC(wakeup_noop, thread, 0)) { - FEwin32_error("Unable to queue APC call to thread ~A", - 1, process); - } + HANDLE thread = process->process.thread; + if (!QueueUserAPC(wakeup_noop, thread, 0)) { + FEwin32_error("Unable to queue APC call to thread ~A", + 1, process); + } # else - do_interrupt_thread(process); + do_interrupt_thread(process); # endif } #endif /* ECL_THREADS */ @@ -1136,154 +1137,154 @@ static LPTOP_LEVEL_EXCEPTION_FILTER old_W32_exception_filter = NULL; LONG WINAPI _ecl_w32_exception_filter(struct _EXCEPTION_POINTERS* ep) { - LONG excpt_result; - cl_env_ptr the_env = ecl_process_env(); + LONG excpt_result; + cl_env_ptr the_env = ecl_process_env(); - excpt_result = EXCEPTION_CONTINUE_EXECUTION; - switch (ep->ExceptionRecord->ExceptionCode) - { - /* Access to guard page */ - case STATUS_GUARD_PAGE_VIOLATION: { - cl_object process = the_env->own_process; - if (!Null(process->process.interrupt)) { - process->process.interrupt = ECL_NIL; - handle_all_queued_interrupt_safe(the_env); - } - return EXCEPTION_CONTINUE_EXECUTION; - } - /* Catch all arithmetic exceptions */ - case EXCEPTION_INT_DIVIDE_BY_ZERO: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'division-by-zero'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_INT_OVERFLOW: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'arithmetic-error'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_DIVIDE_BY_ZERO: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'floating-point-overflow'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_OVERFLOW: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'floating-point-overflow'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_UNDERFLOW: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'floating-point-underflow'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_INEXACT_RESULT: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'floating-point-inexact'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_DENORMAL_OPERAND: - case EXCEPTION_FLT_INVALID_OPERATION: - feclearexcept(FE_ALL_EXCEPT); - handle_signal_now(@'floating-point-invalid-operation'); - return EXCEPTION_CONTINUE_EXECUTION; - case EXCEPTION_FLT_STACK_CHECK: - handle_signal_now(@'arithmetic-error'); - return EXCEPTION_CONTINUE_EXECUTION; - /* Catch segmentation fault */ - case EXCEPTION_ACCESS_VIOLATION: - handle_signal_now(@'ext::segmentation-violation'); - return EXCEPTION_CONTINUE_EXECUTION; - /* Catch illegal instruction */ - case EXCEPTION_ILLEGAL_INSTRUCTION: - handle_signal_now(@'ext::illegal-instruction'); - return EXCEPTION_CONTINUE_EXECUTION; - /* Do not catch anything else */ - default: - excpt_result = EXCEPTION_CONTINUE_SEARCH; - break; - } - if (old_W32_exception_filter) - return old_W32_exception_filter(ep); - return excpt_result; + excpt_result = EXCEPTION_CONTINUE_EXECUTION; + switch (ep->ExceptionRecord->ExceptionCode) + { + /* Access to guard page */ + case STATUS_GUARD_PAGE_VIOLATION: { + cl_object process = the_env->own_process; + if (!Null(process->process.interrupt)) { + process->process.interrupt = ECL_NIL; + handle_all_queued_interrupt_safe(the_env); + } + return EXCEPTION_CONTINUE_EXECUTION; + } + /* Catch all arithmetic exceptions */ + case EXCEPTION_INT_DIVIDE_BY_ZERO: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'division-by-zero'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_INT_OVERFLOW: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'arithmetic-error'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_DIVIDE_BY_ZERO: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'floating-point-overflow'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_OVERFLOW: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'floating-point-overflow'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_UNDERFLOW: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'floating-point-underflow'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_INEXACT_RESULT: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'floating-point-inexact'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_DENORMAL_OPERAND: + case EXCEPTION_FLT_INVALID_OPERATION: + feclearexcept(FE_ALL_EXCEPT); + handle_signal_now(@'floating-point-invalid-operation'); + return EXCEPTION_CONTINUE_EXECUTION; + case EXCEPTION_FLT_STACK_CHECK: + handle_signal_now(@'arithmetic-error'); + return EXCEPTION_CONTINUE_EXECUTION; + /* Catch segmentation fault */ + case EXCEPTION_ACCESS_VIOLATION: + handle_signal_now(@'ext::segmentation-violation'); + return EXCEPTION_CONTINUE_EXECUTION; + /* Catch illegal instruction */ + case EXCEPTION_ILLEGAL_INSTRUCTION: + handle_signal_now(@'ext::illegal-instruction'); + return EXCEPTION_CONTINUE_EXECUTION; + /* Do not catch anything else */ + default: + excpt_result = EXCEPTION_CONTINUE_SEARCH; + break; + } + if (old_W32_exception_filter) + return old_W32_exception_filter(ep); + return excpt_result; } static cl_object W32_handle_in_new_thread(cl_object signal_code) { - int outside_ecl = ecl_import_current_thread(@'si::handle-signal', ECL_NIL); - mp_process_run_function(3, @'si::handle-signal', - @'si::handle-signal', - signal_code); - if (outside_ecl) ecl_release_current_thread(); + int outside_ecl = ecl_import_current_thread(@'si::handle-signal', ECL_NIL); + mp_process_run_function(3, @'si::handle-signal', + @'si::handle-signal', + signal_code); + if (outside_ecl) ecl_release_current_thread(); } BOOL WINAPI W32_console_ctrl_handler(DWORD type) { - switch (type) { - case CTRL_C_EVENT: - case CTRL_BREAK_EVENT: { - cl_object function = - ECL_SYM_FUN(@'si::terminal-interrupt'); - if (function) - W32_handle_in_new_thread(function); - return TRUE; - } - case CTRL_CLOSE_EVENT: - case CTRL_LOGOFF_EVENT: - case CTRL_SHUTDOWN_EVENT: { - cl_object function = - ECL_SYM_FUN(@'ext::quit'); - if (function) - W32_handle_in_new_thread(function); - return TRUE; - } - default: - return FALSE; - } + switch (type) { + case CTRL_C_EVENT: + case CTRL_BREAK_EVENT: { + cl_object function = + ECL_SYM_FUN(@'si::terminal-interrupt'); + if (function) + W32_handle_in_new_thread(function); + return TRUE; + } + case CTRL_CLOSE_EVENT: + case CTRL_LOGOFF_EVENT: + case CTRL_SHUTDOWN_EVENT: { + cl_object function = + ECL_SYM_FUN(@'ext::quit'); + if (function) + W32_handle_in_new_thread(function); + return TRUE; + } + default: + return FALSE; + } } #endif /* ECL_WINDOWS_THREADS */ cl_object si_trap_fpe(cl_object condition, cl_object flag) { - cl_env_ptr the_env = ecl_process_env(); - const int all = FE_ALL_EXCEPT; - int bits = 0; - if (condition == @'last') { - bits = the_env->trap_fpe_bits; - } else { - if (condition == ECL_T) - bits = FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID; - else if (condition == @'division-by-zero') - bits = FE_DIVBYZERO; - else if (condition == @'floating-point-overflow') - bits = FE_OVERFLOW; - else if (condition == @'floating-point-underflow') - bits = FE_UNDERFLOW; - else if (condition == @'floating-point-invalid-operation') - bits = FE_INVALID; - else if (condition == @'floating-point-inexact') - bits = FE_INEXACT; - else if (ECL_FIXNUMP(condition)) - bits = ecl_fixnum(condition) & all; - else - FEerror("Unknown condition to EXT:TRAP-FPE: ~s", 1, condition); + cl_env_ptr the_env = ecl_process_env(); + const int all = FE_ALL_EXCEPT; + int bits = 0; + if (condition == @'last') { + bits = the_env->trap_fpe_bits; + } else { + if (condition == ECL_T) + bits = FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID; + else if (condition == @'division-by-zero') + bits = FE_DIVBYZERO; + else if (condition == @'floating-point-overflow') + bits = FE_OVERFLOW; + else if (condition == @'floating-point-underflow') + bits = FE_UNDERFLOW; + else if (condition == @'floating-point-invalid-operation') + bits = FE_INVALID; + else if (condition == @'floating-point-inexact') + bits = FE_INEXACT; + else if (ECL_FIXNUMP(condition)) + bits = ecl_fixnum(condition) & all; + else + FEerror("Unknown condition to EXT:TRAP-FPE: ~s", 1, condition); - if (flag == ECL_NIL) { - bits = the_env->trap_fpe_bits & ~bits; - } else { - bits = the_env->trap_fpe_bits | bits; - } - } + if (flag == ECL_NIL) { + bits = the_env->trap_fpe_bits & ~bits; + } else { + bits = the_env->trap_fpe_bits | bits; + } + } #if !defined(ECL_AVOID_FPE_H) # ifdef HAVE_FENV_H - feclearexcept(all); + feclearexcept(all); # endif # if defined(ECL_MS_WINDOWS_HOST) - _fpreset(); + _fpreset(); # endif # ifdef HAVE_FEENABLEEXCEPT - fedisableexcept(all & ~bits); - feenableexcept(all & bits); + fedisableexcept(all & ~bits); + feenableexcept(all & bits); # endif #endif - the_env->trap_fpe_bits = bits; - @(return ecl_make_fixnum(bits)) + the_env->trap_fpe_bits = bits; + ecl_return1(the_env, ecl_make_fixnum(bits)); } /* @@ -1299,47 +1300,47 @@ install_asynchronous_signal_handlers() # define async_handler(signal,handler,mask) #else # if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK) -# define async_handler(signal,handler,mask) { \ - if (ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]) { \ - mysignal(signal, deferred_signal_handler); \ - } else { \ - mysignal(signal,handler); \ - }} +# define async_handler(signal,handler,mask) { \ + if (ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]) { \ + mysignal(signal, deferred_signal_handler); \ + } else { \ + mysignal(signal,handler); \ + }} # else # define async_handler(signal,handler,mask) \ - mysignal(signal,handler) + mysignal(signal,handler) # endif #endif #ifdef HAVE_SIGPROCMASK - sigset_t *sigmask = cl_core.default_sigmask = &main_thread_sigmask; - cl_core.default_sigmask_bytes = sizeof(sigset_t); + sigset_t *sigmask = cl_core.default_sigmask = &main_thread_sigmask; + cl_core.default_sigmask_bytes = sizeof(sigset_t); # ifdef ECL_THREADS - pthread_sigmask(SIG_SETMASK, NULL, sigmask); + pthread_sigmask(SIG_SETMASK, NULL, sigmask); # else - sigprocmask(SIG_SETMASK, NULL, sigmask); + sigprocmask(SIG_SETMASK, NULL, sigmask); # endif #endif #if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK) - ecl_mutex_init(&signal_thread_lock, TRUE); + ecl_mutex_init(&signal_thread_lock, TRUE); #endif #ifdef SIGINT - if (ecl_option_values[ECL_OPT_TRAP_SIGINT]) { - async_handler(SIGINT, non_evil_signal_handler, sigmask); - } + if (ecl_option_values[ECL_OPT_TRAP_SIGINT]) { + async_handler(SIGINT, non_evil_signal_handler, sigmask); + } #endif #ifdef HAVE_SIGPROCMASK # if defined(ECL_THREADS) - pthread_sigmask(SIG_SETMASK, sigmask, NULL); + pthread_sigmask(SIG_SETMASK, sigmask, NULL); # else - sigprocmask(SIG_SETMASK, sigmask, NULL); + sigprocmask(SIG_SETMASK, sigmask, NULL); # endif #endif #ifdef ECL_WINDOWS_THREADS - old_W32_exception_filter = - SetUnhandledExceptionFilter(_ecl_w32_exception_filter); - if (ecl_option_values[ECL_OPT_TRAP_SIGINT]) { - SetConsoleCtrlHandler(W32_console_ctrl_handler, TRUE); - } + old_W32_exception_filter = + SetUnhandledExceptionFilter(_ecl_w32_exception_filter); + if (ecl_option_values[ECL_OPT_TRAP_SIGINT]) { + SetConsoleCtrlHandler(W32_console_ctrl_handler, TRUE); + } #endif #undef async_handler } @@ -1352,24 +1353,24 @@ static void install_signal_handling_thread() { #if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK) - ecl_process_env()->default_sigmask = &main_thread_sigmask; - if (ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]) { - cl_object fun = - ecl_make_cfun((cl_objectfn_fixed) - asynchronous_signal_servicing_thread, - @'si::signal-servicing', - ECL_NIL, - 0); - cl_object process = - signal_thread_process = - mp_process_run_function_wait(2, - @'si::signal-servicing', - fun); - if (Null(process)) { - ecl_internal_error("Unable to create signal " - "servicing thread"); - } - } + ecl_process_env()->default_sigmask = &main_thread_sigmask; + if (ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]) { + cl_object fun = + ecl_make_cfun((cl_objectfn_fixed) + asynchronous_signal_servicing_thread, + @'si::signal-servicing', + ECL_NIL, + 0); + cl_object process = + signal_thread_process = + mp_process_run_function_wait(2, + @'si::signal-servicing', + fun); + if (Null(process)) { + ecl_internal_error("Unable to create signal " + "servicing thread"); + } + } #endif } @@ -1382,48 +1383,48 @@ static void install_synchronous_signal_handlers() { #ifdef SIGBUS - if (ecl_option_values[ECL_OPT_TRAP_SIGBUS]) { - do_catch_signal(SIGBUS, ECL_T, ECL_NIL); - } + if (ecl_option_values[ECL_OPT_TRAP_SIGBUS]) { + do_catch_signal(SIGBUS, ECL_T, ECL_NIL); + } #endif #ifdef SIGSEGV - if (ecl_option_values[ECL_OPT_TRAP_SIGSEGV]) { - do_catch_signal(SIGSEGV, ECL_T, ECL_NIL); - } + if (ecl_option_values[ECL_OPT_TRAP_SIGSEGV]) { + do_catch_signal(SIGSEGV, ECL_T, ECL_NIL); + } #endif #ifdef SIGPIPE - if (ecl_option_values[ECL_OPT_TRAP_SIGPIPE]) { - do_catch_signal(SIGPIPE, ECL_T, ECL_NIL); - } + if (ecl_option_values[ECL_OPT_TRAP_SIGPIPE]) { + do_catch_signal(SIGPIPE, ECL_T, ECL_NIL); + } #endif #ifdef SIGILL - if (ecl_option_values[ECL_OPT_TRAP_SIGILL]) { - do_catch_signal(SIGILL, ECL_T, ECL_NIL); - } + if (ecl_option_values[ECL_OPT_TRAP_SIGILL]) { + do_catch_signal(SIGILL, ECL_T, ECL_NIL); + } #endif - /* In order to implement MP:INTERRUPT-PROCESS, MP:PROCESS-KILL - * and the like, we use signals. This sets up a synchronous - * signal handler for that particular signal. - */ + /* In order to implement MP:INTERRUPT-PROCESS, MP:PROCESS-KILL + * and the like, we use signals. This sets up a synchronous + * signal handler for that particular signal. + */ #ifdef SIGRTMIN # define DEFAULT_THREAD_INTERRUPT_SIGNAL SIGRTMIN + 2 #else # define DEFAULT_THREAD_INTERRUPT_SIGNAL SIGUSR1 #endif #if defined(ECL_THREADS) && !defined(ECL_MS_WINDOWS_HOST) - if (ecl_option_values[ECL_OPT_TRAP_INTERRUPT_SIGNAL]) { - int signal = ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; - if (signal == 0) { - signal = DEFAULT_THREAD_INTERRUPT_SIGNAL; - ecl_set_option(ECL_OPT_THREAD_INTERRUPT_SIGNAL, - signal); - } - mysignal(signal, process_interrupt_handler); + if (ecl_option_values[ECL_OPT_TRAP_INTERRUPT_SIGNAL]) { + int signal = ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL]; + if (signal == 0) { + signal = DEFAULT_THREAD_INTERRUPT_SIGNAL; + ecl_set_option(ECL_OPT_THREAD_INTERRUPT_SIGNAL, + signal); + } + mysignal(signal, process_interrupt_handler); #ifdef HAVE_SIGPROCMASK - sigdelset(&main_thread_sigmask, signal); - pthread_sigmask(SIG_SETMASK, &main_thread_sigmask, NULL); + sigdelset(&main_thread_sigmask, signal); + pthread_sigmask(SIG_SETMASK, &main_thread_sigmask, NULL); #endif - } + } #endif } @@ -1436,21 +1437,21 @@ static void install_fpe_signal_handlers() { #ifdef SIGFPE - if (ecl_option_values[ECL_OPT_TRAP_SIGFPE]) { - mysignal(SIGFPE, fpe_signal_handler); - si_trap_fpe(ECL_T, ECL_T); + if (ecl_option_values[ECL_OPT_TRAP_SIGFPE]) { + mysignal(SIGFPE, fpe_signal_handler); + si_trap_fpe(ECL_T, ECL_T); - /* Don't trap underflows */ - si_trap_fpe(@'floating-point-underflow', ECL_NIL); + /* Don't trap underflows */ + si_trap_fpe(@'floating-point-underflow', ECL_NIL); -/* # if defined(ECL_IEEE_FP) */ -/* /\* By default deactivate errors and accept denormals */ -/* * in floating point computations. *\/ */ -/* si_trap_fpe(@'floating-point-invalid-operation', ECL_NIL); */ -/* si_trap_fpe(@'division-by-zero', ECL_NIL); */ -/* si_trap_fpe(@'floating-point-overflow', ECL_NIL); */ -/* # endif */ - } + # if 0 && defined(ECL_IEEE_FP) + /* By default deactivate errors and accept denormals + * in floating point computations. */ + si_trap_fpe(@'floating-point-invalid-operation', ECL_NIL); + si_trap_fpe(@'division-by-zero', ECL_NIL); + si_trap_fpe(@'floating-point-overflow', ECL_NIL); + # endif + } #endif } @@ -1461,58 +1462,58 @@ install_fpe_signal_handlers() static void add_one_signal(cl_object hash_table, int signal, cl_object name, cl_object handler) { - cl_object code = ecl_make_fixnum(signal); - cl_export2(name, cl_core.ext_package); - si_Xmake_constant(name, code); - ecl_sethash(code, hash_table, handler); + cl_object code = ecl_make_fixnum(signal); + cl_export2(name, cl_core.ext_package); + si_Xmake_constant(name, code); + ecl_sethash(code, hash_table, handler); } static void create_signal_code_constants() { - cl_object hash = - cl_core.known_signals = - cl__make_hash_table(@'eql', ecl_make_fixnum(128), - cl_core.rehash_size, - cl_core.rehash_threshold); - int i; - for (i = 0; known_signals[i].code >= 0; i++) { - add_one_signal(hash, known_signals[i].code, - _ecl_intern(known_signals[i].name, - cl_core.ext_package), - known_signals[i].handler); - } + cl_object hash = + cl_core.known_signals = + cl__make_hash_table(@'eql', ecl_make_fixnum(128), + cl_core.rehash_size, + cl_core.rehash_threshold); + int i; + for (i = 0; known_signals[i].code >= 0; i++) { + add_one_signal(hash, known_signals[i].code, + _ecl_intern(known_signals[i].name, + cl_core.ext_package), + known_signals[i].handler); + } #ifdef SIGRTMIN - for (i = SIGRTMIN; i <= SIGRTMAX; i++) { - int intern_flag[1]; - char buffer[64]; - cl_object name; - sprintf(buffer, "+SIGRT%d+", i-SIGRTMIN); - name = ecl_intern(ecl_make_simple_base_string(buffer,-1), - cl_core.ext_package, - intern_flag); - add_one_signal(hash, i, name, ECL_NIL); - } - add_one_signal(hash, SIGRTMIN, - _ecl_intern("+SIGRTMIN+", cl_core.ext_package), - ECL_NIL); - add_one_signal(hash, SIGRTMAX, - _ecl_intern("+SIGRTMAX+", cl_core.ext_package), - ECL_NIL); + for (i = SIGRTMIN; i <= SIGRTMAX; i++) { + int intern_flag[1]; + char buffer[64]; + cl_object name; + sprintf(buffer, "+SIGRT%d+", i-SIGRTMIN); + name = ecl_intern(ecl_make_simple_base_string(buffer,-1), + cl_core.ext_package, + intern_flag); + add_one_signal(hash, i, name, ECL_NIL); + } + add_one_signal(hash, SIGRTMIN, + _ecl_intern("+SIGRTMIN+", cl_core.ext_package), + ECL_NIL); + add_one_signal(hash, SIGRTMAX, + _ecl_intern("+SIGRTMAX+", cl_core.ext_package), + ECL_NIL); #endif } void init_unixint(int pass) { - if (pass == 0) { - install_asynchronous_signal_handlers(); - install_synchronous_signal_handlers(); - } else { - create_signal_code_constants(); - install_fpe_signal_handlers(); - install_signal_handling_thread(); - ECL_SET(@'ext::*interrupts-enabled*', ECL_T); - ecl_process_env()->disable_interrupts = 0; - } + if (pass == 0) { + install_asynchronous_signal_handlers(); + install_synchronous_signal_handlers(); + } else { + create_signal_code_constants(); + install_fpe_signal_handlers(); + install_signal_handling_thread(); + ECL_SET(@'ext::*interrupts-enabled*', ECL_T); + ecl_process_env()->disable_interrupts = 0; + } } From d626f591d04f610503ab1e37fa677a5ca8e8839f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 19 Sep 2023 11:49:20 +0200 Subject: [PATCH 04/40] build: move HAVE_POSIX_RWLOCK to exported config This is b ecause we use this flag to decide whether the rwlock is implemented from posix or whether we use our own structure. That influences the size and offsets in cl_core. Without this commit using (defun known-signals () (ffi:c-inline nil nil :object "cl_core.known_signals" :one-liner t :side-effects nil)) While HAVE_POSIX_RWLOCK was true during the build returns garbage. The same applies to other members after the processes group. --- src/h/config-internal.h.in | 2 -- src/h/config.h.in | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/h/config-internal.h.in b/src/h/config-internal.h.in index f8196eca6..7a6228fb9 100644 --- a/src/h/config-internal.h.in +++ b/src/h/config-internal.h.in @@ -131,8 +131,6 @@ #undef HAVE_SCHED_YIELD /* whether we have a working sem_init() */ #undef HAVE_SEM_INIT -/* whether we have read/write locks */ -#undef HAVE_POSIX_RWLOCK /* whether we have mutex lock operations with timeout */ #undef HAVE_PTHREAD_MUTEX_TIMEDLOCK /* whether we can set the clock for timed waits on condition variables */ diff --git a/src/h/config.h.in b/src/h/config.h.in index 2ee7f42e9..dc554fe7c 100644 --- a/src/h/config.h.in +++ b/src/h/config.h.in @@ -235,6 +235,9 @@ typedef unsigned char ecl_base_char; /* wide-strings are available */ #undef HAVE_WCHAR_H +/* whether we have read/write locks */ +#undef HAVE_POSIX_RWLOCK + /* * C macros for inlining, denoting probable code paths and other stuff * that makes better code. Most of it is GCC specific. From 580fe0f092d827a407e5255a9df5327c7a07dfdc Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 20 Sep 2023 18:27:37 +0000 Subject: [PATCH 05/40] Fix access to environ on Darwin --- src/c/main.d | 77 ------------------------------------------------- src/c/unixsys.d | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 77 deletions(-) diff --git a/src/c/main.d b/src/c/main.d index fbaae6674..84b797453 100644 --- a/src/c/main.d +++ b/src/c/main.d @@ -840,83 +840,6 @@ si_argv(cl_object index) FEerror("Illegal argument index: ~S.", 1, index); } -cl_object -si_getenv(cl_object var) -{ - const char *value; - - /* Strings have to be null terminated base strings */ - var = si_copy_to_simple_base_string(var); - value = getenv((char*)var->base_string.self); - @(return ((value == NULL)? ECL_NIL : ecl_make_simple_base_string(value,-1))); -} - -#if defined(HAVE_SETENV) || defined(HAVE_PUTENV) -cl_object -si_setenv(cl_object var, cl_object value) -{ - const cl_env_ptr the_env = ecl_process_env(); - cl_fixnum ret_val; - - /* Strings have to be null terminated base strings */ - var = si_copy_to_simple_base_string(var); - if (value == ECL_NIL) { -#ifdef HAVE_SETENV - /* Remove the variable when setting to nil, so that - * (si:setenv "foo" nil), then (si:getenv "foo) returns - * the right thing. */ - unsetenv((char*)var->base_string.self); -#else -#if defined(ECL_MS_WINDOWS_HOST) - si_setenv(var, cl_core.null_string); -#else - putenv((char*)var->base_string.self); -#endif -#endif - ret_val = 0; - } else { -#ifdef HAVE_SETENV - value = si_copy_to_simple_base_string(value); - ret_val = setenv((char*)var->base_string.self, - (char*)value->base_string.self, 1); -#else - value = cl_format(4, ECL_NIL, @"~A=~A", var, - value); - value = si_copy_to_simple_base_string(value); - putenv((char*)value->base_string.self); -#endif - } - if (ret_val == -1) - CEerror(ECL_T, "SI:SETENV failed: insufficient space in environment.", - 1, ECL_NIL); - ecl_return1(the_env, value); -} -#endif - -cl_object -si_environ(void) -{ - cl_object output = ECL_NIL; -#ifdef HAVE_ENVIRON - char **p; - extern char **environ; - for (p = environ; *p; p++) { - output = CONS(ecl_make_constant_base_string(*p,-1), output); - } - output = cl_nreverse(output); -#else -# if defined(ECL_MS_WINDOWS_HOST) - LPTCH p; - for (p = GetEnvironmentStrings(); *p; ) { - output = CONS(ecl_make_constant_base_string(p,-1), output); - do { (void)0; } while (*(p++)); - } - output = cl_nreverse(output); -# endif -#endif /* HAVE_ENVIRON */ - @(return output); -} - cl_object si_pointer(cl_object x) { diff --git a/src/c/unixsys.d b/src/c/unixsys.d index 89ad5493b..32eae16c0 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -57,6 +57,82 @@ si_system(cl_object cmd_string) #endif } +cl_object +si_getenv(cl_object var) +{ + const char *value; + + /* Strings have to be null terminated base strings */ + var = si_copy_to_simple_base_string(var); + value = getenv((char*)var->base_string.self); + @(return ((value == NULL)? ECL_NIL : ecl_make_simple_base_string(value,-1))); +} + +#if defined(HAVE_SETENV) || defined(HAVE_PUTENV) +cl_object +si_setenv(cl_object var, cl_object value) +{ + const cl_env_ptr the_env = ecl_process_env(); + cl_fixnum ret_val; + + /* Strings have to be null terminated base strings */ + var = si_copy_to_simple_base_string(var); + if (value == ECL_NIL) { +#ifdef HAVE_SETENV + /* Remove the variable when setting to nil, so that + * (si:setenv "foo" nil), then (si:getenv "foo) returns + * the right thing. */ + unsetenv((char*)var->base_string.self); +#else +#if defined(ECL_MS_WINDOWS_HOST) + si_setenv(var, cl_core.null_string); +#else + putenv((char*)var->base_string.self); +#endif +#endif + ret_val = 0; + } else { +#ifdef HAVE_SETENV + value = si_copy_to_simple_base_string(value); + ret_val = setenv((char*)var->base_string.self, + (char*)value->base_string.self, 1); +#else + value = cl_format(4, ECL_NIL, @"~A=~A", var, + value); + value = si_copy_to_simple_base_string(value); + putenv((char*)value->base_string.self); +#endif + } + if (ret_val == -1) + CEerror(ECL_T, "SI:SETENV failed: insufficient space in environment.", + 1, ECL_NIL); + ecl_return1(the_env, value); +} +#endif + +cl_object +si_environ(void) +{ + cl_object output = ECL_NIL; +#ifdef HAVE_ENVIRON + char **p; + for (p = environ; *p; p++) { + output = CONS(ecl_make_constant_base_string(*p,-1), output); + } + output = cl_nreverse(output); +#else +# if defined(ECL_MS_WINDOWS_HOST) + LPTCH p; + for (p = GetEnvironmentStrings(); *p; ) { + output = CONS(ecl_make_constant_base_string(p,-1), output); + do { (void)0; } while (*(p++)); + } + output = cl_nreverse(output); +# endif +#endif /* HAVE_ENVIRON */ + @(return output); +} + cl_object si_getpid(void) { From 660538a84325b8047cd240fecc50c4670d4d6b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 19 Sep 2023 22:41:42 +0200 Subject: [PATCH 06/40] cosmetic: fix indent --- src/c/unixint.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c/unixint.d b/src/c/unixint.d index 2248fa0d3..931336330 100644 --- a/src/c/unixint.d +++ b/src/c/unixint.d @@ -1444,13 +1444,13 @@ install_fpe_signal_handlers() /* Don't trap underflows */ si_trap_fpe(@'floating-point-underflow', ECL_NIL); - # if 0 && defined(ECL_IEEE_FP) +# if 0 && defined(ECL_IEEE_FP) /* By default deactivate errors and accept denormals * in floating point computations. */ si_trap_fpe(@'floating-point-invalid-operation', ECL_NIL); si_trap_fpe(@'division-by-zero', ECL_NIL); si_trap_fpe(@'floating-point-overflow', ECL_NIL); - # endif +# endif } #endif } From aac7fa0ca64703d03beb10e925d0e4e7ca38ba7a Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Mon, 25 Sep 2023 05:06:55 +0000 Subject: [PATCH 07/40] Enable handle fork by GC --- src/c/alloc_2.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 761298d5a..04c69ba52 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -760,10 +760,12 @@ init_alloc(void) * the begining or to the first byte. * 3) Out of the incremental garbage collector, we only use the * generational component. + * 4) GC should handle fork() which is used to run subprocess. */ GC_set_no_dls(1); GC_set_all_interior_pointers(0); GC_set_time_limit(GC_TIME_UNLIMITED); + GC_set_handle_fork(1); GC_init(); #ifdef ECL_THREADS # if GC_VERSION_MAJOR > 7 || GC_VERSION_MINOR > 1 From 3aab2981471005abd1418dce5dee7cabc89d04b9 Mon Sep 17 00:00:00 2001 From: Mark Shroyer Date: Sun, 22 Oct 2023 20:02:28 -0700 Subject: [PATCH 08/40] Don't enable GC fork() support on Windows A previous commit unconditionally configures Boehm GC to support fork. This breaks the Windows MSVC build, producing an error dialog with the message "Fatal error in GC: fork() handling unsupported". This commit restricts the call to GC_set_handle_fork to non-Windows hosts. --- src/c/alloc_2.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 04c69ba52..1031914a5 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -760,12 +760,15 @@ init_alloc(void) * the begining or to the first byte. * 3) Out of the incremental garbage collector, we only use the * generational component. - * 4) GC should handle fork() which is used to run subprocess. + * 4) GC should handle fork() which is used to run subprocess on + * some platforms. */ GC_set_no_dls(1); GC_set_all_interior_pointers(0); GC_set_time_limit(GC_TIME_UNLIMITED); +#ifndef ECL_MS_WINDOWS_HOST GC_set_handle_fork(1); +#endif GC_init(); #ifdef ECL_THREADS # if GC_VERSION_MAJOR > 7 || GC_VERSION_MINOR > 1 From 239f329ee61842f96985fcdaefc704d5a59d3e84 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Thu, 2 Nov 2023 13:57:02 -0400 Subject: [PATCH 09/40] Add gray-streams module to avoid use of redefine-cl-functions --- src/clos/streams.lsp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 3349ef17e..530f98fa7 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -822,6 +822,15 @@ them so." 'gray:stream-file-position gray-package) (si::package-lock "COMMON-LISP" x) + (provide '#:gray-streams) nil)) +(pushnew :gray-streams-module *features*) + +(pushnew #'(lambda (module) + (when (string-equal module '#:gray-streams) + (redefine-cl-functions) + t)) + sys:*module-provider-functions*) + (setf clos::*clos-booted* t) From 45af71be533a4148b83fab8a28e4b5154b6aefae Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sun, 12 Nov 2023 16:06:01 -0500 Subject: [PATCH 10/40] Add gray:stream-file-length --- src/c/file.d | 6 +++++- src/c/symbols_list.h | 1 + src/clos/streams.lsp | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/c/file.d b/src/c/file.d index 650c3102c..a6a76dbef 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -1313,7 +1313,11 @@ clos_stream_element_type(cl_object strm) return _ecl_funcall2(@'gray::stream-element-type', strm); } -#define clos_stream_length not_a_file_stream +static cl_object +clos_stream_length(cl_object strm) +{ + return _ecl_funcall2(@'gray::stream-file-length', strm); +} static cl_object clos_stream_get_position(cl_object strm) diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index 5379959ac..d57f3f12d 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1856,6 +1856,7 @@ cl_symbols[] = { {GRAY_ "STREAM-CLEAR-OUTPUT" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-ELEMENT-TYPE" ECL_FUN(NULL, NULL, 1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FILE-DESCRIPTOR" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, +{GRAY_ "STREAM-FILE-LENGTH" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FILE-POSITION" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FINISH-OUTPUT" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FORCE-OUTPUT" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 3349ef17e..e462d5948 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -203,6 +203,10 @@ (:documentation "This is like CL:FILE-POSITION, but for Gray streams.")) +(defgeneric stream-file-length (stream &optional position) + (:documentation + "This is like CL:FILE-LENGTH, but for Gray streams.")) + (defgeneric stream-file-descriptor (stream &optional direction) (:documentation "Return the file-descriptor underlaying STREAM, or NIL if not @@ -593,6 +597,14 @@ (declare (ignore stream position)) nil) +;; FILE-LENGTH + +(defmethod stream-file-length ((stream ansi-stream)) + (file-length stream)) + +(defmethod stream-file-length ((stream t)) + (error 'type-error :datum stream :expected-type 'file-stream)) + ;; STREAM-P (defmethod streamp ((stream stream)) @@ -821,6 +833,9 @@ them so." (%redefine-cl-functions 'cl:file-position 'gray:stream-file-position gray-package) + (%redefine-cl-functions 'cl:file-length + 'gray:stream-file-length + gray-package) (si::package-lock "COMMON-LISP" x) nil)) From 1e2cb370c53c9582cd74b60371b1e8f6e8c2bba5 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Thu, 16 Nov 2023 12:26:40 -0500 Subject: [PATCH 11/40] Fix generic definition of stream-file-length --- src/clos/streams.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 5b6c5e8d0..4329b121f 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -203,7 +203,7 @@ (:documentation "This is like CL:FILE-POSITION, but for Gray streams.")) -(defgeneric stream-file-length (stream &optional position) +(defgeneric stream-file-length (stream) (:documentation "This is like CL:FILE-LENGTH, but for Gray streams.")) From 052411eb9c4ef8776b04aea92d4b55b551ad1971 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sun, 19 Nov 2023 14:27:35 -0500 Subject: [PATCH 12/40] Return NIL from stream-terpri --- src/clos/streams.lsp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 4329b121f..f2afecbbb 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -703,7 +703,8 @@ ;; TERPRI (defmethod stream-terpri ((stream fundamental-character-output-stream)) - (stream-write-char stream #\Newline)) + (stream-write-char stream #\Newline) + nil) (defmethod stream-terpri ((stream ansi-stream)) (cl:terpri stream)) From b2120556875d8a0972c6741760bda674457e5ae6 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sat, 18 Nov 2023 09:05:50 -0500 Subject: [PATCH 13/40] Add gray:stream-line-length --- src/c/symbols_list.h | 1 + src/clos/streams.lsp | 15 +++++++++++++++ src/lsp/format.lsp | 10 ++++++++-- src/lsp/pprint.lsp | 12 ++++++++---- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index d57f3f12d..a3c1a3e6c 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1863,6 +1863,7 @@ cl_symbols[] = { {GRAY_ "STREAM-FRESH-LINE" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-INTERACTIVE-P" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-LINE-COLUMN" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, +{GRAY_ "STREAM-LINE-LENGTH" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-LISTEN" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-PEEK-CHAR" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-READ-BYTE" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index f2afecbbb..a34fd197d 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -95,6 +95,11 @@ stream class that is defined, a method must be defined for this function, although it is permissible for it to always return NIL.")) +;; Extension from CLASP, CMUCL, SBCL, Mezzano and SICL + +(defgeneric stream-line-length (stream) + (:documentation "Return the stream line length or NIL.")) + (defgeneric stream-listen (stream) #+sb-doc (:documentation @@ -411,6 +416,16 @@ (declare (ignore stream)) nil) +;; LINE-LENGTH + +(defmethod stream-line-length ((stream fundamental-character-output-stream)) + nil) + +(defmethod stream-line-length ((stream ansi-stream)) + nil) + +(defmethod stream-line-length ((stream t)) + (bug-or-error stream 'stream-line-length)) ;; LISTEN diff --git a/src/lsp/format.lsp b/src/lsp/format.lsp index 78816eeea..ab9c5bd51 100644 --- a/src/lsp/format.lsp +++ b/src/lsp/format.lsp @@ -221,6 +221,8 @@ :start (format-directive-start struct) :end (format-directive-end struct)))) +(defconstant default-line-length 80) + (defconstant +format-directive-limit+ (1+ (char-code #\~))) #+formatter @@ -2518,7 +2520,9 @@ ,@(expand-directive-list (pop segments)))) ,(expand-bind-defaults ((extra 0) - (line-len '(or #-ecl (sys::line-length stream) 72))) + (line-len '(or *print-right-margin* + (gray:stream-line-length stream) + default-line-length))) (format-directive-params first-semi) `(setf extra-space ,extra line-len ,line-len)))) ,@(mapcar #'(lambda (segment) @@ -2549,7 +2553,9 @@ (check-output-layout-mode 2) (interpret-bind-defaults ((extra 0) - (len (or #-ecl (sys::line-length stream) 72))) + (len (or *print-right-margin* + (gray:stream-line-length stream) + default-line-length))) (format-directive-params first-semi) (setf newline-string (with-output-to-string (stream) diff --git a/src/lsp/pprint.lsp b/src/lsp/pprint.lsp index 8a7887a37..3d5516261 100644 --- a/src/lsp/pprint.lsp +++ b/src/lsp/pprint.lsp @@ -32,8 +32,6 @@ (defconstant initial-buffer-size 128) -(defconstant default-line-length 80) - (defclass pretty-stream (gray:fundamental-character-output-stream) ( ;; ;; Where the output is going to finally go. @@ -43,7 +41,8 @@ ;; ;; Line length we should format to. Cached here so we don't have to keep ;; extracting it from the target stream. - (line-length :initform (or *print-right-margin* default-line-length) + (line-length :initarg :line-length + :initform default-line-length :type column :accessor pretty-stream-line-length) ;; @@ -109,7 +108,9 @@ (defun make-pretty-stream (target) (make-instance 'pretty-stream :target target :buffer-start-column (or (file-column target) 0) - )) + :line-length (or *print-right-margin* + (gray:stream-line-length target) + default-line-length))) (defmethod print-object ((pretty-stream pretty-stream) stream) (print-unreadable-object (pretty-stream stream :type t :identity t)) @@ -131,6 +132,9 @@ ;;;; Stream interface routines. +(defmethod gray:stream-line-length ((stream pretty-stream)) + (pretty-stream-line-length stream)) + (defmethod gray::stream-write-char ((stream pretty-stream) char) (pretty-out stream char)) From 71c0ec4d5b9f864d268edb98a72c657eba008bcb Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Mon, 20 Nov 2023 14:06:29 -0500 Subject: [PATCH 14/40] Update docs for gray-streams changes --- CHANGELOG | 11 +++++ src/doc/manual/extensions/gray-streams.txi | 53 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 39624aca0..413c2f3d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,17 @@ parameter given to configure script). * Pending changes since 23.9.9 + +- Add gray-streams module. This makes it possible to load Gray stream + support via ~(require '#:gray-streams)~ versus calling the internal + function ~gray::redefine-cl-functions~. +- Add support for some Gray stream extensions. Specifically, the generic + functions ~gray-streams:stream-line-length~ and + ~gray-streams:stream-file-length~ have been added. The former allows + stream specific line lengths when ~cl:*print-right-margin*~ is NIL. The + latter allows Gray streams to implement ~cl:file-length~. +- Various bug fixes for Gray streams. + * 23.9.9 changes since 21.2.1 ** Announcement Dear Community, diff --git a/src/doc/manual/extensions/gray-streams.txi b/src/doc/manual/extensions/gray-streams.txi index 365a4f759..466bd7a7a 100644 --- a/src/doc/manual/extensions/gray-streams.txi +++ b/src/doc/manual/extensions/gray-streams.txi @@ -6,3 +6,56 @@ Unlike the other Gray stream functions, @code{close} is not specialized on @code{t} for @var{stream}. This decision has been taken mainly for the compatibility reasons with some libraries. @end defun + +@defun {stream-file-position} stream &optional position +This is used to implement @code{file-position}. When @code{position} +is not provided it should return the current file position of the +stream as non-negative integer or @code{nil} if the file position +cannot be determined. When @code{position} is supplied the file +position of the stream should be set to that value. If setting the +position is successful then @code{t} should be returned, otherwise +@code{nil} should be returned. The default method always returns +@code{nil}. +@end defun + +@defun {stream-file-length} stream +This is used to implement @code{file-length}. It returns either a +non-negative integer or @code{nil} if the concept of file length is +not meaningful for the stream. The default method will signal a +@code{type-error} with an expected type of @code{file-stream}. This is +required to conform with the ``Exceptional Situations'' section of +@code{file-length} in the ANSI specification. +@end defun + +@defun {stream-interactive-p} stream +This is used to implement @code{interactive-stream-p}. It returns a +boolean indicating if the stream is interactive. The default method +always returns @code{nil}. +@end defun + +@defun {stream-line-length} stream +Allows the default line length to be specified for the stream. It +returns either a non-negative integer or @code{nil} if the concept of +line length is not meaningful for the stream. This value is only used +if @code{*print-right-margin*} is @code{nil}. The line length is used +by the pretty printer and by the format justification directive. The +default method returns @code{nil}. +@end defun + +@defun {stream-read-sequence} stream sequence &optional start end +This is used to implement @code{read-sequence}. It should follow the +semantics in the ANSI specification. It returns the position of the +first element in the sequence that was not updated. The default method +calls @code{stream-read-char} or @code{stream-read-byte} repeatedly +based on the type returned by @code{stream-element-type}. Element +access to the sequence is done via @code{elt}. +@end defun + +@defun {stream-write-sequence} stream sequence &optional start end +This is used to implement @code{write-sequence}. It should follow the +semantics in the ANSI specification. It returns sequence without +modification. The default method calls @code{stream-wrte-char} or +@code{stream-write-byte} repeatedly based on the type returned by +@code{stream-element-type}. Element access to the sequence is done via +@code{elt}. +@end defun From 8d2fb75ee15f54aa324dcd4226fec0be3b464f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 20 Nov 2023 16:38:41 +0100 Subject: [PATCH 15/40] manual: include the file gray-streams.txi --- src/doc/manual/extensions/gray-streams.txi | 13 ++++++------- src/doc/manual/extensions/index.txi | 3 +-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/doc/manual/extensions/gray-streams.txi b/src/doc/manual/extensions/gray-streams.txi index 8cd407b47..365a4f759 100644 --- a/src/doc/manual/extensions/gray-streams.txi +++ b/src/doc/manual/extensions/gray-streams.txi @@ -1,9 +1,8 @@ -@node Gray streams -@section Gray streams +@node Gray Streams +@section Gray Streams -@defun{close} {@var{stream} @keys{} :abort} - -Unlike the other Gray stream functions, @code{close} is not -specialized on @code{t} for @var{stream}. This decision has been taken -mainly for the compatibility reasons with some libraries. +@defun {close} stream &key abort +Unlike the other Gray stream functions, @code{close} is not specialized +on @code{t} for @var{stream}. This decision has been taken mainly for +the compatibility reasons with some libraries. @end defun diff --git a/src/doc/manual/extensions/index.txi b/src/doc/manual/extensions/index.txi index 7ccd6131e..10ab85f84 100644 --- a/src/doc/manual/extensions/index.txi +++ b/src/doc/manual/extensions/index.txi @@ -53,8 +53,7 @@ @c @node Extensible Sequences @c @section Extensible Sequences -@node Gray Streams -@section Gray Streams +@include extensions/gray-streams.txi @c @node Series @c @section Series From e799b2972be9c1b647d215179333dd069d9655ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 22 Nov 2023 20:05:27 +0000 Subject: [PATCH 16/40] Update gray-streams.txi (fix typo) --- src/doc/manual/extensions/gray-streams.txi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/manual/extensions/gray-streams.txi b/src/doc/manual/extensions/gray-streams.txi index 466bd7a7a..18d0d4080 100644 --- a/src/doc/manual/extensions/gray-streams.txi +++ b/src/doc/manual/extensions/gray-streams.txi @@ -54,7 +54,7 @@ access to the sequence is done via @code{elt}. @defun {stream-write-sequence} stream sequence &optional start end This is used to implement @code{write-sequence}. It should follow the semantics in the ANSI specification. It returns sequence without -modification. The default method calls @code{stream-wrte-char} or +modification. The default method calls @code{stream-write-char} or @code{stream-write-byte} repeatedly based on the type returned by @code{stream-element-type}. Element access to the sequence is done via @code{elt}. From d31735ed3e652e8bd52feec7807902ace8e5fe37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 22 Nov 2023 13:41:12 +0100 Subject: [PATCH 17/40] core: argument checking in si:get-limit and si:set-limit Previously we've falled through all cases and if none matched, we've used the heap. That said our documentation clearly states, that the type for the heap is EXT:HEAP-SIZE. --- src/c/stacks.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/c/stacks.d b/src/c/stacks.d index 7cefe8cf3..71bf88c5d 100644 --- a/src/c/stacks.d +++ b/src/c/stacks.d @@ -807,7 +807,7 @@ si_set_limit(cl_object type, cl_object limit) } else if (type == @'ext::lisp-stack') { cl_index the_size = ecl_to_size(limit); ecl_stack_set_size(env, the_size); - } else { + } else if (type == @'ext::heap-size') { /* * size_t can be larger than cl_index, and ecl_to_size() * creates a fixnum which is too small for size_t on 32-bit. @@ -823,7 +823,7 @@ cl_object si_get_limit(cl_object type) { cl_env_ptr env = ecl_process_env(); - cl_index output; + cl_index output = 0; if (type == @'ext::frame-stack') output = env->frs_limit_size; else if (type == @'ext::binding-stack') @@ -832,7 +832,7 @@ si_get_limit(cl_object type) output = env->cs_limit_size; else if (type == @'ext::lisp-stack') output = env->stack_limit_size; - else { + else if (type == @'ext::heap-size') { /* size_t can be larger than cl_index */ ecl_return1(env, ecl_make_unsigned_integer(cl_core.max_heap_size)); } From e001df1589622d7f3b8702575fdcd18f07c79dbf Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sat, 13 Jan 2024 10:26:35 -0500 Subject: [PATCH 18/40] Add support for gray:stream-file-string-length --- src/c/file.d | 192 ++++++++++++++++++++++++++++--------------- src/c/symbols_list.h | 1 + src/clos/streams.lsp | 12 +++ src/h/external.h | 1 + src/h/object.h | 1 + 5 files changed, 142 insertions(+), 65 deletions(-) diff --git a/src/c/file.d b/src/c/file.d index a6a76dbef..0a96562b8 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -224,6 +224,20 @@ not_output_finish_output(cl_object strm) not_an_output_stream(strm); } +static cl_object +not_output_string_length(cl_object strm, cl_object string) +{ + not_an_output_stream(strm); + return 0; +} + +static cl_object +not_file_string_length(cl_object strm, cl_object string) +{ + not_a_file_stream(strm); + return 0; +} + static int unknown_column(cl_object strm) { @@ -1158,6 +1172,51 @@ utf_8_encoder(cl_object stream, unsigned char *buffer, ecl_character c) } #endif +static cl_index +compute_char_size(cl_object stream, ecl_character c) +{ + unsigned char buffer[5]; + int l = 0; + if (c == ECL_CHAR_CODE_NEWLINE) { + int flags = stream->stream.flags; + if (flags & ECL_STREAM_CR) { + l += stream->stream.encoder(stream, buffer, ECL_CHAR_CODE_RETURN); + if (flags & ECL_STREAM_LF) + l += stream->stream.encoder(stream, buffer, + ECL_CHAR_CODE_LINEFEED); + } else { + l += stream->stream.encoder(stream, buffer, ECL_CHAR_CODE_LINEFEED); + } + } else { + l += stream->stream.encoder(stream, buffer, c); + } + return l; +} + +cl_object +file_string_length(cl_object stream, cl_object string) +{ + cl_fixnum l = 0; + switch (ecl_t_of(string)) { +#ifdef ECL_UNICODE + case t_string: +#endif + case t_base_string: { + cl_index i; + for (i = 0; i < string->base_string.fillp; i++) { + l += compute_char_size(stream, ecl_char(string, i)); + } + break; + } + case t_character: + l = compute_char_size(stream, ECL_CHAR_CODE(string)); + break; + default: + FEwrong_type_nth_arg(@[file-string-length], 2, string, @[string]); + } + return ecl_make_fixnum(l); +} + /******************************************************************************** * CLOS STREAMS */ @@ -1331,6 +1390,12 @@ clos_stream_set_position(cl_object strm, cl_object pos) return _ecl_funcall3(@'gray::stream-file-position', strm, pos); } +static cl_object +clos_stream_string_length(cl_object strm, cl_object string) +{ + return _ecl_funcall3(@'gray::stream-file-string-length', strm, string); +} + static int clos_stream_column(cl_object strm) { @@ -1373,6 +1438,7 @@ const struct ecl_file_ops clos_stream_ops = { clos_stream_length, clos_stream_get_position, clos_stream_set_position, + clos_stream_string_length, clos_stream_column, clos_stream_close }; @@ -1405,6 +1471,26 @@ str_out_get_position(cl_object strm) return ecl_make_unsigned_integer(STRING_OUTPUT_STRING(strm)->base_string.fillp); } +static cl_object +str_out_string_length(cl_object strm, cl_object string) +{ + cl_fixnum l = 0; + switch (ecl_t_of(string)) { +#ifdef ECL_UNICODE + case t_string: +#endif + case t_base_string: + l = string->base_string.fillp; + break; + case t_character: + l = 1; + break; + default: + FEwrong_type_nth_arg(@[file-string-length], 2, string, @[string]); + } + return ecl_make_fixnum(l); +} + static cl_object str_out_set_position(cl_object strm, cl_object pos) { @@ -1454,6 +1540,7 @@ const struct ecl_file_ops str_out_ops = { not_a_file_stream, /* length */ str_out_get_position, str_out_set_position, + str_out_string_length, generic_column, generic_close }; @@ -1642,6 +1729,7 @@ const struct ecl_file_ops str_in_ops = { not_a_file_stream, /* length */ str_in_get_position, str_in_set_position, + not_output_string_length, unknown_column, generic_close }; @@ -1838,6 +1926,7 @@ const struct ecl_file_ops two_way_ops = { not_a_file_stream, /* length */ generic_always_nil, /* get_position */ generic_set_position, + not_file_string_length, two_way_column, two_way_close }; @@ -1975,6 +2064,15 @@ broadcast_set_position(cl_object strm, cl_object pos) return ecl_file_position_set(ECL_CONS_CAR(l), pos); } +cl_object +broadcast_string_length(cl_object strm, cl_object string) +{ + cl_object l = BROADCAST_STREAM_LIST(strm); + if (Null(l)) + return ecl_make_fixnum(1); + return ecl_file_string_length(ECL_CONS_CAR(ecl_last(l, 1)), string); +} + static int broadcast_column(cl_object strm) { @@ -2022,6 +2120,7 @@ const struct ecl_file_ops broadcast_ops = { broadcast_length, broadcast_get_position, broadcast_set_position, + broadcast_string_length, broadcast_column, broadcast_close }; @@ -2207,6 +2306,7 @@ const struct ecl_file_ops echo_ops = { not_a_file_stream, /* length */ generic_always_nil, /* get_position */ generic_set_position, + not_file_string_length, echo_column, echo_close }; @@ -2353,6 +2453,7 @@ const struct ecl_file_ops concatenated_ops = { not_a_file_stream, /* length */ generic_always_nil, /* get_position */ generic_set_position, + not_output_string_length, unknown_column, concatenated_close }; @@ -2527,6 +2628,12 @@ synonym_set_position(cl_object strm, cl_object pos) return ecl_file_position_set(SYNONYM_STREAM_STREAM(strm), pos); } +static cl_object +synonym_string_length(cl_object strm, cl_object string) +{ + return ecl_file_string_length(SYNONYM_STREAM_STREAM(strm), string); +} + static int synonym_column(cl_object strm) { @@ -2562,6 +2669,7 @@ const struct ecl_file_ops synonym_ops = { synonym_length, synonym_get_position, synonym_set_position, + synonym_string_length, synonym_column, generic_close }; @@ -3086,6 +3194,7 @@ const struct ecl_file_ops io_file_ops = { io_file_length, io_file_get_position, io_file_set_position, + file_string_length, generic_column, io_file_close }; @@ -3119,6 +3228,7 @@ const struct ecl_file_ops output_file_ops = { io_file_length, io_file_get_position, io_file_set_position, + file_string_length, generic_column, io_file_close }; @@ -3152,6 +3262,7 @@ const struct ecl_file_ops input_file_ops = { io_file_length, io_file_get_position, io_file_set_position, + not_output_string_length, unknown_column, io_file_close }; @@ -3738,6 +3849,7 @@ const struct ecl_file_ops io_stream_ops = { io_stream_length, io_stream_get_position, io_stream_set_position, + file_string_length, generic_column, io_stream_close }; @@ -3771,6 +3883,7 @@ const struct ecl_file_ops output_stream_ops = { io_stream_length, io_stream_get_position, io_stream_set_position, + file_string_length, generic_column, io_stream_close }; @@ -3804,6 +3917,7 @@ const struct ecl_file_ops input_stream_ops = { io_stream_length, io_stream_get_position, io_stream_set_position, + not_output_string_length, unknown_column, io_stream_close }; @@ -3948,6 +4062,7 @@ const struct ecl_file_ops winsock_stream_io_ops = { not_a_file_stream, generic_always_nil, /* get_position */ generic_set_position, + file_string_length, generic_column, winsock_stream_close @@ -3982,6 +4097,7 @@ const struct ecl_file_ops winsock_stream_output_ops = { not_a_file_stream, generic_always_nil, /* get_position */ generic_set_position, + file_string_length, generic_column, winsock_stream_close @@ -4016,6 +4132,7 @@ const struct ecl_file_ops winsock_stream_input_ops = { not_a_file_stream, generic_always_nil, /* get_position */ generic_set_position, + not_output_string_length, unknown_column, winsock_stream_close @@ -4121,6 +4238,7 @@ const struct ecl_file_ops wcon_stream_io_ops = { not_a_file_stream, generic_always_nil, /* get_position */ generic_set_position, + file_string_length, generic_column, generic_close, @@ -4593,6 +4711,7 @@ const struct ecl_file_ops seq_in_ops = { not_a_file_stream, /* length */ seq_in_get_position, seq_in_set_position, + not_output_string_length, unknown_column, generic_close }; @@ -4798,6 +4917,7 @@ const struct ecl_file_ops seq_out_ops = { not_a_file_stream, /* length */ seq_out_get_position, seq_out_set_position, + not_output_string_length, generic_column, generic_close }; @@ -4988,6 +5108,12 @@ ecl_file_position_set(cl_object strm, cl_object pos) return stream_dispatch_table(strm)->set_position(strm, pos); } +cl_object +ecl_file_string_length(cl_object strm, cl_object string) +{ + return stream_dispatch_table(strm)->string_length(strm, string); +} + bool ecl_input_stream_p(cl_object strm) { @@ -5050,74 +5176,10 @@ writestr_stream(const char *s, cl_object strm) si_put_buffer_string(buffer); } -static cl_index -compute_char_size(cl_object stream, ecl_character c) -{ - unsigned char buffer[5]; - int l = 0; - if (c == ECL_CHAR_CODE_NEWLINE) { - int flags = stream->stream.flags; - if (flags & ECL_STREAM_CR) { - l += stream->stream.encoder(stream, buffer, ECL_CHAR_CODE_RETURN); - if (flags & ECL_STREAM_LF) - l += stream->stream.encoder(stream, buffer, - ECL_CHAR_CODE_LINEFEED); - } else { - l += stream->stream.encoder(stream, buffer, ECL_CHAR_CODE_LINEFEED); - } - } else { - l += stream->stream.encoder(stream, buffer, c); - } - return l; -} - cl_object cl_file_string_length(cl_object stream, cl_object string) { - cl_fixnum l = 0; - /* This is a stupid requirement from the spec. Why returning 1??? - * Why not simply leaving the value unspecified, as with other - * streams one cannot write to??? - */ - BEGIN: -#ifdef ECL_CLOS_STREAMS - if (ECL_INSTANCEP(stream)) { - @(return ECL_NIL); - } -#endif - unlikely_if (!ECL_ANSI_STREAM_P(stream)) { - FEwrong_type_only_arg(@[file-string-length], stream, @[stream]); - } - if (stream->stream.mode == ecl_smm_broadcast) { - stream = BROADCAST_STREAM_LIST(stream); - if (Null(stream)) { - @(return ecl_make_fixnum(1)); - } else { - stream = ECL_CONS_CAR(ecl_last(stream, 1)); - goto BEGIN; - } - } - unlikely_if (!ECL_FILE_STREAM_P(stream)) { - not_a_file_stream(stream); - } - switch (ecl_t_of(string)) { -#ifdef ECL_UNICODE - case t_string: -#endif - case t_base_string: { - cl_index i; - for (i = 0; i < string->base_string.fillp; i++) { - l += compute_char_size(stream, ecl_char(string, i)); - } - break; - } - case t_character: - l = compute_char_size(stream, ECL_CHAR_CODE(string)); - break; - default: - FEwrong_type_nth_arg(@[file-string-length], 2, string, @[string]); - } - @(return ecl_make_fixnum(l)); + @(return ecl_file_string_length(stream, string)); } cl_object diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index a3c1a3e6c..eae0f9b97 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1858,6 +1858,7 @@ cl_symbols[] = { {GRAY_ "STREAM-FILE-DESCRIPTOR" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FILE-LENGTH" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FILE-POSITION" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, +{GRAY_ "STREAM-FILE-STRING-LENGTH" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FINISH-OUTPUT" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FORCE-OUTPUT" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAM-FRESH-LINE" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 27888cae0..eb49155fd 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -212,6 +212,10 @@ (:documentation "This is like CL:FILE-LENGTH, but for Gray streams.")) +(defgeneric stream-file-string-length (stream string) + (:documentation + "This is like CL:FILE-STRING-LENGTH, but for Gray streams.")) + (defgeneric stream-file-descriptor (stream &optional direction) (:documentation "Return the file-descriptor underlaying STREAM, or NIL if not @@ -618,6 +622,14 @@ (defmethod stream-file-length ((stream t)) (error 'type-error :datum stream :expected-type 'file-stream)) +;; FILE-STRING-LENGTH + +(defmethod stream-file-string-length ((stream ansi-stream) string) + (file-string-length stream string)) + +(defmethod stream-file-string-length ((stream fundamental-character-output-stream) string) + nil) + ;; STREAM-P (defmethod streamp ((stream stream)) diff --git a/src/h/external.h b/src/h/external.h index 8638a8eeb..e61fc75d2 100755 --- a/src/h/external.h +++ b/src/h/external.h @@ -738,6 +738,7 @@ extern ECL_API bool ecl_listen_stream(cl_object strm); extern ECL_API cl_object ecl_file_position(cl_object strm); extern ECL_API cl_object ecl_file_position_set(cl_object strm, cl_object disp); extern ECL_API cl_object ecl_file_length(cl_object strm); +extern ECL_API cl_object ecl_file_string_length(cl_object strm, cl_object string); extern ECL_API int ecl_file_column(cl_object strm); extern ECL_API cl_fixnum ecl_normalize_stream_element_type(cl_object element); extern ECL_API cl_object ecl_make_stream_from_FILE(cl_object fname, void *fd, enum ecl_smmode smm, cl_fixnum byte_size, int flags, cl_object external_format); diff --git a/src/h/object.h b/src/h/object.h index 915cd2604..459dfb7f5 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -602,6 +602,7 @@ struct ecl_file_ops { cl_object (*length)(cl_object strm); cl_object (*get_position)(cl_object strm); cl_object (*set_position)(cl_object strm, cl_object pos); + cl_object (*string_length)(cl_object strm, cl_object string); int (*column)(cl_object strm); cl_object (*close)(cl_object strm); From 33ffa5e53c3857acda75a5c99ef3e00fdbc25da9 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sun, 14 Jan 2024 13:20:52 -0500 Subject: [PATCH 19/40] Add ansi-test to tests --- src/tests/Makefile.in | 26 ++++++++++++----- src/tests/ansi-test-expected-failures.sexp | 31 ++++++++++++++++++++ src/tests/config.lsp.in | 33 ++++++++++++++++++++++ 3 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 src/tests/ansi-test-expected-failures.sexp diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 2b9ac315c..096898fed 100755 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -2,17 +2,29 @@ # vim: set filetype=makefile tabstop=8 shiftwidth=4 expandtab: ECL=@prefix@/@bindir@/ecl@EXEEXT@ +SHELL=/bin/bash -o pipefail -.PHONY: all +.PHONY: all check test ansi-test all: check -check: config.lsp - $(ECL) -norc \ - -load config.lsp \ - -eval "(ecl-tests::run-tests '($(TESTS)))" \ - -eval "(ext:quit)" \ - 2>&1 | tee check.log +check: test ansi-test + +test: config.lsp + $(ECL) --norc \ + --load config.lsp \ + --eval "(ecl-tests::run-tests '($(TESTS)))" \ + --eval "(ext:quit)" \ + 2>&1 | tee test.log clean: rm -rf regressions.log cache + +ansi-test/doit.lsp: + git clone https://gitlab.common-lisp.net/ansi-test/ansi-test.git + +ansi-test: ansi-test/doit.lsp + $(ECL) --norc \ + --load config.lsp \ + --eval "(ext:quit (if (ecl-tests::run-ansi-test) 0 2))" \ + 2>&1 | tee ansi-test.log diff --git a/src/tests/ansi-test-expected-failures.sexp b/src/tests/ansi-test-expected-failures.sexp new file mode 100644 index 000000000..e1de9ceaa --- /dev/null +++ b/src/tests/ansi-test-expected-failures.sexp @@ -0,0 +1,31 @@ +:NIL-VECTORS-ARE-STRINGS +:ALLOW-NIL-ARRAYS +:MAKE-CONDITION-WITH-COMPOUND-NAME +:NO-FLOATING-POINT-UNDERFLOW-BY-DEFAULT + +LOOP.1.40 +LOOP.1.41 +LOOP.1.42 +LOOP.1.43 + +MAKE-LOAD-FORM.ORDER.8 +MAKE-LOAD-FORM.ORDER.13 +MAKE-LOAD-FORM.ORDER.14 + +DEFGENERIC.ERROR.20 +DEFGENERIC.ERROR.21 +CALL-NEXT-METHOD.ERROR.1 +CALL-NEXT-METHOD.ERROR.2 +DEFMETHOD.ERROR.14 +DEFMETHOD.ERROR.15 + +UPGRADED-ARRAY-ELEMENT-TYPE.8 + +MAKE-RANDOM-STATE.ERROR.4 + +MAP.ERROR.11 + +SUBTYPEP-COMPLEX.8 + +COMPILE-FILE.6A +COMPILE-FILE.18 diff --git a/src/tests/config.lsp.in b/src/tests/config.lsp.in index 6d5e91c51..236191d91 100755 --- a/src/tests/config.lsp.in +++ b/src/tests/config.lsp.in @@ -109,3 +109,36 @@ (format t "~%Known fails: ~%~{~a~%~}~%" '(SEM-SIGNAL-N-PROCESSES SEM-SIGNAL-ONLY-N-PROCESSES)))) + +;;; +;;; RUNNING ANSI-TEST +;;; +(defun run-ansi-test (&optional (suite (ext:getenv "ANSI_TEST_SUITE"))) + (ext:setenv "TEST_IMAGE" *test-image*) + (zerop + (nth-value + 1 + (ext:run-program + *test-image* + `("-norc" + "-eval" "(print (ext:getenv \"ECLDIR\"))" + "-eval" "(ext:install-bytecodes-compiler)" + "-eval" ,(if (ext:getenv "BYTECMP") + "t" + "(ignore-errors (ext:install-c-compiler))") + ,@(cond (suite + `("-eval" ,(format nil "(setf *default-pathname-defaults* ~s)" + (truename #P"ansi-test/")) + "-load" "gclload1.lsp" + "-load" ,(namestring (make-pathname + :directory (list :relative suite) + :name "load" + :type "lsp")))) + (t + `("-load" "ansi-test/init.lsp"))) + "-eval" ,(format nil "(rt:do-tests :exit t :expected-failures ~s)" + (merge-pathnames #P"tests/ansi-test-expected-failures.sexp" + *ecl-sources*))) + :input nil + :output t + :error :output)))) From 8ef19ee1313c2e37f13dd328c544f75e38eb38f7 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Sat, 13 Jan 2024 10:32:59 -0500 Subject: [PATCH 20/40] Update for gray:stream-file-string-length --- CHANGELOG | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 413c2f3d7..8a605b86c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,11 +32,14 @@ - Add gray-streams module. This makes it possible to load Gray stream support via ~(require '#:gray-streams)~ versus calling the internal function ~gray::redefine-cl-functions~. -- Add support for some Gray stream extensions. Specifically, the generic - functions ~gray-streams:stream-line-length~ and - ~gray-streams:stream-file-length~ have been added. The former allows - stream specific line lengths when ~cl:*print-right-margin*~ is NIL. The - latter allows Gray streams to implement ~cl:file-length~. +- Add support for some Gray stream extensions by adding the following + generic functions. + 1) ~gray:stream-line-length~ which allows stream specific line lengths + when ~cl:*print-right-margin*~ is NIL. + 2) ~gray:stream-file-length~ which allows Gray streams to implement + ~cl:file-length~. + 3) ~gray:stream-file-string-length~ which allows Gray streams to + implement ~cl:file-string-length~. - Various bug fixes for Gray streams. * 23.9.9 changes since 21.2.1 From 8f29b65e001ac3c32162add2458e1e20f0fcfb6f Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Mon, 4 Dec 2023 12:58:09 -0500 Subject: [PATCH 21/40] Allow empty string for EOF in read-line --- src/c/read.d | 3 ++- src/clos/streams.lsp | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/c/read.d b/src/c/read.d index 6af306d83..f8cb6964f 100644 --- a/src/c/read.d +++ b/src/c/read.d @@ -1579,7 +1579,8 @@ do_read_delimited_list(int d, cl_object in, bool proper_list) if (!ECL_ANSI_STREAM_P(strm)) { value0 = _ecl_funcall2(@'gray::stream-read-line', strm); value1 = ecl_nth_value(the_env, 1); - if (Null(value0) && !Null(value1)) { + if ((Null(value0) || (ECL_STRINGP(value0) && (ecl_length(value0) == 0))) && + !Null(value1)) { if (!Null(eof_errorp)) FEend_of_file(strm); value0 = eof_value; diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index a34fd197d..27888cae0 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -532,9 +532,7 @@ (loop (let ((ch (stream-read-char stream))) (cond ((eq ch :eof) - (return (values (if (zerop index) - nil - (si::shrink-vector res index)) + (return (values (si::shrink-vector res index) t))) (t (when (char= ch #\newline) From cee8e6fcd8a3cef94b28fee85e4435f979a949fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Sat, 9 Dec 2023 09:24:58 +0100 Subject: [PATCH 22/40] INSTALL: add an extra hint for emscripten re stack size Fixes #726. --- INSTALL | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/INSTALL b/INSTALL index 15872bb5f..1b399c0c2 100644 --- a/INSTALL +++ b/INSTALL @@ -189,3 +189,13 @@ After that activate the toolchain and configure build flags: If the output does not show on the webpage then open the javascript console. This is a default html website produced by emscripten. + +5. Build an external program linked against libecl.a + +The default stack size proposed by emscripten is 64KB. This is too little for +ECL, so when you build a program that is linked against libecl.a, then it is +imoprtant to specify a different size. For example: + +#+begin_src shell-script + emcc program.c -sSTACK_SIZE=1048576 lib/*.a -I./include -o program.o +#+end_src From b797070f5fc0ca87e6294e7a06925ccb7b07fd12 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Mon, 4 Dec 2023 12:59:48 -0500 Subject: [PATCH 23/40] Add tests for Gray read-line --- src/tests/normal-tests/mixed.lsp | 52 +++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/tests/normal-tests/mixed.lsp b/src/tests/normal-tests/mixed.lsp index 500958933..956d192fc 100644 --- a/src/tests/normal-tests/mixed.lsp +++ b/src/tests/normal-tests/mixed.lsp @@ -507,7 +507,57 @@ ;;; (LOOP (fu) nil (bar)) which is not acceptable. To verify ;;; that this is not happening we make sure we are not getting ;;; (BLOCK NIL NIL) since this is easier to test for. -(test mixed.0027.format-no-nil-form +(test mix.0027.format-no-nil-form (is (equal (third (second (macroexpand-1 '(formatter "~ ")))) '(block nil)))) + +;;; Created: 2023-12-04 Gray stream proposal is a bit ambiguous about +;;; the return value of STREAM-READ-LINE. The return from this +;;; generic function is described as "A string is returned as the +;;; first value. The second value is true if the string was terminated +;;; by end-of-file instead of the end of a line." A literal reading of +;;; this indicates that an EOF with no newline should be returned as +;;; (VALUES "" T) which is what the default method in the proposal +;;; does. The following tests ensure that the default Gray method's +;;; returns are understood by CL:READ-LINE. +(require :gray-streams) + +(defclass character-input-stream + (gray:fundamental-character-input-stream) + ((value :reader value + :initarg :value) + (index :accessor index + :initform 0))) + +(defmethod gray:stream-read-char ((stream character-input-stream)) + (with-accessors ((value value) + (index index)) + stream + (if (< index (length value)) + (prog1 (char value index) + (incf index)) + :eof))) + +(defmethod gray:stream-unread-char ((stream character-input-stream) character) + (with-accessors ((value value) + (index index)) + stream + (when (zerop index) + (error "Stream is at beginning, cannot unread character")) + (when (char/= character (char value (decf index))) + (error "Cannot unread a character that does not match.")) + nil)) + +(test mix.0028.read-line-eof + (signals end-of-file + (read-line (make-instance 'character-input-stream :value "")))) + +(test mix.0029.read-line-eof + (is (equal (multiple-value-list (read-line (make-instance 'character-input-stream :value "") nil :wibble)) + '(:wibble t)))) + +(test mix.0029.read-line-eof + (is (equal (multiple-value-list (read-line (make-instance 'character-input-stream :value "a +"))) + '("a" nil)))) From 00826e50175a875e6881f69dfe95b5e79189c461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Sat, 16 Dec 2023 19:23:36 +0100 Subject: [PATCH 24/40] seqmacros: do-sublist: fix an invalid declaration ECL declared the argument %sublist as CONS while it may be either CONS or NIL. Reported by Alex Wood from Clasp. --- src/lsp/seqmacros.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lsp/seqmacros.lsp b/src/lsp/seqmacros.lsp index f950e71ce..131585b51 100644 --- a/src/lsp/seqmacros.lsp +++ b/src/lsp/seqmacros.lsp @@ -113,7 +113,7 @@ (,%count (- ,end ,index) (1- ,%count))) ((<= ,%count 0) ,output) (declare (fixnum ,index ,%count) - (cons ,%sublist)) + (list ,%sublist)) (let ((,elt (car ,%sublist))) ,@body)))) From dc70e6b9a85644a651de04cc92fc3aeaf3922c4a Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Thu, 25 Jan 2024 13:32:05 -0500 Subject: [PATCH 25/40] Add generic pathname/truename --- src/c/file.d | 126 ++++++++++++++++++++++++++++++++++++++++++- src/c/pathname.d | 27 +++------- src/c/symbols_list.h | 2 + src/c/unixfsys.d | 3 ++ src/clos/streams.lsp | 43 ++++++++++++++- src/cmp/cmpmain.lsp | 1 + src/h/external.h | 2 + src/h/object.h | 3 ++ 8 files changed, 185 insertions(+), 22 deletions(-) diff --git a/src/c/file.d b/src/c/file.d index 0a96562b8..995775b1d 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -1403,6 +1403,18 @@ clos_stream_column(cl_object strm) return Null(col)? -1 : ecl_to_size(ecl_floor1(col)); } +static cl_object +clos_stream_pathname(cl_object strm) +{ + return _ecl_funcall2(@'gray::pathname', strm); +} + +static cl_object +clos_stream_truename(cl_object strm) +{ + return _ecl_funcall2(@'gray::truename', strm); +} + static cl_object clos_stream_close(cl_object strm) { @@ -1440,6 +1452,10 @@ const struct ecl_file_ops clos_stream_ops = { clos_stream_set_position, clos_stream_string_length, clos_stream_column, + + clos_stream_pathname, + clos_stream_truename, + clos_stream_close }; #endif /* ECL_CLOS_STREAMS */ @@ -1542,6 +1558,10 @@ const struct ecl_file_ops str_out_ops = { str_out_set_position, str_out_string_length, generic_column, + + not_a_file_stream, + not_a_file_stream, + generic_close }; @@ -1731,6 +1751,10 @@ const struct ecl_file_ops str_in_ops = { str_in_set_position, not_output_string_length, unknown_column, + + not_a_file_stream, + not_a_file_stream, + generic_close }; @@ -1928,6 +1952,10 @@ const struct ecl_file_ops two_way_ops = { generic_set_position, not_file_string_length, two_way_column, + + not_a_file_stream, + not_a_file_stream, + two_way_close }; @@ -2122,6 +2150,10 @@ const struct ecl_file_ops broadcast_ops = { broadcast_set_position, broadcast_string_length, broadcast_column, + + not_a_file_stream, + not_a_file_stream, + broadcast_close }; @@ -2308,6 +2340,10 @@ const struct ecl_file_ops echo_ops = { generic_set_position, not_file_string_length, echo_column, + + not_a_file_stream, + not_a_file_stream, + echo_close }; @@ -2455,6 +2491,10 @@ const struct ecl_file_ops concatenated_ops = { generic_set_position, not_output_string_length, unknown_column, + + not_a_file_stream, + not_a_file_stream, + concatenated_close }; @@ -2640,6 +2680,18 @@ synonym_column(cl_object strm) return ecl_file_column(SYNONYM_STREAM_STREAM(strm)); } +static cl_object +synonym_pathname(cl_object strm) +{ + return ecl_stream_pathname(SYNONYM_STREAM_STREAM(strm)); +} + +static cl_object +synonym_truename(cl_object strm) +{ + return ecl_stream_truename(SYNONYM_STREAM_STREAM(strm)); +} + const struct ecl_file_ops synonym_ops = { synonym_write_byte8, synonym_read_byte8, @@ -2671,6 +2723,10 @@ const struct ecl_file_ops synonym_ops = { synonym_set_position, synonym_string_length, synonym_column, + + synonym_pathname, + synonym_truename, + generic_close }; @@ -3165,6 +3221,18 @@ io_file_write_vector(cl_object strm, cl_object data, cl_index start, cl_index en return generic_write_vector(strm, data, start, end); } +static cl_object +io_file_pathname(cl_object strm) +{ + return IO_STREAM_FILENAME(strm); +} + +static cl_object +io_file_truename(cl_object strm) +{ + return cl_truename(IO_STREAM_FILENAME(strm)); +} + const struct ecl_file_ops io_file_ops = { io_file_write_byte8, io_file_read_byte8, @@ -3196,6 +3264,10 @@ const struct ecl_file_ops io_file_ops = { io_file_set_position, file_string_length, generic_column, + + io_file_pathname, + io_file_truename, + io_file_close }; @@ -3230,6 +3302,10 @@ const struct ecl_file_ops output_file_ops = { io_file_set_position, file_string_length, generic_column, + + io_file_pathname, + io_file_truename, + io_file_close }; @@ -3264,6 +3340,10 @@ const struct ecl_file_ops input_file_ops = { io_file_set_position, not_output_string_length, unknown_column, + + io_file_pathname, + io_file_truename, + io_file_close }; @@ -3851,6 +3931,10 @@ const struct ecl_file_ops io_stream_ops = { io_stream_set_position, file_string_length, generic_column, + + io_file_pathname, + io_file_truename, + io_stream_close }; @@ -3885,6 +3969,10 @@ const struct ecl_file_ops output_stream_ops = { io_stream_set_position, file_string_length, generic_column, + + io_file_pathname, + io_file_truename, + io_stream_close }; @@ -3919,6 +4007,10 @@ const struct ecl_file_ops input_stream_ops = { io_stream_set_position, not_output_string_length, unknown_column, + + io_file_pathname, + io_file_truename, + io_stream_close }; @@ -4065,6 +4157,9 @@ const struct ecl_file_ops winsock_stream_io_ops = { file_string_length, generic_column, + not_a_file_stream, + not_a_file_stream, + winsock_stream_close }; @@ -4100,6 +4195,9 @@ const struct ecl_file_ops winsock_stream_output_ops = { file_string_length, generic_column, + not_a_file_stream, + not_a_file_stream, + winsock_stream_close }; @@ -4135,6 +4233,9 @@ const struct ecl_file_ops winsock_stream_input_ops = { not_output_string_length, unknown_column, + not_a_file_stream, + not_a_file_stream, + winsock_stream_close }; #endif @@ -4241,6 +4342,9 @@ const struct ecl_file_ops wcon_stream_io_ops = { file_string_length, generic_column, + io_file_pathname, + io_file_truename, + generic_close, }; @@ -4434,7 +4538,7 @@ ecl_make_stream_from_FILE(cl_object fname, void *f, enum ecl_smmode smm, FEerror("Not a valid mode ~D for ecl_make_stream_from_FILE", 1, ecl_make_fixnum(smm)); } set_stream_elt_type(stream, byte_size, flags, external_format); - IO_STREAM_FILENAME(stream) = fname; /* not really used */ + IO_STREAM_FILENAME(stream) = fname; stream->stream.column = 0; IO_STREAM_FILE(stream) = f; stream->stream.last_op = 0; @@ -4713,6 +4817,10 @@ const struct ecl_file_ops seq_in_ops = { seq_in_set_position, not_output_string_length, unknown_column, + + not_a_file_stream, + not_a_file_stream, + generic_close }; @@ -4919,6 +5027,10 @@ const struct ecl_file_ops seq_out_ops = { seq_out_set_position, not_output_string_length, generic_column, + + not_a_file_stream, + not_a_file_stream, + generic_close }; @@ -5138,6 +5250,18 @@ ecl_interactive_stream_p(cl_object strm) return stream_dispatch_table(strm)->interactive_p(strm); } +cl_object +ecl_stream_pathname(cl_object strm) +{ + return stream_dispatch_table(strm)->pathname(strm); +} + +cl_object +ecl_stream_truename(cl_object strm) +{ + return stream_dispatch_table(strm)->truename(strm); +} + /* * ecl_read_char(s) tries to read a character from the stream S. It outputs * either the code of the character read, or EOF. Whe compiled with diff --git a/src/c/pathname.d b/src/c/pathname.d index efeca5cab..79865ce51 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -746,27 +746,14 @@ cl_pathname(cl_object x) x = cl_parse_namestring(1, x); case t_pathname: break; - case t_stream: - switch ((enum ecl_smmode)x->stream.mode) { - case ecl_smm_input: - case ecl_smm_output: - case ecl_smm_probe: - case ecl_smm_io: - case ecl_smm_input_file: - case ecl_smm_output_file: - case ecl_smm_io_file: - x = IO_STREAM_FILENAME(x); - goto L; - case ecl_smm_synonym: - x = SYNONYM_STREAM_STREAM(x); - goto L; - default: - ;/* Fall through to error message */ + default: + if (!Null(cl_streamp(x))) { + x = ecl_stream_pathname(x); + } else { + const char *type = "(OR FILE-STREAM STRING PATHNAME)"; + FEwrong_type_only_arg(@[pathname], x, ecl_read_from_cstring(type)); } - default: { - const char *type = "(OR FILE-STREAM STRING PATHNAME)"; - FEwrong_type_only_arg(@[pathname], x, ecl_read_from_cstring(type)); - } + break; } @(return x); } diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index eae0f9b97..de9cc4dbf 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1846,6 +1846,8 @@ cl_symbols[] = { {SYS_ "APPLY-FROM-STACK-FRAME" ECL_FUN("si_apply_from_stack_frame", si_apply_from_stack_frame, 2) ECL_VAR(SI_ORDINARY, OBJNULL)}, #ifdef ECL_CLOS_STREAMS +{GRAY_ "PATHNAME" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, +{GRAY_ "TRUENAME" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "CLOSE" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "STREAMP" ECL_FUN(NULL, NULL, -1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, {GRAY_ "INPUT-STREAM-P" ECL_FUN(NULL, NULL, 1) ECL_VAR(GRAY_ORDINARY, OBJNULL)}, diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index f83f53d6c..326b1bcb2 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -460,6 +460,9 @@ file_truename(cl_object pathname, cl_object filename, int flags) cl_object cl_truename(cl_object orig_pathname) { + if (!Null(cl_streamp(orig_pathname))) + @(return ecl_stream_truename(orig_pathname)); + cl_object pathname = make_absolute_pathname(orig_pathname); cl_object base_dir = make_base_pathname(pathname); cl_object dir; diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 60a6a6cf0..c09eb79c4 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -225,6 +225,14 @@ error is signaled. That is, users must add methods to explicitly decline by returning NIL.")) +(defgeneric pathname (pathspec) + (:documentation + "Returns the pathname denoted by pathspec.")) + +(defgeneric truename (pathspec) + (:documentation + "truename tries to find the file indicated by filespec and returns its truename.")) + ;;; ;;; Our class hierarchy looks like the one from Gray streams @@ -773,12 +781,45 @@ (si:file-stream-fd stream)) +;;; PATHNAME + +(defmethod pathname ((pathspec string)) + (cl:pathname pathspec)) + +(defmethod pathname ((pathspec cl:pathname)) + pathspec) + +(defmethod pathname ((pathspec ansi-stream)) + (cl:pathname pathspec)) + +(defmethod pathname (pathspec) + (error 'type-error :datum pathspec + :expected-type '(or string cl:pathname file-stream))) + + +;;; TRUENAME + +(defmethod truename ((filespec string)) + (cl:truename filespec)) + +(defmethod truename ((filespec cl:pathname)) + (cl:truename filespec)) + +(defmethod truename ((filespec ansi-stream)) + (cl:truename filespec)) + +(defmethod truename (filespec) + (error 'type-error :datum filespec + :expected-type '(or string cl:pathname file-stream))) + + ;;; Setup (eval-when (:compile-toplevel :execute) (defconstant +conflicting-symbols+ '(cl:close cl:stream-element-type cl:input-stream-p - cl:open-stream-p cl:output-stream-p cl:streamp))) + cl:open-stream-p cl:output-stream-p cl:streamp + cl:pathname cl:truename))) (let ((p (find-package "GRAY"))) (export '(nil) p) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index dfe1e4143..3d7206037 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -20,6 +20,7 @@ (type nil type-supplied-p) (system-p nil) &allow-other-keys) + (setf name (pathname name)) (let* ((format '()) (extension '())) (unless type-supplied-p diff --git a/src/h/external.h b/src/h/external.h index e61fc75d2..3953d9763 100755 --- a/src/h/external.h +++ b/src/h/external.h @@ -740,6 +740,8 @@ extern ECL_API cl_object ecl_file_position_set(cl_object strm, cl_object disp); extern ECL_API cl_object ecl_file_length(cl_object strm); extern ECL_API cl_object ecl_file_string_length(cl_object strm, cl_object string); extern ECL_API int ecl_file_column(cl_object strm); +extern ECL_API cl_object ecl_stream_pathname(cl_object strm); +extern ECL_API cl_object ecl_stream_truename(cl_object strm); extern ECL_API cl_fixnum ecl_normalize_stream_element_type(cl_object element); extern ECL_API cl_object ecl_make_stream_from_FILE(cl_object fname, void *fd, enum ecl_smmode smm, cl_fixnum byte_size, int flags, cl_object external_format); extern ECL_API cl_object ecl_make_stream_from_fd(cl_object fname, int fd, enum ecl_smmode smm, cl_fixnum byte_size, int flags, cl_object external_format); diff --git a/src/h/object.h b/src/h/object.h index 5c14796f6..e2159df97 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -600,6 +600,9 @@ struct ecl_file_ops { cl_object (*string_length)(cl_object strm, cl_object string); int (*column)(cl_object strm); + cl_object (*pathname)(cl_object strm); + cl_object (*truename)(cl_object strm); + cl_object (*close)(cl_object strm); }; From 6d667b940baf6ec56484310275745d8f0c01b374 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Thu, 25 Jan 2024 14:06:37 -0500 Subject: [PATCH 26/40] Update changelog for generic pathname/truename --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 8a605b86c..3904053a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,7 @@ ~cl:file-length~. 3) ~gray:stream-file-string-length~ which allows Gray streams to implement ~cl:file-string-length~. + 4) Generic versions of ~cl:pathname~ and ~cl:truename~. - Various bug fixes for Gray streams. * 23.9.9 changes since 21.2.1 From b3d3a4e31c4ebffef29d1a730f024005fce3b88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Thu, 11 Jan 2024 08:46:08 +0100 Subject: [PATCH 27/40] cleanup: update license to lgpl-2.1+ in both headers and text --- COPYING | 207 +++++++++++--------- LICENSE | 22 +-- msvc/ecl/config.h.msvc6 | 19 +- src/c/arch/fpe_none.c | 19 +- src/c/arch/fpe_x86.c | 23 +-- src/c/printer/integer_to_string.d | 14 +- src/clos/boot.lsp | 7 +- src/clos/builtin.lsp | 7 +- src/clos/change.lsp | 7 +- src/clos/combin.lsp | 7 +- src/clos/conditions.lsp | 8 +- src/clos/cpl.lsp | 7 +- src/clos/defclass.lsp | 7 +- src/clos/generic.lsp | 7 +- src/clos/hierarchy.lsp | 7 +- src/clos/inspect.lsp | 7 +- src/clos/kernel.lsp | 7 +- src/clos/method.lsp | 7 +- src/clos/package.lsp | 7 +- src/clos/print.lsp | 7 +- src/clos/slot.lsp | 7 +- src/clos/slotvalue.lsp | 7 +- src/clos/standard.lsp | 7 +- src/clos/std-accessors.lsp | 7 +- src/clos/std-slot-value.lsp | 7 +- src/clos/stdmethod.lsp | 7 +- src/clos/streams.lsp | 8 +- src/cmp/cmparray.lsp | 7 +- src/cmp/cmpbackend-cxx/cmpc-wt.lsp | 8 +- src/cmp/cmpbackend-cxx/cmppass2-data.lsp | 7 +- src/cmp/cmpbackend-cxx/cmppass2-ffi.lsp | 7 +- src/cmp/cmpbackend-cxx/cmppass2-fun.lsp | 7 +- src/cmp/cmpbackend-cxx/cmppass2-special.lsp | 8 +- src/cmp/cmpbackend-cxx/cmppass2-var.lsp | 7 +- src/cmp/cmpclos.lsp | 7 +- src/cmp/cmpdefs.lsp | 7 +- src/cmp/cmpenv-api.lsp | 8 +- src/cmp/cmpenv-declaim.lsp | 8 +- src/cmp/cmpenv-declare.lsp | 8 +- src/cmp/cmpenv-fun.lsp | 7 +- src/cmp/cmpenv-proclaim.lsp | 8 +- src/cmp/cmpform.lsp | 8 +- src/cmp/cmpfun.lsp | 7 +- src/cmp/cmpglobals.lsp | 8 +- src/cmp/cmpmain.lsp | 7 +- src/cmp/cmpmap.lsp | 7 +- src/cmp/cmpname.lsp | 7 +- src/cmp/cmpopt-clos.lsp | 7 +- src/cmp/cmpopt-constant.lsp | 8 +- src/cmp/cmpopt-sequence.lsp | 7 +- src/cmp/cmpopt-type.lsp | 7 +- src/cmp/cmpopt.lsp | 7 +- src/cmp/cmpos-features.lsp | 7 +- src/cmp/cmpos-run.lsp | 7 +- src/cmp/cmppass1-cont.lsp | 7 +- src/cmp/cmppass1-data.lsp | 8 +- src/cmp/cmppass1-eval.lsp | 7 +- src/cmp/cmppass1-ffi.lsp | 7 +- src/cmp/cmppass1-fun.lsp | 7 +- src/cmp/cmppass1-special.lsp | 7 +- src/cmp/cmppass1-top.lsp | 7 +- src/cmp/cmppass1-var.lsp | 7 +- src/cmp/cmpstructures.lsp | 7 +- src/cmp/cmptype-arith.lsp | 7 +- src/cmp/cmptype-assert.lsp | 7 +- src/cmp/cmptype-prop.lsp | 8 +- src/cmp/cmptype.lsp | 7 +- src/cmp/cmptypes.lsp | 8 +- src/cmp/cmputil.lsp | 7 +- src/cmp/cmpvar.lsp | 7 +- src/doc/ecl.man.in | 15 +- src/doc/help.lsp | 7 +- src/doc/manual/introduction/copyrights.txi | 60 +++--- src/h/cache.h | 17 +- src/h/config.h.in | 19 +- src/h/cons.h | 17 +- src/h/cs.h | 18 +- src/h/ecl-cmp.h | 19 +- src/h/ecl.h | 19 +- src/h/impl/math_dispatch.h | 18 +- src/h/impl/math_dispatch2.h | 18 +- src/h/impl/math_fenv.h | 18 +- src/h/impl/math_fenv_msvc.h | 18 +- src/h/internal.h | 18 +- src/h/legacy.h | 18 +- src/h/number.h | 18 +- src/h/object.h | 21 +- src/h/page.h | 19 +- src/h/stack-resize.h | 18 +- src/h/stacks.h | 21 +- src/lsp/arraylib.lsp | 7 +- src/lsp/assert.lsp | 7 +- src/lsp/autoload.lsp | 11 +- src/lsp/cmdline.lsp | 7 +- src/lsp/defmacro.lsp | 8 +- src/lsp/defstruct.lsp | 8 +- src/lsp/describe.lsp | 8 +- src/lsp/evalmacros.lsp | 7 +- src/lsp/export.lsp | 8 +- src/lsp/ffi.lsp | 7 +- src/lsp/helpfile.lsp | 7 +- src/lsp/iolib.lsp | 8 +- src/lsp/listlib.lsp | 8 +- src/lsp/mislib.lsp | 7 +- src/lsp/module.lsp | 7 +- src/lsp/mp.lsp | 7 +- src/lsp/numlib.lsp | 7 +- src/lsp/packlib.lsp | 7 +- src/lsp/predlib.lsp | 7 +- src/lsp/seq.lsp | 7 +- src/lsp/seqlib.lsp | 7 +- src/lsp/seqmacros.lsp | 7 +- src/lsp/setf.lsp | 7 +- src/lsp/top.lsp | 8 +- src/lsp/trace.lsp | 8 +- src/lsp/unicode.lsp | 8 +- 116 files changed, 418 insertions(+), 939 deletions(-) diff --git a/COPYING b/COPYING index eb685a5ec..4362b4915 100644 --- a/COPYING +++ b/COPYING @@ -1,112 +1,125 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. - GNU LIBRARY GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs @@ -133,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -255,7 +268,7 @@ distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - 6. As an exception to the Sections above, you may also compile or + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit @@ -282,23 +295,31 @@ of these things: Library will not necessarily be able to recompile the application to use the modified definitions.) - b) Accompany the work with a written offer, valid for at + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - c) If distribution of the work is made by offering access to copy + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - d) Verify that the user has already received a copy of these + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. @@ -347,7 +368,7 @@ Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent @@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. +versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. @@ -411,7 +432,7 @@ decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. @@ -434,9 +455,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Libraries + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that @@ -453,18 +474,18 @@ convey the exclusion of warranty; and each file should have at least the Copyright (C) This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. diff --git a/LICENSE b/LICENSE index a3ce81516..d67adebf1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,25 +1,25 @@ ---- BEGINNING OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------ - Copyright (c) 2019 Daniel Kochmański and Marius Gerbershagen + Copyright (c) 2019-2024 Daniel Kochmański and Marius Gerbershagen Copyright (c) 2015-2018, Daniel Kochmański Copyright (c) 2000-2013, Juan Jose Garcia Ripoll Copyright (c) 1990, 1991, 1993 Giuseppe Attardi Copyright (c) 1984 Taiichi Yuasa and Masami Hagiya All Rights Reserved - ECL is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version; see file 'Copying'. + ECL is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA PLEASE NOTE THAT: diff --git a/msvc/ecl/config.h.msvc6 b/msvc/ecl/config.h.msvc6 index c7402c673..286e653d9 100755 --- a/msvc/ecl/config.h.msvc6 +++ b/msvc/ecl/config.h.msvc6 @@ -1,17 +1,12 @@ /* - config.h.in -- Template configuration file. -*/ -/* - Copyright (c) 1990, Giuseppe Attardi. - Copyright (c) 2001, Juan Jose Garcia Ripoll. + * Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* config.h.in -- Template configuration file. */ #define ECL_MS_WINDOWS_HOST diff --git a/src/c/arch/fpe_none.c b/src/c/arch/fpe_none.c index 4473cf3db..aff3825e0 100644 --- a/src/c/arch/fpe_none.c +++ b/src/c/arch/fpe_none.c @@ -2,18 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - fpe_none.c -- Nonportable component of the floating point code (dummy) -*/ -/* - Copyright (c) 2005, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * fpe_none.c -- Nonportable component of the floating point code (dummy) + * + * Copyright (c) 2005, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ /* * The ecl_detect_fpe() is a macro (or a function) that detects whether a diff --git a/src/c/arch/fpe_x86.c b/src/c/arch/fpe_x86.c index fee335681..3aa50a0d3 100755 --- a/src/c/arch/fpe_x86.c +++ b/src/c/arch/fpe_x86.c @@ -2,23 +2,16 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - fpe_x86.c -- Nonportable component of the floating point code -*/ -/* - Copyright (c) 2005, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ - -/* - * See fpe_none.c for a description + * fpe_x86.c -- Nonportable component of the floating point code + * + * Copyright (c) 2005, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * */ +/* See fpe_none.c for a description. */ + #ifdef _MSC_VER # ifdef _WIN64 # error "This file shouldn't have been included!" diff --git a/src/c/printer/integer_to_string.d b/src/c/printer/integer_to_string.d index 7b1ab7d3d..8651a6b72 100644 --- a/src/c/printer/integer_to_string.d +++ b/src/c/printer/integer_to_string.d @@ -2,15 +2,11 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - Copyright (c) 2010, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../../Copyright' for full details. -*/ + * Copyright (c) 2010, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ #define ECL_INCLUDE_MATH_H #include diff --git a/src/clos/boot.lsp b/src/clos/boot.lsp index 618f4afd4..7cf94282a 100644 --- a/src/clos/boot.lsp +++ b/src/clos/boot.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi.o ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/builtin.lsp b/src/clos/builtin.lsp index 89f2f615f..7a2279bf4 100644 --- a/src/clos/builtin.lsp +++ b/src/clos/builtin.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/change.lsp b/src/clos/change.lsp index bb3b58ea7..ced4bf7db 100644 --- a/src/clos/change.lsp +++ b/src/clos/change.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/combin.lsp b/src/clos/combin.lsp index 480584a60..6fec61542 100644 --- a/src/clos/combin.lsp +++ b/src/clos/combin.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; ECoLisp is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/conditions.lsp b/src/clos/conditions.lsp index 4aeb57428..fbc3686f7 100644 --- a/src/clos/conditions.lsp +++ b/src/clos/conditions.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;; ;;; conditions.lsp ;;; diff --git a/src/clos/cpl.lsp b/src/clos/cpl.lsp index 413b24ffb..b9bc3ee52 100644 --- a/src/clos/cpl.lsp +++ b/src/clos/cpl.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/defclass.lsp b/src/clos/defclass.lsp index e65a04c1e..13d826cf7 100644 --- a/src/clos/defclass.lsp +++ b/src/clos/defclass.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/generic.lsp b/src/clos/generic.lsp index 327fd40c2..e89353126 100644 --- a/src/clos/generic.lsp +++ b/src/clos/generic.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/hierarchy.lsp b/src/clos/hierarchy.lsp index d2325b086..6c6b9ac0f 100644 --- a/src/clos/hierarchy.lsp +++ b/src/clos/hierarchy.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi.o ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;; ;;; COMMON LISP CLASSES HIERARCHY diff --git a/src/clos/inspect.lsp b/src/clos/inspect.lsp index 262864d32..03b3579ad 100644 --- a/src/clos/inspect.lsp +++ b/src/clos/inspect.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/kernel.lsp b/src/clos/kernel.lsp index b67265d53..c6f43826a 100644 --- a/src/clos/kernel.lsp +++ b/src/clos/kernel.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/method.lsp b/src/clos/method.lsp index 7d242f31b..29c883480 100644 --- a/src/clos/method.lsp +++ b/src/clos/method.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/package.lsp b/src/clos/package.lsp index 34509bc2e..cc970a577 100644 --- a/src/clos/package.lsp +++ b/src/clos/package.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (pushnew :cdr-1 *features*) diff --git a/src/clos/print.lsp b/src/clos/print.lsp index afa7d83bf..f90660934 100644 --- a/src/clos/print.lsp +++ b/src/clos/print.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/slot.lsp b/src/clos/slot.lsp index ccf76915f..f1166b3e1 100644 --- a/src/clos/slot.lsp +++ b/src/clos/slot.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/slotvalue.lsp b/src/clos/slotvalue.lsp index be2dbc54f..d6be73a19 100644 --- a/src/clos/slotvalue.lsp +++ b/src/clos/slotvalue.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi.o ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/standard.lsp b/src/clos/standard.lsp index 1da4ef613..155b27c5e 100644 --- a/src/clos/standard.lsp +++ b/src/clos/standard.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/std-accessors.lsp b/src/clos/std-accessors.lsp index 6c01454f8..5b1cfc9b6 100644 --- a/src/clos/std-accessors.lsp +++ b/src/clos/std-accessors.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi.o ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/std-slot-value.lsp b/src/clos/std-slot-value.lsp index 662f170d6..12db1bdf4 100644 --- a/src/clos/std-slot-value.lsp +++ b/src/clos/std-slot-value.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi.o ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/stdmethod.lsp b/src/clos/stdmethod.lsp index 97429c850..913ab78cd 100644 --- a/src/clos/stdmethod.lsp +++ b/src/clos/stdmethod.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1992, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "CLOS") diff --git a/src/clos/streams.lsp b/src/clos/streams.lsp index 27888cae0..384c11c48 100644 --- a/src/clos/streams.lsp +++ b/src/clos/streams.lsp @@ -4,13 +4,7 @@ ;;;; ;;;; Copyright (c) 2004, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. -;;;; The CLOS IO library. +;;;; See file 'LICENSE' for the copyright details. (in-package "GRAY") diff --git a/src/cmp/cmparray.lsp b/src/cmp/cmparray.lsp index 1a6540da8..eb0e52232 100644 --- a/src/cmp/cmparray.lsp +++ b/src/cmp/cmparray.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2008. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpbackend-cxx/cmpc-wt.lsp b/src/cmp/cmpbackend-cxx/cmpc-wt.lsp index 93dc130f2..ddb5b2ebb 100644 --- a/src/cmp/cmpbackend-cxx/cmpc-wt.lsp +++ b/src/cmp/cmpbackend-cxx/cmpc-wt.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPC-WT -- Routines for writing code to C files. ;;;; diff --git a/src/cmp/cmpbackend-cxx/cmppass2-data.lsp b/src/cmp/cmpbackend-cxx/cmppass2-data.lsp index 4d518a1b2..88d80ef5f 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-data.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-data.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPWT Output routines. diff --git a/src/cmp/cmpbackend-cxx/cmppass2-ffi.lsp b/src/cmp/cmpbackend-cxx/cmppass2-ffi.lsp index b6a628fc7..d0b3aed8f 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-ffi.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-ffi.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2003, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpbackend-cxx/cmppass2-fun.lsp b/src/cmp/cmpbackend-cxx/cmppass2-fun.lsp index 23baf92ec..d2574f402 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-fun.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-fun.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-special.lsp b/src/cmp/cmpbackend-cxx/cmppass2-special.lsp index d649804cb..e943e053d 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-special.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-special.lsp @@ -4,13 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. -;;;; +;;;; See file 'LICENSE' for the copyright details. (in-package #:compiler) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp index ae1ec2e09..b94e23704 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmpclos.lsp b/src/cmp/cmpclos.lsp index 20a3011cb..cc6cf0d67 100644 --- a/src/cmp/cmpclos.lsp +++ b/src/cmp/cmpclos.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2008. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpdefs.lsp b/src/cmp/cmpdefs.lsp index 839b3b7a9..217223109 100644 --- a/src/cmp/cmpdefs.lsp +++ b/src/cmp/cmpdefs.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPDEF -- Definitions created at compile / configuration time diff --git a/src/cmp/cmpenv-api.lsp b/src/cmp/cmpenv-api.lsp index 8f4aed3fe..f3939abd3 100644 --- a/src/cmp/cmpenv-api.lsp +++ b/src/cmp/cmpenv-api.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2009, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPENVAPI -- API for creating and manipulating environments ;;;; diff --git a/src/cmp/cmpenv-declaim.lsp b/src/cmp/cmpenv-declaim.lsp index 4b189b79d..b5154f8dd 100644 --- a/src/cmp/cmpenv-declaim.lsp +++ b/src/cmp/cmpenv-declaim.lsp @@ -6,13 +6,9 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; + ;;;; CMPENV-DECLAIM -- Proclamations local to the current file ;;;; ;;;; One implementation of DECLAIM that uses the compiler environment diff --git a/src/cmp/cmpenv-declare.lsp b/src/cmp/cmpenv-declare.lsp index 9e709970f..3ef5aa724 100644 --- a/src/cmp/cmpenv-declare.lsp +++ b/src/cmp/cmpenv-declare.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPENV-DECLARE -- Declarations for the compiler ;;;; diff --git a/src/cmp/cmpenv-fun.lsp b/src/cmp/cmpenv-fun.lsp index 0c55a5165..b43be843f 100644 --- a/src/cmp/cmpenv-fun.lsp +++ b/src/cmp/cmpenv-fun.lsp @@ -4,12 +4,9 @@ ;;;; ;;;; Copyright (c) 2009, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. +;;;; See file 'LICENSE' for the copyright details. ;;;; -;;;; See file '../Copyright' for full details. + ;;;; ;;;; CMPENV-FUN -- Declarations concerning function types and inlining ;;;; diff --git a/src/cmp/cmpenv-proclaim.lsp b/src/cmp/cmpenv-proclaim.lsp index 77c60cebf..e05e09e87 100644 --- a/src/cmp/cmpenv-proclaim.lsp +++ b/src/cmp/cmpenv-proclaim.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPENV-PROCLAIM -- Proclamations for the compiler ;;;; diff --git a/src/cmp/cmpform.lsp b/src/cmp/cmpform.lsp index 45fc4b8a4..b1d2b8982 100644 --- a/src/cmp/cmpform.lsp +++ b/src/cmp/cmpform.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2009, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPFORM -- Internal representation of Lisp forms ;;;; diff --git a/src/cmp/cmpfun.lsp b/src/cmp/cmpfun.lsp index 7b1908496..17fd983bf 100644 --- a/src/cmp/cmpfun.lsp +++ b/src/cmp/cmpfun.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmpglobals.lsp b/src/cmp/cmpglobals.lsp index 98078ea82..d7029bc8b 100644 --- a/src/cmp/cmpglobals.lsp +++ b/src/cmp/cmpglobals.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPGLOBALS -- Global variables and flag definitions ;;;; diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index cdf7e9c95..dfe1e4143 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -7,12 +7,7 @@ ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll ;;;; Copyright (c) 2015, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPMAIN Compiler main program. diff --git a/src/cmp/cmpmap.lsp b/src/cmp/cmpmap.lsp index 16d40a03f..3de1f9143 100644 --- a/src/cmp/cmpmap.lsp +++ b/src/cmp/cmpmap.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPMAP Map functions. diff --git a/src/cmp/cmpname.lsp b/src/cmp/cmpname.lsp index 4774816a3..dcd321fb1 100644 --- a/src/cmp/cmpname.lsp +++ b/src/cmp/cmpname.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2007, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPNAME Unambiguous init names for object files ;;;; diff --git a/src/cmp/cmpopt-clos.lsp b/src/cmp/cmpopt-clos.lsp index 83b30d8dc..0ff167986 100644 --- a/src/cmp/cmpopt-clos.lsp +++ b/src/cmp/cmpopt-clos.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2010. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpopt-constant.lsp b/src/cmp/cmpopt-constant.lsp index 7d9e4575d..d9fc87686 100644 --- a/src/cmp/cmpopt-constant.lsp +++ b/src/cmp/cmpopt-constant.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPOPT-CONSTANTS Constant expressions. ;;;; diff --git a/src/cmp/cmpopt-sequence.lsp b/src/cmp/cmpopt-sequence.lsp index e6f793572..716556480 100644 --- a/src/cmp/cmpopt-sequence.lsp +++ b/src/cmp/cmpopt-sequence.lsp @@ -6,12 +6,7 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpopt-type.lsp b/src/cmp/cmpopt-type.lsp index b81744971..715891f6f 100644 --- a/src/cmp/cmpopt-type.lsp +++ b/src/cmp/cmpopt-type.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2008. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; ;;;; CMPOPT-TYPE -- Optimizations for selected types of expresions ;;;; diff --git a/src/cmp/cmpopt.lsp b/src/cmp/cmpopt.lsp index a3b66d992..a0c77c8c1 100644 --- a/src/cmp/cmpopt.lsp +++ b/src/cmp/cmpopt.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2008. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpos-features.lsp b/src/cmp/cmpos-features.lsp index fab08074e..90bdc333c 100644 --- a/src/cmp/cmpos-features.lsp +++ b/src/cmp/cmpos-features.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPFEATURES.LSP -- Gather a list of features from the compiler diff --git a/src/cmp/cmpos-run.lsp b/src/cmp/cmpos-run.lsp index eafcc6019..8a0b11b12 100644 --- a/src/cmp/cmpos-run.lsp +++ b/src/cmp/cmpos-run.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPOS-RUN Executing auxiliary programs diff --git a/src/cmp/cmppass1-cont.lsp b/src/cmp/cmppass1-cont.lsp index ad4592d4a..d693690dc 100644 --- a/src/cmp/cmppass1-cont.lsp +++ b/src/cmp/cmppass1-cont.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-data.lsp b/src/cmp/cmppass1-data.lsp index e990a1680..7dd0641be 100644 --- a/src/cmp/cmppass1-data.lsp +++ b/src/cmp/cmppass1-data.lsp @@ -4,12 +4,8 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPDATA Data segment. ;;;; diff --git a/src/cmp/cmppass1-eval.lsp b/src/cmp/cmppass1-eval.lsp index f795cca64..a79d0c1c5 100644 --- a/src/cmp/cmppass1-eval.lsp +++ b/src/cmp/cmppass1-eval.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-ffi.lsp b/src/cmp/cmppass1-ffi.lsp index bc9ffa75d..fc4b6fcd5 100644 --- a/src/cmp/cmppass1-ffi.lsp +++ b/src/cmp/cmppass1-ffi.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-fun.lsp b/src/cmp/cmppass1-fun.lsp index 9bad5f480..4f889fc16 100644 --- a/src/cmp/cmppass1-fun.lsp +++ b/src/cmp/cmppass1-fun.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-special.lsp b/src/cmp/cmppass1-special.lsp index e40b681ae..088598e88 100644 --- a/src/cmp/cmppass1-special.lsp +++ b/src/cmp/cmppass1-special.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-top.lsp b/src/cmp/cmppass1-top.lsp index 22f6df3ca..9c23ab93f 100644 --- a/src/cmp/cmppass1-top.lsp +++ b/src/cmp/cmppass1-top.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmppass1-var.lsp b/src/cmp/cmppass1-var.lsp index 0d41aae6c..5a3c31765 100644 --- a/src/cmp/cmppass1-var.lsp +++ b/src/cmp/cmppass1-var.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/cmp/cmpstructures.lsp b/src/cmp/cmpstructures.lsp index 78d6e7b84..6fdd6ad25 100644 --- a/src/cmp/cmpstructures.lsp +++ b/src/cmp/cmpstructures.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2008. Juan Jose Garcia-Ripol ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmptype-arith.lsp b/src/cmp/cmptype-arith.lsp index 9e337f308..841544508 100644 --- a/src/cmp/cmptype-arith.lsp +++ b/src/cmp/cmptype-arith.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPTYPE-ARITH -- Operations upon and among types diff --git a/src/cmp/cmptype-assert.lsp b/src/cmp/cmptype-assert.lsp index 74c501c89..b2d37e839 100644 --- a/src/cmp/cmptype-assert.lsp +++ b/src/cmp/cmptype-assert.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2011, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPTYPE-ASSERT Type assertions automatically generated diff --git a/src/cmp/cmptype-prop.lsp b/src/cmp/cmptype-prop.lsp index 31b47045e..fccfad5d8 100644 --- a/src/cmp/cmptype-prop.lsp +++ b/src/cmp/cmptype-prop.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2009, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPTYPE-PROP -- Type propagation basic routines and database ;;;; diff --git a/src/cmp/cmptype.lsp b/src/cmp/cmptype.lsp index 155a0b02a..9effd01a3 100644 --- a/src/cmp/cmptype.lsp +++ b/src/cmp/cmptype.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; CMPTYPE Type information. diff --git a/src/cmp/cmptypes.lsp b/src/cmp/cmptypes.lsp index 053bc99c7..2821dcecd 100644 --- a/src/cmp/cmptypes.lsp +++ b/src/cmp/cmptypes.lsp @@ -4,12 +4,8 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; CMPTYPES -- Data types for the Lisp core structures ;;;; diff --git a/src/cmp/cmputil.lsp b/src/cmp/cmputil.lsp index c65412987..37588a84f 100644 --- a/src/cmp/cmputil.lsp +++ b/src/cmp/cmputil.lsp @@ -7,12 +7,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; ECoLisp is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "COMPILER") diff --git a/src/cmp/cmpvar.lsp b/src/cmp/cmpvar.lsp index 7347ab4f3..c6f1ee661 100644 --- a/src/cmp/cmpvar.lsp +++ b/src/cmp/cmpvar.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; Copyright (c) 2021, Daniel Kochmański ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package #:compiler) diff --git a/src/doc/ecl.man.in b/src/doc/ecl.man.in index 63ffacf0a..8a7c2509b 100644 --- a/src/doc/ecl.man.in +++ b/src/doc/ecl.man.in @@ -181,10 +181,19 @@ to official gitlab repository: . .SH LICENSE -ECL is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version; see file \fICOPYING\fP. -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. -You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2.1 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 51 +Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Please report bugs, comments, suggestions to the ecl mailing list: .MT ecl-devel@common-lisp.net diff --git a/src/doc/help.lsp b/src/doc/help.lsp index 6ff8608ed..8400e83f2 100644 --- a/src/doc/help.lsp +++ b/src/doc/help.lsp @@ -4,12 +4,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2 of the License, or -;;;; (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; setdoc.lsp ;;;; diff --git a/src/doc/manual/introduction/copyrights.txi b/src/doc/manual/introduction/copyrights.txi index 21ec0515b..ddece4268 100644 --- a/src/doc/manual/introduction/copyrights.txi +++ b/src/doc/manual/introduction/copyrights.txi @@ -10,43 +10,43 @@ notice which is shipped with ECL. @verbatim ---- BEGINNING OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------ -Copyright (C) 2019, Daniel Kochmanski and Marius Gerbershagen -Copyright (c) 2018, Daniel Kochmański -Copyright (c) 2013, Juan Jose Garcia Ripoll -Copyright (c) 1990, 1991, 1993 Giuseppe Attardi -Copyright (c) 1984 Taiichi Yuasa and Masami Hagiya -All Rights Reserved + Copyright (c) 2019-2024 Daniel Kochmański and Marius Gerbershagen + Copyright (c) 2015-2018, Daniel Kochmański + Copyright (c) 2000-2013, Juan Jose Garcia Ripoll + Copyright (c) 1990, 1991, 1993 Giuseppe Attardi + Copyright (c) 1984 Taiichi Yuasa and Masami Hagiya + All Rights Reserved -ECL is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2 of the License, or -(at your option) any later version; see file 'Copying'. + ECL is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Library General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. -You should have received a copy of the GNU Library General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -PLEASE NOTE THAT: + PLEASE NOTE THAT: -This license covers all of the ECL program except for the files -src/lsp/loop2.lsp ; Symbolic's LOOP macro -src/lsp/pprint.lsp ; CMUCL's pretty printer -src/lsp/format.lsp ; CMUCL's format -and the directories -contrib/ ; User contributed extensions -examples/ ; Examples for the ECL usage -Look the precise copyright of these extensions in the corresponding -files. + This license covers all of the ECL program except for the files + src/lsp/loop.lsp ; Symbolic's LOOP macro + src/lsp/pprint.lsp ; CMUCL's pretty printer + src/lsp/format.lsp ; CMUCL's format + and the directories + contrib/ ; User contributed extensions + examples/ ; Examples for the ECL usage + Look the precise copyright of these extensions in the corresponding + files. -Examples are licensed under: (SPDX-License-Identifier) BSD-2-Clause + Examples are licensed under: (SPDX-License-Identifier) BSD-2-Clause -Report bugs, comments, suggestions to the ecl mailing list: -ecl-devel@common-lisp.net. + Report bugs, comments, suggestions to the ecl mailing list: + ecl-devel@common-lisp.net. ---- END OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------------ @end verbatim diff --git a/src/h/cache.h b/src/h/cache.h index b4c5c7264..ff38755c2 100644 --- a/src/h/cache.h +++ b/src/h/cache.h @@ -2,18 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - cache.h -- thread-local cache for a variety of operations -*/ -/* - Copyright (c) 2011, Juan Jose Garcia Ripoll. + * Copyright (c) 2011, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* cache.h -- thread-local cache for a variety of operations */ #ifndef ECL_CACHE_H #define ECL_CACHE_H diff --git a/src/h/config.h.in b/src/h/config.h.in index dc554fe7c..e937e23be 100644 --- a/src/h/config.h.in +++ b/src/h/config.h.in @@ -2,19 +2,14 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - config.h.in -- Template configuration file. -*/ -/* - Copyright (c) 1990, Giuseppe Attardi. - Copyright (c) 2001, Juan Jose Garcia Ripoll. + * Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* config.h.in -- Template configuration file. */ #if defined(_MSC_VER) || defined(__MINGW32__) || __WIN32__ || __WIN64__ #define ECL_MS_WINDOWS_HOST diff --git a/src/h/cons.h b/src/h/cons.h index 235e78e9b..afb0eddbd 100644 --- a/src/h/cons.h +++ b/src/h/cons.h @@ -2,18 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - cons.h -- list manipulation macros & functions -*/ -/* - Copyright (c) 2011, Juan Jose Garcia-Ripoll + * Copyright (c) 2011, Juan Jose Garcia-Ripoll + * + * See file 'LICENSE' for the copyright details. + * + */ - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* cons.h -- list manipulation macros & functions */ #ifndef ECL_CONS_H #define ECL_CONS_H diff --git a/src/h/cs.h b/src/h/cs.h index 519273667..2d6ddc685 100644 --- a/src/h/cs.h +++ b/src/h/cs.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - cs.h -- C stack manipulation. -*/ -/* - Copyright (c) 1990, Giuseppe Attardi. - - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 1990, Giuseppe Attardi. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* cs.h -- C stack manipulation. */ /* *---------------------------------------------------------------------- diff --git a/src/h/ecl-cmp.h b/src/h/ecl-cmp.h index 13beb47d4..ba818cdcf 100755 --- a/src/h/ecl-cmp.h +++ b/src/h/ecl-cmp.h @@ -2,19 +2,14 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - ecl-cmp.h -- Include file for compiled code. -*/ -/* - Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. - Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. + * Copyright (c) 1990, Giuseppe Attardi. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECoLisp is free software; you can redistribute it and/or modify it under - the terms of the GNU General Library Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* ecl-cmp.h -- Include file for compiled code. */ #ifndef ECL_CMP_H #define ECL_CMP_H diff --git a/src/h/ecl.h b/src/h/ecl.h index 7825895b4..42e7b1dc2 100644 --- a/src/h/ecl.h +++ b/src/h/ecl.h @@ -2,19 +2,14 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - ecl.h -- Main headers for development of ECL -*/ -/* - Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. - Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. + * Copyright (c) 1990, Giuseppe Attardi. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* ecl.h -- Main headers for development of ECL */ #ifndef ECL_ECL_H #define ECL_ECL_H diff --git a/src/h/impl/math_dispatch.h b/src/h/impl/math_dispatch.h index 23f900206..227510cc6 100644 --- a/src/h/impl/math_dispatch.h +++ b/src/h/impl/math_dispatch.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - math_dispatch.h -- fast dispatch for math functions -*/ -/* - Copyright (c) 2010, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 2010, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* math_dispatch.h -- fast dispatch for math functions */ #ifndef ECL_MATH_DISPATCH_H #define ECL_MATH_DISPATCH_H diff --git a/src/h/impl/math_dispatch2.h b/src/h/impl/math_dispatch2.h index 971e36a7c..b052e9bca 100644 --- a/src/h/impl/math_dispatch2.h +++ b/src/h/impl/math_dispatch2.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - math_dispatch.h -- fast dispatch for math functions -*/ -/* - Copyright (c) 2010, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 2010, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* math_dispatch.h -- fast dispatch for math functions */ #ifndef ECL_MATH_DISPATCH2_H #define ECL_MATH_DISPATCH2_H diff --git a/src/h/impl/math_fenv.h b/src/h/impl/math_fenv.h index 2afbb9549..b815d6e09 100644 --- a/src/h/impl/math_fenv.h +++ b/src/h/impl/math_fenv.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - math_fenv.h -- inlined versions of fenv.h -*/ -/* - Copyright (c) 2010, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../../Copyright' for full details. -*/ + * Copyright (c) 2010, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* math_fenv.h -- inlined versions of fenv.h */ #ifndef ECL_MATH_FENV_H #define ECL_MATH_FENV_H diff --git a/src/h/impl/math_fenv_msvc.h b/src/h/impl/math_fenv_msvc.h index 6c50a9cc5..738ffc8fb 100644 --- a/src/h/impl/math_fenv_msvc.h +++ b/src/h/impl/math_fenv_msvc.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - math_msvc_fenv.h -- fake fenv.h using Microsoft Visual C++ -*/ -/* - Copyright (c) 2010, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../../Copyright' for full details. -*/ + * Copyright (c) 2010, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* math_msvc_fenv.h -- fake fenv.h using Microsoft Visual C++ */ #ifndef ECL_MATH_FENV_MSVC_H #define ECL_MATH_FENV_MSVC_H diff --git a/src/h/internal.h b/src/h/internal.h index d08fce085..846ae8b51 100755 --- a/src/h/internal.h +++ b/src/h/internal.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - internal.h -- Structures and functions that are not meant for the end user -*/ -/* - Copyright (c) 2001, Juan Jose Garcia Ripoll. - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* internal.h -- Structures and functions that are not meant for the end user */ #ifndef ECL_INTERNAL_H #define ECL_INTERNAL_H diff --git a/src/h/legacy.h b/src/h/legacy.h index 702edca0b..51cf720e7 100644 --- a/src/h/legacy.h +++ b/src/h/legacy.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - legacy.h -- Legacy macros, functions and names. -*/ -/* - Copyright (c) 2011, Juan Jose Garcia-Ripoll - - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 2011, Juan Jose Garcia-Ripoll + * + * See file 'LICENSE' for the copyright details. + * + */ +/* legacy.h -- Legacy macros, functions and names. */ #if !defined(ECL_LEGACY_H) && !defined(ECL_NO_LEGACY) #define ECL_LEGACY_H diff --git a/src/h/number.h b/src/h/number.h index 3d41b3a42..fbfad1de2 100644 --- a/src/h/number.h +++ b/src/h/number.h @@ -2,19 +2,13 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - number.h -- GMP interface. -*/ -/* - Copyright (c) 1995, Giuseppe Attardi. - - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ + * Copyright (c) 1995, Giuseppe Attardi. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* number.h -- GMP interface. */ #ifndef ECL_NUMBER_H #define ECL_NUMBER_H diff --git a/src/h/object.h b/src/h/object.h index 915cd2604..0b3c18d49 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -2,20 +2,15 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - object.h -- Data structure definitions. -*/ -/* - Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. - Copyright (c) 1990, Giuseppe Attardi. - Copyright (c) 2001, Juan Jose Garcia Ripoll. + * Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. + * Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* object.h -- Data structure definitions. */ #ifdef __cplusplus extern "C" { diff --git a/src/h/page.h b/src/h/page.h index 1760a0ee1..a7127f6bc 100644 --- a/src/h/page.h +++ b/src/h/page.h @@ -2,19 +2,12 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - page.h -- Page macros. -*/ -/* - Copyright (c) 1990, Giuseppe Attardi. - - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ - + * Copyright (c) 1990, Giuseppe Attardi. + * + * See file 'LICENSE' for the copyright details. + * + */ +/* page.h -- Page macros. */ #ifdef __cplusplus extern "C" { #endif diff --git a/src/h/stack-resize.h b/src/h/stack-resize.h index d7fe9434e..93e9ee6bb 100644 --- a/src/h/stack-resize.h +++ b/src/h/stack-resize.h @@ -1,19 +1,15 @@ /* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ -/* - internal.h -- safe stack resizing -*/ -/* - Copyright (c) 2001, Juan Jose Garcia Ripoll. - ECL is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. +/* + * Copyright (c) 2001, Juan Jose Garcia Ripoll. + * + * See file 'LICENSE' for the copyright details. + * + */ - See file '../Copyright' for full details. -*/ +/* internal.h -- safe stack resizing */ #ifndef ECL_STACK_RESIZE_H #define ECL_STACK_RESIZE_H diff --git a/src/h/stacks.h b/src/h/stacks.h index 761740f67..d5bdc69a0 100755 --- a/src/h/stacks.h +++ b/src/h/stacks.h @@ -2,20 +2,15 @@ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */ /* - stacks.h -- Bind/Jump/Frame stacks. -*/ -/* - Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. - Copyright (c) 1990, Giuseppe Attardi. - Copyright (c) 2000, Juan Jose Garcia-Ripoll + * Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. + * Copyright (c) 1990, Giuseppe Attardi. + * Copyright (c) 2000, Juan Jose Garcia-Ripoll + * + * See file 'LICENSE' for the copyright details. + * + */ - ECoLisp is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - See file '../Copyright' for full details. -*/ +/* stacks.h -- Bind/Jump/Frame stacks. */ #ifndef ECL_STACKS_H #define ECL_STACKS_H diff --git a/src/lsp/arraylib.lsp b/src/lsp/arraylib.lsp index 98bdfe659..ed40205b4 100644 --- a/src/lsp/arraylib.lsp +++ b/src/lsp/arraylib.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; arraylib.lsp ;;;; diff --git a/src/lsp/assert.lsp b/src/lsp/assert.lsp index 0a19eaab4..fe5db6997 100644 --- a/src/lsp/assert.lsp +++ b/src/lsp/assert.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "SYSTEM") diff --git a/src/lsp/autoload.lsp b/src/lsp/autoload.lsp index a6e16399b..60fed9682 100644 --- a/src/lsp/autoload.lsp +++ b/src/lsp/autoload.lsp @@ -6,16 +6,9 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. - - -;;; Program Development Environment +;;;; Program Development Environment (in-package "SYSTEM") diff --git a/src/lsp/cmdline.lsp b/src/lsp/cmdline.lsp index 9e1139f81..de016d5eb 100644 --- a/src/lsp/cmdline.lsp +++ b/src/lsp/cmdline.lsp @@ -6,12 +6,7 @@ ;;;; ;;;; Copyright (c) 2005, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package "SYSTEM") diff --git a/src/lsp/defmacro.lsp b/src/lsp/defmacro.lsp index 212778301..5d9b353b1 100644 --- a/src/lsp/defmacro.lsp +++ b/src/lsp/defmacro.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; defines SYS:DEFMACRO*, the defmacro preprocessor (in-package "SYSTEM") diff --git a/src/lsp/defstruct.lsp b/src/lsp/defstruct.lsp index fecb6ba68..767a0a736 100644 --- a/src/lsp/defstruct.lsp +++ b/src/lsp/defstruct.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; The structure routines. (in-package "SYSTEM") diff --git a/src/lsp/describe.lsp b/src/lsp/describe.lsp index 1973de65c..f16bcc125 100644 --- a/src/lsp/describe.lsp +++ b/src/lsp/describe.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;; DESCRIBE and INSPECT (in-package "SYSTEM") diff --git a/src/lsp/evalmacros.lsp b/src/lsp/evalmacros.lsp index 9bf0c456f..fada8e04c 100644 --- a/src/lsp/evalmacros.lsp +++ b/src/lsp/evalmacros.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "SYSTEM") diff --git a/src/lsp/export.lsp b/src/lsp/export.lsp index 8742a5da0..a5c6bc884 100644 --- a/src/lsp/export.lsp +++ b/src/lsp/export.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; Exporting external symbols of LISP package (eval-when (eval compile load) diff --git a/src/lsp/ffi.lsp b/src/lsp/ffi.lsp index 017aaaa99..a3fcdc983 100644 --- a/src/lsp/ffi.lsp +++ b/src/lsp/ffi.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2001, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; FFI Symbols used in the foreign function interface diff --git a/src/lsp/helpfile.lsp b/src/lsp/helpfile.lsp index 09c7cb326..c0a31c304 100644 --- a/src/lsp/helpfile.lsp +++ b/src/lsp/helpfile.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2001, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; (in-package "SYSTEM") diff --git a/src/lsp/iolib.lsp b/src/lsp/iolib.lsp index 7bd9a8e8a..c1846b976 100644 --- a/src/lsp/iolib.lsp +++ b/src/lsp/iolib.lsp @@ -6,12 +6,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; The IO library. (in-package "SYSTEM") diff --git a/src/lsp/listlib.lsp b/src/lsp/listlib.lsp index fbde2e1b0..40e60414a 100644 --- a/src/lsp/listlib.lsp +++ b/src/lsp/listlib.lsp @@ -5,12 +5,8 @@ ;;;; Copyright (c) 1995, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; list manipulating routines (in-package "SYSTEM") diff --git a/src/lsp/mislib.lsp b/src/lsp/mislib.lsp index dbb5bdb73..3502f5809 100644 --- a/src/lsp/mislib.lsp +++ b/src/lsp/mislib.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. (in-package "SYSTEM") diff --git a/src/lsp/module.lsp b/src/lsp/module.lsp index 86256463d..ad816fd3f 100644 --- a/src/lsp/module.lsp +++ b/src/lsp/module.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; module routines diff --git a/src/lsp/mp.lsp b/src/lsp/mp.lsp index 87eb18ddf..fe19ca1d6 100644 --- a/src/lsp/mp.lsp +++ b/src/lsp/mp.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 2003, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. #-threads (defpackage "MP" diff --git a/src/lsp/numlib.lsp b/src/lsp/numlib.lsp index ad0fb5312..bfea06aa8 100644 --- a/src/lsp/numlib.lsp +++ b/src/lsp/numlib.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; number routines diff --git a/src/lsp/packlib.lsp b/src/lsp/packlib.lsp index 630b34442..c09bfd39d 100644 --- a/src/lsp/packlib.lsp +++ b/src/lsp/packlib.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; package routines diff --git a/src/lsp/predlib.lsp b/src/lsp/predlib.lsp index 7af14d413..922dbb6f2 100644 --- a/src/lsp/predlib.lsp +++ b/src/lsp/predlib.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; predicate routines diff --git a/src/lsp/seq.lsp b/src/lsp/seq.lsp index af491d5f9..f97fd2cbb 100644 --- a/src/lsp/seq.lsp +++ b/src/lsp/seq.lsp @@ -6,12 +6,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; sequence routines diff --git a/src/lsp/seqlib.lsp b/src/lsp/seqlib.lsp index 95a8fc100..0a49937bc 100644 --- a/src/lsp/seqlib.lsp +++ b/src/lsp/seqlib.lsp @@ -5,12 +5,7 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; sequence routines diff --git a/src/lsp/seqmacros.lsp b/src/lsp/seqmacros.lsp index 131585b51..7cb8c9cc1 100644 --- a/src/lsp/seqmacros.lsp +++ b/src/lsp/seqmacros.lsp @@ -4,12 +4,7 @@ ;;;; ;;;; Copyright (c) 2010, Juan Jose Garcia-Ripoll ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; ;;;; SEQMACROS -- Macros that are used to expand sequence routines ;;;; diff --git a/src/lsp/setf.lsp b/src/lsp/setf.lsp index 3bee39aa4..af9fd1166 100644 --- a/src/lsp/setf.lsp +++ b/src/lsp/setf.lsp @@ -7,12 +7,7 @@ ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; Copyright (c) 2015, Daniel Kochmański. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; setf routines diff --git a/src/lsp/top.lsp b/src/lsp/top.lsp index 4d602e5b3..c9f7b6b29 100644 --- a/src/lsp/top.lsp +++ b/src/lsp/top.lsp @@ -7,12 +7,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; ;;;; Revised on July 11, by Carl Hoffman. ;;;; Modified Oct 1986 by Ken Rimey. diff --git a/src/lsp/trace.lsp b/src/lsp/trace.lsp index 8ba2c9bf1..0eb338494 100644 --- a/src/lsp/trace.lsp +++ b/src/lsp/trace.lsp @@ -5,12 +5,8 @@ ;;;; Copyright (c) 1990, Giuseppe Attardi. ;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. + ;;;; Tracer package for Common Lisp (in-package "SYSTEM") diff --git a/src/lsp/unicode.lsp b/src/lsp/unicode.lsp index 2bacc1d6a..6f4acca10 100644 --- a/src/lsp/unicode.lsp +++ b/src/lsp/unicode.lsp @@ -4,13 +4,9 @@ ;;;; ;;;; Copyright (c) 2011, Juan Jose Garcia-Ripoll. ;;;; -;;;; This program is free software; you can redistribute it and/or -;;;; modify it under the terms of the GNU Library General Public -;;;; License as published by the Free Software Foundation; either -;;;; version 2 of the License, or (at your option) any later version. -;;;; -;;;; See file '../Copyright' for full details. +;;;; See file 'LICENSE' for the copyright details. ;;;; + ;;;; unicode.lsp -- encoding and decoding ;;;; From 089f4c25d877050671a188aca20c3fbba0f69c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 26 Jan 2024 12:06:19 +0100 Subject: [PATCH 28/40] tests: make ansi-test a separate target not triggered by make check --- Makefile.in | 3 +++ src/Makefile.in | 3 +++ src/tests/Makefile.in | 6 ++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 005350f0c..961a4d45a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -115,6 +115,9 @@ realclean: distclean check: cd build && $(MAKE) check TESTS="$(TESTS)" +ansi-test: + cd build && $(MAKE) ansi-test + # ==================== Various means of distribution ==================== TAR_DIR=ecl-$(VERSION) diff --git a/src/Makefile.in b/src/Makefile.in index c439ae38b..5e50eb982 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -273,6 +273,9 @@ test_changes: check: cd tests && $(MAKE) clean && $(MAKE) check TESTS="$(TESTS)" +ansi-test: + cd tests && $(MAKE) clean && $(MAKE) ansi-test + # # Rebuild ECL using its own image and compare. Does not work # right now. diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 096898fed..f672a8826 100755 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -4,13 +4,11 @@ ECL=@prefix@/@bindir@/ecl@EXEEXT@ SHELL=/bin/bash -o pipefail -.PHONY: all check test ansi-test +.PHONY: all check ansi-test all: check -check: test ansi-test - -test: config.lsp +check: config.lsp $(ECL) --norc \ --load config.lsp \ --eval "(ecl-tests::run-tests '($(TESTS)))" \ From 34ecb5c313d5d2fd62a483b36126cc20eb83251d Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 28 Jan 2024 11:49:48 +0100 Subject: [PATCH 29/40] ecl_homedir_pathname: fix error message for unknown user Fixes #724 --- src/c/unixfsys.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index 326b1bcb2..570b07c8d 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -752,10 +752,10 @@ ecl_homedir_pathname(cl_object user) #ifdef HAVE_PWD_H pwent = getpwnam(p); if (pwent == NULL) - FEerror("Unknown user ~S.", 1, p); + FEerror("Unknown user ~S.", 1, user); namestring = ecl_make_simple_filename(pwent->pw_dir,-1); #endif - FEerror("Unknown user ~S.", 1, p); + FEerror("Unknown user ~S.", 1, user); } else if ((h = ecl_getenv(ecl_fstr("HOME")))) { namestring = ecl_make_simple_filename(h,-1); #if defined(ECL_MS_WINDOWS_HOST) From f6083876fd93c163f284768428f28ef1a3bbf448 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Mon, 1 Jan 2024 19:40:42 +0100 Subject: [PATCH 30/40] support shared libraries for the emscripten target --- INSTALL | 10 +++------- msvc/Makefile | 2 ++ src/aclocal.m4 | 4 ++++ src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp | 8 ++++++-- src/cmp/cmpdefs.lsp | 1 + src/compile.lsp.in | 6 ++++-- src/configure | 15 ++++++++++----- src/configure.ac | 1 + 8 files changed, 31 insertions(+), 16 deletions(-) diff --git a/INSTALL b/INSTALL index 1b399c0c2..961fc9241 100644 --- a/INSTALL +++ b/INSTALL @@ -127,9 +127,6 @@ Emscripten target is a little fickle so keep in mind that: - to build emscripten you need to use their SDK that provides the toolchain, and set the environment variable EMSDK_PATH -- the optimization level -O0 is forced because otherwsise binaryen miscompiles - ECL - 1. Build the host ECL #+begin_src shell-script @@ -166,7 +163,6 @@ After that activate the toolchain and configure build flags: --build=x86_64-pc-linux-gnu \ --with-cross-config=`pwd`/src/util/wasm32-unknown-emscripten.cross_config \ --prefix=`pwd`/ecl-emscripten \ - --disable-shared \ --with-tcp=no \ --with-cmp=no @@ -190,12 +186,12 @@ After that activate the toolchain and configure build flags: If the output does not show on the webpage then open the javascript console. This is a default html website produced by emscripten. -5. Build an external program linked against libecl.a +5. Build an external program linked against libecl.so The default stack size proposed by emscripten is 64KB. This is too little for -ECL, so when you build a program that is linked against libecl.a, then it is +ECL, so when you build a program that is linked against libecl.so, then it is imoprtant to specify a different size. For example: #+begin_src shell-script - emcc program.c -sSTACK_SIZE=1048576 lib/*.a -I./include -o program.o + emcc program.c -sSTACK_SIZE=1048576 lib/libecl.so -I./include -o program.o #+end_src diff --git a/msvc/Makefile b/msvc/Makefile index 6137d76c8..376c6af25 100755 --- a/msvc/Makefile +++ b/msvc/Makefile @@ -274,6 +274,7 @@ compile.lsp: bare.lsp $(srcdir)/compile.lsp.in Makefile "@LDFLAGS@" "$(LDFLAGS)" \ "@SHARED_LDFLAGS@" "$(SHARED_LDFLAGS)" \ "@BUNDLE_LDFLAGS@" "$(SHARED_LDFLAGS)" \ + "@PROGRAM_LDFLAGS@" "" \ "@CLIBS@" "$(CLIBS)" \ "@STATICLIBS@" "$(STATICLIBS)" \ "@LIBS@" "$(LIBS)" \ @@ -316,6 +317,7 @@ cmp/cmpdefs.lsp: $(srcdir)/cmp/cmpdefs.lsp Makefile "@LDFLAGS@" "$(LDFLAGS)" \ "@SHARED_LDFLAGS@" "$(SHARED_LDFLAGS)" \ "@BUNDLE_LDFLAGS@" "$(SHARED_LDFLAGS)" \ + "@PROGRAM_LDFLAGS@" "" \ "@CLIBS@" "$(CLIBS)" \ "@STATICLIBS@" "$(STATICLIBS)" \ "@OBJEXT@" "obj" \ diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 2e562c426..39fbe47a9 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -533,6 +533,10 @@ case "${host}" in enable_threads='no' enable_libffi='no' enable_gmp='portable' + with_c_gmp=yes + SHARED_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" + BUNDLE_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" + PROGRAM_LDFLAGS="-sMAIN_MODULE -sERROR_ON_UNDEFINED_SYMBOLS=0 ${LDFLAGS}" ;; esac diff --git a/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp b/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp index 778cb59fe..c32da866e 100644 --- a/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp +++ b/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp @@ -103,7 +103,9 @@ the environment variable TMPDIR to a different value." template)) #+msvc (defun linker-cc (o-pathname object-files &key (type :program) - (ld-flags (split-program-options *ld-flags*)) + (ld-flags (split-program-options (if (eq type :program) + *ld-program-flags* + *ld-flags*))) (ld-libs (split-program-options *ld-libs*))) (safe-run-program *ld* @@ -126,7 +128,9 @@ the environment variable TMPDIR to a different value." template)) #-msvc (defun linker-cc (o-pathname object-files &key (type :program) - (ld-flags (split-program-options *ld-flags*)) + (ld-flags (split-program-options (if (eq type :program) + *ld-program-flags* + *ld-flags*))) (ld-libs (split-program-options *ld-libs*))) (declare (ignore type)) (safe-run-program diff --git a/src/cmp/cmpdefs.lsp b/src/cmp/cmpdefs.lsp index 217223109..c3d873f8a 100644 --- a/src/cmp/cmpdefs.lsp +++ b/src/cmp/cmpdefs.lsp @@ -57,6 +57,7 @@ coprocessor).") (defvar *ld-shared-flags* "@SHARED_LDFLAGS@ @LDFLAGS@") #+dlopen (defvar *ld-bundle-flags* "@BUNDLE_LDFLAGS@ @LDFLAGS@") +(defvar *ld-program-flags* "@PROGRAM_LDFLAGS@ @LDFLAGS@") (defvar +shared-library-prefix+ "@SHAREDPREFIX@") (defvar +shared-library-extension+ "@SHAREDEXT@") diff --git a/src/compile.lsp.in b/src/compile.lsp.in index bf52484b7..d2c6d0b2b 100755 --- a/src/compile.lsp.in +++ b/src/compile.lsp.in @@ -95,7 +95,9 @@ c::*ld-shared-flags* "@SHARED_LDFLAGS@ @LDFLAGS@" c::*ld-bundle-flags* - "@BUNDLE_LDFLAGS@ @LDFLAGS@") + "@BUNDLE_LDFLAGS@ @LDFLAGS@" + c::*ld-program-flags* + "@PROGRAM_LDFLAGS@ @LDFLAGS@") ;;; FIXME: The nonstop platform does not support soname #+(and :wants-dlopen nonstop) (setf c::*ld-libs* @@ -182,7 +184,7 @@ (push "@LIBPREFIX@eclgmp.@LIBEXT@" extra-args))) (print extra-args) (c::shared-cc (compile-file-pathname "ecl" :type :dll) - (list* "c/main.@OBJEXT@" + (list* #-emscripten "c/main.@OBJEXT@" "c/all_symbols2.@OBJEXT@" "@LIBPREFIX@lsp.@LIBEXT@" "@LIBPREFIX@eclmin.@LIBEXT@" diff --git a/src/configure b/src/configure index 089a4afec..77b5fa357 100755 --- a/src/configure +++ b/src/configure @@ -739,6 +739,7 @@ LIBRARIES SUBDIRS TARGETS EXTRA_OBJS +PROGRAM_LDFLAGS BUNDLE_LDFLAGS SHARED_LDFLAGS CORE_LIBS @@ -3692,7 +3693,7 @@ test -z "${ecldir}" && ecldir="${libdir}/ecl-${PACKAGE_VERSION}" boehm_configure_flags="" - TARGETS='bin/ecl$(EXE)' + TARGETS='bin/ecl$(EXE)' SUBDIRS='c doc' LSP_FEATURES='*features*' @@ -5052,11 +5053,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} +if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_11=no + ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5098,11 +5099,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} +if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_98=no + ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6233,6 +6234,10 @@ LSP_FEATURES="(cons :android ${LSP_FEATURES})" enable_threads='no' enable_libffi='no' enable_gmp='portable' + with_c_gmp=yes + SHARED_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" + BUNDLE_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" + PROGRAM_LDFLAGS="-sMAIN_MODULE -sERROR_ON_UNDEFINED_SYMBOLS=0 ${LDFLAGS}" ;; esac diff --git a/src/configure.ac b/src/configure.ac index 5a2bcd4b6..ae3da8b0e 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -317,6 +317,7 @@ AC_SUBST(CORE_LIBS, []) dnl Locally compiled libs to link into dnl ecl/ecl_min/libecl.so and nowhere else. AC_SUBST(SHARED_LDFLAGS) dnl Flags for shared libraries linker AC_SUBST(BUNDLE_LDFLAGS) dnl Flags for FASL files linker +AC_SUBST(PROGRAM_LDFLAGS) dnl Flags for executable program linker AC_SUBST(EXTRA_OBJS) dnl Extra *.o files to be compiled into libecl.a AC_SUBST(TARGETS, ['bin/ecl$(EXE)'])dnl Versions of ECL to be built AC_SUBST(SUBDIRS, ['c doc']) dnl Subdirectories that make should process From 43b51a985f11b557abbe486b6ff3d32c83582d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Thu, 1 Feb 2024 20:05:15 +0100 Subject: [PATCH 31/40] manual: rewrite confusing section in the documentation --- src/doc/manual/extensions/ffi.txi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/doc/manual/extensions/ffi.txi b/src/doc/manual/extensions/ffi.txi index e0287b7b0..d07056d85 100644 --- a/src/doc/manual/extensions/ffi.txi +++ b/src/doc/manual/extensions/ffi.txi @@ -196,9 +196,14 @@ This function returns a C pointer for the given Lisp foreign object. Lisp foreign objects are constructed with functions @code{ecl_make_foreign_data} and @code{ecl_allocate_foreign_data}. -This data is a subject of the garbage collection (unlike lisp functions like -@code{si:allocate-foreign-object}). This is because the data producer here is -the "C world" and the data consumer is the "Lisp world". +The wrapper created with @code{ecl_make_foreign_data} is a subject of +garbage collection, but the pointer itself is not ``freed'', because +the data producer is ``C world'' and the consumer is ``Lisp world''. + +This is different from @code{si:allocate-foreign-object} where the +data producer is ``Lisp world'' and the consumer is ``C world''. In +this case the wrapper is not collected unless explicitly freed, and in +that case the allocate foreign data is also released. @end deftypefun @cppdef ecl_base_string_pointer_safe From 7bde88e813d36e96376111578dd1d71dfbd42a47 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sat, 27 Jan 2024 11:30:23 +0100 Subject: [PATCH 32/40] Makefile: allow both install and flatinstall targets --- Makefile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.in b/Makefile.in index 961a4d45a..ef55a07be 100644 --- a/Makefile.in +++ b/Makefile.in @@ -77,6 +77,8 @@ INSTALL_TARGET = @INSTALL_TARGET@ install: build/Makefile cd build; $(MAKE) $(INSTALL_TARGET) +flatinstall: build/Makefile + cd build; $(MAKE) flatinstall uninstall: cd build; $(MAKE) uninstall From 12bf1a52439b72ad7199fd58d04ce9e64f9b75f0 Mon Sep 17 00:00:00 2001 From: Dmitry Solomennikov Date: Sat, 3 Feb 2024 13:41:03 +0300 Subject: [PATCH 33/40] Fix Windows scripts (quotes missing) Signed-off-by: Dmitry Solomennikov --- msvc/util/ecl-cc.bat | 4 ++-- msvc/util/ecl-config.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/msvc/util/ecl-cc.bat b/msvc/util/ecl-cc.bat index 9ec5cb182..6ab3e4fea 100644 --- a/msvc/util/ecl-cc.bat +++ b/msvc/util/ecl-cc.bat @@ -11,10 +11,10 @@ IF NOT "%1" == "" ( goto LOOP ) -IF %CMDTYPE% == --compile ( +IF "%CMDTYPE%" == "--compile" ( cl @ECL_CFLAGS@ -I@includedir@ %CMDARGS% GOTO END -) ELSE IF %CMDTYPE% == --link ( +) ELSE IF "%CMDTYPE%" == "--link" ( cl %CMDARGS% @LDFLAGS@ @libdir@/ecl.lib GOTO END ) diff --git a/msvc/util/ecl-config.bat b/msvc/util/ecl-config.bat index ac681c64a..44d53e876 100644 --- a/msvc/util/ecl-config.bat +++ b/msvc/util/ecl-config.bat @@ -2,10 +2,10 @@ REM Script converted from ecl-config REM (Michael Goffioul) -IF %1 == --cflags ( +IF "%1" == "--cflags" ( ECHO @ECL_CFLAGS@ -I@includedir@ GOTO END -) ELSE IF %1 == --libs ( +) ELSE IF "%1" == "--libs" ( ECHO @LDFLAGS@ /link /LIBPATH:@libdir@ ecl.lib @CLIBS@ GOTO END ) From cedf45a779bfb14a5f739116c65910a0d3265bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Thu, 1 Feb 2024 20:13:21 +0100 Subject: [PATCH 34/40] manual: fix typo --- src/doc/manual/extensions/ffi.txi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/doc/manual/extensions/ffi.txi b/src/doc/manual/extensions/ffi.txi index d07056d85..ce4ae56a6 100644 --- a/src/doc/manual/extensions/ffi.txi +++ b/src/doc/manual/extensions/ffi.txi @@ -202,8 +202,9 @@ the data producer is ``C world'' and the consumer is ``Lisp world''. This is different from @code{si:allocate-foreign-object} where the data producer is ``Lisp world'' and the consumer is ``C world''. In -this case the wrapper is not collected unless explicitly freed, and in -that case the allocate foreign data is also released. +that case the wrapper is not collected unless explicitly released with +@code{si:free-foreign-object} in which case the allocated foreign data +is also released. @end deftypefun @cppdef ecl_base_string_pointer_safe From 6c7f8be6a92fb6b0ea32c6d6e06159bc882a2cee Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sat, 27 Jan 2024 11:32:14 +0100 Subject: [PATCH 35/40] use flatinstall as install target for emscripten --- INSTALL | 6 +++--- src/aclocal.m4 | 1 + src/configure | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 961fc9241..b3c471537 100644 --- a/INSTALL +++ b/INSTALL @@ -169,14 +169,14 @@ After that activate the toolchain and configure build flags: emmake make && emmake make install # some files need to be copied manually - cp build/bin/ecl.js build/bin/ecl.wasm ecl-emscripten/bin + cp build/bin/ecl.js build/bin/ecl.wasm ecl-emscripten/ #+end_src 4. ECL may be hosted on a web page. Assuming that you have quicklisp installed: #+begin_src shell-script export WEBSERVER=`pwd`/src/util/webserver.lisp - pushd ecl-emscripten/bin + pushd ecl-emscripten/ lisp --load $WEBSERVER # After the server is loaded run: # firefox localhost:8888/ecl.html @@ -193,5 +193,5 @@ ECL, so when you build a program that is linked against libecl.so, then it is imoprtant to specify a different size. For example: #+begin_src shell-script - emcc program.c -sSTACK_SIZE=1048576 lib/libecl.so -I./include -o program.o + emcc program.c -sSTACK_SIZE=1048576 libecl.so -I./ -o program.o #+end_src diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 39fbe47a9..c55b51839 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -537,6 +537,7 @@ case "${host}" in SHARED_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" BUNDLE_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" PROGRAM_LDFLAGS="-sMAIN_MODULE -sERROR_ON_UNDEFINED_SYMBOLS=0 ${LDFLAGS}" + INSTALL_TARGET='flatinstall' ;; esac diff --git a/src/configure b/src/configure index 77b5fa357..4cf037291 100755 --- a/src/configure +++ b/src/configure @@ -6238,6 +6238,7 @@ LSP_FEATURES="(cons :android ${LSP_FEATURES})" SHARED_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" BUNDLE_LDFLAGS="-shared -sSIDE_MODULE ${LDFLAGS}" PROGRAM_LDFLAGS="-sMAIN_MODULE -sERROR_ON_UNDEFINED_SYMBOLS=0 ${LDFLAGS}" + INSTALL_TARGET='flatinstall' ;; esac From f180c617b7dbf9c11e7f2473bf35ab8e22b281f5 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Thu, 15 Feb 2024 10:51:30 -0800 Subject: [PATCH 36/40] Improve examples in the manual --- src/doc/manual/extensions/building.txi | 39 ++++++++++++++++--------- src/doc/manual/user-guide/embedding.txi | 11 +++++-- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/doc/manual/extensions/building.txi b/src/doc/manual/extensions/building.txi index 628896941..71231eaa0 100644 --- a/src/doc/manual/extensions/building.txi +++ b/src/doc/manual/extensions/building.txi @@ -302,12 +302,15 @@ format. In case of @emph{Portable FASL} the bytecodes compiler is needed. @node Compiling with ASDF @subsection Compiling with ASDF -First, let's disregard the simple situation in which we write Lisp -without depending on any other Lisp libraries. A more practical example -is to build a library that depends on other -@uref{https://common-lisp.net/project/asdf/,asdf}, systems. ECL provides -a useful extension for asdf called @code{asdf:make-build}, which offers -an abstraction for building libraries directly from system definitions. +For larger systems involving more complex file dependencies, or for systems +that are portable across different Common Lisp implementations, it may be +better to define systems using @uref{https://common-lisp.net/project/asdf/,asdf}. + +ECL provides a useful extension for asdf called @code{asdf:make-build}, which +offers an abstraction for building libraries directly from system definitions. +Note that this extension is only available in the ASDF that is shipped with +ECL; it may not be available from an ASDF installed from the system or from +Quicklisp. To download dependencies you may use @uref{https://www.quicklisp.org,Quicklisp} to load your system (with @@ -328,14 +331,22 @@ the fact that other libraries may be loaded). @node Example code to build @subsubsection Example code to build -We use a simple project that depends on @code{alexandria} to -demonstrate the interface. The example consists of -@code{example-with-dep.asd}, @code{package.lisp} and -@code{example.lisp} (included in the -@code{examples/asdf_with_dependence/} directory in the ECL source -tree). Before any kind of build you need to push the full path of -this directory to @code{asdf:*central-registry*} (or link it in a -location already recognized by ASDF). +An example project is included in the ECL source distribution in the +@code{examples/asdf_with_dependence/} directory. + +This project depends on the @code{alexandria} library and consists of a system +definition (@code{example-with-dep.asd}), package definition +(@code{package.lisp}), and the actual library code (@code{example.lisp}). + +Before following the steps below, you must +@uref{https://asdf.common-lisp.dev/asdf/Configuring-ASDF-to-find-your-systems.html,configure ASDF to find your systems}. +You can either copy or symlink the example directory in one of the standard +ASDF locations, or push the path of the example directory to your +@code{asdf:*central-registry*}, for example: + +@lisp +(push "./" asdf:*central-registry*) +@end lisp @node Build it as an single executable @subsubsection Build it as an single executable diff --git a/src/doc/manual/user-guide/embedding.txi b/src/doc/manual/user-guide/embedding.txi index ac0fd0c85..8ce25c2d4 100644 --- a/src/doc/manual/user-guide/embedding.txi +++ b/src/doc/manual/user-guide/embedding.txi @@ -5,8 +5,15 @@ * Embedding ECL - Embedding Reference:: @end menu -@c @node Embedding ECL - Introduction -@c @subsection Introduction +@subsection Minimal Example + +An example project is included in the ECL source distribution in the +@code{examples/embed/} directory. + +This example consists of a Common Lisp library (@code{hello-lisp.lisp}) and a +system definition (@code{hello-lisp.asd}, @xref{Compiling with ASDF}) that is +called from a C program (@code{hello.c}). The example @code{Makefile} shows how +to build a static library from the Lisp library and link it with the C program. @node Embedding ECL - Embedding Reference @subsection Embedding Reference From 9e7d981b569f8bad4e8fe6efe42ba6a136fe969b Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 10 Mar 2024 16:39:25 +0100 Subject: [PATCH 37/40] update changelog for the upcoming release --- CHANGELOG | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3904053a0..93b07075c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,8 +27,41 @@ install ECL on the preferred destination (specified with "--prefix" parameter given to configure script). -* Pending changes since 23.9.9 +* Pending changes since 24.x.x +- Many internal improvements and bug fixes for the native compiler + +* 24.x.x changes since 23.9.9 +** Announcement +Dear Community, + +We are announcing a new stable ECL release. The release mainly includes a +number of bug fixes, including changes that prevent rare crashes in the +garbage collector on Mac OS X, some bug fixes for gray streams and for +pathname related functionality. Moreover, the release features new +extensions for gray streams (gray:stream-line-length, +gray:stream-file-length, gray:stream-file-string-length and generic +versions of cl:pathname and cl:truename) as well as improved emscripten +support (allowing shared library builds) and small improvements to the +manual. + +We'd like to thank all people who contributed to ECL with code, testing, +issue reports and otherwise. + +People listed here contributed code in this iteration: Daniel Kochmański, +Kirill A. Korinsky, Marius Gerbershagen, Tarn W. Burton, Mark Shroyer, +Dmitry Solomennikov, Kevin Zheng. + +This release is available for download in a form of a source code archive +(we do not ship prebuilt binaries): + +- [ECL 24.x.x tarball archive](https://common-lisp.net/project/ecl/static/files/release/ecl-24.x.x.tgz) +- [The ECL Manual](https://common-lisp.net/project/ecl/static/manual/) + +Happy Hacking, +The ECL Developers + +** Enhancements - Add gray-streams module. This makes it possible to load Gray stream support via ~(require '#:gray-streams)~ versus calling the internal function ~gray::redefine-cl-functions~. @@ -41,7 +74,13 @@ 3) ~gray:stream-file-string-length~ which allows Gray streams to implement ~cl:file-string-length~. 4) Generic versions of ~cl:pathname~ and ~cl:truename~. +- The emscripten target now supports shared libraries. + +** Bugs fixed - Various bug fixes for Gray streams. +- The garbarge collector is set up to automatically handle fork calls on + Unix systems, preventing rare crashes on Mac OS X (where bdwgc does not + enable this option by default). * 23.9.9 changes since 21.2.1 ** Announcement From 4ddfd0c5e302d0530e21623fd6d10e8dbb9032bf Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 10 Mar 2024 17:28:00 +0100 Subject: [PATCH 38/40] bytecmp: fix bugs in handling output-file option for compile-file Always load the output file with the bytecodes loader and (as specified) return the truename of the output-file. --- contrib/bytecmp/bytecmp.lsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/bytecmp/bytecmp.lsp b/contrib/bytecmp/bytecmp.lsp index 86bebbae1..3e5064020 100755 --- a/contrib/bytecmp/bytecmp.lsp +++ b/contrib/bytecmp/bytecmp.lsp @@ -122,8 +122,8 @@ (write binary :stream sout :circle t :escape t :readably t :pretty nil)) (terpri sout))))) (when load - (load output-file :verbose *compile-verbose*)) - (values output-file nil nil)) + (si::load-bytecodes output-file *compile-verbose* *load-print* :default)) + (values (truename output-file) nil nil)) (defun install-bytecodes-compiler () (ext::package-lock (find-package :cl) nil) From 9756360b3cd8a179d4e9bcf0eb56609a7eca35f7 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 10 Mar 2024 18:48:47 +0100 Subject: [PATCH 39/40] pathname: fix bug in handling streams ecl_stream_pathname returns a string and not a pathname, so we have to check for that again. --- src/c/pathname.d | 1 + 1 file changed, 1 insertion(+) diff --git a/src/c/pathname.d b/src/c/pathname.d index 79865ce51..4805feeea 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -749,6 +749,7 @@ cl_pathname(cl_object x) default: if (!Null(cl_streamp(x))) { x = ecl_stream_pathname(x); + goto L; } else { const char *type = "(OR FILE-STREAM STRING PATHNAME)"; FEwrong_type_only_arg(@[pathname], x, ecl_read_from_cstring(type)); From cf7c1950189756e1d74bda66ee97997fadb6d874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 10 May 2024 13:13:21 +0200 Subject: [PATCH 40/40] Release 24.5.10 --- CHANGELOG | 6 +- msvc/Makefile | 4 +- src/configure | 2138 +++++++++++++++++++++++------------------- src/configure.ac | 2 +- src/ecl/configpre.h | 298 +++--- src/gmp/config.guess | 65 +- src/gmp/config.sub | 224 +++-- src/gmp/install-sh | 8 +- 8 files changed, 1546 insertions(+), 1199 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 93b07075c..59a80d0de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,11 +27,11 @@ install ECL on the preferred destination (specified with "--prefix" parameter given to configure script). -* Pending changes since 24.x.x +* Pending changes since 24.5.10 - Many internal improvements and bug fixes for the native compiler -* 24.x.x changes since 23.9.9 +* 24.5.10 changes since 23.9.9 ** Announcement Dear Community, @@ -55,7 +55,7 @@ Dmitry Solomennikov, Kevin Zheng. This release is available for download in a form of a source code archive (we do not ship prebuilt binaries): -- [ECL 24.x.x tarball archive](https://common-lisp.net/project/ecl/static/files/release/ecl-24.x.x.tgz) +- [ECL 24.5.10 tarball archive](https://common-lisp.net/project/ecl/static/files/release/ecl-24.5.10.tgz) - [The ECL Manual](https://common-lisp.net/project/ecl/static/manual/) Happy Hacking, diff --git a/msvc/Makefile b/msvc/Makefile index 376c6af25..7b2f540ba 100755 --- a/msvc/Makefile +++ b/msvc/Makefile @@ -10,8 +10,8 @@ srcdir = ..\src SHORT_SITE_NAME = LONG_SITE_NAME = -ECL_VERSION = 23.9.9 -ECL_VERSION_NUMBER= 230909 +ECL_VERSION = 24.5.10 +ECL_VERSION_NUMBER= 240510 ARCHITECTURE = PENTIUM4 SOFTWARE_TYPE = NT SOFTWARE_VERSION = 5.0 diff --git a/src/configure b/src/configure index 4cf037291..b24cfc441 100755 --- a/src/configure +++ b/src/configure @@ -1,10 +1,10 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ecl 23.9.9. +# Generated by GNU Autoconf 2.72 for ecl 24.5.10. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -16,7 +16,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -25,12 +24,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -102,7 +102,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -132,15 +132,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -148,12 +147,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -171,8 +171,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -186,14 +187,15 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -226,12 +228,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -253,7 +256,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -272,7 +275,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -311,14 +315,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -387,11 +383,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -405,21 +402,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -493,6 +483,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -541,7 +533,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -553,9 +544,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -580,10 +571,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -992,7 +985,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1205,7 +1198,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1221,7 +1214,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1251,8 +1244,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1260,7 +1253,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1310,7 +1303,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1378,7 +1371,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1406,7 +1399,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ecl 23.9.9 to adapt to many kinds of systems. +'configure' configures ecl 24.5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1420,11 +1413,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1432,10 +1425,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1476,7 +1469,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ecl 23.9.9:";; + short | recursive ) echo "Configuration of ecl 24.5.10:";; esac cat <<\_ACEOF @@ -1591,7 +1584,7 @@ Some influential environment variables: CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. @@ -1658,10 +1651,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ecl configure 23.9.9 -generated by GNU Autoconf 2.71 +ecl configure 24.5.10 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1700,11 +1693,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1739,11 +1733,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1777,11 +1772,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1819,11 +1815,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1847,8 +1844,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1856,10 +1853,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1879,15 +1878,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -1898,7 +1897,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -1917,11 +1916,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1942,8 +1943,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -1973,12 +1974,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2017,12 +2020,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2042,8 +2046,8 @@ printf %s "checking for int$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ @@ -2084,12 +2088,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - case $ac_type in #( +else case e in #( + e) case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; +esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -2098,10 +2103,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2122,8 +2129,8 @@ printf %s "checking for uint$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ @@ -2155,10 +2162,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2180,8 +2189,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2205,12 +2214,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2242,8 +2253,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ecl $as_me 23.9.9, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by ecl $as_me 24.5.10, which was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2489,10 +2500,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2528,9 +2539,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2544,6 +2553,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2571,16 +2595,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2630,7 +2657,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -2696,6 +2722,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -2717,7 +2745,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3133,8 +3161,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3162,12 +3191,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3176,18 +3205,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3203,11 +3232,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3236,8 +3265,9 @@ fi if test ${with_cross_config+y} then : withval=$with_cross_config; -else $as_nop - with_cross_config="`pwd`/cross_config" +else case e in #( + e) with_cross_config="`pwd`/cross_config" ;; +esac fi @@ -3245,8 +3275,9 @@ fi if test ${enable_shared+y} then : enableval=$enable_shared; -else $as_nop - enable_shared=yes +else case e in #( + e) enable_shared=yes ;; +esac fi @@ -3254,8 +3285,9 @@ fi if test ${enable_rpath+y} then : enableval=$enable_rpath; -else $as_nop - enable_rpath=yes +else case e in #( + e) enable_rpath=yes ;; +esac fi @@ -3263,8 +3295,9 @@ fi if test ${enable_threads+y} then : enableval=$enable_threads; -else $as_nop - enable_threads=auto +else case e in #( + e) enable_threads=auto ;; +esac fi @@ -3272,8 +3305,9 @@ fi if test ${enable_boehm+y} then : enableval=$enable_boehm; -else $as_nop - enable_boehm=auto +else case e in #( + e) enable_boehm=auto ;; +esac fi @@ -3281,8 +3315,9 @@ fi if test ${enable_libatomic+y} then : enableval=$enable_libatomic; -else $as_nop - enable_libatomic=auto +else case e in #( + e) enable_libatomic=auto ;; +esac fi @@ -3290,8 +3325,9 @@ fi if test ${enable_soname+y} then : enableval=$enable_soname; -else $as_nop - enable_soname=yes +else case e in #( + e) enable_soname=yes ;; +esac fi @@ -3299,8 +3335,9 @@ fi if test ${enable_gmp+y} then : enableval=$enable_gmp; -else $as_nop - enable_gmp=auto +else case e in #( + e) enable_gmp=auto ;; +esac fi @@ -3309,8 +3346,9 @@ fi if test ${with_C_gmp+y} then : withval=$with_C_gmp; with_c_gmp=yes; with_system_gmp=no -else $as_nop - with_c_gmp=no +else case e in #( + e) with_c_gmp=no ;; +esac fi @@ -3319,8 +3357,9 @@ fi if test ${with_system_gmp+y} then : withval=$with_system_gmp; -else $as_nop - with_system_gmp="auto" +else case e in #( + e) with_system_gmp="auto" ;; +esac fi @@ -3329,8 +3368,9 @@ fi if test ${with_gmp+y} then : withval=$with_gmp; -else $as_nop - with_gmp_args="" +else case e in #( + e) with_gmp_args="" ;; +esac fi @@ -3339,8 +3379,9 @@ fi if test ${with_gmp_args+y} then : withval=$with_gmp_args; -else $as_nop - with_gmp_args="" +else case e in #( + e) with_gmp_args="" ;; +esac fi @@ -3421,8 +3462,9 @@ fi if test ${with_cxx+y} then : withval=$with_cxx; -else $as_nop - with_cxx=no +else case e in #( + e) with_cxx=no ;; +esac fi @@ -3431,8 +3473,9 @@ fi if test ${with_tcp+y} then : withval=$with_tcp; -else $as_nop - with_tcp=yes +else case e in #( + e) with_tcp=yes ;; +esac fi @@ -3441,8 +3484,9 @@ fi if test ${with_serve_event+y} then : withval=$with_serve_event; -else $as_nop - with_serve_event=${enable_shared} +else case e in #( + e) with_serve_event=${enable_shared} ;; +esac fi @@ -3451,8 +3495,9 @@ fi if test ${with_clos_streams+y} then : withval=$with_clos_streams; -else $as_nop - with_clos_streams=yes +else case e in #( + e) with_clos_streams=yes ;; +esac fi @@ -3461,8 +3506,9 @@ fi if test ${with_cmuformat+y} then : withval=$with_cmuformat; -else $as_nop - with_cmuformat=${with_clos_streams} +else case e in #( + e) with_cmuformat=${with_clos_streams} ;; +esac fi @@ -3471,8 +3517,9 @@ fi if test ${with_asdf+y} then : withval=$with_asdf; -else $as_nop - with_asdf=yes +else case e in #( + e) with_asdf=yes ;; +esac fi @@ -3481,8 +3528,9 @@ fi if test ${with_defsystem+y} then : withval=$with_defsystem; -else $as_nop - with_defsystem=no +else case e in #( + e) with_defsystem=no ;; +esac fi @@ -3491,8 +3539,9 @@ fi if test ${with_cmp+y} then : withval=$with_cmp; -else $as_nop - with_cmp=yes +else case e in #( + e) with_cmp=yes ;; +esac fi @@ -3501,8 +3550,9 @@ fi if test ${with_bytecmp+y} then : withval=$with_bytecmp; -else $as_nop - with_bytecmp=yes +else case e in #( + e) with_bytecmp=yes ;; +esac fi @@ -3511,8 +3561,9 @@ fi if test ${with_rt+y} then : withval=$with_rt; -else $as_nop - with_rt=no +else case e in #( + e) with_rt=no ;; +esac fi @@ -3521,8 +3572,9 @@ fi if test ${with_profile+y} then : withval=$with_profile; -else $as_nop - with_profile=no +else case e in #( + e) with_profile=no ;; +esac fi @@ -3531,8 +3583,9 @@ fi if test ${with_dffi+y} then : withval=$with_dffi; enable_libffi=${withval} -else $as_nop - enable_libffi=auto +else case e in #( + e) enable_libffi=auto ;; +esac fi @@ -3541,8 +3594,9 @@ fi if test ${with_fpe+y} then : withval=$with_fpe; -else $as_nop - with_fpe=yes +else case e in #( + e) with_fpe=yes ;; +esac fi @@ -3551,8 +3605,9 @@ fi if test ${with_signed_zero+y} then : withval=$with_signed_zero; -else $as_nop - with_signed_zero="yes" +else case e in #( + e) with_signed_zero="yes" ;; +esac fi @@ -3561,8 +3616,9 @@ fi if test ${with_ieee_fp+y} then : withval=$with_ieee_fp; -else $as_nop - with_ieee_fp="yes" +else case e in #( + e) with_ieee_fp="yes" ;; +esac fi @@ -3571,8 +3627,9 @@ fi if test ${with_sse+y} then : withval=$with_sse; -else $as_nop - with_sse="no" +else case e in #( + e) with_sse="no" ;; +esac fi @@ -3580,8 +3637,9 @@ fi if test ${enable_unicode+y} then : enableval=$enable_unicode; -else $as_nop - enable_unicode=32 +else case e in #( + e) enable_unicode=32 ;; +esac fi @@ -3589,8 +3647,9 @@ fi if test ${enable_c99complex+y} then : enableval=$enable_c99complex; enable_c99complex=${enableval} -else $as_nop - enable_c99complex=auto +else case e in #( + e) enable_c99complex=auto ;; +esac fi @@ -3598,8 +3657,9 @@ fi if test ${enable_smallcons+y} then : enableval=$enable_smallcons; enable_smallcons=${enableval} -else $as_nop - enable_smallcons=yes +else case e in #( + e) enable_smallcons=yes ;; +esac fi @@ -3607,8 +3667,9 @@ fi if test ${enable_gengc+y} then : enableval=$enable_gengc; enable_gengc=${enableval} -else $as_nop - enable_gengc=no +else case e in #( + e) enable_gengc=no ;; +esac fi @@ -3616,8 +3677,9 @@ fi if test ${enable_precisegc+y} then : enableval=$enable_precisegc; enable_precisegc=${enableval} -else $as_nop - enable_precisegc=no +else case e in #( + e) enable_precisegc=no ;; +esac fi @@ -3625,8 +3687,9 @@ fi if test ${enable_serialization+y} then : enableval=$enable_serialization; -else $as_nop - enable_serialization=no +else case e in #( + e) enable_serialization=no ;; +esac fi @@ -3642,8 +3705,9 @@ fi if test ${with_debug_cflags+y} then : withval=$with_debug_cflags; -else $as_nop - with_debug_cflags="no" +else case e in #( + e) with_debug_cflags="no" ;; +esac fi @@ -3652,8 +3716,9 @@ fi if test ${with_profile_cflags+y} then : withval=$with_profile_cflags; -else $as_nop - with_profile_cflags="no" +else case e in #( + e) with_profile_cflags="no" ;; +esac fi @@ -3662,8 +3727,9 @@ fi if test ${with_extra_files+y} then : withval=$with_extra_files; with_extra_files="${withval}" -else $as_nop - with_extra_files="" +else case e in #( + e) with_extra_files="" ;; +esac fi @@ -3672,8 +3738,9 @@ fi if test ${with_init_form+y} then : withval=$with_init_form; with_init_form="${withval}" -else $as_nop - with_init_form="" +else case e in #( + e) with_init_form="" ;; +esac fi @@ -3681,8 +3748,9 @@ fi if test ${enable_manual+y} then : enableval=$enable_manual; enable_manual=${enableval} -else $as_nop - enable_manual=auto +else case e in #( + e) enable_manual=auto ;; +esac fi @@ -3710,15 +3778,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -3745,14 +3814,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -3798,8 +3868,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3821,7 +3891,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3843,8 +3914,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3866,7 +3937,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3901,8 +3973,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3924,7 +3996,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3946,8 +4019,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3986,7 +4059,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4010,8 +4084,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4033,7 +4107,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4059,8 +4134,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4082,7 +4157,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4120,8 +4196,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4143,7 +4219,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4165,8 +4242,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4188,7 +4265,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4217,10 +4295,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4292,8 +4370,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -4313,7 +4391,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -4324,8 +4402,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -4334,13 +4413,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -4364,10 +4444,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -4377,11 +4457,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4397,6 +4478,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -4436,26 +4519,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4487,16 +4571,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -4507,8 +4593,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4525,12 +4611,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -4548,8 +4636,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -4567,8 +4655,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4583,8 +4671,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4601,12 +4689,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -4633,8 +4724,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4651,25 +4742,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4679,8 +4773,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4697,25 +4791,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4725,8 +4822,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4743,25 +4840,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -4798,8 +4898,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CXX"; then +else case e in #( + e) if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4821,7 +4921,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then @@ -4847,8 +4948,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CXX"; then +else case e in #( + e) if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4870,7 +4971,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then @@ -4930,8 +5032,8 @@ printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4948,12 +5050,14 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } @@ -4971,8 +5075,8 @@ printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cxx_werror_flag=$ac_cxx_werror_flag +else case e in #( + e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" @@ -4990,8 +5094,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes -else $as_nop - CXXFLAGS="" +else case e in #( + e) CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5006,8 +5110,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : -else $as_nop - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else case e in #( + e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5024,12 +5128,15 @@ if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag + ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } @@ -5056,8 +5163,8 @@ printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_cxx11=no +else case e in #( + e) ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5074,25 +5181,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" + CXX="$CXX $ac_cv_prog_cxx_cxx11" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 + ac_prog_cxx_stdcxx=cxx11 ;; +esac fi fi if test x$ac_prog_cxx_stdcxx = xno @@ -5102,8 +5212,8 @@ printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_cxx98=no +else case e in #( + e) ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5120,25 +5230,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" + CXX="$CXX $ac_cv_prog_cxx_cxx98" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 + ac_prog_cxx_stdcxx=cxx98 ;; +esac fi fi @@ -5163,8 +5276,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -5182,9 +5295,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5198,15 +5312,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -5215,7 +5330,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -5238,9 +5354,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5254,24 +5371,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -5288,8 +5407,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then +else case e in #( + e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5311,7 +5430,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -5333,8 +5453,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then +else case e in #( + e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5356,7 +5476,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -5403,8 +5524,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -5458,7 +5579,8 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -5499,8 +5621,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF +else case e in #( + e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -5512,7 +5634,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make +rm -f conftest.make ;; +esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -5532,8 +5655,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then +else case e in #( + e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5555,7 +5678,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -5577,8 +5701,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then +else case e in #( + e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5600,7 +5724,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -5634,8 +5759,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then +else case e in #( + e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5657,7 +5782,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -5679,8 +5805,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then +else case e in #( + e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5702,7 +5828,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -5737,8 +5864,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CTAGS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CTAGS"; then +else case e in #( + e) if test -n "$CTAGS"; then ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5760,7 +5887,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then @@ -5784,8 +5912,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ETAGS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ETAGS"; then +else case e in #( + e) if test -n "$ETAGS"; then ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5807,7 +5935,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then @@ -6286,8 +6415,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_INSTALL_INFO+y} then : printf %s "(cached) " >&6 -else $as_nop - case $INSTALL_INFO in +else case e in #( + e) case $INSTALL_INFO in [\\/]* | ?:[\\/]*) ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. ;; @@ -6312,6 +6441,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi INSTALL_INFO=$ac_cv_path_INSTALL_INFO @@ -6344,8 +6474,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MAKEINFO+y} then : printf %s "(cached) " >&6 -else $as_nop - case $MAKEINFO in +else case e in #( + e) case $MAKEINFO in [\\/]* | ?:[\\/]*) ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. ;; @@ -6370,6 +6500,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi MAKEINFO=$ac_cv_path_MAKEINFO @@ -6452,16 +6583,22 @@ printf %s "checking for __gmpz_init in -lgmp... " >&6; } if test ${ac_cv_lib_gmp___gmpz_init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __gmpz_init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __gmpz_init (void); int main (void) { @@ -6473,20 +6610,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gmp___gmpz_init=yes -else $as_nop - ac_cv_lib_gmp___gmpz_init=no +else case e in #( + e) ac_cv_lib_gmp___gmpz_init=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 printf "%s\n" "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes then : with_system_gmp=yes -else $as_nop - with_system_gmp=no +else case e in #( + e) with_system_gmp=no ;; +esac fi ;; esac @@ -6498,16 +6638,22 @@ printf %s "checking for __gmpz_init in -lgmp... " >&6; } if test ${ac_cv_lib_gmp___gmpz_init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __gmpz_init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __gmpz_init (void); int main (void) { @@ -6519,20 +6665,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gmp___gmpz_init=yes -else $as_nop - ac_cv_lib_gmp___gmpz_init=no +else case e in #( + e) ac_cv_lib_gmp___gmpz_init=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 printf "%s\n" "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes then : FASL_LIBS="${FASL_LIBS} -lgmp" -else $as_nop - as_fn_error $? "System gmp library requested but not found." "$LINENO" 5 +else case e in #( + e) as_fn_error $? "System gmp library requested but not found." "$LINENO" 5 ;; +esac fi ac_header= ac_cache= @@ -6695,16 +6844,22 @@ printf %s "checking for getpwnam in -lsun... " >&6; } if test ${ac_cv_lib_sun_getpwnam+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsun $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char getpwnam (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getpwnam (void); int main (void) { @@ -6716,12 +6871,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sun_getpwnam=yes -else $as_nop - ac_cv_lib_sun_getpwnam=no +else case e in #( + e) ac_cv_lib_sun_getpwnam=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5 printf "%s\n" "$ac_cv_lib_sun_getpwnam" >&6; } @@ -6738,15 +6895,21 @@ printf %s "checking for library containing strerror... " >&6; } if test ${ac_cv_search_strerror+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char strerror (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (void); int main (void) { @@ -6777,11 +6940,13 @@ done if test ${ac_cv_search_strerror+y} then : -else $as_nop - ac_cv_search_strerror=no +else case e in #( + e) ac_cv_search_strerror=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 printf "%s\n" "$ac_cv_search_strerror" >&6; } @@ -6902,16 +7067,22 @@ printf %s "checking for GC_malloc in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_malloc+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_malloc (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_malloc (void); int main (void) { @@ -6923,12 +7094,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_malloc=yes -else $as_nop - ac_cv_lib_gc_GC_malloc=no +else case e in #( + e) ac_cv_lib_gc_GC_malloc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_malloc" >&6; } @@ -6938,8 +7111,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi else @@ -6948,16 +7122,22 @@ printf %s "checking for GC_get_thr_restart_signal in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_get_thr_restart_signal+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_get_thr_restart_signal (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_get_thr_restart_signal (void); int main (void) { @@ -6969,12 +7149,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_get_thr_restart_signal=yes -else $as_nop - ac_cv_lib_gc_GC_get_thr_restart_signal=no +else case e in #( + e) ac_cv_lib_gc_GC_get_thr_restart_signal=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_get_thr_restart_signal" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_get_thr_restart_signal" >&6; } @@ -6984,8 +7166,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GC_register_my_thread in -lgc" >&5 @@ -6993,16 +7176,22 @@ printf %s "checking for GC_register_my_thread in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_register_my_thread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_register_my_thread (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_register_my_thread (void); int main (void) { @@ -7014,12 +7203,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_register_my_thread=yes -else $as_nop - ac_cv_lib_gc_GC_register_my_thread=no +else case e in #( + e) ac_cv_lib_gc_GC_register_my_thread=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_register_my_thread" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_register_my_thread" >&6; } @@ -7029,8 +7220,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GC_set_start_callback in -lgc" >&5 @@ -7038,16 +7230,22 @@ printf %s "checking for GC_set_start_callback in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_set_start_callback+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_set_start_callback (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_set_start_callback (void); int main (void) { @@ -7059,12 +7257,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_set_start_callback=yes -else $as_nop - ac_cv_lib_gc_GC_set_start_callback=no +else case e in #( + e) ac_cv_lib_gc_GC_set_start_callback=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_set_start_callback" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_set_start_callback" >&6; } @@ -7074,8 +7274,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi fi @@ -7084,8 +7285,9 @@ fi if test "x$ac_cv_header_gc_gc_h" = xyes then : ECL_BOEHM_GC_HEADER='gc/gc.h' -else $as_nop - system_boehm=no +else case e in #( + e) system_boehm=no ;; +esac fi fi @@ -7186,16 +7388,22 @@ printf %s "checking for ffi_closure_alloc in -lffi... " >&6; } if test ${ac_cv_lib_ffi_ffi_closure_alloc+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lffi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ffi_closure_alloc (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_closure_alloc (void); int main (void) { @@ -7207,20 +7415,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ffi_ffi_closure_alloc=yes -else $as_nop - ac_cv_lib_ffi_ffi_closure_alloc=no +else case e in #( + e) ac_cv_lib_ffi_ffi_closure_alloc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_closure_alloc" >&5 printf "%s\n" "$ac_cv_lib_ffi_ffi_closure_alloc" >&6; } if test "x$ac_cv_lib_ffi_ffi_closure_alloc" = xyes then : system_libffi=yes -else $as_nop - system_libffi=no +else case e in #( + e) system_libffi=no ;; +esac fi if test "${system_libffi}" = yes; then @@ -7235,8 +7446,9 @@ fi if test "x$ac_cv_header_ffi_h" = xyes then : ECL_LIBFFI_HEADER='ffi.h' -else $as_nop - system_libffi=no +else case e in #( + e) system_libffi=no ;; +esac fi fi @@ -7350,7 +7562,7 @@ then : withval=$with_x; fi -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +# $have_x is 'yes', 'no', 'disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled @@ -7360,8 +7572,8 @@ else *,NONE | NONE,*) if test ${ac_cv_have_x+y} then : printf %s "(cached) " >&6 -else $as_nop - # One or both of the vars are not set, and there is no cached value. +else case e in #( + e) # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no # Do we need to do anything special at all? @@ -7484,13 +7696,14 @@ if ac_fn_c_try_cpp "$LINENO" then : # We can compile using X headers with no special include directory. ac_x_includes= -else $as_nop - for ac_dir in $ac_x_header_dirs; do +else case e in #( + e) for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi -done +done ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no @@ -7517,8 +7730,8 @@ then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= -else $as_nop - LIBS=$ac_save_LIBS +else case e in #( + e) LIBS=$ac_save_LIBS for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! @@ -7528,7 +7741,8 @@ do break 2 fi done -done +done ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -7545,6 +7759,7 @@ case $ac_x_includes,$ac_x_libraries in #( ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" ;; +esac ;; esac fi ;; #( @@ -7571,14 +7786,14 @@ fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> @@ -7595,10 +7810,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" -else $as_nop - eval "$as_ac_Header=no" +else case e in #( + e) eval "$as_ac_Header=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -7606,7 +7823,7 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -7620,15 +7837,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -7659,11 +7882,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -7680,15 +7905,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -7719,11 +7950,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -7745,25 +7978,25 @@ printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -printf %s "checking for stdbool.h that conforms to C99... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99 or later" >&5 +printf %s "checking for stdbool.h that conforms to C99 or later... " >&6; } if test ${ac_cv_header_stdbool_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef __bool_true_false_are_defined - #error "__bool_true_false_are_defined is not defined" - #endif - char a[__bool_true_false_are_defined == 1 ? 1 : -1]; + /* "true" and "false" should be usable in #if expressions and + integer constant expressions, and "bool" should be a valid + type name. - /* Regardless of whether this is C++ or "_Bool" is a - valid type name, "true" and "false" should be usable - in #if expressions and integer constant expressions, - and "bool" should be a valid type name. */ + Although C99 requires bool, true, and false to be macros, + C23 and C++11 overrule that, so do not test for that. + Although C99 requires __bool_true_false_are_defined and + _Bool, C23 says they are obsolescent, so do not require + them. */ #if !true #error "'true' is not true" @@ -7797,43 +8030,12 @@ else $as_nop char n[sizeof m == h * sizeof m[0] ? 1 : -1]; char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ bool p = true; bool *pp = &p; - /* C 1999 specifies that bool, true, and false are to be - macros, but C++ 2011 and later overrule this. */ - #if __cplusplus < 201103 - #ifndef bool - #error "bool is not defined" - #endif - #ifndef false - #error "false is not defined" - #endif - #ifndef true - #error "true is not defined" - #endif - #endif - - /* If _Bool is available, repeat with it all the tests - above that used bool. */ - #ifdef HAVE__BOOL - struct sB { _Bool s: 1; _Bool t; } t; - - char q[(_Bool) 0.5 == true ? 1 : -1]; - char r[(_Bool) 0.0 == false ? 1 : -1]; - char u[sizeof (_Bool) > 0 ? 1 : -1]; - char v[sizeof t.t > 0 ? 1 : -1]; - - _Bool w[h]; - char x[sizeof m == h * sizeof m[0] ? 1 : -1]; - char y[-1 - (_Bool) 0 < 0 ? 1 : -1]; - _Bool z = true; - _Bool *pz = &p; - #endif - int main (void) { @@ -7842,20 +8044,10 @@ main (void) *pp |= p; *pp |= ! p; - #ifdef HAVE__BOOL - _Bool pt = &t; - *pz |= z; - *pz |= ! z; - #endif - /* Refer to every declared value, so they cannot be discarded as unused. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k - + !l + !m + !n + !o + !p + !pp + !ps - #ifdef HAVE__BOOL - + !q + !r + !u + !v + !w + !x + !y + !z + !pt - #endif - ); + return (!b + !c + !d + !e + !f + !g + !h + !i + !j + !k + + !l + !m + !n + !o + !p + !pp + !ps); ; return 0; @@ -7864,10 +8056,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stdbool_h=yes -else $as_nop - ac_cv_header_stdbool_h=no +else case e in #( + e) ac_cv_header_stdbool_h=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } @@ -7883,8 +8077,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then +else case e in #( + e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7903,9 +8097,10 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in +case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -7940,7 +8135,8 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -7955,8 +8151,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -7978,9 +8174,10 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in +case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -8016,12 +8213,15 @@ else ac_cv_path_EGREP=$EGREP fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP @@ -8195,8 +8395,8 @@ printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8260,10 +8460,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no +else case e in #( + e) ac_cv_c_const=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } @@ -8277,8 +8479,8 @@ printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_inline=no +else case e in #( + e) ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8296,7 +8498,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf "%s\n" "$ac_cv_c_inline" >&6; } @@ -8320,18 +8523,19 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8349,10 +8553,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h -else $as_nop - ac_cv_struct_tm=sys/time.h +else case e in #( + e) ac_cv_struct_tm=sys/time.h ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } @@ -8367,8 +8573,8 @@ printf %s "checking for working volatile... " >&6; } if test ${ac_cv_c_volatile+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8385,10 +8591,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_volatile=yes -else $as_nop - ac_cv_c_volatile=no +else case e in #( + e) ac_cv_c_volatile=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 printf "%s\n" "$ac_cv_c_volatile" >&6; } @@ -8432,8 +8640,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_long_long=yes -else $as_nop - ac_cv_c_long_long=no +else case e in #( + e) ac_cv_c_long_long=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8442,12 +8651,12 @@ if test $ac_cv_c_long_long = yes; then if test "x$ECL_LONG_LONG_BITS" = "x"; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8470,7 +8679,8 @@ then : eval "`cat conftestval`" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -8499,8 +8709,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_bigendian=unknown +else case e in #( + e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8546,8 +8756,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif @@ -8578,8 +8788,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8623,8 +8834,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8651,22 +8863,23 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - extern int foo; - -int -main (void) -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} + int + main (int argc, char **argv) + { + /* Intimidate the compiler so that it does not + optimize the arrays away. */ + char *p = argv[0]; + ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; + ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; + return use_ascii (argc) == use_ebcdic (*p); + } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -8675,9 +8888,10 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -8700,14 +8914,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else $as_nop - ac_cv_c_bigendian=yes +else case e in #( + e) ac_cv_c_bigendian=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -8741,12 +8958,12 @@ printf %s "checking appropriate type for fixnums... " >&6; } if test -z "${CL_FIXNUM_TYPE}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8827,7 +9044,8 @@ then : eval "`cat conftestval`" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9008,12 +9226,12 @@ printf %s "checking character sequence for end of line... " >&6; } if test -z "${ECL_NEWLINE}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9053,7 +9271,8 @@ then : ECL_NEWLINE=`cat conftestval` fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9078,8 +9297,9 @@ ac_fn_c_check_func "$LINENO" "_longjmp" "ac_cv_func__longjmp" if test "x$ac_cv_func__longjmp" = xyes then : ECL_SETJMP="_setjmp";ECL_LONGJMP="_longjmp" -else $as_nop - ECL_SETJMP="setjmp";ECL_LONGJMP="longjmp" +else case e in #( + e) ECL_SETJMP="setjmp";ECL_LONGJMP="longjmp" ;; +esac fi @@ -9191,8 +9411,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : sse_included=yes -else $as_nop - sse_included=no +else case e in #( + e) sse_included=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -9217,8 +9438,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : sse_included=yes -else $as_nop - sse_included=no +else case e in #( + e) sse_included=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -9249,8 +9471,9 @@ then : printf "%s\n" "#define HAVE_FLOAT_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi ac_fn_c_check_type "$LINENO" "double complex" "ac_cv_type_double_complex" "#include " @@ -9260,8 +9483,9 @@ then : printf "%s\n" "#define HAVE_DOUBLE_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi ac_fn_c_check_type "$LINENO" "long complex" "ac_cv_type_long_complex" "#include " @@ -9271,8 +9495,9 @@ then : printf "%s\n" "#define HAVE_LONG_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi fi @@ -9280,16 +9505,17 @@ fi for ac_func in crealf creal creall cimagf cimag cimagl cabsf cabs cabsl conjf conj conjl csqrtf csqrt csqrtl ccosf ccos ccosl csinf csin csinl ctanf ctan ctanl ccoshf ccosh ccoshl csinhf csinh csinhl ctanhf ctanh ctanhl cexpf cexp cexpl cpowf cpow cpowl clogf clog clogl casinf casin casinl cacosf cacos cacosl catanf catan catanl casinhf casinh casinhl cacoshf cacosh cacoshl catanhf catanh catanhl do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi done @@ -9311,12 +9537,12 @@ printf %s "checking whether stack growns downwards... " >&6; } if test -z "${ECL_STACK_DIR}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9352,11 +9578,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ECL_STACK_DIR=down -else $as_nop - ECL_STACK_DIR=up +else case e in #( + e) ECL_STACK_DIR=up ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9374,8 +9602,8 @@ printf %s "checking for $CC options needed to detect all undeclared functions... if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS +else case e in #( + e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" @@ -9394,8 +9622,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - # This test program should compile successfully. +else case e in #( + e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the @@ -9423,26 +9651,29 @@ then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg +else case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac fi break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( +See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : @@ -9474,8 +9705,8 @@ printf %s "checking whether closedir returns void... " >&6; } if test ${ac_cv_func_closedir_void+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header_dirent> @@ -9493,10 +9724,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_closedir_void=no -else $as_nop - ac_cv_func_closedir_void=yes +else case e in #( + e) ac_cv_func_closedir_void=yes ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 printf "%s\n" "$ac_cv_func_closedir_void" >&6; } @@ -9511,8 +9744,8 @@ printf %s "checking for error_at_line... " >&6; } if test ${ac_cv_lib_error_at_line+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9526,11 +9759,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_error_at_line=yes -else $as_nop - ac_cv_lib_error_at_line=no +else case e in #( + e) ac_cv_lib_error_at_line=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; } @@ -9549,8 +9784,8 @@ fi if test "x$ac_cv_type_pid_t" = xyes then : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ @@ -9569,14 +9804,16 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' +else case e in #( + e) ac_pid_type='__int64' ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - + ;; +esac fi @@ -9603,19 +9840,19 @@ printf %s "checking for working fork... " >&6; } if test ${ac_cv_func_fork_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_fork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { - /* By Ruediger Kuhlmann. */ + /* By R. Kuhlmann. */ return fork () < 0; ; @@ -9625,13 +9862,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fork_works=yes -else $as_nop - ac_cv_func_fork_works=no +else case e in #( + e) ac_cv_func_fork_works=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 printf "%s\n" "$ac_cv_func_fork_works" >&6; } @@ -9659,12 +9899,12 @@ printf %s "checking for working vfork... " >&6; } if test ${ac_cv_func_vfork_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_vfork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default @@ -9775,13 +10015,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_vfork_works=yes -else $as_nop - ac_cv_func_vfork_works=no +else case e in #( + e) ac_cv_func_vfork_works=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 printf "%s\n" "$ac_cv_func_vfork_works" >&6; } @@ -9808,69 +10051,25 @@ printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h fi -if test $ac_cv_c_compiler_gnu = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -printf %s "checking whether $CC needs -traditional... " >&6; } -if test ${ac_cv_prog_gcc_traditional+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -else $as_nop - ac_cv_prog_gcc_traditional=no -fi -rm -rf conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -fi -rm -rf conftest* - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 printf %s "checking for GNU libc compatible malloc... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9888,13 +10087,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop - ac_cv_func_malloc_0_nonnull=no +else case e in #( + e) ac_cv_func_malloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } @@ -9903,8 +10105,8 @@ then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -9914,7 +10116,8 @@ esac printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h - + ;; +esac fi @@ -9923,12 +10126,12 @@ printf %s "checking for working memcmp... " >&6; } if test ${ac_cv_func_memcmp_working+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_memcmp_working=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -9966,13 +10169,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_memcmp_working=yes -else $as_nop - ac_cv_func_memcmp_working=no +else case e in #( + e) ac_cv_func_memcmp_working=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 printf "%s\n" "$ac_cv_func_memcmp_working" >&6; } @@ -9992,8 +10198,8 @@ printf %s "checking for working mmap... " >&6; } if test ${ac_cv_func_mmap_fixed_mapped+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. @@ -10001,8 +10207,8 @@ then : # If we don't know, assume the worst. *) ac_cv_func_mmap_fixed_mapped=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ @@ -10023,21 +10229,21 @@ $ac_includes_default VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ + propagated back to all the places they're supposed to be. */ #include #include -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE +#ifndef getpagesize +/* Prefer sysconf to the legacy getpagesize function, as getpagesize has + been removed from POSIX and is limited to page sizes that fit in 'int'. */ # ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ +# define getpagesize() sysconf (_SC_PAGESIZE) +# elif defined _SC_PAGE_SIZE +# define getpagesize() sysconf (_SC_PAGE_SIZE) +# elif HAVE_GETPAGESIZE +int getpagesize (); +# else # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE @@ -10061,16 +10267,15 @@ $ac_includes_default # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ +# endif +#endif int main (void) { char *data, *data2, *data3; const char *cdata2; - int i, pagesize; + long i, pagesize; int fd, fd2; pagesize = getpagesize (); @@ -10104,8 +10309,7 @@ main (void) if (*(data2 + i)) return 7; close (fd2); - if (munmap (data2, pagesize)) - return 8; + /* 'return 8;' not currently used. */ /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that @@ -10142,13 +10346,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_mmap_fixed_mapped=yes -else $as_nop - ac_cv_func_mmap_fixed_mapped=no +else case e in #( + e) ac_cv_func_mmap_fixed_mapped=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } @@ -10164,19 +10371,19 @@ printf %s "checking for GNU libc compatible realloc... " >&6; } if test ${ac_cv_func_realloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10194,13 +10401,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop - ac_cv_func_realloc_0_nonnull=no +else case e in #( + e) ac_cv_func_realloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } @@ -10209,8 +10419,8 @@ then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -10220,7 +10430,8 @@ esac printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h - + ;; +esac fi @@ -10232,8 +10443,8 @@ printf %s "checking types of arguments for select... " >&6; } if test ${ac_cv_func_select_args+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_func_select_args='int,int *,struct timeval *' +else case e in #( + e) ac_cv_func_select_args='int,int *,struct timeval *' for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do @@ -10265,7 +10476,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done done done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 printf "%s\n" "$ac_cv_func_select_args" >&6; } @@ -10289,8 +10501,8 @@ printf %s "checking return type of signal handlers... " >&6; } if test ${ac_cv_type_signal+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -10306,10 +10518,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_signal=int -else $as_nop - ac_cv_type_signal=void +else case e in #( + e) ac_cv_type_signal=void ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 printf "%s\n" "$ac_cv_type_signal" >&6; } @@ -10322,8 +10536,8 @@ printf %s "checking whether lstat correctly handles trailing slash... " >&6; } if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - rm -f conftest.sym conftest.file +else case e in #( + e) rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes @@ -10334,8 +10548,8 @@ then : # If we don't know, assume the worst. *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10353,20 +10567,23 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop - ac_cv_func_lstat_dereferences_slashed_symlink=no +else case e in #( + e) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi else - # If the `ln -s' command failed, then we probably don't even + # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } @@ -10390,12 +10607,12 @@ printf %s "checking whether stat accepts an empty string... " >&6; } if test ${ac_cv_func_stat_empty_string_bug+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10410,13 +10627,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_stat_empty_string_bug=no -else $as_nop - ac_cv_func_stat_empty_string_bug=yes +else case e in #( + e) ac_cv_func_stat_empty_string_bug=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } @@ -10437,18 +10657,15 @@ printf %s "checking for working strtod... " >&6; } if test ${ac_cv_func_strtod+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_strtod=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -#ifndef strtod -double strtod (); -#endif int main (void) { @@ -10478,13 +10695,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_strtod=yes -else $as_nop - ac_cv_func_strtod=no +else case e in #( + e) ac_cv_func_strtod=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 printf "%s\n" "$ac_cv_func_strtod" >&6; } @@ -10507,16 +10727,22 @@ printf %s "checking for pow in -lm... " >&6; } if test ${ac_cv_lib_m_pow+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pow (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pow (void); int main (void) { @@ -10528,21 +10754,24 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_pow=yes -else $as_nop - ac_cv_lib_m_pow=no +else case e in #( + e) ac_cv_lib_m_pow=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 printf "%s\n" "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes then : POW_LIB=-lm -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} ;; +esac fi fi @@ -10906,12 +11135,12 @@ printf %s "checking working environ... " >&6; } if test -z "$ECL_WORKING_ENVIRON"; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10925,11 +11154,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ECL_WORKING_ENVIRON=yes -else $as_nop - ECL_WORKING_ENVIRON=no +else case e in #( + e) ECL_WORKING_ENVIRON=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -10960,8 +11191,8 @@ then : printf "%s\n" "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h fi -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10997,12 +11228,14 @@ printf "%s\n" "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi LIBS="${saved_libs}" @@ -11032,8 +11265,9 @@ if test "x${enable_threads}" != "xno"; then if test "x$ac_cv_header_atomic_ops_h" = xyes then : system_libatomic=yes -else $as_nop - system_libatomic=no +else case e in #( + e) system_libatomic=no ;; +esac fi if test "${system_libatomic}" = yes; then @@ -11053,8 +11287,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : system_libatomic=yes -else $as_nop - system_libatomic=no +else case e in #( + e) system_libatomic=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -11337,8 +11572,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -11368,14 +11603,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -11466,7 +11701,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -11475,12 +11709,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -11552,7 +11787,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -11581,7 +11816,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -11621,11 +11855,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -11639,11 +11874,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -11726,9 +11962,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -11809,10 +12045,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -11827,8 +12065,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ecl $as_me 23.9.9, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by ecl $as_me 24.5.10, which was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11859,7 +12097,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -11891,11 +12129,11 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ecl config.status 23.9.9 -configured by $0, generated by GNU Autoconf 2.71, +ecl config.status 24.5.10 +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11955,8 +12193,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -11964,8 +12202,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -12034,7 +12272,7 @@ do "ecl/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ecl/config.h:ecl/configpre.h" ;; "ecl/config-internal.h") CONFIG_HEADERS="$CONFIG_HEADERS ecl/config-internal.h:ecl/configpre-int.h" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -12053,7 +12291,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -12077,7 +12315,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -12235,13 +12473,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -12351,7 +12589,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12373,19 +12611,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -12513,7 +12751,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -12543,9 +12781,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/src/configure.ac b/src/configure.ac index ae3da8b0e..309c03ea0 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -8,7 +8,7 @@ dnl AUTOCONF configuration for ECL dnl Giuseppe Attardi 25.1.1994 dnl -AC_INIT([ecl],[23.9.9],[]) +AC_INIT([ecl],[24.5.10],[]) AC_REVISION([$Revision$]) AC_CONFIG_SRCDIR([bare.lsp.in]) AC_CONFIG_AUX_DIR([gmp]) diff --git a/src/ecl/configpre.h b/src/ecl/configpre.h index 4701246be..66223eeb1 100644 --- a/src/ecl/configpre.h +++ b/src/ecl/configpre.h @@ -3,7 +3,7 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD -/* Define to 1 if the `closedir' function returns void instead of int. */ +/* Define to 1 if the 'closedir' function returns void instead of int. */ #undef CLOSEDIR_VOID /* ECL_AVOID_FPE_H */ @@ -81,229 +81,229 @@ /* GBC_BOEHM_PRECISE */ #undef GBC_BOEHM_PRECISE -/* Define to 1 if you have the `alarm' function. */ +/* Define to 1 if you have the 'alarm' function. */ #undef HAVE_ALARM -/* Define to 1 if you have the `backtrace' function. */ +/* Define to 1 if you have the 'backtrace' function. */ #undef HAVE_BACKTRACE -/* Define to 1 if you have the `backtrace_symbols' function. */ +/* Define to 1 if you have the 'backtrace_symbols' function. */ #undef HAVE_BACKTRACE_SYMBOLS -/* Define to 1 if you have the `cabs' function. */ +/* Define to 1 if you have the 'cabs' function. */ #undef HAVE_CABS -/* Define to 1 if you have the `cabsf' function. */ +/* Define to 1 if you have the 'cabsf' function. */ #undef HAVE_CABSF -/* Define to 1 if you have the `cabsl' function. */ +/* Define to 1 if you have the 'cabsl' function. */ #undef HAVE_CABSL -/* Define to 1 if you have the `cacos' function. */ +/* Define to 1 if you have the 'cacos' function. */ #undef HAVE_CACOS -/* Define to 1 if you have the `cacosf' function. */ +/* Define to 1 if you have the 'cacosf' function. */ #undef HAVE_CACOSF -/* Define to 1 if you have the `cacosh' function. */ +/* Define to 1 if you have the 'cacosh' function. */ #undef HAVE_CACOSH -/* Define to 1 if you have the `cacoshf' function. */ +/* Define to 1 if you have the 'cacoshf' function. */ #undef HAVE_CACOSHF -/* Define to 1 if you have the `cacoshl' function. */ +/* Define to 1 if you have the 'cacoshl' function. */ #undef HAVE_CACOSHL -/* Define to 1 if you have the `cacosl' function. */ +/* Define to 1 if you have the 'cacosl' function. */ #undef HAVE_CACOSL -/* Define to 1 if you have the `casin' function. */ +/* Define to 1 if you have the 'casin' function. */ #undef HAVE_CASIN -/* Define to 1 if you have the `casinf' function. */ +/* Define to 1 if you have the 'casinf' function. */ #undef HAVE_CASINF -/* Define to 1 if you have the `casinh' function. */ +/* Define to 1 if you have the 'casinh' function. */ #undef HAVE_CASINH -/* Define to 1 if you have the `casinhf' function. */ +/* Define to 1 if you have the 'casinhf' function. */ #undef HAVE_CASINHF -/* Define to 1 if you have the `casinhl' function. */ +/* Define to 1 if you have the 'casinhl' function. */ #undef HAVE_CASINHL -/* Define to 1 if you have the `casinl' function. */ +/* Define to 1 if you have the 'casinl' function. */ #undef HAVE_CASINL -/* Define to 1 if you have the `catan' function. */ +/* Define to 1 if you have the 'catan' function. */ #undef HAVE_CATAN -/* Define to 1 if you have the `catanf' function. */ +/* Define to 1 if you have the 'catanf' function. */ #undef HAVE_CATANF -/* Define to 1 if you have the `catanh' function. */ +/* Define to 1 if you have the 'catanh' function. */ #undef HAVE_CATANH -/* Define to 1 if you have the `catanhf' function. */ +/* Define to 1 if you have the 'catanhf' function. */ #undef HAVE_CATANHF -/* Define to 1 if you have the `catanhl' function. */ +/* Define to 1 if you have the 'catanhl' function. */ #undef HAVE_CATANHL -/* Define to 1 if you have the `catanl' function. */ +/* Define to 1 if you have the 'catanl' function. */ #undef HAVE_CATANL -/* Define to 1 if you have the `ccos' function. */ +/* Define to 1 if you have the 'ccos' function. */ #undef HAVE_CCOS -/* Define to 1 if you have the `ccosf' function. */ +/* Define to 1 if you have the 'ccosf' function. */ #undef HAVE_CCOSF -/* Define to 1 if you have the `ccosh' function. */ +/* Define to 1 if you have the 'ccosh' function. */ #undef HAVE_CCOSH -/* Define to 1 if you have the `ccoshf' function. */ +/* Define to 1 if you have the 'ccoshf' function. */ #undef HAVE_CCOSHF -/* Define to 1 if you have the `ccoshl' function. */ +/* Define to 1 if you have the 'ccoshl' function. */ #undef HAVE_CCOSHL -/* Define to 1 if you have the `ccosl' function. */ +/* Define to 1 if you have the 'ccosl' function. */ #undef HAVE_CCOSL -/* Define to 1 if you have the `ceilf' function. */ +/* Define to 1 if you have the 'ceilf' function. */ #undef HAVE_CEILF -/* Define to 1 if you have the `cexp' function. */ +/* Define to 1 if you have the 'cexp' function. */ #undef HAVE_CEXP -/* Define to 1 if you have the `cexpf' function. */ +/* Define to 1 if you have the 'cexpf' function. */ #undef HAVE_CEXPF -/* Define to 1 if you have the `cexpl' function. */ +/* Define to 1 if you have the 'cexpl' function. */ #undef HAVE_CEXPL -/* Define to 1 if you have the `cimag' function. */ +/* Define to 1 if you have the 'cimag' function. */ #undef HAVE_CIMAG -/* Define to 1 if you have the `cimagf' function. */ +/* Define to 1 if you have the 'cimagf' function. */ #undef HAVE_CIMAGF -/* Define to 1 if you have the `cimagl' function. */ +/* Define to 1 if you have the 'cimagl' function. */ #undef HAVE_CIMAGL -/* Define to 1 if you have the `clock_gettime' function. */ +/* Define to 1 if you have the 'clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME -/* Define to 1 if you have the `clog' function. */ +/* Define to 1 if you have the 'clog' function. */ #undef HAVE_CLOG -/* Define to 1 if you have the `clogf' function. */ +/* Define to 1 if you have the 'clogf' function. */ #undef HAVE_CLOGF -/* Define to 1 if you have the `clogl' function. */ +/* Define to 1 if you have the 'clogl' function. */ #undef HAVE_CLOGL -/* Define to 1 if you have the `conj' function. */ +/* Define to 1 if you have the 'conj' function. */ #undef HAVE_CONJ -/* Define to 1 if you have the `conjf' function. */ +/* Define to 1 if you have the 'conjf' function. */ #undef HAVE_CONJF -/* Define to 1 if you have the `conjl' function. */ +/* Define to 1 if you have the 'conjl' function. */ #undef HAVE_CONJL -/* Define to 1 if you have the `copysign' function. */ +/* Define to 1 if you have the 'copysign' function. */ #undef HAVE_COPYSIGN -/* Define to 1 if you have the `cosf' function. */ +/* Define to 1 if you have the 'cosf' function. */ #undef HAVE_COSF -/* Define to 1 if you have the `coshf' function. */ +/* Define to 1 if you have the 'coshf' function. */ #undef HAVE_COSHF -/* Define to 1 if you have the `cpow' function. */ +/* Define to 1 if you have the 'cpow' function. */ #undef HAVE_CPOW -/* Define to 1 if you have the `cpowf' function. */ +/* Define to 1 if you have the 'cpowf' function. */ #undef HAVE_CPOWF -/* Define to 1 if you have the `cpowl' function. */ +/* Define to 1 if you have the 'cpowl' function. */ #undef HAVE_CPOWL -/* Define to 1 if you have the `creal' function. */ +/* Define to 1 if you have the 'creal' function. */ #undef HAVE_CREAL -/* Define to 1 if you have the `crealf' function. */ +/* Define to 1 if you have the 'crealf' function. */ #undef HAVE_CREALF -/* Define to 1 if you have the `creall' function. */ +/* Define to 1 if you have the 'creall' function. */ #undef HAVE_CREALL -/* Define to 1 if you have the `csin' function. */ +/* Define to 1 if you have the 'csin' function. */ #undef HAVE_CSIN -/* Define to 1 if you have the `csinf' function. */ +/* Define to 1 if you have the 'csinf' function. */ #undef HAVE_CSINF -/* Define to 1 if you have the `csinh' function. */ +/* Define to 1 if you have the 'csinh' function. */ #undef HAVE_CSINH -/* Define to 1 if you have the `csinhf' function. */ +/* Define to 1 if you have the 'csinhf' function. */ #undef HAVE_CSINHF -/* Define to 1 if you have the `csinhl' function. */ +/* Define to 1 if you have the 'csinhl' function. */ #undef HAVE_CSINHL -/* Define to 1 if you have the `csinl' function. */ +/* Define to 1 if you have the 'csinl' function. */ #undef HAVE_CSINL -/* Define to 1 if you have the `csqrt' function. */ +/* Define to 1 if you have the 'csqrt' function. */ #undef HAVE_CSQRT -/* Define to 1 if you have the `csqrtf' function. */ +/* Define to 1 if you have the 'csqrtf' function. */ #undef HAVE_CSQRTF -/* Define to 1 if you have the `csqrtl' function. */ +/* Define to 1 if you have the 'csqrtl' function. */ #undef HAVE_CSQRTL -/* Define to 1 if you have the `ctan' function. */ +/* Define to 1 if you have the 'ctan' function. */ #undef HAVE_CTAN -/* Define to 1 if you have the `ctanf' function. */ +/* Define to 1 if you have the 'ctanf' function. */ #undef HAVE_CTANF -/* Define to 1 if you have the `ctanh' function. */ +/* Define to 1 if you have the 'ctanh' function. */ #undef HAVE_CTANH -/* Define to 1 if you have the `ctanhf' function. */ +/* Define to 1 if you have the 'ctanhf' function. */ #undef HAVE_CTANHF -/* Define to 1 if you have the `ctanhl' function. */ +/* Define to 1 if you have the 'ctanhl' function. */ #undef HAVE_CTANHL -/* Define to 1 if you have the `ctanl' function. */ +/* Define to 1 if you have the 'ctanl' function. */ #undef HAVE_CTANL /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H -/* Define to 1 if you have the `dladdr' function. */ +/* Define to 1 if you have the 'dladdr' function. */ #undef HAVE_DLADDR /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if the system has the type `double complex'. */ +/* Define to 1 if the system has the type 'double complex'. */ #undef HAVE_DOUBLE_COMPLEX /* HAVE_ENVIRON */ #undef HAVE_ENVIRON -/* Define to 1 if you have the `expf' function. */ +/* Define to 1 if you have the 'expf' function. */ #undef HAVE_EXPF -/* Define to 1 if you have the `fabsf' function. */ +/* Define to 1 if you have the 'fabsf' function. */ #undef HAVE_FABSF /* Define to 1 if you have the header file. */ @@ -315,61 +315,61 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FENV_H -/* Define to 1 if the system has the type `float complex'. */ +/* Define to 1 if the system has the type 'float complex'. */ #undef HAVE_FLOAT_COMPLEX /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H -/* Define to 1 if you have the `floor' function. */ +/* Define to 1 if you have the 'floor' function. */ #undef HAVE_FLOOR -/* Define to 1 if you have the `floorf' function. */ +/* Define to 1 if you have the 'floorf' function. */ #undef HAVE_FLOORF -/* Define to 1 if you have the `fork' function. */ +/* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK -/* Define to 1 if you have the `frexpf' function. */ +/* Define to 1 if you have the 'frexpf' function. */ #undef HAVE_FREXPF -/* Define to 1 if you have the `fseeko' function. */ +/* Define to 1 if you have the 'fseeko' function. */ #undef HAVE_FSEEKO -/* Define to 1 if you have the `getcwd' function. */ +/* Define to 1 if you have the 'getcwd' function. */ #undef HAVE_GETCWD -/* Define to 1 if you have the `gethostbyaddr' function. */ +/* Define to 1 if you have the 'gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR -/* Define to 1 if you have the `gethostbyname' function. */ +/* Define to 1 if you have the 'gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME -/* Define to 1 if you have the `getpagesize' function. */ +/* Define to 1 if you have the 'getpagesize' function. */ #undef HAVE_GETPAGESIZE -/* Define to 1 if you have the `getrusage' function. */ +/* Define to 1 if you have the 'getrusage' function. */ #undef HAVE_GETRUSAGE -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `isatty' function. */ +/* Define to 1 if you have the 'isatty' function. */ #undef HAVE_ISATTY -/* Define to 1 if you have the `ldexpf' function. */ +/* Define to 1 if you have the 'ldexpf' function. */ #undef HAVE_LDEXPF /* HAVE_LIBFFI */ #undef HAVE_LIBFFI -/* Define to 1 if you have the `gc' library (-lgc). */ +/* Define to 1 if you have the 'gc' library (-lgc). */ #undef HAVE_LIBGC -/* Define to 1 if you have the `sun' library (-lsun). */ +/* Define to 1 if you have the 'sun' library (-lsun). */ #undef HAVE_LIBSUN /* Define to 1 if you have the header file. */ @@ -378,50 +378,50 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINK_H -/* Define to 1 if you have the `log1p' function. */ +/* Define to 1 if you have the 'log1p' function. */ #undef HAVE_LOG1P -/* Define to 1 if you have the `log1pf' function. */ +/* Define to 1 if you have the 'log1pf' function. */ #undef HAVE_LOG1PF -/* Define to 1 if you have the `log1pl' function. */ +/* Define to 1 if you have the 'log1pl' function. */ #undef HAVE_LOG1PL -/* Define to 1 if you have the `logf' function. */ +/* Define to 1 if you have the 'logf' function. */ #undef HAVE_LOGF -/* Define to 1 if the system has the type `long complex'. */ +/* Define to 1 if the system has the type 'long complex'. */ #undef HAVE_LONG_COMPLEX -/* Define to 1 if you have the `lstat' function. */ +/* Define to 1 if you have the 'lstat' function. */ #undef HAVE_LSTAT /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and +/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC -/* Define to 1 if you have the `memmove' function. */ +/* Define to 1 if you have the 'memmove' function. */ #undef HAVE_MEMMOVE -/* Define to 1 if you have the `memset' function. */ +/* Define to 1 if you have the 'memset' function. */ #undef HAVE_MEMSET -/* Define to 1 if you have the `mkdir' function. */ +/* Define to 1 if you have the 'mkdir' function. */ #undef HAVE_MKDIR -/* Define to 1 if you have the `mkstemp' function. */ +/* Define to 1 if you have the 'mkstemp' function. */ #undef HAVE_MKSTEMP -/* Define to 1 if you have a working `mmap' system call. */ +/* Define to 1 if you have a working 'mmap' system call. */ #undef HAVE_MMAP -/* Define to 1 if you have the `nanosleep' function. */ +/* Define to 1 if you have the 'nanosleep' function. */ #undef HAVE_NANOSLEEP -/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ @@ -433,62 +433,62 @@ /* HAVE_POSIX_RWLOCK */ #undef HAVE_POSIX_RWLOCK -/* Define to 1 if you have the `powf' function. */ +/* Define to 1 if you have the 'powf' function. */ #undef HAVE_POWF -/* Define to 1 if you have the `pthread_condattr_setclock' function. */ +/* Define to 1 if you have the 'pthread_condattr_setclock' function. */ #undef HAVE_PTHREAD_CONDATTR_SETCLOCK -/* Define to 1 if you have the `pthread_mutex_timedlock' function. */ +/* Define to 1 if you have the 'pthread_mutex_timedlock' function. */ #undef HAVE_PTHREAD_MUTEX_TIMEDLOCK -/* Define to 1 if the system has the type `pthread_rwlock_t'. */ +/* Define to 1 if the system has the type 'pthread_rwlock_t'. */ #undef HAVE_PTHREAD_RWLOCK_T -/* Define to 1 if the system has the type `ptrdiff_t'. */ +/* Define to 1 if the system has the type 'ptrdiff_t'. */ #undef HAVE_PTRDIFF_T -/* Define to 1 if you have the `putenv' function. */ +/* Define to 1 if you have the 'putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H -/* Define to 1 if your system has a GNU libc compatible `realloc' function, +/* Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_SCHED_H -/* Define to 1 if you have the `sched_yield' function. */ +/* Define to 1 if you have the 'sched_yield' function. */ #undef HAVE_SCHED_YIELD -/* Define to 1 if you have the `select' function. */ +/* Define to 1 if you have the 'select' function. */ #undef HAVE_SELECT -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV -/* Define to 1 if you have the `sigprocmask' function. */ +/* Define to 1 if you have the 'sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define to 1 if you have the `sinf' function. */ +/* Define to 1 if you have the 'sinf' function. */ #undef HAVE_SINF -/* Define to 1 if you have the `sinhf' function. */ +/* Define to 1 if you have the 'sinhf' function. */ #undef HAVE_SINHF -/* Define to 1 if you have the `socket' function. */ +/* Define to 1 if you have the 'socket' function. */ #undef HAVE_SOCKET -/* Define to 1 if you have the `sqrt' function. */ +/* Define to 1 if you have the 'sqrt' function. */ #undef HAVE_SQRT -/* Define to 1 if you have the `sqrtf' function. */ +/* Define to 1 if you have the 'sqrtf' function. */ #undef HAVE_SQRTF -/* Define to 1 if `stat' has the bug that it succeeds when given the +/* Define to 1 if 'stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG @@ -507,13 +507,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strcasecmp' function. */ +/* Define to 1 if you have the 'strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define to 1 if you have the `strchr' function. */ +/* Define to 1 if you have the 'strchr' function. */ #undef HAVE_STRCHR -/* Define to 1 if you have the `strerror' function. */ +/* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ @@ -522,13 +522,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strtol' function. */ +/* Define to 1 if you have the 'strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if you have the `system' function. */ +/* Define to 1 if you have the 'system' function. */ #undef HAVE_SYSTEM -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H @@ -538,7 +538,7 @@ /* HAVE_SYS_MMAN_H */ #undef HAVE_SYS_MMAN_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H @@ -569,28 +569,28 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the `tanf' function. */ +/* Define to 1 if you have the 'tanf' function. */ #undef HAVE_TANF -/* Define to 1 if you have the `tanhf' function. */ +/* Define to 1 if you have the 'tanhf' function. */ #undef HAVE_TANHF -/* Define to 1 if you have the `times' function. */ +/* Define to 1 if you have the 'times' function. */ #undef HAVE_TIMES -/* Define to 1 if you have the `tzset' function. */ +/* Define to 1 if you have the 'tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_ULIMIT_H -/* Define to 1 if you have the `uname' function. */ +/* Define to 1 if you have the 'uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `vfork' function. */ +/* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ @@ -599,16 +599,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H -/* Define to 1 if `fork' works. */ +/* Define to 1 if 'fork' works. */ #undef HAVE_WORKING_FORK -/* Define to 1 if `vfork' works. */ +/* Define to 1 if 'vfork' works. */ #undef HAVE_WORKING_VFORK -/* Define to 1 if the system has the type `_Bool'. */ +/* Define to 1 if the system has the type '_Bool'. */ #undef HAVE__BOOL -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -630,19 +630,19 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define as the return type of signal handlers (`int' or `void'). */ +/* Define as the return type of signal handlers ('int' or 'void'). */ #undef RETSIGTYPE -/* Define to the type of arg 1 for `select'. */ +/* Define to the type of arg 1 for 'select'. */ #undef SELECT_TYPE_ARG1 -/* Define to the type of args 2, 3 and 4 for `select'. */ +/* Define to the type of args 2, 3 and 4 for 'select'. */ #undef SELECT_TYPE_ARG234 -/* Define to the type of arg 5 for `select'. */ +/* Define to the type of arg 5 for 'select'. */ #undef SELECT_TYPE_ARG5 -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS @@ -651,7 +651,7 @@ macro is obsolete. */ #undef TIME_WITH_SYS_TIME -/* Define to 1 if your declares `struct tm'. */ +/* Define to 1 if your declares 'struct tm'. */ #undef TM_IN_SYS_TIME /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most @@ -681,7 +681,7 @@ #define below would cause a syntax error. */ #undef _UINT8_T -/* Define to empty if `const' does not conform to ANSI C. */ +/* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* ecl_int16_t */ @@ -714,7 +714,7 @@ /* compiler understands long long */ #undef ecl_ulong_long_t -/* Define to `__inline__' or `__inline' if that's what the C compiler +/* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline @@ -745,7 +745,7 @@ /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc -/* Define to `unsigned int' if does not define. */ +/* Define as 'unsigned int' if doesn't define. */ #undef size_t /* Define to the type of an unsigned integer type of width exactly 16 bits if @@ -764,9 +764,9 @@ such a type exists and the standard includes do not define it. */ #undef uint8_t -/* Define as `fork' if `vfork' does not work. */ +/* Define as 'fork' if 'vfork' does not work. */ #undef vfork -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ +/* Define to empty if the keyword 'volatile' does not work. Warning: valid + code using 'volatile' can become incorrect without. Disable with care. */ #undef volatile diff --git a/src/gmp/config.guess b/src/gmp/config.guess index 1817bdce9..cdfc43920 100755 --- a/src/gmp/config.guess +++ b/src/gmp/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-05-25' +timestamp='2023-08-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -169,6 +172,7 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" @@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -904,7 +908,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; @@ -966,11 +970,37 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1036,7 +1066,16 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) @@ -1191,7 +1230,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1332,7 +1371,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; diff --git a/src/gmp/config.sub b/src/gmp/config.sub index dba16e84c..defe52c0c 100755 --- a/src/gmp/config.sub +++ b/src/gmp/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-03' +timestamp='2023-09-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1075,7 +1076,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1180,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ @@ -1199,45 +1200,23 @@ case $cpu-$vendor in | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ - | loongarch32 | loongarch64 | loongarchx32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ @@ -1285,7 +1264,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1306,11 +1285,12 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux @@ -1341,6 +1321,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1506,10 +1490,16 @@ case $os in os=eabi ;; *) - os=elf + os= + obj=elf ;; esac ;; + aout* | coff* | elf* | pe*) + # These are machine code file formats, not OSes + obj=$os + os= + ;; *) # No normalization, but not necessarily accepted, that comes below. ;; @@ -1528,12 +1518,15 @@ else # system, and we'll never get to this point. kernel= +obj= case $cpu-$vendor in score-*) - os=elf + os= + obj=elf ;; spu-*) - os=elf + os= + obj=elf ;; *-acorn) os=riscix1.2 @@ -1543,28 +1536,35 @@ case $cpu-$vendor in os=gnu ;; arm*-semi) - os=aout + os= + obj=aout ;; c4x-* | tic4x-*) - os=coff + os= + obj=coff ;; c8051-*) - os=elf + os= + obj=elf ;; clipper-intergraph) os=clix ;; hexagon-*) - os=elf + os= + obj=elf ;; tic54x-*) - os=coff + os= + obj=coff ;; tic55x-*) - os=coff + os= + obj=coff ;; tic6x-*) - os=coff + os= + obj=coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1586,19 +1586,24 @@ case $cpu-$vendor in os=sunos3 ;; m68*-cisco) - os=aout + os= + obj=aout ;; mep-*) - os=elf + os= + obj=elf ;; mips*-cisco) - os=elf + os= + obj=elf ;; mips*-*) - os=elf + os= + obj=elf ;; or32-*) - os=coff + os= + obj=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 @@ -1607,7 +1612,8 @@ case $cpu-$vendor in os=sunos4.1.1 ;; pru-*) - os=elf + os= + obj=elf ;; *-be) os=beos @@ -1688,10 +1694,12 @@ case $cpu-$vendor in os=uxpv ;; *-rom68k) - os=coff + os= + obj=coff ;; *-*bug) - os=coff + os= + obj=coff ;; *-apple) os=macos @@ -1709,7 +1717,8 @@ esac fi -# Now, validate our (potentially fixed-up) OS. +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. musl* | newlib* | relibc* | uclibc*) @@ -1720,6 +1729,9 @@ case $os in # VxWorks passes extra cpu info in the 4th filed. simlinux | simwindows | spe) ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1728,7 +1740,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1737,11 +1749,11 @@ case $os in | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* | serenity* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ @@ -1754,7 +1766,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* | cos* | mbr* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1762,41 +1774,99 @@ case $os in ;; none) ;; + kernel* | msvc* ) + # Restricted further below + ;; + '') + if test x"$obj" = x + then + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 + fi + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ + | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) ;; - uclinux-uclibc* ) + uclinux-uclibc*- ) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + managarm-mlibc*- | managarm-kernel*- ) + ;; + windows*-msvc*-) + ;; + -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 ;; - nto-qnx*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - os2-emx) + kfreebsd*-gnu*- | kopensolaris*-gnu*-) ;; - *-eabi* | *-gnueabi*) + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; - -*) + nto-qnx*-) + ;; + os2-emx-) + ;; + *-eabi*- | *-gnueabi*-) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1879,7 +1949,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/src/gmp/install-sh b/src/gmp/install-sh index ec298b537..7c56c9c01 100755 --- a/src/gmp/install-sh +++ b/src/gmp/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2023-11-23.18; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -124,9 +124,9 @@ it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ -" +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." while test $# -ne 0; do case $1 in