Wim Taymans | fa33811 | 2002-11-29 19:08:47 +0000 | [diff] [blame] | 1 | /* GStreamer |
| 2 | * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Library General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Library General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Library General Public |
| 15 | * License along with this library; if not, write to the |
Tim-Philipp Müller | 666c8c1 | 2012-11-03 20:44:48 +0000 | [diff] [blame] | 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 17 | * Boston, MA 02110-1301, USA. |
Wim Taymans | fa33811 | 2002-11-29 19:08:47 +0000 | [diff] [blame] | 18 | */ |
Wim Taymans | fa33811 | 2002-11-29 19:08:47 +0000 | [diff] [blame] | 19 | #ifndef __GST_MACROS_H__ |
| 20 | #define __GST_MACROS_H__ |
| 21 | |
David Schleef | 6467bbc | 2003-07-18 20:51:02 +0000 | [diff] [blame] | 22 | G_BEGIN_DECLS |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 23 | |
Wim Taymans | 132bab1 | 2002-12-31 03:21:08 +0000 | [diff] [blame] | 24 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) |
| 25 | # define GST_GNUC_CONSTRUCTOR \ |
Stefan Kost | 2ed824b | 2005-09-20 10:41:03 +0000 | [diff] [blame] | 26 | __attribute__ ((constructor)) |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 27 | #else /* !__GNUC__ */ |
Wim Taymans | 132bab1 | 2002-12-31 03:21:08 +0000 | [diff] [blame] | 28 | # define GST_GNUC_CONSTRUCTOR |
Wim Taymans | fa33811 | 2002-11-29 19:08:47 +0000 | [diff] [blame] | 29 | #endif /* !__GNUC__ */ |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 30 | |
Wim Taymans | 132bab1 | 2002-12-31 03:21:08 +0000 | [diff] [blame] | 31 | #if defined (__GNUC__) && !defined (GST_IMPLEMENT_INLINES) |
| 32 | # define GST_INLINE_FUNC extern __inline__ |
| 33 | # define GST_CAN_INLINE 1 |
David Schleef | a2a974b | 2004-04-28 23:26:06 +0000 | [diff] [blame] | 34 | #elif defined(_MSC_VER) |
| 35 | # define GST_INLINE_FUNC extern __inline |
| 36 | # define GST_CAN_INLINE 1 |
Wim Taymans | 132bab1 | 2002-12-31 03:21:08 +0000 | [diff] [blame] | 37 | #else |
Thomas Vander Stichele | 2dd1598 | 2005-10-15 15:30:24 +0000 | [diff] [blame] | 38 | # define GST_INLINE_FUNC extern |
Wim Taymans | 132bab1 | 2002-12-31 03:21:08 +0000 | [diff] [blame] | 39 | # undef GST_CAN_INLINE |
| 40 | #endif |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 41 | |
Sebastian Dröge | a797b9f | 2010-10-19 15:52:30 +0200 | [diff] [blame] | 42 | #if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict) |
| 43 | # if defined(__GNUC__) && __GNUC__ >= 4 |
| 44 | # define restrict __restrict__ |
| 45 | # else |
| 46 | # define restrict |
| 47 | # endif |
| 48 | #endif |
| 49 | |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 50 | G_END_DECLS |
| 51 | |
Wim Taymans | fa33811 | 2002-11-29 19:08:47 +0000 | [diff] [blame] | 52 | #endif /* __GST_MACROS_H__ */ |
Johan Dahlin | ecd88e3 | 2004-03-15 14:43:35 +0000 | [diff] [blame] | 53 | |
| 54 | |