{"thread":{"id":"18671","subject":"Git, C89, and older compilers","startedAt":"2009-03-31T19:26:57Z","lastAt":"2009-03-31T22:22:41Z","messageCount":3,"participants":["Joshua Juran","Jay Soffian"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"110051","messageId":"9D199AAA-5EC6-4E7C-AC26-0CDA68341D00@gmail.com","threadId":"18671","inReplyTo":null,"subject":"Git, C89, and older compilers","fromName":"Joshua Juran","fromEmail":"jjuran@gmail.com","sentAt":"2009-03-31T19:26:57Z","receivedAt":"2009-03-31T19:26:57Z","isPatch":false,"sender":{"key":"jjuran@gmail.com","avatar":null},"body":"Hello,\n\nI'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like  \nenvironment which runs in classic Mac OS, much like Cygwin.\n\nOne of the complications I've run into is that Metrowerks C 2.4.1  \n(released in 2001) doesn't support some of the constructs git uses,  \nsuch as initializing an aggregate's member with the address of a  \nlocal variable, illustrated by the patch below:\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 46e649c..8b98547 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -605,7 +605,8 @@ static int prepare_to_commit(const char  \n*index_file, const c\n\n         if (use_editor) {\n                 char index[PATH_MAX];\n-               const char *env[2] = { index, NULL };\n+               const char *env[2] = { NULL, NULL };\n+               env[0] = index;\n                 snprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\",  \nindex_file);\n                 if (launch_editor(git_path(commit_editmsg), NULL,  \nenv)) {\n                         fprintf(stderr,\n\nIs git intended to compile on a C89 compiler?  In any case, if I  \nproduce a complete set of patches, will they be applied?\n\nJosh\n"},{"id":"110068","messageId":"76718490903311432l7fba411fw4a0afff10fdf3da4@mail.gmail.com","threadId":"18671","inReplyTo":"9D199AAA-5EC6-4E7C-AC26-0CDA68341D00@gmail.com","subject":"Re: Git, C89, and older compilers","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-03-31T21:32:07Z","receivedAt":"2009-03-31T21:32:07Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Tue, Mar 31, 2009 at 3:26 PM, Joshua Juran <jjuran@gmail.com> wrote:\n> Hello,\n>\n> I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like environment\n> which runs in classic Mac OS, much like Cygwin.\n\nCall it morbid curiosity, but, why? (If I had to guess, I'd assume a\nGeorge Mallory answer.)\n\nj.\n"},{"id":"110074","messageId":"56939ADC-AF71-4DB7-94FD-99BE3947ACFA@gmail.com","threadId":"18671","inReplyTo":"76718490903311432l7fba411fw4a0afff10fdf3da4@mail.gmail.com","subject":"Re: Git, C89, and older compilers","fromName":"Joshua Juran","fromEmail":"jjuran@gmail.com","sentAt":"2009-03-31T22:22:41Z","receivedAt":"2009-03-31T22:22:41Z","isPatch":false,"sender":{"key":"jjuran@gmail.com","avatar":null},"body":"On Mar 31, 2009, at 2:32 PM, Jay Soffian wrote:\n\n> On Tue, Mar 31, 2009 at 3:26 PM, Joshua Juran <jjuran@gmail.com>  \n> wrote:\n>> Hello,\n>>\n>> I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like  \n>> environment\n>> which runs in classic Mac OS, much like Cygwin.\n>\n> Call it morbid curiosity, but, why? (If I had to guess, I'd assume a\n> George Mallory answer.)\n\nWell, there's a degree of that.\n\nEven more succinctly, I could add \"inertia\".  I started writing a  \nreplacement for Apple's MPW (one that would actually be useful for  \nreal work) over ten years ago, and never reached a point where I was  \nready to quit, even after switching to OS X.\n\nAdmittedly, there's an element of retro-programming.  I want to see  \nhow far I can go with this.  (One of my major hurdles will be git's  \nuse of fork().)\n\nBut there's also a sense of awe and wonder in knowing that I'm (most  \nprobably) the only person in the world working on such a project.\n\nFinally, I've begun using it as a research platform.  With  \ninspiration from Plan 9, I'm mapping the GUI into the filesystem, so  \nyou can write an application as a collection of shell scripts.\n\nJosh\n"}]}