williamr@2: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ williamr@2: /* williamr@2: * The contents of this file are subject to the Mozilla Public williamr@2: * License Version 1.1 (the "License"); you may not use this file williamr@2: * except in compliance with the License. You may obtain a copy of williamr@2: * the License at http://www.mozilla.org/MPL/ williamr@2: * williamr@2: * Software distributed under the License is distributed on an "AS williamr@2: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or williamr@2: * implied. See the License for the specific language governing williamr@2: * rights and limitations under the License. williamr@2: * williamr@2: * The Original Code is the Netscape Portable Runtime (NSPR). williamr@2: * williamr@2: * The Initial Developer of the Original Code is Netscape williamr@2: * Communications Corporation. Portions created by Netscape are williamr@2: * Copyright (C) 1998-2000 Netscape Communications Corporation. All williamr@2: * Rights Reserved. williamr@2: * williamr@2: * Contributor(s): williamr@2: * Portions Copyright (c) 2004-2006, Nokia Corporation williamr@2: * williamr@2: * williamr@2: * Alternatively, the contents of this file may be used under the williamr@2: * terms of the GNU General Public License Version 2 or later (the williamr@2: * "GPL"), in which case the provisions of the GPL are applicable williamr@2: * instead of those above. If you wish to allow use of your williamr@2: * version of this file only under the terms of the GPL and not to williamr@2: * allow others to use your version of this file under the MPL, williamr@2: * indicate your decision by deleting the provisions above and williamr@2: * replace them with the notice and other provisions required by williamr@2: * the GPL. If you do not delete the provisions above, a recipient williamr@2: * may use your version of this file under either the MPL or the williamr@2: * GPL. williamr@2: */ williamr@2: williamr@2: /* NOTES: williamr@2: * Nokia modified this file, by changing certain variables for the purpose of williamr@2: * porting the file to the Symbian platform on May 1st, 2004. williamr@2: */ williamr@2: williamr@2: williamr@2: /* williamr@2: ** File: prtypes.h williamr@2: ** Description: Definitions of NSPR's basic types williamr@2: ** williamr@2: ** Prototypes and macros used to make up for deficiencies in ANSI environments williamr@2: ** that we have found. williamr@2: ** williamr@2: ** Since we do not wrap and all the other standard headers, authors williamr@2: ** of portable code will not know in general that they need these definitions. williamr@2: ** Instead of requiring these authors to find the dependent uses in their code williamr@2: ** and take the following steps only in those C files, we take steps once here williamr@2: ** for all C files. williamr@2: **/ williamr@2: williamr@2: #ifndef prtypes_h___ williamr@2: #define prtypes_h___ williamr@2: williamr@2: #ifdef MDCPUCFG williamr@2: #include MDCPUCFG williamr@2: #else williamr@2: #include "prcpucfg.h" williamr@2: #endif williamr@2: williamr@2: #include williamr@2: williamr@2: /*********************************************************************** williamr@2: ** MACROS: PR_EXTERN williamr@2: ** PR_IMPLEMENT williamr@2: ** DESCRIPTION: williamr@2: ** These are only for externally visible routines and globals. For williamr@2: ** internal routines, just use "extern" for type checking and that williamr@2: ** will not export internal cross-file or forward-declared symbols. williamr@2: ** Define a macro for declaring procedures return types. We use this to williamr@2: ** deal with windoze specific type hackery for DLL definitions. Use williamr@2: ** PR_EXTERN when the prototype for the method is declared. Use williamr@2: ** PR_IMPLEMENT for the implementation of the method. williamr@2: ** williamr@2: ** Example: williamr@2: ** in dowhim.h williamr@2: ** PR_EXTERN( void ) DoWhatIMean( void ); williamr@2: ** in dowhim.c williamr@2: ** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } williamr@2: ** williamr@2: ** williamr@2: ***********************************************************************/ williamr@2: #if defined(WIN32) williamr@2: williamr@2: #if defined(__GNUC__) williamr@2: #undef _declspec williamr@2: #define _declspec(x) __declspec(x) williamr@2: #endif williamr@2: williamr@2: #define PR_EXPORT(__type) extern _declspec(dllexport) __type williamr@2: #define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type williamr@2: #define PR_IMPORT(__type) _declspec(dllimport) __type williamr@2: #define PR_IMPORT_DATA(__type) _declspec(dllimport) __type williamr@2: williamr@2: #define PR_EXTERN(__type) extern _declspec(dllexport) __type williamr@2: #define PR_IMPLEMENT(__type) _declspec(dllexport) __type williamr@2: #define PR_EXTERN_DATA(__type) extern _declspec(dllexport) __type williamr@2: #define PR_IMPLEMENT_DATA(__type) _declspec(dllexport) __type williamr@2: williamr@2: #define PR_CALLBACK williamr@2: #define PR_CALLBACK_DECL williamr@2: #define PR_STATIC_CALLBACK(__x) static __x williamr@2: williamr@2: #elif defined(XP_BEOS) williamr@2: williamr@2: #define PR_EXPORT(__type) extern __declspec(dllexport) __type williamr@2: #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type williamr@2: #define PR_IMPORT(__type) extern __declspec(dllexport) __type williamr@2: #define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type williamr@2: williamr@2: #define PR_EXTERN(__type) extern __declspec(dllexport) __type williamr@2: #define PR_IMPLEMENT(__type) __declspec(dllexport) __type williamr@2: #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type williamr@2: #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type williamr@2: williamr@2: #define PR_CALLBACK williamr@2: #define PR_CALLBACK_DECL williamr@2: #define PR_STATIC_CALLBACK(__x) static __x williamr@2: williamr@2: #elif defined(WIN16) williamr@2: williamr@2: #define PR_CALLBACK_DECL __cdecl williamr@2: williamr@2: #if defined(_WINDLL) williamr@2: #define PR_EXPORT(__type) extern __type _cdecl _export _loadds williamr@2: #define PR_IMPORT(__type) extern __type _cdecl _export _loadds williamr@2: #define PR_EXPORT_DATA(__type) extern __type _export williamr@2: #define PR_IMPORT_DATA(__type) extern __type _export williamr@2: williamr@2: #define PR_EXTERN(__type) extern __type _cdecl _export _loadds williamr@2: #define PR_IMPLEMENT(__type) __type _cdecl _export _loadds williamr@2: #define PR_EXTERN_DATA(__type) extern __type _export williamr@2: #define PR_IMPLEMENT_DATA(__type) __type _export williamr@2: williamr@2: #define PR_CALLBACK __cdecl __loadds williamr@2: #define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK williamr@2: williamr@2: #else /* this must be .EXE */ williamr@2: #define PR_EXPORT(__type) extern __type _cdecl _export williamr@2: #define PR_IMPORT(__type) extern __type _cdecl _export williamr@2: #define PR_EXPORT_DATA(__type) extern __type _export williamr@2: #define PR_IMPORT_DATA(__type) extern __type _export williamr@2: williamr@2: #define PR_EXTERN(__type) extern __type _cdecl _export williamr@2: #define PR_IMPLEMENT(__type) __type _cdecl _export williamr@2: #define PR_EXTERN_DATA(__type) extern __type _export williamr@2: #define PR_IMPLEMENT_DATA(__type) __type _export williamr@2: williamr@2: #define PR_CALLBACK __cdecl __loadds williamr@2: #define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK williamr@2: #endif /* _WINDLL */ williamr@2: williamr@2: #elif defined(XP_MAC) williamr@2: williamr@2: #define PR_EXPORT(__type) extern __declspec(export) __type williamr@2: #define PR_EXPORT_DATA(__type) extern __declspec(export) __type williamr@2: #define PR_IMPORT(__type) extern __declspec(export) __type williamr@2: #define PR_IMPORT_DATA(__type) extern __declspec(export) __type williamr@2: williamr@2: #define PR_EXTERN(__type) extern __declspec(export) __type williamr@2: #define PR_IMPLEMENT(__type) __declspec(export) __type williamr@2: #define PR_EXTERN_DATA(__type) extern __declspec(export) __type williamr@2: #define PR_IMPLEMENT_DATA(__type) __declspec(export) __type williamr@2: williamr@2: #define PR_CALLBACK williamr@2: #define PR_CALLBACK_DECL williamr@2: #define PR_STATIC_CALLBACK(__x) static __x williamr@2: williamr@2: #elif defined(XP_OS2_VACPP) williamr@2: williamr@2: #define PR_EXPORT(__type) extern __type williamr@2: #define PR_EXPORT_DATA(__type) extern __type williamr@2: #define PR_IMPORT(__type) extern __type williamr@2: #define PR_IMPORT_DATA(__type) extern __type williamr@2: williamr@2: #define PR_EXTERN(__type) extern __type williamr@2: #define PR_IMPLEMENT(__type) __type williamr@2: #define PR_EXTERN_DATA(__type) extern __type williamr@2: #define PR_IMPLEMENT_DATA(__type) __type williamr@2: #define PR_CALLBACK _Optlink williamr@2: #define PR_CALLBACK_DECL williamr@2: #define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK williamr@2: williamr@2: #else /* Unix */ williamr@2: williamr@2: #define PR_EXPORT(__type) extern __type williamr@2: #define PR_EXPORT_DATA(__type) extern __type williamr@2: #define PR_IMPORT(__type) extern __type williamr@2: #define PR_IMPORT_DATA(__type) extern __type williamr@2: williamr@2: #define PR_EXTERN(__type) extern __type williamr@2: #define PR_IMPLEMENT(__type) __type williamr@2: #define PR_EXTERN_DATA(__type) extern __type williamr@2: #define PR_IMPLEMENT_DATA(__type) __type williamr@2: #define PR_CALLBACK williamr@2: #define PR_CALLBACK_DECL williamr@2: #define PR_STATIC_CALLBACK(__x) static __x williamr@2: williamr@2: #endif williamr@2: williamr@2: #if defined(_NSPR_BUILD_) williamr@2: #define NSPR_API(__type) PR_EXPORT(__type) williamr@2: #define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) williamr@2: #else williamr@2: #define NSPR_API(__type) PR_IMPORT(__type) williamr@2: #define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) williamr@2: #endif williamr@2: williamr@2: /*********************************************************************** williamr@2: ** MACROS: PR_BEGIN_MACRO williamr@2: ** PR_END_MACRO williamr@2: ** DESCRIPTION: williamr@2: ** Macro body brackets so that macros with compound statement definitions williamr@2: ** behave syntactically more like functions when called. williamr@2: ***********************************************************************/ williamr@2: #define PR_BEGIN_MACRO do { williamr@2: #define PR_END_MACRO } while (0) williamr@2: williamr@2: /*********************************************************************** williamr@2: ** MACROS: PR_BEGIN_EXTERN_C williamr@2: ** PR_END_EXTERN_C williamr@2: ** DESCRIPTION: williamr@2: ** Macro shorthands for conditional C++ extern block delimiters. williamr@2: ***********************************************************************/ williamr@2: #ifdef __cplusplus williamr@2: #define PR_BEGIN_EXTERN_C extern "C" { williamr@2: #define PR_END_EXTERN_C } williamr@2: #else williamr@2: #define PR_BEGIN_EXTERN_C williamr@2: #define PR_END_EXTERN_C williamr@2: #endif williamr@2: williamr@2: /*********************************************************************** williamr@2: ** MACROS: PR_BIT williamr@2: ** PR_BITMASK williamr@2: ** DESCRIPTION: williamr@2: ** Bit masking macros. XXX n must be <= 31 to be portable williamr@2: ***********************************************************************/ williamr@2: #define PR_BIT(n) ((PRUint32)1 << (n)) williamr@2: #define PR_BITMASK(n) (PR_BIT(n) - 1) williamr@2: williamr@2: /*********************************************************************** williamr@2: ** MACROS: PR_ROUNDUP williamr@2: ** PR_MIN williamr@2: ** PR_MAX williamr@2: ** PR_ABS williamr@2: ** DESCRIPTION: williamr@2: ** Commonly used macros for operations on compatible types. williamr@2: ***********************************************************************/ williamr@2: #define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) williamr@2: #define PR_MIN(x,y) ((x)<(y)?(x):(y)) williamr@2: #define PR_MAX(x,y) ((x)>(y)?(x):(y)) williamr@2: #define PR_ABS(x) ((x)<0?-(x):(x)) williamr@2: williamr@2: PR_BEGIN_EXTERN_C williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUint8 williamr@2: ** PRInt8 williamr@2: ** DESCRIPTION: williamr@2: ** The int8 types are known to be 8 bits each. There is no type that williamr@2: ** is equivalent to a plain "char". williamr@2: ************************************************************************/ williamr@2: #if PR_BYTES_PER_BYTE == 1 williamr@2: typedef unsigned char PRUint8; williamr@2: /* williamr@2: ** Some cfront-based C++ compilers do not like 'signed char' and williamr@2: ** issue the warning message: williamr@2: ** warning: "signed" not implemented (ignored) williamr@2: ** For these compilers, we have to define PRInt8 as plain 'char'. williamr@2: ** Make sure that plain 'char' is indeed signed under these compilers. williamr@2: */ williamr@2: #if (defined(HPUX) && defined(__cplusplus) \ williamr@2: && !defined(__GNUC__) && __cplusplus < 199707L) \ williamr@2: || (defined(SCO) && defined(__cplusplus) \ williamr@2: && !defined(__GNUC__) && __cplusplus == 1L) williamr@2: typedef char PRInt8; williamr@2: #else williamr@2: typedef signed char PRInt8; williamr@2: #endif williamr@2: #else williamr@2: #error No suitable type for PRInt8/PRUint8 williamr@2: #endif williamr@2: williamr@2: /************************************************************************ williamr@2: * MACROS: PR_INT8_MAX williamr@2: * PR_INT8_MIN williamr@2: * PR_UINT8_MAX williamr@2: * DESCRIPTION: williamr@2: * The maximum and minimum values of a PRInt8 or PRUint8. williamr@2: ************************************************************************/ williamr@2: williamr@2: #define PR_INT8_MAX 127 williamr@2: #define PR_INT8_MIN (-128) williamr@2: #define PR_UINT8_MAX 255U williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUint16 williamr@2: ** PRInt16 williamr@2: ** DESCRIPTION: williamr@2: ** The int16 types are known to be 16 bits each. williamr@2: ************************************************************************/ williamr@2: #if PR_BYTES_PER_SHORT == 2 williamr@2: typedef unsigned short PRUint16; williamr@2: typedef short PRInt16; williamr@2: #else williamr@2: #error No suitable type for PRInt16/PRUint16 williamr@2: #endif williamr@2: williamr@2: /************************************************************************ williamr@2: * MACROS: PR_INT16_MAX williamr@2: * PR_INT16_MIN williamr@2: * PR_UINT16_MAX williamr@2: * DESCRIPTION: williamr@2: * The maximum and minimum values of a PRInt16 or PRUint16. williamr@2: ************************************************************************/ williamr@2: williamr@2: #define PR_INT16_MAX 32767 williamr@2: #define PR_INT16_MIN (-32768) williamr@2: #define PR_UINT16_MAX 65535U williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUint32 williamr@2: ** PRInt32 williamr@2: ** DESCRIPTION: williamr@2: ** The int32 types are known to be 32 bits each. williamr@2: ************************************************************************/ williamr@2: #if PR_BYTES_PER_INT == 4 williamr@2: typedef unsigned int PRUint32; williamr@2: typedef int PRInt32; williamr@2: #define PR_INT32(x) x williamr@2: #define PR_UINT32(x) x ## U williamr@2: #elif PR_BYTES_PER_LONG == 4 williamr@2: typedef unsigned long PRUint32; williamr@2: typedef long PRInt32; williamr@2: #define PR_INT32(x) x ## L williamr@2: #define PR_UINT32(x) x ## UL williamr@2: #else williamr@2: #error No suitable type for PRInt32/PRUint32 williamr@2: #endif williamr@2: williamr@2: /************************************************************************ williamr@2: * MACROS: PR_INT32_MAX williamr@2: * PR_INT32_MIN williamr@2: * PR_UINT32_MAX williamr@2: * DESCRIPTION: williamr@2: * The maximum and minimum values of a PRInt32 or PRUint32. williamr@2: ************************************************************************/ williamr@2: williamr@2: #define PR_INT32_MAX PR_INT32(2147483647) williamr@2: #define PR_INT32_MIN (-PR_INT32_MAX - 1) williamr@2: #define PR_UINT32_MAX PR_UINT32(4294967295) williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUint64 williamr@2: ** PRInt64 williamr@2: ** DESCRIPTION: williamr@2: ** The int64 types are known to be 64 bits each. Care must be used when williamr@2: ** declaring variables of type PRUint64 or PRInt64. Different hardware williamr@2: ** architectures and even different compilers have varying support for williamr@2: ** 64 bit values. The only guaranteed portability requires the use of williamr@2: ** the LL_ macros (see prlong.h). williamr@2: ************************************************************************/ williamr@2: #ifdef HAVE_LONG_LONG williamr@2: #if PR_BYTES_PER_LONG == 8 williamr@2: typedef long PRInt64; williamr@2: typedef unsigned long PRUint64; williamr@2: #elif defined(WIN16) williamr@2: typedef __int64 PRInt64; williamr@2: typedef unsigned __int64 PRUint64; williamr@2: #elif defined(WIN32) && !defined(__GNUC__) williamr@2: typedef __int64 PRInt64; williamr@2: typedef unsigned __int64 PRUint64; williamr@2: #else williamr@2: typedef long long PRInt64; williamr@2: typedef unsigned long long PRUint64; williamr@2: #endif /* PR_BYTES_PER_LONG == 8 */ williamr@2: #else /* !HAVE_LONG_LONG */ williamr@2: typedef struct { williamr@2: #ifdef IS_LITTLE_ENDIAN williamr@2: PRUint32 lo, hi; williamr@2: #else williamr@2: PRUint32 hi, lo; williamr@2: #endif williamr@2: } PRInt64; williamr@2: typedef PRInt64 PRUint64; williamr@2: #endif /* !HAVE_LONG_LONG */ williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUintn williamr@2: ** PRIntn williamr@2: ** DESCRIPTION: williamr@2: ** The PRIntn types are most appropriate for automatic variables. They are williamr@2: ** guaranteed to be at least 16 bits, though various architectures may williamr@2: ** define them to be wider (e.g., 32 or even 64 bits). These types are williamr@2: ** never valid for fields of a structure. williamr@2: ************************************************************************/ williamr@2: #if PR_BYTES_PER_INT >= 2 williamr@2: typedef int PRIntn; williamr@2: typedef unsigned int PRUintn; williamr@2: #else williamr@2: #error 'sizeof(int)' not sufficient for platform use williamr@2: #endif williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRFloat64 williamr@2: ** DESCRIPTION: williamr@2: ** NSPR's floating point type is always 64 bits. williamr@2: ************************************************************************/ williamr@2: typedef double PRFloat64; williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRSize williamr@2: ** DESCRIPTION: williamr@2: ** A type for representing the size of objects. williamr@2: ************************************************************************/ williamr@2: typedef size_t PRSize; williamr@2: williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PROffset32, PROffset64 williamr@2: ** DESCRIPTION: williamr@2: ** A type for representing byte offsets from some location. williamr@2: ************************************************************************/ williamr@2: typedef PRInt32 PROffset32; williamr@2: typedef PRInt64 PROffset64; williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRPtrDiff williamr@2: ** DESCRIPTION: williamr@2: ** A type for pointer difference. Variables of this type are suitable williamr@2: ** for storing a pointer or pointer sutraction. williamr@2: ************************************************************************/ williamr@2: typedef ptrdiff_t PRPtrdiff; williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRUptrdiff williamr@2: ** DESCRIPTION: williamr@2: ** A type for pointer difference. Variables of this type are suitable williamr@2: ** for storing a pointer or pointer sutraction. williamr@2: ************************************************************************/ williamr@2: typedef unsigned long PRUptrdiff; williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRBool williamr@2: ** DESCRIPTION: williamr@2: ** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE williamr@2: ** for clarity of target type in assignments and actual arguments. Use williamr@2: ** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans williamr@2: ** juast as you would C int-valued conditions. williamr@2: ************************************************************************/ williamr@2: typedef PRIntn PRBool; williamr@2: #define PR_TRUE 1 williamr@2: #define PR_FALSE 0 williamr@2: williamr@2: /************************************************************************ williamr@2: ** TYPES: PRPackedBool williamr@2: ** DESCRIPTION: williamr@2: ** Use PRPackedBOol within structs where bitfields are not desireable williamr@2: ** but minimum and consistant overhead matters. williamr@2: ************************************************************************/ williamr@2: typedef PRUint8 PRPackedBool; williamr@2: williamr@2: /* williamr@2: ** Status code used by some routines that have a single point of failure or williamr@2: ** special status return. williamr@2: */ williamr@2: typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; williamr@2: williamr@2: #ifdef MOZ_UNICODE williamr@2: /* williamr@2: * EXPERIMENTAL: This type may be removed in a future release. williamr@2: */ williamr@2: #ifndef __PRUNICHAR__ williamr@2: #define __PRUNICHAR__ williamr@2: #if defined(WIN32) || defined(XP_MAC) williamr@2: typedef wchar_t PRUnichar; williamr@2: #else williamr@2: typedef PRUint16 PRUnichar; williamr@2: #endif williamr@2: #endif williamr@2: #endif /* MOZ_UNICODE */ williamr@2: williamr@2: /* williamr@2: ** WARNING: The undocumented data types PRWord and PRUword are williamr@2: ** only used in the garbage collection and arena code. Do not williamr@2: ** use PRWord and PRUword in new code. williamr@2: ** williamr@2: ** A PRWord is an integer that is the same size as a void*. williamr@2: ** It implements the notion of a "word" in the Java Virtual williamr@2: ** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine williamr@2: ** Specification, Addison-Wesley, September 1996. williamr@2: ** http://java.sun.com/docs/books/vmspec/index.html.) williamr@2: */ williamr@2: typedef long PRWord; williamr@2: typedef unsigned long PRUword; williamr@2: williamr@2: #if defined(NO_NSPR_10_SUPPORT) williamr@2: #else williamr@2: /********* ???????????????? FIX ME ??????????????????????????? *****/ williamr@2: /********************** Some old definitions until pr=>ds transition is done ***/ williamr@2: /********************** Also, we are still using NSPR 1.0. GC ******************/ williamr@2: /* williamr@2: ** Fundamental NSPR macros, used nearly everywhere. williamr@2: */ williamr@2: williamr@2: #define PR_PUBLIC_API PR_IMPLEMENT williamr@2: williamr@2: /* williamr@2: ** Macro body brackets so that macros with compound statement definitions williamr@2: ** behave syntactically more like functions when called. williamr@2: */ williamr@2: #define NSPR_BEGIN_MACRO do { williamr@2: #define NSPR_END_MACRO } while (0) williamr@2: williamr@2: /* williamr@2: ** Macro shorthands for conditional C++ extern block delimiters. williamr@2: */ williamr@2: #ifdef NSPR_BEGIN_EXTERN_C williamr@2: #undef NSPR_BEGIN_EXTERN_C williamr@2: #endif williamr@2: #ifdef NSPR_END_EXTERN_C williamr@2: #undef NSPR_END_EXTERN_C williamr@2: #endif williamr@2: williamr@2: #ifdef __cplusplus williamr@2: #define NSPR_BEGIN_EXTERN_C extern "C" { williamr@2: #define NSPR_END_EXTERN_C } williamr@2: #else williamr@2: #define NSPR_BEGIN_EXTERN_C williamr@2: #define NSPR_END_EXTERN_C williamr@2: #endif williamr@2: williamr@2: #ifdef XP_MAC williamr@2: #include "protypes.h" williamr@2: #else williamr@2: #include "obsolete/protypes.h" williamr@2: #endif williamr@2: williamr@2: /********* ????????????? End Fix me ?????????????????????????????? *****/ williamr@2: #endif /* NO_NSPR_10_SUPPORT */ williamr@2: williamr@2: PR_END_EXTERN_C williamr@2: williamr@2: #endif /* prtypes_h___ */ williamr@2: