(EOVERFLOW, fseeko): New macros.
authorJim Meyering <jim@meyering.net>
Tue, 22 Jan 2002 10:46:05 +0000 (10:46 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 22 Jan 2002 10:46:05 +0000 (10:46 +0000)
src/sys2.h

index de7f6e2..48608cb 100644 (file)
@@ -553,3 +553,13 @@ enum
     }                                          \
   while (0)
 #endif
+
+#ifndef EOVERFLOW
+# define EOVERFLOW EINVAL
+#endif
+
+#if ! HAVE_FSEEKO && ! defined fseeko
+# define fseeko(s, o, w) ((o) == (long) (o)            \
+                         ? fseek ((s), (o), (w))       \
+                         : (errno = EOVERFLOW, -1))
+#endif