diff --git a/extconf.rb b/extconf.rb index 6f43ae2..72afa23 100644 --- a/extconf.rb +++ b/extconf.rb @@ -7,13 +7,6 @@ require 'mkmf' require 'rbconfig' -$CFLAGS = case RUBY_VERSION - when /^1\.9/; '-DRUBY19' - when /^2\./; '-DRUBY19' - when /^3\./; '-DRUBY19' - else; '' - end - implementation = case RbConfig::CONFIG['host_os'] when /linux/i; 'shadow' when /sunos|solaris/i; 'shadow' @@ -42,7 +35,7 @@ if ok if !have_func("sgetspent") - $CFLAGS += ' -DSOLARIS' + $CFLAGS = '-DSOLARIS' end end when 'pwd' diff --git a/pwd/shadow.c b/pwd/shadow.c index 46313d4..9b47a68 100644 --- a/pwd/shadow.c +++ b/pwd/shadow.c @@ -23,11 +23,7 @@ #include "rubyio.h" #endif -#ifdef RUBY19 #define file_ptr(x) (x)->stdio_file -#else -#define file_ptr(x) (x)->f -#endif static VALUE rb_mShadow; static VALUE rb_mPasswd; diff --git a/shadow/shadow.c b/shadow/shadow.c index 9d02310..3ea06bb 100644 --- a/shadow/shadow.c +++ b/shadow/shadow.c @@ -15,12 +15,7 @@ #include "rubyio.h" #endif -#ifdef RUBY19 #define file_ptr(x) rb_io_stdio_file(x) -#else -#define file_ptr(x) (x)->f -#endif - #define NUM_FIELDS 10 static VALUE rb_mShadow;