Commit 5ff1e1d8 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32, too.

2007-01-02  Tor Lillqvist  <tml@novell.com>

	* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
	so that it works on Win32, too.


svn path=/trunk/; revision=5185
parent 470152f2
2007-01-02 Tor Lillqvist <tml@novell.com>
* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
so that it works on Win32, too.
2006-12-29 Matthias Clasen <mclasen@redhat.com>
* gtypemodule.h: Define G_DEFINE_DYNAMIC_TYPE and
......
......@@ -654,7 +654,12 @@ main (int argc,
for (slist = files; slist; slist = slist->next)
{
gchar *file = slist->data;
gint fd = open (file, O_RDONLY);
gint fd;
if (strcmp (file, "/dev/stdin") == 0)
fd = dup (0);
else
fd = open (file, O_RDONLY);
if (fd < 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment