home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / js / src / jscompat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  74 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  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. #ifndef jscompat_h___
  19. #define jscompat_h___
  20. /*
  21.  * Compatibility glue for various NSPR versions.  We must always define int8,
  22.  * int16, prword, and so on to minimize differences with js/ref, no matter what
  23.  * the NSPR typedef names may be.
  24.  */
  25. #include "prtypes.h"
  26. #include "prlong.h"
  27. #ifdef NSPR20
  28. typedef PRIntn intN;
  29. typedef PRUintn uintN;
  30. /* Following are already available in compatibility mode of NSPR 2.0 */
  31. #if 0
  32. typedef PRInt64 int64;
  33. typedef PRInt32 int32;
  34. typedef PRInt16 int16;
  35. typedef PRInt8 int8;
  36. typedef uint64 uint64;
  37. typedef uint32 uint32;
  38. typedef uint16 uint16;
  39. typedef uint8 uint8;
  40. #endif
  41. typedef PRUword pruword;
  42. typedef PRWord prword;
  43. #else  /* NSPR 1.0 */
  44. typedef int intN;
  45. typedef uint uintN;
  46. typedef uprword_t pruword;
  47. typedef prword_t prword;
  48. typedef int  PRIntn;
  49. typedef unsigned int PRUintn;
  50. typedef int64 PRInt64;
  51. typedef int32 PRInt32;
  52. typedef int16 PRInt16;
  53. typedef int8  PRInt8;
  54. typedef uint64 PRUint64;
  55. typedef uint32 PRUint32;
  56. typedef uint16 PRUint16;
  57. typedef uint8  PRUint8;
  58. typedef double PRFloat64;
  59. typedef uprword_t PRUword;
  60. typedef prword_t PRWord;
  61. #define PR_EXTERN extern PR_PUBLIC_API
  62. #define PR_IMPLEMENT PR_PUBLIC_API
  63. #define PR_BEGIN_EXTERN_C NSPR_BEGIN_EXTERN_C
  64. #define PR_END_EXTERN_C NSPR_END_EXTERN_C
  65. #define PR_BEGIN_MACRO NSPR_BEGIN_MACRO
  66. #define PR_END_MACRO NSPR_END_MACRO
  67. #endif /* NSPR 1.0 */
  68. #ifndef NSPR20
  69. typedef double float64;
  70. #endif
  71. typedef float float32;
  72. #define allocPriv allocPool
  73. #endif /* jscompat_h___ */
  74.