Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/tre Specify TRE_REGEX_T_FIELD in CPPFLAGS when ...



details:   https://anonhg.NetBSD.org/src/rev/bf8651454133
branches:  trunk
changeset: 827903:bf8651454133
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Nov 17 14:37:37 2017 +0000

description:
Specify TRE_REGEX_T_FIELD in CPPFLAGS when we want ABI compatible with libc,
in a similar manner to TRE_SYSTEM_REGEX_H_PATH and TRE_USE_SYSTEM_REGEX_H.

No binary changes.

diffstat:

 external/bsd/tre/Makefile.inc      |   4 ++--
 external/bsd/tre/dist/configure.ac |  11 ++++++++---
 external/bsd/tre/include/config.h  |   4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r e5459fe32e69 -r bf8651454133 external/bsd/tre/Makefile.inc
--- a/external/bsd/tre/Makefile.inc     Fri Nov 17 13:27:09 2017 +0000
+++ b/external/bsd/tre/Makefile.inc     Fri Nov 17 14:37:37 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.2 2011/11/05 22:39:12 christos Exp $
+#      $NetBSD: Makefile.inc,v 1.3 2017/11/17 14:37:37 rin Exp $
 #      @(#)Makefile.inc        8.1 (Berkeley) 6/4/93
 
 # regex sources
@@ -8,6 +8,6 @@
 CPPFLAGS+=     -DHAVE_CONFIG_H=1
 CPPFLAGS+=     -DTRE_SYSTEM_REGEX_H_PATH=\"${NETBSDSRCDIR}/include/regex.h\"
 CPPFLAGS+=     -DTRE_USE_SYSTEM_REGEX_H=1
-
+CPPFLAGS+=     -DTRE_REGEX_T_FIELD=re_g
 
 WARNS= 4
diff -r e5459fe32e69 -r bf8651454133 external/bsd/tre/dist/configure.ac
--- a/external/bsd/tre/dist/configure.ac        Fri Nov 17 13:27:09 2017 +0000
+++ b/external/bsd/tre/dist/configure.ac        Fri Nov 17 14:37:37 2017 +0000
@@ -254,13 +254,18 @@
     [ Define to include the system regex.h from TRE regex.h ])
   AC_DEFINE_UNQUOTED(TRE_SYSTEM_REGEX_H_PATH, "$tre_system_regex_h",
     [ Define to the absolute path to the system regex.h ])
-  AC_DEFINE_UNQUOTED(TRE_REGEX_T_FIELD, $tre_regex_t_field,
-    [ Define to a field in the regex_t struct where TRE should store a
-      pointer to the internal tre_tnfa_t structure ])
+  AC_DEFINE_UNQUOTED(TRE_REGEX_T_FIELD, $tre_regex_t_field)
 else
   AC_DEFINE(TRE_REGEX_T_FIELD, value)
 fi
 
+AH_VERBATIM(TRE_REGEX_T_FIELD,
+[/* Define to a field in the regex_t struct where TRE should store a pointer to
+   the internal tre_tnfa_t structure */
+#ifndef TRE_REGEX_T_FIELD
+#undef TRE_REGEX_T_FIELD
+#endif])
+
 AC_CHECK_FUNCS([isascii isblank])
 
 AC_CHECK_HEADERS([getopt.h])
diff -r e5459fe32e69 -r bf8651454133 external/bsd/tre/include/config.h
--- a/external/bsd/tre/include/config.h Fri Nov 17 13:27:09 2017 +0000
+++ b/external/bsd/tre/include/config.h Fri Nov 17 14:37:37 2017 +0000
@@ -198,7 +198,9 @@
 
 /* Define to a field in the regex_t struct where TRE should store a pointer to
    the internal tre_tnfa_t structure */
-#define TRE_REGEX_T_FIELD re_g
+#ifndef TRE_REGEX_T_FIELD
+#define TRE_REGEX_T_FIELD value
+#endif
 
 /* Define to the absolute path to the system regex.h */
 /* #undef TRE_SYSTEM_REGEX_H_PATH */



Home | Main Index | Thread Index | Old Index