Estimated hours taken: 0.2
Branches: main
runtime/GETOPT/getopt1.c:
Define __GNU_LIBRARY__ by including stdio.h before getopt.h.
util/Mmakefile:
Remove harding coding of __GNU_LIBRARY__ define as we should only
define this when we are using the GNU version of libc.
Estimated hours taken: 5
Bring the handling of MERCURY_OPTION into the 90s (a bit late :-).
Get rid of lack-of-prototype warnings from getopt.h.
runtime/getopt.[ch]:
runtime/getopt1.c:
runtime/GETOPT:
runtime/GETOPT/getopt.[ch]:
runtime/GETOPT/getopt1.c:
Move these files to a new subdirectory, GETOPT. This should avoid
the nuisance warnings one gets when stdlib.h picks up the getopt.h
in the runtime directory by accident. (The GETOPT directory should
never need to be included in -I search paths.)
runtime/mercury_getopt.[ch]:
runtime/mercury_getopt1.c:
Copies of the files in GETOPT, slightly modified to make sure that
(1) every external symbol they define starts with MR_, and (2)
we get a minimal number of compilation errors (as of now, 3 warnings
about casting away const).
These files are not to be modified by humans.
runtime/process_getopt:
This is the script that creates mercury_getopt{.h,.c,1.c} from the
files in GETOPT.
runtime/mercury_wrapper.c:
Get rid of the -s<area><size> notation, which can hard to remember,
and replace it with long options such as --heap-size=1024.
Print an error message and stop if MERCURY_OPTIONS contains anything
other than options.
Refer to everything from mercury_getopt.h with a name that starts with
MR_.
runtime/Mmakefile:
Mention the new source files.
doc/user_guide.texi:
Document the new options.
NEWS:
Mention the new options.