From 5e9b5aeef5cbb19fcad6ccd0eaf7d5fff2bb88c0 Mon Sep 17 00:00:00 2001 From: rich Date: Sat, 11 Dec 2004 13:38:32 +0000 Subject: [PATCH] Tested perl4caml on Mac OS X. Basically works fine, but had to comment out a few includes and defines at the beginning of the code. --- Makefile | 7 +------ Makefile.config | 12 +++++++++++- perl_c.c | 6 +++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8601df8..9be234b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Interface to Perl from OCaml. # Copyright (C) 2003 Merjis Ltd. -# $Id: Makefile,v 1.26 2004-12-01 12:41:29 rich Exp $ +# $Id: Makefile,v 1.27 2004-12-11 13:38:32 rich Exp $ include Makefile.config @@ -23,11 +23,6 @@ LIBPERL := $(shell perl -MExtUtils::Embed -e ldopts) SED := sed -# XXX Hack required by ocamlopt, and sometimes ocamlc. -# To work out what this should be, try: -# `perl -MExtUtils::Embed -e ldopts' -DYNALOADER_HACK := /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a - OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCINCS) WRAPPERS := \ diff --git a/Makefile.config b/Makefile.config index 180101b..bfb49d6 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,5 +1,5 @@ # perl4caml configuration -*- Makefile -*- -# $Id: Makefile.config,v 1.18 2004-11-25 21:32:28 rich Exp $ +# $Id: Makefile.config,v 1.19 2004-12-11 13:38:32 rich Exp $ # PERLINCDIR # Directory containing the Perl include files, eg. . @@ -28,6 +28,16 @@ OCAMLLIBDIR := $(shell ocamlc -where) EXTRA_CFLAGS := #EXTRA_CFLAGS := -DPERL4CAML_REFCOUNTING_EXPERIMENTAL=1 +#EXTRA_CFLAGS := -I/Users/rich/OCaml/lib/ocaml/std-lib -DPERL4CAML_NO_CRYPT_H \ + -DPERL4CAML_NO_OFF64_T + +# DYNALOADER_HACK +# XXX Hack required by ocamlopt, and sometimes ocamlc. +# To work out what this should be, try: +# `perl -MExtUtils::Embed -e ldopts' + +DYNALOADER_HACK := /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a +#DYNALOADER_HACK := /System/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a # PACKAGE and VERSION diff --git a/perl_c.c b/perl_c.c index 4241534..3dea747 100644 --- a/perl_c.c +++ b/perl_c.c @@ -1,6 +1,6 @@ /* Interface to Perl from OCaml. * Copyright (C) 2003 Merjis Ltd. - * $Id: perl_c.c,v 1.17 2004-11-25 22:16:17 rich Exp $ + * $Id: perl_c.c,v 1.18 2004-12-11 13:38:32 rich Exp $ */ #include @@ -16,14 +16,18 @@ #include #include +#ifndef PERL4CAML_NO_OFF64_T /* XXX This was required to avoid an error on my machine when loading the Perl * headers. Not clear why this is missing. */ #define off64_t __off64_t +#endif +#ifndef PERL4CAML_NO_CRYPT_H /* XXX This is required by Perl >= 5.8.2. */ #define __USE_GNU #include +#endif #include #include -- 1.8.3.1