Skip to content
Snippets Groups Projects
Commit 048042b0 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Libc] add constant NSIG (and _NSIG for Linux machdeps)

parent 4de42849
No related branches found
No related tags found
No related merge requests found
...@@ -774,7 +774,8 @@ ...@@ -774,7 +774,8 @@
//NOT IN MSVC: #define __FC_ERFKILL //NOT IN MSVC: #define __FC_ERFKILL
//NOT IN MSVC: #define __FC_EHWPOISON //NOT IN MSVC: #define __FC_EHWPOISON
/* signal.h */
#define __FC_NSIG 23
// End of MSVC_X86_64 // End of MSVC_X86_64
#else #else
......
...@@ -271,4 +271,8 @@ ...@@ -271,4 +271,8 @@
/* time.h */ /* time.h */
#define __FC_TIME_T long #define __FC_TIME_T long
/* signal.h */
#define __FC_NSIG 65
#define __FC__NSIG __FC_NSIG
#endif #endif
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "features.h" #include "features.h"
__PUSH_FC_STDLIB __PUSH_FC_STDLIB
#include "__fc_machdep.h"
#include "__fc_define_pid_t.h" #include "__fc_define_pid_t.h"
#include "__fc_define_uid_and_gid.h" #include "__fc_define_uid_and_gid.h"
#include "__fc_define_pthread_types.h" #include "__fc_define_pthread_types.h"
...@@ -101,6 +102,11 @@ extern void __fc_sig_err(int); ...@@ -101,6 +102,11 @@ extern void __fc_sig_err(int);
#define SIGRTMIN 32 #define SIGRTMIN 32
#define SIGRTMAX 64 #define SIGRTMAX 64
#define NSIG __FC_NSIG
#ifdef __FC__NSIG
#define _NSIG __FC__NSIG
#endif
#define SA_NOCLDSTOP 0x00000001 #define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002 #define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004 #define SA_SIGINFO 0x00000004
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
function sigaction: precondition 'valid_read_act_or_null' got status valid. function sigaction: precondition 'valid_read_act_or_null' got status valid.
[eva] tests/libc/signal_h.c:48: [eva] tests/libc/signal_h.c:48:
function sigaction: precondition 'separation,separated_acts' got status valid. function sigaction: precondition 'separation,separated_acts' got status valid.
[eva] share/libc/signal.h:216: [eva] share/libc/signal.h:222:
cannot evaluate ACSL term, unsupported ACSL construct: logic coercion struct sigaction -> set<struct sigaction> cannot evaluate ACSL term, unsupported ACSL construct: logic coercion struct sigaction -> set<struct sigaction>
[eva] Done for function sigaction [eva] Done for function sigaction
[eva] computing for function sigaction <- main. [eva] computing for function sigaction <- main.
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
[eva:invalid-assigns] tests/libc/signal_h.c:51: [eva:invalid-assigns] tests/libc/signal_h.c:51:
Completely invalid destination for assigns clause *oldact. Ignoring. Completely invalid destination for assigns clause *oldact. Ignoring.
[eva] Done for function sigaction [eva] Done for function sigaction
[eva] tests/libc/signal_h.c:55: assertion 'valid_nsig' got status valid.
[eva] Recording results for main [eva] Recording results for main
[eva] done for function main [eva] done for function main
[eva] ====== VALUES COMPUTED ====== [eva] ====== VALUES COMPUTED ======
......
...@@ -52,5 +52,7 @@ int main() { ...@@ -52,5 +52,7 @@ int main() {
return -1; return -1;
} }
//@ assert valid_nsig: NSIG >= 0;
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment