Avoid unnecessary replacement source file floorl.c

Change-Id: If282cb22dcf099559cbe8acd5b1affd07155af8c
Reviewed-on: https://code.wireshark.org/review/14808
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2016-04-04 23:06:50 +01:00 committed by João Valverde
parent 74dccdc3b9
commit cd1d137743
5 changed files with 1 additions and 80 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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__ */