LibreOffice
LibreOffice 6.2 SDK C/C++ API Reference
config.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SAL_CONFIG_H
21 #define INCLUDED_SAL_CONFIG_H
22 
23 #if defined LIBO_INTERNAL_ONLY && defined ANDROID && defined __cplusplus
24 #include <android/compatibility.hxx>
25 #endif
26 
27 #ifdef _WIN32
28 #define SAL_W32
29 #define SAL_DLLEXTENSION ".dll"
30 #define SAL_EXEEXTENSION ".exe"
31 #define SAL_PATHSEPARATOR ';'
32 #define SAL_PATHDELIMITER '\\'
33 #define SAL_NEWLINE_STRING "\r\n"
34 #define SAL_CONFIGFILE( name ) name ".ini"
35 
36 #ifdef _MSC_VER
37 
38 #ifndef _USE_MATH_DEFINES
39 #define _USE_MATH_DEFINES // needed by Visual C++ for math constants
40 #endif
41 
42 #endif /* defined _MSC_VER */
43 
44 #endif /* defined WIN32 */
45 
46 #if defined(__sun) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \
47  defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID) || \
48  defined(HAIKU)
49 #define SAL_UNX
50 #define SAL_DLLEXTENSION ".so"
51 #define SAL_EXEEXTENSION ""
52 #define SAL_DLLPREFIX "lib"
53 #define SAL_PATHSEPARATOR ':'
54 #define SAL_PATHDELIMITER '/'
55 #define SAL_NEWLINE_STRING "\n"
56 #define SAL_CONFIGFILE( name ) name "rc"
57 #endif
58 
59 #ifdef MACOSX
60 #define SAL_UNX
61 #define SAL_DLLEXTENSION ".dylib"
62 #define SAL_EXEEXTENSION ""
63 #define SAL_DLLPREFIX "lib"
64 #define SAL_PATHSEPARATOR ':'
65 #define SAL_PATHDELIMITER '/'
66 #define SAL_NEWLINE_STRING "\n"
67 #define SAL_CONFIGFILE( name ) name "rc"
68 #endif
69 
70 #ifdef IOS
71 #define SAL_UNX
72 /* SAL_DLLEXTENSION should not really be used on iOS, as iOS apps are
73  * not allowed to load own dynamic libraries.
74  */
75 #define SAL_DLLEXTENSION ".dylib"
76 #define SAL_DLLPREFIX "lib"
77 #define SAL_PATHSEPARATOR ':'
78 #define SAL_PATHDELIMITER '/'
79 #define SAL_NEWLINE_STRING "\n"
80 #define SAL_CONFIGFILE( name ) name "rc"
81 #endif
82 
83 /* The following spell is for Solaris and its descendants.
84  * See the "Solaris" section of
85  * <http://sourceforge.net/p/predef/wiki/OperatingSystems/>, and
86  * <http://stackoverflow.com/questions/16618604/solaris-and-preprocessor-macros>.
87  */
88 #ifdef sun
89 #undef sun
90 #define sun sun
91 #endif
92 
93 #if defined __clang__
94 #if __has_warning("-Wpotentially-evaluated-expression")
95 #pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression"
96 #endif
97 #endif
98 
99 #endif // INCLUDED_SAL_CONFIG_H
100 
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */