Fix some documentation errors.

library/getopt.m
library/getopt_io.m:
	The first argument of the long_option predicate is a string,
	not a character (as the comment in getopt.m as said since
	1996!)

README.MS-VisualC:
	Fix a doubled-up word.
Delete unused local variables in the trace library.

trace/mercury_trace.c:
trace/mercury_trace_cmd_breakpoint.c:
trace/mercury_trace_cmd_browsing.c:
trace/mercury_trace_cmd_dd.c:
trace/mercury_trace_cmd_developer.c:
trace/mercury_trace_declarative.c:
trace/mercury_trace_help.c:
trace/mercury_trace_internal.c:
trace/mercury_trace_spy.c:
trace/mercury_trace_tables.c:
trace/mercury_trace_vars.c:
	As above.
Strip executable as a separate step on Mac OS X.

We had stopped passing the linker strip flag on Mac OS X because it had
become deprecated and useless there, but we can still strip the binary
with the `strip' tool.

This commit changes compile_target_code.m to do so, but NOT the
`ml' shell script.

compiler/options.m:
doc/user_guide.texi:
	Add option --strip-executable-command.

configure.ac:
scripts/Mercury.config.in:
	Set --strip-executable-command="strip" on Darwin platforms,
	or an empty string elsewhere.

compiler/compile_target_code.m:
	Invoke the --strip-executable-command separately after linking
	an executable if necessary.

scripts/ml.in:
	Fix a bug: use configured value of LD_STRIP_FLAG instead of
	assuming "-s".
Avoid a warning from clang.

trace/mercury_trace_readline.c:
	Replace a call to fprintf with a call to fputs.  This avoids
	a warning from clang about a format string not being a string
	literal.
Avoid warnings from clang in the runtime and util directories.

runtime/mercury_stack_trace.c:
	In the function MR_dump_stack_from_layout_clique initialise the variable
	lines_dumped_so_far.  (This appears to be an actual bug.)

runtime/mercury_prof.c:
	Only define the static global in_profiling_code if either of call count
	profiling or time profiling is enabled.

runtime/mercury_context.c:
runtime/mercury_deconstruct.c:
runtime/mercury_deep_profiling.c:
	Only define some local variables in grades that require them.

runtime/mercury_float.c:
runtime/mercury_deep_copy_body.h:
runtime/mercury_construct.c:
runtime/mercury_memory_zones.c:
runtime/mercury_stm.c:
runtime/mercury_trace_base.c:
runtime/mercury_type_info.c:
	Delete unused local variables.

util/mdemangle.c:
	Delete an unused static global variable.

	Use fputs in place of fprintf in a couple of places in order
	to avoid warnings about format strings that are not string literals.

	Delete an unused function.

util/mkinit.c:
util/mkinit_erl.c:
	Delete unused local variables.
Use GCC's cast to union extension with clang.

runtime/mercury_float.h:
	Define MR_float_to_word and MR_word_to_float as macros using GCC's
	cast to union extension with clang, since it also supports that
	extension.
Fix more issues in the runtime identified using clang -Wall.

runtime/mercury_wrapper.c:
	Declare MR_usage to be a noreturn function.  This avoids
	warnings in other parts of this module.

runtime/mercury_context.c
	Only define MR_write_out_profiling_parallel_execution if
	MR_PROFILE_PARALLEL_EXECUTION_SUPPORT is defined; it is
	otherwise unused.

	Fix incorrect conversion specifiers in some calls to fprintf.

	Only define the function action_shutdown_engine and friends
	if MR_THREAD_SAFE is defined.

	Do not define MR_checking_pending_contexts if MR_HIGHLEVEL_CODE
	is defined.

runtime/mercury_debug.c:
	Protect a group of function prototypes with MR_LOWLEVEL_DEBUG.
	(The corresponding definitions were already protected by this
	macro.)

runtime/mercury_label.c:
	Delete the declaration of the function compare_entry_by_addr
	as that function is not defined anywhere.

	Delete an unused local variable.

runtime/mercury_make_type_info_body.h:
	Delete an unused local variable.

runtime/mercury_memory.c:
	Delete left over function prototypes for try_munprotect and
	explain_context.  (The functions were moved into the module
	mercury_memory_handlers a long time ago.)

runtime/mercury_memory_handlers.c:
	Protect functions that are only used in the low-level agc
	grades by the appropriate macros.

runtime/mercury_minimal.c:
runtime/mercury_mm_own_stacks.c:
	Don't define some global variables in high-level C grades that
	are not necessary in those grades.

runtime/mercury_tabling.c:
	Only define MR_table_assert_failed if MR_TABLE_DEBUG is defined
	since it is otherwise unused.
Fix compilation of runtime when MR_TABLE_DEBUG is defined.

runtime/mercury_tabling.c:
	Fix the broken definition for the MR_table_assert macro.
Fix detection of pthreads-win32.

The check for the pthreads-win32 implementation did not work because it
compiled a test program that was designed to be run, but did not run it.
Running a test program is undesirable for cross-compilation anyway.

m4/mercury.m4:
	Replace MERCURY_HAVE_PTHREADS_WIN32 test with one based only on
	successful compilation.
Remove unnecessary detection of sync term size during configure.

The size of a sync term must be kept synchronised between the runtime
and the compiler.  The size is "detected" during configure by running
a small program whose output would always be the same.  It doesn't work
for cross-compilation so a value is hard-coded in configure_mingw_cross,
which is liable to be missed if the sync term ever changes.

configure.ac:
	Hard code sync term size as it measures a number of detstack
	slots, which does not depend on architecture.

runtime/mercury_conf.h.in:
	Define MR_SYNC_TERM_SIZE.

runtime/mercury_std.h:
	Add MR_STATIC_ASSERT macro.

runtime/mercury_context.h:
	Check at compile time that the value of MR_SYNC_TERM_SIZE
	from configure.ac matches the real size.

tools/configure_mingw_cross:
	Delete mercury_cv_sync_term_size as no longer needed.
Support 64-bit Windows target in configure_mingw_cross.

Add support for MinGW-w64 cross-compilers targeting 64-bit Windows
in configure_mingw_cross.

tools/configure_mingw_cross:
	If the host triplet begins with "x86_64" then assume
	configuration values for a 64-bit target.

README.MinGW-cross:
	Update documentation.

NEWS:
	Announce change.
Match extended host triplets from MXE project.

The MXE project extends target triplets with dot-separated suffixes on
their unstable branch, e.g. "x86_64-w64-mingw32.static".

configure.ac:
compiler/Mmakefile:
	Relax two pattern matches for the extra suffixes.

	Delete ineffective assignment.
Add warnings about issues with 64-bit Windows and low-level C grades.

README.MinGW:
README.MinGW-cross:
	As above.
Fix up inlining macros for clang.

Currently we use the C89 definitions of MR_STATIC_INLINE and friends with
clang, which is less than ideal in a couple of ways, firstly we might not get
as much inlining as we would like and secondly, for clang, it causes large
numbers of warnings about unused functions to be generated.

Using GNU C style inlining does not work because we enable the -ansi option
when using clang and the (current) behaviour of the -ansi option with clang is
to enforce strict C89 conformance (i.e. disable any GNU C extensions.).

This change avoids all of the above by (1) adding C99 style definitions of
MR_STATIC_INLINE etc for clang and (2) not passing -ansi to clang (i.e. putting
clang into c99, or technically gnu99, mode).  We fall back on the C89 style
definitions if the user does something odd like setting -ansi or -std=c89
themselves.

runtime/mercury_std.h:
	Define MR_STATIC_INLINE and friends for clang in the case where clang
	is in C99 (or equivalent) mode.

configure.ac:
	Set CFLAGS_FOR_ANSI for clang to empty.  Add an explanation of why
	we do this.

scripts/mgnuc.in:
	Don't pass -ansi to clang.
Update NEWS file entries for 14.01.1.

NEWS:
	As above.
Avoid C compiler warnings that occur when using clang with -Wall.

Except where noted otherwise below most of these warnings relate to implicit
conversions between 64- and 32-bit integers or the signedness of integers
differing in spots.

library/construct.m:
	Delete an unused local variable in the implementation of get_functor_lex.

library/bitmap.m:
	The function MR_bitmap_cmp returns an MR_Integer not an int.

library/thread.semaphore.m:
	Change the count field of the ML_SEMAPHORE_STRUCT structure into
	an MR_Integer (which is what gets passed in).

trace/mercury_trace_declarative.c:
	Avoid a warning about fprintf being called where its second argument
	is not a string literal.  (In this case it can be replaced by a call
	to fputs.)

library/io.m:
mdbcomp/rtti_access.m:
trace/mercury_trace.c:
trace/mercury_trace_cmd_breakpoint.c:
trace/mercury_trace_cmd_help.c:
trace/mercury_trace_completion.m:
trace/mercury_trace_declarative.[ch]:
trace/mercury_trace_external.c:
trace/mercury_trace_internal.c:
trace/mercury_trace_source.c:
trace/mercury_trace_tables.c:
trace/mercury_trace_vars.c:
util/info_to_mdb.c:
util/mfiltercc.c:
util/mdemangle.c:
util/mkinit.c:
util/mkinit_erl.c:
util/mkinit_common.h:
util/mkinit_common.c:
	As above.
Fix warnings from clang in deep_profiler directory.

deep_profiler/timeout.m:
	Mark functions that cannot return as such.

	Use don't-care variables for the I/O state in foreign_procs
	instead of an assignment in the foreign proc body.  (Both clang
	and MSVC emit spurious warnings about the latter.)

	Avoid some warnings about variables that are unused unless
	MR_DEBUG_MDPROF_SIGNAL is enabled.
Avoid more C compiler warnings in the library and compiler directories.

library/io.m:
	Add casts where appropriate to avoid warnings.

	Return a dummy time value in io.file_modification_time_2/6 when the
	call to stat() fails.  (This is safe since the caller will never
	examine this value if the call to stat() fails.)  Doing so avoids
	a warning about the time value not being initialized in some branches.

library/string.m:
	Delete unused local variables in foreign_procs.

library/time.m:
compiler/timestamp.m:
	Cast assignments to the fields of the tm structure to ints.

compiler/md4.m:
	Avoid a warning about comparing integers of different signedness.

compiler/process_util.m:
	Add casts where appropriate to avoid warnings.
Replace escaped slashes in user's guide

doc/user_guide.texi:
    Replaced wrongly escaped backslashes with plain backslashes.
Improve C# and Java shell script launchers.

The generated shell script to launch C# executables did not use absolute
paths.  The C# and Java shell scripts were missing some variable
quoting, leading to problems with paths containing spaces.

compiler/compile_target_code.m:
	Assign the script directory to DIR and use that to launch the
	CLI interpreter.

	Quote the CLI_INTERPRETER and executable filename.

compiler/module_cmds.m:
	Quote Mercury-generated CLASSPATH in case the directory contains
	spaces.

	Make DIR absolute in case the script is invoked from a
	subdirectory.