summaryrefslogtreecommitdiff
path: root/lang/pict
diff options
context:
space:
mode:
authordholland <dholland>2009-10-28 06:13:40 +0000
committerdholland <dholland>2009-10-28 06:13:40 +0000
commit42e7d2b5f94e124731db93c0e8ef8d2a2f4a29fd (patch)
treece5ee6bdc12f20a96fbdc4b0690f33ca70b17a39 /lang/pict
parentbbec7432ecd568a1d122ee78f8258a33a6cba5b0 (diff)
downloadpkgsrc-42e7d2b5f94e124731db93c0e8ef8d2a2f4a29fd.tar.gz
Initial import of Pict 4.1 into the NetBSD package system.
Pict is a language in the ML tradition, formed by adding a layer of convenient syntactic sugar and a static type system to a tiny core. The current release includes a Pict-to-C compiler, reference manual, language tutorial, numerous libraries, and example programs. The core language - an asynchronous variant of Milner, Parrow, and Walker's pi-calculus - has been used as a theoretical foundation for a broad class of concurrent computations. The goal in Pict is to identify high-level idioms that arise naturally when these primitives are used to build working programs - idioms such as basic data structures, protocols for returning results, higher-order programming, selective communication, and concurrent objects. The type system integrates a number of features found in recent work on theoretical foundations for typed object-oriented languages: higher-order polymorphism, simple recursive types, subtyping, and a powerful partial type inference algorithm.
Diffstat (limited to 'lang/pict')
-rw-r--r--lang/pict/DESCR16
-rw-r--r--lang/pict/Makefile26
-rw-r--r--lang/pict/PLIST123
-rw-r--r--lang/pict/distinfo24
-rw-r--r--lang/pict/patches/patch-aa32
-rw-r--r--lang/pict/patches/patch-ab39
-rw-r--r--lang/pict/patches/patch-ac31
-rw-r--r--lang/pict/patches/patch-ad28
-rw-r--r--lang/pict/patches/patch-ae15
-rw-r--r--lang/pict/patches/patch-af17
-rw-r--r--lang/pict/patches/patch-ya109
-rw-r--r--lang/pict/patches/patch-yb33
-rw-r--r--lang/pict/patches/patch-yc152
-rw-r--r--lang/pict/patches/patch-yd49
-rw-r--r--lang/pict/patches/patch-ye42
-rw-r--r--lang/pict/patches/patch-yf15
-rw-r--r--lang/pict/patches/patch-yg15
-rw-r--r--lang/pict/patches/patch-yh58
-rw-r--r--lang/pict/patches/patch-yi24
-rw-r--r--lang/pict/patches/patch-yj48
-rw-r--r--lang/pict/patches/patch-yk15
-rw-r--r--lang/pict/patches/patch-yl15
-rw-r--r--lang/pict/patches/patch-ym15
23 files changed, 941 insertions, 0 deletions
diff --git a/lang/pict/DESCR b/lang/pict/DESCR
new file mode 100644
index 00000000000..2e5d5c91ec3
--- /dev/null
+++ b/lang/pict/DESCR
@@ -0,0 +1,16 @@
+Pict is a language in the ML tradition, formed by adding a layer of
+convenient syntactic sugar and a static type system to a tiny
+core. The current release includes a Pict-to-C compiler, reference
+manual, language tutorial, numerous libraries, and example programs.
+
+The core language - an asynchronous variant of Milner, Parrow, and
+Walker's pi-calculus - has been used as a theoretical foundation for a
+broad class of concurrent computations. The goal in Pict is to
+identify high-level idioms that arise naturally when these primitives
+are used to build working programs - idioms such as basic data
+structures, protocols for returning results, higher-order programming,
+selective communication, and concurrent objects. The type system
+integrates a number of features found in recent work on theoretical
+foundations for typed object-oriented languages: higher-order
+polymorphism, simple recursive types, subtyping, and a powerful
+partial type inference algorithm.
diff --git a/lang/pict/Makefile b/lang/pict/Makefile
new file mode 100644
index 00000000000..1879527e9a5
--- /dev/null
+++ b/lang/pict/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DISTNAME= pict-4.1
+CATEGORIES= lang
+MASTER_SITES= http://www.cis.upenn.edu/~bcpierce/papers/pict/pict-4.1/
+
+MAINTAINER= dholland@NetBSD.org
+HOMEPAGE= http://www.cis.upenn.edu/~bcpierce/papers/pict/Html/Pict.html
+COMMENT= Concurrent language based on Milner's pi calculus
+
+LICENSE= gnu-gpl-v2
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= gmake
+INSTALLATION_DIRS+= bin lib/pict share/doc/pict
+
+MAKE_ENV+= X11INCLUDE=${X11BASE}/include \
+ X11LIB=${X11BASE}/lib
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/Doc/*.ps ${DESTDIR}${PREFIX}/share/doc/pict/
+
+.include "../../lang/ocaml/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/pict/PLIST b/lang/pict/PLIST
new file mode 100644
index 00000000000..8a25d91384b
--- /dev/null
+++ b/lang/pict/PLIST
@@ -0,0 +1,123 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+bin/pict
+lib/pict/Contrib/Chun.px
+lib/pict/Contrib/Chun.px.o
+lib/pict/Contrib/Clock.px
+lib/pict/Contrib/Clock.px.o
+lib/pict/Contrib/Parse.px
+lib/pict/Contrib/Parse.px.o
+lib/pict/Contrib/Ppm.px
+lib/pict/Contrib/Ppm.px.o
+lib/pict/Contrib/TD.px
+lib/pict/Contrib/TD.px.o
+lib/pict/Picture/Basic.px
+lib/pict/Picture/Basic.px.o
+lib/pict/Picture/Combine.px
+lib/pict/Picture/Combine.px.o
+lib/pict/Picture/Other.px
+lib/pict/Picture/Other.px.o
+lib/pict/Picture/Package.px
+lib/pict/Picture/Package.px.o
+lib/pict/Picture/Picture.px
+lib/pict/Picture/Picture.px.o
+lib/pict/Picture/Server.px
+lib/pict/Picture/Server.px.o
+lib/pict/Picture/Transform.px
+lib/pict/Picture/Transform.px.o
+lib/pict/Picture/Types.px
+lib/pict/Picture/Types.px.o
+lib/pict/Picture/Utils.px
+lib/pict/Picture/Utils.px.o
+lib/pict/Posix/Args.px
+lib/pict/Posix/Args.px.o
+lib/pict/Posix/Env.px
+lib/pict/Posix/Env.px.o
+lib/pict/Posix/Fd.px
+lib/pict/Posix/Fd.px.o
+lib/pict/Posix/File.px
+lib/pict/Posix/File.px.o
+lib/pict/Posix/Perm.px
+lib/pict/Posix/Perm.px.o
+lib/pict/Posix/Persona.px
+lib/pict/Posix/Persona.px.o
+lib/pict/Posix/Proc.px
+lib/pict/Posix/Proc.px.o
+lib/pict/Posix/Signals.px
+lib/pict/Posix/Signals.px.o
+lib/pict/Posix/Sockets.px
+lib/pict/Posix/Sockets.px.o
+lib/pict/Posix/Stat.px
+lib/pict/Posix/Stat.px.o
+lib/pict/Posix/Time.px
+lib/pict/Posix/Time.px.o
+lib/pict/Std/Array.px
+lib/pict/Std/Array.px.o
+lib/pict/Std/Array2.px
+lib/pict/Std/Array2.px.o
+lib/pict/Std/Bool.px
+lib/pict/Std/Bool.px.o
+lib/pict/Std/Bytes.px
+lib/pict/Std/Bytes.px.o
+lib/pict/Std/Char.px
+lib/pict/Std/Char.px.o
+lib/pict/Std/Cmp.px
+lib/pict/Std/Cmp.px.o
+lib/pict/Std/Error.px
+lib/pict/Std/Error.px.o
+lib/pict/Std/Events.px
+lib/pict/Std/Events.px.o
+lib/pict/Std/Exn.px
+lib/pict/Std/Exn.px.o
+lib/pict/Std/External.px
+lib/pict/Std/External.px.o
+lib/pict/Std/Float.px
+lib/pict/Std/Float.px.o
+lib/pict/Std/Hash.px
+lib/pict/Std/Hash.px.o
+lib/pict/Std/Int.px
+lib/pict/Std/Int.px.o
+lib/pict/Std/Io.px
+lib/pict/Std/Io.px.o
+lib/pict/Std/List.px
+lib/pict/Std/List.px.o
+lib/pict/Std/MD5.px
+lib/pict/Std/MD5.px.o
+lib/pict/Std/Match.px
+lib/pict/Std/Match.px.o
+lib/pict/Std/Misc.px
+lib/pict/Std/Misc.px.o
+lib/pict/Std/Opt.px
+lib/pict/Std/Opt.px.o
+lib/pict/Std/PP.px
+lib/pict/Std/PP.px.o
+lib/pict/Std/Prim.px
+lib/pict/Std/Prim.px.o
+lib/pict/Std/Queue.px
+lib/pict/Std/Queue.px.o
+lib/pict/Std/Random.px
+lib/pict/Std/Random.px.o
+lib/pict/Std/Ref.px
+lib/pict/Std/Ref.px.o
+lib/pict/Std/Stream.px
+lib/pict/Std/Stream.px.o
+lib/pict/Std/String.px
+lib/pict/Std/String.px.o
+lib/pict/Std/Tags.px
+lib/pict/Std/Tags.px.o
+lib/pict/X11/Xlib.px
+lib/pict/X11/Xlib.px.o
+lib/pict/X11/Xrm.px
+lib/pict/X11/Xrm.px.o
+lib/pict/lib.px
+lib/pict/lib.px.o
+lib/pict/pict
+lib/pict/pict.h
+lib/pict/pictLib.a
+lib/pict/pictLibG.a
+lib/pict/pictLibP.a
+lib/pict/src2pi
+lib/pict/src2tex
+share/doc/pict/defn.ps
+share/doc/pict/design.ps
+share/doc/pict/library.ps
+share/doc/pict/tutorial.ps
diff --git a/lang/pict/distinfo b/lang/pict/distinfo
new file mode 100644
index 00000000000..c05d3b5ff59
--- /dev/null
+++ b/lang/pict/distinfo
@@ -0,0 +1,24 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+SHA1 (pict-4.1.tar.gz) = e3d3341d4dc54ed015b0d89eab6760ee7f14c5cd
+RMD160 (pict-4.1.tar.gz) = aea1df3530387c592a1c5eb9e8f464e242109f86
+Size (pict-4.1.tar.gz) = 1062078 bytes
+SHA1 (patch-aa) = 3b7a643d157414683018448a20d9dea8b22ec8f8
+SHA1 (patch-ab) = 95faebd4a9f85d308844f16f0e589a827e8a0fae
+SHA1 (patch-ac) = e6e93f42efc49d6d3a37335b4a40ec5694b2e0d4
+SHA1 (patch-ad) = 5867631186c5973b76d81704306fb142e479b72d
+SHA1 (patch-ae) = 5eaf7be65894e22a7200e8075dfb988722220765
+SHA1 (patch-af) = 38a20d8bf945b3a3662d4c4ebc0d7158eac607ec
+SHA1 (patch-ya) = d7513a4431ede203217bb39feb42b62c2f9784b0
+SHA1 (patch-yb) = 19c3a5d892f253a450f10ce468b8238653543ee5
+SHA1 (patch-yc) = abc0298eedeb0d459ce067567f96c759df025eb1
+SHA1 (patch-yd) = 4fac383dc8c8fd862f9f3a3ee49585cf51ce87d5
+SHA1 (patch-ye) = e247389fcf286b7121b20f51a4e5d75c3ab7cd47
+SHA1 (patch-yf) = 46c5e4471e647dfa980b6ae11d92f4a6ae7cb163
+SHA1 (patch-yg) = 9874fcadf01644e18667ef048d7045d9b5be9c59
+SHA1 (patch-yh) = dbf12f2a43d740e8f429065bb098654be992c4cc
+SHA1 (patch-yi) = 4cb6d8232c2b9d33478bf4a26bc3b8a705fb15ce
+SHA1 (patch-yj) = ebc56cc20e194238ee18c7b7f35957214d4b7282
+SHA1 (patch-yk) = fd95429fc9670913adce03d23c39a043c40fad3c
+SHA1 (patch-yl) = 65e69f2e8c0e10ab7618532dec14248cb45f85b5
+SHA1 (patch-ym) = f43515051bf75358006e64022b51e7b3eb146ab2
diff --git a/lang/pict/patches/patch-aa b/lang/pict/patches/patch-aa
new file mode 100644
index 00000000000..fe3bdba5da8
--- /dev/null
+++ b/lang/pict/patches/patch-aa
@@ -0,0 +1,32 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Configure installation dirs for pkgsrc.
+
+--- SiteSpecific.orig 2009-10-23 23:11:58.000000000 -0400
++++ SiteSpecific 2009-10-23 23:28:27.000000000 -0400
+@@ -13,12 +13,12 @@
+ # values for *both* INSTALLDIR and INSTALLLIB.
+ #
+ # Use these settings to install Pict in your own home directory
+-INSTALLDIR = $(HOME)/bin
+-INSTALLLIB = $(HOME)/lib/pict
++#INSTALLDIR = $(HOME)/bin
++#INSTALLLIB = $(HOME)/lib/pict
+ #
+ # Use these settings (as root) to install Pict for system-wide use
+-# INSTALLDIR = /usr/local/bin
+-# INSTALLLIB = /usr/local/lib/pict
++INSTALLDIR = $(PREFIX)/bin
++INSTALLLIB = $(PREFIX)/lib/pict
+
+ # The name of the Gnu C compiler.
+ GCC = gcc
+@@ -84,7 +84,7 @@ safelib::
+ # Default values
+
+ # Miscellaneous settings
+-SHELL = /bin/sh
++SHELL ?= /bin/sh
+ MAKEFLAGS += --no-builtin-rules
+ CWD = $(shell pwd)
+
diff --git a/lang/pict/patches/patch-ab b/lang/pict/patches/patch-ab
new file mode 100644
index 00000000000..2f344ed2348
--- /dev/null
+++ b/lang/pict/patches/patch-ab
@@ -0,0 +1,39 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DESTDIR support.
+
+--- Makefile.orig 2009-10-23 23:31:41.000000000 -0400
++++ Makefile 2009-10-23 23:32:35.000000000 -0400
+@@ -38,7 +38,7 @@ all::
+ @$(MAKE) -C Runtime all
+ @$(MAKE) -C Lib all
+
+-install:: $(INSTALLDIR) $(INSTALLLIB)
++install:: $(DESTDIR)$(INSTALLDIR) $(DESTDIR)$(INSTALLLIB)
+ @$(MAKE) -C Config all
+ @$(MAKE) -C Tools install
+ @$(MAKE) -C Pict install
+@@ -50,6 +50,7 @@ test:: all
+
+ show:
+ @echo "SRCDIR " = $(SRCDIR)
++ @echo "DESTDIR " = $(DESTDIR)
+ @echo "INSTALLDIR " = $(INSTALLDIR)
+ @echo "INSTALLLIB " = $(INSTALLLIB)
+ @echo "GCC " = $(GCC)
+@@ -103,11 +104,11 @@ clean::
+ @$(MAKE) -C Html clean
+ endif
+
+-$(INSTALLDIR):
+- mkdir -p $(INSTALLDIR)
++$(DESTDIR)$(INSTALLDIR):
++ mkdir -p $(DESTDIR)$(INSTALLDIR)
+
+-$(INSTALLLIB):
+- mkdir -p $(INSTALLLIB)
++$(DESTDIR)$(INSTALLLIB):
++ mkdir -p $(DESTDIR)$(INSTALLLIB)
+
+ ifeq ($(PICTDEVEL),yes)
+ all:: ANNOUNCE
diff --git a/lang/pict/patches/patch-ac b/lang/pict/patches/patch-ac
new file mode 100644
index 00000000000..bb5b5c6d330
--- /dev/null
+++ b/lang/pict/patches/patch-ac
@@ -0,0 +1,31 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DESTDIR support.
+
+--- Lib/Makefile~ 1998-03-22 18:27:04.000000000 -0500
++++ Lib/Makefile 2009-10-23 23:35:22.000000000 -0400
+@@ -9,15 +9,15 @@ include $(SRCDIR)/PiRules
+ PIFLAGS += -reset lib
+
+ install:: $(TARGETS)
+- mkdir -p $(INSTALLLIB)/Contrib $(INSTALLLIB)/Posix
+- mkdir -p $(INSTALLLIB)/Picture $(INSTALLLIB)/Std
+- mkdir -p $(INSTALLLIB)/X11
+- cp *.px *.px.o $(INSTALLLIB)
+- cp Contrib/*.px Contrib/*.px.o $(INSTALLLIB)/Contrib
+- cp Posix/*.px Posix/*.px.o $(INSTALLLIB)/Posix
+- cp Picture/*.px Picture/*.px.o $(INSTALLLIB)/Picture
+- cp Std/*.px Std/*.px.o $(INSTALLLIB)/Std
+- cp X11/*.px X11/*.px.o $(INSTALLLIB)/X11
++ mkdir -p $(DESTDIR)$(INSTALLLIB)/Contrib $(DESTDIR)$(INSTALLLIB)/Posix
++ mkdir -p $(DESTDIR)$(INSTALLLIB)/Picture $(DESTDIR)$(INSTALLLIB)/Std
++ mkdir -p $(DESTDIR)$(INSTALLLIB)/X11
++ cp *.px *.px.o $(DESTDIR)$(INSTALLLIB)
++ cp Contrib/*.px Contrib/*.px.o $(DESTDIR)$(INSTALLLIB)/Contrib
++ cp Posix/*.px Posix/*.px.o $(DESTDIR)$(INSTALLLIB)/Posix
++ cp Picture/*.px Picture/*.px.o $(DESTDIR)$(INSTALLLIB)/Picture
++ cp Std/*.px Std/*.px.o $(DESTDIR)$(INSTALLLIB)/Std
++ cp X11/*.px X11/*.px.o $(DESTDIR)$(INSTALLLIB)/X11
+
+ ifneq ($(wildcard *.src),)
+
diff --git a/lang/pict/patches/patch-ad b/lang/pict/patches/patch-ad
new file mode 100644
index 00000000000..ab7dd14ae39
--- /dev/null
+++ b/lang/pict/patches/patch-ad
@@ -0,0 +1,28 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DESTDIR support.
+
+--- Pict/Makefile~ 1998-03-22 18:27:14.000000000 -0500
++++ Pict/Makefile 2009-10-23 23:36:18.000000000 -0400
+@@ -6,7 +6,7 @@ PIFLAGS += -reset lib
+
+ all:: pict
+
+-$(INSTALLDIR)/% : % Makefile ../SiteSpecific
++$(DESTDIR)$(INSTALLDIR)/% : % Makefile ../SiteSpecific
+ @echo Generating $@
+ @rm -f $@
+ @echo '#!/bin/sh' >$@
+@@ -27,9 +27,9 @@ $(INSTALLDIR)/% : % Makefile ../SiteSpec
+ @echo exec $(INSTALLLIB)/$< $$'*' >>$@
+ @chmod 755 $@
+
+-install:: all $(INSTALLDIR)/pict
+- cp -f pict $(INSTALLLIB)
+- chmod 755 $(INSTALLLIB)/pict
++install:: all $(DESTDIR)$(INSTALLDIR)/pict
++ cp -f pict $(DESTDIR)$(INSTALLLIB)
++ chmod 755 $(DESTDIR)$(INSTALLLIB)/pict
+
+ ifneq ($(wildcard *.ml),)
+
diff --git a/lang/pict/patches/patch-ae b/lang/pict/patches/patch-ae
new file mode 100644
index 00000000000..72e489898a0
--- /dev/null
+++ b/lang/pict/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DESTDIR support.
+
+--- Runtime/Makefile~ 1998-03-22 18:27:18.000000000 -0500
++++ Runtime/Makefile 2009-10-23 23:36:37.000000000 -0400
+@@ -4,7 +4,7 @@ include ../SiteSpecific
+ all:: pictLib.a pictLibG.a pictLibP.a pict.h
+
+ install: all
+- cp -f *.a pict.h $(INSTALLLIB)
++ cp -f *.a pict.h $(DESTDIR)$(INSTALLLIB)
+
+ ifneq ($(wildcard *.c),)
+
diff --git a/lang/pict/patches/patch-af b/lang/pict/patches/patch-af
new file mode 100644
index 00000000000..28898274aef
--- /dev/null
+++ b/lang/pict/patches/patch-af
@@ -0,0 +1,17 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+DESTDIR support.
+
+--- Tools/Makefile~ 1998-03-22 18:27:46.000000000 -0500
++++ Tools/Makefile 2009-10-23 23:36:58.000000000 -0400
+@@ -3,8 +3,8 @@ TARGETS = src2tex src2pi
+ include ../SiteSpecific
+
+ install:: all
+- cp -f src2tex src2pi $(INSTALLLIB)
+- chmod 755 $(INSTALLLIB)/src2tex $(INSTALLLIB)/src2pi
++ cp -f src2tex src2pi $(DESTDIR)$(INSTALLLIB)
++ chmod 755 $(DESTDIR)$(INSTALLLIB)/src2tex $(DESTDIR)$(INSTALLLIB)/src2pi
+ tags::
+ etags *.mll
+
diff --git a/lang/pict/patches/patch-ya b/lang/pict/patches/patch-ya
new file mode 100644
index 00000000000..366bf0cf07f
--- /dev/null
+++ b/lang/pict/patches/patch-ya
@@ -0,0 +1,109 @@
+$NetBSD: patch-ya,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/ccode.ml.orig 2009-10-27 20:32:42.000000000 -0400
++++ Pict/ccode.ml 2009-10-27 21:16:27.000000000 -0400
+@@ -12,7 +12,7 @@ type var =
+ type kind = EXP | STATEMENT
+
+ type info = {
+- alloc: int; (* Number of words allocated by the C code *)
++ alloc: int32; (* Number of words allocated by the C code *)
+ const: bool; (* True if the C code is a constant *)
+ reader: bool; (* True if the C code reads from updatable storage *)
+ writer: bool; (* True if the C code writes to updatable storage *)
+@@ -26,7 +26,7 @@ type ty =
+ | POINTER
+
+ type decl =
+- BLOCK of var * (var * ty) list * var * var * int * code
++ BLOCK of var * (var * ty) list * var * var * int32 * code
+ | CONST of var * exp list
+ | BYTES of var * string
+ | TOPLEVEL of string
+@@ -43,7 +43,7 @@ and code =
+ | NULL
+
+ and exp =
+- INT of int
++ INT of int32
+ | VAR of var
+ | ADDR of var
+ | OFFSET of bool * exp * int
+@@ -79,6 +79,14 @@ let printDecls os l =
+ | i -> output_string os (string_of_int i)
+ in
+
++ let printInt32 i =
++ if ((Int32.compare i (Int32.of_int (-2))) >= 0) &&
++ ((Int32.compare i (Int32.of_int 9)) <= 0) then
++ printInt (Int32.to_int i)
++ else
++ output_string os (Int32.to_string i)
++ in
++
+ let rec printString os s x =
+ if x = String.length s then output_string os "\\000" else
+ let c = String.get s x in
+@@ -125,16 +133,16 @@ let printDecls os l =
+
+ and printExp os = function
+ INT(i) ->
+- printInt i
++ printInt32 i
+ | VAR(var) ->
+ Var.print os var
+ | ADDR(v) ->
+ output_string os "(Val)&"; Var.print os v
+ | INDEX(v,INT i) ->
+- if i > 0 then
+- (Var.print os v; output_char os '+'; printInt i)
+- else if i < 0 then
+- (Var.print os v; output_char os '-'; printInt (-i))
++ if (Int32.compare i Int32.zero) > 0 then
++ (Var.print os v; output_char os '+'; printInt32 i)
++ else if (Int32.compare i Int32.zero) < 0 then
++ (Var.print os v; output_char os '-'; printInt32 (Int32.neg i))
+ else
+ Var.print os v
+ | INDEX(v,e) ->
+@@ -173,13 +181,13 @@ let printDecls os l =
+ output_string os "void "; Var.print os var;
+ (match l with [] -> output_string os "(void){\n" | _ ->
+ Misc.printList "(void){\nVal " ";\n" "," printLocals os l);
+- if i > 0 then
++ if (Int32.compare i Int32.zero) > 0 then
+ (Var.print os free; output_string os "=Free;";
+ Var.print os endq; output_string os "=EndQ;\n";
+ output_string os "if("; Var.print os free;
+- output_string os "+"; printInt i;
++ output_string os "+"; printInt32 i;
+ output_string os ">"; Var.print os endq;
+- output_string os "){Gc("; printInt i;
++ output_string os "){Gc("; printInt32 i;
+ output_string os ");";
+ Var.print os free; output_string os "=Free;";
+ Var.print os endq; output_string os "=EndQ;}\n");
+@@ -208,18 +216,18 @@ let formatDecls l = Format.print_flush()
+
+ let complexOutput ch v =
+ CODE(
+- {alloc=9; const=false; reader=false; writer=true; kind=STATEMENT},
++ {alloc=Int32.of_int(9); const=false; reader=false; writer=true; kind=STATEMENT},
+ ["ComplexOutput("; ","; ");"], [ch; v]
+ )
+
+ let complexInput ch v =
+ CODE(
+- {alloc=9; const=false; reader=false; writer=true; kind=STATEMENT},
++ {alloc=Int32.of_int(9); const=false; reader=false; writer=true; kind=STATEMENT},
+ ["ComplexInput("; ","; ");"], [ch; v]
+ )
+
+ let pureExp sl l =
+- CCODE({alloc=0; const=false; reader=false; writer=false; kind=EXP},sl,l)
++ CCODE({alloc=Int32.zero; const=false; reader=false; writer=false; kind=EXP},sl,l)
+
+ let sizeOf v = pureExp ["SIZE("; ")"] [v]
+
diff --git a/lang/pict/patches/patch-yb b/lang/pict/patches/patch-yb
new file mode 100644
index 00000000000..3a7c43e7bee
--- /dev/null
+++ b/lang/pict/patches/patch-yb
@@ -0,0 +1,33 @@
+$NetBSD: patch-yb,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/ccode.mli.orig 2009-10-27 20:32:28.000000000 -0400
++++ Pict/ccode.mli 2009-10-27 21:15:44.000000000 -0400
+@@ -8,7 +8,7 @@ type var =
+ type kind = EXP | STATEMENT
+
+ type info = {
+- alloc: int; (* Number of words allocated by the C code *)
++ alloc: int32; (* Number of words allocated by the C code *)
+ const: bool; (* True if the C code is a constant *)
+ reader: bool; (* True if the C code reads from updatable storage *)
+ writer: bool; (* True if the C code writes to updatable storage *)
+@@ -26,7 +26,7 @@ type ty =
+ | POINTER
+
+ type decl =
+- BLOCK of var * (var * ty) list * var * var * int * code
++ BLOCK of var * (var * ty) list * var * var * int32 * code
+ | CONST of var * exp list
+ | BYTES of var * string
+ | TOPLEVEL of string
+@@ -43,7 +43,7 @@ and code =
+ | NULL
+
+ and exp =
+- INT of int
++ INT of int32
+ | VAR of var
+ | ADDR of var
+ | OFFSET of bool * exp * int
diff --git a/lang/pict/patches/patch-yc b/lang/pict/patches/patch-yc
new file mode 100644
index 00000000000..a68ef9027d5
--- /dev/null
+++ b/lang/pict/patches/patch-yc
@@ -0,0 +1,152 @@
+$NetBSD: patch-yc,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/codegen.ml.orig 2009-10-27 20:47:23.000000000 -0400
++++ Pict/codegen.ml 2009-10-27 21:14:34.000000000 -0400
+@@ -49,29 +49,29 @@ let storeDecl d = decls := d :: !decls
+ let rec heapProc accum = function
+ Inter.PRL(p,q) -> heapProc (heapProc accum p) q
+ | Inter.VAL(l,p) -> heapProc (List.fold_left heapVal accum l) p
+-| Inter.CCODE(_,ci,_,_,p) -> heapProc (accum + ci.alloc) p
+-| Inter.CCALL(_,ci,_,_,p) -> heapProc (accum + ci.alloc) p
++| Inter.CCODE(_,ci,_,_,p) -> heapProc (Int32.add accum ci.alloc) p
++| Inter.CCALL(_,ci,_,_,p) -> heapProc (Int32.add accum ci.alloc) p
+ | Inter.ATOM(_,_,p) -> heapProc accum p
+ | Inter.IF(_,p,q) -> max (heapProc accum p) (heapProc accum q)
+-| Inter.NEW(_,_,p) -> heapProc (accum + 2) p
+-| Inter.INPUT(_,_,_) -> accum + 9
+-| Inter.OUTPUT(_,_,_) -> accum + 9
+-| Inter.SEND(_,l) -> accum + 1 + List.length l
++| Inter.NEW(_,_,p) -> heapProc (Int32.add accum (Int32.of_int 2)) p
++| Inter.INPUT(_,_,_) -> Int32.add accum (Int32.of_int 9)
++| Inter.OUTPUT(_,_,_) -> Int32.add accum (Int32.of_int 9)
++| Inter.SEND(_,l) -> Int32.add accum (Int32.of_int (1 + List.length l))
+ | Inter.STRUCT(_) -> Error.bug "Codegen.heapProc"
+ | Inter.SKIP -> accum
+
+ and heapVal accum = function
+- Inter.TUPLE(_,l) -> accum + 1 + List.length l
++ Inter.TUPLE(_,l) -> Int32.add accum (Int32.of_int (1 + List.length l))
+ | Inter.DEF(_) | Inter.STRING(_) -> Error.bug "Codegen.heapDef"
+
+ (*
+ * These tag values MUST agree with those in Runtime/pict.tmpl!!
+ *)
+
+-let emptyTag = INT 0
+-let oneReaderTag = INT 1
+-let oneWriterTag = INT 2
+-let tupleTag x = INT(x*8+7)
++let emptyTag = INT Int32.zero
++let oneReaderTag = INT Int32.one
++let oneWriterTag = INT (Int32.of_int 2)
++let tupleTag x = INT(Int32.of_int (x*8+7))
+ let status x = OFFSET(true,x,0)
+ let sizeOf x = Ccode.sizeOf (OFFSET(false,x,0))
+ let value x = OFFSET(true,x,1)
+@@ -113,13 +113,13 @@ let flushFp env =
+ match env.free with
+ UNKNOWN -> NULL
+ | CLEAN _ -> env.free <- UNKNOWN; NULL
+- | DIRTY(fp,i) -> env.free <- UNKNOWN; ASSIGN(Ccode.free,INDEX(fp,INT i))
++ | DIRTY(fp,i) -> env.free <- UNKNOWN; ASSIGN(Ccode.free,INDEX(fp,INT (Int32.of_int i)))
+
+ let flushEndq env =
+ match env.endq with
+ UNKNOWN -> NULL
+ | CLEAN _ -> env.endq <- UNKNOWN; NULL
+- | DIRTY(endq,i) -> env.endq <- UNKNOWN; ASSIGN(Ccode.endq,INDEX(endq,INT i))
++ | DIRTY(endq,i) -> env.endq <- UNKNOWN; ASSIGN(Ccode.endq,INDEX(endq,INT (Int32.of_int i)))
+
+ let flushIfLast env =
+ if env.last then (flushFp env %% flushEndq env) else NULL
+@@ -135,7 +135,7 @@ let subEnv env =
+ let initDef env fp (i,c) = function
+ Inter.TUPLE(x,[]) ->
+ env.locals := (x,INTEGER) :: !(env.locals);
+- (i,ASSIGN(VAR x,INT 0) %% c)
++ (i,ASSIGN(VAR x,INT Int32.zero) %% c)
+ | Inter.TUPLE(x,l) ->
+ env.locals := (x,INTEGER) :: !(env.locals);
+ (i + List.length l + 1,ASSIGN(VAR x,TAG(fp,i)) %% c)
+@@ -152,34 +152,34 @@ let rec transProc env = function
+ let code = List.fold_left (transDef env) NULL l in
+ load %% c %% code %% transProc env p
+ | Inter.CCODE(None,ci,sl,l,p) ->
+- if ci.alloc > 0 then
++ if (Int32.to_int ci.alloc) > 0 then
+ let store = flushFp env in
+- profx "cc.ccode++; cc.ccodeAlloc += %d;\n" ci.alloc %%
++ profx "cc.ccode++; cc.ccodeAlloc += %d;\n" (Int32.to_int ci.alloc) %%
+ store %% CODE(ci,sl,List.map transAtom l) %% transProc env p
+ else
+ (CODE(ci,sl,List.map transAtom l) %% transProc env p)
+ | Inter.CCODE(Some x,ci,sl,l,p) ->
+- if ci.alloc > 0 then
++ if (Int32.to_int ci.alloc) > 0 then
+ let store = flushFp env in
+ env.locals := (x,INTEGER) :: !(env.locals);
+- profx "cc.ccode++; cc.ccodeAlloc += %d;\n" ci.alloc %%
++ profx "cc.ccode++; cc.ccodeAlloc += %d;\n" (Int32.to_int ci.alloc) %%
+ store %% ASSIGN(VAR x,CCODE(ci,sl,List.map transAtom l)) %%
+ transProc env p
+ else
+ (env.locals := (x,INTEGER) :: !(env.locals);
+ ASSIGN(VAR x,CCODE(ci,sl,List.map transAtom l)) %% transProc env p)
+ | Inter.CCALL(None,ci,s,l,p) ->
+- if ci.alloc > 0 then
++ if (Int32.to_int ci.alloc) > 0 then
+ let store = flushFp env in
+- profx "cc.ccode++; cc.ccodeAlloc += %d;\n" ci.alloc %%
++ profx "cc.ccode++; cc.ccodeAlloc += %d;\n" (Int32.to_int ci.alloc) %%
+ store %% CALL(ci,s,List.map transAtom l) %% transProc env p
+ else
+ (CALL(ci,s,List.map transAtom l) %% transProc env p)
+ | Inter.CCALL(Some x,ci,s,l,p) ->
+- if ci.alloc > 0 then
++ if (Int32.to_int ci.alloc) > 0 then
+ let store = flushFp env in
+ env.locals := (x,INTEGER) :: !(env.locals);
+- profx "cc.ccode++; cc.ccodeAlloc += %d;\n" ci.alloc %%
++ profx "cc.ccode++; cc.ccodeAlloc += %d;\n" (Int32.to_int ci.alloc) %%
+ store %% ASSIGN(VAR x,CCALL(ci,s,List.map transAtom l)) %%
+ transProc env p
+ else
+@@ -242,14 +242,14 @@ let rec transProc env = function
+ Error.bug "Codegen.transProc"
+
+ and transAtom = function
+- Inter.CHAR(c) -> let i = Char.code c in INT(i+i)
++ Inter.CHAR(c) -> let i = Char.code c in INT(Int32.of_int (i+i))
+ | Inter.PROJECT(a,i) -> OFFSET(false,transAtom a,1+i)
+ | Inter.ADDR(x) -> ADDR x
+ | Inter.STATIC(x) -> TAGS x
+ | Inter.DYNAMIC(x) -> VAR x
+-| Inter.BOOL(true) -> INT 1
+-| Inter.BOOL(false) -> INT 0
+-| Inter.INT(i) -> INT(i+i)
++| Inter.BOOL(true) -> INT Int32.one
++| Inter.BOOL(false) -> INT Int32.zero
++| Inter.INT(i) -> INT(Int32.add i i)
+ | Inter.COERCION(c,a) -> COERCION(c,transAtom a)
+ | Inter.CCONST(ci,s) -> CCODE(ci,[s],[])
+
+@@ -270,7 +270,7 @@ let transConst = function
+ (*
+ * Work out the maximum amount of space required by the process.
+ *)
+- let words = heapProc 0 p in
++ let words = heapProc Int32.zero p in
+ (*
+ * Initial environment.
+ *)
+@@ -294,7 +294,7 @@ let transConst = function
+ env.locals := (s,POINTER) :: !(env.locals);
+ ASSIGN(VAR s,Ccode.startq) %%
+ Misc.itFold loadArg NULL args %%
+- ASSIGN(Ccode.startq,INDEX(s,INT(-l))) %%
++ ASSIGN(Ccode.startq,INDEX(s,INT(Int32.of_int(-l)))) %%
+ transProc env p
+ end
+ else
diff --git a/lang/pict/patches/patch-yd b/lang/pict/patches/patch-yd
new file mode 100644
index 00000000000..c5edb3e088f
--- /dev/null
+++ b/lang/pict/patches/patch-yd
@@ -0,0 +1,49 @@
+$NetBSD: patch-yd,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/copt.ml.orig 2009-10-27 20:46:49.000000000 -0400
++++ Pict/copt.ml 2009-10-27 21:17:12.000000000 -0400
+@@ -23,10 +23,10 @@ let rec impureExp = function
+ OFFSET(m,e,_) -> m or impureExp e
+ | DEREF(_,_) -> true
+ | CCODE(ci,_,l) ->
+- ci.Ccode.reader || ci.Ccode.writer || ci.Ccode.alloc > 0 ||
++ ci.Ccode.reader || ci.Ccode.writer || Int32.to_int(ci.Ccode.alloc) > 0 ||
+ List.exists impureExp l
+ | CCALL(ci,_,l) ->
+- ci.Ccode.reader || ci.Ccode.writer || ci.Ccode.alloc > 0 ||
++ ci.Ccode.reader || ci.Ccode.writer || Int32.to_int(ci.Ccode.alloc) > 0 ||
+ List.exists impureExp l
+ | _ -> false
+
+@@ -99,17 +99,17 @@ and inlineExp = function
+ | TAG(x,i) as e ->
+ (match lookupInfo x with
+ VAR v -> TAG(v,i)
+- | INDEX(v,INT j) -> TAG(v,i+j)
++ | INDEX(v,INT j) -> TAG(v,i+(Int32.to_int j)) (* ? *)
+ | _ -> e)
+ | INDEX(x,INT i) as e ->
+ (match lookupInfo x with
+ VAR v -> INDEX(v,INT i)
+- | INDEX(v,INT j) -> INDEX(v,INT(i+j))
++ | INDEX(v,INT j) -> INDEX(v,INT(Int32.add i j))
+ | _ -> e)
+ | DEREF(x,i) as e ->
+ (match lookupInfo x with
+ VAR v -> DEREF(v,i)
+- | INDEX(v,INT j) -> DEREF(v,i+j)
++ | INDEX(v,INT j) -> DEREF(v,i+(Int32.to_int j)) (* ? *)
+ | _ -> e)
+ | OFFSET(m,e,i) ->
+ (match inlineExp e with
+@@ -144,7 +144,7 @@ let optimiseDecl d l = match d with
+ | EXTERN(x) -> if !(Hashtbl.find externUses x) > 0 then d :: l else l
+ | BLOCK(x,v,free,endq,i,c) ->
+ Hashtbl.clear uses; scan c;
+- if i > 0 then (addUsage free; addUsage endq);
++ if (Int32.compare i Int32.zero) > 0 then (addUsage free; addUsage endq);
+ BLOCK(x,List.fold_left optimiseVar [] v,free,endq,i,optimise c) :: l
+
+ let next = ref 0
diff --git a/lang/pict/patches/patch-ye b/lang/pict/patches/patch-ye
new file mode 100644
index 00000000000..86e7a5ec234
--- /dev/null
+++ b/lang/pict/patches/patch-ye
@@ -0,0 +1,42 @@
+$NetBSD: patch-ye,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/inter.ml.orig 2009-10-27 20:34:18.000000000 -0400
++++ Pict/inter.ml 2009-10-27 20:42:04.000000000 -0400
+@@ -65,7 +65,7 @@ type proc =
+ | SKIP
+
+ and atom =
+- INT of int
++ INT of int32
+ | CHAR of char
+ | BOOL of bool
+ | ADDR of Var.var
+@@ -170,7 +170,7 @@ and printBoxProc bi p =
+ Format.open_hvbox 0; printProc bi p; Format.close_box()
+
+ and printAtom = function
+- INT(i) -> Format.print_int i
++ INT(i) -> Format.print_string (Int32.to_string i)
+ | CHAR(c) ->
+ Format.print_string "'"; Format.print_char c; Format.print_string "'"
+ | COERCION(co,a) ->
+@@ -217,7 +217,7 @@ and printCCode ci sl l =
+ in
+ Format.open_hbox();
+ Format.print_string "(ccode ";
+- Format.print_int ci.Ccode.alloc; Format.print_string " ";
++ Format.print_int (Int32.to_int ci.Ccode.alloc); Format.print_string " ";
+ printCi ci; print sl l; Format.print_string ")";
+ Format.close_box()
+
+@@ -228,7 +228,7 @@ and printCCall ci s l =
+ in
+ Format.open_hbox();
+ Format.print_string "(ccode ";
+- Format.print_int ci.Ccode.alloc; Format.print_string " ";
++ Format.print_int (Int32.to_int ci.Ccode.alloc); Format.print_string " ";
+ printCi ci; Format.print_string s; Format.print_string " ";
+ print false l; Format.print_string ")";
+ Format.close_box()
diff --git a/lang/pict/patches/patch-yf b/lang/pict/patches/patch-yf
new file mode 100644
index 00000000000..1f5faaa19e1
--- /dev/null
+++ b/lang/pict/patches/patch-yf
@@ -0,0 +1,15 @@
+$NetBSD: patch-yf,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/inter.mli.orig 2009-10-27 20:41:27.000000000 -0400
++++ Pict/inter.mli 2009-10-27 20:41:36.000000000 -0400
+@@ -59,7 +59,7 @@ type proc =
+ | SKIP
+
+ and atom =
+- INT of int
++ INT of int32
+ | CHAR of char
+ | BOOL of bool
+ | ADDR of Var.var
diff --git a/lang/pict/patches/patch-yg b/lang/pict/patches/patch-yg
new file mode 100644
index 00000000000..9bc817146c1
--- /dev/null
+++ b/lang/pict/patches/patch-yg
@@ -0,0 +1,15 @@
+$NetBSD: patch-yg,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/lexer.src.orig 1998-03-22 18:27:14.000000000 -0500
++++ Pict/lexer.src 2009-10-27 21:26:43.000000000 -0400
+@@ -183,7 +183,7 @@ rule main = parse
+ | ['0'-'9']+
+
+ | '-'?['0'-'9']+
+- { Parser.INTV{i=info lexbuf; v=int_of_string (text lexbuf)} }
++ { Parser.INTV{i=info lexbuf; v=Int32.of_string (text lexbuf)} }
+
+ | ['A'-'Z' 'a'-'z' '_']['A'-'Z' 'a'-'z' '_' '0'-'9' '\'']*
+ { createID (info lexbuf) (text lexbuf) }
diff --git a/lang/pict/patches/patch-yh b/lang/pict/patches/patch-yh
new file mode 100644
index 00000000000..2e2d9a0821e
--- /dev/null
+++ b/lang/pict/patches/patch-yh
@@ -0,0 +1,58 @@
+$NetBSD: patch-yh,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/optimise.ml.orig 2009-10-27 20:43:05.000000000 -0400
++++ Pict/optimise.ml 2009-10-27 20:46:37.000000000 -0400
+@@ -166,7 +166,7 @@ let scanConst = function
+
+ let optTuple rest v =
+ match v with
+- TUPLE(x,[]) -> Hashtbl.add atomTable x (INT 0); rest
++ TUPLE(x,[]) -> Hashtbl.add atomTable x (INT Int32.zero); rest
+ | TUPLE(x,l) ->
+ (match (Occur.oper x,Occur.proj x,Occur.arg x) with
+ (0,0,0) -> rest
+@@ -262,30 +262,30 @@ and optProc env = function
+ match List.map optAtom l with
+ [INT x1; INT x2] as l ->
+ (match sl with
+- ["("; " + "; ")"] -> optATOM env x (INT(x1 + x2)) p
+- | ["("; " - "; ")"] -> optATOM env x (INT(x1 - x2)) p
+- | ["("; " * I("; "))"] -> optATOM env x (INT(x1 * x2)) p
+- | ["("; " == "; ")"] -> optATOM env x (BOOL(x1 = x2)) p
+- | ["("; " != "; ")"] -> optATOM env x (BOOL(x1 != x2)) p
+- | ["("; " > "; ")"] -> optATOM env x (BOOL(x1 > x2)) p
+- | ["("; " < "; ")"] -> optATOM env x (BOOL(x1 < x2)) p
+- | ["("; " >= "; ")"] -> optATOM env x (BOOL(x1 >= x2)) p
+- | ["("; " <= "; ")"] -> optATOM env x (BOOL(x1 <= x2)) p
++ ["("; " + "; ")"] -> optATOM env x (INT(Int32.add x1 x2)) p
++ | ["("; " - "; ")"] -> optATOM env x (INT(Int32.sub x1 x2)) p
++ | ["("; " * I("; "))"] -> optATOM env x (INT(Int32.mul x1 x2)) p
++ | ["("; " == "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) == 0)) p
++ | ["("; " != "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) != 0)) p
++ | ["("; " > "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) > 0)) p
++ | ["("; " < "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) < 0)) p
++ | ["("; " >= "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) >= 0)) p
++ | ["("; " <= "; ")"] -> optATOM env x (BOOL((Int32.compare x1 x2) <= 0)) p
+ | _ -> CCODE(Some x,ci,sl,l,optProc env p))
+ | [INT i; a] as l ->
+ (match sl with
+ ["("; " + "; ")"] ->
+- if i = 0 then optATOM env x a p
++ if i = Int32.zero then optATOM env x a p
+ else CCODE(Some x,ci,sl,l,optProc env p)
+ | ["("; " * I("; ")"] -> CCODE(Some x,ci,sl,[a; INT i],optProc env p)
+ | _ -> CCODE(Some x,ci,sl,l,optProc env p))
+ | [a; INT i] as l ->
+ (match sl with
+ ["("; " + "; ")"] ->
+- if i = 0 then optATOM env x a p
++ if i = Int32.zero then optATOM env x a p
+ else CCODE(Some x,ci,sl,l,optProc env p)
+ | ["("; " - "; ")"] ->
+- if i = 0 then optATOM env x a p
++ if i = Int32.zero then optATOM env x a p
+ else CCODE(Some x,ci,sl,l,optProc env p)
+ | _ -> CCODE(Some x,ci,sl,l,optProc env p))
+ | [BOOL b; a] as l ->
diff --git a/lang/pict/patches/patch-yi b/lang/pict/patches/patch-yi
new file mode 100644
index 00000000000..c1e864c4e1e
--- /dev/null
+++ b/lang/pict/patches/patch-yi
@@ -0,0 +1,24 @@
+$NetBSD: patch-yi,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/parser.src.orig 2009-10-27 20:26:05.000000000 -0400
++++ Pict/parser.src 2009-10-27 20:27:06.000000000 -0400
+@@ -89,7 +89,7 @@ let ccall fi alloc purity code l =
+ %token <Error.info> GT
+ %token <Error.info> HASH
+ %token <Error.info> INT
+-%token <int Error.withinfo> INTV
++%token <int32 Error.withinfo> INTV
+ %token <string Error.withinfo> ID
+ %token <Error.info> IF
+ %token <Error.info> IMPORT
+@@ -211,7 +211,7 @@ DefList :
+ ;
+ StringSeq :
+ ID StringSeq { $1.v :: $2 }
+-| INTV StringSeq { string_of_int $1.v :: $2 }
++| INTV StringSeq { Int32.to_string $1.v :: $2 }
+ | STRINGV StringSeq { $1.v :: $2 }
+ | { [] }
+ ;
diff --git a/lang/pict/patches/patch-yj b/lang/pict/patches/patch-yj
new file mode 100644
index 00000000000..ccbba1f5d16
--- /dev/null
+++ b/lang/pict/patches/patch-yj
@@ -0,0 +1,48 @@
+$NetBSD: patch-yj,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/simplify.ml.orig 2009-10-27 20:36:37.000000000 -0400
++++ Pict/simplify.ml 2009-10-27 20:42:36.000000000 -0400
+@@ -46,7 +46,7 @@ and value =
+ | VARv of Inter.atom
+ | BOOLv of bool
+ | CHARv of char
+-| INTv of int
++| INTv of int32
+ | LETv of dec * value
+ | IFv of value * value * value
+ | ABSv of pat * proc
+@@ -114,7 +114,7 @@ and simplifyVal v cont = match v with
+ Ccode.EXP ->
+ (match sl with
+ [s] when
+- not(ci.Ccode.reader or ci.Ccode.writer or ci.Ccode.alloc > 0)
++ not(ci.Ccode.reader or ci.Ccode.writer or (Int32.compare ci.Ccode.alloc Int32.zero) > 0)
+ ->
+ throw (Inter.CCONST(ci,s)) cont
+ | _ ->
+@@ -122,7 +122,7 @@ and simplifyVal v cont = match v with
+ Inter.CCODE(Some res,ci,sl,List.rev l,
+ throw (Inter.DYNAMIC res) cont))
+ | Ccode.STATEMENT ->
+- Inter.CCODE(None,ci,sl,List.rev l,throw (Inter.INT 0) cont))
++ Inter.CCODE(None,ci,sl,List.rev l,throw (Inter.INT Int32.zero) cont))
+ )
+ | CCALLv(ci,s,l) ->
+ simplifyFieldVal l [] (fun l ->
+@@ -131,12 +131,12 @@ and simplifyVal v cont = match v with
+ let res = Var.fresh() in
+ Inter.CCALL(Some res,ci,s,List.rev l,throw (Inter.DYNAMIC res) cont)
+ | Ccode.STATEMENT ->
+- Inter.CCALL(None,ci,s,List.rev l,throw (Inter.INT 0) cont))
++ Inter.CCALL(None,ci,s,List.rev l,throw (Inter.INT Int32.zero) cont))
+ )
+ | COERCIONv(c,v) ->
+ simplifyVal v (CONT (fun v -> throw (Inter.COERCION(c,v)) cont))
+ | RECORDv([]) ->
+- throw (Inter.INT 0) cont
++ throw (Inter.INT Int32.zero) cont
+ | RECORDv(l) ->
+ simplifyFieldVal l [] (fun l ->
+ let var = Var.fresh() in
diff --git a/lang/pict/patches/patch-yk b/lang/pict/patches/patch-yk
new file mode 100644
index 00000000000..f653ce4a7d4
--- /dev/null
+++ b/lang/pict/patches/patch-yk
@@ -0,0 +1,15 @@
+$NetBSD: patch-yk,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/simplify.mli.orig 2009-10-27 20:40:19.000000000 -0400
++++ Pict/simplify.mli 2009-10-27 20:40:51.000000000 -0400
+@@ -46,7 +46,7 @@ and value =
+ | VARv of Inter.atom
+ | BOOLv of bool
+ | CHARv of char
+-| INTv of int
++| INTv of int32
+ | LETv of dec * value
+ | IFv of value * value * value
+ | ABSv of pat * proc
diff --git a/lang/pict/patches/patch-yl b/lang/pict/patches/patch-yl
new file mode 100644
index 00000000000..5deff36205f
--- /dev/null
+++ b/lang/pict/patches/patch-yl
@@ -0,0 +1,15 @@
+$NetBSD: patch-yl,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/syntax.ml.orig 2009-10-27 20:27:57.000000000 -0400
++++ Pict/syntax.ml 2009-10-27 20:28:16.000000000 -0400
+@@ -74,7 +74,7 @@ and value =
+ | VARv of info * string
+ | BOOLv of info * bool
+ | CHARv of info * char
+-| INTv of info * int
++| INTv of info * int32
+ | LETv of info * dec * value
+ | RECv of info * value * ty option
+ | CONv of info * ty option * value
diff --git a/lang/pict/patches/patch-ym b/lang/pict/patches/patch-ym
new file mode 100644
index 00000000000..26b5eae92c6
--- /dev/null
+++ b/lang/pict/patches/patch-ym
@@ -0,0 +1,15 @@
+$NetBSD: patch-ym,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
+
+Fix integer types for modern ocaml.
+
+--- Pict/syntax.mli.orig 2009-10-27 20:27:39.000000000 -0400
++++ Pict/syntax.mli 2009-10-27 20:27:51.000000000 -0400
+@@ -74,7 +74,7 @@ and value =
+ | VARv of info * string
+ | BOOLv of info * bool
+ | CHARv of info * char
+-| INTv of info * int
++| INTv of info * int32
+ | LETv of info * dec * value
+ | RECv of info * value * ty option
+ | CONv of info * ty option * value