Summary: | strlcpy in config.h conflicts with the one in string.h on Solaris | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Yuri Khotyaintsev <yuri> |
Component: | general | Assignee: | Stephan Kulow <coolo> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: |
Description
Yuri Khotyaintsev
2002-12-10 19:45:58 UTC
Subject: kde-common/admin CVS commit by mueller: corrected strlcpy/strlcat configure check CCMAIL: 51733-done@bugs.kde.org M +29 -23 acinclude.m4.in 2.310 --- kde-common/admin/acinclude.m4.in #2.309:2.310 @@ -2002,5 +2002,5 @@ else case "$1" in - setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke) + setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat) kde_cv_proto_$1="yes - in libkdefakes" ;; @@ -2177,4 +2177,29 @@ ]) +AC_DEFUN(AC_CHECK_STRLCPY, +[ + KDE_CHECK_FUNC_EXT(strlcpy, [ +#include <string.h> +], +[ char buf[20]; + strlcpy(buf, "KDE function test", sizeof(buf)); +], + [unsigned int strlcpy(char*, const char*, unsigned int)], + [STRLCPY]) +]) + +AC_DEFUN(AC_CHECK_STRLCAT, +[ + KDE_CHECK_FUNC_EXT(strlcat, [ +#include <string.h> +], +[ char buf[20]; + buf[0]='\0'; + strlat(buf, "KDE function test", sizeof(buf)); +], + [unsigned int strlcat(char*, const char*, unsigned int)], + [STRLCAT]) +]) + AC_DEFUN(AC_FIND_GIF, [AC_MSG_CHECKING([for giflib]) @@ -5240,5 +5265,6 @@ AC_DEFUN(KDE_CHECK_STRLCPY, [ - AC_CHECK_FUNCS(strlcpy strlcat) + AC_CHECK_STRLCPY + AC_CHECK_STRLCAT AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(unsigned int) @@ -5246,5 +5272,5 @@ AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned int)]) AC_TRY_COMPILE(,[ - #if SIZEOF_SIZE_T != SIZEOF_INT + #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT choke me #endif @@ -5256,23 +5282,3 @@ ]) ]) - - AH_VERBATIM(_HAVE_STRLCPY,[ -#ifndef HAVE_STRLCPY - #ifdef __cplusplus -extern "C" unsigned int strlcpy(char*,const char*,unsigned int) throw(); -#else -unsigned int strlcpy(char*,const char*,unsigned int); -#endif -#endif - ]) - - AH_VERBATIM(_HAVE_STRLCAT,[ -#ifndef HAVE_STRLCAT -#ifdef __cplusplus -extern "C" unsigned int strlcat(char*,const char*,unsigned int) throw(); -#else -unsigned int strlcat(char*,const char*,unsigned int); -#endif -#endif -]) ]) I started compiling on solaris 8, gc3.1 this morning and this bug appears again in kde31-rc5a -:( |