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

Re: Mac OS 9 (Lamp) port

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 31, 2010, 05:49 UTC
Message-ID
<20100531054947.GB3328@progeny.tock>
In-Reply-To
<2776E3E5-234F-4A94-B06A-F4D83D87A414@gmail.com>
Joshua Juran wrote:
Show 18 quoted lines
> diff --git a/server-info.c b/server-info.c
> index 4098ca2..a9a0188 100644
> --- a/server-info.c
> +++ b/server-info.c
> @@ -132,8 +132,8 @@ static int read_pack_info_file(const char *infofile)
> 
>  static int compare_info(const void *a_, const void *b_)
>  {
> -       struct pack_info *const *a = a_;
> -       struct pack_info *const *b = b_;
> +       const struct pack_info *const *a = a_;
> +       const struct pack_info *const *b = b_;
> 
>         if (0 <= (*a)->old_num && 0 <= (*b)->old_num)
>                 /* Keep the order in the original */
> 
> I certainly won't defend Metrowerks C 2.4.1, but the patch is
> harmless enough.
Yes, it is even a good change.

It just emphasized for me that Metrowerks is a little confused about type qualifiers.

> 	#define alloc_n(type, n)  ((type*)xmalloc(sizeof (type) * n))
> 
> to factor the multiplication out of the calling code.
Maybe, imitating the signature of calloc:
 #define malloc_n(n, type) ((type *)xmalloc((n) * sizeof(type)))
For structs with variable-length arrays at the end:
 #define malloc_plus(type, extra) ((type *)xmalloc(sizeof(type) + (extra)))
That should cover most of the calls in git.
> I just want git to work on Lamp, and if
> there's community interest in C++ compatibility then I can assist
> with that.

There probably is not much direct interest. But if in the process we gain a little type-safety and portability, that would be nice. :)

Thanks for your hard work, Jonathan

Previous: Joshua JuranNext: Albert Dvornik
Message 33 of 39 in “Interix support”
  1. 0/3 Interix supportJonathan Callen, May 27, 2010
  2. 1/3 Support building on systems without poll(2)Jonathan Callen, May 27, 2010
  3. Sverre RabbelierMay 27, 2010
  4. Jeff KingMay 27, 2010
  5. Michael J GruberMay 27, 2010
  6. Jonathan CallenMay 27, 2010
  7. compat: Add another rudimentary poll() emulationJonathan Nieder, May 27, 2010
  8. Erik Faye-LundMay 27, 2010
  9. Marko KreenMay 27, 2010
  10. Erik Faye-LundMay 27, 2010
  11. Marko KreenMay 27, 2010
  12. Erik Faye-LundMay 27, 2010
  13. Albert DvornikMay 27, 2010
  14. Paolo BonziniMay 30, 2010
  15. Erik Faye-LundMay 27, 2010
  16. Marko KreenMay 27, 2010
  17. Erik Faye-LundMay 27, 2010
  18. Marko KreenMay 27, 2010
  19. Erik Faye-LundMay 27, 2010
  20. Marko KreenMay 27, 2010
  21. Erik Faye-LundMay 27, 2010
  22. Marko KreenMay 27, 2010
  23. Erik Faye-LundMay 27, 2010
  24. Peter KjellerstedtMay 27, 2010
  25. Albert DvornikMay 27, 2010
  26. Albert DvornikMay 27, 2010
  27. compat: Add another rudimentary poll() emulationJonathan Nieder, May 30, 2010
  28. Johannes SixtMay 30, 2010
  29. Jonathan NiederMay 30, 2010
  30. Joshua JuranMay 30, 2010
  31. Mac OS 9 (Lamp) portJonathan Nieder, May 31, 2010
  32. Joshua JuranMay 31, 2010
  33. Jonathan NiederMay 31, 2010
  34. Albert DvornikMay 31, 2010
  35. Jonathan NiederMay 31, 2010
  36. Albert DvornikMay 31, 2010
  37. 2/3 Support building without inttypes.hJonathan Callen, May 27, 2010
  38. 3/3 Add Interix supportJonathan Callen, May 27, 2010
  39. Jakub NarebskiMay 28, 2010

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.