From 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:49:25 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- lib/blkid/tst_types.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 lib/blkid/tst_types.c (limited to 'lib/blkid/tst_types.c') diff --git a/lib/blkid/tst_types.c b/lib/blkid/tst_types.c new file mode 100644 index 0000000..cb612ae --- /dev/null +++ b/lib/blkid/tst_types.c @@ -0,0 +1,64 @@ +/* + * This testing program makes sure the blkid_types header file + * + * Copyright (C) 2006 by Theodore Ts'o. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% + */ + +#include "config.h" +#include +#include "blkid/blkid_types.h" + +#include +#include + +int main(int argc, char **argv) +{ + if (sizeof(__u8) != 1) { + printf("Sizeof(__u8) is %d should be 1\n", + (int)sizeof(__u8)); + exit(1); + } + if (sizeof(__s8) != 1) { + printf("Sizeof(_s8) is %d should be 1\n", + (int)sizeof(__s8)); + exit(1); + } + if (sizeof(__u16) != 2) { + printf("Sizeof(__u16) is %d should be 2\n", + (int)sizeof(__u16)); + exit(1); + } + if (sizeof(__s16) != 2) { + printf("Sizeof(__s16) is %d should be 2\n", + (int)sizeof(__s16)); + exit(1); + } + if (sizeof(__u32) != 4) { + printf("Sizeof(__u32) is %d should be 4\n", + (int)sizeof(__u32)); + exit(1); + } + if (sizeof(__s32) != 4) { + printf("Sizeof(__s32) is %d should be 4\n", + (int)sizeof(__s32)); + exit(1); + } + if (sizeof(__u64) != 8) { + printf("Sizeof(__u64) is %d should be 8\n", + (int)sizeof(__u64)); + exit(1); + } + if (sizeof(__s64) != 8) { + printf("Sizeof(__s64) is %d should be 8\n", + (int)sizeof(__s64)); + exit(1); + } + printf("The blkid_types.h types are correct.\n"); + exit(0); +} + -- cgit v1.2.3