www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Verlan <sver...@hotmail.com>
Subject os-windows/4887: bad comparison in mod_isapi.c causing problems with GetExtensionVersion()
Date Sun, 22 Aug 1999 13:39:02 GMT

>Number:         4887
>Category:       os-windows
>Synopsis:       bad comparison in mod_isapi.c causing problems with GetExtensionVersion()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Aug 22 06:40:00 PDT 1999
>Originator:     sverlan@hotmail.com
>Release:        1.3.9
Binary distribution of Apache 1.3.9 on Windows 98 OSR2
In mod_isapi.c on line 175 there is a bad comparision:
     if ((*isapi_version)(pVer) != TRUE) {
The problem is that in BOOL type any nonzero value must be treated as TRUE.
In Microsoft Visual C the TRUE constant is binded to 1 so you can not use
this comparison. This problem specialy arises when you try to use a ISAPI dll
made by Borland Delphi, where TRUE is binded to -1.
In this case you simply get the following error message:
 No such file or directory: ISAPI GetExtensionVersion() failed:

To solve the problem you must make a comparison with FALSE which is zero 
in all cases or like I've done below.

This question was in PR4333 but there was no answer to it. 
You can take any Borland Delphi (may be Borland C++) ISAPI dll and see it.
Or you can modify the TRUE constant during the compilation of a Microsoft
Visual C ISAPI dll.
Below is the diff file for mod_isapi.c:
<     if ((*isapi_version)(pVer) != TRUE) {
>     if (!(*isapi_version)(pVer)) {
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@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!     ]

View raw message