From 56a77e68fb91eef928d8a95c50ae14508e37ae0f Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 22 Dec 2010 18:29:00 +0100 Subject: Introduce a stable ABI The current mtdev is not ABI stable, and the upcoming additions to the kernel api will break ABI. This patch starts the process of keeping binary compatibility with old programs, by moving the abi-specific parts under a special flag, MTDEV_NO_LEGACY_API, and makes sure the internal parts compiles with MTDEV_NO_LEGACY_API set. This way, older programs will still work, old programs will still compile, and new programs will be able to use the additions. Signed-off-by: Henrik Rydberg --- include/mtdev-mapping.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/mtdev-mapping.h') diff --git a/include/mtdev-mapping.h b/include/mtdev-mapping.h index 0e47970..0cdb39d 100644 --- a/include/mtdev-mapping.h +++ b/include/mtdev-mapping.h @@ -37,6 +37,8 @@ extern "C" { #include +#ifndef MTDEV_NO_LEGACY_API + #define MTDEV_TOUCH_MAJOR 0 #define MTDEV_TOUCH_MINOR 1 #define MTDEV_WIDTH_MAJOR 2 @@ -80,6 +82,8 @@ static inline unsigned int mtdev_mt2abs(unsigned int mtcode) return mtdev_map_mt2abs[mtcode]; } +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.3