1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12 
13 /* test_BITFIELD_HTOL.c derived from cdrtools aclocal.m4 by Joerg Schilling */
14 /* Return 1 if bitfields are high-to-low, 0 if bitfields are low-to-high */
main()15 int main()
16 {
17 	union {
18 		unsigned char ch;
19 		struct { unsigned char bf1:4, bf2:4; } bf;
20 	} u;
21 	u.ch = 0x12;
22 	return (u.bf.bf1 == 1);
23 }
24