This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [RFC] libstdc++/8399


In particular...

Loren James Rittle wrote:

I suppose I couldn't argue with this change to
ios_base::Init::_S_ios_create:

   int __in_size = __sync ? 1 : static_cast<int>(BUFSIZ);

->

#ifdef HAVE_ISATTY
   int __in_size = (__sync || isatty (0)) ? 1 : static_cast<int>(BUFSIZ);
#else
   int __in_size = 1;
#endif

isatty() is the only simple POSIX call I know to check whether
something is a terminal.  For systems that don't have the call, we'd
punt.

Sorry for being a little naive (not yet carried out real tests): what
happens when there is /piped/ input from the terminal??
(my original tests for 2211 where conducted like this)

Ciao again, Paolo.



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