Moved helper macro to a discrete include file.
To help reduce code duplication and also 'kitchen-sink' includes the ARRAY_LENGTH macro was moved to a stand-alone file and referenced from the sources consuming it. Other macros will be added in subsequent passes. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
4678bab13c
commit
35b2eaa989
@@ -46,6 +46,7 @@
|
||||
#include <gbm.h>
|
||||
#include <libudev.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "libbacklight.h"
|
||||
#include "compositor.h"
|
||||
#include "gl-renderer.h"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <libudev.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "compositor.h"
|
||||
#include "launcher-util.h"
|
||||
#include "pixman-renderer.h"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "compositor.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "presentation_timing-server-protocol.h"
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
#include <winpr/input.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "compositor.h"
|
||||
#include "pixman-renderer.h"
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
# include "rpi-bcm-stubs.h"
|
||||
#endif
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "compositor.h"
|
||||
#include "rpi-renderer.h"
|
||||
#include "launcher-util.h"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "compositor.h"
|
||||
#include "gl-renderer.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/image-loader.h"
|
||||
#include "shared/os-compatibility.h"
|
||||
#include "shared/cairo-util.h"
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "gl-renderer.h"
|
||||
#include "pixman-renderer.h"
|
||||
#include "shared/config-parser.h"
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/image-loader.h"
|
||||
#include "presentation_timing-server-protocol.h"
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "compositor.h"
|
||||
#include "scaler-server-protocol.h"
|
||||
#include "presentation_timing-server-protocol.h"
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/os-compatibility.h"
|
||||
#include "git-version.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -49,8 +49,6 @@ extern "C" {
|
||||
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
#define container_of(ptr, type, member) ({ \
|
||||
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
|
||||
(type *)( (char *)__mptr - offsetof(type,member) );})
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "gl-renderer.h"
|
||||
#include "vertex-clipping.h"
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "weston-egl-ext.h"
|
||||
|
||||
struct gl_shader {
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "shared/os-compatibility.h"
|
||||
#include "compositor.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user