[Patch] [SSP] Fix output of diagnostics on mingw32
Danny Smith
dansmister@gmail.com
Sun Nov 4 19:58:00 GMT 2007
-fstack-protector doesn't print any dignostics on mingw32, because all
output goes to directly /dev/tty, which doesn't exist. The console
device's name on win32 is "CONOUT$".
Tested on i686-pc-mingw32
ChangeLog
2007-11-05 Danny Smith <dannysmith@users.sourcforge.net>
* ssp.c (_PATH_TTY): Define as "CONOUT$" for _WIN32.
Index: ssp.c
===================================================================
--- ssp.c (revision 129863)
+++ ssp.c (working copy)
@@ -50,6 +50,11 @@
# 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
#ifdef HAVE_SYSLOG_H
More information about the Gcc-patches
mailing list