diff options
author | Petri Latvala <petri.latvala@intel.com> | 2017-09-29 13:51:59 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2017-10-03 12:55:32 +0300 |
commit | 08a2f887b26c89cfb1e1b5715a23d561b75e0dab (patch) | |
tree | 43baf8d21ed67b8fa69d848a0eff15fb2fde504b /lib/igt_rc.h | |
parent | 0c7e50650d0c9fa1e04b1140e065ae2cf800bd1f (diff) |
lib: Reduce dependency on glib
In commit ebd6eb69f57b ("Make igtrc configuration common, with
configurable suspend/resume delay") .igtrc handling was moved to
igt_core from igt_chamelium. That made everything in IGT depend on
GLIB by accident.
In short, igt_core.h declared a variable of type GKeyFile*, requiring
glib.h. Everything that tried to #include igt_core.h required glib.h
to be available, by use of GLIB_CFLAGS. This "worked" so far because
CAIRO_CFLAGS contained GLIB_CFLAGS.
As the variable is only used by other stuff in lib/, stuff it in its
own header file to leave igt_core.h without a dependency to glib.h.
Also add a couple of missing #ifdef HAVE_GLIBs around.
Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_rc.h')
-rw-r--r-- | lib/igt_rc.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/igt_rc.h b/lib/igt_rc.h new file mode 100644 index 00000000..d7a314c5 --- /dev/null +++ b/lib/igt_rc.h @@ -0,0 +1,34 @@ +/* + * Copyright © 2017 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + + +#ifndef IGT_RC_H +#define IGT_RC_H + +#ifdef HAVE_GLIB +#include <glib.h> + +extern GKeyFile *igt_key_file; + +#endif /* HAVE_GLIB */ +#endif /* IGT_RC_H */ |