Avoid duplicate definitions of "common" global variables
authorXavier Leroy <xavier.leroy@college-de-france.fr>
Thu, 12 Dec 2019 15:41:17 +0000 (16:41 +0100)
committerStéphane Glondu <glondu@debian.org>
Fri, 24 Jul 2020 14:51:04 +0000 (16:51 +0200)
The variables are caml_debug_info and caml_atom_table.
The multiple definitions look like a cut-and-paste error.
They cause problems with C compilers that don't follow the "common" model.

Bug: https://github.com/ocaml/ocaml/issues/9144
Bug-Debian: https://bugs.debian.org/957623

Gbp-Pq: Name 0007-Avoid-duplicate-definitions-of-common-global-variabl.patch

runtime/backtrace.c
runtime/startup_nat.c

index a3c2c08fe100adc44455cdb2fc1a63ff9c920435..ddf7af14706ad8dc1241adeecabd9d2d86be428a 100644 (file)
@@ -27,9 +27,6 @@
 #include "caml/backtrace_prim.h"
 #include "caml/fail.h"
 
-/* The table of debug information fragments */
-struct ext_table caml_debug_info;
-
 CAMLexport int32_t caml_backtrace_active = 0;
 CAMLexport int32_t caml_backtrace_pos = 0;
 CAMLexport backtrace_slot * caml_backtrace_buffer = NULL;
index 43b85e3196b96209093da93dacf62b90d7cb1fa2..5b200362f7e22d8a4a9a2bd0eff8a52d9a5e4936 100644 (file)
@@ -44,7 +44,6 @@
 #endif
 
 extern int caml_parser_trace;
-CAMLexport header_t caml_atom_table[256];
 char * caml_code_area_start, * caml_code_area_end;
 struct ext_table caml_code_fragments_table;