Received: (qmail 24693 invoked by uid 2012); 22 Aug 1999 13:39:02 -0000 Message-Id: <19990822133902.24691.qmail@hyperreal.org> Date: 22 Aug 1999 13:39:02 -0000 From: Sergey Verlan Reply-To: sverlan@hotmail.com To: apbugs@hyperreal.org Subject: bad comparison in mod_isapi.c causing problems with GetExtensionVersion() X-Send-Pr-Version: 3.2 >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: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sun Aug 22 06:40:00 PDT 1999 >Last-Modified: Tue Aug 31 08:16:30 PDT 1999 >Originator: sverlan@hotmail.com >Organization: >Release: 1.3.9 >Environment: Binary distribution of Apache 1.3.9 on Windows 98 OSR2 >Description: 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. >How-To-Repeat: 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. >Fix: Below is the diff file for mod_isapi.c: 175c175 < if ((*isapi_version)(pVer) != TRUE) { --- > if (!(*isapi_version)(pVer)) { >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: stoddard State-Changed-When: Tue Aug 31 08:16:30 PDT 1999 State-Changed-Why: I will commit your fix and it will be in the next release. Thanks. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include 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! ]