diff options
author | Paul Smith <psmith@gnu.org> | 2001-05-21 06:16:00 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2001-05-21 06:16:00 +0000 |
commit | 5d582d4ba06495a95854c45828399f7edfe51a50 (patch) | |
tree | 55e521f4b74f6903878a5563095387685f0e4b78 | |
parent | 8f2b1e2c7c1ced20354dcbcd08942256cf0dade0 (diff) | |
download | gunmake-5d582d4ba06495a95854c45828399f7edfe51a50.tar.gz |
Some VMS fixes sent by John Fowler.
Fix: make flags on some lines of define/endef don't affect other lines
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | arscan.c | 12 | ||||
-rw-r--r-- | commands.c | 2 | ||||
-rw-r--r-- | function.c | 2 | ||||
-rw-r--r-- | job.c | 12 | ||||
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/scripts/variables/flavors | 4 |
7 files changed, 40 insertions, 10 deletions
@@ -1,3 +1,16 @@ +2001-05-02 Paul D. Smith <psmith@gnu.org> + + * job.c (start_job_command): Don't add define/endef per-line flags + to the top-level flags setting. + +2001-04-03 Paul D. Smith <psmith@gnu.org> + + * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low + bit on error, so check for odd return values, not non-0 return + values. + (VMS_get_member_info): Calculate the timezone differences correctly. + Reported by John Fowler <jfowler@nyx.net>. + 2001-01-17 Paul D. Smith <psmith@gnu.org> * variable.c (lookup_variable) [VMS]: When getting values from the @@ -66,7 +66,7 @@ VMS_get_member_info (module, rfa) status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc, &bufdesc.dsc$w_length, 0); - if (! status) + if (! (status & 1)) { error (NILF, _("lbr$set_module failed to extract module info, status = %d"), status); @@ -79,7 +79,11 @@ VMS_get_member_info (module, rfa) mhd = (struct mhddef *) filename; #ifdef __DECC - val = decc$fix_time (&mhd->mhd$l_datim); + /* John Fowler <jfowler@nyx.net> writes this is needed in his environment, + * but that decc$fix_time() isn't documented to work this way. Let me + * know if this causes problems in other VMS environments. + */ + val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600; #endif for (i = 0; i < module->dsc$w_length; i++) @@ -150,7 +154,7 @@ ar_scan (archive, function, arg) status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0); - if (! status) + if (! (status & 1)) { error (NILF, _("lbr$ini_control failed with status = %d"),status); return -2; @@ -161,7 +165,7 @@ ar_scan (archive, function, arg) status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0); - if (! status) + if (! (status & 1)) { error (NILF, _("unable to open library `%s' to lookup member `%s'"), archive, (char *)arg); @@ -227,7 +227,7 @@ set_file_variables (file) } /* Chop CMDS up into individual command lines if necessary. - Also set the `lines_flag' and `any_recurse' members. */ + Also set the `lines_flags' and `any_recurse' members. */ void chop_commands (cmds) @@ -128,7 +128,7 @@ patsubst_expand (o, text, pattern, replace, pattern_percent, replace_percent) unsigned int pattern_prepercent_len, pattern_postpercent_len; unsigned int replace_prepercent_len, replace_postpercent_len = 0; char *t; - int len; + unsigned int len; int doneany = 0; /* We call find_percent on REPLACE before checking PATTERN so that REPLACE @@ -895,8 +895,14 @@ start_job_command (child) ++p; } - /* Update the file's command flags with any new ones we found. */ - child->file->cmds->lines_flags[child->command_line - 1] |= flags; + /* Update the file's command flags with any new ones we found. We only + keep the COMMANDS_RECURSE setting. Even this isn't 100% correct; we are + now marking more commands recursive than should be in the case of + multiline define/endef scripts where only one line is marked "+". In + order to really fix this, we'll have to keep a lines_flags for every + actual line, after expansion. */ + child->file->cmds->lines_flags[child->command_line - 1] + |= flags & COMMANDS_RECURSE; /* Figure out an argument list from this command line. */ @@ -1580,6 +1586,8 @@ load_too_high () } user_access (); + DB (DB_JOBS, ("Current system load = %f (max requested = %f)\n", + load, max_load_average)); return load >= max_load_average; #endif } diff --git a/tests/ChangeLog b/tests/ChangeLog index 2a19bcb..a692f43 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2001-05-02 Paul D. Smith <psmith@gnu.org> + + * scripts/variables/flavors: Test define/endef scripts where only + one of the command lines is quiet. + 2000-06-22 Paul D. Smith <psmith@gnu.org> * scripts/options/dash-q: New file; test the -q option. Includes diff --git a/tests/scripts/variables/flavors b/tests/scripts/variables/flavors index 7642636..02dca0b 100644 --- a/tests/scripts/variables/flavors +++ b/tests/scripts/variables/flavors @@ -28,7 +28,7 @@ next: ; @echo $x$(space)$y define multi @echo hi -@echo there +echo there endef ifdef BOGUS @@ -47,7 +47,7 @@ close(MAKEFILE); # ------- &run_make_with_options($makefile, "", &get_logfile); -$answer = "hi\nthere\nHello\n"; +$answer = "hi\necho there\nthere\nHello\n"; &compare_output($answer, &get_logfile(1)); # TEST #2 |