summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2007-05-09 02:01:53 +0000
committerPaul Smith <psmith@gnu.org>2007-05-09 02:01:53 +0000
commit52ebc531ce68b369594267a716e93f53720c8f1b (patch)
tree3404b1e3f513b67dd501f252d2aea327c06ca03b /job.c
parent891409f2126f8abfd64f28fe82f546d716c671e2 (diff)
downloadgunmake-52ebc531ce68b369594267a716e93f53720c8f1b.tar.gz
Fix Savannah bug #19656: rationalize our use of case-insensitive string
comparison functions to always use POSIX strcasecmp(). For non-POSIX systems that use other functions (strcmpi or stricmp) use a macro to alias strcasecmp to those. If we can't find any of them (VMS, plus whatever UNIX doesn't have them) then define our own version in misc.c.
Diffstat (limited to 'job.c')
-rw-r--r--job.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/job.c b/job.c
index a8c6754..52af31a 100644
--- a/job.c
+++ b/job.c
@@ -358,7 +358,7 @@ _is_unixy_shell (const char *path)
i = 0;
while (known_os2shells[i] != NULL) {
- if (stricmp (name, known_os2shells[i]) == 0) /* strcasecmp() */
+ if (strcasecmp (name, known_os2shells[i]) == 0)
return 0; /* not a unix shell */
i++;
}
@@ -494,7 +494,7 @@ reap_children (int block, int err)
pre-POSIX systems. We keep the count only because... it's there...
The test and decrement are not atomic; if it is compiled into:
- register = dead_children - 1;
+ register = dead_children - 1;
dead_children = register;
a SIGCHLD could come between the two instructions.
child_handler increments dead_children.
@@ -2360,7 +2360,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
goto slow;
#else /* not WINDOWS32 */
#if defined (__MSDOS__) || defined (__EMX__)
- else if (stricmp (shell, default_shell))
+ else if (strcasecmp (shell, default_shell))
{
extern int _is_unixy_shell (const char *_path);