diff options
author | Stephen Fisher <sfisher@sdf.org> | 2014-12-19 16:11:33 -0700 |
---|---|---|
committer | Stephen Fisher <sfisher@sdf.org> | 2014-12-19 23:12:34 +0000 |
commit | aa0a04054c047d07fa704e49e9aded80c63af43e (patch) | |
tree | 2f6e55cf4b274d5df52ab677ba70805600b1e117 /wsutil | |
parent | 47dc4e77ccfd1f1f4d5d187429860cf0b51a8757 (diff) | |
download | wireshark-aa0a04054c047d07fa704e49e9aded80c63af43e.tar.gz wireshark-aa0a04054c047d07fa704e49e9aded80c63af43e.tar.bz2 wireshark-aa0a04054c047d07fa704e49e9aded80c63af43e.zip |
Add missing files from last commit
Change-Id: I4a6dd1b60893d19b91f5bc0f85be9ee99cd3eb5e
Reviewed-on: https://code.wireshark.org/review/5892
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/floor.c | 39 | ||||
-rw-r--r-- | wsutil/floor.h | 31 |
2 files changed, 70 insertions, 0 deletions
diff --git a/wsutil/floor.c b/wsutil/floor.c new file mode 100644 index 0000000000..a17b3eac23 --- /dev/null +++ b/wsutil/floor.c @@ -0,0 +1,39 @@ +/* floor.c + * + * Provides floor functions for systems that do not provide them + * + * 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 <glib.h> + +#ifndef HAVE_FLOORL +long double +floorl(long double x) +{ +#ifdef (__GNUC__) + __builtin_floorl(x); +#else +#error "The floorl() function is not present on this system and the GNU C" +#error "compiler (gcc) isn't in use, which can provide one." +#endif + +#endif /* !HAVE_FLOORL */ diff --git a/wsutil/floor.h b/wsutil/floor.h new file mode 100644 index 0000000000..f71a5780a8 --- /dev/null +++ b/wsutil/floor.h @@ -0,0 +1,31 @@ +/* floor.c + * + * Provides floor functions for systems that do not provide them + * + * 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 <glib.h> + +#ifndef HAVE_FLOORL + + +#endif |