#include "binary-io.h"
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#if !GNULIB_FSEEK
+# undef fseek
+#endif
+
#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
+ do \
+ { \
+ if (!(expr)) \
+ { \
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
+ fflush (stderr); \
+ abort (); \
+ } \
+ } \
while (0)
#ifndef FUNC_UNGETC_BROKEN
ASSERT (ftello (stdin) == 2);
}
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
/* Test ftell beyond end of file. */
ASSERT (fseek (stdin, 0, SEEK_END) == 0);
ch = ftello (stdin);
ASSERT (fseek (stdin, 10, SEEK_END) == 0);
ASSERT (ftell (stdin) == ch + 10);
ASSERT (ftello (stdin) == ch + 10);
+#endif
return 0;
}