[reSIProcate] Fast streams encode std::endl incorrectly on *nix systems
Justin Matthews
jmatthewsr at gmail.com
Mon Dec 1 19:35:39 CST 2008
Done. Let me know if you have issues.
Thanks,
-justin
-----Original Message-----
From: Byron Campen [mailto:bcampen at estacado.net]
Sent: Monday, December 01, 2008 8:28 PM
To: Justin Matthews
Cc: 'resiprocate-devel at resiprocate.or'
Subject: Re: [reSIProcate] Fast streams encode std::endl incorrectly on *nix
systems
Ok, fine by me!
Best regards,
Byron Campen
> I think we can change this to '\n' for all platforms, Visual C++
> actually
> uses '\n' for its STL implementation. Not sure why "\r\n" was
> picked :-).
>
> Thanks,
>
> -justin
>
> -----Original Message-----
> From: resiprocate-devel-bounces at resiprocate.org
> [mailto:resiprocate-devel-bounces at resiprocate.org] On Behalf Of
> Byron Campen
> Sent: Monday, December 01, 2008 8:01 PM
> To: resiprocate-devel at resiprocate.or
> Subject: [reSIProcate] Fast streams encode std::endl incorrectly on
> *nix
> systems
>
> On *nix systems, std::endl is encoded as '\n', but the following
> code in resipfaststreams.hxx encodes it as "\r\n"
>
> *snip*
> if (_Pfn == static_cast<std::ostream& (*)
> (std::ostream&)>(std::endl))
> {
> if (buf_->writebuf("\r\n",2) < 2)
> {
> good_ = false;
> }
> }
>
> *snip*
>
> Is there going to be an easy way to make this behavior consistent
> with whatever the platform does? Just using an #ifdef WIN32 won't
> get this
> quite right, but it may be good enough for us. Thoughts?
>
> Best regards,
> Byron Campen
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5184 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20081201/a57dee1d/attachment.bin>
More information about the resiprocate-devel
mailing list