Mail Archives: cygwin/2004/05/04/13:46:49
I've noticed that robots 2.0-3 fails to update its high score files with
cygwin 1.5.x. Debugging shows that the bug is related to lseek. Searching
the archives, I found this message from cgf:
http://www.cygwin.com/ml/cygwin/2003-07/msg01677.html
>And here's why "fails.c" fails:
>
>--- lseek-fails.c~ 2003-07-29 11:43:29.428769079 -0400
>+++ lseek-fails.c 2003-07-29 11:46:01.911652780 -0400
>@@ -1,4 +1,5 @@
> #include <stdio.h>
>+#include <unistd.h>
>
> void unzip()
> {
>
>You need to include the prototype for lseek.
>
>cgf
So, here's a patch to robots.h to do just that:
$ diff -u robots.h robots.h.new
--- robots.h 2003-07-18 11:23:57.001000000 -0400
+++ robots.h.new 2004-05-04 13:23:50.407687000 -0400
@@ -96,7 +96,11 @@
extern int old_free;
extern long score;
-extern long lseek();
+#ifdef __CYGWIN__
+#include <unistd.h>
+#else
+extern long lseek();
+#endif
extern char *strcpy ();
extern char *strncpy ();
Now I'm back to the top 20 robot killers of all time (on my machine):
$ ./robots
Top Twenty Scores for this Week:
Rank Score Name
> 1 20 ableau: chickened out on level 1.<
[Press return to continue]
Top Twenty Scores of All Time:
Rank Score Name
> 1 20 ableau: chickened out on level 1.<
;-)
André Bleau, Cygwin's OpenGL package maintainer.
Please address all questions and problem reports about Cygwin's OpenGL
package to cygwin at cygwin dot com .
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -