mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 13:19:21 +02:00
Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32 and other
2007-02-13 Tor Lillqvist <tml@novell.com> * glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0 so that it works on Win32 and other systems without /dev/stdin. (#407431) svn path=/branches/glib-2-12/; revision=5336
This commit is contained in:
committed by
Tor Lillqvist
parent
2802d2cfad
commit
7d11ed4cba
@@ -1,3 +1,9 @@
|
||||
2007-02-13 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
|
||||
so that it works on Win32 and other systems without
|
||||
/dev/stdin. (#407431)
|
||||
|
||||
2007-01-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.12.9 ===
|
||||
|
@@ -652,7 +652,13 @@ 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)
|
||||
/* Mostly for Win32. This is equivalent to opening /dev/stdin */
|
||||
fd = dup (0);
|
||||
else
|
||||
fd = open (file, O_RDONLY);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user