Summary: | Compile error on Solaris 8 - vcs/clearcase/clearcasemanipulator.cpp uses getline which is not available | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Steve Evans <stevee> |
Component: | VCS: Clearcase | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.4.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Enable provided getline implementation on Solaris |
Description
Steve Evans
2007-01-30 17:56:11 UTC
Can you provide a patch? The clearcase support is pretty much unmaintained, AFAIK and I doubt any of the core devs has access to Solaris machines. So unless you can come up with a patch, I guess this won't be fixed in kdevelop3. Of course you can easily disable clearcase support via configure --disable-clearcase OK, I'll take the easy way out then and disable clearcase support as I don't need it. Someone must have done some work on clearcase, because version 3.3.6 of kdevelop doesn't have the problem. In fact the source file clearcasemanipulator.cpp doesn't exist in that version :-) uhm, seems you're right. Alexander Dymo did some work during spring last year. I'll ping him later today on IRC and point him to this bugreport, maybe he can solve it... Actually we have its getline implementation in the code and it's used when MACOSX is defined. So you could either call compiler with -DMACOSX or remove defines surrounding getline definition in clearcasemanipulator.cpp#26. PS: define is called MACOSX because KDevelop was tested only on Linux and MacOS ;) There might be a memory leak using getline since the buffer is allocated on the heap. I don't see it getting freed anywhere unless somehow QString frees it. In looking at the getline code I also am not sure what the behavior is on different platforms when calling realloc with a pointer on the stack. I could see this possibly causing a crash since this behavior is not described in the Solaris man page. Rather than calling realloc, why not use malloc/calloc? Also, the man page for getline says it includes the EOL character which the source is removing. This problem causes a build failure on OpenSolaris (Solaris Express B78) using Gcc 3.4.3. The Q_OS_SOLARIS predefined macro from QT can be used in the preprocessor check. Patch attached. Created attachment 23235 [details]
Enable provided getline implementation on Solaris
SVN commit 765689 by apaku: Use our own getline also on Solaris which misses it as well. BUG:140907 M +1 -1 clearcasemanipulator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=765689 Getline is pretty much a glibc-exclusive. It would be best to avoid it altogether. In any case, please add Q_OS_FREEBSD to that #ifdef as well please. SVN commit 782252 by apaku: Also add Q_OS_FREEBSD as requested from Michael Nottebrock. CCBUG:140907 M +1 -1 clearcasemanipulator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=782252 |