aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorPaul Eggert2012-08-02 00:31:34 -0700
committerPaul Eggert2012-08-02 00:31:34 -0700
commitf162bcc31c3d7d168da47ca2f007f58e11a36948 (patch)
treeeef19d0a840bd99304751fef539ba100134c91b9 /nt
parent8922df07b2f370debf70424f778073e1ca32e5e3 (diff)
downloademacs-f162bcc31c3d7d168da47ca2f007f58e11a36948.tar.gz
emacs-f162bcc31c3d7d168da47ca2f007f58e11a36948.zip
Use C99-style 'extern inline' if available.
* lib-src/profile.c (SYSTIME_INLINE): Define. * nt/config.nt: Sync with autogen/config.in. (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN) (_GL_INLINE_HEADER_END): New macros. * src/buffer.h (BUFFER_INLINE): * src/category.h (CATEGORY_INLINE): * src/character.h (CHARACTER_INLINE): * src/charset.h (CHARSET_INLINE): * src/composite.h (COMPOSITE_INLINE): * src/dispextern.h (DISPEXTERN_INLINE): * src/lisp.h (LISP_INLINE): * src/systime.h (SYSTIME_INLINE): New macro, replacing 'static inline' in this header. * src/buffer.h, src/category.h, src/character.h, src/charset.h: * src/composite.h, src/dispextern.h, lisp.h, systime.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. * src/alloc.c (LISP_INLINE): * src/buffer.c (BUFFER_INLINE): * src/category.c (CATEGORY_INLINE): * src/character.c (CHARACTER_INLINE): * src/charset.c (CHARSET_INLINE): * src/composite.c (COMPOSITE_INLINE): * src/dispnew.c (DISPEXTERN_INLINE): * src/sysdep.c (SYSTIME_INLINE): Define to EXTERN_INLINE, so that the corresponding functions are compiled into code. * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN) (INLINE_HEADER_END): New macros. * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant, since it's used in non-static inline functions now.
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog7
-rw-r--r--nt/config.nt29
2 files changed, 36 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index e903b4375db..8b9163c9f78 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,10 @@
12012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2
3 Use C99-style 'extern inline' if available.
4 * config.nt: Sync with autogen/config.in.
5 (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN)
6 (_GL_INLINE_HEADER_END): New macros.
7
12012-08-02 Glenn Morris <rgm@gnu.org> 82012-08-02 Glenn Morris <rgm@gnu.org>
2 9
3 * inc/ms-w32.h: Move here from ../src/s. 10 * inc/ms-w32.h: Move here from ../src/s.
diff --git a/nt/config.nt b/nt/config.nt
index 4687630589b..1c05fcb6497 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -1540,6 +1540,35 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1540 configuration information. */ 1540 configuration information. */
1541#define config_opsysfile <ms-w32.h> 1541#define config_opsysfile <ms-w32.h>
1542 1542
1543/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
1544 _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
1545 _GL_INLINE_HEADER_BEGIN contains useful stuff to put
1546 in an include file, before uses of _GL_INLINE.
1547 It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
1548 when FOO is an inline function in the header; see
1549 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
1550 _GL_INLINE_HEADER_END contains useful stuff to put
1551 in the same include file, after uses of _GL_INLINE. */
1552#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
1553# define _GL_INLINE inline
1554# define _GL_EXTERN_INLINE extern inline
1555# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
1556# define _GL_INLINE_HEADER_BEGIN \
1557 _Pragma ("GCC diagnostic push") \
1558 _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"")
1559# define _GL_INLINE_HEADER_END \
1560 _Pragma ("GCC diagnostic pop")
1561# endif
1562#else
1563# define _GL_INLINE static inline
1564# define _GL_EXTERN_INLINE static inline
1565#endif
1566
1567#ifndef _GL_INLINE_HEADER_BEGIN
1568# define _GL_INLINE_HEADER_BEGIN
1569# define _GL_INLINE_HEADER_END
1570#endif
1571
1543/* A replacement for va_copy, if needed. */ 1572/* A replacement for va_copy, if needed. */
1544#define gl_va_copy(a,b) ((a) = (b)) 1573#define gl_va_copy(a,b) ((a) = (b))
1545 1574