I am compiling top 3.5 under Digital Unix 4.0F and get an error
That funcyion id in lib db, is it ok to add -l db to the Makefile? After that it compiles, but it does not display any info when running, only column titles. I do not know if it is related to "snprintf" problem.
Does top run under Digital Unix 4.0F?
Thanks in advance for any help.
Yes top is supposed to support Digital Unix 4.0F. But 3.5 introduced the use of snprintf in a few places. I will look in to providing a replacement function for your system and for others that don't have snprintf. I'm not sure why -ldb didn't work, unless its snprintf isn't compatible with posix or perhaps it has another conflicting function.
Sorry that I wasn't able to reply sooner.
If you want to try some experimenting, here's something you can do. Retrieve the portable snprintf package (version 2.2) from http://www.ijs.si/software/snprintf/ . Compile it to make snprintf.o, then link that .o in to top as the last .o but *before* any of the -l specifiers (i.e.: before -lmld). You may have to tweak the #define statements in snprintf.c to get it to compile correctly. Or you can try using the autoconf stuff that he supplies with it. I would be interested to know if this works.
I don't know if it's still of interest but:
Rsync (rsync.samba.org) comes with a nice snprintf replacement.
For Digital Unix 4.0, HP provides snprintf in the Solaris compatibility libraries (http://www.tru64unix.compaq.com/complibs) which come with sources.
top 3.5 compiles and runs fine with both (tested on DS10 with Tru64 4.0F).
By the way, the use of snprintf from db is not to be recommended for vulnerability reasons.
Log in to post a comment.