public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Patch for robots 2.0-3
@ 2004-05-04 17:46 Andre Bleau
  2004-05-04 18:34 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Bleau @ 2004-05-04 17:46 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch for robots 2.0-3
  2004-05-04 17:46 Patch for robots 2.0-3 Andre Bleau
@ 2004-05-04 18:34 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2004-05-04 18:34 UTC (permalink / raw)
  To: cygwin

On May  4 13:46, Andre Bleau wrote:
> 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

Thanks for the heads up.  I've uploaded a new version of robots with
a few fixes.  Announcement follows.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-04 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-04 17:46 Patch for robots 2.0-3 Andre Bleau
2004-05-04 18:34 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).