[pkg-s48-maint] Bug#324576: scsh-0.6: FTBFS with gcc-4.0: invalid storage class for function 'write_integer'

Lionel Elie Mamane lionel at mamane.lu
Tue Aug 23 15:33:51 UTC 2005


tags 324576 =upstream pending patch
forwarded 324576 https://sourceforge.net/tracker/index.php?func=detail&aid=1194281&group_id=10493&atid=110493

Thanks for your bug report. A fixed version is being built and will
hopefully be uploaded still today.

(Patch attached.)

On Mon, Aug 22, 2005 at 01:35:43PM -0700, Daniel Schepler wrote:
> Package: scsh-0.6
> Severity: serious
> Version: 0.6.6-9

>> From my build log, using pbuilder in an i386 chroot:

> gcc -c -DHAVE_CONFIG_H -I./c -I./cig  -g -Wall -O2 -D_GNU_SOURCE -o c/unix/io.o c/unix/io.c
> 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:160: warning: implicit declaration of 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
> make[1]: *** [c/unix/io.o] Error 1
> make[1]: Leaving directory `/tmp/buildd/scsh-0.6-0.6.6'
> make: *** [build-stamp] Error 2

-- 
Lionel
-------------- next part --------------
Tue Aug 23 14:27:47 CEST 2005  lionel at mamane.lu
  tagged DEBIAN_scsh-0.6_0.6.6-10
Tue Aug 23 14:22:23 CEST 2005  lionel at mamane.lu
  * gcc4-FTBFS
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)
 {
diff -rN -u old-scsh-0.6-0.6.6/debian/changelog new-scsh-0.6-0.6.6/debian/changelog
--- old-scsh-0.6-0.6.6/debian/changelog	2005-08-23 14:38:58.000000000 +0200
+++ new-scsh-0.6-0.6.6/debian/changelog	2005-08-23 14:14:08.000000000 +0200
@@ -3,8 +3,10 @@
   * Autogenerate Architecture: line of debian/control
     with help of type-handling
   * Remove libtool from Build-Depends: unused since 0.6.0-1
+  * Define function before it is used, at the top level.
+    Fixes a FTBFS with gcc4 (closes: #324576)
 
- --
+ -- Lionel Elie Mamane <lmamane at debian.org>  Tue, 23 Aug 2005 14:14:08 +0200
 
 scsh-0.6 (0.6.6-9) unstable; urgency=low
 



More information about the pkg-scheme48-maintainers mailing list