finalise NEWS.stable
[gnulib.git] / tests / test-fread.c
index 0f77dbf..e205c9e 100644 (file)
@@ -26,6 +26,8 @@ SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *));
 #include <fcntl.h>
 #include <unistd.h>
 
+#include "msvc-inval.h"
+
 #include "macros.h"
 
 int
@@ -33,6 +35,13 @@ main (int argc, char **argv)
 {
   const char *filename = "test-fread.txt";
 
+  /* We don't have an fread() function that installs an invalid parameter
+     handler so far.  So install that handler here, explicitly.  */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+    && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+  gl_msvc_inval_ensure_handler ();
+#endif
+
   /* Prepare a file.  */
   {
     const char text[] = "hello world";