@@ -175,15 +175,28 @@ else version(NetBSD)
175175}
176176else version (CRuntime_Bionic )
177177{
178- enum SIGRTMIN = 32 ;
179- version (ARM )
180- enum SIGRTMAX = 64 ;
181- else version (X86 )
182- enum SIGRTMAX = 64 ;
183- else version (MIPS32 )
184- enum SIGRTMAX = 128 ;
185- else
186- static assert (false , " Architecture not supported." );
178+ // Switched to calling these functions since Lollipop
179+ private extern (C) nothrow @nogc
180+ {
181+ int __libc_current_sigrtmin ();
182+ int __libc_current_sigrtmax ();
183+ }
184+
185+ @property int SIGRTMIN () nothrow @nogc {
186+ __gshared static int sig = - 1 ;
187+ if (sig == - 1 ) {
188+ sig = __libc_current_sigrtmin();
189+ }
190+ return sig;
191+ }
192+
193+ @property int SIGRTMAX () nothrow @nogc {
194+ __gshared static int sig = - 1 ;
195+ if (sig == - 1 ) {
196+ sig = __libc_current_sigrtmax();
197+ }
198+ return sig;
199+ }
187200}
188201else version ( CRuntime_UClibc )
189202{
@@ -760,7 +773,7 @@ else version( CRuntime_UClibc )
760773 static assert (false , " Architecture not supported." );
761774 }
762775}
763- else version (linux )
776+ else version (CRuntime_Bionic )
764777{
765778 version (X86 )
766779 {
@@ -773,7 +786,7 @@ else version (linux)
773786 }
774787
775788 sigset_t sa_mask;
776- c_ulong sa_flags;
789+ int sa_flags;
777790 void function () sa_restorer;
778791 }
779792 }
@@ -788,7 +801,22 @@ else version (linux)
788801 }
789802
790803 sigset_t sa_mask;
791- c_ulong sa_flags;
804+ int sa_flags;
805+ void function () sa_restorer;
806+ }
807+ }
808+ else version (AArch64 )
809+ {
810+ struct sigaction_t
811+ {
812+ int sa_flags;
813+ union
814+ {
815+ sigfn_t sa_handler;
816+ sigactfn_t sa_sigaction;
817+ }
818+
819+ sigset_t sa_mask;
792820 void function () sa_restorer;
793821 }
794822 }
@@ -1487,6 +1515,11 @@ else version( CRuntime_Bionic )
14871515 alias c_ulong sigset_t;
14881516 enum int LONG_BIT = 32 ;
14891517 }
1518+ else version (AArch64 )
1519+ {
1520+ struct sigset_t { ulong [1 ] sig; }
1521+ enum int LONG_BIT = 64 ;
1522+ }
14901523 else
14911524 {
14921525 static assert (false , " Architecture not supported." );
@@ -3018,6 +3051,34 @@ else version (CRuntime_Bionic)
30183051 size_t ss_size;
30193052 }
30203053 }
3054+ else version (AArch64 )
3055+ {
3056+ enum SIGPOLL = 29 ;
3057+ enum SIGPROF = 27 ;
3058+ enum SIGSYS = 31 ;
3059+ enum SIGTRAP = 5 ;
3060+ enum SIGVTALRM = 26 ;
3061+ enum SIGXCPU = 24 ;
3062+ enum SIGXFSZ = 25 ;
3063+
3064+ enum SA_ONSTACK = 0x08000000 ;
3065+ enum SA_RESETHAND = 0x80000000 ;
3066+ enum SA_RESTART = 0x10000000 ;
3067+ enum SA_SIGINFO = 4 ;
3068+ enum SA_NOCLDWAIT = 2 ;
3069+ enum SA_NODEFER = 0x40000000 ;
3070+ enum SS_ONSTACK = 1 ;
3071+ enum SS_DISABLE = 2 ;
3072+ enum MINSIGSTKSZ = 2048 ;
3073+ enum SIGSTKSZ = 8192 ;
3074+
3075+ struct stack_t
3076+ {
3077+ void * ss_sp;
3078+ int ss_flags;
3079+ size_t ss_size;
3080+ }
3081+ }
30213082 else
30223083 {
30233084 static assert (false , " Architecture not supported." );
0 commit comments