public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andre Bleau <bleau@igb.umontreal.ca>
To: cygwin@cygwin.com
Subject: Patch for robots 2.0-3
Date: Tue, 04 May 2004 17:46:00 -0000	[thread overview]
Message-ID: <5.2.0.9.0.20040504133116.030ddad0@irispavp.igb.umontreal.ca> (raw)

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/

             reply	other threads:[~2004-05-04 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04 17:46 Andre Bleau [this message]
2004-05-04 18:34 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.2.0.9.0.20040504133116.030ddad0@irispavp.igb.umontreal.ca \
    --to=bleau@igb.umontreal.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).