source: trunk/libs/newlib/src/config/bitfields.m4 @ 503

Last change on this file since 503 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.0 KB
Line 
1dnl Copyright (C) 2015 Free Software Foundation, Inc.
2dnl This file is free software, distributed under the terms of the GNU
3dnl General Public License.  As a special exception to the GNU General
4dnl Public License, this file may be distributed as part of a program
5dnl that contains a configuration script generated by Autoconf, under
6dnl the same distribution terms as the rest of that program.
7
8# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
9# alignment.
10
11AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
12[
13  AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
14  [
15    AC_TRY_COMPILE(
16      [struct foo1 { char x; char y:1; char z; };
17struct foo2 { char x; long long int y:1; char z; };
18int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
19      [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
20  ])
21  if test $gt_cv_bitfield_type_matters = yes; then
22    AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
23      [Define if the type of bitfields effects alignment.])
24  fi
25])
Note: See TracBrowser for help on using the repository browser.