1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_SAL_CONFIG_H
21 #define INCLUDED_SAL_CONFIG_H
23 #if defined LIBO_INTERNAL_ONLY && defined ANDROID && defined __cplusplus
24 #include <android/compatibility.hxx>
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"
38 #ifndef _USE_MATH_DEFINES
39 #define _USE_MATH_DEFINES // needed by Visual C++ for math constants
42 #endif /* defined _MSC_VER */
44 #endif /* defined _WIN32 */
46 #if defined(__sun) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(AIX) \
47 || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID) || defined(HAIKU)
49 #define SAL_DLLEXTENSION ".so"
50 #define SAL_EXEEXTENSION ""
51 #define SAL_DLLPREFIX "lib"
52 #define SAL_PATHSEPARATOR ':'
53 #define SAL_PATHDELIMITER '/'
54 #define SAL_NEWLINE_STRING "\n"
55 #define SAL_CONFIGFILE(name) name "rc"
60 #define SAL_DLLEXTENSION ".dylib"
61 #define SAL_EXEEXTENSION ""
62 #define SAL_DLLPREFIX "lib"
63 #define SAL_PATHSEPARATOR ':'
64 #define SAL_PATHDELIMITER '/'
65 #define SAL_NEWLINE_STRING "\n"
66 #define SAL_CONFIGFILE(name) name "rc"
71 /* SAL_DLLEXTENSION should not really be used on iOS, as iOS apps are
72 * not allowed to load own dynamic libraries.
74 #define SAL_DLLEXTENSION ".dylib"
75 #define SAL_DLLPREFIX "lib"
76 #define SAL_PATHSEPARATOR ':'
77 #define SAL_PATHDELIMITER '/'
78 #define SAL_NEWLINE_STRING "\n"
79 #define SAL_CONFIGFILE(name) name "rc"
82 /* The following spell is for Solaris and its descendants.
83 * See the "Solaris" section of
84 * <http://sourceforge.net/p/predef/wiki/OperatingSystems/>, and
85 * <http://stackoverflow.com/questions/16618604/solaris-and-preprocessor-macros>.
93 #if __has_warning("-Wpotentially-evaluated-expression")
94 #pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression"
96 // Before fixing occurrences of this warning, lets see whether C++20 will still change to obsolete
98 // <https://github.com/llvm/llvm-project/commit/974c8b7e2fde550fd87850d50695341101c38c2d> "[c++20]
99 // Add rewriting from comparison operators to <=> / =="):
100 #if __has_warning("-Wambiguous-reversed-operator")
101 #pragma GCC diagnostic ignored "-Wambiguous-reversed-operator"
105 #endif // INCLUDED_SAL_CONFIG_H
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */