git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
To: GIT <git@vger.kernel.org>
Subject: git on solaris
Date: Mon, 25 Apr 2005 21:07:04 +0200	[thread overview]
Message-ID: <20050425190704.GB14076@cip.informatik.uni-erlangen.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Hello,
this patch makes git compile on Solaris, but it isn't considered for
upstream at the moment.

	Thomas

[-- Attachment #2: git.patch.solaris --]
[-- Type: text/plain, Size: 2388 bytes --]

Index: Makefile
===================================================================
--- 648b1464afe31bf85116ca64734a8b8990f4e0da/Makefile  (mode:100644 sha1:022af9b8c0a8ded65892c84bd419e46af6d2ae92)
+++ uncommitted/Makefile  (mode:100644)
@@ -21,14 +21,14 @@
 all: $(PROG)
 
 install: $(PROG)
-	install $(PROG) $(HOME)/bin/
+	ginstall $(PROG) $(HOME)/bin/
 
 LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o
 LIB_FILE=libgit.a
 LIB_H=cache.h object.h
 
 LIBS = $(LIB_FILE)
-LIBS += -lz
+LIBS += -lz -L /opt/csw/lib -lsocket -lnsl
 
 ifdef MOZILLA_SHA1
   SHA1_HEADER="mozilla-sha1/sha1.h"
@@ -43,7 +43,7 @@
 endif
 endif
 
-CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
+CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)' -I/opt/csw/include -D_XOPEN_SOURCE_EXTENDED=1
 
 $(LIB_FILE): $(LIB_OBJS)
 	$(AR) rcs $@ $(LIB_OBJS)
Index: rsh.c
===================================================================
--- 648b1464afe31bf85116ca64734a8b8990f4e0da/rsh.c  (mode:100644 sha1:4d6a90bf6c1b290975fb2ac22f25979be56cb476)
+++ uncommitted/rsh.c  (mode:100644)
@@ -1,6 +1,7 @@
 #include "rsh.h"
 
 #include <string.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 
 #include "cache.h"
@@ -47,7 +48,7 @@
 		}
 	}
 	strcpy(posn, " -");
-	if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) {
+	if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) {
 		return error("Couldn't create socket");
 	}
 	if (!fork()) {
Index: show-files.c
===================================================================
--- 648b1464afe31bf85116ca64734a8b8990f4e0da/show-files.c  (mode:100644 sha1:b53ab1053e1acf7e2a1e9c97a4d87b76e8ee238e)
+++ uncommitted/show-files.c  (mode:100644)
@@ -51,6 +51,7 @@
 
 	if (dir) {
 		struct dirent *de;
+		struct stat st;
 		char fullname[MAXPATHLEN + 1];
 		memcpy(fullname, base, baselen);
 
@@ -62,8 +63,8 @@
 			len = strlen(de->d_name);
 			memcpy(fullname + baselen, de->d_name, len+1);
 
+#if __LINUX__
 			switch (de->d_type) {
-			struct stat st;
 			default:
 				continue;
 			case DT_UNKNOWN:
@@ -81,6 +82,17 @@
 			case DT_REG:
 				break;
 			}
+#else
+			if (lstat(fullname, &st))
+				continue;
+			if (S_ISDIR(st.st_mode)) {
+				memcpy(fullname + baselen + len, "/", 2);
+				read_directory(fullname, fullname, baselen + len + 1);
+				continue;
+			}
+			if (!S_ISREG(st.st_mode))
+				break;
+#endif
 			add_name(fullname, baselen + len);
 		}
 		closedir(dir);

                 reply	other threads:[~2005-04-25 19:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050425190704.GB14076@cip.informatik.uni-erlangen.de \
    --to=sithglan@stud.uni-erlangen.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).