Re: [PATCH] Fix Solaris Workshop Compiler issues

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

 



Guido Ostkamp, Wed, Nov 14, 2007 21:31:13 +0100:
> Hello,
>
> please find below a patch that solves an error when compiling with the 
> original Sun Solaris Compiler. When compiling out of the box, the following 
> happens:
>
>     CC diff-delta.o
> "diff-delta.c", line 314: identifier redeclared: create_delta
> 	current : function(pointer to const struct delta_index {unsigned long 
> memsize, pointer to const void src_buf, unsigned long src_size, unsigned 
> int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, 
> pointer to const void, unsigned long, pointer to unsigned long, unsigned 
> long) returning pointer to void
> 	previous: function(pointer to const struct delta_index {unsigned long 
> memsize, pointer to const void src_buf, unsigned long src_size, unsigned 
> int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, 
> pointer to const void, unsigned long, pointer to unsigned long, unsigned 
> long) returning pointer to void : "delta.h", line 44

The both prototypes listed are *exactly* the same. And both are wrong.
Looks like you're dealing with typically broken Sun compiler.

Try defining const to nothing or removing it from this prototype.
I suspect the thing is just so old and broken that it does not even
know anything of const.

> cc: acomp failed for diff-delta.c
> make: *** [diff-delta.o] Error 2
>
> This is because 'struct delta_index' is declared with no size in delta.h 
> and with size in diff-delta.c which does not fit.

Huh?! Ever heard of forward declaration?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux