blob: 47f991739e39f826cb5fdcd2216f41ef4ed5eb1c [file] [log] [blame]
Wim Taymansfa338112002-11-29 19:08:47 +00001/* 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üller666c8c12012-11-03 20:44:48 +000016 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
Wim Taymansfa338112002-11-29 19:08:47 +000018 */
Wim Taymansfa338112002-11-29 19:08:47 +000019#ifndef __GST_MACROS_H__
20#define __GST_MACROS_H__
21
David Schleef6467bbc2003-07-18 20:51:02 +000022G_BEGIN_DECLS
Johan Dahlinecd88e32004-03-15 14:43:35 +000023
Wim Taymans132bab12002-12-31 03:21:08 +000024#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
25# define GST_GNUC_CONSTRUCTOR \
Stefan Kost2ed824b2005-09-20 10:41:03 +000026 __attribute__ ((constructor))
Johan Dahlinecd88e32004-03-15 14:43:35 +000027#else /* !__GNUC__ */
Wim Taymans132bab12002-12-31 03:21:08 +000028# define GST_GNUC_CONSTRUCTOR
Wim Taymansfa338112002-11-29 19:08:47 +000029#endif /* !__GNUC__ */
Johan Dahlinecd88e32004-03-15 14:43:35 +000030
Wim Taymans132bab12002-12-31 03:21:08 +000031#if defined (__GNUC__) && !defined (GST_IMPLEMENT_INLINES)
32# define GST_INLINE_FUNC extern __inline__
33# define GST_CAN_INLINE 1
David Schleefa2a974b2004-04-28 23:26:06 +000034#elif defined(_MSC_VER)
35# define GST_INLINE_FUNC extern __inline
36# define GST_CAN_INLINE 1
Wim Taymans132bab12002-12-31 03:21:08 +000037#else
Thomas Vander Stichele2dd15982005-10-15 15:30:24 +000038# define GST_INLINE_FUNC extern
Wim Taymans132bab12002-12-31 03:21:08 +000039# undef GST_CAN_INLINE
40#endif
Johan Dahlinecd88e32004-03-15 14:43:35 +000041
Sebastian Drögea797b9f2010-10-19 15:52:30 +020042#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 Dahlinecd88e32004-03-15 14:43:35 +000050G_END_DECLS
51
Wim Taymansfa338112002-11-29 19:08:47 +000052#endif /* __GST_MACROS_H__ */
Johan Dahlinecd88e32004-03-15 14:43:35 +000053
54