GNU bug report logs - #12116
merge from gnulib for extern-inline

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Wed, 1 Aug 2012 22:27:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <paul.eggert <at> verizon.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: lekktu <at> gmail.com, 12116 <at> debbugs.gnu.org
Subject: bug#12116: merge from gnulib for extern-inline
Date: Thu, 02 Aug 2012 22:49:37 +0300
> Date: Thu, 02 Aug 2012 11:02:59 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 12116 <at> debbugs.gnu.org, lekktu <at> gmail.com
> 
>                              e x p a n s i o n   i n :
>    macro           C99            older compilers   ancient compilers
>    INLINE          inline         static inline     static
>    EXTERN_INLINE   extern inline  static inline     static
> 
> and the Emacs include file charset.h does this:
> 
>    #ifndef CHARSET_INLINE
>    # define CHARSET_INLINE INLINE
>    #endif
> 
>    CHARSET_INLINE void
>    set_charset_attr (struct charset *charset, enum charset_attr_index idx,
>                      Lisp_Object val)
>    {
>      ASET (CHARSET_ATTRIBUTES (charset), idx, val);
>    }
> 
> so in C99 most users of charset.h see the function as being
> 'inline void'.  charset.c does this before including charset.h:
> 
>    #define CHARSET_INLINE EXTERN_INLINE
> 
> so that when it's compiled, the function is 'extern inline void'.
> In pre-C99 compilers the function is 'static inline' or (if ancient)
> plain 'static'.  Similarly for each .h file that uses inline functions.

OK, but what's the story with the addition of stat-time.c,
utimespec.c, and u64.c, which just include the respective headers?
Where and how are these used, and for what purposes?

I understood the extern inline stuff, I just don't get why are these
*.c files introduced.




This bug report was last modified 12 years and 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.