Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 23 Aug 2012 20:31:09 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: [PATCH/RFC] __inline for C89 compilers (take 3?)

On Thu, 23 Aug 2012 22:34:25 -0400
Rich Felker <dalias@...ifal.cx> wrote:

> On Thu, Aug 23, 2012 at 10:07:49PM -0400, Rich Felker wrote:
> #if __STDC_VERSION__ < 199901L && defined(__GNUC__)
> #define inline __inline
> #define restrict __restrict
> #elif __STDC_VERSION__ < 199901L
> #define inline
> #define restrict
> #endif

> #if __STDC_VERSION__ >= 199901L
> #define __inline inline
> #define __restrict restrict
> #endif
> 
> added near the top of headers that need to use inline and/or restrict.
> 
> The former version has the benefit that the "inline" and "restrict"
> keywords can be used as-is later in the header, without any __
> uglification. The latter version has the benefit that it's fewer lines
> of spam, does not explicitly refer to "GNU C", and 
..
This patch takes the second approach.
It will clean up include/{math,byteswap,endian}.h, and make syscall.h
somewhat more portable.

As far as I could tell, restrict is not used in any of these headers.

Please comment.

Isaac Dunham
View attachment "inline.diff" of type "text/x-patch" (13315 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.