Module Name:    src
Committed By:   rin
Date:           Fri Nov 17 14:37:37 UTC 2017

Modified Files:
        src/external/bsd/tre: Makefile.inc
        src/external/bsd/tre/dist: configure.ac
        src/external/bsd/tre/include: config.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tre/Makefile.inc
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tre/dist/configure.ac
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/tre/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tre/Makefile.inc
diff -u src/external/bsd/tre/Makefile.inc:1.2 src/external/bsd/tre/Makefile.inc:1.3
--- src/external/bsd/tre/Makefile.inc:1.2	Sat Nov  5 22:39:12 2011
+++ src/external/bsd/tre/Makefile.inc	Fri Nov 17 14:37:37 2017
@@ -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+=	-I${TREDIST}/lib -I${.CURDIR}
 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

Index: src/external/bsd/tre/dist/configure.ac
diff -u src/external/bsd/tre/dist/configure.ac:1.1.1.1 src/external/bsd/tre/dist/configure.ac:1.2
--- src/external/bsd/tre/dist/configure.ac:1.1.1.1	Thu Feb 25 07:33:18 2010
+++ src/external/bsd/tre/dist/configure.ac	Fri Nov 17 14:37:37 2017
@@ -254,13 +254,18 @@ if test "$tre_system_abi" = "yes"; then
     [ 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])

Index: src/external/bsd/tre/include/config.h
diff -u src/external/bsd/tre/include/config.h:1.1 src/external/bsd/tre/include/config.h:1.2
--- src/external/bsd/tre/include/config.h:1.1	Sat Nov  5 22:39:13 2011
+++ src/external/bsd/tre/include/config.h	Fri Nov 17 14:37:37 2017
@@ -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 */

Reply via email to