bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.0: compilation failure with c89 compiler


From: Jim Meyering
Subject: Re: coreutils-6.0: compilation failure with c89 compiler
Date: Thu, 17 Aug 2006 12:08:24 +0200

Bruno Haible <address@hidden> wrote:
> The c99-to-c89.diff mentioned in the announcement is not enough to
> build with Solaris cc on Solaris 7. I get an error

Hi Bruno,

Thanks for reporting all of these.

> source='fts.c' object='fts.o' libtool=no \
> DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
> cc -O -DHAVE_CONFIG_H 
> -DLIBDIR=\"/nfs/visu/telecom/users/haible/gnu/arch/solaris/lib\" -I. -I. -I.. 
>  -I.. -I.  -I/nfs/visu/telecom/users/haible/gnu/arch/solaris/include   -g -c 
> fts.c
> "fts.c", line 804: syntax error before or at: /
> "fts.c", line 807: undefined symbol: saved_errno

I removed that comment.
It was no longer relevant.

> Find attached the needed diffs (not including your src/c99-to-c89.diff).

Thank you.
I've integrated them and adapted the patch-check rule work:

2006-08-17  Jim Meyering  <address@hidden>

        * Makefile.maint (patch-check): Adapt to work now that the patch
        modifies more than one file in src/.

        With this patch, permit building with Solaris cc on Solaris 7.
        * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
        This integrates patches from Bruno Haible.

Relying on diagnostics in the output of patch to determine whether the
patch applied with no offsets seems fragile, but I don't see a better way.

Index: Makefile.maint
===================================================================
RCS file: /fetish/cu/Makefile.maint,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -p -u -r1.244 -r1.245
--- Makefile.maint      16 Aug 2006 12:37:35 -0000      1.244
+++ Makefile.maint      17 Aug 2006 10:03:05 -0000      1.245
@@ -283,15 +283,15 @@ sc_useless_cpp_parens:
                1>&2; exit 1; } || :
 
 # Ensure that the c99-to-c89 patch applies cleanly.
-# For now, it affects only remove.c.  Eventually, we'll probably
-# have to copy all of src/ before running patch.
 patch-check:
-       cp src/remove.c tmp-remove.c
-       patch -V never --fuzz=0 tmp-remove.c src/c99-to-c89.diff \
+       rm -rf src-c89 address@hidden address@hidden
+       cp -a src src-c89
+       (cd src-c89; patch -V never --fuzz=0) < src/c99-to-c89.diff \
          > address@hidden 2>&1
-       sed -n '2p' address@hidden > address@hidden
-       test -s address@hidden && exit 1 || :
-       rm -f tmp-remove.c address@hidden address@hidden
+       grep -v '^patching file ' address@hidden > address@hidden || :
+       fail=0; test -s address@hidden && fail=1 || : ; \
+       rm -rf src-c89 address@hidden address@hidden; \
+       test $$fail = 0
 
 # Ensure that date's --help output stays in sync with the info
 # documentation for GNU strftime.  The only exception is %N,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]