diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-03 21:26:10 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-03 21:26:10 +0000 |
commit | ef080b63ed63be1dfb4d9d11b0f40d75daa09f9d (patch) | |
tree | b3c3360111641d52b502bddd36c0a4ce24d565cf /libgfortran/c99_protos.h | |
parent | 535fca1102af31bb0dd35fbc901af77915ee57e2 (diff) | |
download | gcc-ef080b63ed63be1dfb4d9d11b0f40d75daa09f9d.tar.gz |
PR fortran/31202
* f95-lang.c (gfc_init_builtin_functions): Defin builtins for
lround{f,,l} and llround{f,,l}.
* trans-intrinsic.c (build_fix_expr): Generate calls to the
{l,}round{f,,l} functions.
* intrinsics/c99_functions.c (roundl,lroundf,lround,lroundl,
llroundf,llround,llroundl): New functions.
* c99_protos.h (roundl,lroundf,lround,lroundl,llroundf,llround,
llroundl): New prototypes.
* configure.ac: Check for lroundf, lround, lroundl, llroundf,
llround and llroundl.
* configure: Regenerate.
* Makefile.in: Regenerate.
* config.h.in: Regenerate.
* gfortran.dg/nint_2.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127185 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/c99_protos.h')
-rw-r--r-- | libgfortran/c99_protos.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libgfortran/c99_protos.h b/libgfortran/c99_protos.h index 369299dc77d..c4738db51a0 100644 --- a/libgfortran/c99_protos.h +++ b/libgfortran/c99_protos.h @@ -200,6 +200,43 @@ extern double round(double); extern float roundf(float); #endif +#if !defined(HAVE_ROUNDL) && defined(HAVE_CEILL) +#define HAVE_ROUNDL 1 +extern long double roundl(long double); +#endif + + + +#if !defined(HAVE_LROUNDF) && defined(HAVE_ROUNDF) +#define HAVE_LROUNDF 1 +long int lroundf (float); +#endif + +#if !defined(HAVE_LROUND) && defined(HAVE_ROUND) +#define HAVE_LROUND 1 +long int lround (double); +#endif + +#if !defined(HAVE_LROUNDL) && defined(HAVE_ROUNDL) +#define HAVE_LROUNDL 1 +long int lroundl (long double); +#endif + +#if !defined(HAVE_LLROUNDF) && defined(HAVE_ROUNDF) +#define HAVE_LLROUNDF 1 +long long int llroundf (float); +#endif + +#if !defined(HAVE_LLROUND) && defined(HAVE_ROUND) +#define HAVE_LLROUND 1 +long long int llround (double); +#endif + +#if !defined(HAVE_LLROUNDL) && defined(HAVE_ROUNDL) +#define HAVE_LLROUNDL 1 +long long int llroundl (long double); +#endif + /* Wrappers for systems without the various C99 single precision Bessel functions. */ |