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 02/17] Regex: Fix alloca ifdefs and usage.


For this one, the patch to regcomp.c is in Gnulib and looks good. However, the patch to regex_internal.h has problems compared to a similar patch that is already in Gnullib. That is, instead of this:
-#include <alloca.h>
-
  #ifndef _LIBC
  # if HAVE_ALLOCA
+#  include <alloca.h>

I suggest this replacing the #include line with this:

#if defined _LIBC || HAVE_ALLOCA
# include <alloca.h>
#endif

That way, we shouldn't need to have ugly changes like this one:

+#ifdef HAVE_ALLOCA
    if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
      prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
    else
+#endif
which will keep things simpler.


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