ID:               34339
 User updated by:  info at ch2o dot info
 Reported By:      info at ch2o dot info
 Status:           Open
 Bug Type:         OCI8 related
 Operating System: HP-UX
 PHP Version:      4.4.0
 New Comment:

with hp-ux cc (have make bad cut and past!):
>cc  -o essai essai.c
cc: "essai.c", line 5: warning 602: Integer constant exceeds its
storage.


Previous Comments:
------------------------------------------------------------------------

[2005-09-02 02:26:28] info at ch2o dot info

i found a way to detect 64Bit on hp-ux is to try to set value larger
than 32bit in int variable...
in 64bit they don't make error...
and on 32bit (cc and gcc) they make error:
evroult:/varsoft/delivery/CEGTOOL/src/php5-STABLE-200508291635
[rootmca]> gcc  +DD32 -o essai essai.c
gcc: +DD32: No such file or directory
essai.c: In function `main':
essai.c:5: warning: integer constant is too large for "long" type
essai.c:5: warning: overflow in implicit constant conversion
essai.c:4: warning: return type of 'main' is not `int'
evroult:/varsoft/delivery/CEGTOOL/src/php5-STABLE-200508291635
[rootmca]> gcc  -o essai essai.c
essai.c: In function `main':
essai.c:5: warning: integer constant is too large for "long" type
essai.c:5: warning: overflow in implicit constant conversion
essai.c:4: warning: return type of 'main' is not `int'

#include <stdio.h>
like that:
void main(void)
{
   int t=0xfffffffff;
#ifdef __LP64__
   printf("64bit detected\n");
#endif
}

------------------------------------------------------------------------

[2005-09-02 02:18:13] info at ch2o dot info

i think that the modification 1.51 (51 branch) of config.m4 of oci8 (in
relation i think with bug #29402) while be ok...
 
but i'm not sure that the PHP_CHECK_64BIT (in acinclude.m4) is ok!
because "int" and "long int" are 4 bytes in 32bit mode...on hp-ux 64bit
(HP-UX 11.11 on PA RISC)...(tested with gcc 32Bit and HP-UX cc in 32bit
and 64Bit!)

the only way i found to detect 64bit on hp-ux is to test macro __LP64__
(on pa risc, beceause on itanium i thnik is differente..)...

------------------------------------------------------------------------

[2005-09-02 01:30:08] info at ch2o dot info

Description:
------------
all oracle 64Bit version are delivered with 32bit and 64bit client...

on hp-ux with Oracle 9i 64Bit, the $ORACLE_HOME/lib have 64bit client
library and $ORACLE_HOME/lib32 the 32Bit version...
(seem to be the same on AIX, and i think is the same probleme on other
64bit plateforme with oracle 64bit)

with Oracle 8i 64bit the $ORACLE_HOME/lin containt 32bit version and
$ORACLE_HOME/lib64 the 64Bit version...

when you whant compile php + oci8 in 32bit with oracle 8i 64bit have no
probleme...
but with 9i they dont work beceause the 32bit client lib are in
$ORACLE_HOME/lib32 not in $ORACLE_HOME/lib...

with the detection schema used in oci8 ext, they cannot compile php +
oci8 in 32bit with oracle 9i 64Bit...

why i whant to compile php in 32Bit with Oracle 64Bit...
on hp-ux there no precompiled version for 64Bit of all opensource
needed for compiling php and all the nessary for use php...

i think the probleme is the same with the 10g...


Reproduce code:
---------------
na

Expected result:
----------------
na

Actual result:
--------------
have modified the config.m4 of the oci8...

have replace $OCI8_DIR/lib with $OCI8_LIBDIR...
and have added at the start of AC_OCI8_VERSION:
OCI8_LIBDIR=$OCI8_DIR/lib

and have added :
  elif test -f $OCI8_DIR/lib32/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
    OCI8_VERSION=9.0
    OCI8_LIBDIR=$OCI8_DIR/lib32
before:
  elif test -f $OCI8_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then

and they worked fine...

but with that, they privilege the 32bit version vs the default version
(the 64bit version with oracle 9i 64Bit)

the seconde posibility is to add --oci8-32bit to force the use of lib32
in place of lib...for use with >=9i 64Bit in 32bit mode...

and --oci8-64bit to force the use of lib64 in place of lib for compile
with Oracle 8i 64bit in 64Bit mode...




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34339&edit=1

Reply via email to