Hello community,

here is the log from the commit of package sparse for openSUSE:Factory checked 
in at 2015-11-11 10:29:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sparse (Old)
 and      /work/SRC/openSUSE:Factory/.sparse.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sparse"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sparse/sparse.changes    2015-01-20 
12:26:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sparse.new/sparse.changes       2015-11-11 
10:30:05.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Oct  9 10:26:19 UTC 2015 - jsl...@suse.com
+
+- update to 20150124
+  * Teach sparse about the __COUNTER__ predefined macro
+  * Make macro expanded string immutable
+  * s390x: add the proper defines for data types
+
+-------------------------------------------------------------------

Old:
----
  sparse-20141211.tar.xz

New:
----
  sparse-20150124.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sparse.spec ++++++
--- /var/tmp/diff_new_pack.Z0aBzW/_old  2015-11-11 10:30:06.000000000 +0100
+++ /var/tmp/diff_new_pack.Z0aBzW/_new  2015-11-11 10:30:06.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package sparse
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,14 +20,16 @@
 Summary:        A semantic parser of source files
 License:        MIT
 Group:          Development/Tools/Building
-Version:        20141211
+Version:        20150124
 Release:        0
 Url:            https://sparse.wiki.kernel.org/index.php/Main_Page
 Source:         sparse-%{version}.tar.xz
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  gcc
 BuildRequires:  gtk2-devel
 BuildRequires:  libxml2-devel
+BuildRequires:  make
 BuildRequires:  pkg-config
 BuildRequires:  xz
 
@@ -70,7 +72,7 @@
        PKGCONFIGDIR=%{_datadir}/pkgconfig CFLAGS="%{optflags}"
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT \
+%{makeinstall} \
        PREFIX=%{_prefix} LIBDIR=%{_libdir} MANDIR=%{_mandir} \
        PKGCONFIGDIR=%{_datadir}/pkgconfig
 

++++++ sparse-20141211.tar.xz -> sparse-20150124.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/cgcc new/sparse-20150124/cgcc
--- old/sparse-20141211/cgcc    2015-01-14 15:55:41.000000000 +0100
+++ new/sparse-20150124/cgcc    2015-10-09 12:22:11.000000000 +0200
@@ -279,6 +279,12 @@
                &float_types (1, 1, 21, [24,8], [53,11], [113,15]) .
                &define_size_t ($m64 ? "long unsigned int" : "unsigned int") .
                ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
+    } elsif ($spec eq 's390x') {
+       return (' -D__s390x__ -D__s390__ -D_BIG_ENDIAN' .
+               &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
+               &float_types (1, 1, 36, [24,8], [53,11], [113,15]) .
+               &define_size_t ("long unsigned int") .
+               ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
     } elsif ($spec eq 'host_os_specs') {
        my $os = `uname -s`;
        chomp $os;
@@ -294,6 +300,8 @@
            return &add_specs ('x86_64');
        } elsif ($arch =~ /^(ppc)$/i) {
            return &add_specs ('ppc');
+       } elsif ($arch =~ /^(s390x)$/i) {
+           return &add_specs ('s390x');
        } elsif ($arch =~ /^(sparc64)$/i) {
            return &add_specs ('sparc64');
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/char.c new/sparse-20150124/char.c
--- old/sparse-20141211/char.c  2015-01-14 15:55:41.000000000 +0100
+++ new/sparse-20150124/char.c  2015-10-09 12:22:11.000000000 +0200
@@ -93,6 +93,7 @@
        static char buffer[MAX_STRING];
        int len = 0;
        int bits;
+       int esc_count = 0;
 
        while (!done) {
                switch (token_type(next)) {
@@ -111,6 +112,8 @@
                const char *p = token->string->data;
                const char *end = p + token->string->length - 1;
                while (p < end) {
+                       if (*p == '\\')
+                               esc_count++;
                        p = parse_escape(p, &v, end, bits, token->pos);
                        if (len < MAX_STRING)
                                buffer[len] = v;
@@ -123,11 +126,13 @@
                len = MAX_STRING;
        }
 
-       if (len >= string->length)      /* can't cannibalize */
-               string = __alloc_string(len+1);
-       string->length = len+1;
-       memcpy(string->data, buffer, len);
-       string->data[len] = '\0';
+       if (esc_count || len >= string->length) {
+               if (string->immutable || len >= string->length) /* can't 
cannibalize */
+                       string = __alloc_string(len+1);
+               string->length = len+1;
+               memcpy(string->data, buffer, len);
+               string->data[len] = '\0';
+       }
        expr->string = string;
        expr->wide = is_wide;
        return token;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/ident-list.h 
new/sparse-20150124/ident-list.h
--- old/sparse-20141211/ident-list.h    2015-01-14 15:55:41.000000000 +0100
+++ new/sparse-20150124/ident-list.h    2015-10-09 12:22:11.000000000 +0200
@@ -108,6 +108,7 @@
 __IDENT(__func___ident, "__func__", 0);
 __IDENT(__FUNCTION___ident, "__FUNCTION__", 0);
 __IDENT(__PRETTY_FUNCTION___ident, "__PRETTY_FUNCTION__", 0);
+__IDENT(__COUNTER___ident, "__COUNTER__", 0);
 
 /* Sparse commands */
 IDENT_RESERVED(__context__);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/pre-process.c 
new/sparse-20150124/pre-process.c
--- old/sparse-20141211/pre-process.c   2015-01-14 15:55:41.000000000 +0100
+++ new/sparse-20150124/pre-process.c   2015-10-09 12:22:11.000000000 +0200
@@ -45,6 +45,7 @@
 #include "scope.h"
 
 static int false_nesting = 0;
+static int counter_macro = 0;          // __COUNTER__ expansion
 
 #define INCLUDEPATHS 300
 const char *includepath[INCLUDEPATHS+1] = {
@@ -181,6 +182,8 @@
                        time(&t);
                strftime(buffer, 9, "%T", localtime(&t));
                replace_with_string(token, buffer);
+       } else if (token->ident == &__COUNTER___ident) {
+               replace_with_integer(token, counter_macro++);
        }
        return 1;
 }
@@ -209,7 +212,7 @@
 
 static void preprocessor_line(struct stream *stream, struct token **line);
 
-static struct token *collect_arg(struct token *prev, int vararg, struct 
position *pos)
+static struct token *collect_arg(struct token *prev, int vararg, struct 
position *pos, int count)
 {
        struct stream *stream = input_streams + prev->pos.stream;
        struct token **p = &prev->next;
@@ -231,6 +234,11 @@
                case TOKEN_STREAMBEGIN:
                        *p = &eof_token_entry;
                        return next;
+               case TOKEN_STRING:
+               case TOKEN_WIDE_STRING:
+                       if (count > 1)
+                               next->string->immutable = 1;
+                       break;
                }
                if (false_nesting) {
                        *p = next->next;
@@ -276,7 +284,7 @@
        arglist = arglist->next;        /* skip counter */
 
        if (!wanted) {
-               next = collect_arg(start, 0, &what->pos);
+               next = collect_arg(start, 0, &what->pos, 0);
                if (eof_token(next))
                        goto Eclosing;
                if (!eof_token(start->next) || !match_op(next, ')')) {
@@ -286,7 +294,7 @@
        } else {
                for (count = 0; count < wanted; count++) {
                        struct argcount *p = &arglist->next->count;
-                       next = collect_arg(start, p->vararg, &what->pos);
+                       next = collect_arg(start, p->vararg, &what->pos, 
p->normal);
                        arglist = arglist->next->next;
                        if (eof_token(next))
                                goto Eclosing;
@@ -323,7 +331,7 @@
        goto out;
 Emany:
        while (match_op(next, ',')) {
-               next = collect_arg(next, 0, &what->pos);
+               next = collect_arg(next, 0, &what->pos, 0);
                count++;
        }
        if (eof_token(next))
@@ -1259,8 +1267,15 @@
                } else {
                        try_arg(token, TOKEN_MACRO_ARGUMENT, arglist);
                }
-               if (token_type(token) == TOKEN_ERROR)
+               switch (token_type(token)) {
+               case TOKEN_ERROR:
                        goto Earg;
+
+               case TOKEN_STRING:
+               case TOKEN_WIDE_STRING:
+                       token->string->immutable = 1;
+                       break;
+               }
        }
        token = alloc_token(&expansion->pos);
        token_type(token) = TOKEN_UNTAINT;
@@ -1882,6 +1897,7 @@
                sym->normal = 0;
        }
 
+       counter_macro = 0;
 }
 
 static void handle_preprocessor_line(struct stream *stream, struct token 
**line, struct token *start)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/token.h new/sparse-20150124/token.h
--- old/sparse-20141211/token.h 2015-01-14 15:55:41.000000000 +0100
+++ new/sparse-20150124/token.h 2015-10-09 12:22:11.000000000 +0200
@@ -164,7 +164,8 @@
 };
 
 struct string {
-       unsigned int length;
+       unsigned int length:31;
+       unsigned int immutable:1;
        char data[];
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/validation/preprocessor/counter1.c 
new/sparse-20150124/validation/preprocessor/counter1.c
--- old/sparse-20141211/validation/preprocessor/counter1.c      1970-01-01 
01:00:00.000000000 +0100
+++ new/sparse-20150124/validation/preprocessor/counter1.c      2015-10-09 
12:22:11.000000000 +0200
@@ -0,0 +1,12 @@
+__COUNTER__
+__COUNTER__
+/*
+ * check-name: __COUNTER__ #1
+ * check-command: sparse -E $file
+ *
+ * check-output-start
+
+0
+1
+ * check-output-end
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/validation/preprocessor/counter2.c 
new/sparse-20150124/validation/preprocessor/counter2.c
--- old/sparse-20141211/validation/preprocessor/counter2.c      1970-01-01 
01:00:00.000000000 +0100
+++ new/sparse-20150124/validation/preprocessor/counter2.c      2015-10-09 
12:22:11.000000000 +0200
@@ -0,0 +1,14 @@
+__FILE__ __COUNTER__
+#include <counter2.h>
+__FILE__ __COUNTER__
+/*
+ * check-name: __COUNTER__ #2
+ * check-command: sparse -Ipreprocessor -E $file
+ *
+ * check-output-start
+
+"preprocessor/counter2.c" 0
+"preprocessor/counter2.h" 1
+"preprocessor/counter2.c" 2
+ * check-output-end
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/validation/preprocessor/counter2.h 
new/sparse-20150124/validation/preprocessor/counter2.h
--- old/sparse-20141211/validation/preprocessor/counter2.h      1970-01-01 
01:00:00.000000000 +0100
+++ new/sparse-20150124/validation/preprocessor/counter2.h      2015-10-09 
12:22:11.000000000 +0200
@@ -0,0 +1 @@
+__FILE__ __COUNTER__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sparse-20141211/validation/preprocessor/counter3.c 
new/sparse-20150124/validation/preprocessor/counter3.c
--- old/sparse-20141211/validation/preprocessor/counter3.c      1970-01-01 
01:00:00.000000000 +0100
+++ new/sparse-20150124/validation/preprocessor/counter3.c      2015-10-09 
12:22:11.000000000 +0200
@@ -0,0 +1,14 @@
+/*
+ * check-name: __COUNTER__ #3
+ * check-command: sparse -Ipreprocessor -E preprocessor/counter1.c $file
+ *
+ * check-output-start
+
+0
+1
+"preprocessor/counter2.c" 0
+"preprocessor/counter2.h" 1
+"preprocessor/counter2.c" 2
+ * check-output-end
+ */
+#include "counter2.c"


Reply via email to