1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is Mozilla Communicator client code, released
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998-1999
21 * the Initial Developer. All Rights Reserved.
24 * Daniel Veditz <dveditz@netscape.com>
25 * Samir Gehani <sgehani@netscape.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
50 #define NS_ASSERTION(c,m)
52 #define PR_ASSERT assert
53 #define PR_Malloc malloc
55 #define PR_FREEIF(x) do { if (x) free(x); } while(0)
56 #define PL_strfree free
57 #define PL_strcmp strcmp
58 #define PL_strdup strdup
59 #define PL_strcpy strcpy
60 #define PL_strlen strlen
62 #define PR_Open(a,b,c) fopen((a),(b)) // XXX Ignores mode
63 #define PR_Read(f,d,n) fread((d),1,(n),(f))
64 #define PR_Write(f,s,n) fwrite((s),1,(n),(f))
65 #define PR_Close fclose
67 #define PR_Delete remove
70 #define PR_BEGIN_EXTERN_C extern "C" {
71 #define PR_END_EXTERN_C }
73 #define PR_BEGIN_EXTERN_C
74 #define PR_END_EXTERN_C
78 #define PR_EXTERN(__type) extern __declspec(export) __type
79 #define PR_PUBLIC_API(__type) __declspec(export) __type
81 #define PR_EXTERN(__type) extern _declspec(dllexport) __type
82 #define PR_PUBLIC_API(__type) _declspec(dllexport) __type
83 #elif defined(XP_OS2) && defined(__declspec)
84 #define PR_EXTERN(__type) extern __declspec(dllexport) __type
85 #define PR_PUBLIC_API(__type) __declspec(dllexport) __type
87 #define PR_EXTERN(__type) extern __type
88 #define PR_PUBLIC_API(__type) __type
92 #define PR_STATIC_CALLBACK(__x) static __x
94 #define PRFileDesc FILE
96 typedef PRInt32 PROffset32
;
97 typedef unsigned long PRUint32
;
98 typedef short PRInt16
;
99 typedef unsigned short PRUint16
;
101 typedef unsigned char PRUint8
;
102 typedef PRUint8 PRPackedBool
;
103 typedef PRInt32 nsresult
;
108 #define INVALID_SXP -2
115 #define PR_RDONLY "rb"
116 #define PR_SEEK_SET SEEK_SET
117 #define PR_SEEK_END SEEK_END
119 #define NS_WildCardValid(a) NON_SXP
120 #define NS_WildCardMatch(a,b,c) PR_FALSE
122 #define MOZ_COUNT_CTOR(x)
123 #define MOZ_COUNT_DTOR(x)