custom getline(3) for Sun compiler

My act of charity for the day:
keeping the Sun compiler alive
by adding more custom code
and senseless coupling between
components.