changeset 39513:b677c76bfd55

fnmatch: Avoid conflicting macro definitions of 'fnmatch'. Reported by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>. * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro in config.h.
author Bruno Haible <bruno@clisp.org>
date Sun, 19 Aug 2018 03:00:13 +0200
parents ee30659007a3
children 6ac3e7acd928
files ChangeLog m4/fnmatch.m4
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Aug 18 23:26:06 2018 +0200
+++ b/ChangeLog	Sun Aug 19 03:00:13 2018 +0200
@@ -1,3 +1,11 @@
+2018-08-18  Bruno Haible  <bruno@clisp.org>
+
+	fnmatch: Avoid conflicting macro definitions of 'fnmatch'.
+	Reported by Reuben Thomas <rrt@sc3d.org> in
+	<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>.
+	* m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro
+	in config.h.
+
 2018-08-18  Bruno Haible  <bruno@clisp.org>
 
 	Avoid -Wcast-function-type warnings from casts after GetProcAddress.
--- a/m4/fnmatch.m4	Sat Aug 18 23:26:06 2018 +0200
+++ b/m4/fnmatch.m4	Sun Aug 19 03:00:13 2018 +0200
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 11.  -*- coding: utf-8 -*-
+# Check for fnmatch - serial 12.  -*- coding: utf-8 -*-
 
 # Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -140,11 +140,6 @@
 
 AC_DEFUN([gl_PREREQ_FNMATCH],
 [
-  dnl We must choose a different name for our function, since on ELF systems
-  dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
-  dnl compiled into a shared library.
-  AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch],
-    [Define to a replacement function name for fnmatch().])
   dnl Prerequisites of lib/fnmatch.c.
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])