From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 03:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 9772@debbugs.gnu.org Cc: Eli Zaretskii X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131882195429219 (code B ref -1); Mon, 17 Oct 2011 03:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Oct 2011 03:25:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFdpd-0007az-RU for submit@debbugs.gnu.org; Sun, 16 Oct 2011 23:25:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFdpa-0007ad-Nc for submit@debbugs.gnu.org; Sun, 16 Oct 2011 23:25:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFdog-0000Kv-Af for submit@debbugs.gnu.org; Sun, 16 Oct 2011 23:24:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, T_FRT_PROFIT1 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:42129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFdog-0000Km-8o for submit@debbugs.gnu.org; Sun, 16 Oct 2011 23:24:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFdod-00087D-RG for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2011 23:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFdoa-0000Jy-RI for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2011 23:24:39 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:56125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFdoa-0000Jk-5A; Sun, 16 Oct 2011 23:24:36 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D2E16A60001; Sun, 16 Oct 2011 20:24:34 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PFoQdbfKvuOE; Sun, 16 Oct 2011 20:24:32 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 77B8639E8006; Sun, 16 Oct 2011 20:24:32 -0700 (PDT) Message-ID: <4E9B9FEF.7020207@cs.ucla.edu> Date: Sun, 16 Oct 2011 20:24:31 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) Package: Emacs Version: 24.0.90 Tags: patch Here's a patch to the Emacs trunk (bzr 106094) to cause it to use if available, falling back on a Gnulib replacement otherwise. This simplifies Emacs proper, and should future-proof it for C1X compilers. Although this patch is mostly just a cleanup patch for GNU and POSIX platforms, it may improve performance on some Microsoft hosts, as it contains code for supporting under MSVC. As far as I can see, USE_LSB_TAG currently doesn't work with MSVC, so if this patch works it should increase the maximum Emacs buffer size in that environment. I haven't tested it under Windows, though, and quite possibly further work will be needed in that area. Since this is Microsoft-build relevant, I'll CC: this bug report to Eli. === modified file '.bzrignore' --- .bzrignore 2011-09-29 14:19:11 +0000 +++ .bzrignore 2011-10-17 01:22:19 +0000 @@ -53,6 +53,7 @@ lib/c++defs.h lib/getopt.h lib/inttypes.h +lib/stdalign.h lib/stdbool.h lib/stdio.h lib/stdint.h === modified file 'ChangeLog' --- ChangeLog 2011-10-13 02:16:59 +0000 +++ ChangeLog 2011-10-17 01:22:19 +0000 @@ -1,3 +1,18 @@ +2011-10-17 Paul Eggert + + Use Gnulib stdalign module. + This should improve portability of macros like alignof and DECL_ALIGN. + * lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib. + * .bzrignore: Add lib/stdalign.h. + * Makefile.in (GNULIB_MODULES): Add stdalign. + * config.bat: Set HAVE_ATTRIBUTE_ALIGNED in lib/stdalign.h, + instead of NO_DECL_ALIGN in config.h. Copy lib/stdalign.in.h to + lib/stdalign.in-h as needed. + * configure.in (HAVE_ATTRIBUTE_ALIGNED): Remove the code that + fiddles with this, as gnulib now does this for us. + * lib/gnulib.mk, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: + * m4/gl-comp.m4, m4/pthread_sigmask.m4: Merge from gnulib. + 2011-10-13 Glenn Morris * configure.in: Also look for tputs in libcurses. (Bug#9736) === modified file 'Makefile.in' --- Makefile.in 2011-09-26 21:30:18 +0000 +++ Makefile.in 2011-10-17 01:22:19 +0000 @@ -337,7 +337,7 @@ dup2 \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ mktime pthread_sigmask readlink \ - socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat + socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat GNULIB_TOOL_FLAGS = \ --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax \ --avoid=raise --avoid=threadlib \ === modified file 'config.bat' --- config.bat 2011-09-29 12:08:36 +0000 +++ config.bat 2011-10-17 01:22:19 +0000 @@ -161,7 +161,8 @@ sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 -Rem See if DECL_ALIGN can be supported with this GCC +Rem See if alignas can be supported with this GCC +set HAVE_ATTRIBUTE_ALIGNED=1 rm -f junk.c junk.o junk junk.exe echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c rem Two percent signs because it is a special character for COMMAND.COM/CMD @@ -173,9 +174,9 @@ If Not ErrorLevel 1 Goto alignOk Echo WARNING: Your GCC does not support 8-byte aligned variables. Echo WARNING: Therefore Emacs cannot support buffers larger than 128MB. -rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG +rem The following line disables alignas which in turn disables USE_LSB_TAG rem For details see lisp.h where it defines USE_LSB_TAG -echo #define NO_DECL_ALIGN >>config.h2 +set HAVE_ATTRIBUTE_ALIGNED=0 :alignOk Rem See if they have libxml2 later than v2.2.0 installed Echo Checking whether libxml2 v2.2.1 or later is installed ... @@ -281,6 +282,7 @@ If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h @@ -290,7 +292,7 @@ If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h -sed -f ../msdos/sedlibcf.inp < ..\autogen\Makefile.in > makefile.tmp +sed -e "s/@HAVE_ATTRIBUTE_ALIGNED@/%HAVE_ATTRIBUTE_ALIGNED%/g" -f ../msdos/sedlibcf.inp < ..\autogen\Makefile.in > makefile.tmp sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile rm -f makefile.tmp Rem Create .Po files for new files in lib/ @@ -343,4 +345,3 @@ set djgpp_ver= set sys_malloc= set libxml= - === modified file 'configure.in' --- configure.in 2011-10-13 02:16:59 +0000 +++ configure.in 2011-10-17 01:22:19 +0000 @@ -1357,19 +1357,6 @@ dnl Check for endianess AC_C_BIGENDIAN -AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], - [emacs_cv_attribute_aligned], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[char __attribute__ ((__aligned__ (1 << 3))) c;]], - [[]])], - [emacs_cv_attribute_aligned=yes], - [emacs_cv_attribute_aligned=no])]) -if test $emacs_cv_attribute_aligned = yes; then - AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, - [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.]) -fi - dnl check for Make feature AC_PROG_MAKE_SET === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-09-26 21:30:18 +0000 +++ lib/gnulib.mk 2011-10-17 01:22:19 +0000 @@ -21,7 +21,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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat +# 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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat MOSTLYCLEANFILES += core *.stackdump @@ -421,6 +421,29 @@ ## end gnulib module stat +## begin gnulib module stdalign + +BUILT_SOURCES += $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_ATTRIBUTE_ALIGNED''@/$(HAVE_ATTRIBUTE_ALIGNED)/g' < $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdalign.h stdalign.h-t + +EXTRA_DIST += stdalign.in.h + +## end gnulib module stdalign + ## begin gnulib module stdarg BUILT_SOURCES += $(STDARG_H) === modified file 'lib/md5.c' --- lib/md5.c 2011-02-19 07:28:29 +0000 +++ lib/md5.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "md5.h" -#include +#include +#include #include #include #include @@ -254,8 +255,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha1.c' --- lib/sha1.c 2011-05-24 08:12:52 +0000 +++ lib/sha1.c 2011-10-17 01:22:19 +0000 @@ -26,7 +26,8 @@ #include "sha1.h" -#include +#include +#include #include #include @@ -241,8 +242,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha256.c' --- lib/sha256.c 2011-06-21 08:45:39 +0000 +++ lib/sha256.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha256.h" -#include +#include +#include #include #include @@ -373,8 +374,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha512.c' --- lib/sha512.c 2011-06-21 08:45:39 +0000 +++ lib/sha512.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha512.h" -#include +#include +#include #include #include @@ -381,8 +382,7 @@ if (len >= 128) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (u64) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) != 0) if (UNALIGNED_P (buffer)) while (len > 128) { === added file 'lib/stdalign.in.h' --- lib/stdalign.in.h 1970-01-01 00:00:00 +0000 +++ lib/stdalign.in.h 2011-10-17 01:22:19 +0000 @@ -0,0 +1,61 @@ +/* A substitute for ISO C 1x . + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C1X for platforms that lack it. + + References: + ISO C1X + sections 6.5.3.4, 6.7.5, 7.15. + C++0X + section 18.10. */ + +/* Return the alignment of a structure slot (field) of TYPE, + as an integer constant expression. The result cannot be used as a + value for an 'enum' constant, if you want to be portable to HP-UX + 10.20 cc and AIX 3.2.5 xlc. + + This is not the same as GCC's __alignof__ operator; for example, on + x86 with GCC, _Alignof (long long) is typically 4 whereas + __alignof__ (long long) is 8. */ +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* Align a type or variable to the alignment A. */ +#if @HAVE_ATTRIBUTE_ALIGNED@ && !defined __cplusplus +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +#elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec ((align (a))) +#endif +#ifdef _Alignas +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ === modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-10-07 21:15:00 +0000 +++ m4/gl-comp.m4 2011-10-17 01:22:19 +0000 @@ -76,6 +76,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, @@ -180,6 +181,7 @@ gl_SIGNAL_H gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T +gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H @@ -311,18 +313,18 @@ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax = no; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax = no; then + if test $ac_cv_func_strtoimax = no; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax = no; then + func_gl_gnulib_m4code_verify + fi m4_pattern_allow([^gl_GNULIB_ENABLED_]) AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) @@ -513,6 +515,7 @@ lib/signal.in.h lib/sigprocmask.c lib/stat.c + lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h @@ -563,6 +566,7 @@ m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat.m4 + m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 === modified file 'm4/pthread_sigmask.m4' --- m4/pthread_sigmask.m4 2011-09-03 23:08:32 +0000 +++ m4/pthread_sigmask.m4 2011-10-17 01:22:19 +0000 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK= === added file 'm4/stdalign.m4' --- m4/stdalign.m4 1970-01-01 00:00:00 +0000 +++ m4/stdalign.m4 2011-10-17 01:22:19 +0000 @@ -0,0 +1,37 @@ +# Check for stdalign.h that conforms to C1x. + +dnl Copyright 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CHECK_HEADERS_ONCE([stdalign.h]) + HAVE_ATTRIBUTE_ALIGNED='?' + + if test "$ac_cv_header_stdalign_h" = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], + [gl_cv_attribute_aligned], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[char __attribute__ ((__aligned__ (1 << 3))) c;]], + [[]])], + [gl_cv_attribute_aligned=yes], + [gl_cv_attribute_aligned=no])]) + if test $gl_cv_attribute_aligned = yes; then + HAVE_ATTRIBUTE_ALIGNED=1 + else + HAVE_ATTRIBUTE_ALIGNED=0 + fi + fi + + AC_SUBST([HAVE_ATTRIBUTE_ALIGNED]) + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-09-29 12:00:18 +0000 +++ msdos/ChangeLog 2011-10-17 01:22:19 +0000 @@ -1,3 +1,10 @@ +2011-10-17 Paul Eggert + + Use Gnulib stdalign module. + * sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit. + * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@) + (GL_GENERATE_STDALIGN_H_FALSE): New edits. + 2011-09-29 Eli Zaretskii * mainmake.v2 (boot): Condition the value on the existence of === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2011-09-29 12:00:18 +0000 +++ msdos/sed2v2.inp 2011-10-17 01:22:19 +0000 @@ -35,7 +35,6 @@ /^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ -/^#undef HAVE_ATTRIBUTE_ALIGNED *$/s/^.*$/#define HAVE_ATTRIBUTE_ALIGNED 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ @@ -119,4 +118,3 @@ # might be defined in sys/config.h we include at the top of config.h. /^#undef BSTRING/s|#undef|# undef| /^#undef .*$/s|^.*$|/* & */| - === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-09-29 12:00:18 +0000 +++ msdos/sedlibmk.inp 2011-10-17 01:22:19 +0000 @@ -27,7 +27,7 @@ # otherwise edit them to zero: # # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ -# +# # . If the module is a header or adds headers, edit the corresponding # variable to either an empty value or to the name of the header. # Examples: @@ -547,6 +547,7 @@ /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=/s/@[^@\n]*@// +/^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=/s/@[^@\n]*@// /^STDDEF_H *=/s/@[^@\n]*@// /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ @@ -600,6 +601,8 @@ s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ s/^@GL_GENERATE_STDBOOL_H_FALSE@// +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-09-04 21:52:59 +0000 +++ nt/ChangeLog 2011-10-17 01:22:19 +0000 @@ -1,3 +1,8 @@ +2011-10-17 Paul Eggert + + Use Gnulib stdalign module. + * config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove. + 2011-09-04 Paul Eggert * config.nt (HAVE_SNPRINTF): New macro. === modified file 'nt/config.nt' --- nt/config.nt 2011-09-26 03:20:03 +0000 +++ nt/config.nt 2011-10-17 01:22:19 +0000 @@ -271,13 +271,6 @@ /* Preprocessor macros needed for gnulib imports. */ -/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ -#ifdef __GNUC__ -#define HAVE_ATTRIBUTE_ALIGNED 1 -#else -#undef HAVE_ATTRIBUTE_ALIGNED -#endif - /* Define to 1 if strtold conforms to C99. */ #ifdef __GNUC__ #define HAVE_C99_STRTOLD 1 === modified file 'src/ChangeLog' --- src/ChangeLog 2011-10-15 10:12:00 +0000 +++ src/ChangeLog 2011-10-17 01:22:19 +0000 @@ -1,3 +1,12 @@ +2011-10-17 Paul Eggert + + Use Gnulib stdalign module. + * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_LISP_OBJECT_ALIGNMENT) + (GC_POINTER_ALIGNMENT, pure_alloc): Simplify by using alignof. + (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values. + * lisp.h: Include . + (DECL_ALIGN): Simplify by using alignas. + 2011-10-15 Martin Rudalics * window.c (coordinates_in_window): Rewrite and delabelize === modified file 'src/alloc.c' --- src/alloc.c 2011-10-12 06:09:40 +0000 +++ src/alloc.c 2011-10-17 01:22:19 +0000 @@ -507,12 +507,7 @@ hold a size_t value and (2) the header size is a multiple of the alignment that Emacs needs for C types and for USE_LSB_TAG. */ #define XMALLOC_BASE_ALIGNMENT \ - offsetof ( \ - struct { \ - union { long double d; intmax_t i; void *p; } u; \ - char c; \ - }, \ - c) + alignof (union { long double d; intmax_t i; void *p; }) #ifdef USE_LSB_TAG /* A common multiple of the positive integers A and B. Ideally this would be the least common multiple, but there's no way to do that @@ -4235,15 +4230,15 @@ } -/* Alignment of Lisp_Object and pointer values. Use offsetof, as it +/* Alignment of Lisp_Object and pointer values. Use alignof, as it sometimes returns a smaller alignment than GCC's __alignof__ and mark_memory might miss objects if __alignof__ were used. For example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 but GC_LISP_OBJECT_ALIGNMENT should be 4. */ #ifndef GC_LISP_OBJECT_ALIGNMENT -# define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b) +# define GC_LISP_OBJECT_ALIGNMENT alignof (Lisp_Object) #endif -#define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) +#define GC_POINTER_ALIGNMENT alignof (void *) /* Mark Lisp objects referenced from the address range START+OFFSET..END or END+OFFSET..START. */ @@ -4662,17 +4657,11 @@ #ifdef USE_LSB_TAG size_t alignment = (1 << GCTYPEBITS); #else - size_t alignment = sizeof (EMACS_INT); + size_t alignment = alignof (EMACS_INT); /* Give Lisp_Floats an extra alignment. */ if (type == Lisp_Float) - { -#if defined __GNUC__ && __GNUC__ >= 2 - alignment = __alignof (struct Lisp_Float); -#else - alignment = sizeof (struct Lisp_Float); -#endif - } + alignment = alignof (struct Lisp_Float); #endif again: === modified file 'src/lisp.h' --- src/lisp.h 2011-10-11 17:35:16 +0000 +++ src/lisp.h 2011-10-17 01:22:19 +0000 @@ -20,6 +20,7 @@ #ifndef EMACS_LISP_H #define EMACS_LISP_H +#include #include #include #include @@ -163,15 +164,8 @@ /* First, try and define DECL_ALIGN(type,var) which declares a static variable VAR of type TYPE with the added requirement that it be TYPEBITS-aligned. */ -#ifndef NO_DECL_ALIGN -# ifndef DECL_ALIGN -# if HAVE_ATTRIBUTE_ALIGNED -# define DECL_ALIGN(type, var) \ - type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var -# else - /* What directives do other compilers use? */ -# endif -# endif +#ifdef alignas +# define DECL_ALIGN(type, var) type alignas (1 << GCTYPEBITS) var #endif /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 04:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 9772@debbugs.gnu.org X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Reply-To: Eli Zaretskii Received: via spool by submit@debbugs.gnu.org id=B.131882436032696 (code B ref -1); Mon, 17 Oct 2011 04:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Oct 2011 04:06:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFeSe-0008VJ-FA for submit@debbugs.gnu.org; Mon, 17 Oct 2011 00:06:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFeSb-0008V4-5V for submit@debbugs.gnu.org; Mon, 17 Oct 2011 00:05:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFeRi-0006nj-8T for submit@debbugs.gnu.org; Mon, 17 Oct 2011 00:05:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,T_FRT_PROFIT1 autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:40919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFeRi-0006ne-6v for submit@debbugs.gnu.org; Mon, 17 Oct 2011 00:05:02 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFeRh-0002s4-3X for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 00:05:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFeRf-0006nC-Tj for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 00:05:01 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:55525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFeRf-0006n7-KU for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 00:04:59 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LT600B00Z3SVS00@a-mtaout23.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 06:04:58 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LT600B1CZC9VF20@a-mtaout23.012.net.il>; Mon, 17 Oct 2011 06:04:58 +0200 (IST) Date: Mon, 17 Oct 2011 06:04:57 +0200 From: Eli Zaretskii In-reply-to: <4E9B9FEF.7020207@cs.ucla.edu> X-012-Sender: halo1@inter.net.il Message-id: <83hb38w9ee.fsf@gnu.org> References: <4E9B9FEF.7020207@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) > Date: Sun, 16 Oct 2011 20:24:31 -0700 > From: Paul Eggert > CC: Eli Zaretskii > > Here's a patch to the Emacs trunk (bzr 106094) to cause it to use > if available, falling back on a Gnulib replacement > otherwise. This simplifies Emacs proper, and should future-proof it > for C1X compilers. Do we need to install this before the release? What bug(s) does it fix? > Although this patch is mostly just a cleanup patch for GNU and POSIX > platforms, it may improve performance on some Microsoft hosts, as it > contains code for supporting under MSVC. As far as I can > see, USE_LSB_TAG currently doesn't work with MSVC, so if this patch > works it should increase the maximum Emacs buffer size in that > environment. The MSVC build is currently partially broken. A user submitted patches a few months ago, but they are not yet installed; they need some work before they can be. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 05:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 9772@debbugs.gnu.org X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13188287948554 (code B ref -1); Mon, 17 Oct 2011 05:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Oct 2011 05:19:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFfc9-0002Du-9x for submit@debbugs.gnu.org; Mon, 17 Oct 2011 01:19:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFfc7-0002Di-KK for submit@debbugs.gnu.org; Mon, 17 Oct 2011 01:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFfbA-0002Z8-B7 for submit@debbugs.gnu.org; Mon, 17 Oct 2011 01:18:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFfbA-0002Z0-89 for submit@debbugs.gnu.org; Mon, 17 Oct 2011 01:18:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFfb5-0000I2-7x for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 01:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFfb0-0002YU-HM for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 01:18:47 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:48942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFfb0-0002YM-Ap; Mon, 17 Oct 2011 01:18:42 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 61B1839E8007; Sun, 16 Oct 2011 22:18:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FYexUsThux4s; Sun, 16 Oct 2011 22:18:41 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 08B0D39E8006; Sun, 16 Oct 2011 22:18:41 -0700 (PDT) Message-ID: <4E9BBAB0.8030205@cs.ucla.edu> Date: Sun, 16 Oct 2011 22:18:40 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 References: <4E9B9FEF.7020207@cs.ucla.edu> <83hb38w9ee.fsf@gnu.org> In-Reply-To: <83hb38w9ee.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) On 10/16/11 21:04, Eli Zaretskii wrote: > Do we need to install this before the release? What bug(s) does it > fix? This patch is a cleaner fix for the garbage-collector core dump that I fixed on 2011-10-07 with bzr 106013. The fix in 106013 is a bit hacky, and it would be nice to have a cleaner fix for it, but it's not essential, particularly now that I know that the MSVC build is partly broken anyway. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 13:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 9772@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.131885782432186 (code B ref 9772); Mon, 17 Oct 2011 13:24:01 +0000 Received: (at 9772) by debbugs.gnu.org; 17 Oct 2011 13:23:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFnAO-0008N4-Ba for submit@debbugs.gnu.org; Mon, 17 Oct 2011 09:23:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFnAM-0008Ms-5K for 9772@debbugs.gnu.org; Mon, 17 Oct 2011 09:23:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak0JAAwrnE5Ld/8E/2dsb2JhbABDDpkujyuBBoFuAQEEAVYjBQsLNBIUGA0kiBKzPYgIBJxehEmDclM X-IronPort-AV: E=Sophos;i="4.69,359,1315195200"; d="scan'208";a="142388635" Received: from 75-119-255-4.dsl.teksavvy.com (HELO pastel.home) ([75.119.255.4]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 17 Oct 2011 09:22:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id A0E85590F5; Mon, 17 Oct 2011 09:22:44 -0400 (EDT) From: Stefan Monnier Message-ID: References: <4E9B9FEF.7020207@cs.ucla.edu> Date: Mon, 17 Oct 2011 09:22:44 -0400 In-Reply-To: <4E9B9FEF.7020207@cs.ucla.edu> (Paul Eggert's message of "Sun, 16 Oct 2011 20:24:31 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > Here's a patch to the Emacs trunk (bzr 106094) to cause it to use > if available, falling back on a Gnulib replacement > otherwise. This simplifies Emacs proper, and should future-proof it > for C1X compilers. I like this change, but I hope we can postpone it to after Emacs-24.1. Stefan From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 14:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: eggert@cs.ucla.edu, 9772@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.13188602354007 (code B ref 9772); Mon, 17 Oct 2011 14:04:01 +0000 Received: (at 9772) by debbugs.gnu.org; 17 Oct 2011 14:03:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFnnF-00012Y-Rr for submit@debbugs.gnu.org; Mon, 17 Oct 2011 10:03:55 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFnnD-00012P-Ie for 9772@debbugs.gnu.org; Mon, 17 Oct 2011 10:03:52 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RFnmN-0006Ez-S0; Mon, 17 Oct 2011 10:02:59 -0400 Date: Mon, 17 Oct 2011 10:02:59 -0400 Message-Id: From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Mon, 17 Oct 2011 09:22:44 -0400) References: <4E9B9FEF.7020207@cs.ucla.edu> X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Stefan Monnier > Date: Mon, 17 Oct 2011 09:22:44 -0400 > Cc: 9772@debbugs.gnu.org > > > Here's a patch to the Emacs trunk (bzr 106094) to cause it to use > > if available, falling back on a Gnulib replacement > > otherwise. This simplifies Emacs proper, and should future-proof it > > for C1X compilers. > > I like this change Agreed. If my response sounded as if I didn't like it, I'm sorry for the confusion. > but I hope we can postpone it to after Emacs-24.1. If the only reason is to make the Windows and DOS ports cleaner, then I'd definitely suggest to postpone. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2011 17:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Stefan Monnier , 9772@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.131887363129611 (code B ref 9772); Mon, 17 Oct 2011 17:48:01 +0000 Received: (at 9772) by debbugs.gnu.org; 17 Oct 2011 17:47:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFrHK-0007hY-RO for submit@debbugs.gnu.org; Mon, 17 Oct 2011 13:47:11 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFrHH-0007hL-UN for 9772@debbugs.gnu.org; Mon, 17 Oct 2011 13:47:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 17510A60001; Mon, 17 Oct 2011 10:46:10 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X5EIgtPu9G96; Mon, 17 Oct 2011 10:46:09 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6E55539E8007; Mon, 17 Oct 2011 10:46:09 -0700 (PDT) Message-ID: <4E9C69E1.1080507@cs.ucla.edu> Date: Mon, 17 Oct 2011 10:46:09 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Thunderbird/3.1.15 MIME-Version: 1.0 References: <4E9B9FEF.7020207@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.1 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) On 10/17/11 07:02, Eli Zaretskii wrote: >> From: Stefan Monnier >> but I hope we can postpone it to after Emacs-24.1. > > If the only reason is to make the Windows and DOS ports cleaner, then > I'd definitely suggest to postpone. Yes, that makes sense for now. There may be an issue before 24.1 comes out. If Gnulib is later updated, with a fix that Emacs needs before 24.1, and we then merge from the updated Gnulib, the merge will contain code that assumes . We'd need to either merge the Gnulib part of the postponed patch, or edit the Gnulib code by hand after importing it, to undo its assumption of . We can cross this bridge if we come to it, which I hope we don't.... From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: stdalign status report References: <4E9B9FEF.7020207@cs.ucla.edu> In-Reply-To: <4E9B9FEF.7020207@cs.ucla.edu> Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2011 20:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 9772@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.13197469062790 (code B ref 9772); Thu, 27 Oct 2011 20:22:01 +0000 Received: (at 9772) by debbugs.gnu.org; 27 Oct 2011 20:21:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJWSP-0000iw-ML for submit@debbugs.gnu.org; Thu, 27 Oct 2011 16:21:46 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJWSL-0000im-5X for 9772@debbugs.gnu.org; Thu, 27 Oct 2011 16:21:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 5C55239E800B for <9772@debbugs.gnu.org>; Thu, 27 Oct 2011 13:19:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kD0yBkCUFD22 for <9772@debbugs.gnu.org>; Thu, 27 Oct 2011 13:19:47 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id CA0EC39E8007 for <9772@debbugs.gnu.org>; Thu, 27 Oct 2011 13:19:47 -0700 (PDT) Message-ID: <4EA9BCE3.6080701@cs.ucla.edu> Date: Thu, 27 Oct 2011 13:19:47 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.1 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) I merged the latest gnulib with the latest Emacs and came up with the following revised patch. I don't plan to install this now; I'm just emailing this as a status report in case I get hit by a bus or something. >From the Windows point of view I expect that the only thing that's changed is that config.bat got simpler this time around. # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: eggert@cs.ucla.edu-20111027195126-qw6zih99i6st851q # target_branch: bzr+ssh://eggert@bzr.savannah.gnu.org/emacs/trunk # testament_sha1: 1f0df71b36800072c576416777f6b87d893824c0 # timestamp: 2011-10-27 13:16:35 -0700 # base_revision_id: rgm@gnu.org-20111027193835-trn7s0m73juujpuv # # Begin patch === modified file '.bzrignore' --- .bzrignore 2011-09-29 14:19:11 +0000 +++ .bzrignore 2011-10-17 01:22:19 +0000 @@ -53,6 +53,7 @@ lib/c++defs.h lib/getopt.h lib/inttypes.h +lib/stdalign.h lib/stdbool.h lib/stdio.h lib/stdint.h === modified file 'ChangeLog' --- ChangeLog 2011-10-25 16:41:26 +0000 +++ ChangeLog 2011-10-27 19:51:26 +0000 @@ -1,3 +1,20 @@ +2011-10-27 Paul Eggert + + Use Gnulib stdalign module (Bug#9772). + This should improve portability of macros like alignof and DECL_ALIGN. + * lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib. + * .bzrignore: Add lib/stdalign.h. + * Makefile.in (GNULIB_MODULES): Add stdalign. + * config.bat: Do not set NO_DECL_ALIGN; no longer needed. + Copy lib/stdalign.in.h to lib/stdalign.in-h as needed. + * configure.in (HAVE_ATTRIBUTE_ALIGNED): Remove the code that + fiddles with this, as gnulib now does this for us. + * lib/gnulib.mk, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: + * m4/gl-comp.m4, m4/pthread_sigmask.m4: Merge from gnulib. + + * doc/misc/texinfo.tex, lib/gettext.h, lib/gnulib.mk, lib/stdlib.in.h: + * m4/include_next.m4, m4/stdlib_h.m4: Merge from gnulib. + 2011-10-25 Nali Toja (tiny change) * configure.in (HAVE_GNU_MAKE): Respect MAKE env-var. (Bug#9868) === modified file 'Makefile.in' --- Makefile.in 2011-09-26 21:30:18 +0000 +++ Makefile.in 2011-10-17 01:22:19 +0000 @@ -337,7 +337,7 @@ dup2 \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ mktime pthread_sigmask readlink \ - socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat + socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat GNULIB_TOOL_FLAGS = \ --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax \ --avoid=raise --avoid=threadlib \ === modified file 'config.bat' --- config.bat 2011-09-29 12:08:36 +0000 +++ config.bat 2011-10-27 19:39:30 +0000 @@ -161,22 +161,6 @@ sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 -Rem See if DECL_ALIGN can be supported with this GCC -rm -f junk.c junk.o junk junk.exe -echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c -rem Two percent signs because it is a special character for COMMAND.COM/CMD -rem Filter thru Sed because "&" is special for CMD.EXE -echo int main(void) { return (unsigned long)"&"foo %% 8; } | sed "s/.&./\&/" >>junk.c -gcc -o junk junk.c -if not exist junk.exe coff2exe junk -junk -If Not ErrorLevel 1 Goto alignOk -Echo WARNING: Your GCC does not support 8-byte aligned variables. -Echo WARNING: Therefore Emacs cannot support buffers larger than 128MB. -rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG -rem For details see lisp.h where it defines USE_LSB_TAG -echo #define NO_DECL_ALIGN >>config.h2 -:alignOk Rem See if they have libxml2 later than v2.2.0 installed Echo Checking whether libxml2 v2.2.1 or later is installed ... rm -f junk.c junk.o junk junk.exe @@ -281,6 +265,7 @@ If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h @@ -343,4 +328,3 @@ set djgpp_ver= set sys_malloc= set libxml= - === modified file 'configure.in' --- configure.in 2011-10-25 20:46:31 +0000 +++ configure.in 2011-10-27 18:27:17 +0000 @@ -1351,19 +1351,6 @@ dnl Check for endianess AC_C_BIGENDIAN -AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], - [emacs_cv_attribute_aligned], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[char __attribute__ ((__aligned__ (1 << 3))) c;]], - [[]])], - [emacs_cv_attribute_aligned=yes], - [emacs_cv_attribute_aligned=no])]) -if test $emacs_cv_attribute_aligned = yes; then - AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, - [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.]) -fi - dnl check for Make feature AC_PROG_MAKE_SET === modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2011-09-26 21:30:18 +0000 +++ doc/misc/texinfo.tex 2011-10-27 19:51:26 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2011-09-23.09} +\def\texinfoversion{2011-10-19.08} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -2372,7 +2372,9 @@ \else\ifx\next-% \else\ifx\next.% \else\ptexslash - \fi\fi\fi} + \fi\fi\fi + \aftersmartic +} % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. @@ -2382,9 +2384,15 @@ % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + \let\i=\smartitalic \let\slanted=\smartslanted -\def\var#1{\smartslanted{#1}} \let\dfn=\smartslanted \let\emph=\smartitalic @@ -2480,7 +2488,7 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. @@ -2762,6 +2770,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. @@ -2774,6 +2783,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. @@ -8103,7 +8113,7 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 @@ -8166,6 +8176,8 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 === modified file 'lib/gettext.h' --- lib/gettext.h 2011-02-15 04:53:29 +0000 +++ lib/gettext.h 2011-10-27 19:51:26 +0000 @@ -185,7 +185,7 @@ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-09-26 21:30:18 +0000 +++ lib/gnulib.mk 2011-10-27 19:51:26 +0000 @@ -21,7 +21,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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat +# 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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat MOSTLYCLEANFILES += core *.stackdump @@ -421,6 +421,29 @@ ## end gnulib module stat +## begin gnulib module stdalign + +BUILT_SOURCES += $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdalign.h stdalign.h-t + +EXTRA_DIST += stdalign.in.h + +## end gnulib module stdalign + ## begin gnulib module stdarg BUILT_SOURCES += $(STDARG_H) @@ -710,6 +733,7 @@ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ @@ -736,6 +760,7 @@ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ === modified file 'lib/md5.c' --- lib/md5.c 2011-02-19 07:28:29 +0000 +++ lib/md5.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "md5.h" -#include +#include +#include #include #include #include @@ -254,8 +255,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha1.c' --- lib/sha1.c 2011-05-24 08:12:52 +0000 +++ lib/sha1.c 2011-10-17 01:22:19 +0000 @@ -26,7 +26,8 @@ #include "sha1.h" -#include +#include +#include #include #include @@ -241,8 +242,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha256.c' --- lib/sha256.c 2011-06-21 08:45:39 +0000 +++ lib/sha256.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha256.h" -#include +#include +#include #include #include @@ -373,8 +374,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha512.c' --- lib/sha512.c 2011-06-21 08:45:39 +0000 +++ lib/sha512.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha512.h" -#include +#include +#include #include #include @@ -381,8 +382,7 @@ if (len >= 128) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (u64) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) != 0) if (UNALIGNED_P (buffer)) while (len > 128) { === added file 'lib/stdalign.in.h' --- lib/stdalign.in.h 1970-01-01 00:00:00 +0000 +++ lib/stdalign.in.h 2011-10-27 19:39:30 +0000 @@ -0,0 +1,85 @@ +/* A substitute for ISO C 1x . + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C1X for platforms that lack it. + + References: + ISO C1X + sections 6.5.3.4, 6.7.5, 7.15. + C++0X + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's __alignof__ operator, which can yield a + better-performing alignment for an object of that type. For + example, on x86 with GCC, __alignof__ (double) and __alignof__ + (long long) are 8, whereas alignof (double) and alignof (long long) + are 4 unless the option '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. + + The following draft C1X requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +#elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec ((align (a))) +#endif +#ifdef _Alignas +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ === modified file 'lib/stdlib.in.h' --- lib/stdlib.in.h 2011-07-24 22:15:47 +0000 +++ lib/stdlib.in.h 2011-10-27 19:51:26 +0000 @@ -423,6 +423,22 @@ # endif #endif +#if @GNULIB_POSIX_OPENPT@ +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if !@HAVE_POSIX_OPENPT@ +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +_GL_CXXALIASWARN (posix_openpt); +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ === modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-10-07 21:15:00 +0000 +++ m4/gl-comp.m4 2011-10-17 01:22:19 +0000 @@ -76,6 +76,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, @@ -180,6 +181,7 @@ gl_SIGNAL_H gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T +gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H @@ -311,18 +313,18 @@ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax = no; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax = no; then + if test $ac_cv_func_strtoimax = no; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax = no; then + func_gl_gnulib_m4code_verify + fi m4_pattern_allow([^gl_GNULIB_ENABLED_]) AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) @@ -513,6 +515,7 @@ lib/signal.in.h lib/sigprocmask.c lib/stat.c + lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h @@ -563,6 +566,7 @@ m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat.m4 + m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 === modified file 'm4/include_next.m4' --- m4/include_next.m4 2011-09-26 21:30:18 +0000 +++ m4/include_next.m4 2011-10-27 19:51:26 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 22 +# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -219,12 +219,17 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + dnl A sed expression that turns a string into a basic regular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' changequote([,]) - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{ - s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1| + gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl === modified file 'm4/pthread_sigmask.m4' --- m4/pthread_sigmask.m4 2011-09-03 23:08:32 +0000 +++ m4/pthread_sigmask.m4 2011-10-17 01:22:19 +0000 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK= === added file 'm4/stdalign.m4' --- m4/stdalign.m4 1970-01-01 00:00:00 +0000 +++ m4/stdalign.m4 2011-10-27 19:39:30 +0000 @@ -0,0 +1,22 @@ +# Check for stdalign.h that conforms to C1x. + +dnl Copyright 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CHECK_HEADERS_ONCE([stdalign.h]) + + if test $ac_cv_header_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + fi + + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) === modified file 'm4/stdlib_h.m4' --- m4/stdlib_h.m4 2011-02-25 07:36:37 +0000 +++ m4/stdlib_h.m4 2011-10-27 19:51:26 +0000 @@ -19,10 +19,10 @@ #if HAVE_RANDOM_H # include #endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt + ptsname random_r realpath rpmatch setenv setstate_r srandom_r strtod + strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -50,6 +50,7 @@ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) @@ -76,6 +77,7 @@ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-09-29 12:00:18 +0000 +++ msdos/ChangeLog 2011-10-27 19:39:30 +0000 @@ -1,3 +1,10 @@ +2011-10-27 Paul Eggert + + Use Gnulib stdalign module (Bug#9772). + * sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit. + * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@) + (GL_GENERATE_STDALIGN_H_FALSE): New edits. + 2011-09-29 Eli Zaretskii * mainmake.v2 (boot): Condition the value on the existence of === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2011-09-29 12:00:18 +0000 +++ msdos/sed2v2.inp 2011-10-17 01:22:19 +0000 @@ -35,7 +35,6 @@ /^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ -/^#undef HAVE_ATTRIBUTE_ALIGNED *$/s/^.*$/#define HAVE_ATTRIBUTE_ALIGNED 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ @@ -119,4 +118,3 @@ # might be defined in sys/config.h we include at the top of config.h. /^#undef BSTRING/s|#undef|# undef| /^#undef .*$/s|^.*$|/* & */| - === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-09-29 12:00:18 +0000 +++ msdos/sedlibmk.inp 2011-10-17 01:22:19 +0000 @@ -27,7 +27,7 @@ # otherwise edit them to zero: # # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ -# +# # . If the module is a header or adds headers, edit the corresponding # variable to either an empty value or to the name of the header. # Examples: @@ -547,6 +547,7 @@ /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=/s/@[^@\n]*@// +/^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=/s/@[^@\n]*@// /^STDDEF_H *=/s/@[^@\n]*@// /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ @@ -600,6 +601,8 @@ s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ s/^@GL_GENERATE_STDBOOL_H_FALSE@// +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-10-25 16:54:19 +0000 +++ nt/ChangeLog 2011-10-27 18:27:17 +0000 @@ -1,3 +1,8 @@ +2011-10-27 Paul Eggert + + Use Gnulib stdalign module (Bug#9772). + * config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove. + 2011-10-25 Eli Zaretskii * makefile.w32-in (dist): Don't put the top-level INSTALL into the === modified file 'nt/config.nt' --- nt/config.nt 2011-10-22 09:17:01 +0000 +++ nt/config.nt 2011-10-27 18:27:17 +0000 @@ -278,13 +278,6 @@ /* Preprocessor macros needed for gnulib imports. */ -/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ -#ifdef __GNUC__ -#define HAVE_ATTRIBUTE_ALIGNED 1 -#else -#undef HAVE_ATTRIBUTE_ALIGNED -#endif - /* Define to 1 if strtold conforms to C99. */ #ifdef __GNUC__ #define HAVE_C99_STRTOLD 1 === modified file 'src/ChangeLog' --- src/ChangeLog 2011-10-27 14:35:51 +0000 +++ src/ChangeLog 2011-10-27 18:27:17 +0000 @@ -1,3 +1,12 @@ +2011-10-27 Paul Eggert + + Use Gnulib stdalign module (Bug#9772). + * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_LISP_OBJECT_ALIGNMENT) + (GC_POINTER_ALIGNMENT, pure_alloc): Simplify by using alignof. + (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values. + * lisp.h: Include . + (DECL_ALIGN): Simplify by using alignas. + 2011-10-27 Juanma Barranquero * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end) === modified file 'src/alloc.c' --- src/alloc.c 2011-10-12 06:09:40 +0000 +++ src/alloc.c 2011-10-17 01:22:19 +0000 @@ -507,12 +507,7 @@ hold a size_t value and (2) the header size is a multiple of the alignment that Emacs needs for C types and for USE_LSB_TAG. */ #define XMALLOC_BASE_ALIGNMENT \ - offsetof ( \ - struct { \ - union { long double d; intmax_t i; void *p; } u; \ - char c; \ - }, \ - c) + alignof (union { long double d; intmax_t i; void *p; }) #ifdef USE_LSB_TAG /* A common multiple of the positive integers A and B. Ideally this would be the least common multiple, but there's no way to do that @@ -4235,15 +4230,15 @@ } -/* Alignment of Lisp_Object and pointer values. Use offsetof, as it +/* Alignment of Lisp_Object and pointer values. Use alignof, as it sometimes returns a smaller alignment than GCC's __alignof__ and mark_memory might miss objects if __alignof__ were used. For example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 but GC_LISP_OBJECT_ALIGNMENT should be 4. */ #ifndef GC_LISP_OBJECT_ALIGNMENT -# define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b) +# define GC_LISP_OBJECT_ALIGNMENT alignof (Lisp_Object) #endif -#define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) +#define GC_POINTER_ALIGNMENT alignof (void *) /* Mark Lisp objects referenced from the address range START+OFFSET..END or END+OFFSET..START. */ @@ -4662,17 +4657,11 @@ #ifdef USE_LSB_TAG size_t alignment = (1 << GCTYPEBITS); #else - size_t alignment = sizeof (EMACS_INT); + size_t alignment = alignof (EMACS_INT); /* Give Lisp_Floats an extra alignment. */ if (type == Lisp_Float) - { -#if defined __GNUC__ && __GNUC__ >= 2 - alignment = __alignof (struct Lisp_Float); -#else - alignment = sizeof (struct Lisp_Float); -#endif - } + alignment = alignof (struct Lisp_Float); #endif again: === modified file 'src/lisp.h' --- src/lisp.h 2011-10-11 17:35:16 +0000 +++ src/lisp.h 2011-10-17 01:22:19 +0000 @@ -20,6 +20,7 @@ #ifndef EMACS_LISP_H #define EMACS_LISP_H +#include #include #include #include @@ -163,15 +164,8 @@ /* First, try and define DECL_ALIGN(type,var) which declares a static variable VAR of type TYPE with the added requirement that it be TYPEBITS-aligned. */ -#ifndef NO_DECL_ALIGN -# ifndef DECL_ALIGN -# if HAVE_ATTRIBUTE_ALIGNED -# define DECL_ALIGN(type, var) \ - type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var -# else - /* What directives do other compilers use? */ -# endif -# endif +#ifdef alignas +# define DECL_ALIGN(type, var) type alignas (1 << GCTYPEBITS) var #endif /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: fix for Bug#9772 should also help fix Bug#9660 Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Nov 2011 06:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 9772@debbugs.gnu.org, 9660@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132073283321271 (code B ref 9772); Tue, 08 Nov 2011 06:14:02 +0000 Received: (at 9772) by debbugs.gnu.org; 8 Nov 2011 06:13:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNewS-0005Wx-7k for submit@debbugs.gnu.org; Tue, 08 Nov 2011 01:13:53 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNewM-0005Wh-PK; Tue, 08 Nov 2011 01:13:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 28EB139E800C; Mon, 7 Nov 2011 22:10:50 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jegjs8gDArQq; Mon, 7 Nov 2011 22:10:47 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2A2B339E8007; Mon, 7 Nov 2011 22:10:47 -0800 (PST) Message-ID: <4EB8C7AC.1000603@cs.ucla.edu> Date: Mon, 07 Nov 2011 22:09:48 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 References: <4EA9BCE3.6080701@cs.ucla.edu> In-Reply-To: <4EA9BCE3.6080701@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) It appears that the patch for Bug#9772 would also help fix one of the problems with the MSVC port (Bug#9660), as it solves the problem of DECL_ALIGN in a portable way. So I updated the Bug#9772 patch to reflect the latest GNU Emacs trunk (bzr 106319) and am resending it below. # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: eggert@cs.ucla.edu-20111108050351-8pi1asjihs20t0ki # target_branch: bzr+ssh://eggert@bzr.savannah.gnu.org/emacs/trunk # testament_sha1: f4cd0307b11c4a1d34ef6fc7efc489d034586917 # timestamp: 2011-11-07 21:07:24 -0800 # base_revision_id: monnier@iro.umontreal.ca-20111108025759-\ # d5u0ag4hdie27lcz # # Begin patch === modified file '.bzrignore' --- .bzrignore 2011-09-29 14:19:11 +0000 +++ .bzrignore 2011-10-17 01:22:19 +0000 @@ -53,6 +53,7 @@ lib/c++defs.h lib/getopt.h lib/inttypes.h +lib/stdalign.h lib/stdbool.h lib/stdio.h lib/stdint.h === modified file 'ChangeLog' --- ChangeLog 2011-11-05 11:34:56 +0000 +++ ChangeLog 2011-11-08 01:07:18 +0000 @@ -1,3 +1,20 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9960). + This should improve portability of macros like alignof and DECL_ALIGN. + * lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib. + * .bzrignore: Add lib/stdalign.h. + * Makefile.in (GNULIB_MODULES): Add stdalign. + * config.bat: Do not set NO_DECL_ALIGN; no longer needed. + Copy lib/stdalign.in.h to lib/stdalign.in-h as needed. + * configure.in (HAVE_ATTRIBUTE_ALIGNED): Remove the code that + fiddles with this, as gnulib now does this for us. + * lib/gnulib.mk, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: + * m4/gl-comp.m4, m4/pthread_sigmask.m4: Merge from gnulib. + + * doc/misc/texinfo.tex, lib/gettext.h, lib/gnulib.mk, lib/stdlib.in.h: + * m4/include_next.m4, m4/stdlib_h.m4: Merge from gnulib. + 2011-11-05 Eli Zaretskii * lib/makefile.w32-in (FRC): New dummy target. === modified file 'Makefile.in' --- Makefile.in 2011-09-26 21:30:18 +0000 +++ Makefile.in 2011-10-17 01:22:19 +0000 @@ -337,7 +337,7 @@ dup2 \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ mktime pthread_sigmask readlink \ - socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat + socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat GNULIB_TOOL_FLAGS = \ --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax \ --avoid=raise --avoid=threadlib \ === modified file 'config.bat' --- config.bat 2011-10-31 17:49:10 +0000 +++ config.bat 2011-11-01 05:03:56 +0000 @@ -163,22 +163,6 @@ if exist ..\autogen\config.in sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 -Rem See if DECL_ALIGN can be supported with this GCC -rm -f junk.c junk.o junk junk.exe -echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c -rem Two percent signs because it is a special character for COMMAND.COM/CMD -rem Filter thru Sed because "&" is special for CMD.EXE -echo int main(void) { return (unsigned long)"&"foo %% 8; } | sed "s/.&./\&/" >>junk.c -gcc -o junk junk.c -if not exist junk.exe coff2exe junk -junk -If Not ErrorLevel 1 Goto alignOk -Echo WARNING: Your GCC does not support 8-byte aligned variables. -Echo WARNING: Therefore Emacs cannot support buffers larger than 128MB. -rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG -rem For details see lisp.h where it defines USE_LSB_TAG -echo #define NO_DECL_ALIGN >>config.h2 -:alignOk Rem See if they have libxml2 later than v2.2.0 installed Echo Checking whether libxml2 v2.2.1 or later is installed ... rm -f junk.c junk.o junk junk.exe @@ -283,6 +267,7 @@ If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h @@ -346,4 +331,3 @@ set djgpp_ver= set sys_malloc= set libxml= - === modified file 'configure.in' --- configure.in 2011-11-04 22:16:46 +0000 +++ configure.in 2011-11-07 05:59:29 +0000 @@ -1351,19 +1351,6 @@ dnl Check for endianess AC_C_BIGENDIAN -AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], - [emacs_cv_attribute_aligned], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[char __attribute__ ((__aligned__ (1 << 3))) c;]], - [[]])], - [emacs_cv_attribute_aligned=yes], - [emacs_cv_attribute_aligned=no])]) -if test $emacs_cv_attribute_aligned = yes; then - AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, - [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.]) -fi - dnl check for Make feature AC_PROG_MAKE_SET === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-11-01 19:22:57 +0000 +++ doc/misc/ChangeLog 2011-11-08 01:07:18 +0000 @@ -1,3 +1,7 @@ +2011-11-08 Paul Eggert + + * texinfo.tex: Merge from gnulib. + 2011-10-31 Katsumi Yamaoka * gnus.texi (Other Gnus Versions): Remove. === modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2011-09-26 21:30:18 +0000 +++ doc/misc/texinfo.tex 2011-11-07 05:56:04 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2011-09-23.09} +\def\texinfoversion{2011-11-06.09} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -116,6 +116,7 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putwordfile{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi @@ -1194,29 +1195,31 @@ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \let\pdfimgext=\empty \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -2372,7 +2375,9 @@ \else\ifx\next-% \else\ifx\next.% \else\ptexslash - \fi\fi\fi} + \fi\fi\fi + \aftersmartic +} % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. @@ -2382,9 +2387,15 @@ % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + \let\i=\smartitalic \let\slanted=\smartslanted -\def\var#1{\smartslanted{#1}} \let\dfn=\smartslanted \let\emph=\smartitalic @@ -2480,7 +2491,7 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. @@ -2762,6 +2773,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. @@ -2774,6 +2786,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. @@ -2979,7 +2992,7 @@ {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -8103,7 +8116,7 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 @@ -8166,6 +8179,8 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 === modified file 'lib/gettext.h' --- lib/gettext.h 2011-02-15 04:53:29 +0000 +++ lib/gettext.h 2011-10-27 19:51:26 +0000 @@ -185,7 +185,7 @@ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-09-26 21:30:18 +0000 +++ lib/gnulib.mk 2011-10-27 19:51:26 +0000 @@ -21,7 +21,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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat +# 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=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys_stat MOSTLYCLEANFILES += core *.stackdump @@ -421,6 +421,29 @@ ## end gnulib module stat +## begin gnulib module stdalign + +BUILT_SOURCES += $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdalign.h stdalign.h-t + +EXTRA_DIST += stdalign.in.h + +## end gnulib module stdalign + ## begin gnulib module stdarg BUILT_SOURCES += $(STDARG_H) @@ -710,6 +733,7 @@ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ @@ -736,6 +760,7 @@ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ === modified file 'lib/md5.c' --- lib/md5.c 2011-02-19 07:28:29 +0000 +++ lib/md5.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "md5.h" -#include +#include +#include #include #include #include @@ -254,8 +255,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha1.c' --- lib/sha1.c 2011-05-24 08:12:52 +0000 +++ lib/sha1.c 2011-10-17 01:22:19 +0000 @@ -26,7 +26,8 @@ #include "sha1.h" -#include +#include +#include #include #include @@ -241,8 +242,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha256.c' --- lib/sha256.c 2011-06-21 08:45:39 +0000 +++ lib/sha256.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha256.h" -#include +#include +#include #include #include @@ -373,8 +374,7 @@ if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { === modified file 'lib/sha512.c' --- lib/sha512.c 2011-06-21 08:45:39 +0000 +++ lib/sha512.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ #include "sha512.h" -#include +#include +#include #include #include @@ -381,8 +382,7 @@ if (len >= 128) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (u64) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) != 0) if (UNALIGNED_P (buffer)) while (len > 128) { === added file 'lib/stdalign.in.h' --- lib/stdalign.in.h 1970-01-01 00:00:00 +0000 +++ lib/stdalign.in.h 2011-11-07 05:56:04 +0000 @@ -0,0 +1,89 @@ +/* A substitute for ISO C 1x . + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C1X for platforms that lack it. + + References: + ISO C1X + sections 6.5.3.4, 6.7.5, 7.15. + C++0X + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's __alignof__ operator, which can yield a + better-performing alignment for an object of that type. For + example, on x86 with GCC, __alignof__ (double) and __alignof__ + (long long) are 8, whereas alignof (double) and alignof (long long) + are 4 unless the option '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following draft C1X requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +#elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +#endif +#ifdef _Alignas +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ === modified file 'lib/stdlib.in.h' --- lib/stdlib.in.h 2011-07-24 22:15:47 +0000 +++ lib/stdlib.in.h 2011-11-08 01:12:08 +0000 @@ -247,7 +247,7 @@ #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif @@ -423,6 +423,22 @@ # endif #endif +#if @GNULIB_POSIX_OPENPT@ +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if !@HAVE_POSIX_OPENPT@ +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +_GL_CXXALIASWARN (posix_openpt); +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ === modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-10-07 21:15:00 +0000 +++ m4/gl-comp.m4 2011-10-17 01:22:19 +0000 @@ -76,6 +76,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, @@ -180,6 +181,7 @@ gl_SIGNAL_H gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T +gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H @@ -311,18 +313,18 @@ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax = no; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax = no; then + if test $ac_cv_func_strtoimax = no; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax = no; then + func_gl_gnulib_m4code_verify + fi m4_pattern_allow([^gl_GNULIB_ENABLED_]) AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) @@ -513,6 +515,7 @@ lib/signal.in.h lib/sigprocmask.c lib/stat.c + lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h @@ -563,6 +566,7 @@ m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat.m4 + m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 === modified file 'm4/include_next.m4' --- m4/include_next.m4 2011-09-26 21:30:18 +0000 +++ m4/include_next.m4 2011-10-27 19:51:26 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 22 +# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -219,12 +219,17 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + dnl A sed expression that turns a string into a basic regular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' changequote([,]) - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{ - s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1| + gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl === modified file 'm4/pthread_sigmask.m4' --- m4/pthread_sigmask.m4 2011-09-03 23:08:32 +0000 +++ m4/pthread_sigmask.m4 2011-10-17 01:22:19 +0000 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK= === added file 'm4/stdalign.m4' --- m4/stdalign.m4 1970-01-01 00:00:00 +0000 +++ m4/stdalign.m4 2011-10-27 19:39:30 +0000 @@ -0,0 +1,22 @@ +# Check for stdalign.h that conforms to C1x. + +dnl Copyright 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CHECK_HEADERS_ONCE([stdalign.h]) + + if test $ac_cv_header_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + fi + + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) === modified file 'm4/stdlib_h.m4' --- m4/stdlib_h.m4 2011-02-25 07:36:37 +0000 +++ m4/stdlib_h.m4 2011-10-27 19:51:26 +0000 @@ -19,10 +19,10 @@ #if HAVE_RANDOM_H # include #endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt + ptsname random_r realpath rpmatch setenv setstate_r srandom_r strtod + strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -50,6 +50,7 @@ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) @@ -76,6 +77,7 @@ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-10-31 17:37:39 +0000 +++ msdos/ChangeLog 2011-11-08 01:07:18 +0000 @@ -1,3 +1,10 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9660). + * sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit. + * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@) + (GL_GENERATE_STDALIGN_H_FALSE): New edits. + 2011-10-31 Eli Zaretskii * sed3v2.inp (insrcdir): Comment out definition. === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2011-10-31 02:25:01 +0000 +++ msdos/sed2v2.inp 2011-11-01 05:03:56 +0000 @@ -35,7 +35,6 @@ /^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ -/^#undef HAVE_ATTRIBUTE_ALIGNED *$/s/^.*$/#define HAVE_ATTRIBUTE_ALIGNED 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ @@ -119,4 +118,3 @@ # might be defined in sys/config.h we include at the top of config.h. /^#undef BSTRING/s|#undef|# undef| /^#undef .*$/s|^.*$|/* & */| - === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-09-29 12:00:18 +0000 +++ msdos/sedlibmk.inp 2011-10-17 01:22:19 +0000 @@ -27,7 +27,7 @@ # otherwise edit them to zero: # # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ -# +# # . If the module is a header or adds headers, edit the corresponding # variable to either an empty value or to the name of the header. # Examples: @@ -547,6 +547,7 @@ /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=/s/@[^@\n]*@// +/^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=/s/@[^@\n]*@// /^STDDEF_H *=/s/@[^@\n]*@// /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ @@ -600,6 +601,8 @@ s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ s/^@GL_GENERATE_STDBOOL_H_FALSE@// +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-11-05 22:33:44 +0000 +++ nt/ChangeLog 2011-11-08 01:07:18 +0000 @@ -1,3 +1,8 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9660). + * config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove. + 2011-11-05 Christoph Scholtes * inc/stdint.h (UINT64_MAX, UINT64_MIN, INT64_MIN, UINTMAX_MAX) === modified file 'nt/config.nt' --- nt/config.nt 2011-11-05 17:16:01 +0000 +++ nt/config.nt 2011-11-07 05:59:29 +0000 @@ -278,13 +278,6 @@ /* Preprocessor macros needed for gnulib imports. */ -/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ -#ifdef __GNUC__ -#define HAVE_ATTRIBUTE_ALIGNED 1 -#else -#undef HAVE_ATTRIBUTE_ALIGNED -#endif - /* Define to 1 if strtold conforms to C99. */ #ifdef __GNUC__ #define HAVE_C99_STRTOLD 1 === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-07 17:04:01 +0000 +++ src/ChangeLog 2011-11-08 01:07:18 +0000 @@ -1,3 +1,14 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9660). + * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_LISP_OBJECT_ALIGNMENT) + (GC_POINTER_ALIGNMENT, pure_alloc): Simplify by using alignof. + (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values. + * lisp.h: Include . + (DECL_ALIGN): Simplify by using alignas. + Port to MSVC, by using ALIGN_GCTYPEBITS. + (ALIGN_GCTYPEBITS): New macro. + 2011-11-07 Juanma Barranquero * lisp.h (syms_of_abbrev): Remove declaration. === modified file 'src/alloc.c' --- src/alloc.c 2011-11-07 05:37:49 +0000 +++ src/alloc.c 2011-11-07 05:59:29 +0000 @@ -513,12 +513,7 @@ hold a size_t value and (2) the header size is a multiple of the alignment that Emacs needs for C types and for USE_LSB_TAG. */ #define XMALLOC_BASE_ALIGNMENT \ - offsetof ( \ - struct { \ - union { long double d; intmax_t i; void *p; } u; \ - char c; \ - }, \ - c) + alignof (union { long double d; intmax_t i; void *p; }) #ifdef USE_LSB_TAG /* A common multiple of the positive integers A and B. Ideally this would be the least common multiple, but there's no way to do that @@ -4241,15 +4236,15 @@ } -/* Alignment of Lisp_Object and pointer values. Use offsetof, as it +/* Alignment of Lisp_Object and pointer values. Use alignof, as it sometimes returns a smaller alignment than GCC's __alignof__ and mark_memory might miss objects if __alignof__ were used. For example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 but GC_LISP_OBJECT_ALIGNMENT should be 4. */ #ifndef GC_LISP_OBJECT_ALIGNMENT -# define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b) +# define GC_LISP_OBJECT_ALIGNMENT alignof (Lisp_Object) #endif -#define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) +#define GC_POINTER_ALIGNMENT alignof (void *) /* Mark Lisp objects referenced from the address range START+OFFSET..END or END+OFFSET..START. */ @@ -4668,17 +4663,11 @@ #ifdef USE_LSB_TAG size_t alignment = (1 << GCTYPEBITS); #else - size_t alignment = sizeof (EMACS_INT); + size_t alignment = alignof (EMACS_INT); /* Give Lisp_Floats an extra alignment. */ if (type == Lisp_Float) - { -#if defined __GNUC__ && __GNUC__ >= 2 - alignment = __alignof (struct Lisp_Float); -#else - alignment = sizeof (struct Lisp_Float); -#endif - } + alignment = alignof (struct Lisp_Float); #endif again: === modified file 'src/lisp.h' --- src/lisp.h 2011-11-07 17:04:01 +0000 +++ src/lisp.h 2011-11-08 01:07:18 +0000 @@ -20,6 +20,7 @@ #ifndef EMACS_LISP_H #define EMACS_LISP_H +#include #include #include #include @@ -163,18 +164,8 @@ /* First, try and define DECL_ALIGN(type,var) which declares a static variable VAR of type TYPE with the added requirement that it be TYPEBITS-aligned. */ -#ifndef NO_DECL_ALIGN -# ifndef DECL_ALIGN -# if HAVE_ATTRIBUTE_ALIGNED -# define DECL_ALIGN(type, var) \ - type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var -# elif defined(_MSC_VER) -# define DECL_ALIGN(type, var) \ - type __declspec(align(1 << GCTYPEBITS)) var -# else - /* What directives do other compilers use? */ -# endif -# endif +#ifdef alignas +# define DECL_ALIGN(type, var) type alignas (ALIGN_GCTYPEBITS) var #endif /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ @@ -302,6 +293,10 @@ #ifndef GCTYPEBITS #define GCTYPEBITS 3 +#define ALIGN_GCTYPEBITS 8 /* This must be an integer constant, for MSVC. */ +#endif +#if 1 << GCTYPEBITS != ALIGN_GCTYPEBITS +# error "ALIGN_GCTYPEBITS is wrong!" #endif /* These values are overridden by the m- file on some machines. */ From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: fix for Bug#9772 should also help fix Bug#9660 Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Nov 2011 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 9772@debbugs.gnu.org, 9660@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132073471024290 (code B ref 9772); Tue, 08 Nov 2011 06:46:02 +0000 Received: (at 9772) by debbugs.gnu.org; 8 Nov 2011 06:45:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNfQi-0006Je-UI for submit@debbugs.gnu.org; Tue, 08 Nov 2011 01:45:09 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNfQc-0006JM-Cg; Tue, 08 Nov 2011 01:45:04 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8081A39E800C; Mon, 7 Nov 2011 22:42:05 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2NeVvBbniL-2; Mon, 7 Nov 2011 22:42:05 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2B95939E8007; Mon, 7 Nov 2011 22:42:05 -0800 (PST) Message-ID: <4EB8CF41.1040703@cs.ucla.edu> Date: Mon, 07 Nov 2011 22:42:09 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 References: <4EA9BCE3.6080701@cs.ucla.edu> <4EB8C7AC.1000603@cs.ucla.edu> In-Reply-To: <4EB8C7AC.1000603@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 11/07/11 22:09, Paul Eggert wrote: > It appears that the patch for Bug#9772 would also help fix one of the > problems with the MSVC port (Bug#9660) Whoops, I meant to write "Bug#9960". Sorry about the confusion. I'll send an updated copy of the patch (with 9660 -> 9960) to the latter bug address. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: OSX breakage Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Chong Yidong Cc: mario@lassnig.net, Eli Zaretskii , 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132255904030096 (code B ref 9772); Tue, 29 Nov 2011 09:31:02 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 09:30:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVK1O-0007pF-SK for submit@debbugs.gnu.org; Tue, 29 Nov 2011 04:30:40 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVK1H-0007ov-Hg; Tue, 29 Nov 2011 04:30:35 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D3A47A60003; Tue, 29 Nov 2011 01:28:31 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jwplGHafoRhy; Tue, 29 Nov 2011 01:28:28 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 18218A60001; Tue, 29 Nov 2011 01:28:28 -0800 (PST) Message-ID: <4ED4A5BE.80008@cs.ucla.edu> Date: Tue, 29 Nov 2011 01:28:30 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> In-Reply-To: <871usrh69t.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 11/28/11 21:00, Chong Yidong wrote: > As Eli pointed out in the discussion on bug#10155, there is already cod= e > in lib/unistd.in.h that apparently ought to handle this, but itsn't > working. Here's a proposed patch to fix that, by having Emacs use Gnulib's environ module. This syncs from Gnulib, and so it also brings in the patches for Bug#9772 and Bug#9960. (It is possible to pull out just the environ fix by hand, but that's an error-prone process and I'd rather avoid it.) I have tested this on Fedora 15, but not on OSX nor on Windows. # Begin patch =3D=3D=3D modified file '.bzrignore' --- .bzrignore 2011-09-29 14:19:11 +0000 +++ .bzrignore 2011-10-17 01:22:19 +0000 @@ -53,6 +53,7 @@ lib/c++defs.h lib/getopt.h lib/inttypes.h +lib/stdalign.h lib/stdbool.h lib/stdio.h lib/stdint.h =3D=3D=3D modified file 'ChangeLog' --- ChangeLog 2011-11-27 18:33:17 +0000 +++ ChangeLog 2011-11-29 09:17:01 +0000 @@ -1,3 +1,25 @@ +2011-11-29 Paul Eggert + + Use Gnulib environ module. + * Makefile.in (GNULIB_MODULES): Add environ. + * m4/environ.m4: New file, from gnulib. + + Use Gnulib stdalign module (Bug#9772, Bug#9960). + This should improve portability of macros like alignof and DECL_ALIGN. + * lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib. + * .bzrignore: Add lib/stdalign.h. + * Makefile.in (GNULIB_MODULES): Add stdalign. + * config.bat: Do not set NO_DECL_ALIGN; no longer needed. + Copy lib/stdalign.in.h to lib/stdalign.in-h as needed. + * configure.in (HAVE_ATTRIBUTE_ALIGNED): Remove the code that + fiddles with this, as gnulib now does this for us. + * doc/misc/texinfo.tex, lib/gettext.h, lib/gnulib.mk: + * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: + * lib/sigprocmask.c, lib/stdlib.in.h: + * m4/dup2.m4, m4/getopt.m4, m4/gl-comp.m4, m4/gnulib-common.m4: + * m4/include_next.m4, m4/pthread_sigmask.m4, m4/stdlib_h.m4: + * m4/unistd_h.m4: Merge from gnulib. + 2011-11-27 Jan Dj=C3=A4rv =20 * configure.in: Check for gtk_window_set_has_resize_grip. =3D=3D=3D modified file 'Makefile.in' --- Makefile.in 2011-11-22 01:56:49 +0000 +++ Makefile.in 2011-11-29 09:17:01 +0000 @@ -334,10 +334,10 @@ GNULIB_MODULES =3D \ alloca-opt \ careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoast= r \ - dup2 \ + dup2 environ \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ mktime pthread_sigmask readlink \ - socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat + socklen stdalign stdarg stdio strftime strtoimax strtoumax symlink sys= _stat GNULIB_TOOL_FLAGS =3D \ --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoid=3Dpathmax \ --avoid=3Draise --avoid=3Dthreadlib \ =3D=3D=3D modified file 'config.bat' --- config.bat 2011-10-31 17:49:10 +0000 +++ config.bat 2011-11-01 05:03:56 +0000 @@ -163,22 +163,6 @@ if exist ..\autogen\config.in sed -f ../msdos/sed2x.inp < ..\autogen\con= fig.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 -Rem See if DECL_ALIGN can be supported with this GCC -rm -f junk.c junk.o junk junk.exe -echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >j= unk.c -rem Two percent signs because it is a special character for COMMAND.COM/= CMD -rem Filter thru Sed because "&" is special for CMD.EXE -echo int main(void) { return (unsigned long)"&"foo %% 8; } | sed "s/.&./= \&/" >>junk.c -gcc -o junk junk.c -if not exist junk.exe coff2exe junk -junk -If Not ErrorLevel 1 Goto alignOk -Echo WARNING: Your GCC does not support 8-byte aligned variables. -Echo WARNING: Therefore Emacs cannot support buffers larger than 128MB. -rem The following line disables DECL_ALIGN which in turn disables USE_LS= B_TAG -rem For details see lisp.h where it defines USE_LSB_TAG -echo #define NO_DECL_ALIGN >>config.h2 -:alignOk Rem See if they have libxml2 later than v2.2.0 installed Echo Checking whether libxml2 v2.2.1 or later is installed ... rm -f junk.c junk.o junk junk.exe @@ -283,6 +267,7 @@ If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h = build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h @@ -346,4 +331,3 @@ set djgpp_ver=3D set sys_malloc=3D set libxml=3D - =3D=3D=3D modified file 'configure.in' --- configure.in 2011-11-27 18:33:17 +0000 +++ configure.in 2011-11-28 16:07:26 +0000 @@ -1350,19 +1350,6 @@ dnl Check for endianness. AC_C_BIGENDIAN =20 -AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], - [emacs_cv_attribute_aligned], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[char __attribute__ ((__aligned__ (1 << 3))) c;]], - [[]])], - [emacs_cv_attribute_aligned=3Dyes], - [emacs_cv_attribute_aligned=3Dno])]) -if test $emacs_cv_attribute_aligned =3D yes; then - AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, - [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works= .]) -fi - dnl check for Make feature AC_PROG_MAKE_SET =20 =3D=3D=3D modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-11-25 13:26:30 +0000 +++ doc/misc/ChangeLog 2011-11-29 09:17:01 +0000 @@ -1,3 +1,7 @@ +2011-11-29 Paul Eggert + + * texinfo.tex: Merge from gnulib. + 2011-11-24 Glenn Morris =20 * gnus.texi, smtpmail.texi: Fix case of "GnuTLS". =3D=3D=3D modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2011-09-26 21:30:18 +0000 +++ doc/misc/texinfo.tex 2011-11-29 09:17:01 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2011-09-23.09} +\def\texinfoversion{2011-11-09.15} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -116,6 +116,7 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Inde= x is empty)}\fi @@ -1194,29 +1195,31 @@ \def\imagewidth{#2}\setbox0 =3D \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 =3D \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \let\pdfimgext=3D\empty \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp =3D \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -2372,7 +2375,9 @@ \else\ifx\next-% \else\ifx\next.% \else\ptexslash - \fi\fi\fi} + \fi\fi\fi + \aftersmartic +} =20 % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. @@ -2382,9 +2387,15 @@ % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} =20 +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic =3D \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=3D\saveaftersmartic}% + \smartslanted{#1}% +} + \let\i=3D\smartitalic \let\slanted=3D\smartslanted -\def\var#1{\smartslanted{#1}} \let\dfn=3D\smartslanted \let\emph=3D\smartitalic =20 @@ -2480,7 +2491,7 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } =20 % We *must* turn on hyphenation at `-' and `_' in @code. @@ -2762,6 +2773,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=3D1000 } =20 % @abbr for "Comput. J." and the like. @@ -2774,6 +2786,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=3D1000 } =20 % @asis just yields its argument. Used with @table, for example. @@ -2979,7 +2992,7 @@ {\tentt \global\dimen0 =3D 3em}% Width of the box. \dimen2 =3D .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.= ) -\setbox0 =3D \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +\setbox0 =3D \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=3D\hbox to \dimen0{\hfil \hsize =3D \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -8103,7 +8116,7 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =3D0 } =20 -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=3D\comment =20 {\catcode `\@=3D11 @@ -8166,6 +8179,8 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=3D11 =3D=3D=3D modified file 'lib/gettext.h' --- lib/gettext.h 2011-02-15 04:53:29 +0000 +++ lib/gettext.h 2011-10-27 19:51:26 +0000 @@ -185,7 +185,7 @@ #include =20 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >=3D 3 || __GNUG__ >=3D 2) && !__STRICT_ANSI__) \ + (((__GNUC__ >=3D 3 || __GNUG__ >=3D 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >=3D 199901L */ ) =20 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS =3D=3D=3D modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-09-26 21:30:18 +0000 +++ lib/gnulib.mk 2011-11-29 09:17:01 +0000 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoid=3Dpathmax -= -avoid=3Draise --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditio= nal-dependencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-op= t careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr= dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime p= thread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax= symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoid=3Dpathmax -= -avoid=3Draise --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditio= nal-dependencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-op= t careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr= dup2 environ filemode getloadavg getopt-gnu ignore-value intprops lstat = mktime pthread_sigmask readlink socklen stdalign stdarg stdio strftime st= rtoimax strtoumax symlink sys_stat =20 =20 MOSTLYCLEANFILES +=3D core *.stackdump @@ -421,6 +421,29 @@ =20 ## end gnulib module stat =20 +## begin gnulib module stdalign + +BUILT_SOURCES +=3D $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES +=3D stdalign.h stdalign.h-t + +EXTRA_DIST +=3D stdalign.in.h + +## end gnulib module stdalign + ## begin gnulib module stdarg =20 BUILT_SOURCES +=3D $(STDARG_H) @@ -710,7 +733,9 @@ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ @@ -736,7 +761,9 @@ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ @@ -754,6 +781,7 @@ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ @@ -1004,7 +1032,7 @@ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/= g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOC= KING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g'= \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ =3D=3D=3D modified file 'lib/md5.c' --- lib/md5.c 2011-02-19 07:28:29 +0000 +++ lib/md5.c 2011-10-17 01:22:19 +0000 @@ -24,7 +24,8 @@ =20 #include "md5.h" =20 -#include +#include +#include #include #include #include @@ -254,8 +255,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha1.c' --- lib/sha1.c 2011-05-24 08:12:52 +0000 +++ lib/sha1.c 2011-10-17 01:22:19 +0000 @@ -26,7 +26,8 @@ =20 #include "sha1.h" =20 -#include +#include +#include #include #include =20 @@ -241,8 +242,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha256.c' --- lib/sha256.c 2011-11-20 03:48:53 +0000 +++ lib/sha256.c 2011-11-29 09:17:01 +0000 @@ -24,7 +24,8 @@ =20 #include "sha256.h" =20 -#include +#include +#include #include #include =20 @@ -51,7 +52,7 @@ =20 /* Takes a pointer to a 256 bit block of data (eight 32 bit ints) and - initializes it to the start constants of the SHA256 algorithm. This + intializes it to the start constants of the SHA256 algorithm. This must be called before using hash in the call to sha256_hash */ void @@ -373,8 +374,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha512.c' --- lib/sha512.c 2011-11-20 03:48:53 +0000 +++ lib/sha512.c 2011-11-29 09:17:01 +0000 @@ -24,7 +24,8 @@ =20 #include "sha512.h" =20 -#include +#include +#include #include #include =20 @@ -58,7 +59,7 @@ =20 /* Takes a pointer to a 512 bit block of data (eight 64 bit ints) and - initializes it to the start constants of the SHA512 algorithm. This + intializes it to the start constants of the SHA512 algorithm. This must be called before using hash in the call to sha512_hash */ void @@ -381,8 +382,7 @@ if (len >=3D 128) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (u64) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 128) { =3D=3D=3D modified file 'lib/sigprocmask.c' --- lib/sigprocmask.c 2011-10-07 21:15:00 +0000 +++ lib/sigprocmask.c 2011-11-29 09:17:01 +0000 @@ -344,5 +344,6 @@ else if (handler !=3D SIG_IGN) (*handler) (SIGPIPE); } + return 0; } #endif =3D=3D=3D added file 'lib/stdalign.in.h' --- lib/stdalign.in.h 1970-01-01 00:00:00 +0000 +++ lib/stdalign.in.h 2011-11-07 05:56:04 +0000 @@ -0,0 +1,89 @@ +/* A substitute for ISO C 1x . + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundatio= n, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *= / + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C1X for platforms that lack it. + + References: + ISO C1X + sections 6.5.3.4, 6.7.5, 7.15. + C++0X + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's __alignof__ operator, which can yield a + better-performing alignment for an object of that type. For + example, on x86 with GCC, __alignof__ (double) and __alignof__ + (long long) are 8, whereas alignof (double) and alignof (long long) + are 4 unless the option '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following draft C1X requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <=3D __SUNPRO_C +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +#elif 1300 <=3D _MSC_VER +# define _Alignas(a) __declspec (align (a)) +#endif +#ifdef _Alignas +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ =3D=3D=3D modified file 'lib/stdlib.in.h' --- lib/stdlib.in.h 2011-07-24 22:15:47 +0000 +++ lib/stdlib.in.h 2011-11-29 09:17:01 +0000 @@ -247,7 +247,7 @@ #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif @@ -423,6 +423,22 @@ # endif #endif =20 +#if @GNULIB_POSIX_OPENPT@ +/* Return an FD open to the master side of a pseudo-terminal. Flags sho= uld + include O_RDWR, and may also include O_NOCTTY. */ +# if !@HAVE_POSIX_OPENPT@ +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +_GL_CXXALIASWARN (posix_openpt); +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ @@ -439,6 +455,32 @@ # endif #endif =20 +#if @GNULIB_PTSNAME_R@ +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if @REPLACE_PTSNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !@HAVE_PTSNAME_R@ +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) =3D=3D=3D modified file 'm4/dup2.m4' --- m4/dup2.m4 2011-09-26 21:30:18 +0000 +++ m4/dup2.m4 2011-11-29 09:17:01 +0000 @@ -1,4 +1,4 @@ -#serial 16 +#serial 17 dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, = Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -67,7 +67,9 @@ m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR =3D 0; then - REPLACE_DUP2=3D1 + if test $HAVE_DUP2 =3D 1; then + REPLACE_DUP2=3D1 + fi fi ]) ]) =3D=3D=3D added file 'm4/environ.m4' --- m4/environ.m4 1970-01-01 00:00:00 +0000 +++ m4/environ.m4 2011-11-29 09:17:01 +0000 @@ -0,0 +1,47 @@ +# environ.m4 serial 6 +dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN_ONCE([gl_ENVIRON], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl Persuade glibc to declare environ. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + gt_CHECK_VAR_DECL( + [#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + ], + [environ]) + if test $gt_cv_var_environ_declaration !=3D yes; then + HAVE_DECL_ENVIRON=3D0 + fi +]) + +# Check if a variable is properly declared. +# gt_CHECK_VAR_DECL(includes,variable) +AC_DEFUN([gt_CHECK_VAR_DECL], +[ + define([gt_cv_var], [gt_cv_var_]$2[_declaration]) + AC_MSG_CHECKING([if $2 is properly declared]) + AC_CACHE_VAL([gt_cv_var], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[$1 + extern struct { int foo; } $2;]], + [[$2.foo =3D 1;]])], + [gt_cv_var=3Dno], + [gt_cv_var=3Dyes])]) + AC_MSG_RESULT([$gt_cv_var]) + if test $gt_cv_var =3D yes; then + AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, + [Define if you have the declaration of $2.]) + fi + undefine([gt_cv_var]) +]) =3D=3D=3D modified file 'm4/getopt.m4' --- m4/getopt.m4 2011-07-24 22:15:47 +0000 +++ m4/getopt.m4 2011-11-29 09:17:01 +0000 @@ -1,4 +1,4 @@ -# getopt.m4 serial 38 +# getopt.m4 serial 39 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -25,8 +25,6 @@ if test $REPLACE_GETOPT =3D 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER - dnl Arrange for unistd.h to include getopt.h. - GNULIB_UNISTD_H_GETOPT=3D1 fi ]) =20 =3D=3D=3D modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-10-07 21:15:00 +0000 +++ m4/gl-comp.m4 2011-11-29 09:17:01 +0000 @@ -48,6 +48,7 @@ # Code from module dosname: # Code from module dtoastr: # Code from module dup2: + # Code from module environ: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module filemode: @@ -76,6 +77,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, @@ -130,6 +132,8 @@ gl_PREREQ_DUP2 fi gl_UNISTD_MODULE_INDICATOR([dup2]) +gl_ENVIRON +gl_UNISTD_MODULE_INDICATOR([environ]) gl_FILEMODE gl_GETLOADAVG if test $HAVE_GETLOADAVG =3D 0; then @@ -142,14 +146,20 @@ AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=3D1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT =3D 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=3D1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) AC_REQUIRE([AC_C_INLINE]) gl_INTTYPES_INCOMPLETE gl_FUNC_LSTAT @@ -180,6 +190,7 @@ gl_SIGNAL_H gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T +gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H @@ -311,18 +322,18 @@ if test $HAVE_READLINK =3D 0 || test $REPLACE_READLINK =3D 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax =3D no; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoimax =3D no && test $ac_cv_type_long_long_int= =3D yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax =3D no; then + if test $ac_cv_func_strtoimax =3D no; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax =3D no && test $ac_cv_type_unsigned_long= _long_int =3D yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax =3D no; then + func_gl_gnulib_m4code_verify + fi m4_pattern_allow([^gl_GNULIB_ENABLED_]) AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosnam= e]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [= $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) @@ -513,6 +524,7 @@ lib/signal.in.h lib/sigprocmask.c lib/stat.c + lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h @@ -538,6 +550,7 @@ m4/alloca.m4 m4/c-strtod.m4 m4/dup2.m4 + m4/environ.m4 m4/extensions.m4 m4/filemode.m4 m4/getloadavg.m4 @@ -563,6 +576,7 @@ m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat.m4 + m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 =3D=3D=3D modified file 'm4/gnulib-common.m4' --- m4/gnulib-common.m4 2011-10-07 21:15:00 +0000 +++ m4/gnulib-common.m4 2011-11-29 09:17:01 +0000 @@ -18,7 +18,7 @@ # if (3 <=3D __GNUC__ || (__GNUC__ =3D=3D 2 && 8 <=3D __GNUC_MINOR__) \ || 0x5110 <=3D __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <=3D _MSC_VER +# elif defined _MSC_VER && 1200 <=3D _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn =3D=3D=3D modified file 'm4/include_next.m4' --- m4/include_next.m4 2011-09-26 21:30:18 +0000 +++ m4/include_next.m4 2011-10-27 19:51:26 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 22 +# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -219,12 +219,17 @@ gl_dirsep_regex=3D'[/\\]' ;; *) - gl_dirsep_regex=3D'/' + gl_dirsep_regex=3D'\/' ;; esac + dnl A sed expression that turns a string into a basic reg= ular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed=3D's,[]$^\\.*/[],\\&,g' changequote([,]) - gl_absolute_header_sed=3D'\|'"${gl_dirsep_regex}"']m4_def= n([gl_HEADER_NAME])[|{ - s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NA= ME])[\)".*|\1| + gl_header_literal_regex=3D`echo ']m4_defn([gl_HEADER_NAME= ])[' \ + | sed -e "$gl_make_literal_regex= _sed"` + gl_absolute_header_sed=3D"/${gl_dirsep_regex}${gl_header_= literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_rege= x}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl =3D=3D=3D modified file 'm4/pthread_sigmask.m4' --- m4/pthread_sigmask.m4 2011-09-03 23:08:32 +0000 +++ m4/pthread_sigmask.m4 2011-10-17 01:22:19 +0000 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ =20 AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK=3D =20 =3D=3D=3D added file 'm4/stdalign.m4' --- m4/stdalign.m4 1970-01-01 00:00:00 +0000 +++ m4/stdalign.m4 2011-10-27 19:39:30 +0000 @@ -0,0 +1,22 @@ +# Check for stdalign.h that conforms to C1x. + +dnl Copyright 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CHECK_HEADERS_ONCE([stdalign.h]) + + if test $ac_cv_header_stdalign_h =3D yes; then + STDALIGN_H=3D'' + else + STDALIGN_H=3D'stdalign.h' + fi + + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) =3D=3D=3D modified file 'm4/stdlib_h.m4' --- m4/stdlib_h.m4 2011-02-25 07:36:37 +0000 +++ m4/stdlib_h.m4 2011-11-29 09:17:01 +0000 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 37 +# stdlib_h.m4 serial 39 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,10 +19,10 @@ #if HAVE_RANDOM_H # include #endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt= mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r sran= dom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt + ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srando= m_r + strtod strtoll strtoull unlockpt unsetenv]) ]) =20 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -50,7 +50,9 @@ GNULIB_MKOSTEMPS=3D0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=3D0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=3D0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_POSIX_OPENPT=3D0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=3D0; AC_SUBST([GNULIB_PTSNAME]) + GNULIB_PTSNAME_R=3D0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=3D0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=3D0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=3D0; AC_SUBST([GNULIB_REALLOC_POSIX]) @@ -76,7 +78,9 @@ HAVE_MKOSTEMPS=3D1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=3D1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=3D1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_POSIX_OPENPT=3D1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=3D1; AC_SUBST([HAVE_PTSNAME]) + HAVE_PTSNAME_R=3D1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM_H=3D1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=3D1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=3D1; AC_SUBST([HAVE_REALPATH]) @@ -95,6 +99,7 @@ REPLACE_MALLOC=3D0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=3D0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=3D0; AC_SUBST([REPLACE_MKSTEMP]) + REPLACE_PTSNAME_R=3D0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=3D0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALLOC=3D0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=3D0; AC_SUBST([REPLACE_REALPATH]) =3D=3D=3D modified file 'm4/unistd_h.m4' --- m4/unistd_h.m4 2011-09-26 21:30:18 +0000 +++ m4/unistd_h.m4 2011-11-29 09:17:01 +0000 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 61 +# unistd_h.m4 serial 62 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -98,7 +98,6 @@ GNULIB_SYMLINK=3D0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=3D0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=3D0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_GETOPT=3D0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING= ]) GNULIB_UNISTD_H_SIGPIPE=3D0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=3D0; AC_SUBST([GNULIB_UNLINK]) =3D=3D=3D modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-10-31 17:37:39 +0000 +++ msdos/ChangeLog 2011-11-08 06:35:37 +0000 @@ -1,3 +1,10 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9960). + * sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit. + * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@) + (GL_GENERATE_STDALIGN_H_FALSE): New edits. + 2011-10-31 Eli Zaretskii =20 * sed3v2.inp (insrcdir): Comment out definition. =3D=3D=3D modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2011-10-31 02:25:01 +0000 +++ msdos/sed2v2.inp 2011-11-01 05:03:56 +0000 @@ -35,7 +35,6 @@ /^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ -/^#undef HAVE_ATTRIBUTE_ALIGNED *$/s/^.*$/#define HAVE_ATTRIBUTE_ALIGNED= 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ @@ -119,4 +118,3 @@ # might be defined in sys/config.h we include at the top of config.h. /^#undef BSTRING/s|#undef|# undef| /^#undef .*$/s|^.*$|/* & */| - =3D=3D=3D modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-09-29 12:00:18 +0000 +++ msdos/sedlibmk.inp 2011-10-17 01:22:19 +0000 @@ -27,7 +27,7 @@ # otherwise edit them to zero: # # /^REPLACE_CALLOC *=3D/s/@REPLACE_CALLOC@/0/ -#=20 +# # . If the module is a header or adds headers, edit the corresponding # variable to either an empty value or to the name of the header. # Examples: @@ -547,6 +547,7 @@ /^SIZE_T_SUFFIX *=3D/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=3D/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=3D/s/@[^@\n]*@// +/^STDALIGN_H *=3D/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=3D/s/@[^@\n]*@// /^STDDEF_H *=3D/s/@[^@\n]*@// /^STDINT_H *=3D/s/@[^@\n]*@/stdint.h/ @@ -600,6 +601,8 @@ s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ s/^@GL_GENERATE_STDBOOL_H_FALSE@// +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ =3D=3D=3D modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-11-27 18:52:53 +0000 +++ nt/ChangeLog 2011-11-28 16:07:26 +0000 @@ -1,3 +1,8 @@ +2011-11-28 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9960). + * config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove. + 2011-11-27 Fabrice Popineau (tiny chang= e) =20 * inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs. =3D=3D=3D modified file 'nt/config.nt' --- nt/config.nt 2011-11-27 18:52:53 +0000 +++ nt/config.nt 2011-11-28 16:07:26 +0000 @@ -278,13 +278,6 @@ =20 /* Preprocessor macros needed for gnulib imports. */ =20 -/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. = */ -#ifdef __GNUC__ -#define HAVE_ATTRIBUTE_ALIGNED 1 -#else -#undef HAVE_ATTRIBUTE_ALIGNED -#endif - /* Define to 1 if strtold conforms to C99. */ #ifdef __GNUC__ #define HAVE_C99_STRTOLD 1 =3D=3D=3D modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-28 08:20:58 +0000 +++ src/ChangeLog 2011-11-28 16:07:26 +0000 @@ -1,3 +1,14 @@ +2011-11-08 Paul Eggert + + Use Gnulib stdalign module (Bug#9772, Bug#9960). + * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_LISP_OBJECT_ALIGNMENT) + (GC_POINTER_ALIGNMENT, pure_alloc): Simplify by using alignof. + (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values. + * lisp.h: Include . + (DECL_ALIGN): Simplify by using alignas. + Port to MSVC, by using ALIGN_GCTYPEBITS. + (ALIGN_GCTYPEBITS): New macro. + 2011-11-28 Paul Eggert =20 Remove GCPRO-related macros that exist only to avoid shadowing locals. =3D=3D=3D modified file 'src/alloc.c' --- src/alloc.c 2011-11-20 03:07:02 +0000 +++ src/alloc.c 2011-11-28 16:07:26 +0000 @@ -507,12 +507,7 @@ hold a size_t value and (2) the header size is a multiple of the alignment that Emacs needs for C types and for USE_LSB_TAG. */ #define XMALLOC_BASE_ALIGNMENT \ - offsetof ( \ - struct { \ - union { long double d; intmax_t i; void *p; } u; \ - char c; \ - }, \ - c) + alignof (union { long double d; intmax_t i; void *p; }) #ifdef USE_LSB_TAG /* A common multiple of the positive integers A and B. Ideally this would be the least common multiple, but there's no way to do that @@ -4235,15 +4230,15 @@ } =20 =20 -/* Alignment of Lisp_Object and pointer values. Use offsetof, as it +/* Alignment of Lisp_Object and pointer values. Use alignof, as it sometimes returns a smaller alignment than GCC's __alignof__ and mark_memory might miss objects if __alignof__ were used. For example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 but GC_LISP_OBJECT_ALIGNMENT should be 4. */ #ifndef GC_LISP_OBJECT_ALIGNMENT -# define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object = b;}, b) +# define GC_LISP_OBJECT_ALIGNMENT alignof (Lisp_Object) #endif -#define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) +#define GC_POINTER_ALIGNMENT alignof (void *) =20 /* Mark Lisp objects referenced from the address range START+OFFSET..END or END+OFFSET..START. */ @@ -4662,17 +4657,11 @@ #ifdef USE_LSB_TAG size_t alignment =3D (1 << GCTYPEBITS); #else - size_t alignment =3D sizeof (EMACS_INT); + size_t alignment =3D alignof (EMACS_INT); =20 /* Give Lisp_Floats an extra alignment. */ if (type =3D=3D Lisp_Float) - { -#if defined __GNUC__ && __GNUC__ >=3D 2 - alignment =3D __alignof (struct Lisp_Float); -#else - alignment =3D sizeof (struct Lisp_Float); -#endif - } + alignment =3D alignof (struct Lisp_Float); #endif =20 again: =3D=3D=3D modified file 'src/lisp.h' --- src/lisp.h 2011-11-28 08:20:58 +0000 +++ src/lisp.h 2011-11-28 16:07:26 +0000 @@ -20,6 +20,7 @@ #ifndef EMACS_LISP_H #define EMACS_LISP_H =20 +#include #include #include #include @@ -163,27 +164,8 @@ /* First, try and define DECL_ALIGN(type,var) which declares a static variable VAR of type TYPE with the added requirement that it be TYPEBITS-aligned. */ - -#ifndef GCTYPEBITS -#define GCTYPEBITS 3 -#endif - -#ifndef NO_DECL_ALIGN -# ifndef DECL_ALIGN -# if HAVE_ATTRIBUTE_ALIGNED -# define DECL_ALIGN(type, var) \ - type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var -# elif defined(_MSC_VER) -# define ALIGN_GCTYPEBITS 8 -# if (1 << GCTYPEBITS) !=3D ALIGN_GCTYPEBITS -# error ALIGN_GCTYPEBITS is wrong! -# endif -# define DECL_ALIGN(type, var) \ - type __declspec(align(ALIGN_GCTYPEBITS)) var -# else - /* What directives do other compilers use? */ -# endif -# endif +#ifdef alignas +# define DECL_ALIGN(type, var) type alignas (ALIGN_GCTYPEBITS) var #endif =20 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. = */ @@ -309,6 +291,14 @@ Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ }; =20 +#ifndef GCTYPEBITS +#define GCTYPEBITS 3 +#define ALIGN_GCTYPEBITS 8 /* This must be an integer constant, for MSVC= . */ +#endif +#if 1 << GCTYPEBITS !=3D ALIGN_GCTYPEBITS +# error "ALIGN_GCTYPEBITS is wrong!" +#endif + /* These values are overridden by the m- file on some machines. */ #ifndef VALBITS #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 13:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: mario@lassnig.net, Chong Yidong , 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132257513324557 (code B ref 9772); Tue, 29 Nov 2011 13:59:02 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 13:58:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVOCy-0006Nx-Dg for submit@debbugs.gnu.org; Tue, 29 Nov 2011 08:58:53 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVOCt-0006Ne-H6; Tue, 29 Nov 2011 08:58:48 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pATDucqW009480; Tue, 29 Nov 2011 08:56:39 -0500 Received: by pastel.home (Postfix, from userid 20848) id 6E5D94E758; Tue, 29 Nov 2011 08:56:38 -0500 (EST) From: Stefan Monnier Message-ID: References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> Date: Tue, 29 Nov 2011 08:56:38 -0500 In-Reply-To: <4ED4A5BE.80008@cs.ucla.edu> (Paul Eggert's message of "Tue, 29 Nov 2011 01:28:30 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4055=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4055> : streams <706259> : uri <1018290> X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > --- .bzrignore 2011-09-29 14:19:11 +0000 > +++ .bzrignore 2011-10-17 01:22:19 +0000 > @@ -53,6 +53,7 @@ > lib/c++defs.h > lib/getopt.h > lib/inttypes.h > +lib/stdalign.h > lib/stdbool.h > lib/stdio.h > lib/stdint.h Shouldn't these be covered by a glob lib/*.h instead? > + Use Gnulib stdalign module (Bug#9772, Bug#9960). As already explained, we don't want this change now. Syncing gnulib shouldn't impose such a change. Stefan From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: OSX breakage Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: mario@lassnig.net, cyd@gnu.org, 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132258495010063 (code B ref 9772); Tue, 29 Nov 2011 16:43:02 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 16:42:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVQlJ-0002c8-LU for submit@debbugs.gnu.org; Tue, 29 Nov 2011 11:42:30 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVQlF-0002bq-RZ; Tue, 29 Nov 2011 11:42:27 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LVF00600KVOCX00@a-mtaout20.012.net.il>; Tue, 29 Nov 2011 18:39:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.228.122.78]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LVF001NBKYDOGA1@a-mtaout20.012.net.il>; Tue, 29 Nov 2011 18:39:51 +0200 (IST) Date: Tue, 29 Nov 2011 18:39:56 +0200 From: Eli Zaretskii In-reply-to: <4ED4A5BE.80008@cs.ucla.edu> X-012-Sender: halo1@inter.net.il Message-id: <83obvu6fxf.fsf@gnu.org> References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Date: Tue, 29 Nov 2011 01:28:30 -0800 > From: Paul Eggert > CC: Eli Zaretskii , mario@lassnig.net, > 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org > > On 11/28/11 21:00, Chong Yidong wrote: > > As Eli pointed out in the discussion on bug#10155, there is already code > > in lib/unistd.in.h that apparently ought to handle this, but itsn't > > working. > > Here's a proposed patch to fix that, by having Emacs use Gnulib's > environ module. This syncs from Gnulib, and so it also brings > in the patches for Bug#9772 and Bug#9960. (It is possible to > pull out just the environ fix by hand, but that's an error-prone process > and I'd rather avoid it.) I have tested this on Fedora 15, > but not on OSX nor on Windows. FWIW, I'd very much prefer not to install such large changes a day or two before the next pretest. If the only practical way of fixing this within gnulib is the proposed changeset, I'd say let's just add a declaration of environ conditioned on OS X and FreeBSD. I don't like this solution, but I think on balance it has less potential for destabilizing the build. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 17:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: mario@lassnig.net, 9960@debbugs.gnu.org, Chong Yidong , 9772@debbugs.gnu.org, 10155@debbugs.gnu.org, Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132258605111690 (code B ref 9772); Tue, 29 Nov 2011 17:01:02 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 17:00:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVR32-00032N-6x for submit@debbugs.gnu.org; Tue, 29 Nov 2011 12:00:49 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVR2s-000320-U5; Tue, 29 Nov 2011 12:00:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1B8E8A6000B; Tue, 29 Nov 2011 08:58:37 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wy-IEH63CpAs; Tue, 29 Nov 2011 08:58:34 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BC0DCA60001; Tue, 29 Nov 2011 08:58:34 -0800 (PST) Message-ID: <4ED50F3A.8040207@cs.ucla.edu> Date: Tue, 29 Nov 2011 08:58:34 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 11/29/11 05:56, Stefan Monnier wrote: >> --- .bzrignore 2011-09-29 14:19:11 +0000 >> +++ .bzrignore 2011-10-17 01:22:19 +0000 >> @@ -53,6 +53,7 @@ >> lib/c++defs.h >> lib/getopt.h >> lib/inttypes.h >> +lib/stdalign.h >> lib/stdbool.h >> lib/stdio.h >> lib/stdint.h >=20 > Shouldn't these be covered by a glob lib/*.h instead? No, because the pattern "lib/*.h" would match many files that are checked in under bzr and that we don't want bzr to ignore, such as lib/allocator.h and lib/min-max.h. > Syncing gnulib shouldn't impose such a change. You're right, on further thought Emacs itself needn't use stdalign, and I've prepared a simpler patch (below) that omits all changes to src/*. Gnulib now uses stdalign, though, and Emacs uses multiple Gnulib modules such as sha256 that use stdalign, so this patch still brings in the stdalign module for Gnulib's own purposes. About 90% of the following patch is automatically generated by the sync from gnulib. The only parts that aren't automatic are the changes to Makefile.in, .bzrignore, config.bat, msdos/sedlibmk.inp, and the ChangeLog files. I've reordered the patch to list these changes first, for easier reviewing. I'm also CC'ing this to Eli as the proposed config.bat and msdos changes affect Microsoft builds. =3D=3D=3D modified file 'ChangeLog' --- ChangeLog 2011-11-27 18:33:17 +0000 +++ ChangeLog 2011-11-29 16:38:21 +0000 @@ -1,3 +1,19 @@ +2011-11-29 Paul Eggert + + Use Gnulib environ module, syncing from Gnulib. + * Makefile.in (GNULIB_MODULES): Add environ. + * m4/environ.m4: New file, from gnulib. + * lib/stdalign.in.h, m4/environ.m4, m4/stdalign.m4: + New files, from gnulib. + * .bzrignore: Add lib/stdalign.h. + * config.bat: Copy lib/stdalign.in.h to lib/stdalign.in-h as needed. + * doc/misc/texinfo.tex, lib/gettext.h, lib/gnulib.mk: + * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: + * lib/sigprocmask.c, lib/stdlib.in.h: + * m4/dup2.m4, m4/getopt.m4, m4/gl-comp.m4, m4/gnulib-common.m4: + * m4/include_next.m4, m4/pthread_sigmask.m4, m4/stdlib_h.m4: + * m4/unistd_h.m4: Merge from gnulib. + 2011-11-27 Jan Dj=E4rv =20 * configure.in: Check for gtk_window_set_has_resize_grip. =3D=3D=3D modified file 'Makefile.in' --- Makefile.in 2011-11-22 01:56:49 +0000 +++ Makefile.in 2011-11-29 16:38:21 +0000 @@ -334,7 +334,7 @@ GNULIB_MODULES =3D \ alloca-opt \ careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoast= r \ - dup2 \ + dup2 environ \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ mktime pthread_sigmask readlink \ socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat =3D=3D=3D modified file '.bzrignore' --- .bzrignore 2011-09-29 14:19:11 +0000 +++ .bzrignore 2011-11-29 16:38:21 +0000 @@ -53,6 +53,7 @@ lib/c++defs.h lib/getopt.h lib/inttypes.h +lib/stdalign.h lib/stdbool.h lib/stdio.h lib/stdint.h =3D=3D=3D modified file 'config.bat' --- config.bat 2011-10-31 17:49:10 +0000 +++ config.bat 2011-11-29 16:38:21 +0000 @@ -283,6 +283,7 @@ If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h = build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h @@ -346,4 +347,3 @@ set djgpp_ver=3D set sys_malloc=3D set libxml=3D - =3D=3D=3D modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-10-31 17:37:39 +0000 +++ msdos/ChangeLog 2011-11-29 16:38:21 +0000 @@ -1,3 +1,9 @@ +2011-11-29 Paul Eggert + + Adjust to Gnulib stdalign module. + * sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@) + (GL_GENERATE_STDALIGN_H_FALSE): New edits. + 2011-10-31 Eli Zaretskii =20 * sed3v2.inp (insrcdir): Comment out definition. =3D=3D=3D modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-09-29 12:00:18 +0000 +++ msdos/sedlibmk.inp 2011-11-29 16:38:21 +0000 @@ -27,7 +27,7 @@ # otherwise edit them to zero: # # /^REPLACE_CALLOC *=3D/s/@REPLACE_CALLOC@/0/ -#=20 +# # . If the module is a header or adds headers, edit the corresponding # variable to either an empty value or to the name of the header. # Examples: @@ -547,6 +547,7 @@ /^SIZE_T_SUFFIX *=3D/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=3D/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=3D/s/@[^@\n]*@// +/^STDALIGN_H *=3D/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=3D/s/@[^@\n]*@// /^STDDEF_H *=3D/s/@[^@\n]*@// /^STDINT_H *=3D/s/@[^@\n]*@/stdint.h/ @@ -600,6 +601,8 @@ s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ s/^@GL_GENERATE_STDBOOL_H_FALSE@// +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ =3D=3D=3D modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-11-25 13:26:30 +0000 +++ doc/misc/ChangeLog 2011-11-29 16:38:21 +0000 @@ -1,3 +1,7 @@ +2011-11-29 Paul Eggert + + * texinfo.tex: Sync from gnulib. + 2011-11-24 Glenn Morris =20 * gnus.texi, smtpmail.texi: Fix case of "GnuTLS". =3D=3D=3D modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2011-09-26 21:30:18 +0000 +++ doc/misc/texinfo.tex 2011-11-29 16:38:21 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2011-09-23.09} +\def\texinfoversion{2011-11-09.15} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -116,6 +116,7 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Inde= x is empty)}\fi @@ -1194,29 +1195,31 @@ \def\imagewidth{#2}\setbox0 =3D \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 =3D \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \let\pdfimgext=3D\empty \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp =3D \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -2372,7 +2375,9 @@ \else\ifx\next-% \else\ifx\next.% \else\ptexslash - \fi\fi\fi} + \fi\fi\fi + \aftersmartic +} =20 % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. @@ -2382,9 +2387,15 @@ % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} =20 +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic =3D \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=3D\saveaftersmartic}% + \smartslanted{#1}% +} + \let\i=3D\smartitalic \let\slanted=3D\smartslanted -\def\var#1{\smartslanted{#1}} \let\dfn=3D\smartslanted \let\emph=3D\smartitalic =20 @@ -2480,7 +2491,7 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } =20 % We *must* turn on hyphenation at `-' and `_' in @code. @@ -2762,6 +2773,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=3D1000 } =20 % @abbr for "Comput. J." and the like. @@ -2774,6 +2786,7 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=3D1000 } =20 % @asis just yields its argument. Used with @table, for example. @@ -2979,7 +2992,7 @@ {\tentt \global\dimen0 =3D 3em}% Width of the box. \dimen2 =3D .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.= ) -\setbox0 =3D \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +\setbox0 =3D \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=3D\hbox to \dimen0{\hfil \hsize =3D \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -8103,7 +8116,7 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =3D0 } =20 -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=3D\comment =20 {\catcode `\@=3D11 @@ -8166,6 +8179,8 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=3D11 =3D=3D=3D modified file 'lib/gettext.h' --- lib/gettext.h 2011-02-15 04:53:29 +0000 +++ lib/gettext.h 2011-11-29 16:38:21 +0000 @@ -185,7 +185,7 @@ #include =20 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >=3D 3 || __GNUG__ >=3D 2) && !__STRICT_ANSI__) \ + (((__GNUC__ >=3D 3 || __GNUG__ >=3D 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >=3D 199901L */ ) =20 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS =3D=3D=3D modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-09-26 21:30:18 +0000 +++ lib/gnulib.mk 2011-11-29 16:38:21 +0000 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoid=3Dpathmax -= -avoid=3Draise --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditio= nal-dependencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-op= t careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr= dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime p= thread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax= symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoid=3Dpathmax -= -avoid=3Draise --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditio= nal-dependencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-op= t careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr= dup2 environ filemode getloadavg getopt-gnu ignore-value intprops lstat = mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax s= trtoumax symlink sys_stat =20 =20 MOSTLYCLEANFILES +=3D core *.stackdump @@ -421,6 +421,29 @@ =20 ## end gnulib module stat =20 +## begin gnulib module stdalign + +BUILT_SOURCES +=3D $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES +=3D stdalign.h stdalign.h-t + +EXTRA_DIST +=3D stdalign.in.h + +## end gnulib module stdalign + ## begin gnulib module stdarg =20 BUILT_SOURCES +=3D $(STDARG_H) @@ -710,7 +733,9 @@ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ @@ -736,7 +761,9 @@ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ @@ -754,6 +781,7 @@ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ @@ -1004,7 +1032,7 @@ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/= g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOC= KING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g'= \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ =3D=3D=3D modified file 'lib/md5.c' --- lib/md5.c 2011-02-19 07:28:29 +0000 +++ lib/md5.c 2011-11-29 16:38:21 +0000 @@ -24,7 +24,8 @@ =20 #include "md5.h" =20 -#include +#include +#include #include #include #include @@ -254,8 +255,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha1.c' --- lib/sha1.c 2011-05-24 08:12:52 +0000 +++ lib/sha1.c 2011-11-29 16:38:21 +0000 @@ -26,7 +26,8 @@ =20 #include "sha1.h" =20 -#include +#include +#include #include #include =20 @@ -241,8 +242,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha256.c' --- lib/sha256.c 2011-11-20 03:48:53 +0000 +++ lib/sha256.c 2011-11-29 16:38:21 +0000 @@ -24,7 +24,8 @@ =20 #include "sha256.h" =20 -#include +#include +#include #include #include =20 @@ -51,7 +52,7 @@ =20 /* Takes a pointer to a 256 bit block of data (eight 32 bit ints) and - initializes it to the start constants of the SHA256 algorithm. This + intializes it to the start constants of the SHA256 algorithm. This must be called before using hash in the call to sha256_hash */ void @@ -373,8 +374,7 @@ if (len >=3D 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 64) { =3D=3D=3D modified file 'lib/sha512.c' --- lib/sha512.c 2011-11-20 03:48:53 +0000 +++ lib/sha512.c 2011-11-29 16:38:21 +0000 @@ -24,7 +24,8 @@ =20 #include "sha512.h" =20 -#include +#include +#include #include #include =20 @@ -58,7 +59,7 @@ =20 /* Takes a pointer to a 512 bit block of data (eight 64 bit ints) and - initializes it to the start constants of the SHA512 algorithm. This + intializes it to the start constants of the SHA512 algorithm. This must be called before using hash in the call to sha512_hash */ void @@ -381,8 +382,7 @@ if (len >=3D 128) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (u64) !=3D 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) !=3D 0) if (UNALIGNED_P (buffer)) while (len > 128) { =3D=3D=3D modified file 'lib/sigprocmask.c' --- lib/sigprocmask.c 2011-10-07 21:15:00 +0000 +++ lib/sigprocmask.c 2011-11-29 16:38:21 +0000 @@ -344,5 +344,6 @@ else if (handler !=3D SIG_IGN) (*handler) (SIGPIPE); } + return 0; } #endif =3D=3D=3D added file 'lib/stdalign.in.h' --- lib/stdalign.in.h 1970-01-01 00:00:00 +0000 +++ lib/stdalign.in.h 2011-11-29 16:38:21 +0000 @@ -0,0 +1,89 @@ +/* A substitute for ISO C 1x . + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundatio= n, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *= / + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C1X for platforms that lack it. + + References: + ISO C1X + sections 6.5.3.4, 6.7.5, 7.15. + C++0X + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's __alignof__ operator, which can yield a + better-performing alignment for an object of that type. For + example, on x86 with GCC, __alignof__ (double) and __alignof__ + (long long) are 8, whereas alignof (double) and alignof (long long) + are 4 unless the option '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following draft C1X requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <=3D __SUNPRO_C +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +#elif 1300 <=3D _MSC_VER +# define _Alignas(a) __declspec (align (a)) +#endif +#ifdef _Alignas +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ =3D=3D=3D modified file 'lib/stdlib.in.h' --- lib/stdlib.in.h 2011-07-24 22:15:47 +0000 +++ lib/stdlib.in.h 2011-11-29 16:38:21 +0000 @@ -247,7 +247,7 @@ #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif @@ -423,6 +423,22 @@ # endif #endif =20 +#if @GNULIB_POSIX_OPENPT@ +/* Return an FD open to the master side of a pseudo-terminal. Flags sho= uld + include O_RDWR, and may also include O_NOCTTY. */ +# if !@HAVE_POSIX_OPENPT@ +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +_GL_CXXALIASWARN (posix_openpt); +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ @@ -439,6 +455,32 @@ # endif #endif =20 +#if @GNULIB_PTSNAME_R@ +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if @REPLACE_PTSNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !@HAVE_PTSNAME_R@ +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) =3D=3D=3D modified file 'm4/dup2.m4' --- m4/dup2.m4 2011-09-26 21:30:18 +0000 +++ m4/dup2.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -#serial 16 +#serial 17 dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, = Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -67,7 +67,9 @@ m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR =3D 0; then - REPLACE_DUP2=3D1 + if test $HAVE_DUP2 =3D 1; then + REPLACE_DUP2=3D1 + fi fi ]) ]) =3D=3D=3D added file 'm4/environ.m4' --- m4/environ.m4 1970-01-01 00:00:00 +0000 +++ m4/environ.m4 2011-11-29 16:38:21 +0000 @@ -0,0 +1,47 @@ +# environ.m4 serial 6 +dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN_ONCE([gl_ENVIRON], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl Persuade glibc to declare environ. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + gt_CHECK_VAR_DECL( + [#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + ], + [environ]) + if test $gt_cv_var_environ_declaration !=3D yes; then + HAVE_DECL_ENVIRON=3D0 + fi +]) + +# Check if a variable is properly declared. +# gt_CHECK_VAR_DECL(includes,variable) +AC_DEFUN([gt_CHECK_VAR_DECL], +[ + define([gt_cv_var], [gt_cv_var_]$2[_declaration]) + AC_MSG_CHECKING([if $2 is properly declared]) + AC_CACHE_VAL([gt_cv_var], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[$1 + extern struct { int foo; } $2;]], + [[$2.foo =3D 1;]])], + [gt_cv_var=3Dno], + [gt_cv_var=3Dyes])]) + AC_MSG_RESULT([$gt_cv_var]) + if test $gt_cv_var =3D yes; then + AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, + [Define if you have the declaration of $2.]) + fi + undefine([gt_cv_var]) +]) =3D=3D=3D modified file 'm4/getopt.m4' --- m4/getopt.m4 2011-07-24 22:15:47 +0000 +++ m4/getopt.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -# getopt.m4 serial 38 +# getopt.m4 serial 39 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -25,8 +25,6 @@ if test $REPLACE_GETOPT =3D 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER - dnl Arrange for unistd.h to include getopt.h. - GNULIB_UNISTD_H_GETOPT=3D1 fi ]) =20 =3D=3D=3D modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-10-07 21:15:00 +0000 +++ m4/gl-comp.m4 2011-11-29 16:38:21 +0000 @@ -48,6 +48,7 @@ # Code from module dosname: # Code from module dtoastr: # Code from module dup2: + # Code from module environ: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module filemode: @@ -76,6 +77,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, @@ -130,6 +132,8 @@ gl_PREREQ_DUP2 fi gl_UNISTD_MODULE_INDICATOR([dup2]) +gl_ENVIRON +gl_UNISTD_MODULE_INDICATOR([environ]) gl_FILEMODE gl_GETLOADAVG if test $HAVE_GETLOADAVG =3D 0; then @@ -142,14 +146,20 @@ AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=3D1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT =3D 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=3D1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) AC_REQUIRE([AC_C_INLINE]) gl_INTTYPES_INCOMPLETE gl_FUNC_LSTAT @@ -180,6 +190,7 @@ gl_SIGNAL_H gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T +gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H @@ -311,18 +322,18 @@ if test $HAVE_READLINK =3D 0 || test $REPLACE_READLINK =3D 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax =3D no; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoimax =3D no && test $ac_cv_type_long_long_int= =3D yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax =3D no; then + if test $ac_cv_func_strtoimax =3D no; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax =3D no && test $ac_cv_type_unsigned_long= _long_int =3D yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax =3D no; then + func_gl_gnulib_m4code_verify + fi m4_pattern_allow([^gl_GNULIB_ENABLED_]) AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosnam= e]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [= $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) @@ -513,6 +524,7 @@ lib/signal.in.h lib/sigprocmask.c lib/stat.c + lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h @@ -538,6 +550,7 @@ m4/alloca.m4 m4/c-strtod.m4 m4/dup2.m4 + m4/environ.m4 m4/extensions.m4 m4/filemode.m4 m4/getloadavg.m4 @@ -563,6 +576,7 @@ m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat.m4 + m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 =3D=3D=3D modified file 'm4/gnulib-common.m4' --- m4/gnulib-common.m4 2011-10-07 21:15:00 +0000 +++ m4/gnulib-common.m4 2011-11-29 16:38:21 +0000 @@ -18,7 +18,7 @@ # if (3 <=3D __GNUC__ || (__GNUC__ =3D=3D 2 && 8 <=3D __GNUC_MINOR__) \ || 0x5110 <=3D __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <=3D _MSC_VER +# elif defined _MSC_VER && 1200 <=3D _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn =3D=3D=3D modified file 'm4/include_next.m4' --- m4/include_next.m4 2011-09-26 21:30:18 +0000 +++ m4/include_next.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 22 +# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -219,12 +219,17 @@ gl_dirsep_regex=3D'[/\\]' ;; *) - gl_dirsep_regex=3D'/' + gl_dirsep_regex=3D'\/' ;; esac + dnl A sed expression that turns a string into a basic reg= ular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed=3D's,[]$^\\.*/[],\\&,g' changequote([,]) - gl_absolute_header_sed=3D'\|'"${gl_dirsep_regex}"']m4_def= n([gl_HEADER_NAME])[|{ - s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NA= ME])[\)".*|\1| + gl_header_literal_regex=3D`echo ']m4_defn([gl_HEADER_NAME= ])[' \ + | sed -e "$gl_make_literal_regex= _sed"` + gl_absolute_header_sed=3D"/${gl_dirsep_regex}${gl_header_= literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_rege= x}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl =3D=3D=3D modified file 'm4/pthread_sigmask.m4' --- m4/pthread_sigmask.m4 2011-09-03 23:08:32 +0000 +++ m4/pthread_sigmask.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ =20 AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK=3D =20 =3D=3D=3D added file 'm4/stdalign.m4' --- m4/stdalign.m4 1970-01-01 00:00:00 +0000 +++ m4/stdalign.m4 2011-11-29 16:38:21 +0000 @@ -0,0 +1,22 @@ +# Check for stdalign.h that conforms to C1x. + +dnl Copyright 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CHECK_HEADERS_ONCE([stdalign.h]) + + if test $ac_cv_header_stdalign_h =3D yes; then + STDALIGN_H=3D'' + else + STDALIGN_H=3D'stdalign.h' + fi + + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) =3D=3D=3D modified file 'm4/stdlib_h.m4' --- m4/stdlib_h.m4 2011-02-25 07:36:37 +0000 +++ m4/stdlib_h.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 37 +# stdlib_h.m4 serial 39 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,10 +19,10 @@ #if HAVE_RANDOM_H # include #endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt= mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r sran= dom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt + ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srando= m_r + strtod strtoll strtoull unlockpt unsetenv]) ]) =20 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -50,7 +50,9 @@ GNULIB_MKOSTEMPS=3D0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=3D0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=3D0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_POSIX_OPENPT=3D0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=3D0; AC_SUBST([GNULIB_PTSNAME]) + GNULIB_PTSNAME_R=3D0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=3D0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=3D0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=3D0; AC_SUBST([GNULIB_REALLOC_POSIX]) @@ -76,7 +78,9 @@ HAVE_MKOSTEMPS=3D1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=3D1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=3D1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_POSIX_OPENPT=3D1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=3D1; AC_SUBST([HAVE_PTSNAME]) + HAVE_PTSNAME_R=3D1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM_H=3D1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=3D1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=3D1; AC_SUBST([HAVE_REALPATH]) @@ -95,6 +99,7 @@ REPLACE_MALLOC=3D0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=3D0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=3D0; AC_SUBST([REPLACE_MKSTEMP]) + REPLACE_PTSNAME_R=3D0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=3D0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALLOC=3D0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=3D0; AC_SUBST([REPLACE_REALPATH]) =3D=3D=3D modified file 'm4/unistd_h.m4' --- m4/unistd_h.m4 2011-09-26 21:30:18 +0000 +++ m4/unistd_h.m4 2011-11-29 16:38:21 +0000 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 61 +# unistd_h.m4 serial 62 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -98,7 +98,6 @@ GNULIB_SYMLINK=3D0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=3D0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=3D0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_GETOPT=3D0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING= ]) GNULIB_UNISTD_H_SIGPIPE=3D0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=3D0; AC_SUBST([GNULIB_UNLINK]) From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: mario@lassnig.net, 9960@debbugs.gnu.org, cyd@gnu.org, 9772@debbugs.gnu.org, 10155@debbugs.gnu.org, monnier@IRO.UMontreal.CA Reply-To: Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132258796314597 (code B ref 9772); Tue, 29 Nov 2011 17:33:02 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 17:32:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVRXv-0003nN-1M for submit@debbugs.gnu.org; Tue, 29 Nov 2011 12:32:43 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVRXn-0003mw-IV; Tue, 29 Nov 2011 12:32:36 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LVF00600LZ0JM00@a-mtaout20.012.net.il>; Tue, 29 Nov 2011 19:30:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.228.122.78]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LVF005P5NAMASH0@a-mtaout20.012.net.il>; Tue, 29 Nov 2011 19:30:24 +0200 (IST) Date: Tue, 29 Nov 2011 19:30:30 +0200 From: Eli Zaretskii In-reply-to: <4ED50F3A.8040207@cs.ucla.edu> X-012-Sender: halo1@inter.net.il Message-id: <83k46i6dl5.fsf@gnu.org> References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Date: Tue, 29 Nov 2011 08:58:34 -0800 > From: Paul Eggert > CC: Chong Yidong , mario@lassnig.net, 9772@debbugs.gnu.org, > 9960@debbugs.gnu.org, 10155@debbugs.gnu.org, > Eli Zaretskii > > You're right, on further thought Emacs itself needn't use stdalign, > and I've prepared a simpler patch (below) that omits all changes to > src/*. Gnulib now uses stdalign, though, and Emacs uses > multiple Gnulib modules such as sha256 that use stdalign, so > this patch still brings in the stdalign module for Gnulib's own > purposes. I understand that the only part needed for solving the problems with the missing declaration of `environ' is this: > === added file 'm4/environ.m4' > --- m4/environ.m4 1970-01-01 00:00:00 +0000 > +++ m4/environ.m4 2011-11-29 16:38:21 +0000 > @@ -0,0 +1,47 @@ > +# environ.m4 serial 6 > +dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. > +dnl This file is free software; the Free Software Foundation > +dnl gives unlimited permission to copy and/or distribute it, > +dnl with or without modifications, as long as this notice is preserved. > + > +AC_DEFUN_ONCE([gl_ENVIRON], > +[ > + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) > + dnl Persuade glibc to declare environ. > + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) > + > + AC_CHECK_HEADERS_ONCE([unistd.h]) > + gt_CHECK_VAR_DECL( > + [#if HAVE_UNISTD_H > + #include > + #endif > + /* mingw, BeOS, Haiku declare environ in , not in . */ > + #include > + ], > + [environ]) > + if test $gt_cv_var_environ_declaration != yes; then > + HAVE_DECL_ENVIRON=0 > + fi > +]) IOW, the reason why lib/unistd.in.h didn't do its job is that HAVE_DECL_ENVIRON was not defined to zero. If that is true, I wonder if we could have a much smaller change that fixes just that single problem. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2011 18:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: mario@lassnig.net, 9960@debbugs.gnu.org, cyd@gnu.org, 9772@debbugs.gnu.org, 10155@debbugs.gnu.org, monnier@IRO.UMontreal.CA Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132259106619408 (code B ref 9772); Tue, 29 Nov 2011 18:25:01 +0000 Received: (at 9772) by debbugs.gnu.org; 29 Nov 2011 18:24:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVSLy-00052u-4i for submit@debbugs.gnu.org; Tue, 29 Nov 2011 13:24:26 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVSLu-000523-OJ; Tue, 29 Nov 2011 13:24:24 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7838DA6000B; Tue, 29 Nov 2011 10:22:20 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hlj4orsUZX2d; Tue, 29 Nov 2011 10:22:20 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 172DDA60001; Tue, 29 Nov 2011 10:22:20 -0800 (PST) Message-ID: <4ED522DB.3080005@cs.ucla.edu> Date: Tue, 29 Nov 2011 10:22:19 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> In-Reply-To: <83k46i6dl5.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 11/29/11 09:30, Eli Zaretskii wrote: > I wonder if we could have a much smaller change that > fixes just that single problem. Yes we could, though it would involve more of the patch than the part that you've identified, and it would involve some other stuff done by hand. The simplest way to think about it is, I expect, is that it would be a fork of gnulib. I could look into preparing such a patch but it would take some time and would introduce other reliability concerns, so I hope I don't have to do that.... From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: OSX breakage Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 02:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: mario@lassnig.net, Paul Eggert , 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.1322620051309 (code B ref 9772); Wed, 30 Nov 2011 02:28:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 02:27:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVZtT-00004r-Ho for submit@debbugs.gnu.org; Tue, 29 Nov 2011 21:27:31 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVZtQ-0008WB-Lf; Tue, 29 Nov 2011 21:27:29 -0500 Received: from [155.69.16.255] (port=16282 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RVZtN-0000pf-Gy; Tue, 29 Nov 2011 21:27:26 -0500 From: Chong Yidong References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <83obvu6fxf.fsf@gnu.org> Date: Wed, 30 Nov 2011 10:27:16 +0800 In-Reply-To: <83obvu6fxf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 29 Nov 2011 18:39:56 +0200") Message-ID: <87d3cajqez.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Eli Zaretskii writes: >> Here's a proposed patch to fix that, by having Emacs use Gnulib's >> environ module. This syncs from Gnulib, and so it also brings >> in the patches for Bug#9772 and Bug#9960. (It is possible to >> pull out just the environ fix by hand, but that's an error-prone process >> and I'd rather avoid it.) I have tested this on Fedora 15, >> but not on OSX nor on Windows. > > FWIW, I'd very much prefer not to install such large changes a day or > two before the next pretest. If the only practical way of fixing this > within gnulib is the proposed changeset, I'd say let's just add a > declaration of environ conditioned on OS X and FreeBSD. I don't like > this solution, but I think on balance it has less potential for > destabilizing the build. Agreed. Paul, can you pick out just the environ fix? If not, we should go with the ifdefs as Eli suggested, and leave any Gnulib synch for post-24.1. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: mario@lassnig.net, Eli Zaretskii , 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.13226211591952 (code B ref 9772); Wed, 30 Nov 2011 02:46:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 02:45:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVaBK-0000VL-TG for submit@debbugs.gnu.org; Tue, 29 Nov 2011 21:45:59 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVaBH-0000V5-IQ; Tue, 29 Nov 2011 21:45:56 -0500 Received: from [155.69.16.255] (port=25824 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RVaBE-0001pr-LX; Tue, 29 Nov 2011 21:45:53 -0500 From: Chong Yidong References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> Date: Wed, 30 Nov 2011 10:45:42 +0800 In-Reply-To: <4ED522DB.3080005@cs.ucla.edu> (Paul Eggert's message of "Tue, 29 Nov 2011 10:22:19 -0800") Message-ID: <87sjl6iazt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Paul Eggert writes: > On 11/29/11 09:30, Eli Zaretskii wrote: >> I wonder if we could have a much smaller change that >> fixes just that single problem. > > Yes we could, though it would involve more of the patch > than the part that you've identified, and it would involve > some other stuff done by hand. The simplest way to think > about it is, I expect, is that it would be a fork of gnulib. > I could look into preparing such a patch but it would take > some time and would introduce other reliability concerns, > so I hope I don't have to do that.... OK, then let's go with the ifdef conditioning directly in the Emacs sources. But is conditioning on OS X and FreeBSD the right thing? We don't know if it fails on other BSDs. Since revno 106533 was intended to fix the MS-WINDOWS build, I think it's better to condition it for WINDOWSNT for now, as below: Eli, WDYT? === modified file 'lib-src/emacsclient.c' *** lib-src/emacsclient.c 2011-11-27 18:52:53 +0000 --- lib-src/emacsclient.c 2011-11-30 02:44:47 +0000 *************** *** 1635,1640 **** --- 1635,1645 ---- /* Send over our environment and current directory. */ if (!current_frame) { + #ifndef WINDOWSNT + /* This is defined in stdlib.h on MS-Windows. It's defined in + unistd.h on some POSIX hosts, but not all (Bug#10155). */ + extern char **environ; + #endif int i; for (i = 0; environ[i]; i++) { From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 04:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Chong Yidong Cc: mario@lassnig.net, eggert@cs.ucla.edu, 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.13226259169008 (code B ref 9772); Wed, 30 Nov 2011 04:06:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 04:05:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVbQ4-0002L9-AQ for submit@debbugs.gnu.org; Tue, 29 Nov 2011 23:05:16 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVbPx-0002Ko-ME; Tue, 29 Nov 2011 23:05:11 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LVG00F00GMOI000@a-mtaout22.012.net.il>; Wed, 30 Nov 2011 06:04:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.185.72]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LVG00FR7GO4FJ30@a-mtaout22.012.net.il>; Wed, 30 Nov 2011 06:04:53 +0200 (IST) Date: Wed, 30 Nov 2011 06:04:20 +0200 From: Eli Zaretskii In-reply-to: <87sjl6iazt.fsf@gnu.org> X-012-Sender: halo1@inter.net.il Message-id: <83ehwq5k8r.fsf@gnu.org> References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> <87sjl6iazt.fsf@gnu.org> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Chong Yidong > Cc: Eli Zaretskii , mario@lassnig.net, 9960@debbugs.gnu.org, 9772@debbugs.gnu.org, 10155@debbugs.gnu.org > Date: Wed, 30 Nov 2011 10:45:42 +0800 > > OK, then let's go with the ifdef conditioning directly in the Emacs > sources. > > But is conditioning on OS X and FreeBSD the right thing? We don't know > if it fails on other BSDs. Since revno 106533 was intended to fix the > MS-WINDOWS build, I think it's better to condition it for WINDOWSNT for > now, as below: > > Eli, WDYT? Fine with me. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: mario@lassnig.net, eggert@cs.ucla.edu, 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132264089131057 (code B ref 9772); Wed, 30 Nov 2011 08:15:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 08:14:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVfJa-00084k-Ji for submit@debbugs.gnu.org; Wed, 30 Nov 2011 03:14:51 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVfJX-00084S-3e; Wed, 30 Nov 2011 03:14:47 -0500 Received: from cm133.sigma4.maxonline.com.sg ([218.212.4.133]:32889 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RVfJS-0004W8-Ru; Wed, 30 Nov 2011 03:14:43 -0500 From: Chong Yidong References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> <87sjl6iazt.fsf@gnu.org> <83ehwq5k8r.fsf@gnu.org> Date: Wed, 30 Nov 2011 16:14:28 +0800 In-Reply-To: <83ehwq5k8r.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 30 Nov 2011 06:04:20 +0200") Message-ID: <874nxm10yj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Eli Zaretskii writes: >> OK, then let's go with the ifdef conditioning directly in the Emacs >> sources. >> >> But is conditioning on OS X and FreeBSD the right thing? We don't know >> if it fails on other BSDs. Since revno 106533 was intended to fix the >> MS-WINDOWS build, I think it's better to condition it for WINDOWSNT for >> now, as below: >> >> Eli, WDYT? > > Fine with me. Done. Could someone check if compilation on Mac OS X works now? From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: bug#9772: bug#10155: OSX breakage Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Chong Yidong Cc: mario@lassnig.net, eggert@cs.ucla.edu, 9960@debbugs.gnu.org, 9772@debbugs.gnu.org, 10155@debbugs.gnu.org, Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132267534021529 (code B ref 9772); Wed, 30 Nov 2011 17:49:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 17:49:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVoHE-0005bB-D3 for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:49:00 -0500 Received: from mailout.melmac.se ([62.20.26.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVoHB-0005aq-If for 9772@debbugs.gnu.org; Wed, 30 Nov 2011 12:48:58 -0500 Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 6CB07C8AE for <9772@debbugs.gnu.org>; Wed, 30 Nov 2011 18:48:51 +0100 (CET) Received: (qmail 5097 invoked by uid 89); 30 Nov 2011 16:48:39 -0000 Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 30 Nov 2011 16:48:39 -0000 Received: from anon-24-151.ipredate.net (unknown [93.182.151.24]) by coolsville.localdomain (Postfix) with ESMTPSA id 44CE57FA058; Wed, 30 Nov 2011 18:48:50 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Jan =?UTF-8?Q?Dj=C3=A4rv?= In-Reply-To: <874nxm10yj.fsf@gnu.org> Date: Wed, 30 Nov 2011 18:48:49 +0100 Content-Transfer-Encoding: 7bit Message-Id: <36469E4B-8FD4-4371-A399-AD80B0E781EC@swipnet.se> References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> <87sjl6iazt.fsf@gnu.org> <83ehwq5k8r.fsf@gnu.org> <874nxm10yj.fsf@gnu.org> X-Mailer: Apple Mail (2.1251.1) X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) 30 nov 2011 kl. 09:14 skrev Chong Yidong: > Eli Zaretskii writes: > >>> OK, then let's go with the ifdef conditioning directly in the Emacs >>> sources. >>> >>> But is conditioning on OS X and FreeBSD the right thing? We don't know >>> if it fails on other BSDs. Since revno 106533 was intended to fix the >>> MS-WINDOWS build, I think it's better to condition it for WINDOWSNT for >>> now, as below: >>> >>> Eli, WDYT? >> >> Fine with me. > > Done. Could someone check if compilation on Mac OS X works now? > > It does. Jan D. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Mario Lassnig Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Chong Yidong Cc: Eli Zaretskii , eggert@cs.ucla.edu, 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155@debbugs.gnu.org Reply-To: mario@lassnig.net Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132267547821812 (code B ref 9772); Wed, 30 Nov 2011 17:52:02 +0000 Received: (at 9772) by debbugs.gnu.org; 30 Nov 2011 17:51:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVoJR-0005fd-H7 for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:51:18 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVi8D-0003lx-Ed; Wed, 30 Nov 2011 06:15:18 -0500 Received: by eabm6 with SMTP id m6so572227eab.3 for ; Wed, 30 Nov 2011 03:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=1sVkLymGjilbix40GGEK9+q/6I4v7QmSDw6WT3jhGwo=; b=TaoyFsGyaqRFCiEY5BTkoF/NKaDZf+uFBPaBy+rI1vNmgTAh2iLJFrxy187PtYt287 LyccluNL6nVke6Ky4FcvJBa5uTbS7PYB7QwpsuBTKbF1Ofe1L4IdRnmWr+uaHlILsjQB JcRZ9ZzBdF7Np3448u1HWgISmU3pLRVxrZXH4= Received: by 10.180.74.141 with SMTP id t13mr1301004wiv.68.1322651713318; Wed, 30 Nov 2011 03:15:13 -0800 (PST) Received: from macatlas666.cern.ch (macatlas666.cern.ch. [137.138.205.22]) by mx.google.com with ESMTPS id dw6sm447088wib.12.2011.11.30.03.15.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Nov 2011 03:15:11 -0800 (PST) Message-ID: <4ED6103E.1030405@lassnig.net> Date: Wed, 30 Nov 2011 12:15:10 +0100 From: Mario Lassnig User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> <87sjl6iazt.fsf@gnu.org> <83ehwq5k8r.fsf@gnu.org> <874nxm10yj.fsf@gnu.org> In-Reply-To: <874nxm10yj.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.6 (---) X-Mailman-Approved-At: Wed, 30 Nov 2011 12:51:13 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On 11-11-30 9:14 , Chong Yidong wrote: > Eli Zaretskii writes: > >>> OK, then let's go with the ifdef conditioning directly in the Emacs >>> sources. >>> >>> But is conditioning on OS X and FreeBSD the right thing? We don't know >>> if it fails on other BSDs. Since revno 106533 was intended to fix the >>> MS-WINDOWS build, I think it's better to condition it for WINDOWSNT for >>> now, as below: >>> >>> Eli, WDYT? >> >> Fine with me. > > Done. Could someone check if compilation on Mac OS X works now? Looks good to me. Compiles, installs, runs. :-) Thanks, Mario Mario@shodan:~/Development/emacs$ bzr clone bzr://bzr.savannah.gnu.org/emacs/trunk/ The command 'bzr clone' has been deprecated in bzr 2.4. Please use 'bzr branch' instead. Branched 106554 revision(s). Mario@shodan:~/Development/emacs$ cd trunk/ Mario@shodan:~/Development/emacs/trunk$ echo $CFLAGS -march=core2 -msse4.1 Mario@shodan:~/Development/emacs/trunk$ echo $CC Mario@shodan:~/Development/emacs/trunk$ which gcc /usr/bin/gcc Mario@shodan:~/Development/emacs/trunk$ gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Mario@shodan:~/Development/emacs/trunk$ sh autogen.sh Checking whether you have the necessary tools... (Read INSTALL.BZR for more details on building Emacs) Checking for autoconf (need at least version 2.65)... ok Checking for automake (need at least version 1.11)... ok Your system has the required tools, running autoreconf... configure.in:635: installing `build-aux/compile' configure.in:379: installing `build-aux/config.guess' configure.in:379: installing `build-aux/config.sub' configure.in:29: installing `build-aux/install-sh' configure.in:29: installing `build-aux/missing' lib/Makefile.am: installing `build-aux/depcomp' You can now run `./configure'. Mario@shodan:~/Development/emacs/trunk$ ./configure --with-ns Configured for `x86_64-apple-darwin11.2.0'. Where should the build process find the source code? /Users/Mario/Development/emacs/trunk What operating system and machine description files should Emacs use? `s/darwin.h' and `m/amdx86-64.h' What compiler should emacs be built with? gcc -std=gnu99 -march=core2 -msse4.1 Should Emacs use the GNU version of malloc? no (The GNU allocators don't work with this system configuration.) Should Emacs use a relocating allocator for buffers? no Should Emacs use mmap(2) for buffer allocation? no What window system should Emacs use? nextstep What toolkit should Emacs use? none Where do we find X Windows header files? Standard dirs Where do we find X Windows libraries? /usr/X11/lib Does Emacs use -lXaw3d? no Does Emacs use -lXpm? no Does Emacs use -ljpeg? no Does Emacs use -ltiff? no Does Emacs use a gif library? no Does Emacs use -lpng? no Does Emacs use -lrsvg-2? yes Does Emacs use imagemagick? no Does Emacs use -lgpm? no Does Emacs use -ldbus? no Does Emacs use -lgconf? no Does Emacs use GSettings? no Does Emacs use -lselinux? no Does Emacs use -lgnutls? yes Does Emacs use -lxml2? yes Does Emacs use -lfreetype? no Does Emacs use -lm17n-flt? no Does Emacs use -lotf? no Does Emacs use -lxft? no Does Emacs use toolkit scroll bars? yes From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: bug#10155: OSX breakage Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Dec 2011 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: mario@lassnig.net Cc: Eli Zaretskii , Chong Yidong , 9772@debbugs.gnu.org, 9960@debbugs.gnu.org, 10155-done@debbugs.gnu.org Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.132275599118698 (code B ref 9772); Thu, 01 Dec 2011 16:14:02 +0000 Received: (at 9772) by debbugs.gnu.org; 1 Dec 2011 16:13:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW9G3-0004rS-2b for submit@debbugs.gnu.org; Thu, 01 Dec 2011 11:13:11 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW9G0-0004rD-9l; Thu, 01 Dec 2011 11:13:08 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 4619539E800B; Thu, 1 Dec 2011 08:12:58 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DBmu9p49RyG0; Thu, 1 Dec 2011 08:12:57 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E6C1C39E8008; Thu, 1 Dec 2011 08:12:57 -0800 (PST) Message-ID: <4ED7A789.7070602@cs.ucla.edu> Date: Thu, 01 Dec 2011 08:12:57 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 References: <4ED3AA79.8060605@lassnig.net> <838vn06swa.fsf@gnu.org> <4ED3DA30.1050006@cs.ucla.edu> <871usrh69t.fsf@gnu.org> <4ED4A5BE.80008@cs.ucla.edu> <4ED50F3A.8040207@cs.ucla.edu> <83k46i6dl5.fsf@gnu.org> <4ED522DB.3080005@cs.ucla.edu> <87sjl6iazt.fsf@gnu.org> <83ehwq5k8r.fsf@gnu.org> <874nxm10yj.fsf@gnu.org> <4ED6103E.1030405@lassnig.net> In-Reply-To: <4ED6103E.1030405@lassnig.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 11/30/11 03:15, Mario Lassnig wrote: > Looks good to me. Compiles, installs, runs. Thanks for checking. I'll mark Bug#10155 as done since the bug itself is fixed. The cleaner fix for 'environ' can wait until after Emacs 24 is out. From unknown Sat Aug 16 18:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9772: , USE_LSB_TAG, and MSVC References: <4E9B9FEF.7020207@cs.ucla.edu> In-Reply-To: <4E9B9FEF.7020207@cs.ucla.edu> Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jul 2012 23:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 9772@debbugs.gnu.org Cc: Eli Zaretskii Received: via spool by 9772-submit@debbugs.gnu.org id=B9772.134351810231397 (code B ref 9772); Sat, 28 Jul 2012 23:29:02 +0000 Received: (at 9772) by debbugs.gnu.org; 28 Jul 2012 23:28:22 +0000 Received: from localhost ([127.0.0.1]:47343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvGQn-0008AM-Qf for submit@debbugs.gnu.org; Sat, 28 Jul 2012 19:28:22 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39014) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvGQl-0008AE-LI for 9772@debbugs.gnu.org; Sat, 28 Jul 2012 19:28:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 2E0EEA60002; Sat, 28 Jul 2012 16:21:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XxbLsJGrZ2Lk; Sat, 28 Jul 2012 16:21:13 -0700 (PDT) Received: from [192.168.1.16] (pool-71-109-153-126.lsanca.dsl-w.verizon.net [71.109.153.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id AE764A60001; Sat, 28 Jul 2012 16:21:13 -0700 (PDT) Message-ID: <501473E4.4060409@cs.ucla.edu> Date: Sat, 28 Jul 2012 16:21:08 -0700 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) I merged this patch into the Emacs trunk as bzr 109252. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 17 18:27:09 2012 Received: (at control) by debbugs.gnu.org; 17 Aug 2012 22:27:09 +0000 Received: from localhost ([127.0.0.1]:36073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2V0V-0006Q0-9y for submit@debbugs.gnu.org; Fri, 17 Aug 2012 18:27:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:43611) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2V0T-0006Pt-9e for control@debbugs.gnu.org; Fri, 17 Aug 2012 18:27:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T2Urn-0004hJ-Sq for control@debbugs.gnu.org; Fri, 17 Aug 2012 18:18:08 -0400 Date: Fri, 17 Aug 2012 18:18:07 -0400 Message-Id: Subject: control message for bug 9772 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 9772 24.3