gnu-regexp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Regexp] regexp alloca patch for MS-VC(!) compiler?


From: Hoehle, Joerg-Cyril
Subject: [Regexp] regexp alloca patch for MS-VC(!) compiler?
Date: Wed, 15 May 2002 17:45:21 +0200

Hi,

Here's a patch that provides alloca() support for GNU regexp
when compiled with MS-VC.
The patch looks exactly the same for lots of other GNU Software
which also uses alloca(). It's always the same sequence of #ifdef I've seen.

What's questioned here by me is the readiness of
LiGnux people to include support for a really proprietary and
non-UNIX compiler and system in what to me looks essentially
like UNIX Software. Am I worrying too much?

The thing is that GNU CLISP contains regexp as a module. However,
CLISP compiles on >30 systems, including non-UNIX ones. If the patch
were not included, possibly Sam Steingold, the current CLISP maintainer,
would have to distribute the patched version of regexp with CLISP
and not forget to re-patch in case a new regexp comes out and becomes
integrated. That would be a pain for CLISP maintainers.

gdiff -c3 ../../orig/ regex.c
*** ../../orig/regex.c  Wed Jul 22 22:22:47 1998
--- regex.c     Fri Mar 22 15:58:38 2002
***************
*** 211,218 ****
--- 211,223 ----
  #if HAVE_ALLOCA_H
  #include <alloca.h>
  #else /* not __GNUC__ or HAVE_ALLOCA_H */
+ #ifdef _MSC_VER /* Microsoft Visual C */
+ #include <malloc.h>
+ #define alloca _alloca
+ #else
  #ifndef _AIX /* Already did AIX, up at the top.  */
  char *alloca ();
+ #endif /* not MS-VC */
  #endif /* not _AIX */
  #endif /* not HAVE_ALLOCA_H */ 
  #endif /* not __GNUC__ */

Thanks for sharing your opinion on this topic.

Regards,
        Jörg Höhle.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]