[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: md5 broken?

From: Jim Meyering
Subject: Re: md5 broken?
Date: Sat, 28 May 2011 15:32:50 +0200

Eli Zaretskii wrote:
>> From: Jim Meyering <address@hidden>
>> Date: Sat, 28 May 2011 14:23:43 +0200
>> Cc: Paul Eggert <address@hidden>, address@hidden
>> +static inline unsigned char to_uchar (char ch) { return ch; }
> I think this should use "INLINE", upper-cased, rather than "inline",
> for those compilers that don't support the `inline' keyword.  See
> src/config.in.

Using "inline" is fine because of the configure-time test that
defines "inline" to nothing when it is not supported:

    $ grep -A4 to..__inline src/config.h                                        
    /* Define to `__inline__' or `__inline' if that's what the C compiler
       calls it, or to nothing if 'inline' is not supported under any name.  */
    #ifndef __cplusplus
    /* #undef inline */

There is one other use already:

    lread.c:2256:static inline int

There are far more uses of INLINE:

    $ git grep -w INLINE|grep -cw INLINE

Is there any reason not to replace all uses of INLINE with "inline"
and to remove the following from configure.in?  I see no use of
"extern INLINE" anywhere in emacs:

    /* If using GNU, then support inline function declarations.  */
    /* Don't try to switch on inline handling as detected by AC_C_INLINE
       generally, because even if non-gcc compilers accept `inline', they
       may reject `extern inline'.  */
    #if defined (__GNUC__)
    #define INLINE __inline__
    #define INLINE

reply via email to

[Prev in Thread] Current Thread [Next in Thread]