snprintf() in Solaris 9 and older does not work for length=0 and buffer=NULL as a way to count the string size. For Solaris, if a negative result is returned fall back to a large buffer (1024 bytes) instead of a FATAL() failure.