[621] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

regcomp on solaris 2 (my previuos patch)

daemon@ATHENA.MIT.EDU (E. Jay Berkenbilt)
Mon Jul 10 21:40:30 1995

Date: Mon, 10 Jul 1995 21:40:15 -0400
From: "E. Jay Berkenbilt" <ejb@ERA.COM>
To: bug-zephyr@MIT.EDU


My previous patch, which contained an autoconf test, had a slight
flaw... it would sometimes reports that regcomp fails when it works
because some systems' regex.h references files that it does not
include.  (This appears to the case with Linux, at least with libc
4.6.27.)  I still think my patch is necessary since regcomp really
does seem to fail with solaris 2.  I believe adding 

#ifdef STDC_HEADERS
# include <stdlib.h>
#else
#include <sys/types.h>

before

#include <regex.h>

in my autoconf test should reduce the likelihood of false failures on
this test.

On the other hand, if regcomp really does work on solaris 2 and is
just being used wrong by regcomp.c, and if someone who has
documentation on regcomp knows how to fix this, that would be a better
fix.  In any case, I won't bother sending a complete here -- I added
the four lines above to configure.in and retested under linux with
success.  I will enclose a little teeny patch relative to my previous
patch. 


--
E. Jay Berkenbilt (ejb@ERA.COM)  |  Member, League for Programming Freedom
Engineering Research Associates  |  lpf@uunet.uu.net, http://www.lpf.org  

=========================================================================== 

--- configure.in~  Mon Jul 10 21:14:01 1995
+++ configure.in   Mon Jul 10 21:29:58 1995
@@ -169,6 +169,10 @@
    AC_MSG_CHECKING(whether regcomp works)
    AC_CACHE_VAL(zephyr_cv_sys_regcomp_works,
    [AC_TRY_RUN([ 
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+#include <sys/types.h>
 #include <regex.h>
 int main()
 {


home help back first fref pref prev next nref lref last post