aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/floorl.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-19 21:09:18 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-20 05:09:52 +0000
commit4d3c7b50deeaef8a1b54320ed78b2a523d130d76 (patch)
tree8b28fc219797614ae1487c18b95f82aed0120080 /wsutil/floorl.c
parentcaf4cc6399083ed5d9b461ee3f372a39337699ba (diff)
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>
Diffstat (limited to 'wsutil/floorl.c')
-rw-r--r--wsutil/floorl.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/wsutil/floorl.c b/wsutil/floorl.c
index 38c9b3f904..28fae71598 100644
--- a/wsutil/floorl.c
+++ b/wsutil/floorl.c
@@ -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 */