• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

ink_apidefs.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   A brief file description
00004 
00005   @section license License
00006 
00007   Licensed to the Apache Software Foundation (ASF) under one
00008   or more contributor license agreements.  See the NOTICE file
00009   distributed with this work for additional information
00010   regarding copyright ownership.  The ASF licenses this file
00011   to you under the Apache License, Version 2.0 (the
00012   "License"); you may not use this file except in compliance
00013   with the License.  You may obtain a copy of the License at
00014 
00015       http://www.apache.org/licenses/LICENSE-2.0
00016 
00017   Unless required by applicable law or agreed to in writing, software
00018   distributed under the License is distributed on an "AS IS" BASIS,
00019   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00020   See the License for the specific language governing permissions and
00021   limitations under the License.
00022  */
00023 
00024 #ifndef _ink_apidefs_h_
00025 #define _ink_apidefs_h_
00026 
00027 #define inkliapi
00028 #define inkcoreapi
00029 #define ink_undoc_liapi
00030 #define ink_undoc_coreapi inkcoreapi
00031 
00032 #if defined(__GNUC__) || defined(__clang__)
00033 #ifndef likely
00034 #define likely(x)       __builtin_expect (!!(x), 1)
00035 #endif
00036 #ifndef unlikely
00037 #define unlikely(x)     __builtin_expect (!!(x), 0)
00038 #endif
00039 #else
00040 #ifndef likely
00041 #define likely(x)       (x)
00042 #endif
00043 #ifndef unlikely
00044 #define unlikely(x)     (x)
00045 #endif
00046 #endif
00047 
00048 #if !defined(TS_NORETURN)
00049 #if defined(__GNUC__) || defined(__clang__)
00050 #define TS_NORETURN __attribute__((noreturn))
00051 #else
00052 #define TS_NORETURN
00053 #endif
00054 #endif
00055 
00056 /*  Enable this to get printf() style warnings on the Inktomi functions. */
00057 /* #define PRINTFLIKE(IDX, FIRST)  __attribute__((format (printf, IDX, FIRST))) */
00058 #if !defined(TS_PRINTFLIKE)
00059 #if defined(__GNUC__) || defined(__clang__)
00060 #define TS_PRINTFLIKE(fmt, arg) __attribute__((format(printf, fmt, arg)))
00061 #else
00062 #define TS_PRINTFLIKE(fmt, arg)
00063 #endif
00064 #endif
00065 
00066 #if !defined(TS_NONNULL)
00067 #if defined(__GNUC__) || defined(__clang__)
00068 #define TS_NONNULL(...) __attribute__((nonnull (__VA_ARGS__)))
00069 #else
00070 #define TS_NONNULL(...)
00071 #endif
00072 #endif
00073 
00074 #if !defined(TS_INLINE)
00075 #define TS_INLINE inline
00076 #endif
00077 
00078 #endif

Generated by  doxygen 1.7.1