diff osdep/ftello.c @ 21856:e268886eb13d

Split fseeko.c into fseeko.c and ftello.c, move #ifdefs into the build system.
author diego
date Wed, 10 Jan 2007 19:35:41 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/osdep/ftello.c	Wed Jan 10 19:35:41 2007 +0000
@@ -0,0 +1,19 @@
+/*
+ * ftello.c
+ *	  64-bit version of ftello() for systems which do not have it
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+
+off_t
+ftello(FILE *stream)
+{
+	fpos_t floc;
+
+	if (fgetpos(stream, &floc) != 0)
+		return -1;
+	return floc;
+}