Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-28 08:27:11

0001 // Licensed to the Apache Software Foundation (ASF) under one
0002 // or more contributor license agreements.  See the NOTICE file
0003 // distributed with this work for additional information
0004 // regarding copyright ownership.  The ASF licenses this file
0005 // to you under the Apache License, Version 2.0 (the
0006 // "License"); you may not use this file except in compliance
0007 // with the License.  You may obtain a copy of the License at
0008 //
0009 //   http://www.apache.org/licenses/LICENSE-2.0
0010 //
0011 // Unless required by applicable law or agreed to in writing,
0012 // software distributed under the License is distributed on an
0013 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
0014 // KIND, either express or implied.  See the License for the
0015 // specific language governing permissions and limitations
0016 // under the License.
0017 
0018 #pragma once
0019 
0020 #if defined(_WIN32) || defined(__CYGWIN__)
0021 // Windows
0022 
0023 #  if defined(_MSC_VER)
0024 #    pragma warning(disable : 4251)
0025 #  else
0026 #    pragma GCC diagnostic ignored "-Wattributes"
0027 #  endif
0028 
0029 #  if defined(__cplusplus) && defined(__GNUC__) && !defined(__clang__)
0030 // Use C++ attribute syntax where possible to avoid GCC parser bug
0031 // (https://stackoverflow.com/questions/57993818/gcc-how-to-combine-attribute-dllexport-and-nodiscard-in-a-struct-de)
0032 #    define ARROW_DLLEXPORT [[gnu::dllexport]]
0033 #    define ARROW_DLLIMPORT [[gnu::dllimport]]
0034 #  else
0035 #    define ARROW_DLLEXPORT __declspec(dllexport)
0036 #    define ARROW_DLLIMPORT __declspec(dllimport)
0037 #  endif
0038 
0039 // _declspec(dllexport) even when the #included by a non-arrow source
0040 #  define ARROW_FORCE_EXPORT ARROW_DLLEXPORT
0041 
0042 #  ifdef ARROW_STATIC
0043 #    define ARROW_EXPORT
0044 #    define ARROW_FRIEND_EXPORT
0045 #    define ARROW_TEMPLATE_EXPORT
0046 #  elif defined(ARROW_EXPORTING)
0047 #    define ARROW_EXPORT ARROW_DLLEXPORT
0048 // For some reason [[gnu::dllexport]] doesn't work well with friend declarations
0049 #    define ARROW_FRIEND_EXPORT __declspec(dllexport)
0050 #    define ARROW_TEMPLATE_EXPORT ARROW_DLLEXPORT
0051 #  else
0052 #    define ARROW_EXPORT ARROW_DLLIMPORT
0053 #    define ARROW_FRIEND_EXPORT __declspec(dllimport)
0054 #    define ARROW_TEMPLATE_EXPORT ARROW_DLLIMPORT
0055 #  endif
0056 
0057 #  define ARROW_NO_EXPORT
0058 
0059 #else
0060 
0061 // Non-Windows
0062 
0063 #  if defined(__cplusplus) && (defined(__GNUC__) || defined(__clang__))
0064 #    ifndef ARROW_EXPORT
0065 #      define ARROW_EXPORT [[gnu::visibility("default")]]
0066 #    endif
0067 #    ifndef ARROW_NO_EXPORT
0068 #      define ARROW_NO_EXPORT [[gnu::visibility("hidden")]]
0069 #    endif
0070 #  else
0071 // Not C++, or not gcc/clang
0072 #    ifndef ARROW_EXPORT
0073 #      define ARROW_EXPORT
0074 #    endif
0075 #    ifndef ARROW_NO_EXPORT
0076 #      define ARROW_NO_EXPORT
0077 #    endif
0078 #  endif
0079 
0080 #  define ARROW_FRIEND_EXPORT
0081 #  define ARROW_TEMPLATE_EXPORT
0082 
0083 // [[gnu::visibility("default")]] even when #included by a non-arrow source
0084 #  define ARROW_FORCE_EXPORT [[gnu::visibility("default")]]
0085 
0086 #endif  // Non-Windows