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