install-reloc: Support multi-binary installation.
[gnulib.git] / lib / openpty.c
index c398db5..c396a96 100644 (file)
@@ -1,5 +1,5 @@
 /* Open a pseudo-terminal.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,7 +32,22 @@ rpl_openpty (int *amaster, int *aslave, char *name,
                   (struct winsize *) winp);
 }
 
-#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, mingw */
+#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
+
+# include <errno.h>
+
+int
+openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
+         char *name _GL_UNUSED,
+         struct termios const *termp _GL_UNUSED,
+         struct winsize const *winp _GL_UNUSED)
+{
+  /* Mingw lacks pseudo-terminals altogether.  */
+  errno = ENOSYS;
+  return -1;
+}
+
+#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10 */
 
 # include <fcntl.h>
 # include <stdlib.h>