httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject apreq_xs_tables.h w/o USE_ITHREADS
Date Thu, 05 Aug 2004 18:20:24 GMT
In the latest cvs httpd-apreq-2 on a linux machine w/o
USE_ITHREADS defined, I've run into a couple of problems in
the perl glue, specifically with apreq_xs_tables.h. One
problem, in apreq_xs_table_keys, is that *d is declared
within an #ifdef USE_ITHREADS/#endif block, so should be
moved out.  However, another problem is that both within
APREQ_XS_DEFINE_TABLE_GET() and APREQ_XS_DEFINE_TABLE_DO,
there's a dTHXa() call, which I think should be within
#ifdef USE_ITHREADS/#endif. I'm not sure how to do that
though within the #define: this attempt:
===========================================================
Index: glue/perl/xsbuilder/apreq_xs_tables.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_tables.h,v
retrieving revision 1.33
diff -u -r1.33 apreq_xs_tables.h
--- glue/perl/xsbuilder/apreq_xs_tables.h	4 Aug 2004 19:33:43 -0000	1.33
+++ glue/perl/xsbuilder/apreq_xs_tables.h	5 Aug 2004 17:54:58 -0000
@@ -181,8 +181,8 @@
 static int apreq_xs_table_keys(void *data, const char *key,
                                const char *val)
 {
-#ifdef USE_ITHREADS
     struct apreq_xs_do_arg *d = (struct apreq_xs_do_arg *)data;
+#ifdef USE_ITHREADS
     dTHXa(d->perl);
 #endif

@@ -236,7 +236,9 @@
 {                                                                       \
     struct apreq_xs_do_arg *d = (struct apreq_xs_do_arg *)data;         \
     void *env;                                                          \
+#ifdef USE_ITHREADS                                                     \
     dTHXa(d->perl);                                                     \
+#endif                                                                  \
     dSP;                                                                \
     env = d->env;                                                       \
     if (val) {                                                          \
@@ -403,7 +405,9 @@
     struct apreq_xs_do_arg *d = data;                                   \
     apreq_##type##_t *RETVAL = apreq_value_to_##type(                   \
                                     apreq_strtoval(val));               \
+#ifdef USE_ITHREADS                                                     \
     dTHXa(d->perl);                                                     \
+#endif                                                                  \
     dSP;                                                                \
     SV *sv;                                                             \
     void *env;                                                          \

========================================================================
gives an error that '#' isn't followed by a macro parameter,
occurring at the lines in the patch above where I've
inserted the #ifdef USE_ITHREADS. Is there a way
to use an #ifdef/#endif like this within a #define?

-- 
best regards,
randy

Mime
View raw message