Hi John, > I received a bug report for Octave that was the result of fnmatch > being defined to posix_fnmatch in config.h. I think this is due to > > AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], > [Define to a replacement function name for fnmatch().]) > > in gnulib's fnmatch.m4 file. Is there some way to protect fnmatch > from being redefined globally when using a C++ compiler as has been > done with other symbols? If not, then I can work around the problem, > but it would be nice if this redefinition did not happen when using > C++.
These are simply the old replacement idioms that are not C++ safe. We introduced the C++ safe idioms for most header files in March 2010, but the old idioms are still used in a couple of places: m4/eaccess.m4: [AC_DEFINE([eaccess], [access], m4/fnmatch.m4: AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], m4/getpass.m4: AC_DEFINE([getpass], [gnu_getpass], m4/gettimeofday.m4: AC_DEFINE([gmtime], [rpl_gmtime], m4/gettimeofday.m4: AC_DEFINE([localtime], [rpl_localtime], m4/regex.m4: AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], m4/regex.m4: AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], m4/regex.m4: AC_DEFINE([re_comp], [rpl_re_comp], m4/regex.m4: AC_DEFINE([re_exec], [rpl_re_exec], m4/regex.m4: AC_DEFINE([regcomp], [rpl_regcomp], m4/regex.m4: AC_DEFINE([regerror], [rpl_regerror], m4/regex.m4: AC_DEFINE([regexec], [rpl_regexec], m4/regex.m4: AC_DEFINE([regfree], [rpl_regfree], m4/regex.m4: AC_DEFINE([re_match_2], [rpl_re_match_2], m4/regex.m4: AC_DEFINE([re_match], [rpl_re_match], m4/regex.m4: AC_DEFINE([re_search_2], [rpl_re_search_2], m4/regex.m4: AC_DEFINE([re_search], [rpl_re_search], m4/regex.m4: AC_DEFINE([re_set_registers], [rpl_re_set_registers], m4/regex.m4: AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], m4/regex.m4: AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], m4/selinux-selinux-h.m4: AC_DEFINE([fgetfilecon], [rpl_fgetfilecon], m4/selinux-selinux-h.m4: AC_DEFINE([getfilecon], [rpl_getfilecon], m4/selinux-selinux-h.m4: AC_DEFINE([lgetfilecon], [rpl_lgetfilecon], m4/strftime.m4: AC_DEFINE([my_strftime], [nstrftime], m4/timegm.m4: AC_DEFINE([mktime], [rpl_mktime], m4/tzset.m4: AC_DEFINE([tzset], [rpl_tzset], Which of these modules are used by Octave? Bruno