mc/m4.include
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
..
vfs Unify m4 macro names. 2016-03-04 09:23:36 +03:00
ac_onceonly.m4 Remove autogenerated stuff from git-tracking. 2009-05-07 15:38:06 +03:00
ax_path_lib_pcre.m4 PCRE_CFLAGS are CPPFLAGS, actually. 2012-12-18 16:27:49 +04:00
dx_doxygen.m4 Misspellings fixes by https://github.com/vlajos/misspell_fixer 2013-06-15 11:10:41 +04:00
fstypename.m4 src/filemanager/mountlist.c and related m4 macros: sync with gnulib. 2011-10-28 11:26:54 +04:00
fsusage.m4 Use "'" instead of "`" for messages and comments quoting. 2013-06-03 14:21:03 +03:00
ls-mntd-fs.m4 Ticket #3441: fix Linux kernel-specific segfault on startup. 2015-05-03 18:45:02 +03:00
mc-background.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-cflags.m4 Add -Wassign-enum compiler wirning. 2016-03-04 09:23:37 +03:00
mc-check-search-type.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-get-fs-info.m4 Use #ifdef for autoconf provided marcos (continue). 2015-05-03 19:43:49 +03:00
mc-glib.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-i18n.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-subshell.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-tests.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-use-termcap.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-version.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-vfs.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-internal-edit.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-screen-ncurses.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-screen-slang.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-screen.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-x.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mode_t.m4 Ticket #3617: (mc_open): handle varargs mode_t promotion issue. 2016-03-28 08:59:14 +03:00
mountlist.m4 src/filemanager/mountlist.c and related m4 macros: sync with gnulib. 2011-10-28 11:26:54 +04:00