_pcos.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef prpcos_h___
  6. #define prpcos_h___
  7. #define PR_DLL_SUFFIX ".dll"
  8. #include <stdlib.h>
  9. #define DIRECTORY_SEPARATOR '\\'
  10. #define DIRECTORY_SEPARATOR_STR "\\"
  11. #define PATH_SEPARATOR ';'
  12. /*
  13. ** Routines for processing command line arguments
  14. */
  15. PR_BEGIN_EXTERN_C
  16. #ifndef XP_OS2
  17. extern char *optarg;
  18. extern int optind;
  19. extern int getopt(int argc, char **argv, char *spec);
  20. #endif
  21. PR_END_EXTERN_C
  22. /*
  23. ** Definitions of directory structures amd functions
  24. ** These definitions are from:
  25. ** <dirent.h>
  26. */
  27. #ifdef XP_OS2
  28. #include <sys/types.h>
  29. #endif
  30. #include <sys/stat.h>
  31. #include <io.h>
  32. #include <fcntl.h> /* O_BINARY */
  33. #ifdef OS2
  34. extern PRStatus _MD_OS2GetHostName(char *name, PRUint32 namelen);
  35. #define _MD_GETHOSTNAME _MD_OS2GetHostName
  36. #else
  37. extern PRStatus _MD_WindowsGetHostName(char *name, PRUint32 namelen);
  38. #define _MD_GETHOSTNAME _MD_WindowsGetHostName
  39. extern PRStatus _MD_WindowsGetSysInfo(PRSysInfo cmd, char *name, PRUint32 namelen);
  40. #define _MD_GETSYSINFO _MD_WindowsGetSysInfo
  41. #endif
  42. #endif /* prpcos_h___ */