(usagi-users 03540) [ scsh-Bugs-1194281 ] scsh cannot be build with gcc 4.0

"SourceForge.net" <[email protected]>
Newsgroups gmane.linux.ipv6.usagi.users
Message-ID <a6r7a7tmqy.fsf__2681.43802318281$1130403416$gmane$org@informatik.uni-tuebingen.de>
Bugs item #1194281, was opened at 2005-05-03 10:04
Message generated for change (Comment added) made by mainzelm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=1194281&group_id=10493

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: build
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christoph Bauer (fridolin)
>Assigned to: Martin Gasbichler (mainzelm)
Summary: scsh cannot be build with gcc 4.0

Initial Comment:
here is the error message:

c/unix/io.c: In function 'ps_write_integer':
c/unix/io.c:154: error: invalid storage class for 
function 'write_integer'
c/unix/io.c: At top level:
c/unix/io.c:171: error: conflicting types for 'write_integer'
c/unix/io.c:160: error: previous implicit declaration 
of 'write_integer' was here

OS: IRIX64

----------------------------------------------------------------------

>Comment By: Martin Gasbichler (mainzelm)
Date: 2005-10-27 09:56

Message:
Logged In: YES 
user_id=17553

Fixed as suggested by  schoinobates.

--
Martin

----------------------------------------------------------------------

Comment By: Schoinobates Volans (schoinobates)
Date: 2005-08-23 17:29

Message:
Logged In: YES 
user_id=41822

Bug as been reproduced under Debian GNU/Linux i386 and
sparc. Here's a patch. It is also available as a download in
a file from http://bugs.debian.org/324576

diff -rN -u old-scsh-0.6-0.6.6/c/unix/io.c
new-scsh-0.6-0.6.6/c/unix/io.c
--- old-scsh-0.6-0.6.6/c/unix/io.c	2005-08-23
14:38:58.000000000 +0200
+++ new-scsh-0.6-0.6.6/c/unix/io.c	2005-08-23
14:14:49.000000000 +0200
@@ -146,13 +146,27 @@
       return 0; }
 }
 
+static long
+write_integer(unsigned long n, FILE *port)
+{
+  char ch;
+  long status;
+
+  if (n == 0)
+    status = 0;
+  else {
+    status = write_integer(n / 10, port);
+    if (status == 0) {
+      ch = (n % 10) + '0';
+      WRITE_CHAR(ch, port,status); } }
+  return status;
+}
+
 long
 ps_write_integer(long n, FILE *port)
 {
   int status;
 
-  static long write_integer(unsigned long n, FILE *port);
-
   if (n == 0) {
     WRITE_CHAR('0', port, status);
     return status; }
@@ -166,22 +180,6 @@
       return status; }
 }
 
-static long
-write_integer(unsigned long n, FILE *port)
-{
-  char ch;
-  long status;
-
-  if (n == 0)
-    status = 0;
-  else {
-    status = write_integer(n / 10, port);
-    if (status == 0) {
-      ch = (n % 10) + '0';
-      WRITE_CHAR(ch, port,status); } }
-  return status;
-}
-
 long
 ps_write_string(char *string, FILE *port)
 {


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=1194281&group_id=10493
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.