History behind catgets (POSIX spec), and propagating "const" qualifiers.

Carlos O'Donell carlos@systemhalted.org
Thu Jul 28 16:41:00 GMT 2005


libc-alpha,

WRT POSIX:

Does anyone know any history behind catgets, and why it returns a "char
*" as opposed to returning say "const char *". It it usefull to make
the internal buffer accessible for user programs to modify?

While I'm building and working on NPTL stuff for hppa, I'm also
reviewing a handful of the "cast discards qualifiers from pointer target
type." As the compiler gets smarter I'm sure it's going to do a better
job of propagating optimizations knowing that things are truly "const."

Cheers,
Carlos.



More information about the Libc-alpha mailing list