mc/acinclude.m4
Mooffie 0e89375772 Ticket #3617: (mc_open): handle varargs mode_t promotion issue.
On systems where 'mode_t' is smaller than 'int', doing 'va_arg (ap, mode_t)' is
wrong because of C's "default argument promotions". GCC 4 creates crashing code
in this case.

The "va_arg" page of Gnulib's manual describes the problem and a simple solution:

    https://www.gnu.org/software/gnulib/manual/html_node/va_005farg.html

However, since that solution reportedly (see thread at next link) still causes
GCC to print warnings (for no good reason; perhaps this was fixed in newer
GCCs), we pick a solution that defines a PROMOTED_MODE_T at the configuration
stage:

    https://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00231.html

(We take our 'mode_t.m4' from the most recent Gnulib source.)

(If any of the URLs above no longer works, simply search the web for the
mentioned words.)
2016-03-28 08:59:14 +03:00

23 lines
880 B
Plaintext

m4_include([m4.include/ac_onceonly.m4])
m4_include([m4.include/ax_path_lib_pcre.m4])
m4_include([m4.include/dx_doxygen.m4])
m4_include([m4.include/mc-cflags.m4])
m4_include([m4.include/mc-check-search-type.m4])
m4_include([m4.include/mode_t.m4])
m4_include([m4.include/ls-mntd-fs.m4])
m4_include([m4.include/fstypename.m4])
m4_include([m4.include/fsusage.m4])
m4_include([m4.include/mountlist.m4])
m4_include([m4.include/mc-get-fs-info.m4])
m4_include([m4.include/mc-with-x.m4])
m4_include([m4.include/mc-use-termcap.m4])
m4_include([m4.include/mc-with-screen.m4])
m4_include([m4.include/mc-with-internal-edit.m4])
m4_include([m4.include/mc-subshell.m4])
m4_include([m4.include/mc-background.m4])
m4_include([m4.include/mc-glib.m4])
m4_include([m4.include/mc-vfs.m4])
m4_include([m4.include/mc-version.m4])
m4_include([m4.include/mc-tests.m4])
m4_include([m4.include/mc-i18n.m4])