Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2013 21:31:06 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251438 - in head/gnu: lib/libregex lib/libregex/posix usr.bin/diff usr.bin/grep
Message-ID:  <201306052131.r55LV6t8052710@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Jun  5 21:31:06 2013
New Revision: 251438
URL: http://svnweb.freebsd.org/changeset/base/251438

Log:
  Connect libgnuregex 2.17 to the build.

Deleted:
  head/gnu/lib/libregex/FREEBSD-upgrade
  head/gnu/lib/libregex/posix/
  head/gnu/lib/libregex/regcomp.c
  head/gnu/lib/libregex/regex.c
  head/gnu/lib/libregex/regex_internal.c
  head/gnu/lib/libregex/regex_internal.h
  head/gnu/lib/libregex/regexec.c
Modified:
  head/gnu/lib/libregex/Makefile
  head/gnu/lib/libregex/config.h
  head/gnu/lib/libregex/regex.h
  head/gnu/usr.bin/diff/Makefile
  head/gnu/usr.bin/grep/Makefile

Modified: head/gnu/lib/libregex/Makefile
==============================================================================
--- head/gnu/lib/libregex/Makefile	Wed Jun  5 21:28:33 2013	(r251437)
+++ head/gnu/lib/libregex/Makefile	Wed Jun  5 21:31:06 2013	(r251438)
@@ -5,16 +5,20 @@ SUBDIR=		doc
 LIB=		gnuregex
 SHLIB_MAJOR=	5
 
+REGEXDIR=	${.CURDIR}/../../../contrib/libgnuregex
+.PATH:		${REGEXDIR}
+
 SRCS=		gnuregex.c
 INCSGROUPS=	INCS WRINCS PXINCS
 INCS=		regex.h.patched
 INCSNAME=	regex.h
 INCSDIR=	${INCLUDEDIR}/gnu
 WRINCS=		gnuregex.h
-PXINCS=		posix/regex.h
+PXINCS=		${REGEXDIR}/regex.h
 PXINCSDIR=	${INCSDIR}/posix
 
-CFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR}
+CFLAGS+=	-D__attribute_warn_unused_result__=""
+CFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR} -I${REGEXDIR}
 
 CLEANFILES=	regex.h.patched gnuregex.c
 regex.h.patched: regex.h

Modified: head/gnu/lib/libregex/config.h
==============================================================================
--- head/gnu/lib/libregex/config.h	Wed Jun  5 21:28:33 2013	(r251437)
+++ head/gnu/lib/libregex/config.h	Wed Jun  5 21:31:06 2013	(r251438)
@@ -10,3 +10,6 @@
 #define	HAVE_WCRTOMB	1
 #define	HAVE_MBRTOWC	1
 #define	HAVE_WCSCOLL	1
+#define	HAVE_ALLOCA	1
+#define	HAVE_STDBOOL_H	1
+#define	HAVE_STDINT_H	1

Modified: head/gnu/lib/libregex/regex.h
==============================================================================
--- head/gnu/lib/libregex/regex.h	Wed Jun  5 21:28:33 2013	(r251437)
+++ head/gnu/lib/libregex/regex.h	Wed Jun  5 21:31:06 2013	(r251438)
@@ -1,47 +1,54 @@
 /* $FreeBSD$ */
 #ifndef _REGEX_H
+
+#ifndef __USE_GNU
+#define	__USE_GNU
+#endif
+
 #include <posix/regex.h>
 
 /* Document internal interfaces.  */
-extern reg_syntax_t __re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+extern reg_syntax_t __re_set_syntax (reg_syntax_t __syntax);
 
-extern const char *__re_compile_pattern
-  _RE_ARGS ((const char *pattern, size_t length,
-             struct re_pattern_buffer *buffer));
+extern const char *__re_compile_pattern (const char *__pattern, size_t __length,
+					struct re_pattern_buffer *__buffer);
 
-extern int __re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+extern int __re_compile_fastmap (struct re_pattern_buffer *__buffer);
 
-extern int __re_search
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-            int length, int start, int range, struct re_registers *regs));
+extern int __re_search (struct re_pattern_buffer *__buffer, const char *__string,
+		       int __length, int __start, int __range,
+		       struct re_registers *__regs);
 
-extern int __re_search_2
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, int range, struct re_registers *regs, int stop));
+extern int __re_search_2 (struct re_pattern_buffer *__buffer,
+			 const char *__string1, int __length1,
+			 const char *__string2, int __length2, int __start,
+			 int __range, struct re_registers *__regs, int __stop);
 
-extern int __re_match
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-             int length, int start, struct re_registers *regs));
+extern int __re_match (struct re_pattern_buffer *__buffer, const char *__string,
+		      int __length, int __start, struct re_registers *__regs);
 
-extern int __re_match_2
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, struct re_registers *regs, int stop));
+extern int __re_match_2 (struct re_pattern_buffer *__buffer,
+			const char *__string1, int __length1,
+			const char *__string2, int __length2, int __start,
+			struct re_registers *__regs, int __stop);
 
-extern void __re_set_registers
-  _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
-             unsigned num_regs, regoff_t *starts, regoff_t *ends));
+extern void __re_set_registers (struct re_pattern_buffer *__buffer,
+			       struct re_registers *__regs,
+			       unsigned int __num_regs,
+			       regoff_t *__starts, regoff_t *__ends);
 
-extern int __regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
-				int __cflags));
+extern int __regcomp (regex_t *__restrict __preg,
+		     const char *__restrict __pattern,
+		     int __cflags);
 
-extern int __regexec _RE_ARGS ((const regex_t *__preg,
-				const char *__string, size_t __nmatch,
-				regmatch_t __pmatch[], int __eflags));
+extern int __regexec (const regex_t *__restrict __preg,
+		     const char *__restrict __string, size_t __nmatch,
+		     regmatch_t __pmatch[__restrict_arr],
+		     int __eflags);
 
-extern size_t __regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
-				    char *__errbuf, size_t __errbuf_size));
+extern size_t __regerror (int __errcode, const regex_t *__restrict __preg,
+			 char *__restrict __errbuf, size_t __errbuf_size);
 
-extern void __regfree _RE_ARGS ((regex_t *__preg));
-#endif
+extern void __regfree (regex_t *__preg);
+
+#endif	/* _REGEX_H */

Modified: head/gnu/usr.bin/diff/Makefile
==============================================================================
--- head/gnu/usr.bin/diff/Makefile	Wed Jun  5 21:28:33 2013	(r251437)
+++ head/gnu/usr.bin/diff/Makefile	Wed Jun  5 21:31:06 2013	(r251438)
@@ -17,10 +17,11 @@ CFLAGS+=-funsigned-char
 
 CFLAGS+=-DHAVE_CONFIG_H
 CFLAGS+=-DPR_PROGRAM=\"/usr/bin/pr\"
+CFLAGS+=-D__USE_GNU
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib
-CFLAGS+=-I${.CURDIR}/../../lib/libregex
+CFLAGS+=-I${.CURDIR}/../../../contrib/libgnuregex
 
 SUBDIR+=doc
 

Modified: head/gnu/usr.bin/grep/Makefile
==============================================================================
--- head/gnu/usr.bin/grep/Makefile	Wed Jun  5 21:28:33 2013	(r251437)
+++ head/gnu/usr.bin/grep/Makefile	Wed Jun  5 21:31:06 2013	(r251438)
@@ -13,7 +13,8 @@ SRCS=	closeout.c dfa.c error.c exclude.c
 	isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \
 	xstrtoumax.c
 
-CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../lib/libregex -DHAVE_CONFIG_H
+CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../../contrib/libgnuregex
+CFLAGS+=-DHAVE_CONFIG_H -D__USE_GNU
 
 .if ${MK_BSD_GREP} != "yes"
 LINKS+=	${BINDIR}/grep ${BINDIR}/egrep \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306052131.r55LV6t8052710>