diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2007-06-25 17:21:46 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2007-06-25 17:21:46 +0000 |
commit | c861db6620d5f4bdac9f361b678697ea7350dbd7 (patch) | |
tree | b11fa18b32f34018066a55df97a91e68a33269d3 /libgfortran | |
parent | d17a3b1b437d55d2b5f2e8e6589e4fd18e505a3b (diff) | |
download | gcc-c861db6620d5f4bdac9f361b678697ea7350dbd7.zip gcc-c861db6620d5f4bdac9f361b678697ea7350dbd7.tar.gz gcc-c861db6620d5f4bdac9f361b678697ea7350dbd7.tar.bz2 |
re PR libfortran/32495 (static declaration of 'strcasestr' follows non-static declaration)
PR libfortran/32495
* runtime/backtrace.c (local_strcasestr): Rename from strcasestr.
(show_backtrace): Rename strcasestr to local_strcasestr.
From-SVN: r125998
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/runtime/backtrace.c | 16 |
2 files changed, 15 insertions, 7 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 55fe2e5..fc8e1ed 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2007-06-24 Adam Nemet <anemet@caviumnetworks.com> + + PR libfortran/32495 + * runtime/backtrace.c (local_strcasestr): Rename from strcasestr. + (show_backtrace): Rename strcasestr to local_strcasestr. + 2007-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/32456 diff --git a/libgfortran/runtime/backtrace.c b/libgfortran/runtime/backtrace.c index 3577c64..684ac00 100644 --- a/libgfortran/runtime/backtrace.c +++ b/libgfortran/runtime/backtrace.c @@ -68,11 +68,13 @@ Boston, MA 02110-1301, USA. */ -#ifndef HAVE_STRCASESTR -#define HAVE_STRCASESTR 1 static char * -strcasestr (const char *s1, const char *s2) +local_strcasestr (const char *s1, const char *s2) { +#ifdef HAVE_STRCASESTR + return strcasestr (s1, s2); +#else + const char *p = s1; const size_t len = strlen (s2); const char u = *s2, v = isupper((int) *s2) ? tolower((int) *s2) @@ -88,8 +90,8 @@ strcasestr (const char *s1, const char *s2) if (strncasecmp (p, s2, len) == 0) return (char *)p; } -} #endif +} #define CAN_FORK (defined(HAVE_FORK) && defined(HAVE_EXECVP) \ && defined(HAVE_WAIT)) @@ -224,9 +226,9 @@ show_backtrace (void) || strcmp (func, "main") == 0 || strcmp (func, "_start") == 0) continue; - if (strcasestr (str[i], "libgfortran.so") != NULL - || strcasestr (str[i], "libgfortran.dylib") != NULL - || strcasestr (str[i], "libgfortran.a") != NULL) + if (local_strcasestr (str[i], "libgfortran.so") != NULL + || local_strcasestr (str[i], "libgfortran.dylib") != NULL + || local_strcasestr (str[i], "libgfortran.a") != NULL) continue; /* If we only have the address, use the glibc backtrace. */ |