diff options
author | Tim Champagne <tchamp@users.sourceforge.net> | 2003-04-22 23:30:29 +0000 |
---|---|---|
committer | Tim Champagne <tchamp@users.sourceforge.net> | 2003-04-22 23:30:29 +0000 |
commit | 927f32b8bf5cb1bb64795aeca3b427c4e91ba0dc (patch) | |
tree | f1bb3dccce867b7bf96e20dc8074f933dee7fef6 /src/input/input_file.c | |
parent | 9d422a9e3c7cbd0d3dfdf8c077f24f9a8f035cec (diff) | |
download | xine-lib-927f32b8bf5cb1bb64795aeca3b427c4e91ba0dc.tar.gz xine-lib-927f32b8bf5cb1bb64795aeca3b427c4e91ba0dc.tar.bz2 |
Additional changes for win32/msvc port; This is my first real commit so please be gentle with me; Everything builds except for the win32 ui
CVS patchset: 4650
CVS date: 2003/04/22 23:30:29
Diffstat (limited to 'src/input/input_file.c')
-rw-r--r-- | src/input/input_file.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c index 3356d6b31..612546ddf 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.79 2003/04/13 16:02:53 tmattern Exp $ + * $Id: input_file.c,v 1.80 2003/04/22 23:30:35 tchamp Exp $ */ #ifdef HAVE_CONFIG_H @@ -75,6 +75,10 @@ static uint32_t file_plugin_get_capabilities (input_plugin_t *this_gen) { if (this->fh <0) return 0; +#ifdef _MSC_VER + /*return INPUT_CAP_SEEKABLE | INPUT_CAP_GET_DIR;*/ + return INPUT_CAP_SEEKABLE; +#else if (fstat (this->fh, &buf) == 0) { if (S_ISREG(buf.st_mode)) return INPUT_CAP_SEEKABLE; @@ -83,6 +87,7 @@ static uint32_t file_plugin_get_capabilities (input_plugin_t *this_gen) { } else perror ("system call fstat"); return 0; +#endif /* _MSC_VER */ } @@ -231,7 +236,15 @@ static int file_plugin_open (input_plugin_t *this_gen ) { else filename = decode_uri(this->mrl); +#ifdef _MSC_VER + /* + added O_BINARY flag, <CTRL>-Z char + is interperated as EOF on win32. + */ + this->fh = open (filename, O_RDONLY|O_BINARY); +#else this->fh = open (filename, O_RDONLY); +#endif /* _MSC_VER */ if (this->fh == -1) { return 0; |