On Wed, 5 Nov 2003, Randy Kobes wrote:

[ ... ]
> However, when I use this, I get an error from
> xs/APR/APR/APR.xs:
> =========================================================
>       cd "src/modules/perl" && NMAKE -f Makefile.modperl
>
>       cl -c -IC:/MyFiles/MODPER~1.0/src/modules/perl
> -IC:/MyFiles/MODPER~1.0/xs -IC:/Apache2/include
> -IC:\Apache2/include -nologo -Gf -W3 -MD -DNDEBUG -O1
> -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT
> -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
> -DPERL_MSVCRT_READFIX -DMOD_PERL -DMP_COMPAT_1X -MD -DNDEBUG
> -O1 -DVERSION=\"0.01\"  -DXS_VERSION=\"0.01\"
> "-IC:\Perl\lib\CORE"  -DMP_HAVE_APR_LIBS APR.c APR.c
>
> APR.xs(22) : error C2065: 'my_perl' : undeclared identifier
> APR.xs(22) : warning C4047: 'function' : 'struct interpreter
> *' differs in levels of indirection from 'int '
> APR.xs(22) : warning C4024: 'Perl_IStdIO_ptr' : different
> types for formal and actual parameter 1
> APR.xs(22) : warning C4047: 'function' : 'struct interpreter
> *' differs in levels of indirection from 'int '
> APR.xs(22) : warning C4024: 'Perl_IStdIO_ptr' : different
> types for formal and actual parameter 1
>
> ============================================================
> coming from the fprintf(stderr, ...) call.
[ .. ]
Would the following be correct?
====================================================
Index: xs/APR/APR/APR.xs
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/APR.xs,v
retrieving revision 1.7
diff -u -r1.7 APR.xs
--- xs/APR/APR/APR.xs   25 Aug 2003 23:28:24 -0000      1.7
+++ xs/APR/APR/APR.xs   5 Nov 2003 06:15:44 -0000
@@ -15,11 +15,13 @@
 #include "apr_hooks.h"
 static void extra_apr_init(void)
 {
+    dTHX;
     if (apr_hook_global_pool == NULL) {
         apr_pool_t *global_pool;
         apr_status_t rv = apr_pool_create(&global_pool, NULL);
         if (rv != APR_SUCCESS) {
-            fprintf(stderr, "Fatal error: unable to create global pool "
+            PerlIO_printf(PerlIO_stderr(),
+            "Fatal error: unable to create global pool "
                     "for use with by the scoreboard");
         }
         /* XXX: mutex locking? */
================================================================

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to