/* get the fd from the connection phase */
fd = conn->proto.file->fd;
+/*VMS?? -- This only works reliable for STREAMLF files */
if( -1 != fstat(fd, &statbuf)) {
/* we could stat it, then read out the size */
expected_size = statbuf.st_size;
this is both more efficient than the former call to download() and
it avoids problems with select() and recv() on file descriptors
in Winsock */
+#ifdef VMS
+ if((signed int)expected_size != -1)
+#else
if(expected_size != -1)
+#endif
Curl_pgrsSetDownloadSize(data, expected_size);
while (res == CURLE_OK) {
nread = read(fd, buf, BUFSIZE-1);
- if (0 <= nread)
+ if ( nread > 0)
buf[nread] = 0;
+#ifdef VMS
+ if ((signed int)nread <= 0)
+#else
if (nread <= 0)
+#endif
break;
bytecount += nread;
/* NOTE: The following call to fwrite does CR/LF translation on