This puts basic functions for types to be after the corresponding
type definitions. This is a more-common programming style in C,
and will make it easier to port Emacs to gcc
-fcheck-pointer-bounds, since the functions now have access to the
corresponding types' sizes. This patch does not change the code;
it just moves declarations and definitions and removes
no-longer-needed forward declarations (Bug#25128).
* src/buffer.c, src/data.c, src/image.c:
Include process.h, for PROCESSP.
* src/buffer.h (BUFFERP, CHECK_BUFFER, XBUFFER):
* src/process.h (PROCESSP, CHECK_PROCESS, XPROCESS):
* src/termhooks.h (TERMINALP, XTERMINAL):
* src/window.h (WINDOWP, CHECK_WINDOW, XWINDOW):
* src/thread.h (THREADP, CHECK_THREAD, XTHREAD, MUTEXP, CHECK_MUTEX)
(XMUTEX, CONDVARP, CHECK_CONDVAR, XCONDVAR):
Move here from lisp.h.
* src/intervals.h: Include buffer.h, for BUFFERP.
Include lisp.h, for Lisp_Object.
* src/lisp.h: Reorder declarations and definitions as described
above. Move thread includes to be later, so that they can use the
reordered definitions. Move some symbols to other headers (noted
elsewhere). Remove forward decls that are no longer needed.
* src/thread.h: Include systhread.h here, not in lisp.h,
since lisp.h itself does not need systhread.h.