mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Add comment about dup(0) and lack of /dev/stdin on Win32. (#407431)
2007-01-02 Tor Lillqvist <tml@novell.com> * glib-genmarshal.c (main): Add comment about dup(0) and lack of /dev/stdin on Win32. (#407431) svn path=/trunk/; revision=5335
This commit is contained in:
committed by
Tor Lillqvist
parent
8ec7d6ca3f
commit
c6efde4f62
@@ -1,7 +1,8 @@
|
|||||||
2007-01-02 Tor Lillqvist <tml@novell.com>
|
2007-01-02 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
|
* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
|
||||||
so that it works on Win32, too.
|
so that it works on Win32 and other systems without
|
||||||
|
/dev/stdin. (#407431)
|
||||||
|
|
||||||
2006-12-29 Matthias Clasen <mclasen@redhat.com>
|
2006-12-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
@@ -657,6 +657,7 @@ main (int argc,
|
|||||||
gint fd;
|
gint fd;
|
||||||
|
|
||||||
if (strcmp (file, "/dev/stdin") == 0)
|
if (strcmp (file, "/dev/stdin") == 0)
|
||||||
|
/* Mostly for Win32. This is equivalent to opening /dev/stdin */
|
||||||
fd = dup (0);
|
fd = dup (0);
|
||||||
else
|
else
|
||||||
fd = open (file, O_RDONLY);
|
fd = open (file, O_RDONLY);
|
||||||
|
Reference in New Issue
Block a user