[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdelibs/kdecore
From:       Mantia Andras <amantia () freemail ! hu>
Date:       2002-12-09 15:49:25
[Download RAW message or body]

 This commit breaks the compilation on SuSE 8.0, when kdelibs is configured 
with --enable-dnotify, altough I couldn't figure out why.  

The error message is: 

In file included from \
                /home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:61:
                
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch_p.h:129: type \
                specifier omitted for parameter
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch_p.h:129: parse \
                error before `*'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch_p.h:130: type \
                specifier omitted for parameter
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch_p.h:130: parse \
                error before `*'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:82: type \
                specifier omitted for parameter
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:82: parse \
                error before `*'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp: In function \
                `static void KDirWatchPrivate::dnotify_handler(...)':
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:88: `si' \
                undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:88: (Each \
                undeclared identifier is reported only once
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:88: for each \
                function it appears in.)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp: At top \
                level:
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:108: type \
                specifier omitted for parameter
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:108: parse \
                error before `*'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp: In function \
                `static void KDirWatchPrivate::dnotify_sigio_handler(...)':
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:125: `struct \
                sigaction' has no member named `sa_sigaction'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:126: `struct \
                sigaction' has no member named `sa_sigaction'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:126: `sig' \
                undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:126: `p' \
                undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp: In method \
                `KDirWatchPrivate::KDirWatchPrivate()':
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:219: `struct \
                sigaction' has no member named `sa_sigaction'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:229: `struct \
                sigaction' has no member named `sa_sigaction'
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp: In method \
                `bool KDirWatchPrivate::useDNotify(KDirWatchPrivate::Entry *)':
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:442: \
                `DN_DELETE' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:442: \
                `DN_CREATE' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:442: \
                `DN_RENAME' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:442: \
                `DN_MULTISHOT' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:445: \
                `DN_MODIFY' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:445: \
                `DN_ATTRIB' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:447: \
                `F_SETSIG' undeclared (first use this function)
/home/andris/cvs-developement/head/kde-cvs/kdelibs/kio/kio/kdirwatch.cpp:448: \
`F_NOTIFY' undeclared (first use this function)


On 2002. December 08., Sunday 19:01, Dirk Mueller wrote:
> CVS commit by mueller:
> 
> adding strlcpy / strlcat implementation.
> for reference see: http://www.courtesan.com/todd/papers/strlcpy.html
> 
> 
> M +20 -0     configure.in.in   1.27
> M +33 -0     fakes.c   1.10
> 
> 
> --- kdelibs/kdecore/configure.in.in   1.27:
> @@ -283,2 +283,22 @@ AC_TRY_LINK(dnl
> )
> 
> +AH_VERBATIM(HAVE_STRLCPY,[
> +
> +#ifndef HAVE_STRLCPY
> +#include <sys/types.h>
> +#ifdef __cplusplus
> +extern "C" size_t strlcpy(char*,const char*,size_t) throw();
> +#else
> +size_t strlcpy(char*,const char*,size_t);
> +#endif
> +#endif
> +
> +#ifndef HAVE_STRLCAT
> +#include <sys/types.h>
> +#ifdef __cplusplus
> +extern "C" size_t strlcat(char*,const char*,size_t) throw();
> +#else
> +size_t strlcat(char*,const char*,size_t);
> +#endif
> +#endif
> +])
> --- kdelibs/kdecore/fakes.c   1.10:
> @@ -285,2 +285,35 @@ int revoke(const char *tty)
> }
> #endif
> +
> +#ifndef HAVE_STRLCPY
> +size_t strlcpy(char* d, const char* s, size_t bufsize)
> +{
> +    size_t len = strlen(s);
> +    size_t ret = len;
> +
> +    if(bufsize <= 0) return 0;
> +    if(len >= bufsize) len = bufsize-1;
> +    memcpy(d, s, len);
> +    d[len] = '\0';
> +    return ret;
> +}
> +#endif
> +
> +#ifndef HAVE_STRLCAT
> +size_t strlcat(char* d, const char* s, size_t bufsize)
> +{
> +    size_t len1 = strlen(d);
> +    size_t len2 = strlen(s);
> +    size_t ret = len1 + len2;
> +
> +    if(ret >= bufsize)
> +        len2 = bufsize - len1 - 1;
> +    if(len2 > 0) {
> +        memcpy(d+len1,s,len2);
> +        d[len1+len2] = '\0';
> +    }
> +    return ret;
> +}
> +#endif
> +
> +


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic