Merge branch 'ds/index' into next

* ds/index:
  Replace index() with strchr().
  Solaris 9 also wants our own unsetenv/setenv.
  Retire git-log.sh (take #3)
maint
Junio C Hamano 2006-04-11 11:52:36 -07:00
commit b5b1442ac3
3 changed files with 14 additions and 9 deletions

View File

@ -170,7 +170,7 @@ PROGRAMS = \
BUILT_INS = git-log$X BUILT_INS = git-log$X


# what 'all' will build and 'install' will install, in gitexecdir # what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(BUILT_INS) $(SCRIPTS) ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)


# Backward compatibility -- to be removed after 1.0 # Backward compatibility -- to be removed after 1.0
PROGRAMS += git-ssh-pull$X git-ssh-push$X PROGRAMS += git-ssh-pull$X git-ssh-push$X
@ -248,6 +248,10 @@ ifeq ($(uname_S),SunOS)
NO_UNSETENV = YesPlease NO_UNSETENV = YesPlease
NO_SETENV = YesPlease NO_SETENV = YesPlease
endif endif
ifeq ($(uname_R),5.9)
NO_UNSETENV = YesPlease
NO_SETENV = YesPlease
endif
INSTALL = ginstall INSTALL = ginstall
TAR = gtar TAR = gtar
ALL_CFLAGS += -D__EXTENSIONS__ ALL_CFLAGS += -D__EXTENSIONS__
@ -450,7 +454,7 @@ LIB_OBJS += $(COMPAT_OBJS)
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
### Build rules ### Build rules


all: $(ALL_PROGRAMS) git$X gitk all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk


all: all:
$(MAKE) -C templates $(MAKE) -C templates
@ -617,6 +621,7 @@ install: all
$(MAKE) -C templates install $(MAKE) -C templates install
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)' $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)' $(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(bindir_SQ)/$p' && ln '$(DESTDIR_SQ)$(bindir_SQ)/git$X' '$(DESTDIR_SQ)$(bindir_SQ)/$p' ;)


install-doc: install-doc:
$(MAKE) -C Documentation install $(MAKE) -C Documentation install

View File

@ -597,7 +597,7 @@ static void process_alternates_response(void *callback_data)
newalt->packs = NULL; newalt->packs = NULL;
path = strstr(target, "//"); path = strstr(target, "//");
if (path) { if (path) {
path = index(path+2, '/'); path = strchr(path+2, '/');
if (path) if (path)
newalt->path_len = strlen(path); newalt->path_len = strlen(path);
} }
@ -678,7 +678,7 @@ static void
xml_start_tag(void *userData, const char *name, const char **atts) xml_start_tag(void *userData, const char *name, const char **atts)
{ {
struct xml_ctx *ctx = (struct xml_ctx *)userData; struct xml_ctx *ctx = (struct xml_ctx *)userData;
const char *c = index(name, ':'); const char *c = strchr(name, ':');
int new_len; int new_len;


if (c == NULL) if (c == NULL)
@ -707,7 +707,7 @@ static void
xml_end_tag(void *userData, const char *name) xml_end_tag(void *userData, const char *name)
{ {
struct xml_ctx *ctx = (struct xml_ctx *)userData; struct xml_ctx *ctx = (struct xml_ctx *)userData;
const char *c = index(name, ':'); const char *c = strchr(name, ':');
char *ep; char *ep;


ctx->userFunc(ctx, 1); ctx->userFunc(ctx, 1);
@ -1261,7 +1261,7 @@ int main(int argc, char **argv)
alt->next = NULL; alt->next = NULL;
path = strstr(url, "//"); path = strstr(url, "//");
if (path) { if (path) {
path = index(path+2, '/'); path = strchr(path+2, '/');
if (path) if (path)
alt->path_len = strlen(path); alt->path_len = strlen(path);
} }

View File

@ -1211,7 +1211,7 @@ static void
xml_start_tag(void *userData, const char *name, const char **atts) xml_start_tag(void *userData, const char *name, const char **atts)
{ {
struct xml_ctx *ctx = (struct xml_ctx *)userData; struct xml_ctx *ctx = (struct xml_ctx *)userData;
const char *c = index(name, ':'); const char *c = strchr(name, ':');
int new_len; int new_len;


if (c == NULL) if (c == NULL)
@ -1240,7 +1240,7 @@ static void
xml_end_tag(void *userData, const char *name) xml_end_tag(void *userData, const char *name)
{ {
struct xml_ctx *ctx = (struct xml_ctx *)userData; struct xml_ctx *ctx = (struct xml_ctx *)userData;
const char *c = index(name, ':'); const char *c = strchr(name, ':');
char *ep; char *ep;


ctx->userFunc(ctx, 1); ctx->userFunc(ctx, 1);
@ -2350,7 +2350,7 @@ int main(int argc, char **argv)
char *path = strstr(arg, "//"); char *path = strstr(arg, "//");
remote->url = arg; remote->url = arg;
if (path) { if (path) {
path = index(path+2, '/'); path = strchr(path+2, '/');
if (path) if (path)
remote->path_len = strlen(path); remote->path_len = strlen(path);
} }