projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move to here from test-fprintf-posix.out.
[gnulib.git]
/
tests
/
test-fbufmode.c
diff --git
a/tests/test-fbufmode.c
b/tests/test-fbufmode.c
index
af4fa88
..
044d872
100644
(file)
--- a/
tests/test-fbufmode.c
+++ b/
tests/test-fbufmode.c
@@
-21,9
+21,19
@@
#include "fbufmode.h"
#include "fbufmode.h"
+#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
-#define ASSERT(expr) if (!(expr)) abort ();
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ abort (); \
+ } \
+ } \
+ while (0)
#define TESTFILE "t-fbufmode.tmp"
#define TESTFILE "t-fbufmode.tmp"
@@
-52,7
+62,9
@@
main ()
/* This setvbuf call can fail, e.g. on HP-UX 11. */
if (setvbuf (fp, buf, _IOLBF, 5) == 0)
{
/* This setvbuf call can fail, e.g. on HP-UX 11. */
if (setvbuf (fp, buf, _IOLBF, 5) == 0)
{
- ASSERT (fbufmode (fp) == _IOLBF);
+ /* mingw's setvbuf implements _IOLBF the same way as _IOFBF. */
+ ASSERT (fbufmode (fp) == _IOLBF
+ || fbufmode (fp) == _IOFBF);
}
/* This setvbuf call can fail, e.g. on HP-UX 11. */
}
/* This setvbuf call can fail, e.g. on HP-UX 11. */