summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-01-22 10:46:05 +0000
committerJim Meyering <jim@meyering.net>2002-01-22 10:46:05 +0000
commitef95b3233e39fbccb803e9f743537950b7cdd10c (patch)
treed3e0b17dce5c2c25701a8730beea8c14949544ae
parent437d89a15183a1b2ef66724360bd09a7ef7d9d71 (diff)
downloadcoreutils-ef95b3233e39fbccb803e9f743537950b7cdd10c.tar.xz
(EOVERFLOW, fseeko): New macros.
-rw-r--r--src/sys2.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sys2.h b/src/sys2.h
index de7f6e284..48608cb18 100644
--- a/src/sys2.h
+++ b/src/sys2.h
@@ -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