forked from osmocom/wireshark
Don't bother with __builtin_floorl().
At least as I read the GCC documentation, if GCC supports a builtin floorl() at all, it will always treat floorl() and __builtin_floorl() the same (it's reserved in C90 and defined in C99, so nobody should ever write C code assuming floorl() won't be treated in that afshion). In addition, the GCC 3.3.6 manual says nothing about __builtin_floorl(), so it probably won't help to use it. If it appears to help, there's probably something else going on. Also, GCC appears not to like "#ifdef (__GNUC__)", as the parentheses mean it's testing an expression, not a macro name. Change-Id: Ib88b52c366d7f3b1637bb408fb18d04b67c27e4b Reviewed-on: https://code.wireshark.org/review/5909 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
caf4cc6399
commit
4d3c7b50de
|
@ -31,19 +31,8 @@
|
|||
long double
|
||||
floorl(long double x)
|
||||
{
|
||||
#ifdef (__GNUC__)
|
||||
/*
|
||||
* Handle platforms where GCC has the builtin but the platform's
|
||||
* headers (including the headers used with GCC!) don't define
|
||||
* floorl() to use it.
|
||||
*
|
||||
* XXX - are there any such platforms?
|
||||
*/
|
||||
__builtin_floorl(x);
|
||||
#else
|
||||
/* Not perfect, but probably the best workaround available */
|
||||
return floor((double)x);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !HAVE_FLOORL */
|
||||
|
|
Loading…
Reference in New Issue