Support library C files changed to C++ with dynamic scaffold signature.
This patch moves more of the C support files in the modula-2 library
into C++ files with a dynamic scaffold signature. It also tidied
up the interface to UnixArgs and required a rebuild of the bootstrap
tool mc.
2022-06-29 Gaius Mulley <gaius.mulley@southwales.ac.uk>
gcc/m2/ChangeLog:
* bnf/gm2l.bnf (BlockInfoPtr): Capitalized comment starts.
* gm2-libs-ch/UnixArgs.cc: Rewritten from UnixArgs.c in C++
with ctor scaffold.
* gm2-libs-ch/dtoa.cc (M2_dtoa_init): Added correct argc,
argv, envp parameters. (M2_dtoa_finish) Added correct argc,
argv, envp parameters. (M2_dtoa_dep) New function.
(M2_dtoa_ctor) New function.
* gm2-libs-ch/ldtoa.cc (M2_ldtoa_init): Added correct argc,
argv, envp parameters. (M2_ldtoa_finish) Added correct argc,
argv, envp parameters. (M2_ldtoa_dep) New function.
(M2_ldtoa_ctor) New function.
* gm2-libs-iso/ProgramArgs.mod: Changed to use GetArgC and
GetArgV.
* gm2-libs/Args.def: Renamed parameter name from i to n.
* gm2-libs/Args.mod: Changed to use GetArgC and
GetArgV.
* gm2-libs/SArgs.def: Renamed parameter name from i to n.
* gm2-libs/SArgs.mod: Changed to use GetArgC and
GetArgV.
* gm2-libs/UnixArgs.def: Rewritten to export GetArgC, GetArgV
and GetEnvV.
* init/mcinit: Commented out M2Dependent.
* mc-boot-ch/GM2LINK.c: Include cstddef.h and declare
ForcedModuleInitOrder.
* mc-boot-ch/GUnixArgs.cc: Rewritten in C++ from GUnixArgs.c.
* mc-boot/GArgs.c: Rebuilt.
* mc-boot/GArgs.h: Rebuilt.
* mc-boot/GM2RTS.c: Rebuilt.
* mc-boot/GM2RTS.h: Rebuilt.
* mc-boot/GSArgs.c: Rebuilt.
* mc-boot/GSArgs.h: Rebuilt.
* mc-boot/GUnixArgs.h: Rebuilt.
* mc-boot/Gdecl.c: Rebuilt.
* mc/mc.flex: Rebuilt.
libgm2/ChangeLog:
* libm2pim/Makefile.am (libm2pim_la_SOURCES): UnixArgs.c
removed UnixArgs.cc added. (libm2pim_la_SOURCES) sckt.c
removed sckt.cc added. (libm2pim_la_SOURCES) dtoa.c
removed dtoa.cc added. (libm2pim_la_SOURCES) ldtoa.c
removed ldtoa.cc added. (libm2pim_la_SOURCES) Selective.c
removed Selective.cc added.
* libm2pim/UnixArgs.cc: Rewritten in C++.
* libm2pim/dtoa.cc: Rewritten in C++.
* libm2pim/ldtoa.cc: Rewritten in C++.
* libm2pim/sckt.cc: Rewritten in C++.
Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>