Re-included strdupnew's implementation (Marcel Mettes)
Authored by: fbb 2011-11-07
Parent: [r599]
Child: [r601]