summaryrefslogtreecommitdiff
path: root/libssp
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2009-02-02 03:23:39 +0000
committerDanny Smith <dannysmith@gcc.gnu.org>2009-02-02 03:23:39 +0000
commit00f97e5a1a7fed19d2f305010369d4e356bc5d4d (patch)
tree340f5d061d4f98947519fbbcad4e64df52f76981 /libssp
parentdef88a88c4a6096e2204ca9b2776f1ef00b762b8 (diff)
* ssp.c (_PATH_TTY): Define as "CONOUT$" for _WIN32.
From-SVN: r143862
Diffstat (limited to 'libssp')
-rw-r--r--libssp/ChangeLog4
-rw-r--r--libssp/ssp.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 89fcee49a3f..241f9e88065 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-02 Danny Smith <dannysmith@users.sourcforge.net>
+
+ * ssp.c (_PATH_TTY): Define as "CONOUT$" for _WIN32.
+
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/libssp/ssp.c b/libssp/ssp.c
index 9576be445b2..99c5f38ce18 100644
--- a/libssp/ssp.c
+++ b/libssp/ssp.c
@@ -50,8 +50,14 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
# include <paths.h>
#endif
#ifndef _PATH_TTY
+/* Native win32 apps don't know about /dev/tty but can print directly
+ to the console using "CONOUT$" */
+#if defined (_WIN32) && !defined (__CYGWIN__)
+# define _PATH_TTY "CONOUT$"
+#else
# define _PATH_TTY "/dev/tty"
#endif
+#endif
#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif