diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-14 11:15:04 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:53:08 +0100 |
commit | d1f9b933c88f298c6c0c5ed1dc3f9d46df8c05db (patch) | |
tree | f338a20e0ab3efbbc9176167afd854a03738bbc7 /util.h | |
parent | 8ad758c71191a2a3db14a28ce222a611005ff638 (diff) | |
download | perl-d1f9b933c88f298c6c0c5ed1dc3f9d46df8c05db.tar.gz |
util.h: simplify cpp conditionals
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 24 |
1 files changed, 9 insertions, 15 deletions
@@ -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 |