svn commit: r185674 - head/lib/libarchive

Bang Jun-young junyoung at netbsd.org
Sun Dec 7 21:44:23 PST 2008


On Sat, Dec 6, 2008 at 3:12 PM, Tim Kientzle <kientzle at freebsd.org> wrote:
> Author: kientzle
> Date: Sat Dec  6 06:12:24 2008
> New Revision: 185674
> URL: http://svn.freebsd.org/changeset/base/185674
>
> Log:
>  A couple of portability fixes from Joerg Sonnenberger
>
> Modified:
>  head/lib/libarchive/archive_endian.h
>
> Modified: head/lib/libarchive/archive_endian.h
> ==============================================================================
> --- head/lib/libarchive/archive_endian.h        Sat Dec  6 06:08:12 2008        (r185673)
> +++ head/lib/libarchive/archive_endian.h        Sat Dec  6 06:12:24 2008        (r185674)
> @@ -35,14 +35,14 @@
>  #define ARCHIVE_ENDIAN_H_INCLUDED
>
>
> -/* Watcom C++ doesn't support 'inline' in C code.  (For any version?) */
> -#if defined( __WATCOMC__ )
> -       #define inline
> -#endif
> -
> -/* Visual C++ 6.0 doesn't support 'inline' in C code.  (Does VC7? VC8?) */
> -#if defined(_MSC_VER)
> -       #define inline
> +/*
> + * Disabling inline keyword for compilers known to choke on it:
> + * - Watcom C++ in C code.  (For any version?)
> + * - SGI MIPSpro
> + * - Microsoft Visual C++ 6.0 (supposedly newer versions too)
> + */
> +#if defined(__WATCOMC__) || defined(__sgi) || defined(_MSC_VER)
> +#define        inline
>  #endif

MSC actually supports inline functions as '__inline' keyword in C mode. The
above should be written as follows:

#if defined(__WATCOMC__) || defined(__sgi)
#define inline
#elif defined(_MSC_VER)
#define inline __inline
#endif

See
http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx
http://msdn.microsoft.com/en-us/library/aa260842.aspx
for details.

junyoung


More information about the svn-src-all mailing list