Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
319b722d
Commit
319b722d
authored
2 years ago
by
Virgile Prevosto
Committed by
Andre Maroneze
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[machdep] generate errnos in __fc_machdep.h
parent
0b24003c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_internals/runtime/machdep.ml
+4
-1
4 additions, 1 deletion
src/kernel_internals/runtime/machdep.ml
with
4 additions
and
1 deletion
src/kernel_internals/runtime/machdep.ml
+
4
−
1
View file @
319b722d
...
@@ -197,6 +197,9 @@ let gen_intlike_max fmt name repr mach =
...
@@ -197,6 +197,9 @@ let gen_intlike_max fmt name repr mach =
let
gen_char_bit
fmt
_mach
=
let
gen_char_bit
fmt
_mach
=
gen_define_int
fmt
"__CHAR_BIT"
8
gen_define_int
fmt
"__CHAR_BIT"
8
let
gen_define_errno_macro
fmt
(
name
,
v
)
=
gen_define_string
fmt
(
"__FC_"
^
(
String
.
uppercase_ascii
name
))
v
let
gen_all_defines
fmt
mach
=
let
gen_all_defines
fmt
mach
=
Format
.
fprintf
fmt
"/* Machdep-specific info for Frama-C's libc */@
\n
"
;
Format
.
fprintf
fmt
"/* Machdep-specific info for Frama-C's libc */@
\n
"
;
Format
.
fprintf
fmt
"#ifndef __FC_MACHDEP@
\n
#define __FC_MACHDEP@
\n
"
;
Format
.
fprintf
fmt
"#ifndef __FC_MACHDEP@
\n
#define __FC_MACHDEP@
\n
"
;
...
@@ -248,7 +251,7 @@ let gen_all_defines fmt mach =
...
@@ -248,7 +251,7 @@ let gen_all_defines fmt mach =
gen_define_macro
fmt
"__FC_TMP_MAX"
mach
.
tmp_max
;
gen_define_macro
fmt
"__FC_TMP_MAX"
mach
.
tmp_max
;
gen_define_macro
fmt
"__FC_RAND_MAX"
mach
.
rand_max
;
gen_define_macro
fmt
"__FC_RAND_MAX"
mach
.
rand_max
;
gen_define_macro
fmt
"__FC_MB_CUR_MAX"
mach
.
mb_cur_max
;
gen_define_macro
fmt
"__FC_MB_CUR_MAX"
mach
.
mb_cur_max
;
(* TODO: __FC_E*, errno enumeration *)
List
.
iter
(
gen_define_errno_macro
fmt
)
mach
.
errno
;
gen_define_macro
fmt
"__FC_TIME_T"
mach
.
time_t
;
gen_define_macro
fmt
"__FC_TIME_T"
mach
.
time_t
;
gen_define_macro
fmt
"__FC_NSIG"
mach
.
nsig
;
gen_define_macro
fmt
"__FC_NSIG"
mach
.
nsig
;
(* NB: should we use Cil.gccMode() here? *)
(* NB: should we use Cil.gccMode() here? *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment