Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Install Perl module DBD::Oracle on Intel macs.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Install Perl module DBD::Oracle on Intel macs.
Authored by: atverd on Apr 24, '08 02:11:23PM
The patch for _environ problem

--- dbdimp.c.orig	2008-04-03 11:07:56.000000000 -0700
+++ dbdimp.c	2008-04-24 13:57:06.000000000 -0700
@@ -17,6 +17,10 @@
 #include "w32api/winbase.h"
 #endif /* __CYGWIN32__ */
 
+#ifdef __APPLE__
+#include <crt_externs.h>
+#endif
+
 #include "Oracle.h"
 
 #if defined(CAN_USE_PRO_C)
@@ -3793,9 +3797,13 @@
     PerlIO *fp = DBILOGFP;
     int i = 0;
     char *p;
+#ifdef __APPLE__
+    #define environ (*_NSGetEnviron())
+#else
 #ifndef __BORLANDC__
     extern char **environ;
 #endif
+#endif
     PerlIO_printf(fp, "Environment variables:\n");
     do {
 	p = (char*)environ[i++];



[ Reply to This | # ]