You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2002/10/21 20:53:51 UTC

[PATCH] Get mod_specweb99 to compile against 2.0.43

I noticed that there were some places where u_int32_t is being used instead
of apr_uint32_t. Is it purposefully done OR is it one of those "Oh, the apr
interface changed" stuff ?.

Anyways, I've included a patch that atleast gets the module to compile
against 2.0.43. Pl. let me know if it's okay.

Thanks,
-Madhu

Index: mod_specweb99.h
===================================================================
RCS file:
/home/cvspublic/httpd-test/specweb99/specweb99-2.0/mod_specweb99.h,v
retrieving revision 1.1
diff -u -r1.1 mod_specweb99.h
--- mod_specweb99.h     2 May 2002 20:34:13 -0000       1.1
+++ mod_specweb99.h     21 Oct 2002 18:49:40 -0000
@@ -122,14 +122,14 @@
 /* Structure to hold custom ad data */
 
 struct cadrec {
-    u_int32_t addemographics;
-    u_int32_t age_weightings;
-    u_int32_t gen_weightings;
-    u_int32_t reg_weightings;
-    u_int32_t int1_weightings;
-    u_int32_t int2_weightings;
-    u_int16_t minimum_match_value;
-    u_int32_t expiration_time;
+    apr_uint32_t addemographics;
+    apr_uint32_t age_weightings;
+    apr_uint32_t gen_weightings;
+    apr_uint32_t reg_weightings;
+    apr_uint32_t int1_weightings;
+    apr_uint32_t int2_weightings;
+    apr_uint16_t minimum_match_value;
+    apr_uint32_t expiration_time;
 };
 
 #endif
Index: mod_specweb99.c
===================================================================
RCS file:
/home/cvspublic/httpd-test/specweb99/specweb99-2.0/mod_specweb99.c,v
retrieving revision 1.10
diff -u -r1.10 mod_specweb99.c
--- mod_specweb99.c     18 Oct 2002 21:03:06 -0000      1.10
+++ mod_specweb99.c     21 Oct 2002 18:48:58 -0000
@@ -366,7 +366,7 @@
     if ((_my->up == NULL) || (numrecords > _my->up_count)) {
        /* User personalities are only 32 bits (sad, really) */
        apr_pool_clear(_my->up_pool);
-       _my->up = apr_palloc(_my->up_pool, numrecords * sizeof(u_int32_t));
+       _my->up = apr_palloc(_my->up_pool, numrecords *
sizeof(apr_uint32_t));
        _my->up_count = numrecords;
     }
     /*
@@ -823,7 +823,7 @@
  * customadscan                                                        *
  ***********************************************************************/
 
-static caddr_t customadscan(request_rec *r, char *fname, int16_t adid)
+static caddr_t customadscan(request_rec *r, char *fname, apr_int16_t adid)
 {
     struct apr_finfo_t s;
     apr_status_t rv;
@@ -890,9 +890,9 @@
     char *cookie_out;
     const char *docroot = ap_document_root(r);
     char *filename;
-    int16_t userindex, adindex, expired = 0;
-    u_int32_t userdemographics, combineddemographics;  /* it's a bitmap */
-    u_int16_t ad_weight;
+    apr_int16_t userindex, adindex, expired = 0;
+    apr_uint32_t userdemographics, combineddemographics;       /* it's a
bitmap */
+    apr_uint16_t ad_weight;
 
     /*
      * XXX Again, ap_document_root is deprecated. I should probably find
the
@@ -1006,7 +1006,7 @@
 {
     pid_t pid;
     time_t stamp;
-    u_int32_t recnum;
+    apr_uint32_t recnum;
     char recnumstr[12];                /* ten wide plus return plus \0 */
     apr_size_t l;
     apr_off_t zero = 0;



Re: [PATCH] Get mod_specweb99 to compile against 2.0.43

Posted by gr...@apache.org.
"MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" wrote:
> 
> I noticed that there were some places where u_int32_t is being used instead
> of apr_uint32_t. Is it purposefully done OR is it one of those "Oh, the apr
> interface changed" stuff ?.
> 
> Anyways, I've included a patch that atleast gets the module to compile
> against 2.0.43. Pl. let me know if it's okay.

It works fine on Linux.  Committed, thanks!

Greg

Re: [PATCH] Get mod_specweb99 to compile against 2.0.43

Posted by Sander Temme <sc...@covalent.net>.
> I noticed that there were some places where u_int32_t is being used instead
> of apr_uint32_t. Is it purposefully done OR is it one of those "Oh, the apr
> interface changed" stuff ?.
> 
> Anyways, I've included a patch that atleast gets the module to compile
> against 2.0.43. Pl. let me know if it's okay.

Madhu,

+1 on concept; I'll look at committing it in the near future.

Thanks,

Sander

-- 
Covalent Technologies                             sctemme@covalent.net
Engineering group                                Voice: (415) 856 4214
303 Second Street #375 South                       Fax: (415) 856 4210
San Francisco CA 94107

   PGP Fingerprint: 7A8D B189 E871 80CB 9521  9320 C11E 7B47 964F 31D9

=======================================================
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message
=======================================================