[packages] admin: muninlite: Corrected patch for bridge / dash in interface name...
[openwrt/svn-archive/archive.git] / net / git / patches / 001-convert_builtin.patch
1 Index: git-1.7.4.4/builtin/daemon.c
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ git-1.7.4.4/builtin/daemon.c 2011-04-08 15:33:59.605465617 +0200
5 @@ -0,0 +1 @@
6 +#include "../daemon.c"
7 Index: git-1.7.4.4/builtin/fast-import.c
8 ===================================================================
9 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
10 +++ git-1.7.4.4/builtin/fast-import.c 2011-04-08 15:33:59.605465617 +0200
11 @@ -0,0 +1 @@
12 +#include "../fast-import.c"
13 Index: git-1.7.4.4/builtin/http-backend.c
14 ===================================================================
15 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
16 +++ git-1.7.4.4/builtin/http-backend.c 2011-04-08 15:33:59.605465617 +0200
17 @@ -0,0 +1 @@
18 +#include "../http-backend.c"
19 Index: git-1.7.4.4/builtin/imap-send.c
20 ===================================================================
21 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
22 +++ git-1.7.4.4/builtin/imap-send.c 2011-04-08 15:33:59.605465617 +0200
23 @@ -0,0 +1 @@
24 +#include "../imap-send.c"
25 Index: git-1.7.4.4/builtin/shell.c
26 ===================================================================
27 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
28 +++ git-1.7.4.4/builtin/shell.c 2011-04-08 15:33:59.605465617 +0200
29 @@ -0,0 +1 @@
30 +#include "../shell.c"
31 Index: git-1.7.4.4/builtin/upload-pack.c
32 ===================================================================
33 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
34 +++ git-1.7.4.4/builtin/upload-pack.c 2011-04-08 15:33:59.605465617 +0200
35 @@ -0,0 +1 @@
36 +#include "../upload-pack.c"
37 Index: git-1.7.4.4/builtin.h
38 ===================================================================
39 --- git-1.7.4.4/builtin.h 2011-04-03 10:22:36.000000000 +0200
40 +++ git-1.7.4.4/builtin.h 2011-04-08 15:33:59.605465617 +0200
41 @@ -142,5 +142,11 @@
42 extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
43 extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
44 extern int cmd_replace(int argc, const char **argv, const char *prefix);
45 +extern int cmd_shell(int argc, char **argv, const char *prefix);
46 +extern int cmd_upload_pack(int argc, char **argv, const char *prefix);
47 +extern int cmd_http_backend(int argc, char **argv, const char *prefix);
48 +extern int cmd_daemon(int argc, char **argv, const char *prefix);
49 +extern int cmd_imap_send(int argc, char **argv, const char *prefix);
50 +extern int cmd_fast_import(int argc, const char **argv, const char *prefix);
51
52 #endif
53 Index: git-1.7.4.4/daemon.c
54 ===================================================================
55 --- git-1.7.4.4/daemon.c 2011-04-03 10:22:36.000000000 +0200
56 +++ git-1.7.4.4/daemon.c 2011-04-08 15:33:59.605465617 +0200
57 @@ -1043,7 +1043,7 @@
58 return service_loop(&socklist);
59 }
60
61 -int main(int argc, char **argv)
62 +int cmd_daemon(int argc, char **argv, const char *prefix)
63 {
64 int listen_port = 0;
65 struct string_list listen_addr = STRING_LIST_INIT_NODUP;
66 Index: git-1.7.4.4/fast-import.c
67 ===================================================================
68 --- git-1.7.4.4/fast-import.c 2011-04-03 10:22:36.000000000 +0200
69 +++ git-1.7.4.4/fast-import.c 2011-04-08 15:33:59.609465154 +0200
70 @@ -3083,7 +3083,7 @@
71 read_marks();
72 }
73
74 -int main(int argc, const char **argv)
75 +int cmd_fast_import(int argc, const char **argv, const char *prefix)
76 {
77 unsigned int i;
78
79 Index: git-1.7.4.4/git.c
80 ===================================================================
81 --- git-1.7.4.4/git.c 2011-04-03 10:22:36.000000000 +0200
82 +++ git-1.7.4.4/git.c 2011-04-08 15:33:59.609465154 +0200
83 @@ -251,11 +251,11 @@
84
85 struct cmd_struct {
86 const char *cmd;
87 - int (*fn)(int, const char **, const char *);
88 + int (*fn)(int, char **, const char *);
89 int option;
90 };
91
92 -static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
93 +static int run_builtin(struct cmd_struct *p, int argc, char **argv)
94 {
95 int status, help;
96 struct stat st;
97 @@ -308,7 +308,7 @@
98 return 0;
99 }
100
101 -static void handle_internal_command(int argc, const char **argv)
102 +static void handle_internal_command(int argc, char **argv)
103 {
104 const char *cmd = argv[0];
105 static struct cmd_struct commands[] = {
106 @@ -422,6 +422,12 @@
107 { "verify-pack", cmd_verify_pack },
108 { "show-ref", cmd_show_ref, RUN_SETUP },
109 { "pack-refs", cmd_pack_refs, RUN_SETUP },
110 + { "shell", cmd_shell },
111 + { "upload-pack", cmd_upload_pack },
112 + { "http-backend", cmd_http_backend },
113 + { "daemon", cmd_daemon },
114 + { "imap-send", cmd_imap_send },
115 + { "fast-import", cmd_fast_import },
116 };
117 int i;
118 static const char ext[] = STRIP_EXTENSION;
119 Index: git-1.7.4.4/http-backend.c
120 ===================================================================
121 --- git-1.7.4.4/http-backend.c 2011-04-03 10:22:36.000000000 +0200
122 +++ git-1.7.4.4/http-backend.c 2011-04-08 15:33:59.609465154 +0200
123 @@ -540,7 +540,7 @@
124 {"POST", "/git-receive-pack$", service_rpc}
125 };
126
127 -int main(int argc, char **argv)
128 +int cmd_http_backend(int argc, char **argv, const char *prefix)
129 {
130 char *method = getenv("REQUEST_METHOD");
131 char *dir;
132 Index: git-1.7.4.4/imap-send.c
133 ===================================================================
134 --- git-1.7.4.4/imap-send.c 2011-04-03 10:22:36.000000000 +0200
135 +++ git-1.7.4.4/imap-send.c 2011-04-08 15:33:59.609465154 +0200
136 @@ -1528,7 +1528,7 @@
137 return 0;
138 }
139
140 -int main(int argc, char **argv)
141 +int cmd_imap_send(int argc, char **argv, const char *prefix)
142 {
143 struct msg_data all_msgs, msg;
144 struct store *ctx = NULL;
145 Index: git-1.7.4.4/Makefile
146 ===================================================================
147 --- git-1.7.4.4/Makefile 2011-04-03 10:22:36.000000000 +0200
148 +++ git-1.7.4.4/Makefile 2011-04-08 15:38:21.489032460 +0200
149 @@ -406,13 +406,7 @@
150 # ... and all the rest that could be moved out of bindir to gitexecdir
151 PROGRAMS += $(EXTRA_PROGRAMS)
152
153 -PROGRAM_OBJS += daemon.o
154 -PROGRAM_OBJS += fast-import.o
155 -PROGRAM_OBJS += imap-send.o
156 -PROGRAM_OBJS += shell.o
157 PROGRAM_OBJS += show-index.o
158 -PROGRAM_OBJS += upload-pack.o
159 -PROGRAM_OBJS += http-backend.o
160
161 PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
162
163 @@ -769,6 +763,12 @@
164 BUILTIN_OBJS += builtin/verify-pack.o
165 BUILTIN_OBJS += builtin/verify-tag.o
166 BUILTIN_OBJS += builtin/write-tree.o
167 +BUILTIN_OBJS += builtin/shell.o
168 +BUILTIN_OBJS += builtin/upload-pack.o
169 +BUILTIN_OBJS += builtin/http-backend.o
170 +BUILTIN_OBJS += builtin/daemon.o
171 +BUILTIN_OBJS += builtin/imap-send.o
172 +BUILTIN_OBJS += builtin/fast-import.o
173
174 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
175 EXTLIBS =
176 @@ -1293,7 +1293,7 @@
177 EXTLIBS += -lz
178
179 ifndef NO_OPENSSL
180 - OPENSSL_LIBSSL = -lssl
181 + EXTLIBS += -lssl
182 ifdef OPENSSLDIR
183 BASIC_CFLAGS += -I$(OPENSSLDIR)/include
184 OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
185 @@ -2003,10 +2003,6 @@
186 git-%$X: %.o $(GITLIBS)
187 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
188
189 -git-imap-send$X: imap-send.o $(GITLIBS)
190 - $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
191 - $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
192 -
193 git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
194 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
195 $(LIBS) $(CURL_LIBCURL)
196 @@ -2204,23 +2200,22 @@
197
198 bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
199 execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
200 + ln -s ../../bin/git "$$execdir/git" && \
201 { test "$$bindir/" = "$$execdir/" || \
202 - for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
203 + for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
204 $(RM) "$$execdir/$$p" && \
205 test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
206 - ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
207 + ln -s git "$$execdir/$$p" 2>/dev/null || \
208 cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
209 done; \
210 } && \
211 for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
212 $(RM) "$$bindir/$$p" && \
213 - ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
214 ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
215 cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
216 done && \
217 for p in $(BUILT_INS); do \
218 $(RM) "$$execdir/$$p" && \
219 - ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
220 ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
221 cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
222 done && \
223 Index: git-1.7.4.4/shell.c
224 ===================================================================
225 --- git-1.7.4.4/shell.c 2011-04-03 10:22:36.000000000 +0200
226 +++ git-1.7.4.4/shell.c 2011-04-08 15:33:59.613464996 +0200
227 @@ -129,7 +129,7 @@
228 { NULL },
229 };
230
231 -int main(int argc, char **argv)
232 +int cmd_shell(int argc, char **argv, const char *prefix)
233 {
234 char *prog;
235 const char **user_argv;
236 Index: git-1.7.4.4/upload-pack.c
237 ===================================================================
238 --- git-1.7.4.4/upload-pack.c 2011-04-03 10:22:36.000000000 +0200
239 +++ git-1.7.4.4/upload-pack.c 2011-04-08 15:33:59.613464996 +0200
240 @@ -676,7 +676,7 @@
241 }
242 }
243
244 -int main(int argc, char **argv)
245 +int cmd_upload_pack(int argc, char **argv, const char *prefix)
246 {
247 char *dir;
248 int i;