1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #if OSL_DEBUG_LEVEL == 0
33 # define _WIN32_WINNT 0x0400
34 # define _CTYPE_DISABLE_MACROS /* wg. dynamischer C-Runtime MH */
46 #include <sys/types.h>
52 /* Must define this else build breaks because Winsock2.h
53 includes Windows.h and without WIN32_LEAN_AND_MEAN
54 also includes mswsock.h which needs a forward typedef
57 #define WIN32_LEAN_AND_MEAN
60 // windows.h includes winsock2.h
61 // if _WIN32_WINNT > 0x0400
62 // so someone cannot include winsock.h
63 // at the same time without patching
75 // winsock2.h includes windows.h
76 #pragma warning(push,1) /* disable warnings within system headers */
77 #pragma warning(disable:4917)
87 #define _MAX_CMD 4096 /* maximum length of commandline */
88 /* #define _MAX_ENV 4096 maximum length of environment var (isn't used anywhere) */
91 # ifndef SA_FAMILY_DECL
92 # define SA_FAMILY_DECL short sa_family
95 typedef struct sockaddr_ipx
{
99 unsigned short sa_socket
;
102 # define NSPROTO_IPX 1000
103 # define NSPROTO_SPX 1256
104 # define NSPROTO_SPXII 1257
110 extern "C" DWORD g_dwPlatformId
;
112 extern DWORD g_dwPlatformId
;
113 #endif // #ifdef __cplusplus
115 #define IS_NT (g_dwPlatformId == VER_PLATFORM_WIN32_NT)
119 extern "C" DWORD
GetPlatformId(void);
121 extern DWORD
GetPlatformId(void);
122 #endif // #ifdef __cplusplus
124 #define IS_NT (GetPlatformId() == VER_PLATFORM_WIN32_NT)
125 #endif // #ifdef _DLL_