* Removed the autoconf check for __attribute__((noreturn)) and used plain
C checks. git-svn-id: svn://svn.zoy.org/elk/trunk@105 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
acf7f7ddab
commit
971eae3c27
18
configure.ac
18
configure.ac
|
@ -6,7 +6,7 @@ AC_PREREQ(2.50)
|
||||||
AC_CONFIG_AUX_DIR(autotools)
|
AC_CONFIG_AUX_DIR(autotools)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(elk, 3.99.0)
|
AM_INIT_AUTOMAKE(elk, 3.99.1)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
@ -187,7 +187,7 @@ AC_DEFINE(USE_DLOPEN, 1, [FIXME HARD])
|
||||||
# with a special character (such as underline)? If so, syms_begin_with
|
# with a special character (such as underline)? If so, syms_begin_with
|
||||||
# should hold this character, otherwise leave it empty.
|
# should hold this character, otherwise leave it empty.
|
||||||
if false; then
|
if false; then
|
||||||
AC_DEFINE(SYMS_BEGIN_WITH, 1, [FIXME HARD])
|
AC_DEFINE(SYMS_BEGIN_WITH, ['_'], [FIXME HARD])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The symbol prefixes of extension initialization and finalization
|
# The symbol prefixes of extension initialization and finalization
|
||||||
|
@ -367,18 +367,6 @@ else
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
|
AM_CONDITIONAL(HAVE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
|
||||||
|
|
||||||
AC_CACHE_CHECK([__attribute__ ((noreturn)) support],
|
|
||||||
[ac_cv_c_attribute_noreturn],
|
|
||||||
[ac_cv_c_attribute_noreturn=no
|
|
||||||
CFLAGS="${CFLAGS_save} -Werror"
|
|
||||||
AC_TRY_COMPILE([],
|
|
||||||
[extern void foobar() __attribute__ ((noreturn));],
|
|
||||||
[ac_cv_c_attribute_noreturn=yes])
|
|
||||||
CFLAGS="${CFLAGS_save}"])
|
|
||||||
if test "${ac_cv_c_attribute_noreturn}" != "no"; then
|
|
||||||
AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, Support for __attribute__((noreturn)))
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
||||||
[ac_cv_c_Wall],
|
[ac_cv_c_Wall],
|
||||||
[CFLAGS="-Wall ${CFLAGS_save}"
|
[CFLAGS="-Wall ${CFLAGS_save}"
|
||||||
|
@ -478,7 +466,7 @@ cat << EOF
|
||||||
|
|
||||||
Configuration summary
|
Configuration summary
|
||||||
---------------------
|
---------------------
|
||||||
C++ support: ${ac_cv_my_have_cxx}
|
build C++ plugins: ${ac_cv_my_have_cxx}
|
||||||
libgdbm support: ${ac_cv_my_have_xaw}
|
libgdbm support: ${ac_cv_my_have_xaw}
|
||||||
X11 support: ${ac_cv_my_have_x11}
|
X11 support: ${ac_cv_my_have_x11}
|
||||||
Xaw support: ${ac_cv_my_have_xaw}
|
Xaw support: ${ac_cv_my_have_xaw}
|
||||||
|
|
|
@ -109,13 +109,8 @@ extern Object The_Environment, Global_Environment;
|
||||||
|
|
||||||
/* Error handling
|
/* Error handling
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
extern void Primitive_Error P_((const char*, ...)) elk_attribute(__noreturn__);
|
||||||
extern void Primitive_Error P_((const char*, ...)) __attribute__ ((__noreturn__));
|
extern void Fatal_Error P_((const char*, ...)) elk_attribute(__noreturn__);
|
||||||
extern void Fatal_Error P_((const char*, ...)) __attribute__ ((__noreturn__));
|
|
||||||
#else
|
|
||||||
extern void Primitive_Error P_((const char*, ...));
|
|
||||||
extern void Fatal_Error P_((const char*, ...));
|
|
||||||
#endif
|
|
||||||
extern void Range_Error P_((Object));
|
extern void Range_Error P_((Object));
|
||||||
extern void Panic P_((const char*));
|
extern void Panic P_((const char*));
|
||||||
extern Object P_Error P_((int, Object*));
|
extern Object P_Error P_((int, Object*));
|
||||||
|
@ -473,14 +468,9 @@ extern void Terminate_Type P_((int));
|
||||||
*/
|
*/
|
||||||
extern TYPEDESCR *Types;
|
extern TYPEDESCR *Types;
|
||||||
extern Object P_Type P_((Object));
|
extern Object P_Type P_((Object));
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
extern void Wrong_Type P_((Object, int)) elk_attribute(__noreturn__);
|
||||||
extern void Wrong_Type P_((Object, int)) __attribute__ ((__noreturn__));
|
|
||||||
extern void Wrong_Type_Combination P_((Object, const char*))
|
extern void Wrong_Type_Combination P_((Object, const char*))
|
||||||
__attribute__ ((__noreturn__));
|
elk_attribute(__noreturn__);
|
||||||
#else
|
|
||||||
extern void Wrong_Type P_((Object, int));
|
|
||||||
extern void Wrong_Type_Combination P_((Object, const char*));
|
|
||||||
#endif
|
|
||||||
extern int Define_Type P_((int, const char*, int (*)(Object), int,
|
extern int Define_Type P_((int, const char*, int (*)(Object), int,
|
||||||
int (*)(Object, Object), int (*)(Object, Object),
|
int (*)(Object, Object), int (*)(Object, Object),
|
||||||
int (*)(Object, Object, int, int, int),
|
int (*)(Object, Object, int, int, int),
|
||||||
|
|
|
@ -28,28 +28,6 @@
|
||||||
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
|
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GNUC__
|
|
||||||
# define __asm__ asm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HUGE
|
|
||||||
# define HUGE HUGE_VAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Arithmetic shift right for compilers that don't sign extend:
|
|
||||||
*/
|
|
||||||
#if (-1 >> 1) < 0
|
|
||||||
# define ASR(n,s) ((n) >>= (s))
|
|
||||||
#else
|
|
||||||
# define NBITS(v) ((sizeof v) * 8)
|
|
||||||
# define HIBIT(v,n) (NBITS(v) - (n))
|
|
||||||
# define ASR(n,s) ((n) >>= (s),\
|
|
||||||
((n) & (1 << (HIBIT((n),(s)) - 1)) ?\
|
|
||||||
((n) |= ~(((unsigned)1 << HIBIT((n),(s))) - 1)) :\
|
|
||||||
(n)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern Object False2;
|
extern Object False2;
|
||||||
|
|
||||||
#define Nullp(x) (TYPE(x) == T_Null)
|
#define Nullp(x) (TYPE(x) == T_Null)
|
||||||
|
|
|
@ -31,3 +31,35 @@
|
||||||
/* The C99 integers header */
|
/* The C99 integers header */
|
||||||
#include <@STDINT_HEADER@>
|
#include <@STDINT_HEADER@>
|
||||||
|
|
||||||
|
/* C Compiler features */
|
||||||
|
#ifndef __GNUC__
|
||||||
|
# define __asm__ asm
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HUGE
|
||||||
|
# define HUGE HUGE_VAL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Under gcc, we use the __attribute__ macro to tell the compiler that a
|
||||||
|
* function does not return. */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define elk_attribute(att) __attribute__ ((att))
|
||||||
|
#else
|
||||||
|
# define elk_attribute(att) /* */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Arithmetic shift right for compilers that don't sign extend:
|
||||||
|
*/
|
||||||
|
#if (-1 >> 1) < 0
|
||||||
|
# define ASR(n,s) ((n) >>= (s))
|
||||||
|
#else
|
||||||
|
# define NBITS(v) ((sizeof v) * 8)
|
||||||
|
# define HIBIT(v,n) (NBITS(v) - (n))
|
||||||
|
# define ASR(n,s) ((n) >>= (s),\
|
||||||
|
((n) & (1 << (HIBIT((n),(s)) - 1)) ?\
|
||||||
|
((n) |= ~(((unsigned)1 << HIBIT((n),(s))) - 1)) :\
|
||||||
|
(n)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,8 @@
|
||||||
|
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
void Reset () elk_attribute(__noreturn__);
|
||||||
void Reset () __attribute__ ((__noreturn__));
|
void Err_Handler () elk_attribute(__noreturn__);
|
||||||
void Err_Handler () __attribute__ ((__noreturn__));
|
|
||||||
#else
|
|
||||||
void Reset ();
|
|
||||||
void Err_Handler ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Object Arg_True;
|
Object Arg_True;
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,7 @@
|
||||||
|
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
extern void Reset () elk_attribute(__noreturn__);
|
||||||
extern void Reset () __attribute__ ((__noreturn__));
|
|
||||||
#else
|
|
||||||
extern void Reset ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int Intr_Was_Ignored;
|
int Intr_Was_Ignored;
|
||||||
unsigned long int Intr_Level;
|
unsigned long int Intr_Level;
|
||||||
|
|
|
@ -122,11 +122,7 @@ void Exit_Handler () {
|
||||||
#ifndef HAVE_ATEXIT
|
#ifndef HAVE_ATEXIT
|
||||||
/* Hack: __GNUC_MINOR__ was introduced together with __attribute__ */
|
/* Hack: __GNUC_MINOR__ was introduced together with __attribute__ */
|
||||||
#ifdef __GNUC_MINOR__
|
#ifdef __GNUC_MINOR__
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
extern void _exit() elk_attribute(__noreturn__);
|
||||||
extern void _exit() __attribute__ ((noreturn));
|
|
||||||
#else
|
|
||||||
extern void _exit();
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef PROFILING
|
#ifndef PROFILING
|
||||||
void exit (n) {
|
void exit (n) {
|
||||||
|
|
|
@ -57,12 +57,8 @@
|
||||||
extern void Switch_Environment (Object);
|
extern void Switch_Environment (Object);
|
||||||
extern unsigned int Stack_Size ();
|
extern unsigned int Stack_Size ();
|
||||||
extern void Uncatchable_Error (char *);
|
extern void Uncatchable_Error (char *);
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
|
||||||
extern void Funcall_Control_Point (Object, Object, int)
|
extern void Funcall_Control_Point (Object, Object, int)
|
||||||
__attribute__ ((__noreturn__));
|
elk_attribute(__noreturn__);
|
||||||
#else
|
|
||||||
extern void Funcall_Control_Point (Object, Object, int);
|
|
||||||
#endif
|
|
||||||
extern void Pop_Frame ();
|
extern void Pop_Frame ();
|
||||||
extern void Push_Frame (Object);
|
extern void Push_Frame (Object);
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,7 @@ extern char *index();
|
||||||
extern double atof();
|
extern double atof();
|
||||||
|
|
||||||
int Skip_Comment (Object);
|
int Skip_Comment (Object);
|
||||||
#ifdef HAVE_ATTRIBUTE_NORETURN
|
void Reader_Error (Object, char *) elk_attribute(__noreturn__);
|
||||||
void Reader_Error (Object, char *) __attribute__ ((__noreturn__));
|
|
||||||
#else
|
|
||||||
void Reader_Error (Object, char *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Object Sym_Quote,
|
Object Sym_Quote,
|
||||||
Sym_Quasiquote,
|
Sym_Quasiquote,
|
||||||
|
|
Loading…
Reference in New Issue