Skip to content
Snippets Groups Projects
Commit c190d143 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[machdep] fix generation of undef directives for __fc_machdep.h

parent 078c0a1d
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,13 @@ let gen_define fmt macro pp def = ...@@ -28,7 +28,13 @@ let gen_define fmt macro pp def =
let gen_include fmt file = let gen_include fmt file =
Format.fprintf fmt "#include <%s>@\n" file Format.fprintf fmt "#include <%s>@\n" file
let gen_undef fmt macro = Format.fprintf fmt "#undef %s@\n" macro let gen_undef fmt macro =
let macro =
match String.index_from_opt macro 0 '(' with
| None -> macro
| Some n -> String.sub macro 0 n
in
Format.fprintf fmt "#undef %s@\n" macro
let gen_define_string fmt macro def = let gen_define_string fmt macro def =
gen_define fmt macro Format.pp_print_string def gen_define fmt macro Format.pp_print_string def
......
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