git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] make git compile on old version of engarde linux
@ 2006-08-07 20:26 Michael S. Tsirkin
  0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2006-08-07 20:26 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano

The following makes git build on my instance of Engarde Linux 1.x

The definition of S_IFLNK and S_ISLNK seems to be mising in the headers,
but a simple test showed that the correct value for it is still 0120000,
same as on more modern systems.

With this patch, git built with 
$make NO_CURL=1 NO_SYMLINK_HEAD=1 NO_PYTHON=1
seems to work with no issues so far (more than a week now).

---

Make git build on Engarde Linux 1.x (which is missing
the definition for S_IFLNK/S_ISLNK)

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>

--- git/cache.h.orig	Thu Jun 29 11:43:45 2006
+++ git/cache.h	Thu Jun 29 11:45:13 2006
@@ -6,6 +6,13 @@
 #include SHA1_HEADER
 #include <zlib.h>
 
+#ifndef S_IFLNK
+#define S_IFLNK        0120000
+#endif
+#ifndef S_ISLNK
+#define S_ISLNK(m)    (((m) & S_IFMT) == S_IFLNK)
+#endif
+
 #if ZLIB_VERNUM < 0x1200
 #define deflateBound(c,s)  ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
 #endif

-- 
MST

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

* Re: [PATCH] make git compile on old version of engarde linux
       [not found] <7vac6etz5n.fsf@assigned-by-dhcp.cox.net>
@ 2006-08-12 22:45 ` Michael S. Tsirkin
  2006-08-12 23:09   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2006-08-12 22:45 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Ramsay Jones, git

Quoting r. Junio C Hamano <junkio@cox.net>:
> > This looks familiar; did the build error out when compiling
> > convert-objects.c by any chance? I suspect you have the same problem
> > that I encountered.  My fix was posted in "[PATCH 6/10] Fix header breakage
> > with _XOPEN_SOURCE."
> >
> > I have included my earlier mail message inline below, in case you wish
> > to confirm the that it fixes things for you too.
> 
> Alternatively Ramsay's _XOPEN_SOURCE patch is part of "next", so
> if it fixes the problem for you that would confirm the patch is
> a good one to have.
> 

BTW, would it make sense fr this patch to be cherry-picked into 1.4.8?
I guess the reason that LNK macros are under GNU_SOURCE is the following
text from stat(2):
 
       The S_ISLNK and S_ISSOCK macros
       are not in POSIX.1-1996, but both will be in the next  POSIX  standard;
       the former is from SVID 4v2, the latter from SUSv2.

-- 
MST

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

* Re: [PATCH] make git compile on old version of engarde linux
  2006-08-12 22:45 ` [PATCH] make git compile on old version of engarde linux Michael S. Tsirkin
@ 2006-08-12 23:09   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2006-08-12 23:09 UTC (permalink / raw
  To: Michael S. Tsirkin; +Cc: git

"Michael S. Tsirkin" <mst@mellanox.co.il> writes:

>> Alternatively Ramsay's _XOPEN_SOURCE patch is part of "next", so
>> if it fixes the problem for you that would confirm the patch is
>> a good one to have.
>
> BTW, would it make sense fr this patch to be cherry-picked into 1.4.8?
> I guess the reason that LNK macros are under GNU_SOURCE is the following
> text from stat(2):
>  
>        The S_ISLNK and S_ISSOCK macros
>        are not in POSIX.1-1996, but both will be in the next  POSIX  standard;
>        the former is from SVID 4v2, the latter from SUSv2.

I originally scheduled it for immediately after 1.4.2 but I
would say why not.  It makes sense and does not seem to break
for people (otherwise I would have heard screams, hopefully).

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

end of thread, other threads:[~2006-08-12 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <7vac6etz5n.fsf@assigned-by-dhcp.cox.net>
2006-08-12 22:45 ` [PATCH] make git compile on old version of engarde linux Michael S. Tsirkin
2006-08-12 23:09   ` Junio C Hamano
2006-08-07 20:26 Michael S. Tsirkin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).