annotate config/bitfields.m4 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 dnl Copyright (C) 2015 Free Software Foundation, Inc.
kono
parents:
diff changeset
2 dnl This file is free software, distributed under the terms of the GNU
kono
parents:
diff changeset
3 dnl General Public License. As a special exception to the GNU General
kono
parents:
diff changeset
4 dnl Public License, this file may be distributed as part of a program
kono
parents:
diff changeset
5 dnl that contains a configuration script generated by Autoconf, under
kono
parents:
diff changeset
6 dnl the same distribution terms as the rest of that program.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 # Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
kono
parents:
diff changeset
9 # alignment.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
kono
parents:
diff changeset
12 [
kono
parents:
diff changeset
13 AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
kono
parents:
diff changeset
14 [
kono
parents:
diff changeset
15 AC_TRY_COMPILE(
kono
parents:
diff changeset
16 [struct foo1 { char x; char y:1; char z; };
kono
parents:
diff changeset
17 struct foo2 { char x; long long int y:1; char z; };
kono
parents:
diff changeset
18 int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
kono
parents:
diff changeset
19 [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
kono
parents:
diff changeset
20 ])
kono
parents:
diff changeset
21 if test $gt_cv_bitfield_type_matters = yes; then
kono
parents:
diff changeset
22 AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
kono
parents:
diff changeset
23 [Define if the type of bitfields effects alignment.])
kono
parents:
diff changeset
24 fi
kono
parents:
diff changeset
25 ])