Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc.old/dist/gcc remove __RCSID, sync with libc



details:   https://anonhg.NetBSD.org/src/rev/eddbdab1c9a8
branches:  trunk
changeset: 813182:eddbdab1c9a8
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 20 15:12:29 2016 +0000

description:
remove __RCSID, sync with libc

diffstat:

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

diffs (98 lines):

diff -r 617af059179a -r eddbdab1c9a8 external/gpl3/gcc.old/dist/gcc/final.c
--- a/external/gpl3/gcc.old/dist/gcc/final.c    Wed Jan 20 15:08:44 2016 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/final.c    Wed Jan 20 15:12:29 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 617af059179a -r eddbdab1c9a8 external/gpl3/gcc.old/dist/gcc/regsub.c
--- a/external/gpl3/gcc.old/dist/gcc/regsub.c   Wed Jan 20 15:08:44 2016 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/regsub.c   Wed Jan 20 15:12:29 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: regsub.c,v 1.2 2016/01/16 19:29:22 christos Exp $      */
+/*     $NetBSD: regsub.c,v 1.3 2016/01/20 15:12:29 christos Exp $      */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -29,12 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-#ifdef __RCSID
-__RCSID("$NetBSD: regsub.c,v 1.2 2016/01/16 19:29:22 christos Exp $");
-#endif
-
 #include <sys/param.h>
-
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
@@ -47,6 +42,8 @@
        int s_fixed;
 };
 
+#define        REINCR  64
+
 static int
 addspace(struct str *s, size_t len)
 {
@@ -58,7 +55,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 +90,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 +100,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 +146,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