LibreOffice
LibreOffice 4.3 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
24 #include "config_global.h"
25 #endif
26 
27 #include <stdlib.h>
28 
29 #ifdef WIN32
30 #define SAL_W32
31 #define SAL_DLLEXTENSION ".dll"
32 #define SAL_PATHSEPARATOR ';'
33 #define SAL_PATHDELIMITER '\\'
34 #define SAL_NEWLINE_STRING "\r\n"
35 #define SAL_CONFIGFILE( name ) name ".ini"
36 
37 #ifdef _MSC_VER
38 
39 #ifndef _USE_MATH_DEFINES
40 #define _USE_MATH_DEFINES // needed by Visual C++ for math constants
41 #endif
42 
43 #endif /* defined _MSC_VER */
44 
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
52 
53 #endif /* defined WIN32 */
54 
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_PATHSEPARATOR ':'
61 #define SAL_PATHDELIMITER '/'
62 #define SAL_NEWLINE_STRING "\n"
63 #define SAL_CONFIGFILE( name ) name "rc"
64 #endif
65 
66 #ifdef MACOSX
67 #define SAL_UNX
68 #define SAL_DLLEXTENSION ".dylib"
69 #define SAL_DLLPREFIX "lib"
70 #define SAL_PATHSEPARATOR ':'
71 #define SAL_PATHDELIMITER '/'
72 #define SAL_NEWLINE_STRING "\n"
73 #define SAL_CONFIGFILE( name ) name "rc"
74 #endif
75 
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.
80  */
81 #define SAL_DLLEXTENSION ".dylib"
82 #define SAL_DLLPREFIX "lib"
83 #define SAL_PATHSEPARATOR ':'
84 #define SAL_PATHDELIMITER '/'
85 #define SAL_NEWLINE_STRING "\n"
86 #define SAL_CONFIGFILE( name ) name "rc"
87 #endif
88 
89 #ifdef sun
90 #undef sun
91 #define sun sun
92 #endif
93 
94 #endif // INCLUDED_SAL_CONFIG_H
95 
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */