mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 05:30:45 -08:00
Port to Sun C 5.14
Backport from master. Sun C 5.14 supports C11 but not GCC extensions, and so refuses to compile Emacs without this patch. * src/alloc.c (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in general this macro is restricted to signed types.
This commit is contained in:
parent
95eb641404
commit
c49198967a
1 changed files with 4 additions and 4 deletions
|
|
@ -1415,8 +1415,8 @@ lmalloc (size_t size)
|
|||
if (laligned (p, size))
|
||||
break;
|
||||
free (p);
|
||||
size_t bigger;
|
||||
if (! INT_ADD_WRAPV (size, GCALIGNMENT, &bigger))
|
||||
size_t bigger = size + GCALIGNMENT;
|
||||
if (size < bigger)
|
||||
size = bigger;
|
||||
}
|
||||
|
||||
|
|
@ -1432,8 +1432,8 @@ lrealloc (void *p, size_t size)
|
|||
p = realloc (p, size);
|
||||
if (laligned (p, size))
|
||||
break;
|
||||
size_t bigger;
|
||||
if (! INT_ADD_WRAPV (size, GCALIGNMENT, &bigger))
|
||||
size_t bigger = size + GCALIGNMENT;
|
||||
if (size < bigger)
|
||||
size = bigger;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue