]> git.ipfire.org Git - thirdparty/gcc.git/commit
Support library C files changed to C++ with dynamic scaffold signature.
authorGaius Mulley <gaius.mulley@southwales.ac.uk>
Wed, 29 Jun 2022 00:02:40 +0000 (01:02 +0100)
committerGaius Mulley <gaius.mulley@southwales.ac.uk>
Wed, 29 Jun 2022 00:02:40 +0000 (01:02 +0100)
commit56ec5f3245333e2dea1afc721bf2c8bd4a8bb27e
treeaf5fc34f6bef5797bba4162d16428c7308066060
parent3a560fb4fa5b52ba9b5118892080338d61b2f0c9
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>
28 files changed:
gcc/m2/bnf/gm2l.bnf
gcc/m2/gm2-libs-ch/UnixArgs.c
gcc/m2/gm2-libs-ch/dtoa.c
gcc/m2/gm2-libs-ch/ldtoa.c
gcc/m2/gm2-libs-iso/ProgramArgs.mod
gcc/m2/gm2-libs/Args.def
gcc/m2/gm2-libs/Args.mod
gcc/m2/gm2-libs/SArgs.def
gcc/m2/gm2-libs/SArgs.mod
gcc/m2/gm2-libs/UnixArgs.def
gcc/m2/init/mcinit
gcc/m2/mc-boot-ch/GM2LINK.c
gcc/m2/mc-boot-ch/GUnixArgs.c [deleted file]
gcc/m2/mc-boot/GArgs.c
gcc/m2/mc-boot/GArgs.h
gcc/m2/mc-boot/GM2RTS.c
gcc/m2/mc-boot/GM2RTS.h
gcc/m2/mc-boot/GSArgs.c
gcc/m2/mc-boot/GSArgs.h
gcc/m2/mc-boot/GUnixArgs.h
gcc/m2/mc-boot/Gdecl.c
gcc/m2/mc/mc.flex
libgm2/libm2pim/Makefile.am
libgm2/libm2pim/Selective.cc [moved from libgm2/libm2pim/Selective.c with 85% similarity]
libgm2/libm2pim/UnixArgs.cc [moved from libgm2/libm2pim/UnixArgs.c with 51% similarity]
libgm2/libm2pim/dtoa.cc [moved from libgm2/libm2pim/dtoa.c with 89% similarity]
libgm2/libm2pim/ldtoa.cc [moved from libgm2/libm2pim/ldtoa.c with 84% similarity]
libgm2/libm2pim/sckt.cc [moved from libgm2/libm2pim/sckt.c with 93% similarity]