Skip to content

Commit b5b1442

Browse files
author
Junio C Hamano
committed
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)
2 parents 55275b3 + ef9e58c commit b5b1442

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ PROGRAMS = \
170170
BUILT_INS = git-log$X
171171

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

175175
# Backward compatibility -- to be removed after 1.0
176176
PROGRAMS += git-ssh-pull$X git-ssh-push$X
@@ -248,6 +248,10 @@ ifeq ($(uname_S),SunOS)
248248
NO_UNSETENV = YesPlease
249249
NO_SETENV = YesPlease
250250
endif
251+
ifeq ($(uname_R),5.9)
252+
NO_UNSETENV = YesPlease
253+
NO_SETENV = YesPlease
254+
endif
251255
INSTALL = ginstall
252256
TAR = gtar
253257
ALL_CFLAGS += -D__EXTENSIONS__
@@ -450,7 +454,7 @@ LIB_OBJS += $(COMPAT_OBJS)
450454
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
451455
### Build rules
452456

453-
all: $(ALL_PROGRAMS) git$X gitk
457+
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk
454458

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

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

http-fetch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ static void process_alternates_response(void *callback_data)
597597
newalt->packs = NULL;
598598
path = strstr(target, "//");
599599
if (path) {
600-
path = index(path+2, '/');
600+
path = strchr(path+2, '/');
601601
if (path)
602602
newalt->path_len = strlen(path);
603603
}
@@ -678,7 +678,7 @@ static void
678678
xml_start_tag(void *userData, const char *name, const char **atts)
679679
{
680680
struct xml_ctx *ctx = (struct xml_ctx *)userData;
681-
const char *c = index(name, ':');
681+
const char *c = strchr(name, ':');
682682
int new_len;
683683

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

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

http-push.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ static void
12111211
xml_start_tag(void *userData, const char *name, const char **atts)
12121212
{
12131213
struct xml_ctx *ctx = (struct xml_ctx *)userData;
1214-
const char *c = index(name, ':');
1214+
const char *c = strchr(name, ':');
12151215
int new_len;
12161216

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

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

0 commit comments

Comments
 (0)