Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

[svn:dbd-oracle] r2436 - in dbd-oracle/trunk: . t
Author: timbo
Date: Fri Jan 20 01:53:01 2006
New Revision: 2436

Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/Oracle.pm
dbd-oracle/trunk/Oracle.xs
dbd-oracle/trunk/dbdimp.c
dbd-oracle/trunk/dbdimp.h
dbd-oracle/trunk/t/nchar_test_lib.pl
Log:
Fixed unicode tests for cygwin thanks to Andy Hassall.


Modified: dbd-oracle/trunk/Changes
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Fri Jan 20 01:53:01 2006
@@ -3,6 +3,7 @@
Fixed automatic csform setting for some UTF8 cases and for Oracle 8.0
Fixed truncation error on fetch into UTF8 charset thanks to Honza Pazdziora.
Fixed INTERVAL DAY TO SECOND thanks to Honza Pazdziora.
+  Fixed unicode tests for cygwin thanks to Andy Hassall.
Fixed undef warnings when connecting with undef $user.
Fixed undef warnings from $dbh->get_info(18);
Fixed LOB streaming example thanks to Pablo Zorzoli.

Modified: dbd-oracle/trunk/Oracle.pm
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Fri Jan 20 01:53:01 2006
@@ -25,7 +25,8 @@ my $ORACLE_ENV  = ($^O eq 'VMS') ? 'ORA_
) ],
ora_session_modes => [ qw( ORA_SYSDBA ORA_SYSOPER ) ],
);
-    @EXPORT_OK = qw(ORA_OCI SQLCS_IMPLICIT SQLCS_NCHAR ora_env_var);
+    @EXPORT_OK = qw(ORA_OCI SQLCS_IMPLICIT SQLCS_NCHAR ora_env_var ora_cygw
in_set_env);
+    #unshift @EXPORT_OK,  'ora_cygwin_set_env'
 if $^O eq 'cygwin';
 Exporter::export_ok_
tags(qw(ora_types  ora_session_modes));


my $Revision = substr(q$Revision: 1.103 $, 10);

Modified: dbd-oracle/trunk/Oracle.xs
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Oracle.xs	(original)
+++ dbd-oracle/trunk/Oracle.xs	Fri Jan 20 01:53:01 2006
@@ -56,6 +56,16 @@ ora_env_var(name)
sv_setpv(sv, p);
ST(0) = sv;

+#ifdef __CYGWIN32__
+void
 +ora_cygwin_set_env(
name, value)
+    char * name
+    char * value
+    CODE:
+     ora_cygwin_set_env(n
ame, value);
+
+#endif /* __CYGWIN32__ */
+

INCLUDE: Oracle.xsi


Modified: dbd-oracle/trunk/dbdimp.c
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/dbdimp.c	(original)
+++ dbd-oracle/trunk/dbdimp.c	Fri Jan 20 01:53:01 2006
@@ -12,6 +12,11 @@
#define strcasecmp strcmpi
#endif

+#ifdef __CYGWIN32__
+#include "w32api/windows.h"
+#include "w32api/winbase.h"
+#endif /* __CYGWIN32__ */
+
#include "Oracle.h"

#if  defined(CAN_USE_PRO_
C)
@@ -95,6 +100,34 @@ ora_env_var(char *name, char *buf, unsig
return buf;
}

+#ifdef __CYGWIN32__
+/* Under Cygwin there are issues with setting environment variables
+ * at runtime such that Windows-native libraries loaded by a Cygwin
+ * process can see those changes.
+ *
+ * Cygwin maintains its own cache of environment variables, and also
+ * only writes to the Windows environment using the "_putenv" win32
+ * call. This call writes to a Windows C runtime cache, rather than
+ * the true process environment block.
+ *
+ * In order to change environment variables so that the Oracle client
+ * DLL can see the change, the win32 function  SetEnvironmentVariab
le
+ * must be called. This function gives an interface to that API.
+ *
+ * It is only available when building under Cygwin, and is used by
+ * the testsuite.
+ *
+ * Whilst it could be called by end users, it should be used with
+ * caution, as it bypasses the environment variable conversions that
+ * Cygwin typically performs.
+ */
+void
 +ora_cygwin_set_env(
char *name, char *value)
+{
+     SetEnvironmentVariab
le(name, value);
+}
+#endif /* __CYGWIN32__ */
+
void
dbd_init(dbistate_t *dbistate)
{

Modified: dbd-oracle/trunk/dbdimp.h
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/dbdimp.h	(original)
+++ dbd-oracle/trunk/dbdimp.h	Fri Jan 20 01:53:01 2006
@@ -263,6 +263,9 @@ ub4 ora_parse_uid _((imp_dbh_t *imp_dbh,
char *ora_sql_error _((imp_sth_t *imp_sth, char *msg));
char *ora_env_var(char *name, char *buf, unsigned long size);

+#ifdef __CYGWIN32__
+void  ora_cygwin_set_env(c
har *name, char *value);
+#endif /* __CYGWIN32__ */

sb4 dbd_phs_in _((dvoid *octxp, OCIBind *bindp, ub4 iter, ub4 index,
dvoid **bufpp, ub4 *alenp, ub1 *piecep, dvoid **indpp));

Modified: dbd-oracle/trunk/t/nchar_test_lib.pl
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/t/nchar_test_lib.pl	(original)
+++ dbd-oracle/trunk/t/nchar_test_lib.pl	Fri Jan 20 01:53:01 2006
@@ -420,6 +420,10 @@ sub set_nls_nchar
} else {
undef $ENV{NLS_NCHAR}; # XXX windows? (perhaps $ENV{NLS_NCHAR}=""?
)
}
+    # Special treatment for environment variables under Cygwin -
+    # see comments in dbdimp.c for details.
+     DBD::Oracle::ora_cyg
 win_set_env('NLS_NCH
AR', $ENV& #123;NLS_NCHAR}||'')

+	if $^O eq 'cygwin';
print defined ora_env_var("NLS_NCHAR") ?	# defined?
"set \$ENV& #123;NLS_NCHAR}=$cse
t\n" :
"set \$ENV& #123;NLS_LANG}=undef
\n"		# XXX ?
@@ -436,6 +440,10 @@ sub  set_nls_lang_charset

$ENV{NLS_LANG} = "";	# not the same as set_nls_nchar() above which uses
 undef
print "set \$ENV{NLS_LANG}=''\n" if ( $verbose );
}
+    # Special treatment for environment variables under Cygwin -
+    # see comments in dbdimp.c for details.
+     DBD::Oracle::ora_cyg
 win_set_env('NLS_LAN
G', $ENV{NLS_LANG}||'')
+	if $^O eq 'cygwin';
}

sub byte_string {

Report this thread to moderator Post Follow-up to this message
Old Post
timbo@cvs.perl.org
01-20-06 12:24 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Oracle PERL DBD archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:21 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006