home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nspr30-v.zip / nspr30-v / include / md / _pcos.h < prev    next >
C/C++ Source or Header  |  1998-11-21  |  2KB  |  90 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /*
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  * 
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  * 
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef prpcos_h___
  20. #define prpcos_h___
  21.  
  22. #define PR_DLL_SUFFIX        ".dll"
  23.  
  24. #ifndef OS2
  25. #include <windows.h>
  26. #endif
  27. #include <setjmp.h>
  28. #include <stdlib.h>
  29.  
  30. #define USE_SETJMP
  31. #define DIRECTORY_SEPARATOR         '\\'
  32. #define DIRECTORY_SEPARATOR_STR     "\\"
  33. #define PATH_SEPARATOR              ';'
  34.  
  35. #ifdef WIN16
  36. #define GCPTR __far
  37. #else
  38. #define GCPTR
  39. #endif
  40.  
  41. /*
  42. ** Routines for processing command line arguments
  43. */
  44. PR_BEGIN_EXTERN_C
  45. #ifndef XP_OS2_EMX
  46. extern char *optarg;
  47. extern int optind;
  48. extern int getopt(int argc, char **argv, char *spec);
  49. #endif
  50. PR_END_EXTERN_C
  51.  
  52. #define gcmemcpy(a,b,c) memcpy(a,b,c)
  53.  
  54.  
  55. /*
  56. ** Definitions of directory structures amd functions
  57. ** These definitions are from:
  58. **      <dirent.h>
  59. */
  60. #ifdef MOZ_BITS
  61. #include <time.h>
  62. #endif
  63. #ifdef XP_OS2_EMX
  64. #include <sys/types.h>
  65. #endif
  66. #include <sys/stat.h>
  67. #include <io.h>
  68. #include <fcntl.h>          /* O_BINARY */
  69.  
  70. typedef int PROSFD;
  71.  
  72. /*
  73. ** Undo the macro define in the Microsoft header files...
  74. */
  75. #ifndef XP_OS2 /* Uh... this seems a bit insane in itself to we OS/2 folk */
  76. #ifdef _stat
  77. #undef _stat
  78. #endif
  79. #endif
  80.  
  81. #ifdef OS2
  82. extern PRStatus _MD_OS2GetHostName(char *name, PRUint32 namelen);
  83. #define _MD_GETHOSTNAME _MD_OS2GetHostName
  84. #else
  85. extern PRStatus _MD_WindowsGetHostName(char *name, PRUint32 namelen);
  86. #define _MD_GETHOSTNAME _MD_WindowsGetHostName
  87. #endif
  88.  
  89. #endif /* prpcos_h___ */
  90.