From 7bf7acb6d60e16e9eaa208761d019c39da396fc0 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 16 Jun 2013 02:57:00 +0300 Subject: [PATCH] allow multi-include on some headers --- gl.h | 5 +++++ linux/xenv.h | 3 +++ menu.h | 5 +++++ posix.h | 5 ++++- readpng.h | 5 +++++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gl.h b/gl.h index f87afb0..cb48071 100644 --- a/gl.h +++ b/gl.h @@ -1,3 +1,6 @@ +#ifndef LIBPICOFE_GL_H +#define LIBPICOFE_GL_H + #ifdef HAVE_GLES int gl_init(void *display, void *window, int *quirks); @@ -28,3 +31,5 @@ static __inline void gl_finish(void) #endif #define GL_QUIRK_ACTIVATE_RECREATE 1 + +#endif // LIBPICOFE_GL_H diff --git a/linux/xenv.h b/linux/xenv.h index 6abda19..ae76f7d 100644 --- a/linux/xenv.h +++ b/linux/xenv.h @@ -1,3 +1,5 @@ +#ifndef LIBPICOFE_XENV_H +#define LIBPICOFE_XENV_H #define XENV_CAP_KEYS (1<<0) #define XENV_CAP_MOUSE (1<<1) @@ -16,3 +18,4 @@ int xenv_update(int (*key_cb)(void *cb_arg, int kc, int is_pressed), int xenv_minimize(void); void xenv_finish(void); +#endif // LIBPICOFE_XENV_H diff --git a/menu.h b/menu.h index 07aee2a..dfeccce 100644 --- a/menu.h +++ b/menu.h @@ -8,6 +8,9 @@ * See the COPYING file in the top-level directory. */ +#ifndef LIBPICOFE_MENU_H +#define LIBPICOFE_MENU_H + typedef enum { MB_NONE = 1, /* no auto processing */ @@ -123,3 +126,5 @@ void text_out16(int x, int y, const char *texto, ...); menu_entry *me_list_get_first(void); menu_entry *me_list_get_next(void); + +#endif // LIBPICOFE_MENU_H diff --git a/posix.h b/posix.h index 33ca96c..35f4d28 100644 --- a/posix.h +++ b/posix.h @@ -1,3 +1,6 @@ +#ifndef LIBPICOFE_POSIX_H +#define LIBPICOFE_POSIX_H + /* define POSIX stuff: dirent, scandir, getcwd, mkdir */ #if defined(__linux__) || defined(__MINGW32__) @@ -20,4 +23,4 @@ #endif - +#endif // LIBPICOFE_POSIX_H diff --git a/readpng.h b/readpng.h index 924b341..4bb7ba7 100644 --- a/readpng.h +++ b/readpng.h @@ -1,3 +1,6 @@ +#ifndef LIBPICOFE_READPNG_H +#define LIBPICOFE_READPNG_H + typedef enum { READPNG_BG = 1, @@ -17,3 +20,5 @@ int writepng(const char *fname, unsigned short *src, int w, int h); #ifdef __cplusplus } #endif + +#endif // LIBPICOFE_READPNG_H -- 2.39.5