git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix Solaris Workshop Compiler issues

From
GOGuido Ostkamp <git@ostkamp.fastmail.fm>
Date
Nov 14, 2007, 23:21 UTC
Message-ID
<Pine.LNX.4.64.0711150011020.4135@bianca.dialin.t-online.de>
In-Reply-To
<7vprycfrk6.fsf@gitster.siamese.dyndns.org>
On Wed, 14 Nov 2007, Junio C Hamano wrote:
Show 16 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> Guido Ostkamp, Wed, Nov 14, 2007 21:31:13 +0100:
>>> ...
>>> 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?
>
> We are not the first people who pass around a pointer to an opaque 
> struct in the API to hide away the implementation.  It would be 
> surprising if the Workshop Compiler chokes on this and not other 
> projects.

You got the original error report from Sun's compiler included in my earlier email. This happens with at least Sun Forte 6.1 (Solaris 8) and Sun Workshop 11 (Solaris 10), IIRC.

The function declarations regarding create_delta() in delta.h and diff-delta.c are identical with respect to the type names of the parameter (only some internal names e.g. like 'buf' vs. 'trg_buf' are slightly different, but this has no effect).

The main difference is that the 'struct delta_index' is opaque in delta.h and non-opaque in diff-delta.c; the patch clearly shows it solves the error. So we've got a solution.

If you feel we could try something else, please let me know and I'll check it out.

Please keep me on CC, as I'm not subscribed to the list, thanks.
Regards
Guido
Previous: Junio C HamanoNext: Alex Riesen
Message 4 of 31 in “Fix Solaris Workshop Compiler issues”
  1. Fix Solaris Workshop Compiler issuesGuido Ostkamp, Nov 14, 2007
  2. Alex RiesenNov 14, 2007
  3. Junio C HamanoNov 14, 2007
  4. Guido OstkampNov 14, 2007
  5. Alex RiesenNov 14, 2007
  6. Björn SteinbrinkNov 15, 2007
  7. Junio C HamanoNov 15, 2007
  8. Björn SteinbrinkNov 15, 2007
  9. Junio C HamanoNov 15, 2007
  10. Björn SteinbrinkNov 15, 2007
  11. Fix "identifier redeclared" compilation error with SUN cc.Björn Steinbrink, Nov 15, 2007
  12. Guido OstkampNov 15, 2007
  13. Junio C HamanoNov 15, 2007
  14. Guido OstkampNov 15, 2007
  15. Add mkdtemp() workaround for Sun Solaris 10Guido Ostkamp, Nov 16, 2007
  16. [RFH] Solaris portabilityJunio C Hamano, Nov 17, 2007
  17. Guido OstkampNov 18, 2007
  18. Junio C HamanoNov 18, 2007
  19. Junio C HamanoNov 16, 2007
  20. Björn SteinbrinkNov 16, 2007
  21. Fix "identifier redeclared" compilation error with SUN ccGuido Ostkamp, Nov 19, 2007
  22. Junio C HamanoNov 20, 2007
  23. Guido OstkampNov 20, 2007
  24. Guido OstkampNov 20, 2007
  25. Martin MaresNov 20, 2007
  26. Junio C HamanoNov 20, 2007
  27. Martin MaresNov 20, 2007
  28. Linus TorvaldsNov 15, 2007
  29. David KastrupNov 15, 2007
  30. Linus TorvaldsNov 15, 2007
  31. Junio C HamanoNov 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.