• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2019 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 // Copyright 2014 Google Inc. All Rights Reserved.
16 // Author: csyoung@google.com (C. Sean Young)
17 
18 #ifndef ICING_LEGACY_CORE_ICING_COMPAT_H_
19 #define ICING_LEGACY_CORE_ICING_COMPAT_H_
20 
21 #ifdef __APPLE__
22 // iOS does not allow dlopen/dlclose/dlsym.
23 #define ICING_ALLOW_DYNAMIC_EXTENSIONS 0
24 // Xcode 6.3/LLVM 3.6 removed std::hash specialization for std::basic_string,
25 // so we need the versions from util/hash/hash.h. The implementations in
26 // util/hash/* have added an AVOID_TRADE_SECRET_CODE macro that's defined on
27 // Apple (and some other client targets) to prevent leaking proprietary hash
28 // code.
29 #else
30 #define ICING_ALLOW_DYNAMIC_EXTENSIONS 1
31 #endif  // __APPLE__
32 
33 #endif  // ICING_LEGACY_CORE_ICING_COMPAT_H_
34