This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fwd: Bug#43530: lrint not defined but exists in library


Joel Klecker wrote:
> >Subject: Bug#43530: lrint not defined but exists in library
[...]
> >*snipsnap*
> > - Function: long int lrint (double X)
> > - Function: long int lrintf (float X)
> > - Function: long int lrintl (long double X)
> >     These functions are just like `rint', but they return a `long int'
> >     instead of a floating-point number.
> >*snipsnap*
> >
> >
> >bug: docu sais lrint is defined, but test shows it is not defined.
> >but it is implemented in libm and works correctly.

This is a feature.  lrint is from the new draft C standard (C9x).  The
headers do not provide prototypes for C9x functions unless you 
#define _ISOC9X_SOURCE before including any libc headers.

This will be changed after the new standard is finalized, and not
before.

(The docs should say something about these functions being new to
C9x; if they don't, that is a legitimate bug.)

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]