~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/extern-inline.m4

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl 'extern inline' a la ISO C99.
2
2
 
3
 
dnl Copyright 2012 Free Software Foundation, Inc.
 
3
dnl Copyright 2012-2013 Free Software Foundation, Inc.
4
4
dnl This file is free software; the Free Software Foundation
5
5
dnl gives unlimited permission to copy and/or distribute it,
6
6
dnl with or without modifications, as long as this notice is preserved.
7
7
 
8
8
AC_DEFUN([gl_EXTERN_INLINE],
9
9
[
10
 
  AC_REQUIRE([AC_C_INLINE])
11
10
  AH_VERBATIM([extern_inline],
12
11
[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
13
12
   _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
17
16
     when FOO is an inline function in the header; see
18
17
     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
19
18
   _GL_INLINE_HEADER_END contains useful stuff to put
20
 
     in the same include file, after uses of _GL_INLINE.  */
21
 
#if (__GNUC__ \
22
 
     ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
23
 
     : 199901L <= __STDC_VERSION__)
 
19
     in the same include file, after uses of _GL_INLINE.
 
20
 
 
21
   Suppress the use of extern inline on Apple's platforms,
 
22
   as Libc-825.25 (2012-09-19) is incompatible with it; see
 
23
   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
 
24
   Perhaps Apple will fix this some day.  */
 
25
#if ((__GNUC__ \
 
26
      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
 
27
      : 199901L <= __STDC_VERSION__) \
 
28
     && !defined __APPLE__)
24
29
# define _GL_INLINE inline
25
30
# define _GL_EXTERN_INLINE extern inline
26
 
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
 
31
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
27
32
# if __GNUC_GNU_INLINE__
28
33
   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
29
34
#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
32
37
# endif
33
38
# define _GL_EXTERN_INLINE extern
34
39
#else
35
 
# define _GL_INLINE static inline
36
 
# define _GL_EXTERN_INLINE static inline
 
40
# define _GL_INLINE static _GL_UNUSED
 
41
# define _GL_EXTERN_INLINE static _GL_UNUSED
37
42
#endif
38
43
 
39
44
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)