myserver-commit
[Top][All Lists]
Advanced

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

[myserver-commit] [3054] Enable usage of the TRE regexp library if avail


From: Giuseppe Scrivano
Subject: [myserver-commit] [3054] Enable usage of the TRE regexp library if available.
Date: Mon, 20 Apr 2009 19:20:29 +0000

Revision: 3054
          http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=3054
Author:   gscrivano
Date:     2009-04-20 19:20:26 +0000 (Mon, 20 Apr 2009)
Log Message:
-----------
Enable usage of the TRE regexp library if available.

Modified Paths:
--------------
    trunk/myserver/configure.in
    trunk/myserver/include/base/regex/myserver_regex.h

Modified: trunk/myserver/configure.in
===================================================================
--- trunk/myserver/configure.in 2009-04-19 14:20:31 UTC (rev 3053)
+++ trunk/myserver/configure.in 2009-04-20 19:20:26 UTC (rev 3054)
@@ -83,9 +83,9 @@
 
 AC_CHECK_HEADER([sys/sendfile.h], AC_DEFINE(SENDFILE, 1, [Define if the 
sendfile syscall is present]))
 
+AC_CHECK_HEADER([tre/regex.h], AC_DEFINE(REGEX_TRE, 1, [Define if the tre 
regex library is present]))
+AC_SEARCH_LIBS([regcomp], [c tre], AC_DEFINE(REGEX, 1, [Define if the regex 
library is present]))
 
-AC_CHECK_FUNCS(regcomp, AC_DEFINE(REGEX, 1, [Define if the regex library is 
present]) )
-
 AC_CHECK_FUNCS(gettimeofday, AC_DEFINE(GETTIMEOFDAY, 1, [Define if the 
gettimeofday function is present]) )
 
 AC_CHECK_FUNCS(setgroups, AC_DEFINE(SETGROUPS, 1, [Define if the setgroups 
function is present]) )

Modified: trunk/myserver/include/base/regex/myserver_regex.h
===================================================================
--- trunk/myserver/include/base/regex/myserver_regex.h  2009-04-19 14:20:31 UTC 
(rev 3053)
+++ trunk/myserver/include/base/regex/myserver_regex.h  2009-04-20 19:20:26 UTC 
(rev 3054)
@@ -28,7 +28,9 @@
 
 #include <stdio.h>
 
-#ifdef REGEX
+#if REGEX_TRE
+#include <tre/regex.h>
+#elif REGEX
 #include <regex.h>
 #else
        typedef void* regmatch_t;





reply via email to

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