This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix compilation of regex.c on Hurd


On Thu, Feb 16, 2012 at 11:36:02PM +0100, Thomas Schwinge wrote:
> Hi!
> 
> On Thu, 16 Feb 2012 11:15:01 +0100, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > 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.
> 
> Generally ACK (but not in the sense of commit approval); though I would
> (and have, in our trees) put the #include <sys/param.h> nearer to where
> it is used, that is into regex_internal.c instead of regex_internal.h.
> 

I have put it in regex_internal.h for consistency reason, currently 
regex_internal.c does not include any file, and get them from 
regex_internal.h.

I am fine with any solution as long as we don't have to patch this file
manually in Debian. Note however that if we put the include directive in
regex_internal.c, we should also probably moved some of them from
regex_internal.h to regex_internal.c (the <assert.h> one for example)
for consistency reason.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]