/dev/clipboard pasting with small read() buffer

Eric Blake eblake@redhat.com
Thu Aug 16 15:24:00 GMT 2012

On 08/16/2012 08:20 AM, Thomas Wolff wrote:

>>> MB_CUR_MAX does not work because its value is 1 at this point
>> So what about MB_LEN_MAX then?  There's no problem using a multiplier,
>> but a symbolic constant is always better than a numerical constant.
> I've now used _MB_LEN_MAX from newlib.h, rather than MB_LEN_MAX from
> limits.h (note the "_" distinction :) ),
> because the latter, by its preceding comment, reserves the option to be
> changed into a dynamic function in the future, which could then possibly
> have the same problems as MB_CUR_MAX.

POSIX requires MB_LEN_MAX to be a constant, only MB_CUR_MAX can be
dynamic.  We cannot change MB_LEN_MAX to be dynamic in the future.

Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20120816/e12f6ebc/attachment.sig>

More information about the Cygwin-patches mailing list