Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't output to stdout on Windows #34

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 9 comments
Closed

Can't output to stdout on Windows #34

GoogleCodeExporter opened this issue Mar 24, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Run xdelta with the -c parameter, or without an output file name, piping
output to a program or file.

What is the expected output? What do you see instead?

Xdelta should output the diff to stdout, getting piped to a file or to a
program (in my case I want to pipe it to 'split'). Instead, I get this
message and xdelta quits:

xdelta3: write failed: (stdout): Controlador no válido.

"Controlador no válido" means "Invalid controller" or "Invalid device".

What version of the product are you using? On what operating system?

C:\>xdelta30q -V
VERSION=3.0q

Installed from the .msi package. Running on Windows XP Professional.

I don't think there's anything else to say. I may try compiling my own
xdelta under MinGW later.

Original issue reported on code.google.com by nicolas....@gmail.com on 6 Apr 2007 at 11:04

@GoogleCodeExporter
Copy link
Author

Compiling with MinGW won't help, this is a problem with the I/O routines. You 
might
be able to recompile with -DXD3_STDIO=1 and -DXD3_WIN32=0 to use the stdio.h I/O
routines, which might handle stdout better. I will investigate and fix.

Original comment by josh.mac...@gmail.com on 11 Apr 2007 at 5:34

@GoogleCodeExporter
Copy link
Author

Interestingly, it seems to work fine under MSYS's bash shell for Windows. It's 
not
cygwin. I'm using the official binary, I didn't compile my own yet.

Original comment by nicolas....@gmail.com on 14 Apr 2007 at 7:02

@GoogleCodeExporter
Copy link
Author

FWIW, it's really easy to build & run on Cygin, and the stdout stuff will work.

Original comment by josh.mac...@gmail.com on 14 Apr 2007 at 8:23

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The way to fix this issue is to replace the following lines in 
xdelta3-main.h:680

#define XSTDOUT_XF(f) { (f)->file = winStartupInfo.hStdOutput; (f)->filename =
"(stdout)"; }
#define XSTDIN_XF(f)  { (f)->file = winStartupInfo.hStdInput;  (f)->filename =
"(stdin)"; }

with

#define XSTDOUT_XF(f) { (f)->file = GetStdHandle(STD_OUTPUT_HANDLE); 
(f)->filename =
"(stdout)"; }
#define XSTDIN_XF(f)  { (f)->file = GetStdHandle(STD_INPUT_HANDLE);  
(f)->filename =
"(stdin)"; }

The STARTUPINFO structure is not the correct place to get the stdin or stdout 
handles
as the calling process is not required to provide any and the console or cmd 
shell do
not.

Original comment by sixxg...@gmail.com on 18 Jun 2008 at 6:39

@GoogleCodeExporter
Copy link
Author

Fixed in SVN 247.  I haven't been able to build/verify this, as my windows 
laptop
broke a few months ago and I haven't replaced it.

Original comment by josh.mac...@gmail.com on 5 Jul 2008 at 1:24

@GoogleCodeExporter
Copy link
Author

3.0u

Original comment by josh.mac...@gmail.com on 13 Sep 2008 at 1:22

@GoogleCodeExporter
Copy link
Author

Original comment by josh.mac...@gmail.com on 13 Sep 2008 at 1:22

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant