aboutsummaryrefslogtreecommitdiff
path: root/gdb/rdi-share
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-01-25 02:40:50 +0000
committerJason Molenda <jmolenda@apple.com>2000-01-25 02:40:50 +0000
commit0fda6bd286fe931a998c4d5322ad12a4ed610f87 (patch)
treed26808089bd54c9de4bf565a6cf7a34be7d320b9 /gdb/rdi-share
parentb5f303f092e873d88d2b9459deb105e20ff5222c (diff)
downloadgdb-0fda6bd286fe931a998c4d5322ad12a4ed610f87.zip
gdb-0fda6bd286fe931a998c4d5322ad12a4ed610f87.tar.gz
gdb-0fda6bd286fe931a998c4d5322ad12a4ed610f87.tar.bz2
import gdb-2000-01-24 snapshot
Diffstat (limited to 'gdb/rdi-share')
-rw-r--r--gdb/rdi-share/devsw.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index ea666a1..58c0bfe 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
#include "adp.h"
#include "sys.h"
@@ -48,9 +49,14 @@ static void openLogFile ()
perror ("fopen");
}
else
- /* The following line is equivalent to: */
- /* setlinebuf (angelDebugLogFile); */
- setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
+ {
+ /* The following line is equivalent to: */
+ /* setlinebuf (angelDebugLogFile); */
+ setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
+#if defined(__CYGWIN32__) || defined(__CYGWIN__)
+ setmode(fileno(angelDebugLogFile), O_TEXT);
+#endif
+ }
time (&t);
fprintf (angelDebugLogFile,"ADP log file opened at %s\n",asctime(localtime(&t)));