]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR#695: fix problem compiling http_bprintf.c with gcc under SCO
authordgaudet <dgaudet@unknown>
Thu, 3 Jul 1997 05:59:45 +0000 (05:59 +0000)
committerdgaudet <dgaudet@unknown>
Thu, 3 Jul 1997 05:59:45 +0000 (05:59 +0000)
Submitted by:        Marc Slemko
Reviewed by: Dean Gaudet, Randy Terbush

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@78503 13f79535-47bb-0310-9956-ffa450edef68

APACHE_1_2_X/src/CHANGES
APACHE_1_2_X/src/Configure
APACHE_1_2_X/src/include/http_core.h
APACHE_1_2_X/src/main/http_core.c
APACHE_1_2_X/src/modules/standard/mod_access.c

index b145aed8d1a9a0fab4c07bada691d696def99035..12313e5e95abbab516e8cb7a0d5c61f712baadf0 100644 (file)
@@ -95,6 +95,9 @@ Changes with Apache 1.2.1
 
   *) PORT: Workaround for AIX 3.x compiler bug in http_bprintf.c.  
      [Marc Slemko] PR#725
+  
+  *) PORT: fix problem compiling http_bprintf.c with gcc under SCO
+     [Marc Slemko] PR#695
 
 Changes with Apache 1.2
 
index 41f08ad112eba77abd794ab5106908840d35f203..9f01d2148c967fce653513195d23b6454a05e0ec 100755 (executable)
@@ -375,7 +375,9 @@ case "$PLAT" in
        OS='SCO 5'
        CFLAGS="$CFLAGS -DSCO5"
        LIBS="$LIBS -lsocket -lmalloc -lprot"
-       OSBPRINTF="-K noinline"
+       if [ "$CC" = "cc" ] || [ "$COMPILER" = "cc" ]; then
+           OSBPRINTF="-K noinline"
+       fi
        DEF_WANTHSREGEX=no
        ;;
     *-solaris2*)
index 8454b81ad1184807dd83a851ccd71bebe6e4f37b..b360b9cdd5e48f1bf558fe0616252829c288e19d 100644 (file)
@@ -77,6 +77,7 @@
 #define REMOTE_HOST (0)
 #define REMOTE_NAME (1)
 #define REMOTE_NOLOOKUP (2)
+#define REMOTE_FORCE_HOST (3)
 
 #define SATISFY_ALL 0
 #define SATISFY_ANY 1
index 39a6e6bc8f6097318bc1bf1bc6c3ba282d8127e9..db1c288b46679d7f8093be422b1edcf903d7b131 100644 (file)
@@ -338,7 +338,9 @@ get_remote_host(conn_rec *conn, void *dir_config, int type)
     if (dir_config) 
        dir_conf = (core_dir_config *)get_module_config(dir_config, &core_module);
 
-   if ((!dir_conf) || (type != REMOTE_NOLOOKUP && conn->remote_host == NULL && dir_conf->hostname_lookups))
+   if ((!dir_conf) || (type == REMOTE_FORCE_HOST && conn->remote_host == NULL)
+       || (type != REMOTE_NOLOOKUP
+           && conn->remote_host == NULL && dir_conf->hostname_lookups))
     {
 #ifdef STATUS
        int old_stat = update_child_status(conn->child_num,
@@ -383,7 +385,7 @@ get_remote_host(conn_rec *conn, void *dir_config, int type)
        return conn->remote_host;
     else
     {
-       if (type == REMOTE_HOST) return NULL;
+       if (type == REMOTE_HOST || type == REMOTE_FORCE_HOST) return NULL;
        else return conn->remote_ip;
     }
 }
index eb3523801237782f6d1a7f7b12df41cc1c82cd2e..ad29a2e32b3075ea62ac20fffc23956ad4ff1fcc 100644 (file)
@@ -206,7 +206,7 @@ int find_allowdeny (request_rec *r, array_header *a, int method)
 
        if (!gothost) {
            remotehost = get_remote_host(r->connection, r->per_dir_config,
-                                        REMOTE_HOST);
+                                        REMOTE_FORCE_HOST);
 
            if ((remotehost == NULL) || is_ip(remotehost))
                gothost = 1;