diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index 4808d7aa179..8c569049754 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -36,7 +36,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdarg stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@@ -65,9 +65,10 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
$(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/filemode.m4 \
- $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettime.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4
index cc09901d05a..4d397b99b11 100644
--- a/autogen/aclocal.m4
+++ b/autogen/aclocal.m4
@@ -989,6 +989,7 @@ m4_include([m4/alloca.m4])
m4_include([m4/c-strtod.m4])
m4_include([m4/clock_time.m4])
m4_include([m4/dup2.m4])
+m4_include([m4/environ.m4])
m4_include([m4/extensions.m4])
m4_include([m4/filemode.m4])
m4_include([m4/getloadavg.m4])
diff --git a/autogen/config.in b/autogen/config.in
index 5f5052c5205..f20c556c940 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -220,9 +220,6 @@ along with GNU Emacs. If not, see . */
/* Define to 1 if ALSA is available. */
#undef HAVE_ALSA
-/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
-#undef HAVE_ATTRIBUTE_ALIGNED
-
/* Define to 1 if strtold conforms to C99. */
#undef HAVE_C99_STRTOLD
@@ -335,6 +332,9 @@ along with GNU Emacs. If not, see . */
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
+/* Define if you have the declaration of environ. */
+#undef HAVE_ENVIRON_DECL
+
/* Define to 1 if you have the `euidaccess' function. */
#undef HAVE_EUIDACCESS
diff --git a/autogen/configure b/autogen/configure
index 784b10593aa..13ffa90b2df 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -6948,6 +6948,7 @@ esac
# Code from module dtoastr:
# Code from module dtotimespec:
# Code from module dup2:
+ # Code from module environ:
# Code from module extensions:
# Code from module filemode:
@@ -8947,37 +8948,6 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
-$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
-if test "${emacs_cv_attribute_aligned+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-char __attribute__ ((__aligned__ (1 << 3))) c;
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- emacs_cv_attribute_aligned=yes
-else
- emacs_cv_attribute_aligned=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
-$as_echo "$emacs_cv_attribute_aligned" >&6; }
-if test $emacs_cv_attribute_aligned = yes; then
-
-$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
-
-fi
-
DEPFLAGS=
MKDEPDIR=":"
@@ -16268,6 +16238,57 @@ $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+ if test "${gt_cv_var_environ_declaration+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_UNISTD_H
+ #include
+ #endif
+ /* mingw, BeOS, Haiku declare environ in , not in . */
+ #include
+
+ extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_var_environ_declaration=no
+else
+ gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+ if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+ fi
+
+
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
@@ -19897,6 +19918,18 @@ fi
+ GNULIB_ENVIRON=1
+
+
+
+
+
+
+
+
+
+
+
# Persuade glibc to declare getloadavg().