summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-12-22 07:39:13 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-12-22 07:39:13 -0800
commitfc02d9541c6b1277dba17af6c2f828aa7a93169b (patch)
treeff33cc9daef6225853405f044d46bcc8b5c70cf2 /configure
parentb9d24b707e78fec4a5449cb6f543ac26cb35a30d (diff)
downloadtxr-fc02d9541c6b1277dba17af6c2f828aa7a93169b.tar.gz
txr-fc02d9541c6b1277dba17af6c2f828aa7a93169b.tar.bz2
txr-fc02d9541c6b1277dba17af6c2f828aa7a93169b.zip
configure: C++ fix for type size detection case.
* configure: The new logic for detecting type sizes introduced in October, replacing the old nm-based trick, doesn't work with C++. An anonymous structure is being used to define an object with linkage: we fix that by giving the structure a tag name which be. C++ also doesn't like a one-character string literal like "\n" being used to initialize a char [1] array, so we make it [2].
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure b/configure
index 885a531f..13e2521a 100755
--- a/configure
+++ b/configure
@@ -1334,7 +1334,7 @@ if [ -z "$intptr" ] ; then
#define LD(S) D((S) % 10, '0')
#define DEC(S) { UD(S), LD(S) }
-struct {
+struct sizes {
char h_BYTE[32], s_BYTE[2];
#if HAVE_SUPERLONG_T
char h_SUPERLONG[32], s_SUPERLONG[2];
@@ -1347,7 +1347,7 @@ struct {
char h_INT[32], s_INT[2];
char h_SHORT[32], s_SHORT[2];
char h_WCHAR[32], s_WCHAR[2];
- char nl[1];
+ char nl[2];
} foo = {
"\nSIZEOF_BYTE=", DEC(CHAR_BIT),
#if HAVE_SUPERLONG_T
@@ -3282,10 +3282,10 @@ for try in NOTHING _LARGE_FILES=1 _FILE_OFFSET_BITS=64 ; do
#define LD(S) D((S) % 10, '0')
#define DEC(S) { UD(S), LD(S) }
-struct {
+struct sizes {
char h_BYTE[32], s_BYTE[2];
char h_OFF_T[32], s_OFF_T[2];
- char nl[1];
+ char nl[2];
} foo = {
"\nSIZEOF_BYTE=", DEC(CHAR_BIT),
"\nSIZEOF_OFF_T=", DEC(sizeof (off_t)),