Bug#259894: wnn6-sdk: FTBFS with gcc-3.4: conflicting types for 'malloc'

2005-09-17 Thread Steve Langasek
Hi Keita,

Have you made any progress on this bug?  Andreas's patch applies fine, but I
find upon rebuilding the package that as a result of a change in the
behavior of imake (probably related to the switch to xorg), the SONAME of
the library has changed and the package can no longer be named libwnn6
because it doesn't provide the same interface!

I don't have a problem with renaming the library package (libwnn6-1 seems
like a good name), but seeing that this package uses imake *in addition* to
including non-ANSI C code, I wonder whether it's worth the effort to fix
these bugs, or maybe the library should be removed and kinput should be
rebuilt without it?

Anyway, attached is a complete patch that fixes both issues.  I'll probably
go ahead and upload it to unstable in a few days if I don't hear any
objections from you.

If this package is to be kept, it would probably be a good idea to fix it at
some point so that this is a non-native package instead of a native one.  I
haven't tried to figure out which parts of the source package would properly
belong to the .orig.tar.gz.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/changelog 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/changelog
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/changelog 2004-10-08 
06:48:51.0 -0700
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/changelog 2005-09-17 
01:23:07.0 -0700
@@ -1,3 +1,13 @@
+wnn6-sdk (1.0.0-12.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Medium-urgency upload for RC bugfix.
+  * Remove broken non-ANSI redefinitions of malloc/free.  Closes: #259894.
+  * Rename libwnn6 to libwnn6-1, since new versions of imake have
+changed the SONAME for us.
+
+ -- Steve Langasek [EMAIL PROTECTED]  Sat, 17 Sep 2005 00:43:08 -0700
+
 wnn6-sdk (1.0.0-12) unstable; urgency=low
 
   * Updated Standards-Version: to 3.6.1.
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/control 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/control
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/control   2004-10-08 
17:29:11.0 -0700
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/control   2005-09-17 
01:22:40.0 -0700
@@ -7,7 +7,7 @@
 Package: libwnn6-dev
 Section: libdevel
 Architecture: any
-Depends: libwnn6 (= ${Source-Version}), libc6-dev
+Depends: libwnn6-1 (= ${Source-Version}), libc6-dev
 Conflicts: wnn-dev, freewnn-jserver-dev, wnn6-dev, libwnn-dev
 Replaces: wnn6-dev
 Description: Header files and static library for Wnn6 client library
@@ -20,7 +20,7 @@
  Wnn6 client library. Install this package if you wish to develop your
  own Wnn6 client programs.
 
-Package: libwnn6
+Package: libwnn6-1
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6-1.install 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6-1.install
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6-1.install 1969-12-31 
16:00:00.0 -0800
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6-1.install 2005-09-17 
01:25:04.0 -0700
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libwnn6.so.1
+debian/tmp/usr/lib/libwnn6.so.1.0.0
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6-1.shlibs 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6-1.shlibs
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6-1.shlibs  1969-12-31 
16:00:00.0 -0800
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6-1.shlibs  2005-09-17 
01:24:27.0 -0700
@@ -0,0 +1 @@
+libwnn6 1 libwnn6-1
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6.install 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6.install
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6.install   2004-10-08 
07:51:09.0 -0700
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6.install   1969-12-31 
16:00:00.0 -0800
@@ -1,2 +0,0 @@
-debian/tmp/usr/lib/libwnn6.so.1.0
-debian/tmp/usr/lib/libwnn6.so.1.0.0
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6.shlibs 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6.shlibs
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/debian/libwnn6.shlibs2001-03-31 
01:05:12.0 -0800
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/debian/libwnn6.shlibs1969-12-31 
16:00:00.0 -0800
@@ -1 +0,0 @@
-libwnn6 1.0 libwnn6
diff -Nru /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/patch/malloc.patch 
/tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/patch/malloc.patch
--- /tmp/CHtbgQ79aj/wnn6-sdk-1.0.0/patch/malloc.patch   2001-03-31 
00:18:55.0 -0800
+++ /tmp/UVcC0pi8Oh/wnn6-sdk-1.0.0/patch/malloc.patch   2005-09-17 
00:42:54.0 -0700
@@ -1,16 +1,7 @@
 diff -uNr src/contrib/im/Xsi.orig/Wnn/etc/bdic.c 
src/contrib/im/Xsi/Wnn/etc/bdic.c
 --- src/contrib/im/Xsi.orig/Wnn/etc/bdic.c Fri Sep  1 18:58:54 2000
 +++ src/contrib/im/Xsi/Wnn/etc/bdic.c  

Bug#259894: wnn6-sdk: FTBFS with gcc-3.4: conflicting types for 'malloc'

2005-09-04 Thread Roger Leigh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Has any progress been made with this bug?

After reviewing the patch patch/malloc.patch, it's clear this is
introducing KRisms which GCC 4.0 won't allow.  These need replacing
with proper prototypes or, preferably, include a header containing the
prototypes.  It's not at all clear that the patch is actually
necessary or desirable given that all it does is wrap the system
malloc() and related functions.

Summary:
1) The patch is written using KR C.  It's 2005, not 1985, and this is
   no longer acceptable.
2) The patch is funtamentally broken.  Have you looked at it closely?

   Example:

   +char *
   +malloc0(size)
   +int size;
   +{
   +if(size == NULL){
   +   size = 1;

   size is an integer, not a pointer, so a comparison to NULL is
   broken...

3) There is no header for the new functions.
4) Modules should not prototype functions from other modules, they
   should use the header.  KR prototypes are even worse!

Have any attempts been made with upstream to completely ANSI-ify the
source?  There are workarounds for SVR2 in there, and that's well
obsolete.  We have had ANSI/ISO C for over 16 years now.


Regards,
Roger

- -- 
Roger Leigh
Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
Debian GNU/Linuxhttp://www.debian.org/
GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 http://mailcrypt.sourceforge.net/

iD8DBQFDGx6BVcFcaSW/uEgRAp/yAJ9zImnPVO7oCovkP903zwJNulMEaQCg5zfD
BAbQc0apx5QEnlUeXYqAIfg=
=1VnW
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]