summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>1996-11-02 18:02:27 +0000
committerDamien Doligez <damien.doligez-inria.fr>1996-11-02 18:02:27 +0000
commit2c9519d03888c1d05b7eb01a2d24588643f80822 (patch)
treedbd7b4cda5a8eabd0e433a6c512233c37fc07e3e
parent312cfbddfd988fb1b74299ff90e19b1b6ef30043 (diff)
Portage Mac/MPW
strstubs.c: #include pour Mac et cast unsigned char * -> char * git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1135 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/str/Makefile.Mac51
-rw-r--r--otherlibs/str/Makefile.Mac.depend8
-rw-r--r--otherlibs/str/strstubs.c7
3 files changed, 65 insertions, 1 deletions
diff --git a/otherlibs/str/Makefile.Mac b/otherlibs/str/Makefile.Mac
new file mode 100644
index 000000000..556a795cb
--- /dev/null
+++ b/otherlibs/str/Makefile.Mac
@@ -0,0 +1,51 @@
+# Makefile for the str library
+
+# Compilation options
+C = sc
+COptions = -model far -opt speed -i {REGEXLIB},:::byterun: -w 7
+
+PPCC = mrc
+PPCCOptions = -i {REGEXLIB},:::byterun: -w 7
+
+CAMLC = :::boot:ocamlrun :::boot:ocamlc -I :::stdlib:
+REGEXLIB = :regex-0.12:
+
+COBJS = strstubs.c.o {REGEXLIB}regex.c.o
+PPCCOBJS = strstubs.c.x {REGEXLIB}regex.c.x
+
+all Ä libstr.o libstr.x str.cmi str.cma
+
+libstr.o Ä {COBJS}
+ lib -o libstr.o {COBJS}
+
+libstr.x Ä {PPCCOBJS}
+ ppclink -xm library -o libstr.x {PPCCOBJS}
+
+str.cma Ä str.cmo
+ {CAMLC} -a -o str.cma str.cmo
+
+{REGEXLIB}regex.c.x Ä {REGEXLIB}regex.c.o
+ echo -n
+
+{REGEXLIB}regex.c.o Ä {REGEXLIB}regex.c {REGEXLIB}regex.h
+ directory {REGEXLIB}; domake; directory ::
+
+clean Ä
+ delete -i Å.cm[aio] || set status 0
+
+realclean Ä clean
+ delete -i Å.[ox] || set status 0
+ directory {REGEXLIB}; domake distclean; directory ::
+
+install Ä
+ duplicate -y libstr.o libstr.x str.cma str.cmi "{LIBDIR}"
+
+.cmi Ä .mli
+ {CAMLC} -c {COMPFLAGS} {default}.mli
+
+.cmo Ä .ml
+ {CAMLC} -c {COMPFLAGS} {default}.ml
+
+depend Ä
+ MakeDepend Å.c > Makefile.Mac.depend
+ :::boot:ocamlrun :::tools:ocamldep Å.mli Å.ml >> Makefile.Mac.depend
diff --git a/otherlibs/str/Makefile.Mac.depend b/otherlibs/str/Makefile.Mac.depend
new file mode 100644
index 000000000..1730d60cf
--- /dev/null
+++ b/otherlibs/str/Makefile.Mac.depend
@@ -0,0 +1,8 @@
+
+"strstubs.c.x" Ä strstubs.c
+
+
+"strstubs.c.o" Ä strstubs.c
+
+str.cmoÄ str.cmi
+str.cmxÄ str.cmi
diff --git a/otherlibs/str/strstubs.c b/otherlibs/str/strstubs.c
index 05ece760f..06c552ebe 100644
--- a/otherlibs/str/strstubs.c
+++ b/otherlibs/str/strstubs.c
@@ -1,4 +1,8 @@
+#if !macintosh
#include <sys/types.h>
+#else
+#include <SizeTDef.h>
+#endif
#include <regex.h>
#include <mlvalues.h>
#include <alloc.h>
@@ -54,7 +58,8 @@ value str_compile_regexp(src, fold)
expr->re.fastmap = stat_alloc(256);
expr->re.buffer = NULL;
expr->re.allocated = 0;
- msg = re_compile_pattern(String_val(src), string_length(src), &(expr->re));
+ msg = (char *) re_compile_pattern(String_val(src), string_length(src),
+ &(expr->re));
if (msg != NULL) failwith(msg);
re_compile_fastmap(&(expr->re));
expr->re.regs_allocated = REGS_FIXED;