[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] gcc
From: |
Hauke Fath |
Subject: |
[Bug-tar] gcc |
Date: |
Thu, 1 Apr 2010 00:05:21 +0200 |
User-agent: |
Eudora Light 3.1.3 (Macintosh) |
All,
compiling gnutar on NetBSD 1.5 (gcc is egcs-1.1.2) fails because of what I
think is a C99ism:
bmake -dx
[...]
+ bmake all-am
+ echo CC imaxtostr.o
CC imaxtostr.o
+ source=imaxtostr.c object=imaxtostr.o libtool=no DEPDIR=.deps depmode=gcc
/bin/sh ../build-aux/depcomp cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe -c -o
imaxtostr.o imaxtostr.c
inttostr.c: In function `imaxtostr':
In file included from imaxtostr.c:6:
inttostr.c:38: syntax error before `extern'
*** Error code 1
Stop.
bmake: stopped in /var/obj/pkgsrc/archivers/gtar-base/work/tar-1.23/gnu
+ exit 1
*** Error code 1
The following patch moves the assignment past the declarations, fixing the
compile error:
--- gnu/inttostr.c.orig Wed Mar 10 10:50:38 2010
+++ gnu/inttostr.c
@@ -32,9 +32,10 @@ char *
inttostr (inttype i, char *buf)
{
char *p = buf + INT_STRLEN_BOUND (inttype);
+ verify (TYPE_SIGNED (inttype) == inttype_is_signed);
+
*p = 0;
- verify (TYPE_SIGNED (inttype) == inttype_is_signed);
#if inttype_is_signed
if (i < 0)
{
And another one: The NetBSD 1.5 <wchar.h> does not define WEOF. I snuck
that in here
--- gnu/btowc.c.orig Wed Mar 10 10:50:34 2010
+++ gnu/btowc.c
@@ -22,6 +22,11 @@
/* Specification. */
#include <wchar.h>
+/* NetBSD < 1.6 */
+#ifndef WEOF
+# define WEOF (-1)
+#endif
+
#include <stdio.h>
wint_t
but there may be better places? I see that gnutar does not make use of the
gnulib wchar.h (against which I filed a similar bug report)?
Regards,
hauke
--
"It's never straight up and down" (DEVO)
- [Bug-tar] gcc,
Hauke Fath <=