httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r570530 - in /httpd/httpd/branches/2.0.x: STATUS server/log.c
Date Tue, 28 Aug 2007 19:06:53 GMT
Author: wrowe
Date: Tue Aug 28 12:06:53 2007
New Revision: 570530

URL: http://svn.apache.org/viewvc?rev=570530&view=rev
Log:
server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
is an absolute path (as in a VPATH build), just log the basename.

Submitted by: jorton
Backport: r105258
Reviewed by: wrowe, trawick, rpluem

Modified:
    httpd/httpd/branches/2.0.x/STATUS
    httpd/httpd/branches/2.0.x/server/log.c

Modified: httpd/httpd/branches/2.0.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/STATUS?rev=570530&r1=570529&r2=570530&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/STATUS (original)
+++ httpd/httpd/branches/2.0.x/STATUS Tue Aug 28 12:06:53 2007
@@ -152,12 +152,6 @@
         http://people.apache.org/~wrowe/r520701-backport-2.2.patch
       +1: wrowe, rpluem
 
-    * server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
-      is an absolute path (as in a VPATH build), just log the basename.
-      [Joe Orton]
-        http://svn.apache.org/viewvc?view=rev&revision=105258
-      +1: wrowe (who can't stand this bug), trawick, rpluem
-
 PATCHES TO BACKPORT THAT ARE ON HOLD OR NOT GOING ANYWHERE SOON:
 
     *) mod_headers: Support {...}s tag for SSL variable lookup.

Modified: httpd/httpd/branches/2.0.x/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/server/log.c?rev=570530&r1=570529&r2=570530&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/server/log.c (original)
+++ httpd/httpd/branches/2.0.x/server/log.c Tue Aug 28 12:06:53 2007
@@ -529,7 +529,14 @@
             }
             file = tmp;
         }
-#endif /*_OSD_POSIX*/
+#else /* _OSD_POSIX || WIN32 */
+        const char *p;
+        /* On Unix, __FILE__ may be an absolute path in a
+         * VPATH build. */
+        if (file[0] == '/' && (p = ap_strrchr_c(file, '/')) != NULL) {
+            file = p + 1;
+        }
+#endif /*_OSD_POSIX || WIN32 */
         len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
                             "%s(%d): ", file, line);
     }



Mime
View raw message