This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NO_REENT?


It is an oversight that got copied around. Patch applied.

Thanks,

-- Jeff J.

On 01/12/09 10:34 AM, Howland Craig D (Craig) wrote:
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


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