NO_REENT?

Howland Craig D (Craig) howland@LGSInnovations.com
Thu Dec 3 23:00:00 GMT 2009


Does anybody know why strtod.c, dtoastub.c, and wcstod.c use "NO_REENT"
to gate the not-directly-reentrant versions of their functions instead
of the "_REENT_ONLY" that is used everywhere else?  I would think that
it is a mistake that has gone un-noticed, and have attached a patch
that fixes it in the case that it is.
Craig

 
e.g.
$ tail -21 strtod.c
#ifndef NO_REENT

double
_DEFUN (strtod, (s00, se),
        _CONST char *s00 _AND char **se)
{
  return _strtod_r (_REENT, s00, se);
}

float
_DEFUN (strtof, (s00, se),
        _CONST char *s00 _AND
        char **se)
{
  double retval = _strtod_r (_REENT, s00, se);
  if (isnan (retval))
    return nanf (NULL);
  return (float)retval;
}

#endif
$ tail -12 strtol.c
#ifndef _REENT_ONLY

long
_DEFUN (strtol, (s, ptr, base),
        _CONST char *s _AND
        char **ptr _AND
        int base)
{
        return _strtol_r (_REENT, s, ptr, base);
}

#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NO_REENT.patch
Type: application/octet-stream
Size: 1136 bytes
Desc: NO_REENT.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20091203/25fc8cf2/attachment.obj>


More information about the Newlib mailing list