bug in btowc(0)

Eric Blake eblake@redhat.com
Mon Apr 5 22:50:00 GMT 2010


On the gnulib list, it was pointed out that cygwin btowc has a bug:

+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  if (btowc ('\0') != 0)
+    return 1;
+  return 0;
+}

should have status 0, because NUL is an ASCII byte.  Right now, btowc is
mistakenly returning WEOF and this program has status 1.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the Cygwin mailing list