diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-11-18 13:44:45 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-11-18 13:44:45 +0000 |
commit | a1bd23b9a26e2c61a2520b9c77284c418380af57 (patch) | |
tree | b82ee399968febfd7ec7842d26ca0a4768444f72 /usr/src/cmd | |
parent | 20413c4609984695499fa634908cd2e67fd9e2cc (diff) | |
parent | 9fe633fd812f2df2354dc88fd3f7f50e94bd8eb3 (diff) | |
download | illumos-joyent-a1bd23b9a26e2c61a2520b9c77284c418380af57.tar.gz |
[illumos-gate merge]
commit 9fe633fd812f2df2354dc88fd3f7f50e94bd8eb3
11593 iscsi: cast between incompatible function types
commit ed1faac10502dadc7e3eb411d17af6845ecf5d7d
11580 dtrace: cast between incompatible function types
commit 2491fc01733d7e4f5776b0711db713078d7cd24a
11814 test-runner exit code should reflect test results
commit 11ed32a0b3b424ec966d0330d0efaf049baaf8d2
11968 APIC calibration should explicitly initialise the PIT
commit 48ed61a721b0db9229d5bad4d87f5b019867fbf1
11879 Intel ixgbe X553 Support
commit db830ba58275ad713ffb4ff71cce8c00af84527b
11801 i86xpv: cast between incompatible function types
commit ac2ff9f2e2eb82a33700967848664529b93c03b0
11729 msgsys: cast between incompatible function types
commit ae389aa988ce154c9f8d5d4dbe4a63c3744339f4
11949 make -C caches wrong directory contents
commit eddd1134c88ad4961e5deee57a4e9148b14da477
11940 loader: multiboot2_loadfile read error should include file name and newline
commit 50450c3dedc4cfa86ef99c6d9aee64f2a5ea0511
11939 libgen: this statement may fall through
Conflicts:
usr/src/uts/common/io/ixgbe/core/ixgbe_vf.h
usr/src/uts/common/io/ixgbe/core/ixgbe_vf.c
usr/src/uts/common/io/ixgbe/core/ixgbe_type.h
usr/src/test/util-tests/tests/Makefile
exception_lists/wscheck
Diffstat (limited to 'usr/src/cmd')
26 files changed, 329 insertions, 349 deletions
diff --git a/usr/src/cmd/make/Makefile b/usr/src/cmd/make/Makefile index 911fa13ea3..f8450c8b54 100644 --- a/usr/src/cmd/make/Makefile +++ b/usr/src/cmd/make/Makefile @@ -18,14 +18,13 @@ all := TARGET = all install := TARGET = install clean := TARGET = clean clobber := TARGET = clobber -lint := TARGET = lint _msg := TARGET = _msg .KEEP_STATE: bin: lib -all clean clobber lint install _msg: $(SUBDIRS) +all clean clobber install _msg: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/make/bin/Makefile b/usr/src/cmd/make/bin/Makefile index 51effa85b3..17a012bf8f 100644 --- a/usr/src/cmd/make/bin/Makefile +++ b/usr/src/cmd/make/bin/Makefile @@ -86,8 +86,6 @@ $(ROOTSHLIB)/make: FRC $(ROOTSHLIB)/make/%: %.file $(INS.rename) -lint: - clean: $(RM) $(OBJS) diff --git a/usr/src/cmd/make/bin/ar.cc b/usr/src/cmd/make/bin/ar.cc index 898f7aa45e..9a884714b1 100644 --- a/usr/src/cmd/make/bin/ar.cc +++ b/usr/src/cmd/make/bin/ar.cc @@ -113,13 +113,13 @@ typedef struct { /* 5.0 ar member format: vax family; 3b family */ typedef struct { /* Portable (6.0) ar format: vax family; 3b family */ char ar_name[16]; /* Space terminated */ /* left-adjusted fields; decimal ascii; blank filled */ - char ar_date[12]; + char ar_date[12]; char ar_uid[6]; char ar_gid[6]; char ar_mode[8]; /* octal ascii */ char ar_size[10]; /* special end-of-header string (AR_PORT_END_MAGIC) */ - char ar_fmag[2]; + char ar_fmag[2]; } Ar_port; enum ar_type { @@ -173,7 +173,7 @@ static long sgetl(char *); * target The member to find time for * * Global variables used: - * empty_name The Name "" + * empty_name The Name "" */ int read_member_header (Ar_port *header, FILE *fd, char* filename); @@ -230,7 +230,7 @@ read_archive(register Name target) } } if (target->stat.time == file_no_time) { - if (read_archive_dir(&ar, member->body.member.library, + if (read_archive_dir(&ar, member->body.member.library, &long_names_table) == failed){ fatal(gettext("Can't access archive `%s': %s"), @@ -287,7 +287,7 @@ open_archive(char *filename, register Ar *arp) if (IS_EQUALN(mag_port, AR_PORT_MAGIC, AR_PORT_MAGIC_LENGTH)) { arp->type = AR_PORT; /* - * Read in first member header to find out if there is + * Read in first member header to find out if there is * a symbol definition table. */ @@ -301,7 +301,7 @@ open_archive(char *filename, register Ar *arp) return succeeded; } /* - * The following values are the default if there is + * The following values are the default if there is * no symbol directory and long member names. */ arp->sym_size = arp->num_symbols = arp->sym_begin = 0L; @@ -309,7 +309,7 @@ open_archive(char *filename, register Ar *arp) /* * Do we have a symbol table? A symbol table is always - * the first member in an archive. In 4.1.x it has the + * the first member in an archive. In 4.1.x it has the * name __.SYMDEF, in SVr4, it has the name "/ " */ /* @@ -369,7 +369,7 @@ close_archive(register Ar *arp) * library Name of lib to enter members for. * Used to form "lib(member)" string. * long_names_table table that contains list of members - * with names > 15 characters long + * with names > 15 characters long * * Global variables used: */ @@ -485,10 +485,10 @@ read_archive_dir(register Ar *arp, Name library, char **long_names_table) &offset); q = *long_names_table + offset; } else { - q = arp->ar_port.ar_name; + q = arp->ar_port.ar_name; len = sizeof arp->ar_port.ar_name; } - + for (p = member_string; (len > 0) && (*q != (int) nul_char) && @@ -520,8 +520,8 @@ read_archive_dir(register Ar *arp, Name library, char **long_names_table) * [tolik] Fix for dmake bug 1234018. */ if(name->stat.time == file_no_time) { - name->stat.time.tv_sec = date; - name->stat.time.tv_nsec = LONG_MAX; + name->stat.time.tv_sec = date; + name->stat.time.tv_nsec = LONG_MAX; } if (sscanf(arp->ar_port.ar_size, "%ld", &ptr) != 1) { WCSTOMBS(mbs_buffer, name_string); @@ -532,7 +532,7 @@ read_archive_dir(register Ar *arp, Name library, char **long_names_table) ptr += (ptr & 1); if (fseek(arp->fd, ptr, 1) != 0) { goto read_error; - } + } } break; } @@ -563,18 +563,18 @@ read_error: */ int process_long_names_member(register Ar *arp, char **long_names_table, char *filename) -{ +{ Ar_port *ar_member_header; int table_size; if (fseek(arp->fd, arp->first_ar_mem, 0) != 0) { return failed; } - if ((ar_member_header = + if ((ar_member_header = (Ar_port *) alloca((int) sizeof(Ar_port))) == NULL){ perror(gettext("memory allocation failure")); return failed; - } + } int ret = read_member_header(ar_member_header, arp->fd, filename); if (ret == failed) { return failed; @@ -583,7 +583,7 @@ process_long_names_member(register Ar *arp, char **long_names_table, char *filen return succeeded; } /* Do we have special member containing long names? */ - if (IS_EQUALN(ar_member_header->ar_name, + if (IS_EQUALN(ar_member_header->ar_name, "// ", 16)){ if (sscanf(ar_member_header->ar_size, @@ -740,7 +740,7 @@ translate_entry(register Ar *arp, Name target, register Property member, char ** hp = *long_names_table + offset; } else { len = sizeof arp->ar_port.ar_name; - hp = arp->ar_port.ar_name; + hp = arp->ar_port.ar_name; } ap = member_string; while (*hp && @@ -813,14 +813,14 @@ sgetl(register char *buffer) * * Return value: * fails if read error or member - * header is not the right format + * header is not the right format * Parameters: * header There's one before each archive member * fd file descriptor for the archive file. * * Global variables used: */ -int +int read_member_header(Ar_port *header, FILE *fd, char* filename) { int num = fread((char *) header, sizeof (Ar_port), 1, fd); diff --git a/usr/src/cmd/make/bin/dosys.cc b/usr/src/cmd/make/bin/dosys.cc index ae7f4ef27c..dcab4df019 100644 --- a/usr/src/cmd/make/bin/dosys.cc +++ b/usr/src/cmd/make/bin/dosys.cc @@ -124,10 +124,10 @@ dosys(register Name command, register Boolean ignore_error, register Boolean cal target, wcb.get_string(), command->meta ? - doshell(q, ignore_error, + doshell(q, ignore_error, stdout_file, stderr_file, 0) : - doexec(q, ignore_error, - stdout_file, stderr_file, + doexec(q, ignore_error, + stdout_file, stderr_file, vroot_path, 0), NULL, -1 diff --git a/usr/src/cmd/make/bin/files.cc b/usr/src/cmd/make/bin/files.cc index 647b8741bd..dc2d86f32b 100644 --- a/usr/src/cmd/make/bin/files.cc +++ b/usr/src/cmd/make/bin/files.cc @@ -67,7 +67,7 @@ static timestruc_t& vpath_exists(register Name target); static Name enter_file_name(wchar_t *name_string, wchar_t *library); static Boolean star_match(register char *string, register char *pattern); static Boolean amatch(register wchar_t *string, register wchar_t *pattern); - + /* * exists(target) * @@ -382,7 +382,7 @@ vpath_loop: */ if ((dp->d_name[0] == 's') && (dp->d_name[1] == (int) period_char)) { - + MBSTOWCS(tmp_wcs_buffer, dp->d_name + 2); plain_file_name_p = plain_file_name; (void) wcscpy(plain_file_name_p, tmp_wcs_buffer); @@ -507,7 +507,7 @@ vpath_loop: */ if ((dp->d_name[0] == 's') && (dp->d_name[1] == (int) period_char)) { - + MBSTOWCS(wcs_buffer, dp->d_name + 2); (void) wcscpy(plain_file_name_p, wcs_buffer); plain_file = GETNAME(plain_file_name, FIND_LENGTH); diff --git a/usr/src/cmd/make/bin/globals.cc b/usr/src/cmd/make/bin/globals.cc index 9b1045909e..023deab0a8 100644 --- a/usr/src/cmd/make/bin/globals.cc +++ b/usr/src/cmd/make/bin/globals.cc @@ -60,7 +60,7 @@ Boolean sdot_target; /* used to identify s.m(/M)akefile */ Boolean all_parallel; Boolean assign_done; - int foo; + int foo; Boolean build_failed_seen; Name built_last_make_run; Name c_at; @@ -132,7 +132,7 @@ Name primary_makefile; Boolean quest; /* `-q' */ short read_trace_level; - Boolean reading_dependencies = false; + Boolean reading_dependencies = false; Name recursive_name; int recursion_level; short report_dependencies_level = 0; /* -P */ diff --git a/usr/src/cmd/make/bin/implicit.cc b/usr/src/cmd/make/bin/implicit.cc index 9315077a6d..bd8eaab8d7 100644 --- a/usr/src/cmd/make/bin/implicit.cc +++ b/usr/src/cmd/make/bin/implicit.cc @@ -60,7 +60,7 @@ extern Doname find_ar_suffix_rule(register Name target, Name true_target, Prope extern Doname find_double_suffix_rule(register Name target, Property *command, Boolean rechecking); extern void build_suffix_list(register Name target_suffix); extern Doname find_percent_rule(register Name target, Property *command, Boolean rechecking); -static void create_target_group_and_dependencies_list(Name target, Percent pat_rule, String percent); +static void create_target_group_and_dependencies_list(Name target, Percent pat_rule, String percent); static Boolean match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t *percent_buf); static void construct_string_from_pattern(Percent pat_rule, String percent, String result); static Boolean dependency_exists(Name target, Property line); @@ -69,7 +69,7 @@ extern void add_target_to_chain(Name target, Chain * query); /* * find_suffix_rule(target, target_body, target_suffix, command, rechecking) - * + * * Does the lookup for single and double suffix rules. * It calls build_suffix_list() to build the list of possible suffixes * for the given target. @@ -105,7 +105,7 @@ static Boolean actual_doname = false; * Usage of "we_are_in_tilde" is intended to avoid this recursion. */ -static Boolean we_are_in_tilde = false; +static Boolean we_are_in_tilde = false; Doname find_suffix_rule(Name target, Name target_body, Name target_suffix, Property *command, Boolean rechecking) @@ -118,9 +118,9 @@ find_suffix_rule(Name target, Name target_body, Name target_suffix, Property *co register Name source; Doname result; register Property line; - extern Boolean tilde_rule; - Boolean name_found = true; - Boolean posix_tilde_attempt = true; + extern Boolean tilde_rule; + Boolean name_found = true; + Boolean posix_tilde_attempt = true; int src_len = MAXPATHLEN + strlen(target_body->string_mb); /* @@ -201,7 +201,7 @@ posix_attempts: * a file, this source suffix did not match. */ if(vpath_defined && !posix && !svr4) { - (void) exists(source); + (void) exists(source); } if (!source->stat.is_file) { if(!(posix|svr4)) @@ -224,16 +224,16 @@ posix_attempts: if(source->string_mb[source->hash.length - 1] == '~' && ( svr4 || posix_tilde_attempt ) ) { - char *p, *np; + char *p, *np; char *tmpbuf; - tmpbuf = getmem(source->hash.length + 8); + tmpbuf = getmem(source->hash.length + 8); /* + 8 to add "s." or "SCCS/s." */ memset(tmpbuf,0,source->hash.length + 8); source->string_mb[source->hash.length - 1] = '\0'; - if(p = (char *) memchr((char *)source->string_mb,'/',source->hash.length)) + if(p = (char *) memchr((char *)source->string_mb,'/',source->hash.length)) { - while(1) { + while(1) { if(np = (char *) memchr((char *)p+1,'/',source->hash.length - (p - source->string_mb))) { p = np; } else {break;} @@ -242,15 +242,15 @@ posix_attempts: strncpy(tmpbuf, source->string_mb, p - source->string_mb + 1); strcat(tmpbuf, "s."); strcat(tmpbuf, p+1); - retmem((wchar_t *) source->string_mb); + retmem((wchar_t *) source->string_mb); source->string_mb = tmpbuf; - + } else { strcpy(tmpbuf, "s."); strcat(tmpbuf, source->string_mb); - retmem((wchar_t *) source->string_mb); + retmem((wchar_t *) source->string_mb); source->string_mb = tmpbuf; - + } source->hash.length = strlen(source->string_mb); if(exists(source) == file_doesnt_exist) @@ -271,9 +271,9 @@ posix_attempts: } continue; } - } + } } - + if (command != NULL) { if(!name_found) { store_name(source); @@ -297,10 +297,10 @@ posix_attempts: true, true); #endif - } + } } else { result = target_can_be_built(source); - + if (result == build_ok) { return result; } else { @@ -310,7 +310,7 @@ posix_attempts: continue; } } - + switch (result) { case build_dont_know: /* @@ -348,7 +348,7 @@ posix_attempts: } return build_failed; } - + if (debug_level > 1) { WCSTOMBS(mbs_buffer, sourcename); (void) printf(gettext("%*sFound %s\n"), @@ -356,7 +356,7 @@ posix_attempts: "", mbs_buffer); } - + if (source->depends_on_conditional) { target->depends_on_conditional = true; } @@ -542,7 +542,7 @@ find_ar_suffix_rule(register Name target, Name true_target, Property *command, B */ target->suffix_scan_done = false; body = GETNAME(targ_string.get_string(), - (int)(true_target->hash.length - + (int)(true_target->hash.length - suffix_length)); we_are_in_tilde = false; switch (find_suffix_rule(target, @@ -562,7 +562,7 @@ find_ar_suffix_rule(register Name target, Name true_target, Property *command, B * if it matches the target tail, and so on. * Go here if the suffix did not match the target tail. */ - not_this_one:; + not_this_one:; } return build_dont_know; } @@ -669,7 +669,7 @@ find_double_suffix_rule(register Name target, Property *command, Boolean recheck * if it matches the target tail. And so on. * Go here if the suffix did not match the target tail. */ - not_this_one:; + not_this_one:; } if (scanned_once) true_target->suffix_scan_done = true; @@ -872,7 +872,7 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) is_pattern = true; /* build dependency name */ INIT_STRING_FROM_STACK(string, string_buf); - construct_string_from_pattern(pat_depe, &percent, &string); + construct_string_from_pattern(pat_depe, &percent, &string); depe_to_check = getname_fn(string.buffer.start, FIND_LENGTH, false, @@ -1054,7 +1054,7 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) if (line->body.line.dependencies != NULL) { /* build all collected dependencies */ for (depe = line->body.line.dependencies; - depe != NULL; + depe != NULL; depe = depe->next) { actual_doname = true; result = doname_check(depe->name, true, true, depe->automatic); @@ -1109,9 +1109,9 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) (void) printf(" %s", pat_depe->name->string_mb); } - (void) printf(gettext(" because it is out of date relative to %s\n"), + (void) printf(gettext(" because it is out of date relative to %s\n"), depe->name->string_mb); - } + } } } } else { @@ -1133,7 +1133,7 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) } } - /* enter explicit rule from percent rule */ + /* enter explicit rule from percent rule */ Name lmn_target = true_target; if (true_target->has_long_member_name) { lmn_target = get_prop(true_target->prop, long_member_name_prop)->body.long_member_name.member_name; @@ -1164,9 +1164,9 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) } /* - * match_found_with_pattern + * match_found_with_pattern * ( target, pat_rule, percent, percent_buf) - * + * * matches "target->string" with a % pattern. * If pattern contains a MACRO definition, it's expanded first. * @@ -1175,9 +1175,9 @@ find_percent_rule(register Name target, Property *command, Boolean rechecking) * * Parameters: * target The target we're trying to match - * pattern + * pattern * percent record that contains "percent_buf" below - * percent_buf This is where the patched % part of pattern is stored + * percent_buf This is where the patched % part of pattern is stored * */ @@ -1194,7 +1194,7 @@ match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t Wstring pref_string(prefix); Wstring suf_string; - if (prefix->dollar) { + if (prefix->dollar) { INIT_STRING_FROM_STACK(string, string_buf); expand_value(prefix, &string, false); prefix_length = string.text.p - string.buffer.start; @@ -1240,7 +1240,7 @@ match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t Boolean match_found = false; int percent_length = target->hash.length - prefix_length - suffix_length; - + while (!match_found && (percent_length >= 0)) { /* init result string */ INIT_STRING_FROM_STACK(string, string_buf); @@ -1263,7 +1263,7 @@ match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t percent_length--; } } - + /* result */ return match_found; } @@ -1272,27 +1272,27 @@ match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t /* * create_target_group_and_dependencies_list * (target, pat_rule, percent) - * + * * constructs dependency list and a target group from pattern. * * If we have the lines * %/%.a + %/%.b + C%/CC%.c: yyy %.d bb%/BB%.e * commands * - * and we have matched the pattern xx/xx.a with %/%.a, then we + * and we have matched the pattern xx/xx.a with %/%.a, then we * construct a target group that looks like this: * xx/xx.a + xx/xx.b + Cxx/CCxx.c: dependencies * * and construct dependency list that looks like this: * yyy xx.d bbxx/BBxx.e + already existed dependencies - * + * * Return value: * none * * Parameters: * target The target we are building, in the previous * example, this is xx/xx.a - * pat_rule the % pattern that matched "target", here %/%.a + * pat_rule the % pattern that matched "target", here %/%.a * percent string containing matched % part. In the example=xx. * * Global variables used: @@ -1309,7 +1309,7 @@ create_target_group_and_dependencies_list(Name target, Percent pat_rule, String Chain new_target_group = NULL; Chain *new_target_group_tail = &new_target_group; Chain group_member; - + /* create and append dependencies from rule */ for (pat_depe = pat_rule->dependencies; pat_depe != NULL; pat_depe = pat_depe->next) { if (pat_depe->name->percent) { @@ -1329,7 +1329,7 @@ create_target_group_and_dependencies_list(Name target, Percent pat_rule, String enter_dependency(line, depe, false); } } - + /* if matched pattern is a group member, create new target group */ for (group_member = pat_rule->target_group; group_member != NULL; group_member = group_member->next) { Name new_target = group_member->name; @@ -1352,14 +1352,14 @@ create_target_group_and_dependencies_list(Name target, Percent pat_rule, String if (tgm != NULL) { continue; } - + /* insert it into the targets list */ (*new_target_group_tail) = ALLOC(Chain); (*new_target_group_tail)->name = new_target; (*new_target_group_tail)->next = NULL; new_target_group_tail = &(*new_target_group_tail)->next; } - + /* now we gathered all dependencies and created target group */ line->body.line.target_group = new_target_group; @@ -1383,7 +1383,7 @@ create_target_group_and_dependencies_list(Name target, Percent pat_rule, String * none * * Parameters: - * pat_rule matched pattern rule + * pat_rule matched pattern rule * percent string containing matched % sign part. * result holds the result of string construction. * @@ -1395,20 +1395,20 @@ construct_string_from_pattern(Percent pat_rule, String percent, String result) { expand_value(pat_rule->patterns[i], result, false); - + } else { append_string(pat_rule->patterns[i]->string_mb, result, pat_rule->patterns[i]->hash.length); } - + if (i < pat_rule->patterns_total - 1) { append_string(percent->buffer.start, result, percent->text.p - percent->buffer.start); } } - + if ((result->buffer.start[0] == (int) period_char) && (result->buffer.start[1] == (int) slash_char)) { result->buffer.start += 2; diff --git a/usr/src/cmd/make/bin/macro.cc b/usr/src/cmd/make/bin/macro.cc index a33484a979..7f4d5bfb46 100644 --- a/usr/src/cmd/make/bin/macro.cc +++ b/usr/src/cmd/make/bin/macro.cc @@ -123,7 +123,7 @@ setvar_envvar(void) ) { continue; } - INIT_STRING_FROM_STACK(value, buffer); + INIT_STRING_FROM_STACK(value, buffer); expand_value(p->value, &value, false); if ((length = wcslen(value.buffer.start)) >= MAXPATHLEN) { mbs = tmp_mbs_buffer = getmem((length + 1) * MB_LEN_MAX); diff --git a/usr/src/cmd/make/bin/main.cc b/usr/src/cmd/make/bin/main.cc index 41aff926e9..d635ad86ee 100644 --- a/usr/src/cmd/make/bin/main.cc +++ b/usr/src/cmd/make/bin/main.cc @@ -24,6 +24,7 @@ * * Copyright 2019, Joyent, Inc. * Copyright 2019 RackTop Systems. + * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. */ /* @@ -31,7 +32,7 @@ * * make program main routine plus some helper routines */ - + /* * Included files */ @@ -104,7 +105,7 @@ static Boolean list_all_targets; /* `-T' */ static int mf_argc; static char **mf_argv; static Dependency_rec not_auto_depen_struct; -static Dependency not_auto_depen = ¬_auto_depen_struct; +static Dependency not_auto_depen = ¬_auto_depen_struct; static Boolean pmake_cap_r_specified; /* `-R' */ static Boolean pmake_machinesfile_specified; /* `-M' */ static Boolean stop_after_error_ever_seen; /* `-S' */ @@ -184,11 +185,11 @@ main(int argc, char *argv[]) * which has to be regular chars. */ register char *cp; - char make_state_dir[MAXPATHLEN]; + char make_state_dir[MAXPATHLEN]; Boolean parallel_flag = false; Boolean argv_zero_relative = false; char *prognameptr; - char *slash_ptr; + char *slash_ptr; mode_t um; int i; struct itimerval value; @@ -213,7 +214,7 @@ main(int argc, char *argv[]) #endif #ifndef TEXT_DOMAIN -#define TEXT_DOMAIN "SYS_TEST" +#define TEXT_DOMAIN "SYS_TEST" #endif textdomain(TEXT_DOMAIN); @@ -255,12 +256,12 @@ main(int argc, char *argv[]) argv_zero_relative = true; } - /* - * The following flags are reset if we don't have the - * (.nse_depinfo or .make.state) files locked and only set + /* + * The following flags are reset if we don't have the + * (.nse_depinfo or .make.state) files locked and only set * AFTER the file has been locked. This ensures that if the user * interrupts the program while file_lock() is waiting to lock - * the file, the interrupt handler doesn't remove a lock + * the file, the interrupt handler doesn't remove a lock * that doesn't belong to us. */ make_state_lockfile = NULL; @@ -268,13 +269,13 @@ main(int argc, char *argv[]) /* - * look for last slash char in the path to look at the binary + * look for last slash char in the path to look at the binary * name. This is to resolve the hard link and invoke make * in svr4 mode. */ - /* Sun OS make standart */ - svr4 = false; + /* Sun OS make standard */ + svr4 = false; posix = false; if(!strcmp(argv_zero_string, "/usr/xpg4/bin/make")) { svr4 = false; @@ -465,7 +466,7 @@ main(int argc, char *argv[]) // // If dmake is running with -t option, set dmake_mode_type to serial. // This is done because doname() calls touch_command() that runs serially. -// If we do not do that, maketool will have problems. +// If we do not do that, maketool will have problems. // if(touch) { dmake_mode_type = serial_mode; @@ -496,7 +497,7 @@ main(int argc, char *argv[]) } } - + /* * Enable interrupt handler for alarms */ @@ -543,16 +544,16 @@ main(int argc, char *argv[]) } trace_reader = false; - /* - * Set temp_file_directory to the directory the .make.state - * file is written to. - */ - if ((slash_ptr = strrchr(make_state->string_mb, (int) slash_char)) == NULL) { - temp_file_directory = strdup(get_current_path()); - } else { - *slash_ptr = (int) nul_char; - (void) strcpy(make_state_dir, make_state->string_mb); - *slash_ptr = (int) slash_char; + /* + * Set temp_file_directory to the directory the .make.state + * file is written to. + */ + if ((slash_ptr = strrchr(make_state->string_mb, (int) slash_char)) == NULL) { + temp_file_directory = strdup(get_current_path()); + } else { + *slash_ptr = (int) nul_char; + (void) strcpy(make_state_dir, make_state->string_mb); + *slash_ptr = (int) slash_char; /* when there is only one slash and it's the first ** character, make_state_dir should point to '/'. */ @@ -560,18 +561,18 @@ main(int argc, char *argv[]) make_state_dir[0] = '/'; make_state_dir[1] = '\0'; } - if (make_state_dir[0] == (int) slash_char) { - temp_file_directory = strdup(make_state_dir); - } else { - char tmp_current_path2[MAXPATHLEN]; - - (void) sprintf(tmp_current_path2, - "%s/%s", - get_current_path(), - make_state_dir); - temp_file_directory = strdup(tmp_current_path2); - } - } + if (make_state_dir[0] == (int) slash_char) { + temp_file_directory = strdup(make_state_dir); + } else { + char tmp_current_path2[MAXPATHLEN]; + + (void) sprintf(tmp_current_path2, + "%s/%s", + get_current_path(), + make_state_dir); + temp_file_directory = strdup(tmp_current_path2); + } + } report_dir_enter_leave(true); @@ -799,7 +800,7 @@ handle_interrupt(int) /* BID_1030811 */ /* azv 16 Oct 95 */ - current_target->stat.time = file_no_time; + current_target->stat.time = file_no_time; if (exists(current_target) != file_doesnt_exist) { (void) fprintf(stderr, @@ -835,7 +836,7 @@ handle_interrupt(int) !quest && !(rp->target->stat.is_precious || all_precious)) { - rp->target->stat.time = file_no_time; + rp->target->stat.time = file_no_time; if (exists(rp->target) != file_doesnt_exist) { (void) fprintf(stderr, "\n*** %s ", @@ -887,9 +888,8 @@ handle_interrupt(int) * * Global variables used: */ -/*ARGSUSED*/ static void -doalarm(int) +doalarm(int sig __attribute__((unused))) { return; } @@ -971,7 +971,7 @@ read_command_options(register int argc, register char **argv) } if (ch == '?') { - if (optopt == '-') { + if (optopt == '-') { /* Bug 5060758: getopt() changed behavior (s10_60), * and now we have to deal with cases when options * with double hyphen appear here, from -$(MAKEFLAGS) @@ -985,16 +985,16 @@ read_command_options(register int argc, register char **argv) if (tptr) { if (last_optind_with_double_hyphen != current_optind) { /* This is first time we are trying to fix "--" - * problem with this option. If we come here second + * problem with this option. If we come here second * time, we will go to fatal error. */ last_optind_with_double_hyphen = current_optind; - + /* Eliminate first hyphen character */ for (j=0; argv[i][j] != '\0'; j++) { argv[i][j] = argv[i][j+1]; } - + /* Repeat the processing of this argument */ optind=last_optind; current_optind=last_current_optind; @@ -1088,6 +1088,13 @@ read_command_options(register int argc, register char **argv) break; case 2048: argv[i] = (char *)"-C"; + if (chdir(argv[k]) != 0) { + fatal(gettext("failed to change to directory %s: %s"), + argv[k], strerror(errno)); + } + path_reset = true; + rebuild_arg0 = true; + (void) get_current_path(); break; default: /* > 1 of -c, f, g, j, K, M, m, O, o, x seen */ fatal(gettext("Illegal command line. More than one option requiring\nan argument given in the same argument group")); @@ -1193,7 +1200,7 @@ setup_makeflags_argv() * hyphen characters, and remove all duplicates. * Usually it happens when the next command is * used: $(MAKE) -$(MAKEFLAGS) - * + * * This was a workaround for BugID 5060758, but * appears to have survived as a fix in make. */ @@ -1608,10 +1615,10 @@ int done=0; (void) sprintf(path, "%s/%s", cwdpath,sccs_dir_path); if (access(path, F_OK) == 0) { - sccs_dir_path = path; + sccs_dir_path = path; done = 1; } else { - fatal(gettext("Bogus PROJECTDIR '%s'"), sccs_dir_path); + fatal(gettext("Bogus PROJECTDIR '%s'"), sccs_dir_path); } } } @@ -1630,7 +1637,7 @@ make_install_prefix(void) PATH_MAX - 1)) < 0) fatal("failed to read origin from /proc\n"); - + origin[ret] = '\0'; return strdup(dirname(origin)); } @@ -1656,7 +1663,7 @@ add_to_env(const char *var, const char *value, const char *fallback) var, oldpath, value); } else { asprintf(&newpath, "%s=%s:%s", - var, oldpath, fallback); + var, oldpath, fallback); } } @@ -1682,7 +1689,7 @@ set_sgs_support() { int len; char *newpath, *newpath64; - char *lib32, *lib64; + char *lib32, *lib64; static char *prev_path, *prev_path64; char *origin = make_install_prefix(); struct stat st; @@ -1895,7 +1902,7 @@ read_files_and_state(int argc, char **argv) /* * Set MFLAGS and MAKEFLAGS - * + * * Before reading makefile we do not know exactly which mode * (posix or not) is used. So prepare two MAKEFLAGS strings * for both posix and solaris modes because they are different. @@ -1940,7 +1947,7 @@ read_files_and_state(int argc, char **argv) append_char('k', &makeflags_string); append_char('k', &makeflags_string_posix); } else { - if (stop_after_error_ever_seen + if (stop_after_error_ever_seen && continue_after_error_ever_seen) { append_char('k', &makeflags_string_posix); append_char((int) space_char, &makeflags_string_posix); @@ -2081,15 +2088,15 @@ read_files_and_state(int argc, char **argv) } } -/* - * Add command line macro to POSIX makeflags_string +/* + * Add command line macro to POSIX makeflags_string */ if (makeflags_and_macro.start) { tmp_char = (char) space_char; cp = makeflags_and_macro.start; do { append_char(tmp_char, &makeflags_string_posix); - } while ( tmp_char = *cp++ ); + } while ( tmp_char = *cp++ ); retmem_mb(makeflags_and_macro.start); } @@ -2373,13 +2380,13 @@ read_files_and_state(int argc, char **argv) */ memcpy(&state_filename, make_state,sizeof(state_filename)); state_filename.string_mb = state_file_str_mb; - /* Just a kludge to avoid two slashes back to back */ + /* Just a kludge to avoid two slashes back to back */ if((make_state->hash.length == 1)&& (make_state->string_mb[0] == '/')) { make_state->hash.length = 0; make_state->string_mb[0] = '\0'; } - sprintf(state_file_str_mb,"%s%s", + sprintf(state_file_str_mb,"%s%s", make_state->string_mb,"/.make.state"); make_state = &state_filename; /* adjust the length to reflect the appended string */ @@ -2390,7 +2397,7 @@ read_files_and_state(int argc, char **argv) char *slashp; if (slashp = strrchr(make_state->string_mb, '/')) { - strncpy(tmp_path, make_state->string_mb, + strncpy(tmp_path, make_state->string_mb, (slashp - make_state->string_mb)); tmp_path[slashp - make_state->string_mb]=0; if(strlen(tmp_path)) { @@ -2432,7 +2439,7 @@ enter_argv_values(int argc, char *argv[], ASCII_Dyn_Array *makeflags_and_macro) register int i; int length; register Name name; - int opt_separator = argc; + int opt_separator = argc; char tmp_char; wchar_t *tmp_wcs_buffer; register Name value; @@ -2538,18 +2545,17 @@ enter_argv_values(int argc, char *argv[], ASCII_Dyn_Array *makeflags_and_macro) } break; case 2048: /* -C seen */ + /* + * The chdir() will have been performed + * in read_command_options(). + * Just set DMAKE_CDIR here. + */ if (argv[i + 1] == NULL) { - fatal(gettext("No argument after -C flag")); - } - if (chdir(argv[i + 1]) != 0) { - fatal(gettext("failed to change to directory %s: %s"), - argv[i + 1], strerror(errno)); + fatal(gettext( + "No argument after -C flag")); } MBSTOWCS(wcs_buffer, "DMAKE_CDIR"); name = GETNAME(wcs_buffer, FIND_LENGTH); - path_reset = true; - rebuild_arg0 = true; - (void) get_current_path(); break; default: /* Shouldn't reach here */ argv[i] = NULL; @@ -2570,7 +2576,7 @@ enter_argv_values(int argc, char *argv[], ASCII_Dyn_Array *makeflags_and_macro) } argv[i+1] = NULL; } else if ((cp = strchr(argv[i], (int) equal_char)) != NULL) { -/* +/* * Combine all macro in dynamic array */ if(*(cp-1) == (int) plus_char) @@ -2784,7 +2790,7 @@ static Boolean read_makefile(register Name makefile, Boolean complain, Boolean must_exist, Boolean report_file) { Boolean b; - + makefile_type = reading_makefile; recursion_level = 0; reading_dependencies = true; @@ -2885,11 +2891,11 @@ make_targets(int argc, char **argv, Boolean parallel_flag) if (posix) { if (!commands_done) { (void) printf(gettext("`%s' is updated.\n"), - default_target_to_build->string_mb); + default_target_to_build->string_mb); } else { if (no_action_was_taken) { (void) printf(gettext("`%s': no action was taken.\n"), - default_target_to_build->string_mb); + default_target_to_build->string_mb); } } } else { @@ -2906,7 +2912,7 @@ make_targets(int argc, char **argv, Boolean parallel_flag) /* Now wait for all of the targets to finish running */ finish_running(); // setjmp(jmpbuffer); - + } for (i = 1; i < argc; i++) { if ((cp = argv[i]) != NULL) { @@ -2962,11 +2968,11 @@ make_targets(int argc, char **argv, Boolean parallel_flag) if (posix) { if (!commands_done) { (void) printf(gettext("`%s' is updated.\n"), - default_target_to_build->string_mb); + default_target_to_build->string_mb); } else { if (no_action_was_taken) { (void) printf(gettext("`%s': no action was taken.\n"), - default_target_to_build->string_mb); + default_target_to_build->string_mb); } } } else { @@ -3025,7 +3031,7 @@ make_targets(int argc, char **argv, Boolean parallel_flag) if (posix) { if (!commands_done) { (void) printf(gettext("`%s' is updated.\n"), - default_target_to_build->string_mb); + default_target_to_build->string_mb); } else { if (no_action_was_taken) { (void) printf(gettext("`%s': no action was taken.\n"), @@ -3093,8 +3099,8 @@ append_or_replace_macro_in_dyn_array(ASCII_Dyn_Array *Ar, char *macro) register char *cp3; /* work pointer in array */ register char *name; /* macro name */ register char *value; /* macro value */ - register int len_array; - register int len_macro; + register int len_array; + register int len_macro; char * esc_value = NULL; int esc_len; @@ -3155,13 +3161,13 @@ LOOK_FOR_NAME: while (isspace(*cp3)) { cp3++; } - + cp2 = cp1; /* remove old macro */ if ((*cp3) && (cp3 < Ar->start + Ar->size)) { for (; cp3 < Ar->start + Ar->size; cp3++) { *cp2++ = *cp3; } - } + } for (; cp2 < Ar->start + Ar->size; cp2++) { *cp2 = 0; } @@ -3199,7 +3205,7 @@ APPEND_MACRO: strncat(Ar->start, esc_value, strlen(esc_value)); free(esc_value); return; -ERROR_MACRO: +ERROR_MACRO: /* Macro without '=' or with invalid left/right part */ return; } diff --git a/usr/src/cmd/make/bin/make.rules.file b/usr/src/cmd/make/bin/make.rules.file index 098a44870c..46b4faa594 100644 --- a/usr/src/cmd/make/bin/make.rules.file +++ b/usr/src/cmd/make/bin/make.rules.file @@ -40,8 +40,8 @@ CPPFLAGS= LINT=lint LINTFLAGS= COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) -c -LINK.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -LINT.c=$(LINT) $(LINTFLAGS) $(CPPFLAGS) +LINK.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINT.c=$(LINT) $(LINTFLAGS) $(CPPFLAGS) .c: $(LINK.c) -o $@ $< $(LDLIBS) .c~: @@ -163,9 +163,9 @@ LEX.l=$(LEX) $(LFLAGS) -t CCC=CC CCFLAGS= COMPILE.cc=$(CCC) $(CCFLAGS) $(CPPFLAGS) -c -LINK.cc=$(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINK.cc=$(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) COMPILE.C=$(CCC) $(CCFLAGS) $(CPPFLAGS) -c -LINK.C=$(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINK.C=$(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) .cc: $(LINK.cc) -o $@ $< $(LDLIBS) .cc~: @@ -220,9 +220,9 @@ LINK.C=$(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) FC=f77 FFLAGS= COMPILE.f=$(FC) $(FFLAGS) -c -LINK.f=$(FC) $(FFLAGS) $(LDFLAGS) +LINK.f=$(FC) $(FFLAGS) $(LDFLAGS) COMPILE.F=$(FC) $(FFLAGS) $(CPPFLAGS) -c -LINK.F=$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINK.F=$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) .f: $(LINK.f) -o $@ $< $(LDLIBS) .f~: @@ -284,7 +284,7 @@ LINK.F=$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) # FORTRAN section. ratfor. RFLAGS= COMPILE.r=$(FC) $(FFLAGS) $(RFLAGS) -c -LINK.r=$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) +LINK.r=$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) .r: $(LINK.r) -o $@ $< $(LDLIBS) .r~: @@ -356,8 +356,8 @@ M2C=m2c M2FLAGS= MODFLAGS= DEFFLAGS= -COMPILE.def=$(M2C) $(M2FLAGS) $(DEFFLAGS) -COMPILE.mod=$(M2C) $(M2FLAGS) $(MODFLAGS) +COMPILE.def=$(M2C) $(M2FLAGS) $(DEFFLAGS) +COMPILE.mod=$(M2C) $(M2FLAGS) $(MODFLAGS) .def.sym: $(COMPILE.def) -o $@ $< .def~.sym: @@ -387,7 +387,7 @@ COMPILE.mod=$(M2C) $(M2FLAGS) $(MODFLAGS) PC=pc PFLAGS= COMPILE.p=$(PC) $(PFLAGS) $(CPPFLAGS) -c -LINK.p=$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) +LINK.p=$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) .p: $(LINK.p) -o $@ $< $(LDLIBS) .p~: @@ -411,7 +411,7 @@ LINK.p=$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) # Assembly section. AS=as ASFLAGS= -COMPILE.s=$(AS) $(ASFLAGS) +COMPILE.s=$(AS) $(ASFLAGS) COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c .s.o: $(COMPILE.s) -o $@ $< @@ -492,7 +492,7 @@ SCCSGETFLAGS=-s sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@ -G$@ .SCCS_GET_POSIX: - sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@ + sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@ .GET_POSIX: - $(GET) $(GFLAGS) s.$@ + $(GET) $(GFLAGS) s.$@ diff --git a/usr/src/cmd/make/bin/misc.cc b/usr/src/cmd/make/bin/misc.cc index 97e7ce1e0b..ed4d89b78a 100644 --- a/usr/src/cmd/make/bin/misc.cc +++ b/usr/src/cmd/make/bin/misc.cc @@ -90,7 +90,7 @@ static void print_target_n_deps(register Name target); * * Global variables used: */ -void +void free_chain(Name_vector ptr) { if (ptr != NULL) { @@ -289,7 +289,7 @@ get_current_path(void) * Parameters: * * Global variables used: - * svr4 Was ".SVR4" seen in makefile? + * svr4 Was ".SVR4" seen in makefile? * svr4_name The Name ".SVR4", printed * posix Was ".POSIX" seen in makefile? * posix_name The Name ".POSIX", printed @@ -388,13 +388,13 @@ dump_make_state(void) percent = percent->next) { (void) printf("%s:", percent->name->string_mb); - + for (percent_depe = percent->dependencies; percent_depe != NULL; percent_depe = percent_depe->next) { (void) printf(" %s", percent_depe->name->string_mb); } - + (void) printf("\n"); for (rule = percent->command_template; @@ -715,8 +715,8 @@ load_cached_names(void) } } -/* - * iterate on list of conditional macros in np, and place them in +/* + * iterate on list of conditional macros in np, and place them in * a String_rec starting with, and separated by the '$' character. */ void @@ -724,18 +724,18 @@ cond_macros_into_string(Name np, String_rec *buffer) { Macro_list macro_list; - /* + /* * Put the version number at the start of the string */ MBSTOWCS(wcs_buffer, DEPINFO_FMT_VERSION); append_string(wcs_buffer, buffer, FIND_LENGTH); - /* + /* * Add the rest of the conditional macros to the buffer */ if (np->depends_on_conditional){ - for (macro_list = np->conditional_macro_list; + for (macro_list = np->conditional_macro_list; macro_list != NULL; macro_list = macro_list->next){ - append_string(macro_list->macro_name, buffer, + append_string(macro_list->macro_name, buffer, FIND_LENGTH); append_char((int) equal_char, buffer); append_string(macro_list->value, buffer, FIND_LENGTH); diff --git a/usr/src/cmd/make/bin/nse_printdep.cc b/usr/src/cmd/make/bin/nse_printdep.cc index df6ec1b514..dd2bc62825 100644 --- a/usr/src/cmd/make/bin/nse_printdep.cc +++ b/usr/src/cmd/make/bin/nse_printdep.cc @@ -70,7 +70,7 @@ print_dependencies(register Name target, register Property line) if (target_variants) { depvar_print_results(); } - + if (!makefiles_printed) { /* * Search the makefile list for the primary makefile, @@ -174,11 +174,11 @@ print_deps(register Name target, register Property line) } } print_filename(target); - (void) printf(":\t"); - print_deplist(line->body.line.dependencies); + (void) printf(":\t"); + print_deplist(line->body.line.dependencies); print_rec_info(target); - (void) printf("\n"); - for (dep = line->body.line.dependencies; + (void) printf("\n"); + for (dep = line->body.line.dependencies; dep != NULL; dep = dep->next) { print_deps(dep->name, @@ -286,7 +286,7 @@ print_forest(Name target) Name_set::iterator np, e; Property line; - for (np = hashtab.begin(), e = hashtab.end(); np != e; np++) { + for (np = hashtab.begin(), e = hashtab.end(); np != e; np++) { if (np->is_target && !np->has_parent && np != target) { (void) doname_check(np, true, false, false); line = get_prop(np->prop, line_prop); @@ -303,8 +303,6 @@ print_forest(Name target) */ void print_value(register Name value, Daemon daemon) - - { Chain cp; @@ -340,7 +338,7 @@ print_rule(register Name target) } -/* +/* * If target is recursive, print the following to standard out: * .RECURSIVE subdir targ Makefile */ @@ -355,11 +353,11 @@ print_rec_info(Name target) rp = find_recursive_target(target); if (rp) { - /* + /* * if found, print starting with the space after the ':' */ colon = (wchar_t *) wcschr(rp->oldline, (int) colon_char); (void) printf("%s", colon + 1); } } - + diff --git a/usr/src/cmd/make/bin/parallel.cc b/usr/src/cmd/make/bin/parallel.cc index c7712dfd7b..7606fe9677 100644 --- a/usr/src/cmd/make/bin/parallel.cc +++ b/usr/src/cmd/make/bin/parallel.cc @@ -183,7 +183,7 @@ execute_parallel(Property line, Boolean waitflg, Boolean local) rule->command_line = vpath_translation(rule->command_line); } - + silent_flag = false; ignore = 0; @@ -258,11 +258,11 @@ execute_parallel(Property line, Boolean waitflg, Boolean local) * adjust_pmake_max_jobs (int pmake_max_jobs) * * Parameters: - * pmake_max_jobs - max jobs limit set by user + * pmake_max_jobs - max jobs limit set by user * * External functions used: * sysconf() - * getloadavg() + * getloadavg() */ static int adjust_pmake_max_jobs (int pmake_max_jobs) @@ -1064,12 +1064,12 @@ dependency_conflict(Name target) continue; } for(pending_dp = pending_line-> - body.line.dependencies; + body.line.dependencies; pending_dp != NULL; pending_dp = pending_dp->next) { if (dp->name == pending_dp->name) { target->checking_subtree - = false; + = false; subtree_conflict = rp->target; subtree_conflict2 = dp->name; return true; @@ -1244,7 +1244,7 @@ bypass_for_loop_inc_4: retmem_mb(rp->stderr_file); rp->stderr_file = NULL; } - + check_state(rp->temp_file); if (rp->temp_file != NULL) { free_name(rp->temp_file); @@ -1755,7 +1755,7 @@ is_running(Name target) /* * This function replaces the makesh binary. */ - + static pid_t run_rule_commands(char *host, char **commands) @@ -1820,7 +1820,7 @@ run_rule_commands(char *host, char **commands) false, false, /* bugs #4085164 & #4990057 */ /* BOOLEAN(silent_flag && ignore), */ - always_exec, + always_exec, (Name) NULL); if (result == build_failed) { if (silent_flag) { diff --git a/usr/src/cmd/make/bin/pmake.cc b/usr/src/cmd/make/bin/pmake.cc index 660d8c0732..1a69c7729f 100644 --- a/usr/src/cmd/make/bin/pmake.cc +++ b/usr/src/cmd/make/bin/pmake.cc @@ -77,7 +77,7 @@ static Boolean pskip_white_space(wchar_t **cp_address); int read_make_machines(Name make_machines_name) { - wchar_t c; + wchar_t c; Boolean default_make_machines; struct hostent *hp; wchar_t local_host[MAX_HOSTNAMELEN + 1]; @@ -215,8 +215,8 @@ read_make_machines(Name make_machines_name) * machine name. */ if (*ms) { - /* - * If invalid machine name decrement counter + /* + * If invalid machine name decrement counter * and skip line. */ mp = ms; @@ -282,8 +282,8 @@ read_make_machines(Name make_machines_name) pskip_comment(&ms); } else if (IS_WEQUALN(ms, wcs_buffer, 3)) { /* Skip "max". */ - ms += 3; - pmake_max_jobs = get_max(&ms, mp); + ms += 3; + pmake_max_jobs = get_max(&ms, mp); SKIPSPACE(ms); } else { warning(gettext("unknown option for host %s"), mbs_buffer); @@ -386,7 +386,7 @@ pskip_comment(wchar_t **cp_address) static int get_max(wchar_t **ms_address, wchar_t *hostname) { - wchar_t *ms = *ms_address; + wchar_t *ms = *ms_address; int limit = PMAKE_DEF_MAX_JOBS; /* Default setting. */ WCSTOMBS(mbs_buffer, hostname); diff --git a/usr/src/cmd/make/bin/read.cc b/usr/src/cmd/make/bin/read.cc index d5445938ef..1ab20fd20e 100644 --- a/usr/src/cmd/make/bin/read.cc +++ b/usr/src/cmd/make/bin/read.cc @@ -61,7 +61,7 @@ static int line_started_with_space=0; // Used to diagnose spaces instead of tabs */ static void parse_makefile(register Name true_makefile_name, register Source source); static Source push_macro_value(register Source bp, register wchar_t *buffer, int size, register Source source); -extern void enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_line command, Separator separator, Boolean target_group_seen); +extern void enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_line command, Separator separator, Boolean target_group_seen); extern Name normalize_name(register wchar_t *name_string, register int length); /* @@ -111,7 +111,7 @@ read_simple_file(register Name makefile_name, register Boolean chase_path, regis int previous_line_number = line_number; wchar_t previous_current_makefile[MAXPATHLEN]; Makefile_type save_makefile_type; - Name normalized_makefile_name; + Name normalized_makefile_name; register wchar_t *string_start; register wchar_t *string_end; @@ -152,7 +152,7 @@ read_simple_file(register Name makefile_name, register Boolean chase_path, regis asprintf(&path, "%s/../../share/", pfx); add_dir_to_path(path, &makefile_path, -1); free(path); - + add_dir_to_path("/usr/share/lib/make", &makefile_path, -1); @@ -169,7 +169,7 @@ read_simple_file(register Name makefile_name, register Boolean chase_path, regis string_start=get_wstring(makefile_name->string_mb); for (string_end=string_start+1; *string_end != L'\0'; string_end++); normalized_makefile_name=normalize_name(string_start, string_end - string_start); - if ((strcmp(makefile_name->string_mb, normalized_makefile_name->string_mb) == 0) || + if ((strcmp(makefile_name->string_mb, normalized_makefile_name->string_mb) == 0) || (doname(normalized_makefile_name, true, false) == build_dont_know)) { n = access_vroot(makefile_name->string_mb, 4, @@ -190,13 +190,13 @@ read_simple_file(register Name makefile_name, register Boolean chase_path, regis } } retmem(string_start); - /* + /* * Commented out: retmem_mb(normalized_makefile_name->string_mb); * We have to return this memory, but it seems to trigger a bug * in dmake or in Sun C++ 5.7 compiler (it works ok if this code * is compiled using Sun C++ 5.6). */ - // retmem_mb(normalized_makefile_name->string_mb); + // retmem_mb(normalized_makefile_name->string_mb); } makefile_type = save_makefile_type; } @@ -204,7 +204,7 @@ read_simple_file(register Name makefile_name, register Boolean chase_path, regis source->previous = NULL; source->already_expanded = false; /* Lock the file for read, but not when -n. */ - if (lock_makefile && + if (lock_makefile && !do_not_exec_rule) { make_state_lockfile = getmem(strlen(make_state->string_mb) + strlen(".lock") + 1); @@ -504,7 +504,7 @@ parse_makefile(register Name true_makefile_name, register Source source) static wchar_t include_tab[10]; int tmp_bytes_left_in_string; Boolean tmp_maybe_include = false; - int emptycount = 0; + int emptycount = 0; Boolean first_target; String_rec include_name; @@ -806,18 +806,18 @@ start_new_line_no_skip: /* Strip "./" from the head of the name */ if ((name_start[0] == (int) period_char) && - (name_start[1] == (int) slash_char)) { + (name_start[1] == (int) slash_char)) { name_start += 2; name_length -= 2; } /* if include file name is surrounded by double quotes */ if ((name_start[0] == (int) doublequote_char) && (name_start[name_length - 1] == (int) doublequote_char)) { - name_start += 1; - name_length -= 2; + name_start += 1; + name_length -= 2; - /* if name does not begin with a slash char */ - if (name_start[0] != (int) slash_char) { + /* if name does not begin with a slash char */ + if (name_start[0] != (int) slash_char) { if ((name_start[0] == (int) period_char) && (name_start[1] == (int) slash_char)) { name_start += 2; @@ -837,7 +837,7 @@ start_new_line_no_skip: name_length); name_start = include_name.buffer.start; - name_length = include_name.text.p - name_start; + name_length = include_name.text.p - name_start; } } } @@ -889,7 +889,7 @@ start_new_line_no_skip: } } else { /* Check if the word include was split across 8K boundary. */ - + tmp_bytes_left_in_string = source->string.text.end - source_p; if (tmp_bytes_left_in_string < 8) { tmp_maybe_include = false; @@ -1299,7 +1299,7 @@ case scan_name_state: /* ** following code drops the target separator plus char if it starts ** a line. - */ + */ if(first_target && !macro_seen_in_string && source_p == string_start) { for (; 1; source_p++) @@ -1485,7 +1485,7 @@ case scan_name_state: separator = equal_seen; on_eoln_state = enter_equal_state; break; - } + } if(svr4) { fatal_reader(gettext("syntax error")); } @@ -1554,7 +1554,7 @@ case scan_name_state: goto macro_value_start; } else { if (source->fd >= 0) { - line_number++; + line_number++; } } break; @@ -1816,7 +1816,7 @@ case scan_name_state: /* We read all the command lines for the target/dependency line. */ /* Enter the stuff */ - enter_target_groups_and_dependencies( &target, &depes, command, + enter_target_groups_and_dependencies( &target, &depes, command, separator, target_group_seen); goto start_new_line; @@ -2056,26 +2056,26 @@ push_macro_value(register Source bp, register wchar_t *buffer, int size, registe * target_group_seen) * * Parameters: - * target Structure that shows the target(s) on the line + * target Structure that shows the target(s) on the line * we are currently parsing. This can looks like * target1 .. targetN : dependencies - * commands + * commands * or * target1 + .. + targetN : dependencies * commands * depes Dependencies - * command Points to the command(s) to be executed for + * command Points to the command(s) to be executed for * this target. * separator : or :: or := * target_group_seen Set if we have target1 + .. + targetN - * - * - * After reading the command lines for a target, this routine + * + * + * After reading the command lines for a target, this routine * is called to setup the dependencies and the commands for it. - * If the target is a % pattern or part of a target group, then - * the appropriate routines are called. + * If the target is a % pattern or part of a target group, then + * the appropriate routines are called. */ - + void enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_line command, Separator separator, Boolean target_group_seen) { @@ -2099,23 +2099,23 @@ enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_ /* If we saw it in the makefile it must be * a file */ target->names[i]->stat.is_file = true; - /* Make sure that we use dependencies + /* Make sure that we use dependencies * entered for makefiles */ target->names[i]->state = build_dont_know; - /* If the target is special we delegate + /* If the target is special we delegate * the processing */ - if (target->names[i]->special_reader + if (target->names[i]->special_reader != no_special) { - special_reader(target->names[i], - depes, + special_reader(target->names[i], + depes, command); - } + } /* Check if this is a "a%b : x%y" type rule */ else if (target->names[i]->percent) { - percent_ptr = - enter_percent(target->names[i], - target->target_group[i], + percent_ptr = + enter_percent(target->names[i], + target->target_group[i], depes, command); if (target_group_seen) { target_group_member->percent_member = @@ -2126,7 +2126,7 @@ enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_ enter_dependencies (target->names[i], target->target_group[i], - depes, + depes, command, separator); } else { @@ -2134,11 +2134,11 @@ enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_ target_group_member->percent_member = NULL; } - + enter_dependencies (target->names[i], target->target_group[i], - depes, + depes, command, separator); } @@ -2146,5 +2146,3 @@ enter_target_groups_and_dependencies(Name_vector target, Name_vector depes, Cmd_ } } } - - diff --git a/usr/src/cmd/make/bin/read2.cc b/usr/src/cmd/make/bin/read2.cc index 835b7f881e..a968e18b8b 100644 --- a/usr/src/cmd/make/bin/read2.cc +++ b/usr/src/cmd/make/bin/read2.cc @@ -493,13 +493,13 @@ find_target_groups(register Name_vector target_list, register int i, Boolean res &target_list->next->names[0] : NULL; } /* We have four states here : - * 0: No target group started and next element is not "+" + * 0: No target group started and next element is not "+" * This is not interesting. - * 1: A target group is being built and the next element + * 1: A target group is being built and the next element * is not "+". This terminates the group. - * 2: No target group started and the next member is "+" + * 2: No target group started and the next member is "+" * This is the first target in a group. - * 3: A target group started and the next member is a "+" + * 3: A target group started and the next member is a "+" * The group continues. */ switch ((target_group ? 1 : 0) + @@ -638,7 +638,7 @@ enter_dependencies(register Name target, Chain target_group, register Name_vecto if ((line->body.recursive.directory == directory) && (line->body.recursive.target == name)) { line->body.recursive.makefiles = dp; - line->body.recursive.has_built = + line->body.recursive.has_built = (Boolean) (makefile_type == reading_cpp_file); return; @@ -648,7 +648,7 @@ enter_dependencies(register Name target, Chain target_group, register Name_vecto line2->body.recursive.directory = directory; line2->body.recursive.target = name; line2->body.recursive.makefiles = dp; - line2->body.recursive.has_built = + line2->body.recursive.has_built = (Boolean) (makefile_type == reading_cpp_file); line2->body.recursive.in_depinfo = false; return; @@ -1106,9 +1106,9 @@ enter_dyntarget(register Name target) * * Global variables used: * all_parallel Set to indicate that everything runs parallel - * svr4 Set when ".SVR4" target is read + * svr4 Set when ".SVR4" target is read * svr4_name The Name ".SVR4" - * posix Set when ".POSIX" target is read + * posix Set when ".POSIX" target is read * posix_name The Name ".POSIX" * current_make_version The Name "<current version number>" * default_rule Set when ".DEFAULT" target is read @@ -1234,7 +1234,7 @@ special_reader(Name target, register Name_vector depes, Cmd_line command) break; if(posix) break; - /* it's not necessary to specify KEEP_STATE, if this + /* it's not necessary to specify KEEP_STATE, if this ** is given, so set the keep_state. */ keep_state = true; @@ -1689,7 +1689,7 @@ enter_conditional(register Name target, Name name, Name value, register Boolean if (target->percent) { target = conditionals; } - + if (name->colon) { sh_transform(&name, &value); } diff --git a/usr/src/cmd/make/bin/rep.cc b/usr/src/cmd/make/bin/rep.cc index f0cb9e1728..479967f938 100644 --- a/usr/src/cmd/make/bin/rep.cc +++ b/usr/src/cmd/make/bin/rep.cc @@ -31,7 +31,7 @@ /* * Included files - */ + */ #include <mk/defs.h> #include <mksh/misc.h> /* retmem() */ #include <vroot/report.h> /* NSE_DEPINFO */ @@ -73,7 +73,7 @@ report_recursive_init(void) wchar_t *line; wchar_t *bigger_line; wchar_t *colon; - wchar_t *dollar; + wchar_t *dollar; Recursive_make rp; /* @@ -85,7 +85,7 @@ report_recursive_init(void) } else { depinfo_already_read = true; } - + search_dir = getenv("NSE_DEP"); if (search_dir == NULL) { return; @@ -138,10 +138,10 @@ report_recursive_init(void) */ rp->oldline = (wchar_t *) wcsdup(line); if ( dollar != NULL ){ - rp->cond_macrostring = + rp->cond_macrostring = (wchar_t *) wcsdup(dollar - VER_LEN + 1); } - /* + /* * get target name into recursive struct */ *colon = (int) nul_char; @@ -174,7 +174,7 @@ report_recursive_dep(Name target, wchar_t *line) INIT_STRING_FROM_STACK(string, rec_buf); cond_macros_into_string(target, &string); - /* + /* * find an applicable recursive entry, if there isn't one, create it */ rp = find_recursive_target(target); @@ -207,7 +207,7 @@ report_recursive_dep(Name target, wchar_t *line) * * Parameters: * target The target we need - * top_level_target more info used to determinde the + * top_level_target more info used to determinde the * target we need * * Static variables used: @@ -218,7 +218,7 @@ find_recursive_target(Name target) { Recursive_make rp; String_rec string; - wchar_t rec_buf[STRING_BUFFER_LENGTH]; + wchar_t rec_buf[STRING_BUFFER_LENGTH]; INIT_STRING_FROM_STACK(string, rec_buf); cond_macros_into_string(target, &string); @@ -226,12 +226,12 @@ find_recursive_target(Name target) Wstring tstr(target); wchar_t * wcb = tstr.get_string(); for (rp = recursive_list; rp != NULL; rp = rp->next) { - /* + /* * If this entry has already been removed, ignore it. */ if (rp->removed) continue; - /* + /* * If this target, and the target on the list are the same * and if one of them contains conditional macro info, while * the other doesn't, remove this entry from the list of @@ -247,7 +247,7 @@ find_recursive_target(Name target) string.buffer.start[VER_LEN] == '\0'){ rp->removed = true; continue; - } + } } /* * If this is not a VERS2 entry, only need to match @@ -255,8 +255,8 @@ find_recursive_target(Name target) * are ignored. */ MBSTOWCS(wcs_buffer, DEPINFO_FMT_VERSION); - if (IS_WEQUALN(wcs_buffer, string.buffer.start, VER_LEN)) { - if (IS_WEQUAL(rp->cond_macrostring, + if (IS_WEQUALN(wcs_buffer, string.buffer.start, VER_LEN)) { + if (IS_WEQUAL(rp->cond_macrostring, string.buffer.start) && IS_WEQUAL(rp->target, wcb)) { return rp; @@ -277,7 +277,7 @@ find_recursive_target(Name target) * * Parameters: * target The target we want to remove - * top_level_target target we want to remove must be built from + * top_level_target target we want to remove must be built from * the same top level target * * Static variables used: @@ -291,7 +291,7 @@ remove_recursive_dep(Name target) rp = find_recursive_target(target); if ( rp != NULL ) { - rp->removed = true; + rp->removed = true; changed = true; if(rp->target) { retmem(rp->target); @@ -315,7 +315,7 @@ remove_recursive_dep(Name target) /* gather_recursive_deps() * - * Create or update list of recursive targets. + * Create or update list of recursive targets. */ void gather_recursive_deps(void) @@ -333,18 +333,18 @@ gather_recursive_deps(void) for (np = hashtab.begin(), e = hashtab.end(); np != e; np++) { if (np->has_recursive_dependency){ has_recursive = false; - /* + /* * start .RECURSIVE line with target: */ INIT_STRING_FROM_STACK(rec, rec_buf); APPEND_NAME(np, &rec, FIND_LENGTH); append_char((int) colon_char, &rec); append_char((int) space_char, &rec); - - for (lines = get_prop(np->prop,recursive_prop); + + for (lines = get_prop(np->prop,recursive_prop); lines != NULL; lines = get_prop(lines->next, recursive_prop)) { - /* + /* * if entry is already in depinfo * file or entry was not built, ignore it */ @@ -354,12 +354,12 @@ gather_recursive_deps(void) continue; has_recursive = true; lines->body.recursive.in_depinfo=true; - - /* + + /* * Write the remainder of the - * .RECURSIVE line + * .RECURSIVE line */ - APPEND_NAME(recursive_name, &rec, + APPEND_NAME(recursive_name, &rec, FIND_LENGTH); append_char((int) space_char, &rec); APPEND_NAME(lines->body.recursive.directory, @@ -368,16 +368,16 @@ gather_recursive_deps(void) APPEND_NAME(lines->body.recursive.target, &rec, FIND_LENGTH); append_char((int) space_char, &rec); - + /* Complete list of makefiles used */ - for (dp = lines->body.recursive.makefiles; - dp != NULL; + for (dp = lines->body.recursive.makefiles; + dp != NULL; dp = dp->next) { APPEND_NAME(dp->name, &rec, FIND_LENGTH); append_char((int) space_char, &rec); } - } - /* + } + /* * dump list of conditional targets, * and report recursive entry, if needed */ diff --git a/usr/src/cmd/make/bin/state.cc b/usr/src/cmd/make/bin/state.cc index 57a015077c..a7557a4946 100644 --- a/usr/src/cmd/make/bin/state.cc +++ b/usr/src/cmd/make/bin/state.cc @@ -145,22 +145,22 @@ write_state_file(int, Boolean exiting) return; } /* Lock the file for writing. */ - make_state_lockfile = getmem(strlen(make_state->string_mb) + strlen(".lock") + 1); - (void) sprintf(make_state_lockfile, - "%s.lock", - make_state->string_mb); - if (lock_err = file_lock(make_state->string_mb, - make_state_lockfile, + make_state_lockfile = getmem(strlen(make_state->string_mb) + strlen(".lock") + 1); + (void) sprintf(make_state_lockfile, + "%s.lock", + make_state->string_mb); + if (lock_err = file_lock(make_state->string_mb, + make_state_lockfile, (int *) &make_state_locked, 0)) { - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; - + /* * We need to make sure that we are not being * called by the exit handler so we don't call * it again. */ - + if (exiting) { (void) sprintf(buffer, "%s/.make.state.%d.XXXXXX", tmpdir, getpid()); report_pwd = true; @@ -187,7 +187,7 @@ write_state_file(int, Boolean exiting) if ((fd = fopen(make_state_tempfile, "w")) == NULL) { lock_err = errno; /* Save it! unlink() can change errno */ (void) unlink(make_state_lockfile); - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; make_state_locked = false; fatal(gettext("Could not open temporary statefile `%s': %s"), @@ -204,7 +204,7 @@ write_state_file(int, Boolean exiting) if ((make_state_lockfile != NULL) && make_state_locked) { (void) unlink(make_state_lockfile); - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; make_state_locked = false; } @@ -362,7 +362,7 @@ write_state_file(int, Boolean exiting) /* Delete temporary statefile */ (void) unlink(make_state_tempfile); (void) unlink(make_state_lockfile); - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; make_state_locked = false; fatal(gettext("Could not delete old statefile `%s': %s"), @@ -374,7 +374,7 @@ write_state_file(int, Boolean exiting) /* Delete temporary statefile */ (void) unlink(make_state_tempfile); (void) unlink(make_state_lockfile); - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; make_state_locked = false; fatal(gettext("Could not rename `%s' to `%s': %s"), @@ -385,7 +385,7 @@ write_state_file(int, Boolean exiting) } if ((make_state_lockfile != NULL) && make_state_locked) { (void) unlink(make_state_lockfile); - retmem_mb(make_state_lockfile); + retmem_mb(make_state_lockfile); make_state_lockfile = NULL; make_state_locked = false; } @@ -417,7 +417,7 @@ print_auto_depes(register Dependency dependency, register FILE *fd, register Boo (dependency->name == force)) { return; } - XFWRITE(dependency->name->string_mb, + XFWRITE(dependency->name->string_mb, strlen(dependency->name->string_mb), fd); /* diff --git a/usr/src/cmd/make/lib/Makefile b/usr/src/cmd/make/lib/Makefile index 59e86d4274..9b17c6f27f 100644 --- a/usr/src/cmd/make/lib/Makefile +++ b/usr/src/cmd/make/lib/Makefile @@ -20,12 +20,11 @@ all := TARGET = all install := TARGET = install clean := TARGET = clean clobber := TARGET = clobber -lint := TARGET = lint _msg := TARGET = _msg .KEEP_STATE: -all clean clobber lint install _msg: $(SUBDIRS) +all clean clobber install _msg: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/make/lib/bsd/Makefile b/usr/src/cmd/make/lib/bsd/Makefile index 63c7b4fec6..eba13c5aac 100644 --- a/usr/src/cmd/make/lib/bsd/Makefile +++ b/usr/src/cmd/make/lib/bsd/Makefile @@ -26,8 +26,6 @@ all: $(LIBS) install: all -lint: - _msg: include $(SRC)/lib/Makefile.targ diff --git a/usr/src/cmd/make/lib/makestate/Makefile b/usr/src/cmd/make/lib/makestate/Makefile index ea150d3e0f..5dbfa89bd6 100644 --- a/usr/src/cmd/make/lib/makestate/Makefile +++ b/usr/src/cmd/make/lib/makestate/Makefile @@ -19,11 +19,10 @@ all := TARGET = all install := TARGET = install clean := TARGET = clean clobber := TARGET = clobber -lint := TARGET = lint .KEEP_STATE: -all clean clobber lint install: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) _msg: diff --git a/usr/src/cmd/make/lib/makestate/Makefile.com b/usr/src/cmd/make/lib/makestate/Makefile.com index b1ecd10fc0..66c24ce6c4 100644 --- a/usr/src/cmd/make/lib/makestate/Makefile.com +++ b/usr/src/cmd/make/lib/makestate/Makefile.com @@ -13,7 +13,7 @@ LIBRARY = libmakestate.a VERS = .1 -OBJECTS = ld_file.o \ +OBJECTS = ld_file.o \ lock.o include $(SRC)/lib/Makefile.lib @@ -26,6 +26,4 @@ LDLIBS += -lc all: $(LIBS) -lint: - include $(SRC)/lib/Makefile.targ diff --git a/usr/src/cmd/make/lib/makestate/ld_file.c b/usr/src/cmd/make/lib/makestate/ld_file.c index b491b2a3fb..0a09f93f87 100644 --- a/usr/src/cmd/make/lib/makestate/ld_file.c +++ b/usr/src/cmd/make/lib/makestate/ld_file.c @@ -41,28 +41,26 @@ */ struct Stritem { - char * str; - void * next; + char *str; + void *next; }; -typedef struct Stritem Stritem; +typedef struct Stritem Stritem; -static char * depend_file = NULL; -static Stritem * list = NULL; +static char *depend_file = NULL; +static Stritem *list = NULL; - -void mk_state_init() +void +mk_state_init(void) { depend_file = getenv(SUNPRO_DEPENDENCIES); } /* mk_state_init() */ - - static void -prepend_str(Stritem **list, const char * str) +prepend_str(Stritem **list, const char *str) { - Stritem * new; - char * newstr; + Stritem *new; + char *newstr; if (!(new = calloc(1, sizeof (Stritem)))) { perror("libmakestate.so"); @@ -80,9 +78,8 @@ prepend_str(Stritem **list, const char * str) } /* prepend_str() */ - void -mk_state_collect_dep(const char * file) +mk_state_collect_dep(const char *file) { /* * SUNPRO_DEPENDENCIES wasn't set, we don't collect .make.state @@ -95,14 +92,13 @@ mk_state_collect_dep(const char * file) } /* mk_state_collect_dep() */ - void mk_state_update_exit() { - Stritem * cur; - char lockfile[MAXPATHLEN], * err, * space, * target; - FILE * ofp; - extern char * file_lock(char *, char *, int); + Stritem *cur; + char lockfile[MAXPATHLEN], *err, *space, *target; + FILE *ofp; + extern char *file_lock(char *, char *, int); if (!depend_file) return; @@ -136,18 +132,16 @@ mk_state_update_exit() } /* mk_state_update_exit() */ static void -/* LINTED static unused */ ld_support_init() { mk_state_init(); } /* ld_support_init() */ -/* ARGSUSED */ void -ld_file(const char * file, const Elf_Kind ekind, int flags, Elf *elf) +ld_file(const char *file, const Elf_Kind ekind, int flags, Elf *elf) { - if(! ((flags & LD_SUP_DERIVED) && !(flags & LD_SUP_EXTRACTED))) + if (!((flags & LD_SUP_DERIVED) && !(flags & LD_SUP_EXTRACTED))) return; mk_state_collect_dep(file); @@ -158,7 +152,7 @@ void ld_atexit(int exit_code) { if (exit_code) - return; + return; mk_state_update_exit(); @@ -168,9 +162,9 @@ ld_atexit(int exit_code) * Supporting 64-bit objects */ void -ld_file64(const char * file, const Elf_Kind ekind, int flags, Elf *elf) +ld_file64(const char *file, const Elf_Kind ekind, int flags, Elf *elf) { - if(! ((flags & LD_SUP_DERIVED) && !(flags & LD_SUP_EXTRACTED))) + if (!((flags & LD_SUP_DERIVED) && !(flags & LD_SUP_EXTRACTED))) return; mk_state_collect_dep(file); @@ -181,7 +175,7 @@ void ld_atexit64(int exit_code) { if (exit_code) - return; + return; mk_state_update_exit(); diff --git a/usr/src/cmd/make/lib/mksh/Makefile b/usr/src/cmd/make/lib/mksh/Makefile index bacec9b9dc..de2fc14199 100644 --- a/usr/src/cmd/make/lib/mksh/Makefile +++ b/usr/src/cmd/make/lib/mksh/Makefile @@ -42,8 +42,6 @@ all: $(LIBS) install: all -lint: - $(POFILE): $(POFILES) $(CAT) $(POFILES) > $@ diff --git a/usr/src/cmd/make/lib/mksh/globals.cc b/usr/src/cmd/make/lib/mksh/globals.cc index 255985e5a2..2104ada989 100644 --- a/usr/src/cmd/make/lib/mksh/globals.cc +++ b/usr/src/cmd/make/lib/mksh/globals.cc @@ -83,9 +83,6 @@ Boolean dollarget_seen; Boolean dollarless_flag; Name dollarless_value; Envvar envvar; -#ifdef lint -char **environ; -#endif int exit_status; wchar_t *file_being_read; /* Variable gnu_style=true if env. var. SUN_MAKE_COMPAT_MODE=GNU (RFE 4866328) */ diff --git a/usr/src/cmd/make/lib/vroot/Makefile b/usr/src/cmd/make/lib/vroot/Makefile index af580f47b6..0a898f3919 100644 --- a/usr/src/cmd/make/lib/vroot/Makefile +++ b/usr/src/cmd/make/lib/vroot/Makefile @@ -55,8 +55,6 @@ all: $(LIBS) install: all -lint: - $(POFILE): $(POFILES) $(CAT) $(POFILES) > $@ |