拡張ライブラリで 1.6/1.8 に両対応する際、以下のようなマクロが
あると、 extconf.rb で頑張って判定しなくて済むようになります。

 いかがでしょうか。(1.8.0 リリース前に思いついてよかった)

Index: ruby.h
===================================================================
RCS file: /src/ruby/ruby.h,v
retrieving revision 1.72
diff -u -r1.72 ruby.h
--- ruby.h	16 Jan 2003 07:34:03 -0000	1.72
+++ ruby.h	24 Jan 2003 12:56:34 -0000
@@ -51,6 +51,7 @@
 #ifndef NORETURN
 # define NORETURN(x) x
 #endif
+#define HAVE_1ARY_NORETURN
 
 #if defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
 #include <alloca.h>
Index: intern.h
===================================================================
RCS file: /src/ruby/intern.h,v
retrieving revision 1.109
diff -u -r1.109 intern.h
--- intern.h	16 Jan 2003 07:34:01 -0000	1.109
+++ intern.h	24 Jan 2003 12:56:34 -0000
@@ -148,6 +148,7 @@
 void rb_disable_super _((VALUE, const char*));
 void rb_enable_super _((VALUE, const char*));
 void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE)));
+#define HAVE_RB_DEFINE_ALLOC_FUNC
 void rb_undef_alloc_func _((VALUE));
 void rb_clear_cache _((void));
 void rb_alias _((VALUE, ID, ID));
@@ -453,6 +454,7 @@
 void rb_autoload_load _((ID));
 VALUE rb_cvar_defined _((VALUE, ID));
 void rb_cvar_set _((VALUE, ID, VALUE, int));
+#define HAVE_3ARY_RB_CVAR_SET
 VALUE rb_cvar_get _((VALUE, ID));
 void rb_cv_set _((VALUE, const char*, VALUE));
 VALUE rb_cv_get _((VALUE, const char*));

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"It went right by me -- At the time it went over my head
   I was looking out the window.. I should have looked at your face instead"