[issue775] osutil.c: inline keyword is a C99-ism

James Bostock mercurial-bugs at selenic.com
Thu Oct 11 09:47:45 UTC 2007


New submission from James Bostock <james.bostock at gmail.com>:

Hi,

The file osutil.c uses the inline keyword which, I believe, is a C99-ism. For
older compilers, I suggest adding something like the following:

/* Is there a better way to check for pre-C99? */
#if defined(__STDC__)
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
#define inline
#endif
#endif

Alternatively, mode_to_kind (the only inline function) could be actually inlined
as it is only called once. Or maybe replaced by a preprocessor macro.

-james

----------
messages: 4108
nosy: jsb
priority: bug
status: unread
title: osutil.c: inline keyword is a C99-ism

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue775>
____________________________________________________




More information about the Mercurial-devel mailing list