changeset 11081:f9284142a060

avoid another use of ::fileno
author John W. Eaton <jwe@octave.org>
date Thu, 07 Oct 2010 02:00:05 -0400
parents 36ceff79607b
children 4558aad4c41d
files src/ChangeLog src/file-io.cc
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-07  John W. Eaton  <jwe@octave.org>
+
+	* file-io.cc (do_stream_open): Use fileno instead of ::fileno to
+	avoid problems if fileno is a macro.
+
 2010-10-05  John W. Eaton  <jwe@octave.org>
 
 	* oct-stdstrm.h (octave_stdiostream::octave_stdiostream): Use
--- a/src/file-io.cc
+++ b/src/file-io.cc
@@ -494,7 +494,7 @@
 
                   FILE *fptr = ::fopen (fname.c_str (), tmode.c_str ());
 
-                  int fd = ::fileno (fptr);
+                  int fd = fileno (fptr);
 
                   gzFile gzf = ::gzdopen (fd, tmode.c_str ());