1 | | ? misc/fnmatch.c-DEBUG |
2 | | ? misc/glob.c-DEBUG |
3 | | cvs server: Diffing misc |
4 | | Index: misc/fnmatch.c |
5 | | =================================================================== |
6 | | RCS file: /cvs/devel/rpm/misc/fnmatch.c,v |
7 | | retrieving revision 1.7.2.2 |
8 | | diff -u -b -B -w -p -r1.7.2.2 fnmatch.c |
9 | | --- misc/fnmatch.c 28 Jan 2005 06:36:29 -0000 1.7.2.2 |
10 | | +++ misc/fnmatch.c 3 Feb 2005 23:58:31 -0000 |
11 | | @@ -607,7 +607,7 @@ internal_fnmatch (const char *pattern, c |
12 | | |
13 | | |
14 | | int |
15 | | -fnmatch (const char *pattern, const char *string, int flags) |
16 | | +xxfnmatch (const char *pattern, const char *string, int flags) |
17 | | { |
18 | | return internal_fnmatch (pattern, string, flags & FNM_PERIOD, flags); |
19 | | } |
20 | | Index: misc/fnmatch.h |
21 | | =================================================================== |
22 | | RCS file: /cvs/devel/rpm/misc/fnmatch.h,v |
23 | | retrieving revision 1.3.8.2 |
24 | | diff -u -b -B -w -p -r1.3.8.2 fnmatch.h |
25 | | --- misc/fnmatch.h 28 Jan 2005 06:36:29 -0000 1.3.8.2 |
26 | | +++ misc/fnmatch.h 3 Feb 2005 23:58:32 -0000 |
27 | | @@ -75,7 +75,7 @@ extern "C" { |
28 | | |
29 | | /* Match NAME against the filename pattern PATTERN, |
30 | | returning zero if it matches, FNM_NOMATCH if not. */ |
31 | | -extern int fnmatch __P ((__const char *__pattern, __const char *__name, |
32 | | +extern int xxfnmatch __P ((__const char *__pattern, __const char *__name, |
33 | | int __flags)); |
34 | | |
35 | | #ifdef __cplusplus |
36 | | Index: misc/glob.c |
37 | | =================================================================== |
38 | | RCS file: /cvs/devel/rpm/misc/glob.c,v |
39 | | retrieving revision 1.15.2.2 |
40 | | diff -u -b -B -w -p -r1.15.2.2 glob.c |
41 | | --- misc/glob.c 28 Jan 2005 06:36:29 -0000 1.15.2.2 |
42 | | +++ misc/glob.c 3 Feb 2005 23:58:33 -0000 |
43 | | @@ -48,7 +48,7 @@ |
44 | | |
45 | | # include <assert.h> |
46 | | |
47 | | -#define __alloca alloca |
48 | | +#define __xxalloca alloca |
49 | | #define __stat stat |
50 | | #define NAMLEN(_d) NLENGTH(_d) |
51 | | |
52 | | @@ -130,7 +130,7 @@ static int __glob_pattern_p (const char |
53 | | If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. |
54 | | Otherwise, `glob' returns zero. */ |
55 | | int |
56 | | -glob (const char *pattern, int flags, |
57 | | +xxglob (const char *pattern, int flags, |
58 | | int (*errfunc) __P ((const char *, int)), glob_t *pglob) |
59 | | { |
60 | | const char *filename; |
61 | | @@ -165,7 +165,7 @@ glob (const char *pattern, int flags, |
62 | | if (onealt == NULL) |
63 | | { |
64 | | if (!(flags & GLOB_APPEND)) |
65 | | - globfree (pglob); |
66 | | + xxglobfree (pglob); |
67 | | return GLOB_NOSPACE; |
68 | | } |
69 | | #endif |
70 | | @@ -187,7 +187,7 @@ glob (const char *pattern, int flags, |
71 | | #ifndef __GNUC__ |
72 | | free (onealt); |
73 | | #endif |
74 | | - return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); |
75 | | + return xxglob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); |
76 | | } |
77 | | |
78 | | /* Now find the end of the whole brace expression. */ |
79 | | @@ -201,7 +201,7 @@ glob (const char *pattern, int flags, |
80 | | #ifndef __GNUC__ |
81 | | free (onealt); |
82 | | #endif |
83 | | - return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); |
84 | | + return xxglob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); |
85 | | } |
86 | | } |
87 | | /* Please note that we now can be sure the brace expression |
88 | | @@ -236,7 +236,7 @@ glob (const char *pattern, int flags, |
89 | | memcpy (&alt_start[next - p], rest, rest_len); |
90 | | #endif |
91 | | |
92 | | - result = glob (onealt, |
93 | | + result = xxglob (onealt, |
94 | | ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) |
95 | | | GLOB_APPEND), errfunc, pglob); |
96 | | |
97 | | @@ -247,7 +247,7 @@ glob (const char *pattern, int flags, |
98 | | free (onealt); |
99 | | #endif |
100 | | if (!(flags & GLOB_APPEND)) |
101 | | - globfree (pglob); |
102 | | + xxglobfree (pglob); |
103 | | return result; |
104 | | } |
105 | | |
106 | | @@ -325,7 +325,7 @@ glob (const char *pattern, int flags, |
107 | | char *drive_spec; |
108 | | |
109 | | ++dirlen; |
110 | | - drive_spec = (char *) __alloca (dirlen + 1); |
111 | | + drive_spec = (char *) __xxalloca (dirlen + 1); |
112 | | #ifdef HAVE_MEMPCPY |
113 | | *((char *) mempcpy (drive_spec, pattern, dirlen)) = '\0'; |
114 | | #else |
115 | | @@ -341,7 +341,7 @@ glob (const char *pattern, int flags, |
116 | | from "d:/", since "d:" and "d:/" are not the same.*/ |
117 | | } |
118 | | #endif |
119 | | - newp = (char *) __alloca (dirlen + 1); |
120 | | + newp = (char *) __xxalloca (dirlen + 1); |
121 | | #ifdef HAVE_MEMPCPY |
122 | | *((char *) mempcpy (newp, pattern, dirlen)) = '\0'; |
123 | | #else |
124 | | @@ -360,7 +360,7 @@ glob (const char *pattern, int flags, |
125 | | && dirlen > 1) |
126 | | /* "pattern/". Expand "pattern", appending slashes. */ |
127 | | { |
128 | | - int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); |
129 | | + int val = xxglob (dirname, flags | GLOB_MARK, errfunc, pglob); |
130 | | if (val == 0) |
131 | | pglob->gl_flags = ((pglob->gl_flags & ~GLOB_MARK) |
132 | | | (flags & GLOB_MARK)); |
133 | | @@ -402,7 +402,7 @@ glob (const char *pattern, int flags, |
134 | | /* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try |
135 | | a moderate value. */ |
136 | | buflen = 20; |
137 | | - name = (char *) __alloca (buflen); |
138 | | + name = (char *) __xxalloca (buflen); |
139 | | |
140 | | success = getlogin_r (name, buflen) >= 0; |
141 | | # else |
142 | | @@ -421,7 +421,7 @@ glob (const char *pattern, int flags, |
143 | | /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. |
144 | | Try a moderate value. */ |
145 | | pwbuflen = 1024; |
146 | | - pwtmpbuf = (char *) __alloca (pwbuflen); |
147 | | + pwtmpbuf = (char *) __xxalloca (pwbuflen); |
148 | | |
149 | | while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) |
150 | | != 0) |
151 | | @@ -432,7 +432,7 @@ glob (const char *pattern, int flags, |
152 | | break; |
153 | | } |
154 | | pwbuflen *= 2; |
155 | | - pwtmpbuf = (char *) __alloca (pwbuflen); |
156 | | + pwtmpbuf = (char *) __xxalloca (pwbuflen); |
157 | | __set_errno (save); |
158 | | } |
159 | | # else |
160 | | @@ -458,7 +458,7 @@ glob (const char *pattern, int flags, |
161 | | { |
162 | | char *newp; |
163 | | size_t home_len = strlen (home_dir); |
164 | | - newp = (char *) __alloca (home_len + dirlen); |
165 | | + newp = (char *) __xxalloca (home_len + dirlen); |
166 | | # ifdef HAVE_MEMPCPY |
167 | | mempcpy (mempcpy (newp, home_dir, home_len), |
168 | | &dirname[1], dirlen); |
169 | | @@ -481,7 +481,7 @@ glob (const char *pattern, int flags, |
170 | | else |
171 | | { |
172 | | char *newp; |
173 | | - newp = (char *) __alloca (end_name - dirname); |
174 | | + newp = (char *) __xxalloca (end_name - dirname); |
175 | | # ifdef HAVE_MEMPCPY |
176 | | *((char *) mempcpy (newp, dirname + 1, end_name - dirname)) |
177 | | = '\0'; |
178 | | @@ -505,7 +505,7 @@ glob (const char *pattern, int flags, |
179 | | /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a |
180 | | moderate value. */ |
181 | | buflen = 1024; |
182 | | - pwtmpbuf = (char *) __alloca (buflen); |
183 | | + pwtmpbuf = (char *) __xxalloca (buflen); |
184 | | |
185 | | while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0) |
186 | | { |
187 | | @@ -515,7 +515,7 @@ glob (const char *pattern, int flags, |
188 | | break; |
189 | | } |
190 | | buflen *= 2; |
191 | | - pwtmpbuf = __alloca (buflen); |
192 | | + pwtmpbuf = __xxalloca (buflen); |
193 | | __set_errno (save); |
194 | | } |
195 | | # else |
196 | | @@ -532,7 +532,7 @@ glob (const char *pattern, int flags, |
197 | | char *newp; |
198 | | size_t home_len = strlen (home_dir); |
199 | | size_t rest_len = end_name == NULL ? 0 : strlen (end_name); |
200 | | - newp = (char *) __alloca (home_len + rest_len + 1); |
201 | | + newp = (char *) __xxalloca (home_len + rest_len + 1); |
202 | | # ifdef HAVE_MEMPCPY |
203 | | *((char *) mempcpy (mempcpy (newp, home_dir, home_len), |
204 | | end_name, rest_len)) = '\0'; |
205 | | @@ -625,7 +625,7 @@ glob (const char *pattern, int flags, |
206 | | dirs.gl_lstat = pglob->gl_lstat; |
207 | | } |
208 | | |
209 | | - status = glob (dirname, |
210 | | + status = xxglob (dirname, |
211 | | ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE |
212 | | | GLOB_ALTDIRFUNC)) |
213 | | | GLOB_NOSORT | GLOB_ONLYDIR), |
214 | | @@ -647,8 +647,8 @@ glob (const char *pattern, int flags, |
215 | | |
216 | | if (interrupt_state) |
217 | | { |
218 | | - globfree (&dirs); |
219 | | - globfree (&files); |
220 | | + xxglobfree (&dirs); |
221 | | + xxglobfree (&files); |
222 | | return GLOB_ABORTED; |
223 | | } |
224 | | } |
225 | | @@ -665,8 +665,8 @@ glob (const char *pattern, int flags, |
226 | | |
227 | | if (status != 0) |
228 | | { |
229 | | - globfree (&dirs); |
230 | | - globfree (pglob); |
231 | | + xxglobfree (&dirs); |
232 | | + xxglobfree (pglob); |
233 | | return status; |
234 | | } |
235 | | |
236 | | @@ -675,8 +675,8 @@ glob (const char *pattern, int flags, |
237 | | &pglob->gl_pathv[old_pathc], |
238 | | pglob->gl_pathc - old_pathc)) |
239 | | { |
240 | | - globfree (&dirs); |
241 | | - globfree (pglob); |
242 | | + xxglobfree (&dirs); |
243 | | + xxglobfree (pglob); |
244 | | return GLOB_NOSPACE; |
245 | | } |
246 | | } |
247 | | @@ -706,7 +706,7 @@ glob (const char *pattern, int flags, |
248 | | sizeof (char *)); |
249 | | if (pglob->gl_pathv == NULL) |
250 | | { |
251 | | - globfree (&dirs); |
252 | | + xxglobfree (&dirs); |
253 | | return GLOB_NOSPACE; |
254 | | } |
255 | | |
256 | | @@ -730,8 +730,8 @@ glob (const char *pattern, int flags, |
257 | | + filename_len); |
258 | | if (pglob->gl_pathv[pglob->gl_pathc] == NULL) |
259 | | { |
260 | | - globfree (&dirs); |
261 | | - globfree (pglob); |
262 | | + xxglobfree (&dirs); |
263 | | + xxglobfree (pglob); |
264 | | return GLOB_NOSPACE; |
265 | | } |
266 | | |
267 | | @@ -763,7 +763,7 @@ glob (const char *pattern, int flags, |
268 | | return GLOB_NOMATCH; |
269 | | } |
270 | | |
271 | | - globfree (&dirs); |
272 | | + xxglobfree (&dirs); |
273 | | } |
274 | | else |
275 | | { |
276 | | @@ -783,7 +783,7 @@ glob (const char *pattern, int flags, |
277 | | &pglob->gl_pathv[ignore], |
278 | | pglob->gl_pathc - ignore)) |
279 | | { |
280 | | - globfree (pglob); |
281 | | + xxglobfree (pglob); |
282 | | return GLOB_NOSPACE; |
283 | | } |
284 | | } |
285 | | @@ -804,7 +804,7 @@ glob (const char *pattern, int flags, |
286 | | char *new = xrealloc (pglob->gl_pathv[i], len); |
287 | | if (new == NULL) |
288 | | { |
289 | | - globfree (pglob); |
290 | | + xxglobfree (pglob); |
291 | | return GLOB_NOSPACE; |
292 | | } |
293 | | strcpy (&new[len - 2], "/"); |
294 | | @@ -831,7 +831,7 @@ glob (const char *pattern, int flags, |
295 | | |
296 | | /* Free storage allocated in PGLOB by a previous `glob' call. */ |
297 | | void |
298 | | -globfree (glob_t *pglob) |
299 | | +xxglobfree (glob_t *pglob) |
300 | | { |
301 | | if (pglob->gl_pathv != NULL) |
302 | | { |
303 | | @@ -1001,7 +1001,7 @@ glob_in_dir (const char *pattern, const |
304 | | struct stat st; |
305 | | size_t patlen = strlen (pattern); |
306 | | size_t dirlen = strlen (directory); |
307 | | - char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1); |
308 | | + char *fullname = (char *) __xxalloca (dirlen + 1 + patlen + 1); |
309 | | |
310 | | # ifdef HAVE_MEMPCPY |
311 | | mempcpy (mempcpy (mempcpy (fullname, directory, dirlen), |
312 | | @@ -1028,7 +1028,7 @@ glob_in_dir (const char *pattern, const |
313 | | { |
314 | | /* This is a special case for matching directories like in |
315 | | "*a/". */ |
316 | | - names = (struct globlink *) __alloca (sizeof (struct globlink)); |
317 | | + names = (struct globlink *) __xxalloca (sizeof (struct globlink)); |
318 | | names->name = (char *) xmalloc (1); |
319 | | if (names->name == NULL) |
320 | | goto memory_error; |
321 | | @@ -1084,10 +1084,10 @@ glob_in_dir (const char *pattern, const |
322 | | |
323 | | name = d->d_name; |
324 | | |
325 | | - if (fnmatch (pattern, name, fnm_flags) == 0) |
326 | | + if (xxfnmatch (pattern, name, fnm_flags) == 0) |
327 | | { |
328 | | struct globlink *new = (struct globlink *) |
329 | | - __alloca (sizeof (struct globlink)); |
330 | | + __xxalloca (sizeof (struct globlink)); |
331 | | len = NAMLEN (d); |
332 | | new->name = (char *) xmalloc (len + 1); |
333 | | if (new->name == NULL) |
334 | | @@ -1112,7 +1112,7 @@ glob_in_dir (const char *pattern, const |
335 | | { |
336 | | size_t len = strlen (pattern); |
337 | | nfound = 1; |
338 | | - names = (struct globlink *) __alloca (sizeof (struct globlink)); |
339 | | + names = (struct globlink *) __xxalloca (sizeof (struct globlink)); |
340 | | names->next = NULL; |
341 | | names->name = (char *) xmalloc (len + 1); |
342 | | if (names->name == NULL) |
343 | | Index: misc/glob.h |
344 | | =================================================================== |
345 | | RCS file: /cvs/devel/rpm/misc/glob.h,v |
346 | | retrieving revision 1.6.16.3 |
347 | | diff -u -b -B -w -p -r1.6.16.3 glob.h |
348 | | --- misc/glob.h 28 Jan 2005 06:36:29 -0000 1.6.16.3 |
349 | | +++ misc/glob.h 3 Feb 2005 23:58:33 -0000 |
350 | | @@ -152,12 +152,12 @@ typedef struct |
351 | | If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. |
352 | | Otherwise, `glob' returns zero. */ |
353 | | #if _FILE_OFFSET_BITS != 64 |
354 | | -extern int glob __P ((__const char *__pattern, int __flags, |
355 | | +extern int xxglob __P ((__const char *__pattern, int __flags, |
356 | | int (*__errfunc) (__const char *, int), |
357 | | glob_t *__pglob)); |
358 | | |
359 | | /* Free storage allocated in PGLOB by a previous `glob' call. */ |
360 | | -extern void globfree __P ((glob_t *__pglob)); |
361 | | +extern void xxglobfree __P ((glob_t *__pglob)); |
362 | | #else |
363 | | # if __GNUC__ >= 2 |
364 | | extern int glob __P ((__const char *__pattern, int __flags, |
365 | | cvs server: Diffing rpmio |
366 | | Index: rpmio/rpmrpc.c |
367 | | =================================================================== |
368 | | RCS file: /cvs/devel/rpm/rpmio/rpmrpc.c,v |
369 | | retrieving revision 2.44.2.4 |
370 | | diff -u -b -B -w -p -r2.44.2.4 rpmrpc.c |
371 | | --- rpmio/rpmrpc.c 28 Jan 2005 06:36:33 -0000 2.44.2.4 |
372 | | +++ rpmio/rpmrpc.c 3 Feb 2005 23:58:33 -0000 |
373 | | @@ -1466,14 +1466,14 @@ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p) |
374 | | return -2; |
375 | | /*@notreached@*/ break; |
376 | | } |
377 | | - return glob(pattern, flags, errfunc, pglob); |
378 | | + return xxglob(pattern, flags, errfunc, pglob); |
379 | | } |
380 | | |
381 | | void Globfree(glob_t *pglob) |
382 | | { |
383 | | if (_rpmio_debug) |
384 | | fprintf(stderr, "*** Globfree(%p)\n", pglob); |
385 | | - globfree(pglob); |
386 | | + xxglobfree(pglob); |
387 | | } |
388 | | |
389 | | DIR * Opendir(const char * path) |
390 | | Index: rpmio/stubs.c |
391 | | =================================================================== |
392 | | RCS file: /cvs/devel/rpm/rpmio/stubs.c,v |
393 | | retrieving revision 1.5.6.1 |
394 | | diff -u -b -B -w -p -r1.5.6.1 stubs.c |
395 | | --- rpmio/stubs.c 28 Jan 2005 06:36:33 -0000 1.5.6.1 |
396 | | +++ rpmio/stubs.c 3 Feb 2005 23:58:33 -0000 |
397 | | @@ -71,8 +71,6 @@ |
398 | | #endif |
399 | | |
400 | | #if defined(USE_GNU_GLOB) |
401 | | -#include "misc/fnmatch.h" |
402 | | #include "misc/fnmatch.c" |
403 | | -#include "misc/glob.h" |
404 | | #include "misc/glob.c" |
405 | | #endif |
406 | | cvs server: Diffing rpmio/sexp |
407 | | cvs server: Diffing rpmio/sexp/tests |