mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 02:28:05 +00:00
tod: Adjust syntax as per new uncrustify
This commit is contained in:
@@ -20,13 +20,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define TOD_PADDING(original, wasted) \
|
#define TOD_PADDING(original, wasted) \
|
||||||
char _tod_expansion_padding[(GLIB_SIZEOF_VOID_P * (original)) - (wasted)];
|
char _tod_expansion_padding[(GLIB_SIZEOF_VOID_P * (original)) - (wasted)];
|
||||||
|
|
||||||
#define TOD_PADDING_ALIGNED(original, wasted) \
|
#define TOD_PADDING_ALIGNED(original, wasted) \
|
||||||
TOD_PADDING (original, (wasted) + GLIB_SIZEOF_VOID_P)
|
TOD_PADDING (original, (wasted) + GLIB_SIZEOF_VOID_P)
|
||||||
|
|
||||||
#define TOD_PADDING_ALIGNED4(original, wasted) \
|
#define TOD_PADDING_ALIGNED4(original, wasted) \
|
||||||
TOD_PADDING (original, (wasted) + (GLIB_SIZEOF_VOID_P == 4 ? GLIB_SIZEOF_VOID_P : 0))
|
TOD_PADDING (original, (wasted) + (GLIB_SIZEOF_VOID_P == 4 ? GLIB_SIZEOF_VOID_P : 0))
|
||||||
|
|
||||||
#define TOD_PADDING_ALIGNED8(original, wasted) \
|
#define TOD_PADDING_ALIGNED8(original, wasted) \
|
||||||
TOD_PADDING (original, (wasted) + (GLIB_SIZEOF_VOID_P == 8 ? GLIB_SIZEOF_VOID_P : 0))
|
TOD_PADDING (original, (wasted) + (GLIB_SIZEOF_VOID_P == 8 ? GLIB_SIZEOF_VOID_P : 0))
|
||||||
|
|||||||
@@ -21,27 +21,27 @@
|
|||||||
|
|
||||||
#define LIBFPRINT_2_SYMBOL_VERSION_2_0 "LIBFPRINT_2.0.0"
|
#define LIBFPRINT_2_SYMBOL_VERSION_2_0 "LIBFPRINT_2.0.0"
|
||||||
#define LIBFPRINT_2_SYMBOL_VERSION(major, minor) \
|
#define LIBFPRINT_2_SYMBOL_VERSION(major, minor) \
|
||||||
LIBFPRINT_2_SYMBOL_VERSION_ ## major ## _ ## minor
|
LIBFPRINT_2_SYMBOL_VERSION_ ## major ## _ ## minor
|
||||||
|
|
||||||
#define TOD_1_SYMBOL_VERSION_1_90 "LIBFPRINT_TOD_1.0.0"
|
#define TOD_1_SYMBOL_VERSION_1_90 "LIBFPRINT_TOD_1.0.0"
|
||||||
#define TOD_1_SYMBOL_VERSION_1_92 "LIBFPRINT_TOD_1_1.92"
|
#define TOD_1_SYMBOL_VERSION_1_92 "LIBFPRINT_TOD_1_1.92"
|
||||||
#define TOD_1_SYMBOL_VERSION_1_94 "LIBFPRINT_TOD_1_1.94"
|
#define TOD_1_SYMBOL_VERSION_1_94 "LIBFPRINT_TOD_1_1.94"
|
||||||
#define TOD_1_SYMBOL_VERSION(major, minor) \
|
#define TOD_1_SYMBOL_VERSION(major, minor) \
|
||||||
TOD_1_SYMBOL_VERSION_ ## major ## _ ## minor
|
TOD_1_SYMBOL_VERSION_ ## major ## _ ## minor
|
||||||
|
|
||||||
#define TOD_DEFAULT_UPSTREAM_SYMBOL_VERSIONED(symbol, major, minor) \
|
#define TOD_DEFAULT_UPSTREAM_SYMBOL_VERSIONED(symbol, major, minor) \
|
||||||
__asm__ (".symver " # symbol "," # symbol "@@@" \
|
__asm__ (".symver " # symbol "," # symbol "@@@" \
|
||||||
LIBFPRINT_2_SYMBOL_VERSION (major, minor));
|
LIBFPRINT_2_SYMBOL_VERSION (major, minor));
|
||||||
|
|
||||||
#define TOD_DEFAULT_UPSTREAM_SYMBOL(symbol) \
|
#define TOD_DEFAULT_UPSTREAM_SYMBOL(symbol) \
|
||||||
__asm__ (".symver " # symbol "," # symbol "@@@");
|
__asm__ (".symver " # symbol "," # symbol "@@@");
|
||||||
|
|
||||||
#define TOD_DEFAULT_VERSION_SYMBOL(symbol, major, minor) \
|
#define TOD_DEFAULT_VERSION_SYMBOL(symbol, major, minor) \
|
||||||
__asm__ (".symver " # symbol "," # symbol "@@@" \
|
__asm__ (".symver " # symbol "," # symbol "@@@" \
|
||||||
TOD_1_SYMBOL_VERSION (major, minor));
|
TOD_1_SYMBOL_VERSION (major, minor));
|
||||||
#define TOD_VERSIONED_SYMBOL(symbol, major, minor) \
|
#define TOD_VERSIONED_SYMBOL(symbol, major, minor) \
|
||||||
__asm__ (".symver " # symbol "_" # major "_" #minor "," # symbol "@" \
|
__asm__ (".symver " # symbol "_" # major "_" #minor "," # symbol "@" \
|
||||||
TOD_1_SYMBOL_VERSION (major, minor));
|
TOD_1_SYMBOL_VERSION (major, minor));
|
||||||
|
|
||||||
TOD_DEFAULT_VERSION_SYMBOL (fpi_ssm_new_full, 1, 92)
|
TOD_DEFAULT_VERSION_SYMBOL (fpi_ssm_new_full, 1, 92)
|
||||||
TOD_VERSIONED_SYMBOL (fpi_ssm_new_full, 1, 90)
|
TOD_VERSIONED_SYMBOL (fpi_ssm_new_full, 1, 90)
|
||||||
|
|||||||
+11
-11
@@ -102,23 +102,23 @@ check_compatiblity_auto (GType old_type, GType current_type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define check_type_compatibility(type, major, minor, micro) \
|
#define check_type_compatibility(type, major, minor, micro) \
|
||||||
g_debug ("Checking " # type " @ " G_STRLOC); \
|
g_debug ("Checking " # type " @ " G_STRLOC); \
|
||||||
check_compatiblity_auto (type ## _TOD_V ## major ## _ ## minor ## _ ## micro, type);
|
check_compatiblity_auto (type ## _TOD_V ## major ## _ ## minor ## _ ## micro, type);
|
||||||
|
|
||||||
#define tod_versioned_type(type, major, minor, micro) \
|
#define tod_versioned_type(type, major, minor, micro) \
|
||||||
type ## TODV ## major ## _ ## minor ## _ ## micro
|
type ## TODV ## major ## _ ## minor ## _ ## micro
|
||||||
|
|
||||||
#define check_struct_size(type, major, minor, micro) \
|
#define check_struct_size(type, major, minor, micro) \
|
||||||
g_debug ("Checking " # type " v" #major "." #minor "." #micro " size @ " G_STRLOC); \
|
g_debug ("Checking " # type " v" #major "." #minor "." #micro " size @ " G_STRLOC); \
|
||||||
g_assert_cmpuint (sizeof (tod_versioned_type (type, major, minor, micro)), \
|
g_assert_cmpuint (sizeof (tod_versioned_type (type, major, minor, micro)), \
|
||||||
==, \
|
==, \
|
||||||
sizeof (type))
|
sizeof (type))
|
||||||
|
|
||||||
#define check_struct_member(type, major, minor, micro, member) \
|
#define check_struct_member(type, major, minor, micro, member) \
|
||||||
g_debug ("Checking " # type " v" #major "." #minor "." #micro "'s " # member " offset @ " G_STRLOC); \
|
g_debug ("Checking " # type " v" #major "." #minor "." #micro "'s " # member " offset @ " G_STRLOC); \
|
||||||
g_assert_cmpuint (G_STRUCT_OFFSET (tod_versioned_type (type, major, minor, micro), member), \
|
g_assert_cmpuint (G_STRUCT_OFFSET (tod_versioned_type (type, major, minor, micro), member), \
|
||||||
==, \
|
==, \
|
||||||
G_STRUCT_OFFSET (type, member))
|
G_STRUCT_OFFSET (type, member))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_device_type (void)
|
test_device_type (void)
|
||||||
|
|||||||
Reference in New Issue
Block a user