Commit ce052b6c authored by Bodo Möller's avatar Bodo Möller
Browse files

Under VMS, ftruncate should be available

parent e84c2d26
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -162,6 +162,13 @@ int RAND_write_file(const char *file)
		ret+=i;
		if (n <= 0) break;
		}
#ifdef VMS
	/* We may have updated an existing file using mode "rb+",
	 * now remove any old extra bytes */
	if (ret > 0)
		ftruncate(fileno(out), ret);
#endif

	fclose(out);
	memset(buf,0,BUFSIZE);
err: