Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. /* util.h
  2. *
  3. * Copyright (c) 1991-2001, Larry Wall
  4. *
  5. * You may distribute under the terms of either the GNU General Public
  6. * License or the Artistic License, as specified in the README file.
  7. *
  8. */
  9. #ifdef VMS
  10. # define PERL_FILE_IS_ABSOLUTE(f) \
  11. (*(f) == '/' \
  12. || (strchr(f,':') \
  13. || ((*(f) == '[' || *(f) == '<') \
  14. && (isALNUM((f)[1]) || strchr("$-_]>",(f)[1])))))
  15. #else /* !VMS */
  16. # ifdef WIN32
  17. # define PERL_FILE_IS_ABSOLUTE(f) \
  18. (*(f) == '/' \
  19. || ((f)[0] && (f)[1] == ':') /* drive name */ \
  20. || ((f)[0] == '\\' && (f)[1] == '\\')) /* UNC path */
  21. # else /* !WIN32 */
  22. # if defined( DOSISH) || defined(EPOC)
  23. # define PERL_FILE_IS_ABSOLUTE(f) \
  24. (*(f) == '/' \
  25. || ((f)[0] && (f)[1] == ':')) /* drive name */
  26. # else /* NEITHER DOSISH NOR EPOCISH */
  27. # ifdef MACOS_TRADITIONAL
  28. # define PERL_FILE_IS_ABSOLUTE(f) (strchr(f, ':') && *(f) != ':')
  29. # else /* !MACOS_TRADITIONAL */
  30. # define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
  31. # endif /* MACOS_TRADITIONAL */
  32. # endif /* DOSISH */
  33. # endif /* WIN32 */
  34. #endif /* VMS */