search for: _fileno

Displaying 20 results from an estimated 30 matches for "_fileno".

Did you mean: fileno
2017 Feb 09
1
[PATCH] Fix compile with cygwin
...RY */ #else diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 2e1fdd5..d3b6e03 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -1253,9 +1253,6 @@ FILE *get_binary_stdin_(void) */ #if defined _MSC_VER || defined __MINGW32__ _setmode(_fileno(stdin), _O_BINARY); -#elif defined __CYGWIN__ - /* almost certainly not needed for any modern Cygwin, but let's be safe... */ - setmode(_fileno(stdin), _O_BINARY); #elif defined __EMX__ setmode(fileno(stdin), O_BINARY); #endif diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_e...
2004 Nov 07
2
Problems with DeviceIoControl()
...denied" or "invalid access to memory location", depending on the open mode flag I use. Testing indicates that I am getting a valid HANDLE, but that DeviceIoControl() is failing. I can, however, compress the file using the GUI interface. Any ideas? Wayne, I saw your note on using _fileno, but I don''t think I need it here, do I? Regards, Dan __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
2008 Jan 11
1
Patch for OS/2 STDIN/STDOUT
...DOUT work on OS/2 this small patch is needed: ---cut--- diff -ruN o:src/speexdec.c src/speexdec.c --- o:src/speexdec.c 2007-12-08 05:01:08.000000000 +0100 +++ src/speexdec.c 2008-01-12 00:48:00.000000000 +0100 @@ -231,6 +231,8 @@ { #if defined WIN32 || defined _WIN32 _setmode(_fileno(stdout), _O_BINARY); +#elif defined OS2 + _fsetmode(stdout,"b"); #endif fout=stdout; } diff -ruN o:src/speexenc.c src/speexenc.c --- o:src/speexenc.c 2007-12-08 05:01:08.000000000 +0100 +++ src/speexenc.c 2008-01-12 00:47:06.000000000 +0100 @@ -514,6 +514,8 @...
2017 Apr 06
2
Zero length reported.
...gt; #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); exit (1); } { char** ptr =...
2017 Apr 06
2
Zero length reported.
...gt; #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); exit (1); } { char** ptr =...
2006 May 23
3
[LLVMdev] Binary output to cout on Windows
The solution (provided in Microsoft's documentation) is to add: #include <cstdio> #include <io.h> #include <fcntl.h> and run: int result = _setmode( _fileno(stdin), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; } result = _setmode( _fileno(stdout), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set output mode to binary."<<std::endl; retu...
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...> >> #include <fcntl.h> >> #endif >> >> char pcmout[4096]; >> >> int main (int argc, char** argv) >> { >> OggVorbis_File vf; >> int eof = 0; >> int current_section; >> >> #ifdef _WIN32 >> _setmode (_fileno (stdin), _O_BINARY); >> _setmode (_fileno (stdout), _O_BINARY); >> #endif >> >> if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) >> { >> fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); &...
2002 Feb 12
2
problem with Vorbis DLL's
...DULE hVorbisFile; OVOPEN hOvOpen; hVorbisFile = LoadLibrary(_T("Vorbisfile.DLL")); hOvOpen = (OVOPEN)GetProcAddress(hVorbisFile, _T("ov_open")); printf(filename, "music\\Track%02d.OGG", track_number); vorbis_fd = fopen(filename, _T("rb")); _setmode( _fileno( vorbis_fd ), _O_BINARY ); if ((hOvOpen)(vorbis_fd, &vf, NULL, 0) < 0) { then POOF! <p>thanks! Brent <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-req...
2004 Sep 10
2
FLAC->mpc transcoding
...c : "MPC Encoder 1.02 --Beta-- (C) 1999-2002 Buschmann/Klemm/Piecha FLAC does not work properly under Windows. They have forgotten to switch to binary mode if reading/writing from/to stdin/stdout, so the data I got is corrupted and unusable. The problem can be fixed by adding: _setmode ( _fileno (fp), _0_BINARY ); where fp is stdin or stdout if used as data source or destination. More sophisticated code you can find in the mppdec package in the file mppdec.h which is suitable for a larger list of Operating Systems/Cmpilers. This problem has nothing to do with Windows, DOS or MacOS, it is...
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...uot; > > #ifdef _WIN32 > #include <io.h> > #include <fcntl.h> > #endif > > char pcmout[4096]; > > int main (int argc, char** argv) > { > OggVorbis_File vf; > int eof = 0; > int current_section; > > #ifdef _WIN32 > _setmode (_fileno (stdin), _O_BINARY); > _setmode (_fileno (stdout), _O_BINARY); > #endif > > if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) > { > fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); > exit (1); &gt...
2004 Aug 06
2
new utility - ezstream
At 03:07 PM 1/30/2004, you wrote: >Thanks for your work on this oddsock. It's a major feature that's been >missing from the Win32 environment. I presume you will be offering a Win32 >binary on your site at some stage. why sure! http://www.icecast.org:8082/files/ezstream_win32_0.1.0_setup.exe also, a note of mention, reading from stdin seems to be broken on win32, but works
2006 May 23
0
[LLVMdev] Binary output to cout on Windows
On Tue, 23 May 2006, Michael Smith wrote: > The solution (provided in Microsoft's documentation) is to add: > #include <cstdio> > #include <io.h> > #include <fcntl.h> > and run: > int result = _setmode( _fileno(stdin), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; > } > result = _setmode( _fileno(stdout), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set output mode to binary.&quo...
2006 May 23
1
[LLVMdev] Binary output to cout on Windows
...be done. http://llvm.org/bugs Reid. On Tue, 2006-05-23 at 10:27 -0700, Michael Smith wrote: > The solution (provided in Microsoft's documentation) is to add: > #include <cstdio> > #include <io.h> > #include <fcntl.h> > and run: > int result = _setmode( _fileno(stdin), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; > } > result = _setmode( _fileno(stdout), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set output mode to binary...
2002 Dec 27
1
Vorbisgain in ogg123
I'm considering patching my copy of ogg123 to support vorbisgain tags. Is there any interest in folding this sort of patch into the main line ogg123? Has anyone done this already (or to another command line ogg player)? John --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to
2012 Dec 05
7
ov_open_callbacks takes so much time to open 210 MB OGG file
Why ov_open_callbacks(fd_, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) takes so long to open OGG file? The OGG file has just 210 MB. It takes a lot of time open the file. I am working on OGG audio recorder and player. Thanks in advance! With kind regards, Pavel
2012 Dec 13
2
[PATCH 1/2] daemon: NFC Use symbolic names in commandrvf
Improve readability of commandrvf() by replacing bare int values for file descriptors with their symbolic names STD{IN,OUT,ERR}_FILENO. Also add PIPE_READ and PIPE_WRITE for referencing relevant ends of a pipe. --- daemon/guestfsd.c | 79 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 5c84849..4b3dd5f 100644 --- a...
2004 Aug 06
0
new utility - ezstream
...xe > > also, a note of mention, reading from stdin seems to be broken on win32, > but works very well on unix...but hey, this is a first revision :) > > oddsock > I haven't yet looked at the code, but for stdin to work correctly on windows, you usually need to call: _setmode(_fileno(stdin), _O_BINARY); That's for MSVC. There are different variations on this for other platforms and other win32 compilers - see oggenc/platform.c:setbinmode() if you need to know. Mike <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://ww...
2009 Mar 04
3
[Bug 1566] New: superfluous descriptor duplications in sftp-server
...ent.cgi?id=1609) suggested patch pfiles on running sftp-server shows: ... ... 3: S_IFIFO mode:0000 dev:329,0 ino:91352 uid:0 gid:0 size:0 O_RDWR 4: S_IFIFO mode:0000 dev:329,0 ino:91353 uid:0 gid:0 size:0 O_RDWR those descriptors are created by 2 dup() calls on STD(IN|OUT)_FILENO. However, there is no need for that and sftp-server can work directly with 0 and 1. I see that this code came with the 1st sftp-server implementation in version 2.3.0p1 and hasn't change since then. Even the Cygwin code that follows those dup()'s and which looks like it might need those cam...
2004 Nov 21
3
win32-file, overlapped added
Hi all, I''ve got overlapped and offset support in both nread and nwrite. The only thing left before I want to release this (as 0.4.0) is to get NO_BUFFERING to work. Unfortunately, I can''t get it to work. Park, I looked at that site you sent (and borrowed some code from it), but I don''t see anything special happening for NO_BUFFERING. I thought it required
2002 Aug 06
0
Getting a GUI to work with Vorbis code
...read OK.\n"); /* end modification : GK */ #ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ /* Beware the evil ifdef. We avoid these where we can, but this one we cannot. Don't add any more, you'll probably go to hell if you do. */ _setmode( _fileno( stdin ), _O_BINARY ); _setmode( _fileno( stdout ), _O_BINARY ); #endif #if defined(macintosh) && defined(__MWERKS__) { int argc; char **argv; argc=ccommand(&argv); /* get a "command line" from the Mac user */ /* this also lets the user se...