This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [trotts@MIT.EDU: bad line in /usr/include/math.h]


On Thu, Jul 20, 2000 at 11:52:43PM -0400, DJ Delorie wrote:
>> Wouldn't the 'extern inline log2()' trick work for c++?
>> 
>> >#define log2(x) (log(x) / M_LOG2_E)
>
>extern inline (log() / M_LOG2_E) ?

extern inline log2 (double x) {return log(x) / M_LOG2_E;}

inline is a valid C++ keyword but I don't know if 'extern inline'
is legal or if it would allow the user to override the function
with their own.

Actually, now that I think of it, it probably wouldn't.

cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]