From: Tor Lillqvist Date: Mon, 1 Jan 2007 22:31:18 +0000 (+0000) Subject: Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32, too. X-Git-Tag: GLIB_2_13_0~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ff1e1d80b4f811089a1c9f0feff7f0c06ebdfd2;p=platform%2Fupstream%2Fglib.git Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32, too. 2007-01-02 Tor Lillqvist * glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32, too. svn path=/trunk/; revision=5185 --- diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 8de6d4e..507f4f7 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +2007-01-02 Tor Lillqvist + + * glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0 + so that it works on Win32, too. + 2006-12-29 Matthias Clasen * gtypemodule.h: Define G_DEFINE_DYNAMIC_TYPE and diff --git a/gobject/glib-genmarshal.c b/gobject/glib-genmarshal.c index 2d3e94c..07e32b1 100644 --- a/gobject/glib-genmarshal.c +++ b/gobject/glib-genmarshal.c @@ -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) {