From: "lode leroy" <lode_leroy@hotmail.com>
To: git@vger.kernel.org
Subject: (nearly trivial) patch to compile git on cygwin
Date: Fri, 22 Apr 2005 10:09:08 +0200 [thread overview]
Message-ID: <BAY22-F35C035C6AE6B9A45CDEF61FF2D0@phx.gbl> (raw)
I wonder if anyone is interested in using git on windows / cygwin.
It almost compiles out of the box... just this one little thinggy
that's glibc-specific (struct dirent . d_type)
~/pkg $ diff -bruw git-0.6 git-0.6-cyg | grep -v ^Only
diff -bruw git-0.6/Makefile git-0.6-cyg/Makefile
--- git-0.6/Makefile 2005-04-21 19:58:47.000000000 +0200
+++ git-0.6-cyg/Makefile 2005-04-22 09:28:54.259531200 +0200
@@ -30,7 +30,7 @@
$(LIB_FILE): $(LIB_OBJS)
$(AR) rcs $@ $(LIB_OBJS)
-LIBS= $(LIB_FILE) -lssl -lz
+LIBS= $(LIB_FILE) -lssl -lz -lcrypto
init-db: init-db.o
diff -bruw git-0.6/show-files.c git-0.6-cyg/show-files.c
--- git-0.6/show-files.c 2005-04-21 19:58:47.000000000 +0200
+++ git-0.6-cyg/show-files.c 2005-04-22 10:03:04.227240000 +0200
@@ -61,26 +61,33 @@
continue;
len = strlen(de->d_name);
memcpy(fullname + baselen, de->d_name, len+1);
+#ifdef DT_DIR
switch (de->d_type) {
+#endif
struct stat st;
+#ifdef DT_DIR
default:
continue;
case DT_UNKNOWN:
+#endif
if (lstat(fullname, &st))
continue;
if (S_ISREG(st.st_mode))
break;
if (!S_ISDIR(st.st_mode))
continue;
+#ifdef DT_DIR
/* fallthrough */
case DT_DIR:
+#endif
memcpy(fullname + baselen + len, "/", 2);
read_directory(fullname, fullname, baselen +
len + 1);
continue;
+#ifdef DT_DIR
case DT_REG:
break;
}
+#endif
add_name(fullname, baselen + len);
}
closedir(dir);
~/pkg $
_________________________________________________________________
next reply other threads:[~2005-04-22 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-22 8:09 lode leroy [this message]
2005-04-22 8:53 ` [RFC] Is there a need for binary bit in cache/tree entries to properly support Cygwin builds of GIT? Jon Seymour
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=BAY22-F35C035C6AE6B9A45CDEF61FF2D0@phx.gbl \
--to=lode_leroy@hotmail.com \
--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