Bump for 3.6-28
[LibreOffice.git] / sal / osl / w32 / system.h
blob3f5d973b41102e05e44fb2bb59076cb4e69c5ade
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #if OSL_DEBUG_LEVEL == 0
30 # define NO_DEBUG_CRT
31 #endif
33 #ifndef _WIN32_WINNT
34 # define _WIN32_WINNT 0x0400
35 # define _CTYPE_DISABLE_MACROS /* wg. dynamischer C-Runtime MH */
36 #endif
38 #include <stdio.h>
39 #include <stdlib.h>
40 #include <stdarg.h>
41 #include <ctype.h>
42 #include <malloc.h>
43 #include <limits.h>
44 #include <process.h>
45 #include <time.h>
46 #include <fcntl.h>
47 #include <sys/types.h>
48 #include <sys/stat.h>
49 #include <io.h>
50 #include <share.h>
51 #include <direct.h>
53 /* Must define this else build breaks because Winsock2.h
54 includes Windows.h and without WIN32_LEAN_AND_MEAN
55 also includes mswsock.h which needs a forward typedef
56 of SOCKET ...
58 #define WIN32_LEAN_AND_MEAN
60 #ifdef GCC
61 // windows.h includes winsock2.h
62 // if _WIN32_WINNT > 0x0400
63 // so someone cannot include winsock.h
64 // at the same time without patching
65 // windows.h
66 #include <windows.h>
67 #include <winsock2.h>
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 #include <ws2tcpip.h>
72 #ifdef __cplusplus
74 #endif
75 #include <shlobj.h>
76 #ifndef NO_DEBUG_CRT
77 #include <crtdbg.h>
78 #endif
79 #else
80 // winsock2.h includes windows.h
81 #pragma warning(push,1) /* disable warnings within system headers */
82 #pragma warning(disable:4917)
83 #include <winsock2.h>
84 #include <wsipx.h>
85 #include <shlobj.h>
86 #ifndef NO_DEBUG_CRT
87 #include <crtdbg.h>
88 #endif
89 #pragma warning(pop)
90 #endif
92 #define _MAX_CMD 4096 /* maximum length of commandline */
93 /* #define _MAX_ENV 4096 maximum length of environment var (isn't used anywhere) */
95 #ifdef GCC
96 # ifndef SA_FAMILY_DECL
97 # define SA_FAMILY_DECL short sa_family
98 # endif
100 typedef struct sockaddr_ipx {
101 SA_FAMILY_DECL;
102 char sa_netnum[4];
103 char sa_nodenum[6];
104 unsigned short sa_socket;
105 } SOCKADDR_IPX;
107 # define NSPROTO_IPX 1000
108 # define NSPROTO_SPX 1256
109 # define NSPROTO_SPXII 1257
110 #endif // #ifdef GCC
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */