You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2005/06/28 12:45:56 UTC

svn commit: r202154 - /httpd/httpd/branches/2.0.x/server/log.c

Author: trawick
Date: Tue Jun 28 03:45:52 2005
New Revision: 202154

URL: http://svn.apache.org/viewcvs?rev=202154&view=rev
Log:
merge this fix from trunk:

fix minor annoyance on z/OS: __FILE__ is set to
"./foo.c" instead of simply "foo.c", so filter
out all but the basename before logging it with
debug messages

Reviewed by: pquerna, wrowe

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

Modified: httpd/httpd/branches/2.0.x/server/log.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/server/log.c?rev=202154&r1=202153&r2=202154&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/server/log.c (original)
+++ httpd/httpd/branches/2.0.x/server/log.c Tue Jun 28 03:45:52 2005
@@ -439,7 +439,7 @@
 
 #ifndef TPF
     if (file && level_and_mask == APLOG_DEBUG) {
-#if defined(_OSD_POSIX) || defined(WIN32)
+#if defined(_OSD_POSIX) || defined(WIN32) || defined(__MVS__)
         char tmp[256];
         char *e = strrchr(file, '/');
 #ifdef WIN32



Re: svn commit: r202154 - /httpd/httpd/branches/2.0.x/server/log.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 05:45 AM 6/28/2005, trawick@apache.org wrote:
>merge this fix from trunk:
>
>fix minor annoyance on z/OS: __FILE__ is set to
>"./foo.c" instead of simply "foo.c", so filter
>out all but the basename before logging it with
>debug messages

If this keeps popping up, a trivial Autofoo test would look
something like (untested);


AC_DEFUN(AP_AC_TEST_PATH_IN__FILE__,
  [AC_CACHE_CHECK(if __FILE__ emits the path, 
    ap_ac_cv_test_file_path,
    [AC_TRY_RUN([
#include <stdlib.h>
int main (int argc, char **argv) 
{ return (strchr(__FILE__, '/') != NULL); }
      ], ap_ac_cv_test_file_path=yes, ap_ac_cv_test_file_path=no)
    ]
  ]
  if test "$ap_ac_cv_test_file_path" = "yes"; then
    AC_DEFINE(HAVE_PATH_IN__FILE__, , [define if __FILE__ includes a path])
)


and we could just make this conditional #ifdef HAVE_PATH_IN__FILE__