integrate change#18320 from maint-5.6 branch
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 17 Dec 2002 22:56:25 +0000 (22:56 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 17 Dec 2002 22:56:25 +0000 (22:56 +0000)
C<require '\foo\bar.pm'> fails on windows if not running
from the root directory; for a test case, see:

    http://bugs.activestate.com/show_bug.cgi?id=19317

this was due to not recognizing \foo\bar.pm as an absolute
path name
p4raw-link: @18320 on //depot/maint-5.6/perl: b900fc1f8c2531fe3108ef7a9cc5b4590a5dc7f6

p4raw-id: //depot/perl@18321
p4raw-integrated: from //depot/maint-5.6/perl@18319 'merge in' util.h
(@9288..)

util.h

diff --git a/util.h b/util.h
index c077b87..ad7a28a 100644 (file)
--- a/util.h
+++ b/util.h
@@ -17,9 +17,8 @@
 #else          /* !VMS */
 #  ifdef WIN32
 #    define PERL_FILE_IS_ABSOLUTE(f) \
-       (*(f) == '/'                                                    \
-        || ((f)[0] && (f)[1] == ':')           /* drive name */        \
-        || ((f)[0] == '\\' && (f)[1] == '\\')) /* UNC path */
+       (*(f) == '/' || *(f) == '\\'            /* UNC/rooted path */   \
+        || ((f)[0] && (f)[1] == ':'))          /* drive name */
 #  else                /* !WIN32 */
 #  ifdef NETWARE
 #    define PERL_FILE_IS_ABSOLUTE(f) \