diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-07-30 10:45:01 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-07-30 10:45:01 +0000 |
commit | e2cfbfffb41180e2b221e8f50867482dbd550774 (patch) | |
tree | 2562e06b40d600938db17a0c437e25bc6da55715 | |
parent | 9549cf3e4a7fba1e36a77f9d2fa204ecc8a9dbf3 (diff) | |
download | mpfr-e2cfbfffb41180e2b221e8f50867482dbd550774.tar.gz |
Added support for tracking applied patches with new function
mpfr_get_patches().
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4711 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | PATCHES | 0 | ||||
-rwxr-xr-x | get_patches.sh | 34 | ||||
-rw-r--r-- | mpfr.h | 1 | ||||
-rw-r--r-- | mpfr.texi | 14 |
6 files changed, 56 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 3ed1a03f6..10f5ff2f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,13 @@ AUTOMAKE_OPTIONS = gnu ansi2knr SUBDIRS = tests -EXTRA_DIST = BUGS FAQ.html VERSION generic.c round_raw_generic.c gen_inverse.h jyn_asympt.c +EXTRA_DIST = BUGS FAQ.html PATCHES VERSION get_patches.sh generic.c round_raw_generic.c gen_inverse.h jyn_asympt.c include_HEADERS = mpfr.h mpf2mpfr.h lib_LTLIBRARIES = libmpfr.la -libmpfr_la_SOURCES = mpfr.h mpf2mpfr.h mpfr-gmp.h mpfr-impl.h mpfr-longlong.h exceptions.c extract.c uceil_exp2.c uceil_log2.c ufloor_log2.c add.c add1.c add_ui.c agm.c clear.c cmp.c cmp_abs.c cmp_si.c cmp_ui.c comparisons.c div_2exp.c div_2si.c div_2ui.c div.c div_ui.c dump.c eq.c exp10.c exp2.c exp3.c exp.c frac.c get_d.c get_exp.c get_str.c init.c inp_str.c isinteger.c isinf.c isnan.c isnum.c const_log2.c log.c mul_2exp.c mul_2si.c mul_2ui.c mul.c mul_ui.c neg.c next.c out_str.c const_pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c round_prec.c set.c setmax.c setmin.c set_d.c set_dfl_prec.c set_exp.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c rint.c ui_div.c ui_sub.c urandomb.c get_z_exp.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c const_euler.c cos.c sin.c tan.c fma.c fms.c hypot.c log1p.c expm1.c log2.c log10.c ui_pow.c ui_pow_ui.c minmax.c dim.c copysign.c gmp_op.c init2.c acos.c sin_cos.c set_nan.c set_inf.c powerof2.c gamma.c set_ld.c get_ld.c cbrt.c volatile.c fits_s.h fits_sshort.c fits_sint.c fits_slong.c fits_u.h fits_ushort.c fits_uint.c fits_ulong.c fits_uintmax.c fits_intmax.c get_si.c get_ui.c zeta.c cmp_d.c erf.c inits.c inits2.c clears.c sgn.c check.c sub1sp.c version.c mpn_exp.c mpfr-gmp.c mp_clz_tab.c sum.c add1sp.c free_cache.c si_op.c cmp_ld.c set_ui_2exp.c set_si_2exp.c set_uj.c set_sj.c get_sj.c get_uj.c get_z.c iszero.c cache.c sqr.c int_ceil_log2.c isqrt.c strtofr.c pow_z.c logging.c mulders.c get_f.c round_p.c erfc.c atan2.c subnormal.c const_catalan.c root.c gen_inverse.h sec.c csc.c cot.c eint.c sech.c csch.c coth.c round_near_x.c constant.c abort_prec_max.c stack_interface.c lngamma.c zeta_ui.c set_d64.c get_d64.c jn.c yn.c remquo.c +libmpfr_la_SOURCES = mpfr.h mpf2mpfr.h mpfr-gmp.h mpfr-impl.h mpfr-longlong.h exceptions.c extract.c uceil_exp2.c uceil_log2.c ufloor_log2.c add.c add1.c add_ui.c agm.c clear.c cmp.c cmp_abs.c cmp_si.c cmp_ui.c comparisons.c div_2exp.c div_2si.c div_2ui.c div.c div_ui.c dump.c eq.c exp10.c exp2.c exp3.c exp.c frac.c get_d.c get_exp.c get_str.c init.c inp_str.c isinteger.c isinf.c isnan.c isnum.c const_log2.c log.c mul_2exp.c mul_2si.c mul_2ui.c mul.c mul_ui.c neg.c next.c out_str.c const_pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c round_prec.c set.c setmax.c setmin.c set_d.c set_dfl_prec.c set_exp.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c rint.c ui_div.c ui_sub.c urandomb.c get_z_exp.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c const_euler.c cos.c sin.c tan.c fma.c fms.c hypot.c log1p.c expm1.c log2.c log10.c ui_pow.c ui_pow_ui.c minmax.c dim.c copysign.c gmp_op.c init2.c acos.c sin_cos.c set_nan.c set_inf.c powerof2.c gamma.c set_ld.c get_ld.c cbrt.c volatile.c fits_s.h fits_sshort.c fits_sint.c fits_slong.c fits_u.h fits_ushort.c fits_uint.c fits_ulong.c fits_uintmax.c fits_intmax.c get_si.c get_ui.c zeta.c cmp_d.c erf.c inits.c inits2.c clears.c sgn.c check.c sub1sp.c version.c mpn_exp.c mpfr-gmp.c mp_clz_tab.c sum.c add1sp.c free_cache.c si_op.c cmp_ld.c set_ui_2exp.c set_si_2exp.c set_uj.c set_sj.c get_sj.c get_uj.c get_z.c iszero.c cache.c sqr.c int_ceil_log2.c isqrt.c strtofr.c pow_z.c logging.c mulders.c get_f.c round_p.c erfc.c atan2.c subnormal.c const_catalan.c root.c gen_inverse.h sec.c csc.c cot.c eint.c sech.c csch.c coth.c round_near_x.c constant.c abort_prec_max.c stack_interface.c lngamma.c zeta_ui.c set_d64.c get_d64.c jn.c yn.c remquo.c get_patches.c libmpfr_la_LIBADD = @LIBOBJS@ @@ -32,6 +32,11 @@ mpfr_TEXINFOS = fdl.texi MAKEINFOFLAGS = --enable-encoding +get_patches.c: PATCHES get_patches.sh + ./get_patches.sh > $@ || rm -f $@ + +CLEANFILES = get_patches.c + # Tune program EXTRA_PROGRAMS = tuneup @@ -28,7 +28,7 @@ Changes from versions 2.2.* to version 2.3.0: fails on your platform, try the --disable-shared configure option to disable the shared library. - New functions mpfr_j0, mpfr_j1, mpfr_jn, mpfr_y0, mpfr_y1, mpfr_yn, - mpfr_lgamma, mpfr_remainder, mpfr_remquo, mpfr_fms. + mpfr_lgamma, mpfr_remainder, mpfr_remquo, mpfr_fms, mpfr_get_patches. - Functions mpfr_sin, mpfr_cos and mpfr_sin_cos improved (argument reduction). - More detailed MPFR manual. diff --git a/PATCHES b/PATCHES new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/PATCHES diff --git a/get_patches.sh b/get_patches.sh new file mode 100755 index 000000000..00d72de11 --- /dev/null +++ b/get_patches.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +cat <<EOF +/* mpfr_get_patches -- Patches that have been applied + +Copyright 2007 Free Software Foundation, Inc. +Contributed by the Arenaire and Cacao projects, INRIA. + +This file is part of the MPFR Library. + +The MPFR Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or (at your +option) any later version. + +The MPFR Library 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 Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the MPFR Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +MA 02110-1301, USA. */ + +#include "mpfr-impl.h" + +const char * +mpfr_get_patches (void) +{ +EOF + +echo ' return "'`tr "\n" " " < PATCHES`'";' +echo '}' @@ -165,6 +165,7 @@ extern "C" { #endif __MPFR_DECLSPEC __gmp_const char * mpfr_get_version _MPFR_PROTO ((void)); +__MPFR_DECLSPEC __gmp_const char * mpfr_get_patches _MPFR_PROTO ((void)); __MPFR_DECLSPEC mp_exp_t mpfr_get_emin _MPFR_PROTO ((void)); __MPFR_DECLSPEC int mpfr_set_emin _MPFR_PROTO ((mp_exp_t)); @@ -1869,7 +1869,10 @@ and return 0 (even if @var{x} is not a non-zero ordinary number); otherwise, return a non-zero value. @end deftypefun - +@c By definition, a C string is always null-terminated, so that we +@c could just say "string" or "null-terminated character array", +@c but "null-terminated string" is not an error and probably better +@c for most users. @deftypefun {const char *} mpfr_get_version (void) Return the MPFR version, as a null-terminated string. @end deftypefun @@ -1908,6 +1911,15 @@ Here is an example of how to check the MPFR version at compile time: @end example @end deftypefn +@deftypefun {const char *} mpfr_get_patches (void) +Return a null-terminated string containing the ids of the patches applied to +the MPFR library (contents of the @file{PATCHES} file), separated by spaces. +Note: If the program has been compiled with an older MPFR version and is +dynamically linked with a new MPFR library version, the ids of the patches +applied to the old (compile-time) MPFR version are not available (however +this information should not have much interest in general). +@end deftypefun + @node Rounding Mode Related Functions, Exception Related Functions, Miscellaneous Functions, MPFR Interface @cindex Rounding mode related functions @section Rounding Mode Related Functions |