getlogin() and cuserid() do very different things, getlogin() is POSIX, while cuserid() is not (it was removed in the 1990 revision).