From 789ed089c903922d0d66fcc2849dd24fbcaf2495 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 12 Oct 2017 14:42:12 +0000 Subject: Add fl_open_ext() to control whether the file is opened in binary/text mode. This new function allows to write Fl_SVG_Image::fl_gzopen() in a completely platform-independent way. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_SVG_Image.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/Fl_SVG_Image.cxx') diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 0b29b8c48..3c8957afd 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -28,9 +28,6 @@ #include #if defined(HAVE_LIBZ) #include -# ifdef _WIN32 -# include -# endif #endif #if !defined(HAVE_LONG_LONG) @@ -82,11 +79,7 @@ float Fl_SVG_Image::svg_scaling_(int W, int H) { /** Opens for reading a potentially gzip'ed file identified by a UTF-8 encoded filename. */ void* Fl_SVG_Image::fl_gzopen(const char *fname) { #if defined(HAVE_LIBZ) - int flags = 0; -# ifdef _WIN32 - flags = _O_BINARY; -# endif - int fd = fl_open(fname, flags); + int fd = fl_open_ext(fname, 0, 0); if (fd < 0) return NULL; return gzdopen(fd, "r"); #else -- cgit v1.2.3