From: Sam S. <sd...@gn...> - 2002-03-31 02:27:29
|
> * In message <DFD875E85664D3118FA6080006277DE705216EF1@U8PN2.blf01.telekom.de> > * On the subject of "[clisp-list] now you can use the regexp module on MS-Windows" > * Sent on Wed, 27 Mar 2002 15:24:45 +0100 > * Honorable "Hoehle, Joerg-Cyril" <Joe...@t-...> writes: > > here's a tiny patch to make the regexp module usable with the MS-VC6 > compiler. thanks! this is really great news, worthy of a release! > I believe some users of the win32 binary distribution would very much > appreciate for this module to be included in the binary. yes - I want to make the win32 binary distribution look just like a UNIX binary distribution: with "base" and "full" dirs &c. > I'd be thankful to the autoconf & Makefile experts could come up with > a scheme to automate generating and including the module. It's trivial > to do by hand, but possibly hard to fully automate. I appended the > makefile parts that I used. I think it is okay to have a separate hand-made win32 makefile, just like with FFCALL. > Since one of the patches is to regex.c, I don't know whether the > original GNU maintainers would be interested by portability, or if > some boycott applies. are you sure this is necessary? GNU Emacs does not have this special casing and it does work on win32. It might be an efficiency issue though. > 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 VC */ > + #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__ */ do I understand correctly that without this the MS regexp would use malloc/free instead of alloca? I would rather not fork a separate CLISP version of this file. Emacs & glibc's versions of regex.c have diverged over the years and RMS recently declared that he wants them to merge (volunteers?) neither version has your MS code - so I will have to get it into the Emacs CVS tree ASAP, thus I need a justification for the change. > gdiff -c3 ../../orig/ regexi.c > *** ../../orig/regexi.c Wed Jul 22 22:22:50 1998 > --- regexi.c Fri Mar 22 15:28:22 2002 > *************** > *** 2,10 **** > /* Bruno Haible 14.4.1995 */ > > #include <sys/types.h> /* regex.h needs this */ > #include "regex.h" > > - #include <stdlib.h> /* declare malloc(), free() */ > > int mregcomp (ppreg,pattern,cflags) > regex_t* * ppreg; > --- 2,10 ---- > /* Bruno Haible 14.4.1995 */ > > #include <sys/types.h> /* regex.h needs this */ > + #include <stdlib.h> /* declare malloc(), free() */ > #include "regex.h" > > > int mregcomp (ppreg,pattern,cflags) > regex_t* * ppreg; > is this necessary? weird - it works on other platforms this way... > ++++++++++++++ hand-written modules/regexp/makefile for MSVC6 thanks. -- Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp> Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/> Diplomacy is the art of saying "nice doggy" until you can find a rock. |