| 1 | /******************************************************************************* |
| 2 | * Copyright 2016-2018 Intel Corporation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | *******************************************************************************/ |
| 16 | |
| 17 | #ifndef Z_MAGIC_HPP |
| 18 | #define Z_MAGIC_HPP |
| 19 | |
| 20 | #define CHAIn2(a,b) a b |
| 21 | #define CHAIN2(a,b) CHAIn2(a,b) |
| 22 | |
| 23 | #define CONCAt2(a,b) a ## b |
| 24 | #define CONCAT2(a,b) CONCAt2(a,b) |
| 25 | |
| 26 | #define STRINGIFy(s) #s |
| 27 | #define STRINGIFY(s) STRINGIFy(s) |
| 28 | |
| 29 | #ifdef _MSC_VER |
| 30 | # define PRAGMA_MACRo(x) __pragma(x) |
| 31 | # define PRAGMA_MACRO(x) PRAGMA_MACRo(x) |
| 32 | #else |
| 33 | # define PRAGMA_MACRo(x) _Pragma(#x) |
| 34 | # define PRAGMA_MACRO(x) PRAGMA_MACRo(x) |
| 35 | #endif |
| 36 | |
| 37 | #define UNUSED(x) ((void)x) |
| 38 | #define MAYBE_UNUSED(x) UNUSED(x) |
| 39 | |
| 40 | #if defined(_WIN32) && !defined(__GNUC__) |
| 41 | #define __PRETTY_FUNCTION__ __FUNCSIG__ |
| 42 | #endif |
| 43 | |
| 44 | #endif |
| 45 | |
| 46 | // vim: et ts=4 sw=4 cindent cino^=l0,\:0,N-s |
| 47 | |