OS X 10.2 patch

CM monpublic at gmail.com
Tue Jun 20 13:49:55 CDT 2006


Before getting into the subject of this message, I just wanted to
congratulate and thank Bryan for the great presentation he gave at Google
yesterday.  I have never seen so many AV snafus here before, and he gave his
presentation without slides and without complaint.  It was great, and it got
me interested in this project.

So, that said, I would like to begin my foray into this world with a small
contribution:

Mercurial does not currently compile cleanly under Mac OS X 10.2 (Jaguar).
It turns out that the following patch fixed it:

diff -r 092039246d73 mercurial/bdiff.c
--- a/mercurial/bdiff.c    Sat Jun 10 17:39:29 2006 +0200
+++ b/mercurial/bdiff.c    Tue Jun 20 00:48:10 2006 -0700
@@ -39,6 +39,8 @@ static uint32_t htonl(uint32_t x)
 #include <sys/types.h>
 #include <arpa/inet.h>
 #endif
+// Fix for OS X 10.2
+#include <stdint.h>

 struct line {
     int h, len, n, e;
diff -r 092039246d73 mercurial/mpatch.c
--- a/mercurial/mpatch.c    Sat Jun 10 17:39:29 2006 +0200
+++ b/mercurial/mpatch.c    Tue Jun 20 00:48:10 2006 -0700
@@ -41,6 +41,8 @@ static uint32_t ntohl(uint32_t x)
 #include <sys/types.h>
 #include <arpa/inet.h>
 #endif
+// Fix for OS X 10.2
+#include <stdint.h>

 static char mpatch_doc[] = "Efficient binary patching.";
 static PyObject *mpatch_Error;



Of course, I am quite certain that this is the wrong way to go about things,
since it includes no test for the platform and therefore will break others.
What is the best way to test for Darwin, and a particular version of Darwin
at that?  I have installed all of the GCC updates, which also makes my
situation a bit unique.  If anyone has any pointers to helpful documentation
on this sort of platform detection, I will gladly accept them and do the
research myself to keep the noise down on this channel.

Thanks,
- C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.selenic.com/pipermail/mercurial/attachments/20060620/085bb131/attachment-0001.html


More information about the Mercurial mailing list