* git on solaris
@ 2005-04-25 19:07 Thomas Glanzmann
0 siblings, 0 replies; only message in thread
From: Thomas Glanzmann @ 2005-04-25 19:07 UTC (permalink / raw)
To: GIT
[-- 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-25 19:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-25 19:07 git on solaris Thomas Glanzmann
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).