Skip to content

Commit bc7752a

Browse files
committed
Remove extraneous logic
Every version of Ruby released for at least the last decade was set to use the -DRUBY19 flag. This commit sets the behavior in the flag as the default.
1 parent 28922ad commit bc7752a

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

extconf.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
require 'mkmf'
88
require 'rbconfig'
99

10-
$CFLAGS = case RUBY_VERSION
11-
when /^1\.9/; '-DRUBY19'
12-
when /^2\./; '-DRUBY19'
13-
when /^3\./; '-DRUBY19'
14-
else; ''
15-
end
16-
1710
implementation = case RbConfig::CONFIG['host_os']
1811
when /linux/i; 'shadow'
1912
when /sunos|solaris/i; 'shadow'
@@ -42,7 +35,7 @@
4235

4336
if ok
4437
if !have_func("sgetspent")
45-
$CFLAGS += ' -DSOLARIS'
38+
$CFLAGS = '-DSOLARIS'
4639
end
4740
end
4841
when 'pwd'

pwd/shadow.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
#include "rubyio.h"
2424
#endif
2525

26-
#ifdef RUBY19
2726
#define file_ptr(x) (x)->stdio_file
28-
#else
29-
#define file_ptr(x) (x)->f
30-
#endif
3127

3228
static VALUE rb_mShadow;
3329
static VALUE rb_mPasswd;

shadow/shadow.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
#include "rubyio.h"
1616
#endif
1717

18-
#ifdef RUBY19
1918
#define file_ptr(x) rb_io_stdio_file(x)
20-
#else
21-
#define file_ptr(x) (x)->f
22-
#endif
23-
2419
#define NUM_FIELDS 10
2520

2621
static VALUE rb_mShadow;

0 commit comments

Comments
 (0)