131 (target->string_mb[0] != (int) slash_char) ) {
132 /* BID_1214655 */
133 /* azv */
134 vpath_exists(target);
135 // return vpath_exists(target);
136 }
137 } else {
138 /* Save all the information we need about the file */
139 target->stat.stat_errno = 0;
140 target->stat.is_file = true;
141 target->stat.mode = buf.st_mode & 0777;
142 target->stat.size = buf.st_size;
143 target->stat.is_dir =
144 BOOLEAN((buf.st_mode & S_IFMT) == S_IFDIR);
145 if (target->stat.is_dir) {
146 target->stat.time = file_is_dir;
147 } else {
148 /* target->stat.time = buf.st_mtime; */
149 /* BID_1129806 */
150 /* vis@nbsp.nsk.su */
151 #if defined(linux)
152 timestruc_t ttime = { buf.st_mtime, 0 };
153 target->stat.time = MAX(ttime, file_min_time);
154 #else
155 target->stat.time = MAX(buf.st_mtim, file_min_time);
156 #endif
157 }
158 }
159 if ((target->colon_splits > 0) &&
160 (get_prop(target->prop, time_prop) == NULL)) {
161 append_prop(target, time_prop)->body.time.time =
162 target->stat.time;
163 }
164 return target->stat.time;
165 }
166
167 /*
168 * set_target_stat( target, buf)
169 *
170 * Called by exists() to set some stat fields in the Name structure
171 * to those read by the stat_vroot() call (from disk).
172 *
173 * Parameters:
174 * target The target whose stat field is set
175 * buf stat values (on disk) of the file
176 * represented by target.
177 */
178 void
179 set_target_stat(register Name target, struct stat buf)
180 {
181 target->stat.stat_errno = 0;
182 target->stat.is_file = true;
183 target->stat.mode = buf.st_mode & 0777;
184 target->stat.size = buf.st_size;
185 target->stat.is_dir =
186 BOOLEAN((buf.st_mode & S_IFMT) == S_IFDIR);
187 if (target->stat.is_dir) {
188 target->stat.time = file_is_dir;
189 } else {
190 /* target->stat.time = buf.st_mtime; */
191 /* BID_1129806 */
192 /* vis@nbsp.nsk.su */
193 #if defined(linux)
194 timestruc_t ttime = { buf.st_mtime, 0 };
195 target->stat.time = ttime;
196 #else
197 target->stat.time = MAX(buf.st_mtim, file_min_time);
198 #endif
199 }
200 }
201
202
203 /*
204 * vpath_exists(target)
205 *
206 * Called if exists() discovers that there is a VPATH defined.
207 * This function stats the VPATH translation of the target.
208 *
209 * Return value:
210 * The time the target was created
211 *
212 * Parameters:
213 * target The target to check
214 *
215 * Global variables used:
216 * vpath_name The Name "VPATH", used to get macro value
217 */
218 static timestruc_t&
|
131 (target->string_mb[0] != (int) slash_char) ) {
132 /* BID_1214655 */
133 /* azv */
134 vpath_exists(target);
135 // return vpath_exists(target);
136 }
137 } else {
138 /* Save all the information we need about the file */
139 target->stat.stat_errno = 0;
140 target->stat.is_file = true;
141 target->stat.mode = buf.st_mode & 0777;
142 target->stat.size = buf.st_size;
143 target->stat.is_dir =
144 BOOLEAN((buf.st_mode & S_IFMT) == S_IFDIR);
145 if (target->stat.is_dir) {
146 target->stat.time = file_is_dir;
147 } else {
148 /* target->stat.time = buf.st_mtime; */
149 /* BID_1129806 */
150 /* vis@nbsp.nsk.su */
151 target->stat.time = MAX(buf.st_mtim, file_min_time);
152 }
153 }
154 if ((target->colon_splits > 0) &&
155 (get_prop(target->prop, time_prop) == NULL)) {
156 append_prop(target, time_prop)->body.time.time =
157 target->stat.time;
158 }
159 return target->stat.time;
160 }
161
162 /*
163 * set_target_stat( target, buf)
164 *
165 * Called by exists() to set some stat fields in the Name structure
166 * to those read by the stat_vroot() call (from disk).
167 *
168 * Parameters:
169 * target The target whose stat field is set
170 * buf stat values (on disk) of the file
171 * represented by target.
172 */
173 void
174 set_target_stat(register Name target, struct stat buf)
175 {
176 target->stat.stat_errno = 0;
177 target->stat.is_file = true;
178 target->stat.mode = buf.st_mode & 0777;
179 target->stat.size = buf.st_size;
180 target->stat.is_dir =
181 BOOLEAN((buf.st_mode & S_IFMT) == S_IFDIR);
182 if (target->stat.is_dir) {
183 target->stat.time = file_is_dir;
184 } else {
185 /* target->stat.time = buf.st_mtime; */
186 /* BID_1129806 */
187 /* vis@nbsp.nsk.su */
188 target->stat.time = MAX(buf.st_mtim, file_min_time);
189 }
190 }
191
192
193 /*
194 * vpath_exists(target)
195 *
196 * Called if exists() discovers that there is a VPATH defined.
197 * This function stats the VPATH translation of the target.
198 *
199 * Return value:
200 * The time the target was created
201 *
202 * Parameters:
203 * target The target to check
204 *
205 * Global variables used:
206 * vpath_name The Name "VPATH", used to get macro value
207 */
208 static timestruc_t&
|