> > I could see changing this to size_t but not adding the extra vmin_. > > >@@ -423,20 +426,21 @@ fhandler_serial::ioctl (unsigned int cmd > > 0, &mcr, 4, &cb, 0); > > if (!result) > > { > >- __seterrno (); > >- res = -1; > >- goto out; > >+ modem_status |= rts | dtr; > > This is saying that if a function (DeviceIoControl) fails we fallback to > Win95 behavior. Why wouldn't we want to reflect the failure of the > function? Otherwise we could be masking an actual failure. > > Anyway, I've checked in a variation of this change minus the > DeviceIoControl part.
The call to DeviceIoCtl is BOOL result = DeviceIoControl (get_handle (), 0x001B0078, NULL, 0, &mcr, 4, &cb, 0); I heve no ideas what does this call means, it's undocumented. The call always fails on my W2k when attempting to get the status of laptop's built-in modem. It seems to me it's better to ignore the error and to fall back to Win95 behavior rather than return the error. Sergey Okhapkin Somerset, NJ