Re: [PATCH 0/8] enhancing builds on Solaris
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Jun 6, 2009, 00:41 UTC
- Message-ID
- <T7_w8K5IX5OgW5JLdf5peLzAiFf8SXQIHPcceb1qc4y8ncD9xtH3Cw@cipher.nrlssc.navy.mil>
- In-Reply-To
- <7vbpp2fcca.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Looked good except for 3/8 which I did not quite understand.
I get this error when compiling using the SUNWspro c99 compiler when delta.h is included in diff-delta.c:
"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
c99: acomp failed for diff-delta.c
gmake: *** [diff-delta.o] Error 2I don't see any difference between those two "current" and "previous" statements.
I thought I knew why the error was occurring, but now I don't think I do. There are other function declarations in delta.h that are implemented in diff-delta.c, and those functions are both declared and implemented _before_ create_delta in delta.h and diff-delta.c respectively.
But, there does not seem to be anything declared in delta.h that is required by diff-delta.c.
Maybe the commit message should be shortened to something more like:
The SUNWspro C99 compiler complains: "identifier redeclared: create_delta" when delta.h is included. There is nothing in "delta.h" that is required by diff-delta.c, so don't #include it.
Hmm, well, I just noticed that in the commit message I said "diff.h" everywhere when I meant to say "delta.h". Maybe that is the confusion.
-brandon