This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix compilation of regex.c on Hurd
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-alpha at sourceware dot org
- Date: Thu, 16 Feb 2012 11:15:01 +0100
- Subject: [PATCH] Fix compilation of regex.c on Hurd
Since commit 54dd0ab31fe2b2168ba1a6180a0c05941fb54b3c, the MAX macro is
used in regex_internal.c which is included by regex.c, while it is not
defined on the include on Hurd.
On other architectures it is defined in <sys/param.h> which is included
in a weird way:
from ../sysdeps/i386/i686/hp-timing.h:25,
from ../sysdeps/x86_64/hp-timing.h:23,
from ../nptl/descr.h:28,
from ../nptl/sysdeps/x86_64/tls.h:98,
from ../include/tls.h:6,
from ../bits/libc-tsd.h:45,
from ../locale/localeinfo.h:210,
from regex.c:54
2012-02-16 Aurelien Jarno <aurelien@aurel32.net>
[BZ #11638]
* posix/regex_internal.h: include <sys/param.h> to get MAX
definition.
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 1a16129..174c69c 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2005, 2007, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/param.h>
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net