Mercurial > hg > octave-kai > gnulib-hg
changeset 13503:d352958def8f
strtok_r: Avoid triggering bug in AIX 7.1 xlc compiler.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 30 Jul 2010 21:37:36 +0200 |
parents | 0f27e46d4392 |
children | 43d4c2eaeda9 |
files | ChangeLog m4/strtok_r.m4 |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-07-30 Bruno Haible <bruno@clisp.org> + + strtok_r: Avoid triggering bug in AIX 7.1 xlc compiler. + * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't cast an invalid address to + a 'char *'. + Reported by Rainer Tammer. + 2010-07-30 Bruno Haible <bruno@clisp.org> unlink: Update regarding AIX.
--- a/m4/strtok_r.m4 +++ b/m4/strtok_r.m4 @@ -1,4 +1,4 @@ -# strtok_r.m4 serial 10 +# strtok_r.m4 serial 11 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -30,8 +30,9 @@ #include <stdlib.h> #include <string.h> ]], - [[char delimiters[] = "xxxxxxxx"; - char *save_ptr = (char *) 0xd0d0; + [[static const char dummy[] = "\177\01a"; + char delimiters[] = "xxxxxxxx"; + char *save_ptr = (char *) dummy; strtok_r (delimiters, "x", &save_ptr); strtok_r (NULL, "x", &save_ptr); return 0;