This repository was archived by the owner on Feb 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +91
-1
lines changed
Expand file tree Collapse file tree 4 files changed +91
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,17 @@ version( GNUFP )
119119 alias fenv_t = double ;
120120 alias fexcept_t = uint ;
121121 }
122+ // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/s390/fpu/bits/fenv.h
123+ else version (SystemZ )
124+ {
125+ struct fenv_t
126+ {
127+ fexcept_t __fpc;
128+ void * __unused;
129+ }
130+
131+ alias fexcept_t = uint ;
132+ }
122133 else
123134 {
124135 static assert (0 , " Unimplemented architecture" );
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ version (linux):
99extern (C ):
1010nothrow :
1111
12- import core.stdc.stdint : uintptr_t , uint32_t ;
12+ import core.stdc.stdint : uintptr_t , uint32_t , uint64_t ;
1313import core.sys.linux.config : __WORDSIZE;
1414import core.sys.linux.dlfcn : Lmid_t;
1515import core.sys.linux.elf ;
@@ -63,6 +63,12 @@ else version (AArch64)
6363 alias __WORDSIZE __ELF_NATIVE_CLASS;
6464 alias uint32_t Elf_Symndx;
6565}
66+ else version (SystemZ )
67+ {
68+ // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h
69+ alias __WORDSIZE __ELF_NATIVE_CLASS;
70+ alias uint64_t Elf_Symndx;
71+ }
6672else
6773 static assert (0 , " unimplemented" );
6874// <bits/elfclass.h>
Original file line number Diff line number Diff line change @@ -216,6 +216,19 @@ version( linux )
216216 enum O_DSYNC = 0x1000 ; // octal 010000
217217 enum O_RSYNC = O_SYNC ;
218218 }
219+ else version (SystemZ )
220+ {
221+ enum O_CREAT = 0x40 ; // octal 0100
222+ enum O_EXCL = 0x80 ; // octal 0200
223+ enum O_NOCTTY = 0x100 ; // octal 0400
224+ enum O_TRUNC = 0x200 ; // octal 01000
225+
226+ enum O_APPEND = 0x400 ; // octal 02000
227+ enum O_NONBLOCK = 0x800 ; // octal 04000
228+ enum O_SYNC = 0x101000 ; // octal 04010000
229+ enum O_DSYNC = 0x1000 ; // octal 010000
230+ enum O_RSYNC = O_SYNC ;
231+ }
219232 else
220233 static assert (0 , " unimplemented" );
221234
Original file line number Diff line number Diff line change @@ -526,6 +526,66 @@ version( linux )
526526 else
527527 static assert (stat_t.sizeof == 128 );
528528 }
529+ else version (SystemZ )
530+ {
531+ private
532+ {
533+ alias __dev_t = ulong ;
534+ alias __ino_t = c_ulong;
535+ alias __ino64_t = ulong ;
536+ alias __mode_t = uint ;
537+ alias __nlink_t = uint ;
538+ alias __uid_t = uint ;
539+ alias __gid_t = uint ;
540+ alias __off_t = c_long;
541+ alias __off64_t = long ;
542+ alias __blksize_t = int ;
543+ alias __blkcnt_t = c_long;
544+ alias __blkcnt64_t = long ;
545+ alias __timespec = timespec;
546+ alias __time_t = time_t ;
547+ }
548+ struct stat_t
549+ {
550+ __dev_t st_dev;
551+ __ino_t st_ino;
552+ __nlink_t st_nlink;
553+ __mode_t st_mode;
554+ __uid_t st_uid;
555+ __gid_t st_gid;
556+ int __glibc_reserved0;
557+ __dev_t st_rdev;
558+ __off_t st_size;
559+ static if (__USE_XOPEN2K8)
560+ {
561+ __timespec st_atim;
562+ __timespec st_mtim;
563+ __timespec st_ctim;
564+ extern (D )
565+ {
566+ @property ref time_t st_atime() { return st_atim.tv_sec; }
567+ @property ref time_t st_mtime() { return st_mtim.tv_sec; }
568+ @property ref time_t st_ctime() { return st_ctim.tv_sec; }
569+ }
570+ }
571+ else
572+ {
573+ __time_t st_atime;
574+ c_ulong st_atimensec;
575+ __time_t st_mtime;
576+ c_ulong st_mtimensec;
577+ __time_t st_ctime;
578+ c_ulong st_ctimensec;
579+ }
580+ __blksize_t st_blksize;
581+ __blkcnt_t st_blocks;
582+ c_long[3 ] __glibc_reserved;
583+ }
584+ static if (__USE_XOPEN2K8)
585+ static assert (stat_t.sizeof == 144 );
586+ else
587+ static assert (stat_t.sizeof == 144 );
588+ }
529589 else
530590 static assert (0 , " unimplemented" );
531591
You can’t perform that action at this time.
0 commit comments