Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/dist/gcc sync with gcc.old (catch up with ...



details:   https://anonhg.NetBSD.org/src/rev/cc522be088c5
branches:  trunk
changeset: 343041:cc522be088c5
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 20 15:13:33 2016 +0000

description:
sync with gcc.old (catch up with __RCSID removal and libc sync)

diffstat:

 external/gpl3/gcc/dist/gcc/final.c  |   4 ++--
 external/gpl3/gcc/dist/gcc/regsub.c |  22 +++++++++-------------
 2 files changed, 11 insertions(+), 15 deletions(-)

diffs (99 lines):

diff -r 17a084d9f974 -r cc522be088c5 external/gpl3/gcc/dist/gcc/final.c
--- a/external/gpl3/gcc/dist/gcc/final.c        Wed Jan 20 15:12:29 2016 +0000
+++ b/external/gpl3/gcc/dist/gcc/final.c        Wed Jan 20 15:13:33 2016 +0000
@@ -1608,7 +1608,7 @@
   debug_regex_maps = map;
 }
 
-extern ssize_t aregsub(char **, const char *,
+extern ssize_t regasub(char **, const char *,
   const regmatch_t *rm, const char *);
 
 /* Perform user-specified mapping of debug filename regular expressions.  Return
@@ -1623,7 +1623,7 @@
 
   for (map = debug_regex_maps; map; map = map->next)
     if (regexec (&map->re, filename, 10, rm, 0) == 0
-       && aregsub (&s, map->sub, rm, filename) >= 0)
+       && regasub (&s, map->sub, rm, filename) >= 0)
       {
         const char *name = ggc_strdup(s);
         free(s);
diff -r 17a084d9f974 -r cc522be088c5 external/gpl3/gcc/dist/gcc/regsub.c
--- a/external/gpl3/gcc/dist/gcc/regsub.c       Wed Jan 20 15:12:29 2016 +0000
+++ b/external/gpl3/gcc/dist/gcc/regsub.c       Wed Jan 20 15:13:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: regsub.c,v 1.2 2016/01/16 19:28:36 christos Exp $      */
+/*     $NetBSD: regsub.c,v 1.3 2016/01/20 15:13:33 christos Exp $      */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -28,13 +28,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#include <sys/cdefs.h>
-#ifdef __RCSID
-__RCSID("$NetBSD: regsub.c,v 1.2 2016/01/16 19:28:36 christos Exp $");
-#endif
-
 #include <sys/param.h>
-
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
@@ -47,6 +41,8 @@
        int s_fixed;
 };
 
+#define        REINCR  64
+
 static int
 addspace(struct str *s, size_t len)
 {
@@ -58,7 +54,7 @@
        if (s->s_fixed)
                return -1;
 
-       s->s_max += MAX(len, 64);
+       s->s_max += len + REINCR;
 
        v = realloc(s->s_ptr, s->s_max);
        if (v == NULL)
@@ -93,7 +89,7 @@
 initstr(struct str *s, char *buf, size_t len)
 {
        s->s_max = len;
-       s->s_ptr = buf == NULL ? (char *)malloc(len) : buf;
+       s->s_ptr = (char *)(buf == NULL ? malloc(len) : buf);
        s->s_fixed = buf != NULL;
        s->s_len = 0;
        return s->s_ptr == NULL ? -1 : 0;
@@ -103,7 +99,7 @@
 regsub1(char **buf, size_t len, const char *sub,
     const regmatch_t *rm, const char *str)
 {
-        ssize_t i;                 
+        ssize_t i;
         char c; 
        struct str s;
 
@@ -149,15 +145,15 @@
 }
 
 ssize_t
-regsub(char *buf, size_t len, const char *sub, const regmatch_t *rm,
+regnsub(char *buf, size_t len, const char *sub, const regmatch_t *rm,
     const char *str)
 {
        return regsub1(&buf, len, sub, rm, str);
 }
 
 ssize_t
-aregsub(char **buf, const char *sub, const regmatch_t *rm, const char *str)
+regasub(char **buf, const char *sub, const regmatch_t *rm, const char *str)
 {
        *buf = NULL;
-       return regsub1(buf, 64, sub, rm, str);
+       return regsub1(buf, REINCR, sub, rm, str);
 }



Home | Main Index | Thread Index | Old Index