summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-14 11:15:04 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:53:08 +0100
commitd1f9b933c88f298c6c0c5ed1dc3f9d46df8c05db (patch)
treef338a20e0ab3efbbc9176167afd854a03738bbc7 /util.h
parent8ad758c71191a2a3db14a28ce222a611005ff638 (diff)
downloadperl-d1f9b933c88f298c6c0c5ed1dc3f9d46df8c05db.tar.gz
util.h: simplify cpp conditionals
Diffstat (limited to 'util.h')
-rw-r--r--util.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/util.h b/util.h
index 0b6b59a6a7..62cb05bf0b 100644
--- a/util.h
+++ b/util.h
@@ -19,28 +19,22 @@
|| ((*(f) == '[' || *(f) == '<') \
&& (isWORDCHAR((f)[1]) || strchr("$-_]>",(f)[1])))))
-#else /* !VMS */
-# if defined(WIN32) || defined(__CYGWIN__)
-# define PERL_FILE_IS_ABSOLUTE(f) \
+#elif defined(WIN32) || defined(__CYGWIN__)
+# define PERL_FILE_IS_ABSOLUTE(f) \
(*(f) == '/' || *(f) == '\\' /* UNC/rooted path */ \
|| ((f)[0] && (f)[1] == ':')) /* drive name */
-# else /* !WIN32 */
-# ifdef NETWARE
-# define PERL_FILE_IS_ABSOLUTE(f) \
+#elif defined(NETWARE)
+# define PERL_FILE_IS_ABSOLUTE(f) \
(((f)[0] && (f)[1] == ':') /* drive name */ \
|| ((f)[0] == '\\' && (f)[1] == '\\') /* UNC path */ \
|| ((f)[3] == ':')) /* volume name, currently only sys */
-# else /* !NETWARE */
-# if defined(DOSISH) || defined(__SYMBIAN32__)
-# define PERL_FILE_IS_ABSOLUTE(f) \
+#elif defined(DOSISH) || defined(__SYMBIAN32__)
+# define PERL_FILE_IS_ABSOLUTE(f) \
(*(f) == '/' \
|| ((f)[0] && (f)[1] == ':')) /* drive name */
-# else /* NEITHER DOSISH NOR SYMBIANISH */
-# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
-# endif /* DOSISH */
-# endif /* NETWARE */
-# endif /* WIN32 */
-#endif /* VMS */
+#else /* NEITHER DOSISH NOR SYMBIANISH */
+# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
+#endif
/*
=head1 Miscellaneous Functions