You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@covalent.net> on 1999/02/01 19:43:48 UTC

[PATCH] compiler incompatibility on AIX

The following pointer comparison fails when compiled with native
compiler on AIX 4.3. Is there a good reason not to just back this
down to a simple strcmp() for all platforms? Speed doesn't really
seem to be an issue here.

Is there a compiler option on AIX that I have not yet discovered
that would make this work?


Index: http_core.c
=================================================================
==
RCS file:
/usr/local/covalent/.CVS/apache/apache-1.3/src/main/http_core.c,v
retrieving revision 1.244
diff -c -r1.244 http_core.c
*** http_core.c	1999/01/07 20:46:58	1.244
--- http_core.c	1999/02/01 18:35:23
***************
*** 1142,1148 ****
--- 1142,1152 ----
       * it's been set up so that checking for two pointers to
the same datum
       * is valid here.  And faster.
       */
+ #ifdef AIX
+     if (strcmp(cmd->cmd->name,cmd->end_token)) {
+ #else
      if (cmd->cmd->name != cmd->end_token) {
+ #endif
  	return ap_pstrcat(cmd->pool, "Expected ", cmd->end_token, "
but saw ",
  			  cmd->cmd->name, NULL);
      }


RE: [PATCH] compiler incompatibility on AIX

Posted by Randy Terbush <ra...@covalent.net>.
Thanks Bill... clearly documented. :-)

> -----Original Message-----
> From: new-httpd-owner@apache.org 
> [mailto:new-httpd-owner@apache.org]On
> Behalf Of Bill Stoddard
> Sent: Monday, February 01, 1999 1:10 PM
> To: new-httpd@apache.org
> Subject: Re: [PATCH] compiler incompatibility on AIX
> Importance: High
> 
> 
> Randy Terbush wrote:
> > 
> > The following pointer comparison fails when compiled 
> with native
> > compiler on AIX 4.3. Is there a good reason not to 
> just back this
> > down to a simple strcmp() for all platforms? Speed 
> doesn't really
> > seem to be an issue here.
> > 
> > Is there a compiler option on AIX that I have not 
> yet discovered
> > that would make this work?
> 
> The AIX xlC compiler (V3.6.4 I believe) is broken. See 
> the BUILD.NOTES
> for info on where to download the fix. Fixing the 
> symptom with this
> patch will hide the real problem.
> 
> -- 
> Bill Stoddard
> stoddard@raleigh.ibm.com
> 

Re: [PATCH] compiler incompatibility on AIX

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
Randy Terbush wrote:
> 
> The following pointer comparison fails when compiled with native
> compiler on AIX 4.3. Is there a good reason not to just back this
> down to a simple strcmp() for all platforms? Speed doesn't really
> seem to be an issue here.
> 
> Is there a compiler option on AIX that I have not yet discovered
> that would make this work?

The AIX xlC compiler (V3.6.4 I believe) is broken. See the BUILD.NOTES
for info on where to download the fix. Fixing the symptom with this
patch will hide the real problem.

-- 
Bill Stoddard
stoddard@raleigh.ibm.com

Re: [PATCH] compiler incompatibility on AIX

Posted by Dean Gaudet <dg...@arctic.org>.

On Mon, 1 Feb 1999, Randy Terbush wrote:

> 
> The following pointer comparison fails when compiled with native
> compiler on AIX 4.3. Is there a good reason not to just back this
> down to a simple strcmp() for all platforms? Speed doesn't really
> seem to be an issue here.

Maybe speed isn't an issue here, but that's no reason it'll never be an
issue elsewhere... I seem to recall using this same technique somewhere
else in apache.  Bill Stoddard reported that it's fixed in a later release
of the compiler. 

Dean