You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Juergen Heckel <JH...@t-online.de> on 2002/07/07 10:29:42 UTC

[Win32] Apache 2.0.40-dev error compiling latest snapshots (mod_perl)

Hi,
another compiler error (the last one):

since 05.07.2002 compiling mod_perl gives the following errors:

F:/Projects/MSVC/modperl-2.0/xs\APR/Table/APR__Table.h(73) : error
C2037: left of 'a' specifies    undefined struct/union 'apr_table_t'
F:/Projects/MSVC/modperl-2.0/xs\APR/Table/APR__Table.h(73) : error
C2198: 'apr_hash_make' :
   too few actual parameters

After a long search through many files I replaced (because I don't
understand C++) the apache2\include\apr_tables.h with an older version
and now mod_perl compiles without an error.


Juergen

Re: [Win32] Apache 2.0.40-dev error compiling latest snapshots (mod_perl)

Posted by jlwpc1 <jl...@earthlink.net>.
From: "Bill Stoddard"

::  Index: mod_win32.c
::  && (strncmp(elts[i].key, "HTTP_", 5) == 0
::    || strncmp(elts[i].key, "SERVER_", 7) == 0

FYI...

Seen the new safer C strings for Windows
programmers?

<quote>
Strsafe.h: Safer String Handling in C

Keep your C code secure with strsafe.h
functions, a set of safer string handling
functions for the C programming language.

During the Microsoft Windows Security
Push, a group of testers, program managers,
and programmers decided to define and
create a set of safer string handling functions
for the C programming language. The aim was
to provide a set of functions that could be used
by Windows developers and developers
across Microsoft.
</quote>

Strsafe.h: Safer String Handling in C
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsec
ure/html/strsafe.asp

Using the Strsafe.h Functions
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui
/winui/windowsuserinterface/resources/strings/usingstrsafefunctions.as
p

StringCchCatEx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui
/winui/windowsuserinterface/resources/strings/stringreference/stringfu
nctions/stringcchcatex.asp

JLW









RE: [Win32] Apache 2.0.40-dev error compiling latest snapshots (mod_perl)

Posted by Bill Stoddard <bi...@wstoddard.com>.
apr_table_t is now an incomplete type.   Taka a look at this patch and it
should give you an idea how to fix mod_perl.

Bill

stoddard    2002/07/05 19:49:59

  Modified:    modules/arch/win32 mod_win32.c
               modules/experimental mod_mem_cache.c
  Log:
  Fix some Win32 compile breaks caused by Brian Pane's making apr_table_t
  a full incomplete type.

  Revision  Changes    Path
  1.21      +3 -2      httpd-2.0/modules/arch/win32/mod_win32.c

  Index: mod_win32.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_win32.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_win32.c	24 Jun 2002 04:55:24 -0000	1.20
  +++ mod_win32.c	6 Jul 2002 02:49:59 -0000	1.21
  @@ -419,7 +419,8 @@
                                            request_rec *r, apr_pool_t *p,
                                            cgi_exec_info_t *e_info)
   {
  -    const apr_table_entry_t *elts = (apr_table_entry_t
*)r->subprocess_env->a.elts;
  +    const apr_array_header_t *elts_arr =
apr_table_elts(r->subprocess_env);
  +    const apr_table_entry_t *elts = (apr_table_entry_t *) elts_arr->elts;
       const char *ext = NULL;
       const char *interpreter = NULL;
       win32_dir_conf *d;
  @@ -547,7 +548,7 @@
        * (using 0x0080-0x00ff) or is linked as a command or windows
        * application (following the OEM or Ansi code page in effect.)
        */
  -    for (i = 0; i < r->subprocess_env->a.nelts; ++i) {
  +    for (i = 0; i < elts_arr->nelts; ++i) {
           if (win_nt && elts[i].key && *elts[i].key
                   && (strncmp(elts[i].key, "HTTP_", 5) == 0
                    || strncmp(elts[i].key, "SERVER_", 7) == 0



  1.74      +5 -4      httpd-2.0/modules/experimental/mod_mem_cache.c
> Hi,
> another compiler error (the last one):
>
> since 05.07.2002 compiling mod_perl gives the following errors:
>
> F:/Projects/MSVC/modperl-2.0/xs\APR/Table/APR__Table.h(73) : error
> C2037: left of 'a' specifies    undefined struct/union 'apr_table_t'
> F:/Projects/MSVC/modperl-2.0/xs\APR/Table/APR__Table.h(73) : error
> C2198: 'apr_hash_make' :
>    too few actual parameters
>
> After a long search through many files I replaced (because I don't
> understand C++) the apache2\include\apr_tables.h with an older version
> and now mod_perl compiles without an error.
>
>
> Juergen
>