Skip to content

Commit d8e5c64

Browse files
committedJan 4, 2016
Merge pull request #3518 from rubinius/2.2
WIP: 2.2 compat
2 parents 6b35d17 + 649739c commit d8e5c64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1386
-332
lines changed
 

‎configure

+40
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,46 @@ int main() { return tgetnum(""); }
12391239
@defines << "HAVE_GETTID"
12401240
end
12411241

1242+
if has_struct_member("stat", "st_atim", ["sys/stat.h"])
1243+
@defines << "HAVE_STRUCT_STAT_ST_ATIM"
1244+
end
1245+
1246+
if has_struct_member("stat", "st_atimespec", ["sys/stat.h"])
1247+
@defines << "HAVE_STRUCT_STAT_ST_ATIMESPEC"
1248+
end
1249+
1250+
if has_struct_member("stat", "st_atimensec", ["sys/stat.h"])
1251+
@defines << "HAVE_STRUCT_STAT_ST_ATIMENSEC"
1252+
end
1253+
1254+
if has_struct_member("stat", "st_mtim", ["sys/stat.h"])
1255+
@defines << "HAVE_STRUCT_STAT_ST_MTIM"
1256+
end
1257+
1258+
if has_struct_member("stat", "st_mtimespec", ["sys/stat.h"])
1259+
@defines << "HAVE_STRUCT_STAT_ST_MTIMESPEC"
1260+
end
1261+
1262+
if has_struct_member("stat", "st_mtimensec", ["sys/stat.h"])
1263+
@defines << "HAVE_STRUCT_STAT_ST_MTIMENSEC"
1264+
end
1265+
1266+
if has_struct_member("stat", "st_ctim", ["sys/stat.h"])
1267+
@defines << "HAVE_STRUCT_STAT_ST_CTIM"
1268+
end
1269+
1270+
if has_struct_member("stat", "st_ctimespec", ["sys/stat.h"])
1271+
@defines << "HAVE_STRUCT_STAT_ST_CTIMESPEC"
1272+
end
1273+
1274+
if has_struct_member("stat", "st_ctimensec", ["sys/stat.h"])
1275+
@defines << "HAVE_STRUCT_STAT_ST_CTIMENSEC"
1276+
end
1277+
1278+
if has_struct_member("stat", "st_birthtimespec", ["sys/stat.h"])
1279+
@defines << "HAVE_ST_BIRTHTIME"
1280+
end
1281+
12421282
# glibc has useless lchmod() so we don't try to use lchmod() on linux
12431283
if !@linux and has_function("lchmod", ["sys/stat.h", "unistd.h"])
12441284
@have_lchmod = true

‎kernel/bootstrap/stat.rb

+5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def ctime
8787
raise PrimitiveFailure, "Rubinius::Stat#ctime primitive failed"
8888
end
8989

90+
def birthtime
91+
Rubinius.primitive :stat_birthtime
92+
raise NotImplementedError, "birthtime() function is unimplemented on this machine"
93+
end
94+
9095
def inspect
9196
"#<#{self.class.name} dev=0x#{self.dev.to_s(16)}, ino=#{self.ino}, " \
9297
"mode=#{sprintf("%07d", self.mode.to_s(8).to_i)}, nlink=#{self.nlink}, " \

0 commit comments

Comments
 (0)
Please sign in to comment.