![]() |
porting GNU tdestroy() function to SPARC Solaris
The GNU tdestroy() function only exists in Linux. Currently I have to port it to SPARC Solaris 9. It seems that tdestroy() can't be implemented with tsearch/tfind/tdelete/twalk combinations. I will be shocked if this is true because it will be ridiculous for the API function designers if there is no way to free all the resources of a tree in Solaris OS. Do I have to re-write the whole bunch of tree manipulation functions from scratch? :(
http://www.planetpenguin.de/manpage-3-tdestroy.3.html |
I don't know anything about slowaris, but you could look in the glibc sources (but don't forget, this is GPL code)
ie.. glibc-2.3.2/misc/tsearch.c : Code:
/* The standardized functions miss an important functionality: the |
Thanks. That's the quick solution.
|
Well.. if rather fancy a challenge, you could always do this:
Code:
objdump -d /lib/tls/libc.so.6 |sed -n -e '/<tdestroy>:/,/^$/ p' |
| All times are GMT +8. The time now is 13:30. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX