Imported Upstream version 1.5
[debian/gzip] / lib / frexpl.c
index c80599953947bb54a80c2ccfb7842a1a026b415b..b74ceeb56f815890e3515790dce9f33bd614a4c9 100644 (file)
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa.
-   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 
    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
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#define USE_LONG_DOUBLE
-#include "frexp.c"
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification.  */
+# include <math.h>
+
+long double
+frexpl (long double x, int *expptr)
+{
+  return frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "frexp.c"
+
+#endif