This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] [SSP] Fix output of diagnostics on mingw32


-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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]