Fix format specifier, add spaces, and use negative literals when
negative numbers are desired (with a cast for -0x80000000).

- Matthew Martin

diff --git patches/patch-jlint_cc patches/patch-jlint_cc
index 1bf4f950634..567174b30e4 100644
--- patches/patch-jlint_cc
+++ patches/patch-jlint_cc
@@ -1,6 +1,7 @@
 $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
---- jlint.cc.orig      Mon Jan 10 21:42:33 2011
-+++ jlint.cc   Wed Apr 12 14:39:37 2017
+Index: jlint.cc
+--- jlint.cc.orig
++++ jlint.cc
 @@ -41,7 +41,7 @@ bool  source_path_redefined = false;
  int   reported_message_mask = cat_all;
  FILE* history;
@@ -33,7 +34,7 @@ $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
              break;
            case 'd': // integer
 -            dst += sprintf(dst, "%d", (int)(long)parameter[index]);  
-+            dst += sprintf(dst, "%d", (long)parameter[index]);  
++            dst += sprintf(dst, "%ld", (long)parameter[index]);
              break;
            default:
              assert(false/*bad message parameter format*/);
@@ -66,3 +67,21 @@ $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
  
    monitor_stack::const_iterator it;
    for (it = this_class->usedLocks.begin();
+@@ -662,7 +662,7 @@ inline int stricmp(const char* p, const char* q) 
+   return 0;
+ }
+ 
+-void proceed_file(char* file_name, bool recursive = false)
++void proceed_file(char* file_name, int recursive = 0)
+ {
+ #ifdef _WIN32
+   HANDLE dir;
+@@ -1041,7 +1041,7 @@ int main(int argc, char* argv[])
+         if (verbose) { 
+           fprintf(stderr, 
+                   "Jlint - program correctness verifier for Java, "
+-                  "version %s ("__DATE__").\n", VERSION);
++                  "version %s (" __DATE__ ").\n", VERSION);
+         }
+         continue;
+       }
diff --git patches/patch-types_hh patches/patch-types_hh
index ceffae91f2d..62f1caa675f 100644
--- patches/patch-types_hh
+++ patches/patch-types_hh
@@ -1,6 +1,7 @@
 $OpenBSD: patch-types_hh,v 1.4 2015/06/17 19:06:58 jasper Exp $
---- types.hh.orig      Fri Oct 13 08:52:50 2006
-+++ types.hh   Wed Jun 17 21:03:25 2015
+Index: types.hh
+--- types.hh.orig
++++ types.hh
 @@ -2,10 +2,10 @@
  #define TYPES_HH
  
@@ -13,3 +14,20 @@ $OpenBSD: patch-types_hh,v 1.4 2015/06/17 19:06:58 jasper 
Exp $
  #include <string>
  #include <vector>
  #include <stddef.h>
+@@ -140,11 +140,11 @@ struct vbm_operand { 
+ 
+ int_type_range const ranges[] = { 
+   //   min         max
+-  {0x00000000, 0x00000001}, // tp_bool
+-    {0xffffff80, 0x0000007f}, // tp_byte 
+-      {0x00000000, 0x0000ffff}, // tp_char
+-        {0xffff8000, 0x00007fff}, // tp_short
+-          {0x80000000, 0x7fffffff}  // tp_int
++  { 0x00000000, 0x00000001}, // tp_bool
++    {-0x00000080, 0x0000007f}, // tp_byte 
++      { 0x00000000, 0x0000ffff}, // tp_char
++        {-0x00008000, 0x00007fff}, // tp_short
++          {static_cast<int>(-0x80000000), 0x7fffffff}  // tp_int
+ };
+ 
+ int const array_type[] = { 

Reply via email to