On 08/30/2011 12:46 PM, Rob McMahon wrote: > On 26/08/2011 17:29, Paul Eggert wrote: >> Can't you compile with the -xc99 option? The Sun documentation says it's >> supported, even with that old compiler: >> >> http://developers.sun.com/sunstudio/support/Ccompare.html#upd2e >> >> 'configure' should have deduced the -xc99 option for you; it tries >> '-xc99=all' early on. Does that not work for you? The documentation >> says '-xc99=%all' is required, but as I recall, the '%' was optional >> even way back when. >> > That doesn't seem to be quite enough unfortunately: > >> cc -V > cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-12 2003/05/18 >> dirs > ~/src/gnu/dist/coreutils-8.9/lib >> make -n heap.o > echo " CC " heap.o;source='heap.c' object='heap.o' libtool=no \ > DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \ > cc -I. -D_REENTRANT -O -xc99=%all -c -o heap.o heap.c >> make heap.o > CC heap.o > "heap.c", line 99: syntax error before or at: void > "heap.c", line 103: undefined symbol: top > "heap.c", line 103: warning: improper pointer/integer combination: op "=" > cc: acomp failed for heap.c > make: *** [heap.o] Error 2 > Exit 2 >> sed -n '96,103p' heap.c > if (heap->count == 0) > return NULL; > > void *top = heap->array[1]; > heap->array[1] = heap->array[heap->count--]; > heapify_down (heap->array, heap->count, 1, heap->compare); > > return top;
I've just adjusted that for heap.c as that might be going to gnulib at some stage. However you'll need to use your patch for the rest of coreutils. http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=683ee76 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8977 cheers, Pádraig.
