Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 30 Aug 2012 15:45:34 -0700
From: Isaac Dunham <>
Subject: [PATCH/RFC] inline cleanup/C89 support

On Fri, 24 Aug 2012 09:53:16 +0200
Szabolcs Nagy <> wrote:

> * Rich Felker <> [2012-08-23 22:34:25 -0400]:
> > #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.
(As previously stated, it appears-per a grep of glibc-that restrict is
not needed in these headers.) 
This patch is updated for C++:

#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
#define __inline inline

> this won't work with c++, nor old strict c compilers
> without __inline and __restrict and can break various
> c parsing tools (ctags, swig, various lints, ..)

1. Do any of these "old strict c compilers" exist on Linux? Are any of
them worth supporting? 
The Linux compilers I'm aware of are all nominally C99 capable (pcc,
tcc, gcc, clang, llvm-gcc, icc, OpenWatcom...), support __inline
(gcc-compatibles), or are hopelessly incomplete/outdated and buggy
(TenDRA, dev86 bcc). The latter ones probably wouldn't work properly
with musl, period.

2. Have you tested those C parsing tools? Have they been updated to
support C99?

3. Would OpenWatcom + musl be usable? Last I knew, OpenWatcom wasn't
compatible with the standard Linux ABI, and ISTR it had to use its own
If it is a realistic combination (can produce a working hello world),
then it *might* be worth supporting.

Isaac Dunham
View attachment "inline.diff" of type "text/x-patch" (13469 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.