File: struct-8.c

package info (click to toggle)
dateutils 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,924 kB
  • sloc: ansic: 22,097; makefile: 1,666; yacc: 198; sh: 168; lex: 108
file content (26 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if defined HAVE_CONFIG_H
# include "config.h"
#endif	/* HAVE_CONFIG_H */
#include <stdio.h>
#include "date-core.h"

int
main(void)
{
	int res = 0;

#define CHECK_SIZE(x, y)						\
	if (sizeof(x) != sizeof(y)) {					\
		fprintf(stderr, "sizeof(" #x ") -> %zu\n", sizeof(x));	\
		res = 1;						\
	}

	CHECK_SIZE(struct dt_d_s, uint64_t);
	CHECK_SIZE(dt_ymd_t, uint32_t);
	CHECK_SIZE(dt_ymcw_t, uint32_t);
	CHECK_SIZE(dt_bizda_t, uint32_t);
	CHECK_SIZE(dt_daisy_t, uint32_t);
	return res;
}

/* struct-8.c ends here */