]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 28 Aug 2007 19:06:53 +0000 (19:06 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 28 Aug 2007 19:06:53 +0000 (19:06 +0000)
is an absolute path (as in a VPATH build), just log the basename.

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

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

STATUS
server/log.c

diff --git a/STATUS b/STATUS
index 746f8fa10201d655387e54e5b0167090a7333996..ac7ea4b35bce184b1aa1f2de9156b3a8cc4112d3 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -152,12 +152,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
         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.
index 68de15916e46ee040767e701f51d8239ac859fae..a2a12cf5cebb5b515e29071f417a60ca08e13343 100644 (file)
@@ -529,7 +529,14 @@ static void log_error_core(const char *file, int line, int level,
             }
             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);
     }