* patches
@ 2005-09-05 23:24 Patrick Mauritz
2005-09-08 2:06 ` patches Junio C Hamano
2005-09-09 22:25 ` patches Jason Riedy
0 siblings, 2 replies; 6+ messages in thread
From: Patrick Mauritz @ 2005-09-05 23:24 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
Hi,
attached are two patches:
the first fixes some build issues on solaris10/x86 with sunpro (and some
that also happen with gcc), while the second adds a simple way to add
additional search and link paths for curl library and headers.
patrick mauritz
(not on the list, please Cc:)
[-- Attachment #2: patch-20050817-1-build --]
[-- Type: text/x-patch, Size: 1229 bytes --]
diff -ur git-core-0.99.4.orig/convert-cache.c git-core-0.99.4/convert-cache.c
--- git-core-0.99.5.orig/convert-cache.c Wed Aug 17 09:55:00 2005
+++ git-core-0.99.5/convert-cache.c Wed Aug 17 09:58:48 2005
@@ -1,4 +1,5 @@
#define _XOPEN_SOURCE /* glibc2 needs this */
+#define __EXTENSIONS__ /* solaris needs this */
#include <time.h>
#include <ctype.h>
#include "cache.h"
diff -ur git-core-0.99.4.orig/ident.c git-core-0.99.4/ident.c
--- git-core-0.99.5.orig/ident.c Wed Aug 17 09:55:00 2005
+++ git-core-0.99.5/ident.c Wed Aug 17 09:57:54 2005
@@ -36,12 +36,13 @@
memcpy(real_email, pw->pw_name, len);
real_email[len++] = '@';
gethostname(real_email + len, sizeof(real_email) - len);
+#ifndef __sun
if (!strchr(real_email+len, '.')) {
len = strlen(real_email);
real_email[len++] = '.';
getdomainname(real_email+len, sizeof(real_email)-len);
}
-
+#endif
/* And set the default date */
datestamp(real_date, sizeof(real_date));
return 0;
--- git-core-0.99.5/Makefile~ Thu Aug 25 03:54:24 2005
+++ git-core-0.99.5/Makefile Tue Sep 6 01:18:32 2005
@@ -146,7 +146,11 @@
endif
endif
endif
+ifeq ($(shell uname -s),SunOS)
+ LIBS += -lsocket
+endif
+
DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
[-- Attachment #3: patch-20050906-2-curl --]
[-- Type: text/plain, Size: 609 bytes --]
--- git-core-0.99.5/Makefile~ Tue Sep 6 01:13:29 2005
+++ git-core-0.99.5/Makefile Tue Sep 6 01:15:40 2005
@@ -34,7 +34,14 @@
GIT_VERSION = 0.99.5
-CFLAGS = -g -O2 -Wall
+ifndef COPTS
+COPTS = -g -O2 -Wall
+endif
+CFLAGS = $(COPTS)
+ifdef CURLDIR
+CFLAGS+=-I$(CURLDIR)/include
+endif
+
ALL_CFLAGS = $(CFLAGS) $(DEFINES)
prefix = $(HOME)
@@ -172,7 +179,11 @@
git-ssh-pull: rsh.o pull.o
git-ssh-push: rsh.o
+ifdef CURLDIR
+git-http-pull: LIBS += -lcurl -L$(CURLDIR)/lib -R$(CURLDIR)/lib
+else
git-http-pull: LIBS += -lcurl
+endif
git-rev-list: LIBS += $(OPENSSL_LIBSSL)
init-db.o: init-db.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patches
2005-09-05 23:24 patches Patrick Mauritz
@ 2005-09-08 2:06 ` Junio C Hamano
2005-09-08 10:11 ` patches Patrick Mauritz
2005-09-09 22:25 ` patches Jason Riedy
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-09-08 2:06 UTC (permalink / raw)
To: Patrick Mauritz; +Cc: git
Patrick Mauritz <oxygene@studentenbude.ath.cx> writes:
I would have appreciated if you said "Solaris portability patch"
or somesuch on the subject line.
> diff -ur git-core-0.99.4.orig/convert-cache.c git-core-0.99.4/convert-cache.c
> --- git-core-0.99.5.orig/convert-cache.c Wed Aug 17 09:55:00 2005
> +++ git-core-0.99.5/convert-cache.c Wed Aug 17 09:58:48 2005
> @@ -1,4 +1,5 @@
> #define _XOPEN_SOURCE /* glibc2 needs this */
> +#define __EXTENSIONS__ /* solaris needs this */
> #include <time.h>
> #include <ctype.h>
> #include "cache.h"
I'll take this; thanks.
> diff -ur git-core-0.99.4.orig/ident.c git-core-0.99.4/ident.c
> --- git-core-0.99.5.orig/ident.c Wed Aug 17 09:55:00 2005
> +++ git-core-0.99.5/ident.c Wed Aug 17 09:57:54 2005
> @@ -36,12 +36,13 @@
> memcpy(real_email, pw->pw_name, len);
> real_email[len++] = '@';
> gethostname(real_email + len, sizeof(real_email) - len);
> +#ifndef __sun
> if (!strchr(real_email+len, '.')) {
> len = strlen(real_email);
> real_email[len++] = '.';
> getdomainname(real_email+len, sizeof(real_email)-len);
> }
> -
> +#endif
> /* And set the default date */
> datestamp(real_date, sizeof(real_date));
> return 0;
I'll do this slightly differently, because I do not want to have
"ifdef __platform_name" in the code when possible.
> --- git-core-0.99.5/Makefile~ Thu Aug 25 03:54:24 2005
> +++ git-core-0.99.5/Makefile Tue Sep 6 01:18:32 2005
> @@ -146,7 +146,11 @@
> endif
> endif
> endif
> +ifeq ($(shell uname -s),SunOS)
> + LIBS += -lsocket
> +endif
>
> +
> DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
I'll do this in the way similar to how I did -liconv for Darwin.
> +ifdef CURLDIR
> +git-http-pull: LIBS += -lcurl -L$(CURLDIR)/lib -R$(CURLDIR)/lib
> +else
> git-http-pull: LIBS += -lcurl
> +endif
Curious. Doesn't the order of -l and -L/-R matter these days?
I am sympathetic to the reason why you need this, but if we go
this route we should also do openssl as well. I'd drop this
part for now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patches
2005-09-08 2:06 ` patches Junio C Hamano
@ 2005-09-08 10:11 ` Patrick Mauritz
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Mauritz @ 2005-09-08 10:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Thu, 2005-09-08 at 04:06, Junio C Hamano wrote:
> I would have appreciated if you said "Solaris portability patch"
> or somesuch on the subject line.
sorry, of course you're right..
the #ifndef __sun was done because getdomainname() doesn't exist on
solaris. (just for clarification)
> Curious. Doesn't the order of -l and -L/-R matter these days?
hmm.. no idea why it worked for me, but a test case fails now: better
make that -L -R -l
> I am sympathetic to the reason why you need this, but if we go
> this route we should also do openssl as well. I'd drop this
> part for now.
because on solaris there are lots of places where external libraries
could be found (/usr/local/lib, /opt/csw/lib, whereever people who
package themselves put them). ld.so.conf doesn't exist (same as on
*bsd), so using -L and -R is the standard way of linking external
libraries.
thanks,
patrick mauritz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patches
2005-09-05 23:24 patches Patrick Mauritz
2005-09-08 2:06 ` patches Junio C Hamano
@ 2005-09-09 22:25 ` Jason Riedy
2005-09-12 5:39 ` [PATCH] getdomainname should be usable on SunOS with -lnsl Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Jason Riedy @ 2005-09-09 22:25 UTC (permalink / raw)
To: Patrick Mauritz; +Cc: git
And Patrick Mauritz writes:
-
- --- git-core-0.99.5.orig/convert-cache.c Wed Aug 17 09:55:00 2005
- +++ git-core-0.99.5/convert-cache.c Wed Aug 17 09:58:48 2005
- @@ -1,4 +1,5 @@
- #define _XOPEN_SOURCE /* glibc2 needs this */
- +#define __EXTENSIONS__ /* solaris needs this */
To be honest, the right place to handle both these
#defines is the Makefile. AIX needs its own set of
-Ds to turn on various standards. ugh. I'm sure
HP-UX needs even more magic, IRIX needs (is?) a dead
chicken, etc.
- +#ifndef __sun
[...]
- getdomainname(real_email+len, sizeof(real_email)-len);
[...]
- +#endif
getdomainname isn't declared, but it is in libnsl
(on Solaris 8, Sparc) and works just fine. Sun
documents sysinfo (2) as its replacement, but that
call is different on different platforms. I'd be
shocked if getdomainname disappeared from libnsl,
especially since the C++ include files declare it.
Whoops.
- +ifeq ($(shell uname -s),SunOS)
- + LIBS += -lsocket
- +endif
Traditionally, it's -lsocket -lnsl to cover all the
bases. Old SunOS4 -> SunOS5 porting annoyance. That
also lets getdomainname work.
The Makefile is generally insufficient for any platform
other than Linux with system-supplied support libraries.
Fixing that will take a good deal of work and probably
will involve putting a bunch of variable-defining makefile
fragments somewhere and including the "right" one. With
the right variable definitions, a user can over-ride any
of them from the make command...
In the meantime, my personal coping method is just to copy
the Makefile to Makefile.platform, edit it, and use make -f
Makefile.platform. I could be really cool and just use a
different git branch per platform, but I'm lazy.
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] getdomainname should be usable on SunOS with -lnsl
2005-09-09 22:25 ` patches Jason Riedy
@ 2005-09-12 5:39 ` Junio C Hamano
0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2005-09-12 5:39 UTC (permalink / raw)
To: Patrick Mauritz; +Cc: Jason Riedy, git
Jason Riedy suggests that we should be able to use getdomainname
if we properly specify which libraries to link.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
I've tried this on an ancient Solaris machine I happened to
have access at work and it seems to link OK. Patrick, could
you try this and see if it works OK for you?
Makefile | 6 +++++-
ident.c | 2 --
2 files changed, 5 insertions(+), 3 deletions(-)
2b6a27b6157c6ee472d654dbcaf380aec00d6444
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,7 @@ ifeq ($(shell uname -s),Darwin)
endif
ifeq ($(shell uname -s),SunOS)
NEEDS_SOCKET = YesPlease
- PLATFORM_DEFINES += -DNO_GETDOMAINNAME=1
+ NEEDS_NSL = YesPlease
endif
ifndef SHELL_PATH
@@ -195,6 +195,10 @@ ifdef NEEDS_SOCKET
LIBS += -lsocket
SIMPLE_LIB += -lsocket
endif
+ifdef NEEDS_NSL
+ LIBS += -lnsl
+ SIMPLE_LIB += -lnsl
+endif
DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
diff --git a/ident.c b/ident.c
--- a/ident.c
+++ b/ident.c
@@ -36,13 +36,11 @@ int setup_ident(void)
memcpy(real_email, pw->pw_name, len);
real_email[len++] = '@';
gethostname(real_email + len, sizeof(real_email) - len);
-#ifndef NO_GETDOMAINNAME
if (!strchr(real_email+len, '.')) {
len = strlen(real_email);
real_email[len++] = '.';
getdomainname(real_email+len, sizeof(real_email)-len);
}
-#endif
/* And set the default date */
datestamp(real_date, sizeof(real_date));
return 0;
^ permalink raw reply [flat|nested] 6+ messages in thread
* patches
@ 2007-11-26 2:27 J. Bruce Fields
0 siblings, 0 replies; 6+ messages in thread
From: J. Bruce Fields @ 2007-11-26 2:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
There's some more user-manual stuff in the git repository at
ssh://linux-nfs.org/~bfields/exports/git.git maint
J. Bruce Fields (4):
user-manual: define "branch" and "working tree" at start
user-manual: failed push to public repository
user-manual: clarify language about "modifying" old commits
user-manual: recovering from corruption
Documentation/user-manual.txt | 225 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 201 insertions(+), 24 deletions(-)
--b.
commit 1cdade2c4cb27f648a98d326ef3db523b6afafa7
Author: J. Bruce Fields <bfields@citi.umich.edu>
Date: Sat Mar 3 22:53:37 2007 -0500
user-manual: recovering from corruption
Some instructions on dealing with corruption of the object database.
Most of this text is from an example by Linus, identified by Nicolas
Pitre <nico@cam.org> with a little further editing by me.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
commit 7cb192eab0251911e2ca77d4ecceb621dd2d34f5
Author: J. Bruce Fields <bfields@citi.umich.edu>
Date: Sun Nov 25 19:01:57 2007 -0500
user-manual: clarify language about "modifying" old commits
It's important to remember that git doesn't really allowing "editing" or
"modifying" commits, only replacing them by new commits. Redo some of
the language to make this clearer.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
commit 81eb417ad423ef7e8d088d517f89d3bda92f9c06
Author: J. Bruce Fields <bfields@citi.umich.edu>
Date: Sun Nov 25 17:54:19 2007 -0500
user-manual: failed push to public repository
More details on the case of a failed push to a public (non-shared)
repository.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
commit 0c4a33b54f3dbb9fa8cd2f5cf0e2a6363849d899
Author: J. Bruce Fields <bfields@citi.umich.edu>
Date: Sun Nov 25 13:53:37 2007 -0500
user-manual: define "branch" and "working tree" at start
Some explanation here might help.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-26 2:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-05 23:24 patches Patrick Mauritz
2005-09-08 2:06 ` patches Junio C Hamano
2005-09-08 10:11 ` patches Patrick Mauritz
2005-09-09 22:25 ` patches Jason Riedy
2005-09-12 5:39 ` [PATCH] getdomainname should be usable on SunOS with -lnsl Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2007-11-26 2:27 patches J. Bruce Fields
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).