From 74d0eaf6a22f86a60f37b439c65039fc277de0fa Mon Sep 17 00:00:00 2001 From: eban Date: Wed, 10 Jan 2001 08:09:01 +0000 Subject: [PATCH] NORETURN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ configure.in | 26 +++++++++++++++++++------- djgpp/config.hin | 8 ++++++-- ruby.h | 4 +--- win32/win32.h | 2 +- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 274271d17e..459d3bed35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ Wed Jan 10 16:15:08 2001 WATANABE Hirofumi * eval.c, intern.h: ditto. + * djgpp/config.hin, win32/win32.h: ditto. + + * configure.in: ditto. + Wed Jan 10 13:54:53 2001 WATANABE Hirofumi * process.c (proc_setuid): use setresuid() if available. @@ -104,6 +108,10 @@ Fri Dec 29 11:05:41 2000 Yukihiro Matsumoto * eval.c (rb_thread_join): join during critical section causes deadlock. +Fri Dec 29 00:38:46 2000 Yukihiro Matsumoto + + * m17n.c: new file - core functions of M17N. + Tue Dec 26 18:46:41 2000 NAKAMURA Hiroshi * lib/debug.rb: Avoid thread deadlock in debugging stopped thread. diff --git a/configure.in b/configure.in index 488615bfd6..d77a73d5f9 100644 --- a/configure.in +++ b/configure.in @@ -155,13 +155,25 @@ if test "$rb_cv_stdarg" = yes; then AC_DEFINE(HAVE_STDARG_PROTOTYPES) fi -AC_CACHE_CHECK(for gcc attribute noreturn, rb_cv_have_attr_noreturn, - [AC_TRY_COMPILE([void exit(int x) __attribute__ ((noreturn));], [], - rb_cv_have_attr_noreturn=yes, - rb_cv_have_attr_noreturn=no)]) -if test "$rb_cv_have_attr_noreturn" = yes; then - AC_DEFINE(HAVE_ATTR_NORETURN) -fi +dnl AC_CACHE_CHECK(for gcc attribute noreturn, rb_cv_have_attr_noreturn, +dnl [AC_TRY_COMPILE([void exit(int x) __attribute__ ((noreturn));], [], +dnl rb_cv_have_attr_noreturn=yes, +dnl rb_cv_have_attr_noreturn=no)]) +dnl if test "$rb_cv_have_attr_noreturn" = yes; then +dnl AC_DEFINE(HAVE_ATTR_NORETURN) +dnl fi + +AC_CACHE_CHECK([for noreturn], rb_cv_noreturn, +[rb_cv_noreturn=no +for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do + AC_TRY_COMPILE( + [#define NORETURN(x) $mac +NORETURN(void exit(int x));], + [], + [rb_cv_noreturn="$mac"; break]) +done]) +AC_DEFINE_UNQUOTED([NORETURN(x)], $rb_cv_noreturn) + AC_MSG_CHECKING(for inline) AC_CACHE_VAL(rb_cv_inline, diff --git a/djgpp/config.hin b/djgpp/config.hin index 973a0db93d..8dda8af744 100644 --- a/djgpp/config.hin +++ b/djgpp/config.hin @@ -1,13 +1,16 @@ -#define USE_THREAD 1 #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define SIZEOF_LONG 4 +#define SIZEOF___INT64 0 #define SIZEOF_VOIDP 4 #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 #define HAVE_PROTOTYPES 1 #define TOKEN_PASTE(x,y) x##y #define HAVE_STDARG_PROTOTYPES 1 +#define NORETURN(x) x __attribute__ ((noreturn)) +#define HAVE_INLINE 1 +#define INLINE __inline__ #define HAVE_ATTR_NORETURN 1 #define HAVE_DIRENT_H 1 #define STDC_HEADERS 1 @@ -61,7 +64,8 @@ #define HAVE_SETSID 1 #define POSIX_SIGNAL 1 #define BSD_SETPGRP setpgrp -#define RSHIFT(x,y) ((x)>>y) +#define RSHIFT(x,y) ((x)>>(int)y) +#define DEFAULT_KCODE KCODE_NONE #define FILE_COUNT _cnt #define DLEXT ".o" #define RUBY_LIB "/lib/ruby/@MAJOR@.@MINOR@" diff --git a/ruby.h b/ruby.h index de2bf3297c..f00f39b935 100644 --- a/ruby.h +++ b/ruby.h @@ -63,9 +63,7 @@ extern "C" { # define __(args) () #endif -#ifdef HAVE_ATTR_NORETURN -# define NORETURN(x) x __attribute__ ((noreturn)) -#elif !defined NORETURN +#ifndef NORETURN # define NORETURN(x) x #endif diff --git a/win32/win32.h b/win32/win32.h index 8c03f431a0..b6824528df 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -16,7 +16,7 @@ #define EXTERN extern __declspec(dllexport) #endif -#if defined _MSC_VER +#if defined _MSC_VER && !defined NORETURN #define NORETURN(x) __declspec(noreturn) x #endif