PR bootstrap/63853
gcc/
* gcc.c (handle_foffload_option): Replace strchrnul with strchr.
* lto-wrapper.c (parse_env_var, append_offload_options): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217524
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-11-13 Dominique Dhumieres <dominiq@lps.ens.fr>
+
+ PR bootstrap/63853
+ * gcc.c (handle_foffload_option): Replace strchrnul with strchr.
+ * lto-wrapper.c (parse_env_var, append_offload_options): Likewise.
+
2014-11-13 Alan Lawrence <alan.lawrence@arm.com>
* fold-const.c (const_binop): Remove code handling VEC_RSHIFT_EXPR.
if (arg[0] == '-')
return;
- end = strchrnul (arg, '=');
+ end = strchr (arg, '=');
+ if (end == NULL)
+ end = strchr (arg, '\0');
cur = arg;
while (cur < end)
{
- next = strchrnul (cur, ',');
+ next = strchr (cur, ',');
+ if (next == NULL)
+ next = strchr (cur, '\0');
next = (next > end) ? end : next;
target = XNEWVEC (char, next - cur + 1);
c = OFFLOAD_TARGETS;
while (c)
{
- n = strchrnul (c, ',');
+ n = strchr (c, ',');
+ if (n == NULL)
+ n = strchr (c, '\0');
if (strlen (target) == (size_t) (n - c)
&& strncmp (target, c, n - c) == 0)
c = offload_targets;
do
{
- n = strchrnul (c, ':');
+ n = strchr (c, ':');
+ if (n == NULL)
+ n = strchr (c, '\0');
if (strlen (target) == (size_t) (n - c)
&& strncmp (c, target, n - c) == 0)
values = (char**) xmalloc (num * sizeof (char*));
curval = str;
- nextval = strchrnul (curval, ':');
+ nextval = strchr (curval, ':');
+ if (nextval == NULL)
+ nextval = strchr (curval, '\0');
int append_len = append ? strlen (append) : 0;
for (i = 0; i < num; i++)
if (append)
strcat (values[i], append);
curval = nextval + 1;
- nextval = strchrnul (curval, ':');
+ nextval = strchr (curval, ':');
+ if (nextval == NULL)
+ nextval = strchr (curval, '\0');
}
*pvalues = values;
return num;
while (cur < opts)
{
- next = strchrnul (cur, ',');
+ next = strchr (cur, ',');
+ if (next == NULL)
+ next = strchr (cur, '\0');
next = (next > opts) ? opts : next;
if (strlen (target) == (size_t) (next - cur)