Bug 449533. Set the mFixedPitch flag within SetFixedPitch. r+sr=vlad
[wine-gecko.git] / nsprpub / pr / include / prinet.h
blob9a76ea0ca8de641649bfa852303506720287aecb
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
13 * License.
15 * The Original Code is the Netscape Portable Runtime (NSPR).
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998-2000
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
39 * File: prinet.h
40 * Description:
41 * Header file used to find the system header files for socket support[1].
42 * This file serves the following purposes:
43 * - A cross-platform, "get-everything" socket header file. On
44 * Unix, socket support is scattered in several header files,
45 * while Windows and Mac have a "get-everything" socket header
46 * file[2].
47 * - NSPR needs the following macro definitions and function
48 * prototype declarations from these header files:
49 * AF_INET
50 * INADDR_ANY, INADDR_LOOPBACK, INADDR_BROADCAST
51 * ntohl(), ntohs(), htonl(), ntons().
52 * NSPR does not define its own versions of these macros and
53 * functions. It simply uses the native versions, which have
54 * the same names on all supported platforms.
55 * This file is intended to be included by NSPR public header
56 * files, such as prio.h. One should not include this file directly.
58 * Notes:
59 * 1. This file should have been an internal header. Please do not
60 * depend on it to pull in the system header files you need.
61 * 2. WARNING: This file is no longer cross-platform as it is a no-op
62 * for WIN32! See the comment in the WIN32 section for details.
65 #ifndef prinet_h__
66 #define prinet_h__
68 #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
69 #include <sys/types.h>
70 #include <sys/socket.h> /* AF_INET */
71 #include <netinet/in.h> /* INADDR_ANY, ..., ntohl(), ... */
72 #ifdef XP_OS2
73 #include <sys/ioctl.h>
74 #endif
75 #ifdef XP_UNIX
76 #ifdef AIX
78 * On AIX 4.3, the header <arpa/inet.h> refers to struct
79 * ether_addr and struct sockaddr_dl that are not declared.
80 * The following struct declarations eliminate the compiler
81 * warnings.
83 struct ether_addr;
84 struct sockaddr_dl;
85 #endif /* AIX */
86 #include <arpa/inet.h>
87 #endif /* XP_UNIX */
88 #include <netdb.h>
90 #if defined(FREEBSD) || defined(BSDI) || defined(QNX)
91 #include <rpc/types.h> /* the only place that defines INADDR_LOOPBACK */
92 #endif
95 * OS/2 hack. For some reason INADDR_LOOPBACK is not defined in the
96 * socket headers.
98 #if defined(OS2) && !defined(INADDR_LOOPBACK)
99 #define INADDR_LOOPBACK 0x7f000001
100 #endif
103 * Prototypes of ntohl() etc. are declared in <machine/endian.h>
104 * on these platforms.
106 #if defined(BSDI) || defined(OSF1)
107 #include <machine/endian.h>
108 #endif
110 #elif defined(WIN32)
113 * Do not include any system header files.
115 * Originally we were including <windows.h>. It slowed down the
116 * compilation of files that included NSPR headers, so we removed
117 * the <windows.h> inclusion at customer's request, which created
118 * an unfortunate inconsistency with other platforms.
121 #elif defined(WIN16)
123 #include <winsock.h>
125 #elif defined(XP_MAC)
127 #include "macsocket.h"
129 #else
131 #error Unknown platform
133 #endif
135 #endif /* prinet_h__ */