1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

provide getlogin declaration if needed.

* configure.ac: Check for getlogin decl.
* libguile/posix.c: Declare getlogin if needed.
This commit is contained in:
Andy Wingo 2013-03-09 23:55:01 +01:00
parent aa59904eae
commit 94c53e0601
2 changed files with 8 additions and 1 deletions

View file

@ -919,7 +919,7 @@ AC_DEFUN([GUILE_FUNC_DECLARED], [
GUILE_FUNC_DECLARED(sleep, unistd.h)
GUILE_FUNC_DECLARED(usleep, unistd.h)
AC_CHECK_DECLS([alarm])
AC_CHECK_DECLS([getlogin alarm])
AC_CHECK_DECLS([strptime],,,
[#define _GNU_SOURCE /* ask glibc to give strptime prototype */

View file

@ -155,6 +155,13 @@
int sethostname (char *name, size_t namelen);
#endif
#if defined HAVE_GETLOGIN && !HAVE_DECL_GETLOGIN
/* MinGW doesn't supply this decl; see
http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00030.html for more
details. */
char *getlogin (void);
#endif
/* On NextStep, <utime.h> doesn't define struct utime, unless we
#define _POSIX_SOURCE before #including it. I think this is less
of a kludge than defining struct utimbuf ourselves. */