update credits
[LibreOffice.git] / include / sal / config.h
blobee230fe49d69530fb2fde1a5091a065899504cc5
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 #ifndef _SAL_CONFIG_H_
21 #define _SAL_CONFIG_H_
23 #if defined LIBO_INTERNAL_ONLY
24 #include "config_global.h"
25 #endif
27 #include <stdlib.h>
29 #ifdef WIN32
30 #define SAL_W32
31 #define SAL_DLLEXTENSION ".dll"
32 #define SAL_PRGEXTENSION ".exe"
33 #define SAL_PATHSEPARATOR ';'
34 #define SAL_PATHDELIMITER '\\'
35 #define SAL_CONFIGFILE( name ) name ".ini"
37 #ifdef _MSC_VER
39 #ifndef _USE_MATH_DEFINES
40 #define _USE_MATH_DEFINES // needed by Visual C++ for math constants
41 #endif
43 #endif /* defined _MSC_VER */
45 /* Provide ISO C99 compatible versions of snprint and vsnprintf */
46 #ifdef __MINGW32__
47 #define _SNPRINTF_DLLIMPORT
48 #endif
49 #ifndef _SNPRINTF_H
50 #include <systools/win32/snprintf.h>
51 #endif
53 #endif /* defined WIN32 */
55 #if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \
56 defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID)
57 #define SAL_UNX
58 #define SAL_DLLEXTENSION ".so"
59 #define SAL_DLLPREFIX "lib"
60 #define SAL_PRGEXTENSION ".bin"
61 #define SAL_PATHSEPARATOR ':'
62 #define SAL_PATHDELIMITER '/'
63 #define SAL_CONFIGFILE( name ) name "rc"
64 #endif
66 #ifdef MACOSX
67 #define SAL_UNX
68 #define SAL_DLLEXTENSION ".dylib"
69 #define SAL_DLLPREFIX "lib"
70 #define SAL_PRGEXTENSION ".bin"
71 #define SAL_PATHSEPARATOR ':'
72 #define SAL_PATHDELIMITER '/'
73 #define SAL_CONFIGFILE( name ) name "rc"
74 #endif
76 #ifdef IOS
77 #define SAL_UNX
78 /* SAL_DLLEXTENSION should not really be used on iOS, as iOS apps are
79 * not allowed to load own dynamic libraries.
81 #define SAL_DLLEXTENSION ".dylib"
82 #define SAL_DLLPREFIX "lib"
83 /* This is fairly pointless too, an iOS app consists of a single
84 * executable (plus data files).
86 #define SAL_PRGEXTENSION ".bin"
87 #define SAL_PATHSEPARATOR ':'
88 #define SAL_PATHDELIMITER '/'
89 #define SAL_CONFIGFILE( name ) name "rc"
90 #endif
92 #ifdef sun
93 #undef sun
94 #define sun sun
95 #endif
97 #endif /*_SAL_CONFIG_H_ */
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */