In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a63f6d0bb1d4dcbe5008c6c24052d35cfbb1e46c?hp=5637ef5b34a3e8caf72080387a15ea8d81b61baf>

- Log -----------------------------------------------------------------
commit a63f6d0bb1d4dcbe5008c6c24052d35cfbb1e46c
Author: Tony Cook <[email protected]>
Date:   Mon Jan 16 21:11:10 2012 +1100

    config.over is generated on some platforms, .gitignore it

M       .gitignore

commit ca835a205dc40c038b61a59b046afee4bd329f4e
Author: Tony Cook <[email protected]>
Date:   Mon Jan 16 21:00:00 2012 +1100

    avoid overflowing a 32-bit signed int
    
    and the associated warning from Solaris C:
    
    "regcomp.c", line 5294: warning: integer overflow detected: op "<<"

M       regexp.h

commit 5c72e80d9b6c141c9b2f5403860c03e6ebb64bc1
Author: Tony Cook <[email protected]>
Date:   Tue Jan 17 09:02:50 2012 +1100

    handle U suffixed unsigned int literals from regexp.h

M       regen/regcomp.pl
-----------------------------------------------------------------------

Summary of changes:
 .gitignore       |    3 +++
 regen/regcomp.pl |    4 ++++
 regexp.h         |    2 +-
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/.gitignore b/.gitignore
index f08b705..3cbb99f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,9 @@ bug*.pl
 /x2p/cflags
 /x2p/makefile
 
+# generated for configuration overrides, eg Solaris
+/config.over
+
 # alternative names on OS X
 /GNUmakefile
 /x2p/GNUmakefile
diff --git a/regen/regcomp.pl b/regen/regcomp.pl
index 6ed84f3..69643ca 100644
--- a/regen/regcomp.pl
+++ b/regen/regcomp.pl
@@ -262,6 +262,10 @@ foreach my $file ("op_reg_common.h", "regexp.h") {
             foreach my $key (keys %definitions) {
                 s/\b$key\b/$definitions{$key}/g;
             }
+
+           # Remove the U suffix from unsigned int literals
+           s/\b([0-9]+)U\b/$1/g;
+
             my $newval = eval $_;   # Get numeric definition
 
             $definitions{$define} = $newval;
diff --git a/regexp.h b/regexp.h
index 5ee6448..26d2cd9 100644
--- a/regexp.h
+++ b/regexp.h
@@ -379,7 +379,7 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp)
 #define RXf_START_ONLY         (1<<(RXf_BASE_SHIFT+19)) /* Pattern is /^/ */
 #define RXf_SKIPWHITE          (1<<(RXf_BASE_SHIFT+20)) /* Pattern is for a 
split / / */
 #define RXf_WHITE              (1<<(RXf_BASE_SHIFT+21)) /* Pattern is /\s+/ */
-#define RXf_NULL               (1<<(RXf_BASE_SHIFT+22)) /* Pattern is // */
+#define RXf_NULL               (1U<<(RXf_BASE_SHIFT+22)) /* Pattern is // */
 #if RXf_BASE_SHIFT+22 > 31
 #   error Too many RXf_PMf bits used.  See regnodes.h for any spare in middle
 #endif

--
Perl5 Master Repository

Reply via email to