1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
emacs/lib-src
Paul Eggert d2f1971dd5 Port flexible array members to GCC + valgrind
These changes are needed to conform to the C standard's rule for
allocating structs containing flexible array members.  C11 says
that malloc (offsetof (struct s, m) + n) does not suffice to
allocate a struct with an n-byte tail; instead, malloc’s arg
should be rounded up to the nearest multiple of alignof (struct s).
Although this is arguably a defect in C11, gcc -O2 + valgrind
sometimes complains when this rule is violated, and when debugging
it’s better to keep valgrind happy.
For details please see the thread containing the message at:
https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html
* lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c:
Include flexmember.h.
* lib-src/ebrowse.c (add_sym, add_member, make_namespace)
(register_namespace_alias):
* src/alloc.c (SDATA_SIZE, allocate_string_data):
* src/image.c (xpm_cache_color, imagemagick_create_cache):
* src/process.c (Fmake_network_process):
Use FLEXSIZEOF instead of offsetof and addition.
* src/alloc.c (SDATA_SIZE, vector_alignment):
Use FLEXALIGNOF instead of sizeof (ptrdiff_t).
* src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR):
Remove, as alloc.c can now calculate this on its own.
2016-09-07 18:10:11 -07:00
..
ChangeLog.1 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
COPYING
ctags.c Port ctags+etags build to Sun C 5.12. 2014-05-18 11:57:04 -07:00
ebrowse.c Port flexible array members to GCC + valgrind 2016-09-07 18:10:11 -07:00
emacsclient.c Fix compilation warning in the MinGW build 2016-07-22 20:38:22 +03:00
etags.c * lib-src/etags.c (invalidate_nodes): Fix another thinko. 2016-08-31 20:19:42 +03:00
hexl.c Rework C source files to avoid ^( 2016-03-10 07:59:19 -08:00
make-docfile.c Replace IF_LINT by NONVOLATILE and UNINIT 2016-06-08 11:50:42 -07:00
Makefile.in Merge from origin/emacs-25 2016-01-11 22:48:07 -08:00
movemail.c Omit IF_LINT code that no longer seems needed 2016-05-30 16:13:04 -07:00
ntlib.c Fix compilation warning in the MinGW build 2016-07-22 20:38:22 +03:00
ntlib.h Fix compiler warnings in the MinGW build 2016-05-21 20:06:33 +03:00
pop.c Pacify --enable-gcc-warnings for lib-src/pop.c 2016-08-28 01:57:10 -07:00
pop.h Rework C source files to avoid ^( 2016-03-10 07:59:19 -08:00
profile.c Rework C source files to avoid ^( 2016-03-10 07:59:19 -08:00
rcs2log Port "$@" to OpenIndiana ksh93 2016-01-24 17:29:01 -08:00
README
update-game-score.c Rework C source files to avoid ^( 2016-03-10 07:59:19 -08:00
update-game-score.exe.manifest Provide a Windows manifest for update-game-score.exe. 2013-08-10 10:43:41 +03:00

This directory contains the source code for the architecture-dependent
files that go in ${archlibdir}.  At present, these are mostly utility
programs used by GNU Emacs.