1f71742dfSmrg/*
2f71742dfSmrg * Copyright 2017  Emmanuele Bassi
3f71742dfSmrg *
4f71742dfSmrg * Permission is hereby granted, free of charge, to any person obtaining a
5f71742dfSmrg * copy of this software and associated documentation files (the "Software"),
6f71742dfSmrg * to deal in the Software without restriction, including without limitation
7f71742dfSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8f71742dfSmrg * and/or sell copies of the Software, and to permit persons to whom the
9f71742dfSmrg * Software is furnished to do so, subject to the following conditions:
10f71742dfSmrg *
11f71742dfSmrg * The above copyright notice and this permission notice (including the next
12f71742dfSmrg * paragraph) shall be included in all copies or substantial portions of the
13f71742dfSmrg * Software.
14f71742dfSmrg *
15f71742dfSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16f71742dfSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17f71742dfSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18f71742dfSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19f71742dfSmrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20f71742dfSmrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21f71742dfSmrg * IN THE SOFTWARE.
22f71742dfSmrg */
23f71742dfSmrg
24f71742dfSmrg/** @file common.h
25f71742dfSmrg *
26f71742dfSmrg * A common header file, used to define macros and shared symbols.
27f71742dfSmrg */
28f71742dfSmrg
29f71742dfSmrg#ifndef EPOXY_COMMON_H
30f71742dfSmrg#define EPOXY_COMMON_H
31f71742dfSmrg
32f71742dfSmrg#ifdef __cplusplus
33f71742dfSmrg# define EPOXY_BEGIN_DECLS      extern "C" {
34f71742dfSmrg# define EPOXY_END_DECLS        }
35f71742dfSmrg#else
36f71742dfSmrg# define EPOXY_BEGIN_DECLS
37f71742dfSmrg# define EPOXY_END_DECLS
38f71742dfSmrg#endif
39f71742dfSmrg
40f71742dfSmrg#ifndef EPOXY_PUBLIC
41f71742dfSmrg# if defined(_MSC_VER)
42f71742dfSmrg#  define EPOXY_PUBLIC __declspec(dllimport) extern
43f71742dfSmrg# else
44f71742dfSmrg#  define EPOXY_PUBLIC extern
45f71742dfSmrg# endif
46f71742dfSmrg#endif
47f71742dfSmrg
48f71742dfSmrg#if defined(_MSC_VER) && !defined(__bool_true_false_are_defined) && (_MSC_VER < 1800)
49f71742dfSmrgtypedef unsigned char bool;
50f71742dfSmrg# define false 0
51f71742dfSmrg# define true 1
52f71742dfSmrg#else
53f71742dfSmrg# include <stdbool.h>
54f71742dfSmrg#endif
55f71742dfSmrg
56ca86eba8SmrgEPOXY_BEGIN_DECLS
57ca86eba8Smrg
58ca86eba8SmrgEPOXY_PUBLIC bool epoxy_extension_in_string(const char *extension_list,
59ca86eba8Smrg                                            const char *ext);
60ca86eba8Smrg
61ca86eba8SmrgEPOXY_END_DECLS
62ca86eba8Smrg
63f71742dfSmrg#endif /* EPOXY_COMMON_H */
64