~ubuntu-branches/ubuntu/quantal/gnushogi/quantal

« back to all changes in this revision

Viewing changes to debian/patches/04-errno-fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2009-08-20 01:52:26 UTC
  • Revision ID: james.westby@ubuntu.com-20090820015226-mx0orhrtlneftl0a
Tags: 1.3.2-6
* New maintainer.
* Switch packaging to cdbs + simple-patchsys.
* Dropped special handling of config.*, now handled by cdbs.
* Factorize common install options.
* Include my fixes+minishogi patch series (do not activate minishogi
  build yet):
  * 04-errno-fix.patch - Errno mis-redifinition.
  * 03-proto-fix.patch - Fix a function prototype.
  * 05-ai-overflow.patch - Integer overflow possibly handicaping the AI.
  * 06-fix-runnaway.patch - Avoid eating 100% CPU on Ctrl-C.
  * 10-out-of-tree.patch - Allow building out of source tree
  * 11-refactor-enums.patch - Use enums.
  * 12-refactor-constants.patch - Parametrize more hardcoded contants.
  * 13-refactor-statify.patch - Statify functions when possible.
  * 14-internals-doc.patch - Document some internal APIs.
  * 20-minishogi.patch - Initial minishogi support.
  * 21-gen-patterns.patch - Generate patterns.inc at build time.
* Adjust 21-gen-patterns.patch not to cause removal of patterns.inc,
  since that confuses the patch system at clean-time.
* Save patterns.inc before building and resture it on clean, to avoid
  spurious diffs.
* Build-depend on x11-utils instead of the obsolete xutils (lintian).
* Fixed "X Windows" typo in xshogi extended description.
* Make gnushogi suggest tagua as an alternative frontend.
* Reword gnushogi extended description to emphasize that the preferred
  way to use it is through a graphical frontend.
* Remove mention to the Internet Shogi Server in xshogi description,
  since that support was removed long ago upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
commit 15c08f418cbc6c5dd6d84e90efef566be4087130
 
2
Author: Yann Dirson <ydirson@altern.org>
 
3
Date:   Fri Jan 18 00:18:35 2008 +0100
 
4
 
 
5
    Do not attempt to outguess system headers by (re)defining errno.
 
6
    
 
7
    Recent glibc define error as a cpp macro expanding to a function
 
8
    call.  Thus, "extern int errno" should cause a link-time undefined
 
9
    symbol when errno.h is not included.  Here it is, and gcc complains
 
10
    with the following cryptic warning:
 
11
    
 
12
    ../../gnushogi/sysdeps.c: In function 'ElapsedTime_FIONREAD':
 
13
    ../../gnushogi/sysdeps.c:97: warning: function declaration isn't a prototype
 
14
 
 
15
diff --git a/gnushogi/sysdeps.c b/gnushogi/sysdeps.c
 
16
index 9752e96..fa7ef87 100644
 
17
--- a/gnushogi/sysdeps.c
 
18
+++ b/gnushogi/sysdeps.c
 
19
@@ -94,7 +94,6 @@ ElapsedTime_FIONREAD(ElapsedTime_mode iop)
 
20
     int  nchar;
 
21
 
 
22
     struct timeval tv;
 
23
-    extern int errno;
 
24
 
 
25
     if ((i = ioctl((int) 0, FIONREAD, &nchar)))
 
26
     {
 
27
@@ -230,9 +229,6 @@ ElapsedTime_FIONREAD(ElapsedTime_mode iop)
 
28
     int  nchar;
 
29
     int  i;
 
30
 
 
31
-    extern int errno;
 
32
-
 
33
-
 
34
     if ((i = ioctl((int) 0, FIONREAD, &nchar)))
 
35
     {
 
36
         perror("FIONREAD");