]> Savannah Git Hosting - gnulib.git/commitdiff
getlogin_r tests: Port to mingw.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 10:02:41 +0000 (11:02 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 11:06:04 +0000 (12:06 +0100)
* tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows.

ChangeLog
tests/test-getlogin_r.c

index bd5ef81cc7a5edf270ac914050be66130152d04a..c8bce8f8849a47256c229a5af999b50b4ca3357e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-17  Bruno Haible  <bruno@clisp.org>
+
+       getlogin_r tests: Port to mingw.
+       * tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows. Fixes
+       regression introduced on 2014-05-19.
+
 2016-12-17  Bruno Haible  <bruno@clisp.org>
 
        getlogin: Port to newer mingw.
index 94e7ec72625098bf17b644b872f743b60597c976..7104d6ade73c7e18d5069287f675552d4fb3e906 100644 (file)
@@ -28,7 +28,9 @@ SIGNATURE_CHECK (getlogin_r, int, (char *, size_t));
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <pwd.h>
+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+# include <pwd.h>
+#endif
 
 #include <sys/stat.h>
 #include <sys/types.h>