Tue Feb 18 16:47:20 2020 UTC ()
Fix YYDEBUG usage.


(joerg)
diff -r1.6 -r1.7 pkgsrc/comms/tn3270/distinfo
diff -r1.2 -r1.3 pkgsrc/comms/tn3270/patches/patch-tools_mkmake_mkmake.y

cvs diff -r1.6 -r1.7 pkgsrc/comms/tn3270/distinfo (expand / switch to unified diff)

--- pkgsrc/comms/tn3270/distinfo 2015/11/07 23:47:52 1.6
+++ pkgsrc/comms/tn3270/distinfo 2020/02/18 16:47:20 1.7
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.6 2015/11/07 23:47:52 dholland Exp $ 1$NetBSD: distinfo,v 1.7 2020/02/18 16:47:20 joerg Exp $
2 2
3SHA1 (tn3270-0.20100116.tar.gz) = b550f2c240aa3b185b935c11ed36e75c8c574503 3SHA1 (tn3270-0.20100116.tar.gz) = b550f2c240aa3b185b935c11ed36e75c8c574503
4RMD160 (tn3270-0.20100116.tar.gz) = 59ca2fcaa8f44258eb9cb0069cf17e560754f2c9 4RMD160 (tn3270-0.20100116.tar.gz) = 59ca2fcaa8f44258eb9cb0069cf17e560754f2c9
5SHA512 (tn3270-0.20100116.tar.gz) = 92b89b302b0827b6995c0b04f4642585f93021c5a5e7d30f414ba3fd9314ed019ba35e9a155f0cf7d9c1be7bad37dda44622f9245409a024113358a90005e9b1 5SHA512 (tn3270-0.20100116.tar.gz) = 92b89b302b0827b6995c0b04f4642585f93021c5a5e7d30f414ba3fd9314ed019ba35e9a155f0cf7d9c1be7bad37dda44622f9245409a024113358a90005e9b1
6Size (tn3270-0.20100116.tar.gz) = 156352 bytes 6Size (tn3270-0.20100116.tar.gz) = 156352 bytes
7SHA1 (patch-aa) = dfec3563624578dc775f4ec7d0ce813eb9431dce 7SHA1 (patch-aa) = dfec3563624578dc775f4ec7d0ce813eb9431dce
8SHA1 (patch-tools_mkmake_mkmake.y) = 8e9dab56b989f1dc3cfc7a17daf6cf95d2dda886 8SHA1 (patch-tools_mkmake_mkmake.y) = f2d2cb67fae365f91707f1b11a47f24a04411f85

cvs diff -r1.2 -r1.3 pkgsrc/comms/tn3270/patches/patch-tools_mkmake_mkmake.y (expand / switch to unified diff)

--- pkgsrc/comms/tn3270/patches/patch-tools_mkmake_mkmake.y 2015/11/07 23:47:52 1.2
+++ pkgsrc/comms/tn3270/patches/patch-tools_mkmake_mkmake.y 2020/02/18 16:47:20 1.3
@@ -1,26 +1,52 @@ @@ -1,26 +1,52 @@
1$NetBSD: patch-tools_mkmake_mkmake.y,v 1.2 2015/11/07 23:47:52 dholland Exp $ 1$NetBSD: patch-tools_mkmake_mkmake.y,v 1.3 2020/02/18 16:47:20 joerg Exp $
2 2
3- use standard headers 3- use standard headers
4- avoid symbol name collision on OpenBSD where clock() from time.h leaks in 4- avoid symbol name collision on OpenBSD where clock() from time.h leaks in
 5- YYDEBUG is always defined in newer byacc versions, so check for non-0
 6 value instead
5 7
6--- tools/mkmake/mkmake.y.orig 2010-01-17 18:00:07.000000000 +0000 8--- tools/mkmake/mkmake.y.orig 2010-01-17 18:00:07.000000000 +0000
7+++ tools/mkmake/mkmake.y 9+++ tools/mkmake/mkmake.y
8@@ -40,6 +40,7 @@ __RCSID("$NetBSD: mkmake.y,v 1.1.1.1 201 10@@ -40,6 +40,7 @@ __RCSID("$NetBSD: mkmake.y,v 1.1.1.1 201
9 #endif 11 #endif
10 #endif /* not lint */ 12 #endif /* not lint */
11 #endif 13 #endif
12+#include <stdlib.h> 14+#include <stdlib.h>
13  15
14 typedef struct string { 16 typedef struct string {
15 int 17 int
16@@ -308,6 +309,10 @@ white_space : WHITE_SPACE 18@@ -308,6 +309,10 @@ white_space : WHITE_SPACE
17 #include <string.h> 19 #include <string.h>
18 #include <ctype.h> 20 #include <ctype.h>
19  21
20+/* work around symbol collision on OpenBSD */ 22+/* work around symbol collision on OpenBSD */
21+#undef clock 23+#undef clock
22+#define clock Clock 24+#define clock Clock
23+ 25+
24 /* mkmake.y */ 26 /* mkmake.y */
25 void yyerror(char *); 27 void yyerror(char *);
26 void assign(same_t *, same_t *); 28 void assign(same_t *, same_t *);
 29@@ -957,7 +962,7 @@ yylex()
 30 return token_type(buffer); \
 31 }
 32 #define save(c) { last_char = c; last_saved = 1; }
 33-#if defined(YYDEBUG)
 34+#if YYDEBUG - 0
 35 #define Return(y,c) if (yydebug) { \
 36 printf("[%d]", c); \
 37 fflush(stdout); \
 38@@ -1096,12 +1101,14 @@ do_dump()
 39 string_t *string;
 40 same_t *same, *same2;
 41
 42+#if YYDEBUG - 0
 43 if (yydebug > 1) {
 44 printf("strings...\n");
 45 for (string = strings; string; string = string->next) {
 46 printf("\t%s\n", string->string);
 47 }
 48 }
 49+#endif
 50
 51 printf("# variables...\n");
 52 for (visit(variables, same); !visited(same); visit_next(same)) {