Skip to content

Commit

Permalink
fix DBIh_SET_ERR_CHAR macro in dbivport.h
Browse files Browse the repository at this point in the history
update Makefile.PL for HPUX build... including Silvio Wanka's patch
we need to do another release candidate specifically asking HPUX users to test

git-svn-id: http://svn.perl.org/modules/dbd-oracle/trunk@431 50811bd7-b8ce-0310-adc1-d9db26280581
  • Loading branch information
lbaxter committed Aug 21, 2004
1 parent 566f09b commit 7a4b09c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
45 changes: 34 additions & 11 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,20 @@ elsif ($::opt_l and # use -l to enable this direct-link approach
foreach(@_) { s:\Q$OH/lib/::g }
print "Found direct-link candidates: @_\n";
my $lib = ("@_" =~ m:lib(cl(ie)?ntsh)\.:) ? $1 : "oracle";
$linkwith_msg = "-l$lib.";
my $syslibs = read_sysliblist();
print "Oracle sysliblist: $syslibs\n";
my $libdir = ora_libdir();
$opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
$opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
my @h_dirs = find_headers();
if ($client_version_full =~ /^8.0.6/ && $os eq 'hpux') {
$linkwith_msg = "-lextp -l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
push @h_dirs, 'network/public';
}
else {
$linkwith_msg = "-l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
}
my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
$opts{INC} = "$inc -I$dbi_arch_dir";
}
Expand Down Expand Up @@ -376,7 +383,7 @@ else { # --- trawl the guts of Oracle's make files looking the how it wants to l
$linkwith =~ s/-Y P,/-YP,/g if $Config{gccversion};
$linkwith =~ s:-R /:-R/:g if $os eq 'solaris';

# modifications (mostly) by [email protected]
# modifications (mostly) by Lincoln Baxter
if ( ($os eq 'hpux') && ($osvers > 10) && (
$Config{'cc'} eq 'cc' or $Config{'gccversion'}) )
{
Expand Down Expand Up @@ -412,14 +419,19 @@ else { # --- trawl the guts of Oracle's make files looking the how it wants to l
$linkwith =~ s/$/ -lqsmashr/ if ( $linkwith !~ m/-lqsmshr/ );
}

if ( $osvers >= 11 and
$linkwith =~ m/-lcl\b/ && $linkwith =~ m/-l:libcl.a/
) { # from [email protected]
if ( ($Config{'libswanted'} !~ m/\bcl\b/) or $Config{'libswanted'} !~ m/\bpthread\b/ ) {
print "Warning: Oracle is built with multi-threading libraries\n"
. " You will most likely need to rebuild perl from sources\n"
. " with the following libraries: -lcl -lpthread\n" ;
}

if ( $osvers >= 11 and
$linkwith =~ m/-lcl\b/ && $linkwith =~ m/-l:libcl.a/
) { # from [email protected]
print "Warning: Stripping -lcl from the link flags, because it\n",
" seems to conflict with -l:libcl.a\n" ;
$linkwith =~ s/\s*-lcl\b//g;
}

# Lincoln: Jay Strauss's Oracle 8.1.6 fix... I did this manually
# when I still had 8.1.6 to deal with (its in the README):
#
Expand Down Expand Up @@ -455,10 +467,17 @@ else { # --- trawl the guts of Oracle's make files looking the how it wants to l
$linkwith =~ s/\s*-l:libcl.a\b//g;
}

if (($linkwith !~ m/-lcl/) || ($linkwith !~ m/-lpthread/)) {
print "Warning: Oracle is built with multi-threading libraries\n"
. " You will most likely need to rebuild perl from sources\n"
. " with the following libraries: -lcl -lpthread\n" ;
#lincoln: this is bringing back everything we thought we removed... (like libcl.a)
# I wonder if this should targetted less specifically than only HPUX 11
# For now this should be relatively safe...
if ( $osvers >= 11 and
$linkwith =~ m/(`cat.*sysliblist`)/
) {
print "Warning: Stripping $1 \n",
" from link command, because it contains libraries not \n",
" compiled with +z or +Z (PIC) causing link to fail.\n",
" Furthermore, we should have already grabbed these libraries\n";;
$linkwith =~ s/`cat.*sysliblist`//g;
}

my $ccf = join " ", map { $_ || '' } @Config{qw(ccflags ccldflags cccdlflags)};
Expand Down Expand Up @@ -805,6 +824,7 @@ sub read_sysliblist {
: (-f "$OH/rdbms/lib/sysliblist") ? read_file("$OH/rdbms/lib/sysliblist") : '';
if ($os eq "hpux") {
$syslibs =~ s/-l:lib(\w+).(sl|a)\b/-l$1/g;
$syslibs =~ s/\s*-ldld\b//g;
$linkwith =~ m/-lcl\b/ or
$syslibs =~ s/\s*-lcl\b//g;
}
Expand Down Expand Up @@ -1478,6 +1498,9 @@ ORACLE_HOME = '.$OH.'
$m = "NMEDIT = nmedit\n" . $m .
"\t\$(NMEDIT) -R ./hints/macos_bundle.syms \$(INST_DYNAMIC)\n";
}
elsif ($os eq 'hpux') {
$m =~ s/LD_RUN_PATH=(\S+)\s+(\S+)/$2 +b $1/;
}
return ($m);
}

Expand Down
2 changes: 1 addition & 1 deletion dbivport.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
#define DBIh_SET_ERR_CHAR(h, imp_xxh, err_c, err_i, errstr, state, method) \
sv_setiv(DBIc_ERR(imp_xxh), err_i); \
(state) ? sv_setpv(DBIc_STATE(imp_xxh), state) : SvOK_off(DBIc_STATE(imp_xxh)); \
(state) ? (void)sv_setpv(DBIc_STATE(imp_xxh), state) : (void)SvOK_off(DBIc_STATE(imp_xxh)); \
sv_setpv(DBIc_ERRSTR(imp_xxh), errstr)
#endif

Expand Down

0 comments on commit 7a4b09c

Please sign in to comment.