LICENSE:
Mention files derived from musl library.
runtime/process_getopt:
Process files from ../getopt/*.[ch] to produce
mercury_getopt.h, mercury_getopt.c, mercury_getopt_long.c.
runtime/mercury_getopt.h:
runtime/mercury_getopt.c:
runtime/mercury_getopt_long.c:
Add files generated by process_getopt.
runtime/Mmakefile:
Update list of source files.
util/Mmakefile:
Use musl getopt if the system C library does not have getopt().
tests/debugger/browser_test.exp:
tests/debugger/browser_test.exp2:
tests/debugger/browser_test.exp3:
tests/hard_coded/runtime_opt.exp:
Update expected error messages to match new getopt() output.
changed exp output
Branches: main, 11.07
runtime/mercury_getopt.c:
Don't use MR_GNUC here since we don't #include the usual
Mercury headers here and it will always be undefined.
Branches: main, 11.07
Avoid using the __GNUC__ macro in the runtime as a test for the presence of
gcc, since clang also defines that macro. Since clang doesn't support all
of the GNU C extensions, we can't actually use __GNUC__ without also checking
whether we are actually using clang.
runtime/mercury_conf_param.h:
Add three new macros, MR_CLANG, MR_GNUC and MR_MSVC that are defined
only when the C compiler is clang, gcc, or Visual C respectively.
(In particular, MR_GNUC will _not_ be defined when the C compiler
is clang.)
runtime/mercury.c:
runtime/mercury.h:
runtime/mercury_atomic_ops.c:
runtime/mercury_atomic_ops.h
runtime/mercury_bitmap.h:
runtime/mercury_float.h:
runtime/mercury_getopt.c:
runtime/mercury_goto.h:
runtime/mercury_heap.h:
runtime/mercury_std.h:
Replace uses of the __GNUC__ and __clang__ macros with the above.
runtime/mercury_regs.h:
As above, also #include mercury_conf_param.h directly since
this file is #included by some of the tests in the configure
script.
Estimated hours taken: 0.5
Branches: main
runtime/mercury_getopt.h:
runtime/mercury_getopt.c:
runtime/mercury_getopt1.c:
Delete extraneous `MR_' prefixes in comments,
that were apparently added by an overzealous sed script.
Estimated hours taken: 1
runtime/mercury_getopt.c:
runtime/mercury_getopt1.c:
Add the files as produced by process_getopt.
runtime/process_getopt:
runtime/mercury_getopt.h:
Avoid a warning if the environment already defines __GNU_LIBRARY__,
and prevent this from omitting the entire bodies of the source files
:-(.
util/getopt.h:
A copy of the old mercury_getopt.h for mkinit.c
util/mkinit.c:
Include getopt.h instead of mercury_getopt.h, since we want getopt(),
not MR_getopt().