git/list[1] front-page[2] threads[3] people[4] search[5] about
 

new platform & S_IFGITLINK problem

From
AHAlan Hourihane <alanh@fairlite.co.uk>
Date
May 1, 2010, 23:29 UTC
Message-ID
<1272756555.13488.1314.camel@jetpack.demon.co.uk>
Hello,

Just joined as I'm compiling git on a new platform and wondered if someone can help solve a problem with the definition of S_IFGITLINK.

On my platform I have the following definitions....

#define __S_IFSOCK 0010000 /* Socket. */ #define __S_IFCHR 0020000 /* Character device. */ #define __S_IFDIR 0040000 /* Directory. */ #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0120000 /* FIFO. */ #define __S_IFMEM 0140000 /* memory region or process */ #define __S_IFLNK 0160000 /* Symbolic link. */

Yet, S_IFGITLINK in the git sources is defined as 0160000, so this clashes with my platform.

There is a comment about the definition of S_IFGITLINK in cache.h that it shouldn't be used like this and should use internal values.

So I'm wondering if this can be fixed to remove this assumption ?

Additionally, attached is a patch that I currently need to apply in order to compile git successfully on the FreeMiNT platform (which is m68k based).

Comments appreciated.
Thanks,
Alan.

--- git-compat-util.h 2008-12-22 18:35:58.000000000 +0000 +++ git-compat-util.h 2008-12-22 18:39:21.000000000 +0000

@@ -123,7 +123,9 @@
 #ifdef _MSC_VER
 #include "compat/msvc.h"
 #endif
-
+#ifdef __MINT__
+#include "compat/mint.h"
+#endif
 #ifndef NO_LIBGEN_H
 #include <libgen.h>
 #else
--- /dev/null	2008-12-07 20:01:52.000000000 +0000
+++ compat/mint.h	2008-12-23 11:52:10.000000000 +0000
@@ -0,0 +1,2 @@
+#define SA_RESTART 0
+#define ss_family sa_family
--- Makefile	2009-01-29 12:12:01.000000000 +0000
+++ Makefile	2009-01-29 12:13:39.000000000 +0000
@@ -1618,7 +1613,7 @@
 
 git-imap-send$X: imap-send.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
+		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 
 http.o http-walker.o http-push.o: http.h
 
@@ -1626,10 +1621,10 @@
 
 git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(CURL_LIBCURL)
+		$(LIBS) $(CURL_LIBCURL) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
+		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 
 $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
 	$(QUIET_LNCP)$(RM) $@ && \
@@ -1639,7 +1634,7 @@
 
 $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
+		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 
 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
 $(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
Next: Junio C Hamano
Message 1 of 17 in “new platform & S_IFGITLINK problem”
  1. Alan HourihaneMay 1, 2010
  2. Junio C HamanoMay 2, 2010
  3. Alan HourihaneMay 2, 2010
  4. Linus TorvaldsMay 4, 2010
  5. Linus TorvaldsMay 4, 2010
  6. Andreas EricssonMay 4, 2010
  7. Linus TorvaldsMay 4, 2010
  8. Junio C HamanoMay 4, 2010
  9. Alan HourihaneMay 4, 2010
  10. Alan HourihaneJul 22, 2010
  11. Junio C HamanoJul 25, 2010
  12. Alan HourihaneJul 25, 2010
  13. Ævar Arnfjörð BjarmasonAug 2, 2010
  14. Alan HourihaneAug 2, 2010
  15. Ævar Arnfjörð BjarmasonAug 2, 2010
  16. Jonathan NiederMay 5, 2010
  17. Alan HourihaneMay 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.