HBASE-23323 Update downloads page for Apache HBase 1.4.12. (#886)
[hbase.git] / hbase-native-client / src / core / hbase_macros.h
blob71765c8265990971306f3cc1d0a416ce395468a2
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef CORE_HBASE_MACROS_H_
21 #define CORE_HBASE_MACROS_H_
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 /**
28 * The following code block define API as the tag for exported
29 * functions. The library should be compiled with symbols visibility
30 * set to hidden by default and only the exported functions should be
31 * tagged as HBASE_API.
33 * When building the library on Windows, compile with compiler flag
34 * "-D_LIBHBASE_IMPLEMENTATION_", whereas when linking application with
35 * this library, this compiler flag should not be used.
37 #if defined _WIN32 || defined __CYGWIN__
38 #ifdef _LIBHBASE_IMPLEMENTATION_
39 #define API __declspec(dllexport)
40 #else
41 #ifdef _LIBHBASE_TEST_
42 #define HBASE_API
43 #else
44 #define HBASE_API __declspec(dllimport)
45 #endif
46 #endif
47 #else
48 #if __GNUC__ >= 4
49 #define HBASE_API __attribute__ ((visibility ("default")))
50 #else
51 #define HBASE_API
52 #endif
53 #endif
55 #ifdef __cplusplus
56 } // extern "C"
57 #endif // __cplusplus
59 #endif // CORE_HBASE_MACROS_H_