httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Terbush" <ra...@covalent.net>
Subject [PATCH] compiler incompatibility on AIX
Date Mon, 01 Feb 1999 18:43:48 GMT

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);
      }


Mime
View raw message