Delete some more unneeded Make code

This commit is contained in:
Justine Tunney 2022-04-06 01:22:30 -07:00
parent 58d74ede4c
commit ce9bdbb0bf
13 changed files with 46 additions and 1300 deletions

48
third_party/make/ar.c vendored
View file

@ -115,14 +115,6 @@ ar_member_date (const char *name)
/* Set the archive-member NAME's modtime to now. */
#ifdef VMS
int
ar_touch (const char *name)
{
O (error, NILF, _("touch archive member is not available on VMS"));
return -1;
}
#else
int
ar_touch (const char *name)
{
@ -167,7 +159,7 @@ ar_touch (const char *name)
return val;
}
#endif /* !VMS */
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
@ -182,9 +174,6 @@ struct ar_glob_state
{
const char *arname;
const char *pattern;
#ifdef VMS
char *suffix;
#endif
size_t size;
struct nameseq *chain;
unsigned int n;
@ -205,12 +194,6 @@ ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
{
/* We have a match. Add it to the chain. */
struct nameseq *new = xcalloc (state->size);
#ifdef VMS
if (state->suffix)
new->name = strcache_add(
concat(5, state->arname, "(", mem, state->suffix, ")"));
else
#endif
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
new->next = state->chain;
state->chain = new;
@ -263,9 +246,7 @@ ar_glob (const char *arname, const char *member_pattern, size_t size)
struct nameseq *n;
const char **names;
unsigned int i;
#ifdef VMS
char *vms_member_pattern;
#endif
if (! ar_glob_pattern_p (member_pattern, 1))
return 0;
@ -273,36 +254,11 @@ ar_glob (const char *arname, const char *member_pattern, size_t size)
ar_glob_match will accumulate them in STATE.chain. */
state.arname = arname;
state.pattern = member_pattern;
#ifdef VMS
{
/* In a copy of the pattern, find the suffix, save it and remove it from
the pattern */
char *lastdot;
vms_member_pattern = xstrdup(member_pattern);
lastdot = strrchr(vms_member_pattern, '.');
state.suffix = lastdot;
if (lastdot)
{
state.suffix = xstrdup(lastdot);
*lastdot = 0;
}
state.pattern = vms_member_pattern;
}
#endif
state.size = size;
state.chain = 0;
state.n = 0;
ar_scan (arname, ar_glob_match, &state);
#ifdef VMS
/* Deallocate any duplicated string */
free(vms_member_pattern);
if (state.suffix)
{
free(state.suffix);
}
#endif
if (state.chain == 0)
return 0;