Bug 157099 - strdup not availabe in some C++ environments
Summary: strdup not availabe in some C++ environments
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal (vote)
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-01 20:33 UTC by Tim Mooney
Modified: 2008-02-04 04:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mooney 2008-02-01 20:33:34 UTC
Version:           1.4 (using KDE 4.0.0DevelDevelKDE 1.2)
Installed from:    Compiled From SourcesCompiled From SourcesCompiled From SourcesCompiled From Sources
Compiler:          Solaris Workshop 12 CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
OS:                Solaris

I'm attempting to build taglib-1.4 on x86_64-sun-solaris2.10, using the latest version
(12) of the Workshop compiler suite from Sun.  My system is completely up to date with patches.

Since strdup() wasn't a standard C function when the last revision of the C++ specification was finalized, it's not available in some environments, including the Solaris 10 environment.

It should be possible to detect whether std::strdup is available via configure, and use something like AC_REPLACE_FUNCS to provide an internal version of strdup if it's not available in the OS, though.

If I go to the work of doing the configure test and providing the patch, is there a reasonable chance that it will be included in some future version of taglib?
Comment 1 Urs Wolfer 2008-02-01 21:46:15 UTC
If you provide a patch, the chance that it gets included in a future release is pretty high :)
Comment 2 Scott Wheeler 2008-02-02 00:26:43 UTC
Actually I think I'm going to remove that code anyway and just switch to using a std::string instead (for completely different reasons).  That's one of the last things on my TODO list before releasing 1.5 (which will almost certainly happen this weekend).
Comment 3 Tim Mooney 2008-02-02 01:00:17 UTC
Thanks Scott, that's great news.

I have a few other (easier) build issues with taglib too, but the strdup was
the most difficult of them.  I'll do my best to open "bug" reports for each of them this weekend and include my patch, and you can evaluate and decide if the patch is generally useful or if I should rework.
Comment 4 Scott Wheeler 2008-02-04 04:29:01 UTC
SVN commit 770581 by wheeler:

Less code, less ifdefs, should compile on Solaris.  I knocked out Win 9x support
on the way since it simplified things, and, well, I don't care about supporting
Windows releases that have been outdated for 7 years.

BUG:157099


 M  +41 -72    tfile.cpp  
 M  +7 -7      tfile.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=770581