]> Savannah Git Hosting - gnulib.git/commitdiff
environ: Fix wrong autoconf test result in C++ mode.
authorBruno Haible <bruno@clisp.org>
Mon, 28 Jun 2021 00:30:25 +0000 (02:30 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 28 Jun 2021 00:31:19 +0000 (02:31 +0200)
* m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
anonymous type.

ChangeLog
m4/environ.m4

index 6b7fd92c3965c831dfa50766217b81120cbdb049..ace8ade4c63c089f197414f7d268a735ddcf81ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-27  Bruno Haible  <bruno@clisp.org>
+
+       environ: Fix wrong autoconf test result in C++ mode.
+       * m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
+       anonymous type.
+
 2021-06-22  Egor Ignatov  <egori@altlinux.org>  (tiny change)
 
        regex: fix undefined behavior
index d971770860cf9c6ef250b0dad0fbf7602e5ee9df..ae5329108e9d0171133fb3c2f2d9d96f0dea0ea4 100644 (file)
@@ -1,4 +1,4 @@
-# environ.m4 serial 7
+# environ.m4 serial 8
 dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,8 @@ AC_DEFUN([gt_CHECK_VAR_DECL],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
           [[$1
-            extern struct { int foo; } $2;]],
+            typedef struct { int foo; } foo_t;
+            extern foo_t $2;]],
           [[$2.foo = 1;]])],
        [gt_cv_var=no],
        [gt_cv_var=yes])])