Skip to content
Not built

Changes

Summary

  1. Add omc_strdup wrapper and replace strdup calls (#15603) (details)
Commit abcd4bc6c153f754b0d6dcf88e00eee3220fc585 by 38031952+AnHeuermann
Add omc_strdup wrapper and replace strdup calls (#15603)

* strdup is POSIX/C23 and not available in strict C17.
* Add omc_strdup in util/omc_strdup.h that maps to strdup on C23/POSIX,
  _strdup on MSVC, and falls back to a malloc+memcpy inline otherwise.
* Replace all strdup call sites in the simulation runtime and compiler
  runtime with omc_strdup.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The file was modifiedOMCompiler/SimulationRuntime/c/CMakeLists.txt (diff)
The file was modifiedOMCompiler/Compiler/runtime/errorext.cpp (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/gc/memory_pool.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/simulation/omc_simulation_util.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/util/read_write.c (diff)
The file was modifiedOMCompiler/Compiler/runtime/settingsimpl.c (diff)
The file was modifiedOMCompiler/Parser/Parser_jl.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/simulation/modelinfo.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/util/CMakeLists.txt (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/cmake/source_code_fmu_config.cmake (diff)
The file was modifiedOMCompiler/Compiler/runtime/SimulationResults.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/Makefile.common (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/util/read_matlab4.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/util/read_csv.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/util/utility.c (diff)
The file was modifiedOMCompiler/Compiler/runtime/FMIImpl.c (diff)
The file was modifiedCMakeLists.txt (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/simulation/simulation_runtime.cpp (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/simulation/solver/solver_main.c (diff)
The file was modifiedOMCompiler/SimulationRuntime/c/simulation/simulation_input_xml.c (diff)
The file was modifiedOMCompiler/Compiler/runtime/corbaimpl.cpp (diff)
The file was addedOMCompiler/SimulationRuntime/c/util/omc_strdup.h
The file was modifiedOMCompiler/Parser/parse.c (diff)