Mac OS 9 (Lamp) port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[new thread, cleared cc list]

Hi Josh,

Joshua Juran wrote:

> http://github.com/jjuran/git.git

I assume the lamp-git branch is the interesting one.  Some of
these patches (e.g., a3b378781) look like they might be of general
interest, while others (e.g., 6e6b106d) reveal Metrowerks to be
a bit braindead.

Have you thought about getting git to compile in C++ mode, where
Metrowerks might be a little more sane[1]?  Sure, this runs into
basically all the major incompatibilities between C and C++[2], but
that might not be insurmountable:

 . No implicit conversion from void* to other: don’t use void *,
   then.  With type-safe interfaces like

#define typed_malloc(size, type) (type *)xmalloc(size)
#define malloc_many(nmemb, type) typed_malloc((nmemb) * sizeof(type), type)

   one can take advantage of type checking without the annoyance of
   casts at the call site.

   Another place git uses void * is for low-level access to the
   object database, because it is not obvious whether objects data
   should use char * or unsigned char *.  unsigned char * should
   be fine.

 . Use of C++ keywords:

#ifdef __cplusplus
#define template git_template
#define typename git_typename
#endif

   It is not like this is an actual C++ program.

 . Assignment of ints to enums is forbidden: okay, this one is
   not worth working around.  Does Metrowerks have an option to turn
   off this piece of C++ insanity?

Curious,
Jonathan

[1] e.g., to solve the problem you described before:
http://thread.gmane.org/gmane.comp.version-control.git/115301

[2] http://www2.research.att.com/~bs/bs_faq.html#merge
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]