diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2006-09-23 01:56:55 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2006-09-23 01:56:55 +0000 |
commit | 6a7c793f3ef153f68fec135b0f8bca78ec9da324 (patch) | |
tree | c7c20ef998ab2e57fb13c1b46a60429b75cc3d48 | |
parent | 45163b1afce7ab9176893ac9f06b87c285052604 (diff) | |
download | gcc-6a7c793f3ef153f68fec135b0f8bca78ec9da324.zip gcc-6a7c793f3ef153f68fec135b0f8bca78ec9da324.tar.gz gcc-6a7c793f3ef153f68fec135b0f8bca78ec9da324.tar.bz2 |
re PR libfortran/27964 (Wrong line ends on windows (XP))
PR libfortran/27964
* configure.ac: Check for setmode() function.
* configure: Regenerate.
* config.h.in: Regenerate.
* io/unix.c (output_stream): Force stdout to binary mode.
(error_stream): Force stderr to binary mode.
From-SVN: r117166
-rw-r--r-- | libgfortran/ChangeLog | 9 | ||||
-rw-r--r-- | libgfortran/config.h.in | 3 | ||||
-rwxr-xr-x | libgfortran/configure | 2 | ||||
-rw-r--r-- | libgfortran/configure.ac | 2 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 6 |
5 files changed, 20 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 3832663..709500b 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2006-09-22 Danny Smith <dannysmith@users.sourceforge.net> + + PR libfortran/27964 + * configure.ac: Check for setmode() function. + * configure: Regenerate. + * config.h.in: Regenerate. + * io/unix.c (output_stream): Force stdout to binary mode. + (error_stream): Force stderr to binary mode. + 2006-09-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29099 diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in index 11f8e72..444cd2b 100644 --- a/libgfortran/config.h.in +++ b/libgfortran/config.h.in @@ -492,6 +492,9 @@ /* libm includes scalbnl */ #undef HAVE_SCALBNL +/* Define to 1 if you have the `setmode' function. */ +#undef HAVE_SETMODE + /* Define to 1 if you have the `signal' function. */ #undef HAVE_SIGNAL diff --git a/libgfortran/configure b/libgfortran/configure index 7af0b32..75872aa 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -10037,7 +10037,7 @@ fi done -for ac_func in wait +for ac_func in wait setmode do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index 5e8efd4..4784fa5 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -172,7 +172,7 @@ AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_CHECK_FUNCS(getrusage times mkstemp strtof strtold snprintf ftruncate chsize) AC_CHECK_FUNCS(chdir strerror getlogin gethostname kill link symlink perror) AC_CHECK_FUNCS(sleep time ttyname signal alarm ctime clock access fork execl) -AC_CHECK_FUNCS(wait) +AC_CHECK_FUNCS(wait setmode) # Check libc for getgid, getpid, getuid AC_CHECK_LIB([c],[getgid],[AC_DEFINE([HAVE_GETGID],[1],[libc includes getgid])]) diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 560047f..57883e0 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1289,6 +1289,9 @@ input_stream (void) stream * output_stream (void) { +#if defined(HAVE_CRLF) && defined(HAVE_SETMODE) + setmode (STDOUT_FILENO, O_BINARY); +#endif return fd_to_stream (STDOUT_FILENO, PROT_WRITE); } @@ -1299,6 +1302,9 @@ output_stream (void) stream * error_stream (void) { +#if defined(HAVE_CRLF) && defined(HAVE_SETMODE) + setmode (STDERR_FILENO, O_BINARY); +#endif return fd_to_stream (STDERR_FILENO, PROT_WRITE); } |