/[apache]/trunk/dist/2.2/patches/02_all_gentoo_mod_dir_incremental.patch
Gentoo

Contents of /trunk/dist/2.2/patches/02_all_gentoo_mod_dir_incremental.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 128 - (show annotations) (download)
Thu May 24 18:45:00 2007 UTC (7 years, 2 months ago) by phreak
File size: 2685 byte(s)
Reordering the basic patches.
1 diff -ur httpd-2.0.55.orig/modules/mappers/mod_dir.c httpd-2.0.55/modules/mappers/mod_dir.c
2 --- httpd-2.0.55.orig/modules/mappers/mod_dir.c 2005-02-04 12:21:18.000000000 -0800
3 +++ httpd-2.0.55/modules/mappers/mod_dir.c 2006-03-31 17:56:16.000000000 -0800
4 @@ -39,6 +39,7 @@
5
6 typedef struct dir_config_struct {
7 apr_array_header_t *index_names;
8 + apr_array_header_t *index_names_incr;
9 slash_cfg do_slash;
10 } dir_config_rec;
11
12 @@ -55,6 +56,17 @@
13 return NULL;
14 }
15
16 +static const char *add_index_incr(cmd_parms *cmd, void *dummy, const char *arg)
17 +{
18 + dir_config_rec *d = dummy;
19 +
20 + if (!d->index_names_incr) {
21 + d->index_names_incr = apr_array_make(cmd->pool, 2, sizeof(char *));
22 + }
23 + *(const char **)apr_array_push(d->index_names_incr) = arg;
24 + return NULL;
25 +}
26 +
27 static const char *configure_slash(cmd_parms *cmd, void *d_, int arg)
28 {
29 dir_config_rec *d = d_;
30 @@ -67,6 +79,8 @@
31 {
32 AP_INIT_ITERATE("DirectoryIndex", add_index, NULL, DIR_CMD_PERMS,
33 "a list of file names"),
34 + AP_INIT_ITERATE("AddDirectoryIndex", add_index_incr, NULL, DIR_CMD_PERMS,
35 + "a list of file names"),
36 AP_INIT_FLAG("DirectorySlash", configure_slash, NULL, DIR_CMD_PERMS,
37 "On or Off"),
38 {NULL}
39 @@ -77,6 +91,7 @@
40 dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec));
41
42 new->index_names = NULL;
43 + new->index_names_incr = NULL;
44 new->do_slash = SLASH_UNSET;
45 return (void *) new;
46 }
47 @@ -87,7 +102,26 @@
48 dir_config_rec *base = (dir_config_rec *)basev;
49 dir_config_rec *add = (dir_config_rec *)addv;
50
51 - new->index_names = add->index_names ? add->index_names : base->index_names;
52 +
53 + if (add->index_names) {
54 + new->index_names = add->index_names;
55 + } else {
56 + new->index_names = base->index_names;
57 + if (base->index_names_incr) {
58 + if (!new->index_names) {
59 + new->index_names = apr_array_make(p, 2, sizeof(char *));
60 + }
61 + apr_array_cat(new->index_names, base->index_names_incr);
62 + }
63 + }
64 +
65 + if (add->index_names_incr) {
66 + if (!new->index_names) {
67 + new->index_names = apr_array_make(p, 2, sizeof(char *));
68 + }
69 + apr_array_cat(new->index_names, add->index_names_incr);
70 + }
71 +
72 new->do_slash =
73 (add->do_slash == SLASH_UNSET) ? base->do_slash : add->do_slash;
74 return new;
75 @@ -155,6 +189,14 @@
76 return DECLINED;
77 }
78
79 + if (d->index_names_incr) {
80 + if (!d->index_names) {
81 + d->index_names = d->index_names_incr;
82 + } else {
83 + apr_array_cat(d->index_names, d->index_names_incr);
84 + }
85 + }
86 +
87 if (d->index_names) {
88 names_ptr = (char **)d->index_names->elts;
89 num_names = d->index_names->nelts;

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20