-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have made a non-maintainer upload (NMU) to fix this bug; it is in
the DELAYED/3-day upload queue.  It will be ignored if you make a new
maintainer upload within 3 days.  The changes are detailed in the
attached diff.  Please apply the diff and acknowledge the NMU in your
next maintainer upload.

I would highly recommend applying the other changes I mentioned in my
previous diff in addition to the header fixes, as well as fixing the
use of uninitialised variables.  The source also #defines NULL to 0,
which is wrong (it's "(void *) 0"), and you should always include
<stdlib.h> instead of defining it yourself.


Regards,
Roger

- -- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
diff -urN abcmidi-20050101.original/crack.c abcmidi-20050101/crack.c
--- abcmidi-20050101.original/crack.c	2000-07-30 06:49:36.000000000 +0100
+++ abcmidi-20050101/crack.c	2005-07-13 23:25:43.159262528 +0100
@@ -64,6 +64,11 @@
 
 #include <stdio.h>
 
+#ifdef __STDC__
+#include <stdlib.h>
+#include <string.h>
+#endif
+
 /* define USE_INDEX if your C libraries have index() instead of strchr() */
 #ifdef USE_INDEX
 #define strchr index
@@ -76,7 +81,7 @@
 char* crack(argc, argv, flags, ign)
     int argc; char **argv; char *flags; int ign;
 {
-    char *pv, *flgp, *strchr();
+    char *pv, *flgp;
     while ((arg_index) < argc)
 	{
 	if (pvcon != NULL)
diff -urN abcmidi-20050101.original/debian/changelog abcmidi-20050101/debian/changelog
--- abcmidi-20050101.original/debian/changelog	2005-07-13 23:17:01.000000000 +0100
+++ abcmidi-20050101/debian/changelog	2005-07-13 23:44:36.191015520 +0100
@@ -1,3 +1,18 @@
+abcmidi (20050101-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Replace the -Wformat-non-literal argument from CFLAGS in
+    debian/rules, which is not supported by GCC 4.0, with
+    -Wformat-nonliteral (Closes: #288770).  Reported by
+    Andreas Jochens.
+  * Also required for GCC 4.0 compatibility:
+    - Add support for ISO C90 headers by checking if __STDC__
+      is defined, and add standard headers where required.
+    - Move static function declarations from midifile.h into
+      midifile.c.
+
+ -- Roger Leigh <[EMAIL PROTECTED]>  Wed, 13 Jul 2005 23:42:25 +0100
+
 abcmidi (20050101-1) unstable; urgency=low
 
   * New upstream release
diff -urN abcmidi-20050101.original/debian/rules abcmidi-20050101/debian/rules
--- abcmidi-20050101.original/debian/rules	2005-07-13 23:17:01.000000000 +0100
+++ abcmidi-20050101/debian/rules	2005-07-13 23:35:30.579961008 +0100
@@ -13,9 +13,9 @@
 
 # This is K&R C, so don't worry about a couple of classes of warnings.
 ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-CFLAGS="-O2 -Wall -Wno-implicit -Wno-return-type -Wformat-non-literal -c"
+CFLAGS="-O2 -Wall -Wno-implicit -Wno-return-type -Wformat-nonliteral -c"
 else
-CFLAGS="-O2 -g -Wall -Wno-implicit -Wno-return-type -Wformat-non-literal -c"
+CFLAGS="-O2 -g -Wall -Wno-implicit -Wno-return-type -Wformat-nonliteral -c"
 endif
 
 build: build-stamp
diff -urN abcmidi-20050101.original/drawtune.c abcmidi-20050101/drawtune.c
--- abcmidi-20050101.original/drawtune.c	2004-09-18 13:05:04.000000000 +0100
+++ abcmidi-20050101/drawtune.c	2005-07-13 23:26:33.434619512 +0100
@@ -29,7 +29,7 @@
 #endif
 
 #include <stdio.h>
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
diff -urN abcmidi-20050101.original/genmidi.c abcmidi-20050101/genmidi.c
--- abcmidi-20050101.original/genmidi.c	2004-12-18 19:32:07.000000000 +0000
+++ abcmidi-20050101/genmidi.c	2005-07-13 23:37:08.510073368 +0100
@@ -39,7 +39,7 @@
 #include "genmidi.h"
 #include "midifile.h"
 #include <stdio.h>
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <string.h>
 #include <ctype.h>
 #endif
diff -urN abcmidi-20050101.original/mftext.c abcmidi-20050101/mftext.c
--- abcmidi-20050101.original/mftext.c	2003-03-29 18:59:28.000000000 +0000
+++ abcmidi-20050101/mftext.c	2005-07-13 23:27:08.482291456 +0100
@@ -8,8 +8,9 @@
  */
 
 #include <stdio.h>
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <ctype.h>
+#include <stdlib.h>
 #endif
 #include "midifile.h"
 
diff -urN abcmidi-20050101.original/midi2abc.c abcmidi-20050101/midi2abc.c
--- abcmidi-20050101.original/midi2abc.c	2004-12-18 19:31:28.000000000 +0000
+++ abcmidi-20050101/midi2abc.c	2005-07-13 23:28:15.465108520 +0100
@@ -61,7 +61,7 @@
 #define strchr index
 #endif
 
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
diff -urN abcmidi-20050101.original/midicopy.c abcmidi-20050101/midicopy.c
--- abcmidi-20050101.original/midicopy.c	2004-09-18 13:25:26.000000000 +0100
+++ abcmidi-20050101/midicopy.c	2005-07-13 23:29:49.544806232 +0100
@@ -44,14 +44,23 @@
 #define NULLFUNC 0
 #define NULL 0
 
+/* Microsoft Visual C++ Version 6.0 or higher */
+#ifdef _MSC_VER
+#define ANSILIBS
+#endif
+
 #ifndef PCCFIX
 #include <stdlib.h>
 #endif
 
 #include <stdio.h>
 
+#if defined(ANSILIBS) || defined(__STDC__)
+#include <string.h>
+#include <stdlib.h>
+#else
 char *strcpy(), *strcat();
-
+#endif
 
 /* Functions to be called while processing the MIDI file. */
 int (*Mf_arbitrary) () = NULLFUNC;
diff -urN abcmidi-20050101.original/midifile.c abcmidi-20050101/midifile.c
--- abcmidi-20050101.original/midifile.c	2004-10-16 22:15:07.000000000 +0100
+++ abcmidi-20050101/midifile.c	2005-07-13 23:30:51.549380104 +0100
@@ -59,7 +59,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <string.h>
 #include <stdlib.h>
 #else
@@ -68,7 +68,22 @@
 
 /* int exit(), free(); */ /* Line commmented out JRA 19/12/95 */
 
-/* public stuff */
+static int readtrack();
+static void readheader();
+static void badbyte();
+static void metaevent();
+static void sysex();
+static void chanmessage();
+static void msginit();
+static void msgadd();
+static void biggermsg();
+static void mf_write_track_chunk();
+static void mf_write_header_chunk();
+static void WriteVarLen();
+static void write32bit();
+static void write16bit();
+static int msgleng();
+static int eputc();
 
 /* Functions to be called while processing the MIDI file. */
 int (*Mf_getc)() = NULLFUNC;
diff -urN abcmidi-20050101.original/midifile.h abcmidi-20050101/midifile.h
--- abcmidi-20050101.original/midifile.h	2003-03-29 15:38:38.000000000 +0000
+++ abcmidi-20050101/midifile.h	2005-07-13 23:31:22.819626304 +0100
@@ -34,26 +34,10 @@
 long mf_sec2ticks();
 void mfwrite();
 void mfread();
-static int readtrack();
 int mf_write_meta_event();
 int mf_write_midi_event();
 void mf_write_tempo();
-static void readheader();
 void mferror();
-static void badbyte();
-static void metaevent();
-static void sysex();
-static void chanmessage();
-static void msginit();
-static void msgadd();
-static void biggermsg();
-static void mf_write_track_chunk();
-static void mf_write_header_chunk();
-static void WriteVarLen();
-static void write32bit();
-static void write16bit();
-static int msgleng();
-static int eputc();
 
 /* MIDI status commands most significant bit is 1 */
 #define note_off         	0x80
diff -urN abcmidi-20050101.original/parseabc.c abcmidi-20050101/parseabc.c
--- abcmidi-20050101.original/parseabc.c	2004-11-09 15:22:07.000000000 +0000
+++ abcmidi-20050101/parseabc.c	2005-07-13 23:32:08.980608768 +0100
@@ -55,7 +55,7 @@
 #define strchr index
 #endif
 
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
diff -urN abcmidi-20050101.original/position.c abcmidi-20050101/position.c
--- abcmidi-20050101.original/position.c	2004-09-17 00:12:44.000000000 +0100
+++ abcmidi-20050101/position.c	2005-07-13 23:32:32.242072488 +0100
@@ -25,7 +25,7 @@
 /* a line of music. */
 
 #include <stdio.h>
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <stdlib.h>
 #endif
 #include "abc.h"
diff -urN abcmidi-20050101.original/pslib.c abcmidi-20050101/pslib.c
--- abcmidi-20050101.original/pslib.c	2002-01-24 07:23:30.000000000 +0000
+++ abcmidi-20050101/pslib.c	2005-07-13 23:32:59.341952680 +0100
@@ -41,7 +41,7 @@
 /*  #define ANSILIBS is just used to access time functions for */
 /*  %%CreationDate . This can safely be removed if it causes   */
 /*  compilation problems */
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <time.h>
 #endif
 #include "drawtune.h"
diff -urN abcmidi-20050101.original/store.c abcmidi-20050101/store.c
--- abcmidi-20050101.original/store.c	2005-07-13 23:17:01.000000000 +0100
+++ abcmidi-20050101/store.c	2005-07-13 23:33:40.500695600 +0100
@@ -61,7 +61,7 @@
 #define strchr index
 #endif
 
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
diff -urN abcmidi-20050101.original/toabc.c abcmidi-20050101/toabc.c
--- abcmidi-20050101.original/toabc.c	2004-11-09 15:20:20.000000000 +0000
+++ abcmidi-20050101/toabc.c	2005-07-13 23:33:59.902746040 +0100
@@ -37,7 +37,7 @@
 #define strchr index
 #endif
 
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
diff -urN abcmidi-20050101.original/yapstree.c abcmidi-20050101/yapstree.c
--- abcmidi-20050101.original/yapstree.c	2004-12-18 19:31:46.000000000 +0000
+++ abcmidi-20050101/yapstree.c	2005-07-13 23:34:25.510853016 +0100
@@ -33,7 +33,7 @@
 #define ANSILIBS
 #endif
 
-#ifdef ANSILIBS
+#if defined(ANSILIBS) || defined(__STDC__)
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFC1ZvTVcFcaSW/uEgRAs5fAKDvUzlNpaNcRtra+JF+bjNauK0OMQCfVvyD
7W43IzTdHaJKt105xCUN634=
=aq7+
-----END PGP SIGNATURE-----

Reply via email to