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-0dff7051ff02master
parent
312cfbddfd
commit
2c9519d038
|
@ -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
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
"strstubs.c.x" Ä strstubs.c
|
||||
|
||||
|
||||
"strstubs.c.o" Ä strstubs.c
|
||||
|
||||
str.cmoÄ str.cmi
|
||||
str.cmxÄ str.cmi
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue