Re: compile question
[email protected] (Dave Viner) Mon, 02 Apr 2001 08:57:15 -0700
| Newsgroups | perl.dbi.oracle-oci |
|---|---|
| Message-ID | <[email protected]> |
1. bash -> sh
totally agree... i don't know why i didn't think of that... ahh the beauty of
open source collaboration!
2. patch error
i always get that wrong... sorry...
3. OCITrans ** -> OCITrans *
this is a bit strange, but the boot script alters the OCI.xs module and
changes any 'foo **' to 'foo * &'. this seems like a good idea, but then my
h2xs.typemap has only OCITrans ** and not OCITrans *. Hence this change... I
didn't change all of them because I want to change as little as possible in the
typemap (being rather new to this xs world). but i can't see why we wouldn't
want all '**' to become '*' since that would guarentee that the OCI.xs and
h2xs.typemap would match.
4. removing [] in OCI.xs
this too was odd... in this statement:
OCISharedLibInit(metaCtx, libCtx, argfmt, argc, argv, envCallback)
void * metaCtx
void * libCtx
ub4 argfmt
sword argc
void * argv[]
OCIEnvCallbackType envCallback
my compiler yelled about the argv[]. I'm still looking into this in the OCI
pdf file from oracle... (what a volume!)... but i made this change to get a
successful compile.
as i said in my original email, i don't know if this is good or not, but it's
the changes that i made in order to compile the OCI.so. It should be noted
that I run a BSD machine so these changes may not be good for all platforms.
dave
Tim Bunce wrote:
>
> On Fri, Mar 30, 2001 at 05:27:00PM -0800, Dave Viner wrote:
> >
> > btw - i'm attaching an initial stab at a patch for bsd. at least it makes it
> > to the compilation of the c files. not wonderous, but something is more than
> > nothing
>
> Indeed, many thanks.
>
> > -#!/bin/bash
> > +#!/bin/ksh
>
> Probably best to make it /bin/sh for greatest portability (unless you
> want to port it to Perl :)
>
> [your patch was reversed, you need to do 'diff -c oldfile newfile', thanks]
>
> > -echo
> > -echo "Editing h2xs.typemap"
> > -## remove the ** and make them *
> > -perl -p -i.bak -w \
> > - -e 's/OCITrans\s+\*\*/OCITrans \*/;' \
> > - h2xs.typemap
>
> Why add that, and just for that type?
>
> > echo "Editing OCI.xs..."
> > @@ -100,7 +86,6 @@
> > -e 's/^sword$/sword_status/;' \
> > -e '$types{do{($a=$1)=~tr/\t //d;$a} }++ if m/^\t(\w+[\s\*]*)\s+[\&\s]*\w+$/;' \
> > -e 'END{ open T,">types.dat" or die $!; print T Dumper(\%types); }' \
> > - -e 's/\[]//; ' \
>
> And that?
>
> But some background info and reasoning would help me know if that's the
> best way to go. Thanks.
>
> Tim.
--
once you're married, you'll understand the importance of fresh produce.
- tony soprano