diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-05-01 19:07:07 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-05-01 19:07:07 +0300 |
commit | e886e4f5e73fe6a9f9191f5155852ce5d8bb88fe (patch) | |
tree | c81da057db73b68e39e0a36591861de48dda0f0c /configure.ac | |
parent | c2dba93e639639bdac139b3a3a456d10ddc61f79 (diff) | |
download | libgcrypt-e886e4f5e73fe6a9f9191f5155852ce5d8bb88fe.tar.gz |
Fix packed attribute check for Windows targets
* configure.ac (gcry_cv_gcc_attribute_packed): Move 'long b' to its
own packed structure.
--
Change packed attribute test so that it works with both MS ABI and SYSV ABI.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 16f6a21b..555ad1e3 100644 --- a/configure.ac +++ b/configure.ac @@ -964,7 +964,9 @@ AC_CACHE_CHECK([whether the GCC style packed attribute is supported], [gcry_cv_gcc_attribute_packed], [gcry_cv_gcc_attribute_packed=no AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [[struct foo_s { char a; long b; } __attribute__ ((packed)); + [[struct foolong_s { long b; } __attribute__ ((packed)); + struct foo_s { char a; struct foolong_s b; } + __attribute__ ((packed)); enum bar { FOO = 1 / (sizeof(struct foo_s) == (sizeof(char) + sizeof(long))), };]])], |