unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 36597@debbugs.gnu.org, pipcet@gmail.com
Subject: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
Date: Tue, 11 Aug 2020 11:11:20 -0700	[thread overview]
Message-ID: <63d00359-f7cc-5564-ecf0-d374dea979ff@cs.ucla.edu> (raw)
In-Reply-To: <837du5p17p.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

On 8/11/20 10:00 AM, Eli Zaretskii wrote:
> The warnings about %d vs gl_intptr_t should be fixed in Gnulib, I
> think: why does it use 'long int' instead of 'int' on 32-bit
> platforms?  Or maybe the format in pdumper.c should use %ld instead, I
> don't know.

Ah, it's because Emacs uses C99 inttypes.h macros like PRIdPTR without also 
using the Gnulib inttypes module which implements these macros on platforms like 
MinGW where the macros don't work. This problem occurs elsewhere in Emacs in a 
couple of places, we just never noticed it. I installed the attached patch, 
which I hope fixes the glitch.

[-- Attachment #2: 0001-Use-Gnulib-inttypes-module.patch --]
[-- Type: text/x-patch, Size: 2150 bytes --]

From 39c16c1170fd8bd7035e6e265048dd371cde4609 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 11 Aug 2020 11:06:39 -0700
Subject: [PATCH] Use Gnulib inttypes module
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Needed for platforms like MinGW that don’t support C99 PRIdPTR.
* admin/merge-gnulib (GNULIB_MODULES): Add inttypes.
* m4/gnulib-comp.m4: Regenerate.
---
 admin/merge-gnulib | 2 +-
 lib/gnulib.mk.in   | 1 +
 m4/gnulib-comp.m4  | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 3f32536a62..98f7941bd8 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -36,7 +36,7 @@ GNULIB_MODULES=
   fchmodat fcntl fcntl-h fdopendir
   filemode filename filevercmp flexmember fpieee fstatat fsusage fsync futimens
   getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog
-  ieee754-h ignore-value intprops largefile libgmp lstat
+  ieee754-h ignore-value intprops inttypes largefile libgmp lstat
   manywarnings memmem-simple mempcpy memrchr minmax mkostemp mktime nstrftime
   pathmax pipe2 pselect pthread_sigmask
   qcopy-acl readlink readlinkat regex
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 92d0621c61..e7e9fbdc31 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -116,6 +116,7 @@
 #  ieee754-h \
 #  ignore-value \
 #  intprops \
+#  inttypes \
 #  largefile \
 #  libgmp \
 #  lstat \
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 5bfa1473ed..1f8a87218e 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -113,6 +113,7 @@ AC_DEFUN
   # Code from module ignore-value:
   # Code from module include_next:
   # Code from module intprops:
+  # Code from module inttypes:
   # Code from module inttypes-incomplete:
   # Code from module largefile:
   AC_REQUIRE([AC_SYS_LARGEFILE])
@@ -342,6 +343,7 @@ AC_DEFUN
   fi
   gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
   gl_IEEE754_H
+  gl_INTTYPES_H
   gl_INTTYPES_INCOMPLETE
   AC_REQUIRE([gl_LARGEFILE])
   gl___INLINE
-- 
2.17.1


  reply	other threads:[~2020-08-11 18:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 14:05 bug#36597: 27.0.50; rehash hash tables eagerly in pdumper Pip Cet
2019-07-14 14:39 ` Paul Eggert
2019-07-14 15:01   ` Pip Cet
2019-07-14 15:49     ` Paul Eggert
2019-07-14 16:54       ` Pip Cet
2019-07-15 14:39         ` Pip Cet
2019-07-19  7:23           ` Pip Cet
2019-07-19  7:46             ` Eli Zaretskii
2019-07-20 12:38               ` Pip Cet
2019-07-21  3:18                 ` Paul Eggert
2019-07-21  5:34                   ` Pip Cet
2019-07-21  6:32                     ` Paul Eggert
2019-07-21  6:32                     ` Pip Cet
2020-08-09 19:27                       ` Lars Ingebrigtsen
2020-08-10 11:51                         ` Pip Cet
2020-08-10 13:04                           ` Lars Ingebrigtsen
2020-08-11  9:33                             ` Paul Eggert
2020-08-11  9:40                               ` Pip Cet
2020-08-11 11:50                               ` Lars Ingebrigtsen
2020-08-11 14:52                               ` Eli Zaretskii
2020-08-11 15:30                                 ` Paul Eggert
2020-08-11 17:00                                   ` Eli Zaretskii
2020-08-11 18:11                                     ` Paul Eggert [this message]
2020-08-11 18:35                                       ` Eli Zaretskii
2020-08-11 18:55                                         ` Eli Zaretskii
2020-08-11 23:43                                         ` Paul Eggert
2020-08-12 14:10                                           ` Eli Zaretskii
2020-08-12 14:46                                             ` Eli Zaretskii
2020-08-12 19:11                                             ` Paul Eggert
2020-08-12 19:28                                               ` Eli Zaretskii
2020-08-12 20:41                                                 ` Andy Moreton
2020-08-11 15:59                                 ` Pip Cet
2020-08-11 17:00                                   ` Eli Zaretskii
2020-08-11 17:31                                     ` Paul Eggert
2020-08-11 18:27                                       ` Andy Moreton
2020-08-11 18:32                                       ` Eli Zaretskii
2019-07-18  5:39   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63d00359-f7cc-5564-ecf0-d374dea979ff@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=36597@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).