diff options
author | Andy Wingo <wingo@pobox.com> | 2021-01-20 21:52:54 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-01-20 23:03:56 +0100 |
commit | a91b95cca2d397c84f8b9bbd602d40209a7092ce (patch) | |
tree | 2c286a291f5a2b812d6e216be10936f2709d59cf /lib/getlogin.c | |
parent | 758b31994cff582c7e8785b4cc2240dbf3573837 (diff) | |
download | guile-a91b95cca2d397c84f8b9bbd602d40209a7092ce.tar.gz |
Update Gnulib to v0.1-4379-g2ef5a9b4b
Also bump required autoconf version to 2.64, as required by Gnulib.
Diffstat (limited to 'lib/getlogin.c')
-rw-r--r-- | lib/getlogin.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/getlogin.c b/lib/getlogin.c index 47c586a62..4a7099450 100644 --- a/lib/getlogin.c +++ b/lib/getlogin.c @@ -1,6 +1,6 @@ /* Provide a working getlogin for systems which lack it. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,7 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Bruno Haible, 2010. */ @@ -22,15 +22,18 @@ /* Specification. */ #include <unistd.h> -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include <windows.h> +/* Don't assume that UNICODE is not defined. */ +# undef GetUserName +# define GetUserName GetUserNameA #endif char * getlogin (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ static char login_name[1024]; DWORD sz = sizeof (login_name); |