Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2008 14:14:32 +0900
From:      "Bang Jun-young" <junyoung@netbsd.org>
To:        "Tim Kientzle" <kientzle@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r185674 - head/lib/libarchive
Message-ID:  <aacbe5310812072114l9b79a8x70fc955930f16e3d@mail.gmail.com>
In-Reply-To: <200812060612.mB66COVb084955@svn.freebsd.org>
References:  <200812060612.mB66COVb084955@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 6, 2008 at 3:12 PM, Tim Kientzle <kientzle@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aacbe5310812072114l9b79a8x70fc955930f16e3d>