Missing telldir() and seekdir() on QNX Neutrino

Pavel Roskin proski at gnu.org
Tue Jun 19 19:37:49 UTC 2001


Hello!

I'm applying the patches needed for MC to compile on QNX Neutrino. Most
are trivial, but this one is crying for help. I don't really like it, but
since I don't see telldir() and seekdir() being used in MC it should be
safe.

I'm posting it here. Maybe a good soul will implement telldir() and
seekdir() for localfs if it's _really_ needed for something.

#warning is indented to hide it from very old compilers. gcc-3.0
recommends that.

ChangeLog
	* local.c (local_telldir): Warn and abort if telldir() is not
	available.
	(local_seekdir): Warn and abort if seekdir() is not available.

-------------------------------------
--- local.c
+++ local.c
@@ -91,13 +91,24 @@ local_opendir (vfs *me, char *dirname)
 static int
 local_telldir (void *data)
 {
+#ifdef HAVE_TELLDIR
     return telldir( *(DIR **) data );
+#else
+ #warning "Native telldir() not available, emulation not implemented"
+    abort();
+    return 0; /* for dumb compilers */
+#endif /* !HAVE_TELLDIR */
 }

 static void
 local_seekdir (void *data, int offset)
 {
+#ifdef HAVE_SEEKDIR
     seekdir( *(DIR **) data, offset );
+#else
+ #warning "Native seekdir() not available, emulation not implemented"
+    abort();
+#endif /* !HAVE_SEEKDIR */
 }

 static void *
-------------------------------------

Regards,
Pavel Roskin





More information about the mc-devel mailing list