git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git, C89, and older compilers
@ 2009-03-31 19:26 Joshua Juran
  2009-03-31 21:32 ` Jay Soffian
  0 siblings, 1 reply; 3+ messages in thread
From: Joshua Juran @ 2009-03-31 19:26 UTC (permalink / raw)
  To: git

Hello,

I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like  
environment which runs in classic Mac OS, much like Cygwin.

One of the complications I've run into is that Metrowerks C 2.4.1  
(released in 2001) doesn't support some of the constructs git uses,  
such as initializing an aggregate's member with the address of a  
local variable, illustrated by the patch below:

diff --git a/builtin-commit.c b/builtin-commit.c
index 46e649c..8b98547 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -605,7 +605,8 @@ static int prepare_to_commit(const char  
*index_file, const c

         if (use_editor) {
                 char index[PATH_MAX];
-               const char *env[2] = { index, NULL };
+               const char *env[2] = { NULL, NULL };
+               env[0] = index;
                 snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s",  
index_file);
                 if (launch_editor(git_path(commit_editmsg), NULL,  
env)) {
                         fprintf(stderr,

Is git intended to compile on a C89 compiler?  In any case, if I  
produce a complete set of patches, will they be applied?

Josh

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Git, C89, and older compilers
  2009-03-31 19:26 Git, C89, and older compilers Joshua Juran
@ 2009-03-31 21:32 ` Jay Soffian
  2009-03-31 22:22   ` Joshua Juran
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Soffian @ 2009-03-31 21:32 UTC (permalink / raw)
  To: Joshua Juran; +Cc: git

On Tue, Mar 31, 2009 at 3:26 PM, Joshua Juran <jjuran@gmail.com> wrote:
> Hello,
>
> I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like environment
> which runs in classic Mac OS, much like Cygwin.

Call it morbid curiosity, but, why? (If I had to guess, I'd assume a
George Mallory answer.)

j.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git, C89, and older compilers
  2009-03-31 21:32 ` Jay Soffian
@ 2009-03-31 22:22   ` Joshua Juran
  0 siblings, 0 replies; 3+ messages in thread
From: Joshua Juran @ 2009-03-31 22:22 UTC (permalink / raw)
  To: Jay Soffian; +Cc: git

On Mar 31, 2009, at 2:32 PM, Jay Soffian wrote:

> On Tue, Mar 31, 2009 at 3:26 PM, Joshua Juran <jjuran@gmail.com>  
> wrote:
>> Hello,
>>
>> I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like  
>> environment
>> which runs in classic Mac OS, much like Cygwin.
>
> Call it morbid curiosity, but, why? (If I had to guess, I'd assume a
> George Mallory answer.)

Well, there's a degree of that.

Even more succinctly, I could add "inertia".  I started writing a  
replacement for Apple's MPW (one that would actually be useful for  
real work) over ten years ago, and never reached a point where I was  
ready to quit, even after switching to OS X.

Admittedly, there's an element of retro-programming.  I want to see  
how far I can go with this.  (One of my major hurdles will be git's  
use of fork().)

But there's also a sense of awe and wonder in knowing that I'm (most  
probably) the only person in the world working on such a project.

Finally, I've begun using it as a research platform.  With  
inspiration from Plan 9, I'm mapping the GUI into the filesystem, so  
you can write an application as a collection of shell scripts.

Josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-31 22:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 19:26 Git, C89, and older compilers Joshua Juran
2009-03-31 21:32 ` Jay Soffian
2009-03-31 22:22   ` Joshua Juran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).