merge the formfield patch from ooo-build
[ooovba.git] / cppu / inc / uno / lbnames.h
blob4b2eb94c037ced7dac58d9eea2819404acbdda16
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lbnames.h,v $
10 * $Revision: 1.22 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNO_LBNAMES_H_
31 #define _UNO_LBNAMES_H_
33 #ifdef __cplusplus
35 /* environment type names for supported compilers */
36 #if defined (_MSC_VER)
37 #if (_MSC_VER < 1000)
38 #error "ms visual c++ version must be at least 4.2"
39 #elif (_MSC_VER < 1100) // MSVC 4.x
40 #pragma warning( disable: 4290 )
41 #define TMP_CPPU_ENV msci
42 #elif (_MSC_VER < 1600) // MSVC 5-9
43 #define TMP_CPPU_ENV msci
44 #else
45 #error "ms visual c++ version must be between 4.2 and 9.x"
46 #endif /* (_MSC_VER < 1000) */
47 /* sunpro cc */
48 #elif defined (__SUNPRO_CC)
49 #if ((__SUNPRO_CC >= 0x5000 && __SUNPRO_CC < 0x6000) || (__SUNPRO_CC >= 0x500 && __SUNPRO_CC < 0x600))
50 #define TMP_CPPU_ENV sunpro5
51 #elif
52 #error "sunpro cc version must be 5.x"
53 provoking error here, because PP ignores #error
54 #endif /* defined (__SUNPRO_CC) */
55 /* g++ 2.x, 3.0 */
56 #elif defined (__GNUC__)
57 #if (__GNUC__ == 2 && __GNUC_MINOR__ == 91)
58 #define TMP_CPPU_ENV gcc2
59 #elif (__GNUC__ == 2 && __GNUC_MINOR__ == 95)
60 #define TMP_CPPU_ENV gcc2
61 #elif (__GNUC__ == 2)
62 #error "Tested gcc 2 versions are 2.91 and 2.95. Patch uno/lbnames.h to try your gcc 2 version."
63 #elif (__GNUC__ == 3 && __GNUC_MINOR__ <= 4)
64 #define __CPPU_ENV gcc3
65 #elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)
66 #define __CPPU_ENV gcc3
67 #elif (__GNUC__ == 3)
68 #error "Tested gcc 3 version is <= 3.4. Patch uno/lbnames.h to try your gcc 3 version."
69 #else
70 #error "Supported gcc majors are 2 , 3 and 4 <= 4.4. Unsupported gcc major version."
71 #endif /* defined (__GNUC__) */
72 #endif /* defined (_MSC_VER) */
74 #if (! defined (CPPU_ENV) && defined (TMP_CPPU_ENV))
75 #define CPPU_ENV TMP_CPPU_ENV
76 #endif
78 #ifdef CPPU_ENV
80 #define CPPU_STRINGIFY_EX( x ) #x
81 #define CPPU_STRINGIFY( x ) CPPU_STRINGIFY_EX( x )
83 /** Name for C++ compiler/ platform, e.g. "gcc3", "msci" */
84 #define CPPU_CURRENT_LANGUAGE_BINDING_NAME CPPU_STRINGIFY( CPPU_ENV )
86 #else
88 #error "No supported C++ compiler environment."
89 provoking error here, because PP ignores #error
91 #endif /* CPPU_ENV */
93 #undef TMP_CPPU_ENV
95 #endif /* __cplusplus */
97 /** Environment type name for binary C UNO. */
98 #define UNO_LB_UNO "uno"
99 /** Environment type name for ANSI C compilers. */
100 #define UNO_LB_C "c"
101 /** Environment type name for Java 1.3.1 compatible virtual machine. */
102 #define UNO_LB_JAVA "java"
103 /** Environment type name for CLI (Common Language Infrastructure). */
104 #define UNO_LB_CLI "cli"
106 #endif