Bump version to 4.1-6
[LibreOffice.git] / sal / osl / w32 / system.h
blobd74a587b853a16629739ed437c6f0e544ec4aa38
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #if OSL_DEBUG_LEVEL <= 3
21 # define NO_DEBUG_CRT
22 #endif
24 #ifndef _WIN32_WINNT
25 # define _WIN32_WINNT 0x0400
26 # define _CTYPE_DISABLE_MACROS /* wg. dynamischer C-Runtime MH */
27 #endif
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <stdarg.h>
32 #include <ctype.h>
33 #include <malloc.h>
34 #include <limits.h>
35 #include <process.h>
36 #include <time.h>
37 #include <fcntl.h>
38 #include <sys/types.h>
39 #include <sys/stat.h>
40 #include <io.h>
41 #include <share.h>
42 #include <direct.h>
44 /* Must define this else build breaks because Winsock2.h
45 includes Windows.h and without WIN32_LEAN_AND_MEAN
46 also includes mswsock.h which needs a forward typedef
47 of SOCKET ...
49 #define WIN32_LEAN_AND_MEAN
51 #ifdef __GNUC__
52 // windows.h includes winsock2.h
53 // if _WIN32_WINNT > 0x0400
54 // so someone cannot include winsock.h
55 // at the same time without patching
56 // windows.h
57 #include <windows.h>
58 #include <winsock2.h>
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 #include <ws2tcpip.h>
63 #ifdef __cplusplus
65 #endif
66 #include <shlobj.h>
67 #ifndef NO_DEBUG_CRT
68 #include <crtdbg.h>
69 #endif
70 #else
71 // winsock2.h includes windows.h
72 #pragma warning(push,1) /* disable warnings within system headers */
73 #pragma warning(disable:4917)
74 #include <winsock2.h>
75 #include <wsipx.h>
76 #include <shlobj.h>
77 #ifndef NO_DEBUG_CRT
78 #include <crtdbg.h>
79 #endif
80 #pragma warning(pop)
81 #endif
83 #ifdef __GNUC__
84 # ifndef SA_FAMILY_DECL
85 # define SA_FAMILY_DECL short sa_family
86 # endif
88 typedef struct sockaddr_ipx {
89 SA_FAMILY_DECL;
90 char sa_netnum[4];
91 char sa_nodenum[6];
92 unsigned short sa_socket;
93 } SOCKADDR_IPX;
95 # define NSPROTO_IPX 1000
96 # define NSPROTO_SPX 1256
97 # define NSPROTO_SPXII 1257
98 #endif // #ifdef __GNUC__
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */