Redhat 5 compilation errors in xmem_error.c
Matthias Andree
matthias.andree at gmx.de
Sat Dec 7 03:05:13 CET 2002
Nick Simicich <njs at scifi.squawk.com> writes:
>>Here should have been a function declaration for die. Can you diff
>>against the original version and see if that got lost over your change?
>
> Crap, I did not bother to save the original or the original tar file,
> and this system does not have bzcat. Well, I can unpack it by sshing to
> a system that had it...
> As I noted, the ./t.score1, etc ran fine. It is likely something in the
> stuff in the makefile, but I don't see what could be causing it there
> either. I am using the bash that came with the system, always have.
Then try: make check SHELL='/bin/sh -x'
and report back.
This patch should fix the compile issues for gcc 2.7.2.3 (tested on that
one, but I don't have bash1 around at the moment). The patch is against
CVS, I hope these files haven't changed so much that they break
patch. Oh, and grab 0.9.1.2 if you haven't already.
Index: xmalloc.h
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/xmalloc.h,v
retrieving revision 1.7
diff -u -r1.7 xmalloc.h
--- xmalloc.h 24 Nov 2002 18:16:08 -0000 1.7
+++ xmalloc.h 7 Dec 2002 02:02:23 -0000
@@ -5,7 +5,11 @@
#include <stdlib.h>
/*@noreturn@*/
-void xmem_error(const char *);
+void xmem_error(const char *)
+#ifdef __GNUC__
+ __attribute__((noreturn))
+#endif
+ ;
/*@only@*/ /*@out@*/ /*@notnull@*/
void *xmalloc(size_t size);
Index: xmem_error.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/xmem_error.c,v
retrieving revision 1.1
diff -u -r1.1 xmem_error.c
--- xmem_error.c 24 Nov 2002 18:16:08 -0000 1.1
+++ xmem_error.c 7 Dec 2002 02:02:23 -0000
@@ -4,9 +4,6 @@
#include "xmalloc.h"
/*@noreturn@*/
-#ifdef __GNUC__
-__attribute__ ((noreturn))
-#endif
void xmem_error(const char *a)
{
(void)fprintf(stderr, "%s: Out of memory\n", a);
Index: tests/dumbhead.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/tests/dumbhead.c,v
retrieving revision 1.4
diff -u -r1.4 dumbhead.c
--- tests/dumbhead.c 30 Nov 2002 15:38:00 -0000 1.4
+++ tests/dumbhead.c 7 Dec 2002 02:02:23 -0000
@@ -19,10 +19,14 @@
#include <stdlib.h>
/*@noreturn@*/
+static void die(const char *tag)
#ifdef __GNUC__
-__attribute__ ((noreturn))
+ __attribute__((noreturn))
#endif
-static void die(const char *tag) {
+;
+
+static void die(const char *tag)
+{
perror(tag);
exit(EXIT_FAILURE);
}
--
Matthias Andree
More information about the Bogofilter
mailing list