diff -r 12c159b75f86 d/druntime/core/sys/posix/config.d
--- a/d/druntime/core/sys/posix/config.d	Sun Jan 02 23:39:37 2011 +0000
+++ b/d/druntime/core/sys/posix/config.d	Mon Jan 03 14:43:52 2011 +0000
@@ -24,3 +24,13 @@
     enum bool  __USE_FILE_OFFSET64  = __USE_LARGEFILE64;
     enum bool  __REDIRECT           = false;
 }
+
+/// %% FIXME: Probably not consistent for all architectures.
+static if(size_t.sizeof == 8)
+{
+    enum uint __WORDSIZE            = 64;
+}
+else
+{
+    enum uint __WORDSIZE            = 32;
+}
diff -r 12c159b75f86 d/druntime/core/sys/posix/signal.d
--- a/d/druntime/core/sys/posix/signal.d	Sun Jan 02 23:39:37 2011 +0000
+++ b/d/druntime/core/sys/posix/signal.d	Mon Jan 03 14:43:52 2011 +0000
@@ -309,7 +309,7 @@
 
     private enum __SI_MAX_SIZE = 128;
 
-    static if( false /* __WORDSIZE == 64 */ )
+    static if( __WORDSIZE == 64 )
     {
         private enum __SI_PAD_SIZE = ((__SI_MAX_SIZE / int.sizeof) - 4);
     }
@@ -1008,7 +1008,7 @@
 {
     private enum __SIGEV_MAX_SIZE = 64;
 
-    static if( false /* __WORDSIZE == 64 */ )
+    static if( __WORDSIZE == 64 )
     {
         private enum __SIGEV_PAD_SIZE = ((__SIGEV_MAX_SIZE / int.sizeof) - 4);
     }
diff -r 12c159b75f86 d/druntime/core/sys/posix/sys/stat.d
--- a/d/druntime/core/sys/posix/sys/stat.d	Sun Jan 02 23:39:37 2011 +0000
+++ b/d/druntime/core/sys/posix/sys/stat.d	Mon Jan 03 14:43:52 2011 +0000
@@ -89,55 +89,96 @@
         private alias ushort _pad_t;
     }
 
-    struct stat_t
+    static if( __WORDSIZE == 32 )
     {
-        dev_t       st_dev;
-        _pad_t      __pad1;
-      static if( __USE_FILE_OFFSET64 )
+      struct stat_t
       {
-        ino_t       __st_ino;
-      }
-      else
-      {
-        ino_t       st_ino;
-      }
-        mode_t      st_mode;
-        nlink_t     st_nlink;
-        uid_t       st_uid;
-        gid_t       st_gid;
-        dev_t       st_rdev;
-        _pad_t      __pad2;
-        off_t       st_size;
-        blksize_t   st_blksize;
-        blkcnt_t    st_blocks;
-      static if( false /*__USE_MISC*/ ) // true if _BSD_SOURCE || _SVID_SOURCE
-      {
-        timespec    st_atim;
-        timespec    st_mtim;
-        timespec    st_ctim;
-        alias st_atim.tv_sec st_atime;
-        alias st_mtim.tv_sec st_mtime;
-        alias st_ctim.tv_sec st_ctime;
-      }
-      else
-      {
-        time_t      st_atime;
-        c_ulong     st_atimensec;
-        time_t      st_mtime;
-        c_ulong     st_mtimensec;
-        time_t      st_ctime;
-        c_ulong     st_ctimensec;
-      }
-      static if( __USE_FILE_OFFSET64 )
-      {
-        ino_t       st_ino;
-      }
-      else
-      {
-        c_ulong     __unused4;
-        c_ulong     __unused5;
+          dev_t       st_dev;
+          _pad_t      __pad1;
+        static if( __USE_FILE_OFFSET64 )
+        {
+          ino_t       __st_ino;
+        }
+        else
+        {
+          ino_t       st_ino;
+        }
+          mode_t      st_mode;
+          nlink_t     st_nlink;
+          uid_t       st_uid;
+          gid_t       st_gid;
+          dev_t       st_rdev;
+          _pad_t      __pad2;
+          off_t       st_size;
+          blksize_t   st_blksize;
+          blkcnt_t    st_blocks;
+        static if( true /*__USE_MISC*/ ) // true if _BSD_SOURCE || _SVID_SOURCE
+        {
+          timespec    st_atim;
+          timespec    st_mtim;
+          timespec    st_ctim;
+          @property time_t st_atime() { return st_atim.tv_sec; }
+          @property time_t st_mtime() { return st_mtim.tv_sec; }
+          @property time_t st_ctime() { return st_ctim.tv_sec; }
+        }
+        else
+        {
+          time_t      st_atime;
+          c_ulong     st_atimensec;
+          time_t      st_mtime;
+          c_ulong     st_mtimensec;
+          time_t      st_ctime;
+          c_ulong     st_ctimensec;
+        }
+        static if( __USE_FILE_OFFSET64 )
+        {
+          ino_t       st_ino;
+        }
+        else
+        {
+          c_ulong     __unused4;
+          c_ulong     __unused5;
+        }
       }
     }
+    else static if( __WORDSIZE == 64 )
+    {
+      struct stat_t
+      {
+          dev_t       st_dev;
+          ino_t       st_ino;
+          nlink_t     st_nlink;
+          mode_t      st_mode;
+          uid_t       st_uid;
+          gid_t       st_gid;
+          _pad_t      __pad0;
+          dev_t       st_rdev;
+          off_t       st_size;
+          blksize_t   st_blksize;
+          blkcnt_t    st_blocks;
+        static if( true /*__USE_MISC*/ ) // true if _BSD_SOURCE || _SVID_SOURCE
+        {
+          timespec    st_atim;
+          timespec    st_mtim;
+          timespec    st_ctim;
+          @property time_t st_atime() { return st_atim.tv_sec; }
+          @property time_t st_mtime() { return st_mtim.tv_sec; }
+          @property time_t st_ctime() { return st_ctim.tv_sec; }
+        }
+        else
+        {
+          time_t      st_atime;
+          c_ulong     st_atimensec;
+          time_t      st_mtime;
+          c_ulong     st_mtimensec;
+          time_t      st_ctime;
+          c_ulong     st_ctimensec;
+        }
+          long        __unused[3];
+      }
+    }
+    else
+        static assert(false, "Architecture not supported");
 
     enum S_IRUSR    = 0400;
     enum S_IWUSR    = 0200;
diff -r 12c159b75f86 d/phobos2/std/file.d
--- a/d/phobos2/std/file.d	Sun Jan 02 23:39:37 2011 +0000
+++ b/d/phobos2/std/file.d	Mon Jan 03 14:43:52 2011 +0000
@@ -57,76 +57,9 @@
 // {{{
 version (Posix)
 {
-    version (OSX)
-    {
-        struct struct_stat64        // distinguish it from the stat() function
-        {
-            uint st_dev;        /// device
-            ushort st_mode;
-            ushort st_nlink;        /// link count
-            ulong st_ino;        /// file serial number
-            uint st_uid;        /// user ID of file's owner
-            uint st_gid;        /// user ID of group's owner
-            uint st_rdev;        /// if device then device number
-
-            int st_atime;
-            uint st_atimensec;
-            int st_mtime;
-            uint st_mtimensec;
-            int st_ctime;
-            uint st_ctimensec;
-            int st_birthtime;
-            uint st_birthtimensec;
-
-            ulong st_size;
-            long st_blocks;        /// number of allocated 512 byte blocks
-            int st_blksize;        /// optimal I/O block size
-
-            ulong st_ino64;
-            uint st_flags;
-            uint st_gen;
-            int st_lspare; /* RESERVED: DO NOT USE! */
-            long st_qspare[2]; /* RESERVED: DO NOT USE! */
-        }
-
-        extern(C) int fstat64(int, struct_stat64*);
-        extern(C) int stat64(in char*, struct_stat64*);
-    }
-    else version (FreeBSD)
-    {
-        alias core.sys.posix.sys.stat.stat_t struct_stat64;
-        alias core.sys.posix.sys.stat.fstat  fstat64;
-        alias core.sys.posix.sys.stat.stat   stat64;
-    }
-    else
-    {
-        struct struct_stat64        // distinguish it from the stat() function
-        {
-            ulong st_dev;        /// device
-            uint __pad1;
-            uint st_ino;        /// file serial number
-            uint st_mode;        /// file mode
-            uint st_nlink;        /// link count
-            uint st_uid;        /// user ID of file's owner
-            uint st_gid;        /// user ID of group's owner
-            ulong st_rdev;        /// if device then device number
-            uint __pad2;
-            align(4) ulong st_size;
-            int st_blksize;        /// optimal I/O block size
-            ulong st_blocks;        /// number of allocated 512 byte blocks
-            int st_atime;
-            uint st_atimensec;
-            int st_mtime;
-            uint st_mtimensec;
-            int st_ctime;
-            uint st_ctimensec;
-
-            ulong st_ino64;
-        }
-
-        extern(C) int fstat64(int, struct_stat64*);
-        extern(C) int stat64(in char*, struct_stat64*);
-    }
+    alias core.sys.posix.sys.stat.stat_t struct_stat64;
+    alias core.sys.posix.sys.stat.fstat  fstat64;
+    alias core.sys.posix.sys.stat.stat   stat64;
 }
 // }}}
 
