News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by sramsay on Tuesday April 14, 2020 @02:48PM (#22869882)
strdup seems like a perfect example of "standardizing existing practice." And it has never struck me as running against the spirit of C.
Re:Tell HN: C Experts Panel – Ask us anything about C by DougGwyn on Tuesday April 14, 2020 @06:20PM (#22872197)
In fact I proposed strdup on a few occasions, but it wasn't adopted. It seems that they didn't like for standard library functions to use malloc. POSIX.1 specifies strdup.