尽快推进:收紧gettext shim源码锚点
This commit is contained in:
@@ -24,7 +24,11 @@ grep -F 'interp_lib = dlopen(interp_path, RTLD_NOW);' "$linuxcnc_root/src/emc/rs
|
||||
grep -F 'Constructor constructor = (Constructor)dlsym(interp_lib, "makeInterp");' \
|
||||
"$linuxcnc_root/src/emc/rs274ngc/interp_base.cc" >/dev/null
|
||||
grep -F 'dlerror()' "$linuxcnc_root/src/emc/rs274ngc/interp_base.cc" >/dev/null
|
||||
grep -F '#include "libintl.h"' "$linuxcnc_root/src/emc/rs274ngc/interp_internal.hh" >/dev/null
|
||||
grep -F '#define _(s) gettext(s)' "$linuxcnc_root/src/emc/rs274ngc/interp_internal.hh" >/dev/null
|
||||
grep -F 'CHKS((!_readers[(int)' "$linuxcnc_root/src/emc/rs274ngc/interp_internal.cc" >/dev/null
|
||||
grep -F 'Cannot use polar coordinate on a machine lacking X or Y axes' \
|
||||
"$linuxcnc_root/src/emc/rs274ngc/interp_internal.cc" >/dev/null
|
||||
grep -F 'int _task = 0;' "$linuxcnc_root/src/emc/rs274ngc/gcodemodule.cc" >/dev/null
|
||||
grep -F 'int _task = 1;' "$linuxcnc_root/src/emc/task/emctaskmain.cc" >/dev/null
|
||||
grep -F 'struct _inittab builtin_modules[]' "$linuxcnc_root/src/emc/task/taskclass.cc" >/dev/null
|
||||
@@ -165,6 +169,13 @@ for shim_path, linuxcnc_sources in expected_shims.items():
|
||||
|
||||
runtime_shim = Path("core/wasm_shims/linuxcnc_runtime_shim.cc").read_text(encoding="utf-8")
|
||||
runtime_probe = Path("core/wasm_shims/cnc_sim_wasm_runtime_probe_main.cc").read_text(encoding="utf-8")
|
||||
gettext_shim = Path("core/wasm_shims/gettext_shim.cc").read_text(encoding="utf-8")
|
||||
for needle in [
|
||||
"extern \"C\" char *gettext(const char *msgid)",
|
||||
"return const_cast<char *>(msgid ? msgid : \"\");",
|
||||
]:
|
||||
if needle not in gettext_shim:
|
||||
raise SystemExit(f"gettext shim missing diagnostic passthrough boundary: {needle}")
|
||||
for needle in [
|
||||
'extern "C" int hal_get_pin_value_by_name',
|
||||
'extern "C" int hal_get_signal_value_by_name',
|
||||
@@ -248,6 +259,8 @@ for phrase in [
|
||||
"CMake `linuxcnc_wasm_safe_probe_shims` set",
|
||||
"RS274/WASM manifest",
|
||||
"browser-safe LinuxCNC adaptations",
|
||||
"LinuxCNC `_()` diagnostic call sites",
|
||||
"browser gettext catalogs unavailable",
|
||||
"dynamic loading unavailable",
|
||||
"unavailable HAL lookup",
|
||||
"must leave HAL values unavailable",
|
||||
|
||||
Reference in New Issue
Block a user