summaryrefslogtreecommitdiff
path: root/graphics/vcg/patches
diff options
context:
space:
mode:
authordholland <dholland>2013-04-14 00:15:27 +0000
committerdholland <dholland>2013-04-14 00:15:27 +0000
commit54b2b71888eaeeb7f4a31107e024c0782a1f1850 (patch)
tree1585a4c43981f4f6c1727b245b909744f51500ad /graphics/vcg/patches
parent3dbadf935529294db785a984facb40caad0a4fad (diff)
downloadpkgsrc-54b2b71888eaeeb7f4a31107e024c0782a1f1850.tar.gz
Use c89; fix void main; preliminary LP64 fixes (a lot more likely required)
Diffstat (limited to 'graphics/vcg/patches')
-rw-r--r--graphics/vcg/patches/patch-ac35
-rw-r--r--graphics/vcg/patches/patch-demo_animation1_c24
-rw-r--r--graphics/vcg/patches/patch-demo_animation2_c24
-rw-r--r--graphics/vcg/patches/patch-demo_animation3_c92
-rw-r--r--graphics/vcg/patches/patch-demo_vcgcount_c35
-rw-r--r--graphics/vcg/patches/patch-preconf_X11ccSunOS_conf16
6 files changed, 221 insertions, 5 deletions
diff --git a/graphics/vcg/patches/patch-ac b/graphics/vcg/patches/patch-ac
index c6d11be7161..885c28f7b44 100644
--- a/graphics/vcg/patches/patch-ac
+++ b/graphics/vcg/patches/patch-ac
@@ -1,8 +1,11 @@
-$NetBSD: patch-ac,v 1.2 1999/06/13 12:54:19 sakamoto Exp $
+$NetBSD: patch-ac,v 1.3 2013/04/14 00:15:27 dholland Exp $
---- 1.1 1995/02/18 17:07:16
-+++ src/preconf/y.tab.c 1995/02/18 17:20:13
-@@ -446,7 +446,7 @@
+- use standard headers
+- use <ctype.h> functions correctly
+
+--- src/preconf/y.tab.c.orig 1995-02-08 18:40:18.000000000 +0000
++++ src/preconf/y.tab.c
+@@ -443,7 +443,7 @@ extern YY_CHAR *yytext;
#ifndef YY_MALLOC_DECL
#define YY_MALLOC_DECL
@@ -11,7 +14,29 @@ $NetBSD: patch-ac,v 1.2 1999/06/13 12:54:19 sakamoto Exp $
#endif
#undef YYVALGLOBAL
-@@ -5815,7 +5815,7 @@
+@@ -5755,8 +5755,8 @@ char *mesge;
+ #endif
+ {
+ strcpy(myprivmessage,mesge);
+- if (islower(*myprivmessage))
+- *myprivmessage = toupper(*myprivmessage);
++ if (islower((unsigned char)*myprivmessage))
++ *myprivmessage = toupper((unsigned char)*myprivmessage);
+ FPRINTF(stderr,"Syntax error (%s: l:%d p:%d): %s !\n",
+ filename,line,pos,myprivmessage);
+ nr_errors++;
+@@ -5781,8 +5781,8 @@ char *mesge;
+ #endif
+ {
+ strcpy(myprivmessage,mesge);
+- if (islower(*myprivmessage))
+- *myprivmessage = toupper(*myprivmessage);
++ if (islower((unsigned char)*myprivmessage))
++ *myprivmessage = toupper((unsigned char)*myprivmessage);
+ FPRINTF(stderr,"Warning (%s: l:%d p:%d): %s !\n",
+ filename,line,pos,myprivmessage);
+ }
+@@ -5812,7 +5812,7 @@ static char *stdpc_id_string="$Id: stdpc
#include <stdio.h>
diff --git a/graphics/vcg/patches/patch-demo_animation1_c b/graphics/vcg/patches/patch-demo_animation1_c
new file mode 100644
index 00000000000..df6c16b0896
--- /dev/null
+++ b/graphics/vcg/patches/patch-demo_animation1_c
@@ -0,0 +1,24 @@
+$NetBSD: patch-demo_animation1_c,v 1.1 2013/04/14 00:15:27 dholland Exp $
+
+- use standard headers
+- call execl correctly
+
+--- demo/animation1.c~ 1995-02-08 11:27:32.000000000 +0000
++++ demo/animation1.c
+@@ -80,6 +80,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "../src/globals.h"
+@@ -228,7 +229,7 @@ void call_vcg()
+ #ifdef X11
+ "-geometry","200x200-30+30",
+ #endif
+- filename,0L);
++ filename, (char *)NULL);
+ }
+ /* NEVER REACHED */
+
diff --git a/graphics/vcg/patches/patch-demo_animation2_c b/graphics/vcg/patches/patch-demo_animation2_c
new file mode 100644
index 00000000000..f86077f0052
--- /dev/null
+++ b/graphics/vcg/patches/patch-demo_animation2_c
@@ -0,0 +1,24 @@
+$NetBSD: patch-demo_animation2_c,v 1.1 2013/04/14 00:15:27 dholland Exp $
+
+- use standard headers
+- call execl correctly
+
+--- demo/animation2.c~ 1995-02-08 11:27:33.000000000 +0000
++++ demo/animation2.c
+@@ -83,6 +83,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include <unistd.h>
+ #include "../src/globals.h"
+
+
+@@ -237,7 +238,7 @@ void call_vcg()
+ #ifdef X11
+ "-geometry","200x200-30+30",
+ #endif
+- filename,0L);
++ filename, (char *)NULL);
+ }
+ /* NEVER REACHED */
+
diff --git a/graphics/vcg/patches/patch-demo_animation3_c b/graphics/vcg/patches/patch-demo_animation3_c
new file mode 100644
index 00000000000..16bb7914c61
--- /dev/null
+++ b/graphics/vcg/patches/patch-demo_animation3_c
@@ -0,0 +1,92 @@
+$NetBSD: patch-demo_animation3_c,v 1.1 2013/04/14 00:15:27 dholland Exp $
+
+- fix void main
+- print pointers correctly (use %jd rather than %p as it appears they
+ need to print in decimal)
+- call execl() correctly
+
+--- demo/animation3.c.orig 1995-02-08 18:54:17.000000000 +0000
++++ demo/animation3.c
+@@ -69,16 +69,19 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include <unistd.h>
++#include <stdint.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "../src/globals.h"
+
++#define PRINTPTR(n) ((intmax_t)(intptr_t)n)
+
+ /* Prototypes
+ * ----------
+ */
+
+-void main _PP((int argc, char *argv[]));
++int main _PP((int argc, char *argv[]));
+ void call_vcg _PP((void));
+ void signal_vcg _PP((int k));
+ void wait_for_vcg _PP((void));
+@@ -132,9 +135,9 @@ int ins[15] = {
+ char timep[20] = "1";
+
+ #ifdef ANSI_C
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ #else
+-void main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char *argv[];
+ #endif
+@@ -172,6 +175,7 @@ char *argv[];
+ signal_vcg(- SIGUSR2); /* close vcg (does not work with X11) */
+ sleep(3);
+ signal_vcg(- SIGQUIT); /* exit vcg */
++ return 0;
+ }
+
+
+@@ -224,7 +228,7 @@ void call_vcg()
+ #ifdef X11
+ "-geometry","200x200-30+30",
+ #endif
+- filename,0L);
++ filename, (char *)NULL);
+ }
+ /* NEVER REACHED */
+
+@@ -762,8 +766,8 @@ NODE n;
+ int i;
+ #endif
+ {
+- FPRINTF(f," node: { title: \"%d\" label: \"%d\" ",
+- n, n->num);
++ FPRINTF(f," node: { title: \"%jd\" label: \"%d\" ",
++ PRINTPTR(n), n->num);
+ FPRINTF(f,"width: 34 ");
+ FPRINTF(f,"height: 34 ");
+
+@@ -797,8 +801,8 @@ int i;
+ if (n->sons==2) {
+ print_node(f,n->son[0], 0);
+
+- FPRINTF(f," edge: { sourcename: \"%d\" ", n);
+- FPRINTF(f,"targetname: \"%d\" ", n->son[0]);
++ FPRINTF(f," edge: { sourcename: \"%jd\" ", PRINTPTR(n));
++ FPRINTF(f,"targetname: \"%jd\" ", PRINTPTR(n->son[0]));
+ if ((n->son[0])->col == RED) {
+ FPRINTF(f,"color: red ");
+ FPRINTF(f,"linestyle: dotted ");
+@@ -810,8 +814,8 @@ int i;
+
+ print_node(f,n->son[1], 1);
+
+- FPRINTF(f," edge: { sourcename: \"%d\" ", n);
+- FPRINTF(f,"targetname: \"%d\" ", n->son[1]);
++ FPRINTF(f," edge: { sourcename: \"%jd\" ", PRINTPTR(n));
++ FPRINTF(f,"targetname: \"%jd\" ", PRINTPTR(n->son[1]));
+ if ((n->son[1])->col == RED) {
+ FPRINTF(f,"color: red ");
+ FPRINTF(f,"linestyle: dotted ");
diff --git a/graphics/vcg/patches/patch-demo_vcgcount_c b/graphics/vcg/patches/patch-demo_vcgcount_c
new file mode 100644
index 00000000000..3782f9bb33f
--- /dev/null
+++ b/graphics/vcg/patches/patch-demo_vcgcount_c
@@ -0,0 +1,35 @@
+$NetBSD: patch-demo_vcgcount_c,v 1.1 2013/04/14 00:15:27 dholland Exp $
+
+- fix void main
+
+--- demo/vcgcount.c~ 1995-02-08 11:27:34.000000000 +0000
++++ demo/vcgcount.c
+@@ -64,7 +64,7 @@
+ * ----------
+ */
+
+-void main _PP((void));
++int main _PP((void));
+
+
+
+@@ -85,9 +85,9 @@ int nredges; /* The number of edges
+ */
+
+ #ifdef ANSI_C
+-void main(void)
++int main(void)
+ #else
+-void main()
++int main()
+ #endif
+ {
+ register char *c;
+@@ -120,6 +120,7 @@ void main()
+ }
+ PRINTF("This graph contains %d nodes and %d edges.\n",
+ nrnodes, nredges);
++ return 0;
+ }
+
+
diff --git a/graphics/vcg/patches/patch-preconf_X11ccSunOS_conf b/graphics/vcg/patches/patch-preconf_X11ccSunOS_conf
new file mode 100644
index 00000000000..cd53793a25d
--- /dev/null
+++ b/graphics/vcg/patches/patch-preconf_X11ccSunOS_conf
@@ -0,0 +1,16 @@
+$NetBSD: patch-preconf_X11ccSunOS_conf,v 1.1 2013/04/14 00:15:27 dholland Exp $
+
+Fix Sun CC configuration to assume at least C89. Otherwise it tries to
+use <varargs.h> and fails.
+
+--- preconf/X11ccSunOS/conf~ 1995-02-08 19:48:39.000000000 +0000
++++ preconf/X11ccSunOS/conf
+@@ -2,7 +2,7 @@ ADDINCLUDEPATHNAME|-I/RW/esprit/X11R5/R6
+ ADDLIBPATHNAME|-L/RW/esprit/X11R5/R6/lib/
+ ADDLIBSNAME|-lXext -lX11 -lm
+ ALIGNMENTNAME|8
+-ANSINAME|#undef ANSI_C
++ANSINAME|#define ANSI_C
+ BIGLTEXNAME|big-latex
+ BINPATHNAME|/usr/local/bin/
+ BISONNAME|not_available