From: Akim Demaille Date: Wed, 29 Nov 2000 14:14:10 +0000 (+0000) Subject: sizeof (struct {char a,b; }) is not required to be 2. X-Git-Tag: autoconf-2.50~385 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5acbbedd5fdd104243ac396cc2d3f7f1c8105990;p=thirdparty%2Fautoconf.git sizeof (struct {char a,b; }) is not required to be 2. Reported by Johan Danielsson. * tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an array of 2 chars. Suggested by Alexandre. --- diff --git a/ChangeLog b/ChangeLog index 2f391650e..f7edff6d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-11-29 Akim Demaille + + sizeof (struct {char a,b; }) is not required to be 2. + Reported by Johan Danielsson. + + * tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an + array of 2 chars. + Suggested by Alexandre. + 2000-11-29 Akim Demaille Provide a means to display banners in the test suite. @@ -109,14 +118,14 @@ (AT_INIT): After having checked whether the test failed, break out of the loop if requested (-e). - + 2000-11-23 Akim Demaille * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's AT_CHECK's job. Remove the code depending upon `at_skip_mode': it's unused. - + 2000-11-23 Akim Demaille * tests/atconfig.in: Remove the `snippet' marks, there are no diff --git a/tests/semantics.at b/tests/semantics.at index 046c14f40..09ebef2af 100644 --- a/tests/semantics.at +++ b/tests/semantics.at @@ -101,27 +101,19 @@ AT_CHECK_MACRO([AC_CHECK_MEMBERS], # AC_CHECK_SIZEOF # --------------- AT_CHECK_MACRO([AC_CHECK_SIZEOF], -[AC_CHECK_SIZEOF(char) +[[AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(charchar,, -[#include -typedef struct -{ - char a; - char b; -} charchar;]) +[[#include +typedef char charchar[2];]]) AC_CHECK_SIZEOF(charcharchar) # Exercize the code used when cross-compiling cross_compiling=yes AC_CHECK_SIZEOF(unsigned char) AC_CHECK_SIZEOF(ucharchar,, -[#include -typedef struct -{ - unsigned char a; - unsigned char b; -} ucharchar;]) -AC_CHECK_SIZEOF(ucharcharchar)], +[[#include +typedef unsigned char ucharchar[2];]]) +AC_CHECK_SIZEOF(ucharcharchar)]], [AT_CHECK_DEFINES( [#define SIZEOF_CHAR 1 #define SIZEOF_CHARCHAR 2