You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jeroen Janssen <je...@darius.demon.nl> on 2000/06/30 12:30:07 UTC

build/6260: Building PHP4 apache module fails with 'dirent' : 'struct' type redefinition

>Number:         6260
>Category:       build
>Synopsis:       Building PHP4 apache module fails with 'dirent' : 'struct' type redefinition
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Jun 30 03:40:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     jeroen@darius.demon.nl
>Release:        apache 1.3.12
>Organization:
apache
>Environment:
Windows 2000, VC++ 6 SP3
>Description:
the php4 apache module build process fails:

-------------------Configuration: php4apache - Win32 Release_TS_inline--------------------
Compiling...
mod_php4.c
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/os.h(111) : warning C4142: benign redefinition of type
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(16) : error C2011: 'dirent' : 'struct' type redefinition
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(31) : error C2371: 'DIR' : redefinition; different basic types
         ..\..\win32/readdir.h(34) : see declaration of 'DIR'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(34) : error C2373: 'opendir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(37) : see declaration of 'opendir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(35) : error C2373: 'readdir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(38) : see declaration of 'readdir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(36) : error C2373: 'closedir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(40) : see declaration of 'closedir'
N:\Compile\php\php4-200006291145\sapi\apache\mod_php4.c(145) : warning C4018: '!=' : signed/unsigned mismatch
php_apache.c
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/os.h(111) : warning C4142: benign redefinition of type
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(16) : error C2011: 'dirent' : 'struct' type redefinition
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(31) : error C2371: 'DIR' : redefinition; different basic types
         ..\..\win32/readdir.h(34) : see declaration of 'DIR'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(34) : error C2373: 'opendir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(37) : see declaration of 'opendir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(35) : error C2373: 'readdir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(38) : see declaration of 'readdir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(36) : error C2373: 'closedir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(40) : see declaration of 'closedir'
sapi_apache.c
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/os.h(111) : warning C4142: benign redefinition of type
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(16) : error C2011: 'dirent' : 'struct' type redefinition
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(31) : error C2371: 'DIR' : redefinition; different basic types
         ..\..\win32/readdir.h(34) : see declaration of 'DIR'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(34) : error C2373: 'opendir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(37) : see declaration of 'opendir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(35) : error C2373: 'readdir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(38) : see declaration of 'readdir'
N:\Compile\apache\apache_1.3.12\src\include\../os/win32/readdir.h(36) : error C2373: 'closedir' : redefinition; different type modifiers
         ..\..\win32/readdir.h(40) : see declaration of 'closedir'
Error executing cl.exe.

php4apache.dll - 15 error(s), 4 warning(s)
>How-To-Repeat:

>Fix:
the readdir.h doesn't contain #ifdef/#define/#endif, this is fixed in the following patch:

diff -u -r p:\apache/src/os/win32/readdir.h d:\apache/src/os/win32/readdir.h
--- p:\apache/src/os/win32/readdir.h	Sun Apr 12 12:02:06 1998
+++ d:\apache/src/os/win32/readdir.h	Thu Jun 08 13:22:04 2000
@@ -1,3 +1,6 @@
+#ifndef _READDIR_H
+#define _READDIR_H
+
 /*
  * Structures and types used to implement opendir/readdir/closedir
  * on Windows 95/NT.
@@ -34,3 +37,4 @@
 API_EXPORT(DIR *) opendir(const char *);
 API_EXPORT(struct dirent *) readdir(DIR *);
 API_EXPORT(int) closedir(DIR *);
+#endif
\ No newline at end of file
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]