Patch for kdevelop-3.5.5

Thomas Klausner tk at giga.or.at
Thu Sep 3 11:57:42 UTC 2009


On Wed, Aug 19, 2009 at 10:58:33AM +0200, Andreas Pakulat wrote:
> ../../../vcs/clearcase/clearcasemanipulator.cpp: In member function
> 'VCSFileInfoMap* ClearcaseManipulator::retreiveFilesInfos(const QString&)':
> ../../../vcs/clearcase/clearcasemanipulator.cpp:98: error: 'get_line' was
> not declared in this scope
> 
> My man get_line also comes up empty, while man getline shows me the
> function information. So I guess libc2.9 is not POSIX2008 compatible (no
> idea about other versions of libc).

You're right, I misinterpreted the logic and broke it.

The attached patch should work.
(getline was added in NetBSD-current around 5.99.15, that's why I had
to include sys/param.h to get the version number and change the check.
It should be a configure test instead, of course...)

Thanks,
 Thomas

P.S.: Why do let the getline replacement function return int and not
ssize_t, like the original one?
-------------- next part --------------
$NetBSD: patch-ai,v 1.6 2009/08/15 17:04:52 wiz Exp $

--- vcs/clearcase/clearcasemanipulator.cpp.orig	2008-03-30 00:56:29.000000000 +0000
+++ vcs/clearcase/clearcasemanipulator.cpp
@@ -19,8 +19,11 @@
 #include <stdlib.h>
 #include <libgen.h>
 #include <errno.h>
+#ifdef __NetBSD__
+#include <sys/param.h>
+#endif
 
-#if defined(Q_OS_MACX) || defined(MACOSX) || defined(Q_OS_SOLARIS) || defined(Q_OS_FREEBSD)
+#if defined(Q_OS_MACX) || defined(MACOSX) || defined(Q_OS_SOLARIS) || defined(Q_OS_FREEBSD) || (defined(__NetBSD__) && (__NetBSD_Version__ < 599001500)) || defined(__DragonFly__)
 //this function is taken from GNU libc
 //it does not exist on macos
 int getline(char **lineptr, size_t *n, FILE *stream)


More information about the KDevelop-devel mailing list