diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | ui/time_shift.c | 2 | ||||
-rw-r--r-- | wsutil/Makefile.am | 4 | ||||
-rw-r--r-- | wsutil/floorl.c | 38 | ||||
-rw-r--r-- | wsutil/floorl.h | 36 |
5 files changed, 1 insertions, 80 deletions
diff --git a/configure.ac b/configure.ac index e71495f91e..ed3d68ab7b 100644 --- a/configure.ac +++ b/configure.ac @@ -537,7 +537,6 @@ AC_SEARCH_LIBS([cos], [m]) # Check for C99 math functions. # AC_CHECK_FUNCS([floorl lrint]) -AM_CONDITIONAL([HAVE_FLOORL], [test "x$ac_cv_func_floorl" = xyes]) # # Check if we need to link with -lnsl and -lsocket diff --git a/ui/time_shift.c b/ui/time_shift.c index fccdffa8cc..f02f0f6dc8 100644 --- a/ui/time_shift.c +++ b/ui/time_shift.c @@ -33,7 +33,7 @@ #include "ui/ui_util.h" #ifndef HAVE_FLOORL -# include "wsutil/floorl.h" +#define floorl(x) floor((double)x) #endif #define SHIFT_POS 0 diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am index 6a50a89453..434457ccd8 100644 --- a/wsutil/Makefile.am +++ b/wsutil/Makefile.am @@ -72,10 +72,6 @@ libwsutil_la_SOURCES = \ $(LIBWSUTIL_SRC) \ $(LIBWSUTIL_INCLUDES) -if !HAVE_FLOORL -libwsutil_la_SOURCES += floorl.c floorl.h -endif - libwsutil_sse42_la_SOURCES = \ ws_mempbrk_sse42.c diff --git a/wsutil/floorl.c b/wsutil/floorl.c deleted file mode 100644 index 28fae71598..0000000000 --- a/wsutil/floorl.c +++ /dev/null @@ -1,38 +0,0 @@ -/* floorl.c - * - * Provides floorl function for systems that do not provide it - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "config.h" - -#include <math.h> - -#include "wsutil/floorl.h" - -#ifndef HAVE_FLOORL -long double -floorl(long double x) -{ - /* Not perfect, but probably the best workaround available */ - return floor((double)x); -} - -#endif /* !HAVE_FLOORL */ diff --git a/wsutil/floorl.h b/wsutil/floorl.h deleted file mode 100644 index 1af066b4a1..0000000000 --- a/wsutil/floorl.h +++ /dev/null @@ -1,36 +0,0 @@ -/* floorl.h - * - * Declares floorl function for systems that do not provide it - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __FLOORL_H__ -#define __FLOORL_H__ - -#include "config.h" - -#include "ws_symbol_export.h" - -/* - * Version of "floorl()", for the benefit of OSes that don't have it. - */ -WS_DLL_PUBLIC long double floorl(long double x); - -#endif /* __FLOORL_H__ */ |