Prefer ptrdiff_t to ssize_t, as per
<https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html>.
* lib/git-merge-changelog.c (struct entries_mapping)
(entries_mapping_get, entries_mapping_reverse_get)
(compute_mapping, struct edit, struct differences, OFFSET)
(OFFS
@@
+2023-05-21 Paul Eggert
+
+ git-merge-changelog: port to ssize_t padding
+ * lib/git-merge-changelog.c (OFFSET_MAX): New macro, as a nicety.
+
2023-05-21 Bruno Haible
limits-h tests: Check the value of SSIZE_MAX.
diff --git a/lib/git-merge-changelog.c b/lib/git-merge
* lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
ptrdiff_t is the natural type for signed indexes.
On a few older platforms, ssize_t is narrower than size_t.
---
ChangeLog | 5 +
lib/diffseq.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b
Hi Eric,
We were blindly defining ssize_t to int. On mingw64, this is the
correct size, but the wrong rank, which leads gcc to issue warnings
for %zd printf directives.
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t.
This patch will not help to fix Daniel Berrange's problem
Eric Blake wrote:
Then how do I explain the compiler
warning that Daniel was seeing under mingw64?
They come from disagreements regarding the integer conversion rank of
'size_t' and 'ssize_t' between GCC and sys/types.h.
When you write printf(%zd,arg) then GCC compares its own built
On 04/05/2012 04:10 AM, Bruno Haible wrote:
This patch will not help to fix Daniel Berrange's problem. In mingw
and mingw64, ssize_t is defined by sys/types.h, and gnulib will not
override it.
Test program:
foo.c =
#include sys/types.h
size_t
We were blindly defining ssize_t to int. On mingw64, this is the
correct size, but the wrong rank, which leads gcc to issue warnings
for %zd printf directives.
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t.
Signed-off-by: Eric Blake ebl...@redhat.com
---
Bruno, is this okay to apply
I committed:
--- tests/test-sys_socket.c.origThu Sep 15 17:57:52 2011
+++ tests/test-sys_socket.c Thu Sep 15 16:06:27 2011
@@ -30,6 +30,10 @@
/* Check that the 'socklen_t' type is defined. */
socklen_t t1;
+/* Check that the 'size_t' and 'ssize_t' types are defined
On MSVC 9, ssize_t is not defined, leading to test compilation failures
in test-stdio.c:36, test-sys_uio.c:25, test-unistd.c:40.
According to POSIX:2008, ssize_t ought to be defined in each of
stdio.h
sys/socket.h
sys/types.h
sys/uio.h
unistd.h
This fixes it.
2011-09-15 Bruno Haible
On 09/15/2011 10:08 AM, Bruno Haible wrote:
On MSVC 9, ssize_t is not defined, leading to test compilation failures
in test-stdio.c:36, test-sys_uio.c:25, test-unistd.c:40.
According to POSIX:2008, ssize_t ought to be defined in each of
stdio.h
sys/socket.h
sys/types.h
sys/uio.h
Micah Cowan wrote:
While attempting to compile sed from current CVS, I ran across the
following output from bootstrap.sh:
+ cc -DHAVE_CONFIG_H -I.. -I. -c getline.c
getline.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘getline’
Line 26 is the ssize_t return
Simon Josefsson wrote:
GnuTLS need ssize_t, but there is no module for it right now. How
about the patch below?
Looks OK to me.
I'm not sure what the License field for ssize_t.m4 should be. The M4
file says:
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
dnl This file
Hello,
this mail is a lengthy story to the most abstract solution and back
to the basic one. Sorry, I couldn't have helped.
The problem, of course, is that the installed header file cannot
assume a config.h and the HAVE_* stuff.
Indeed, this is the root of the problem.
You try to find a
dnl Copyright (C) 2001-2003 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.
What do we call this?
14 matches
Mail list logo