|
From: Eric L. G. <er...@ba...> - 2001-07-29 02:08:47
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 28 Jul 2001, Richard Fish wrote:
> Does anybody have any clue why the glibc folks define functions in the
> headers that are guaranteed to fail? I don't....
>
> Anyway, this should work:
>
> AC_CACHE_CHECK(for working setlogin, tc_cv_have_setlogin, [
> AC_TRY_RUN([
> #include <unistd.h>
> int main() { return setlogin("fooey"); }
> ], tc_cv_have_setlogin="yes", tc_cv_have_setlogin="no", tc_cv_have_setlogin="yes")
> ])
>
> if test ${tc_cv_have_setlogin} = "yes"; then
> AC_DEFINE(HAVE_SETLOGIN)
> fi
Sorry, that always succeeds. The glibc library does have a 'setlogin'
function in it. It just always fails (returns -1) when called, as well as
printing out a nifty warning at compile time. I will put the above into my
configure.in and put the appropriate #ifs, but it won't detect the
glibc situation.
All I have to say is that glibc is wrong. If the function is not
implemented, then don't include it, darn it! But, I have to deal
with whatever crapware Red Hat slung onto a disk, sigh :-(.
Eric Lee Green GnuPG public key at http://badtux.org/eric/eric.gpg
mailto:er...@ba... Web: http://www.badtux.org
"Emacs is a nice OS, but a weird editor." -- M.J. Blom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7Y2y63DrrK1kMA04RAv4IAJ4tqV7dDGRlq5iOANeKNJJ+mPHcTgCffQId
V1e39PMkFiTPAoWkdfx65fQ=
=MMnP
-----END PGP SIGNATURE-----
|