Possibility of an extra device?

Maarten Bezemer m.m.bezemer at student.utwente.nl
Tue Feb 4 18:44:32 PST 2003


Hi,

Hereby a patch for a user definable device. I think it may be handy for
some particular situations. At least it gets used by CVS :-)

Cheers,
  Maarten

PS /dev/random works fine with CVS


Index: unixlib/source/clib/unixlib/dev.h
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/clib/unixlib/dev.h,v
retrieving revision 1.4
diff -u -r1.4 dev.h
--- unixlib/source/clib/unixlib/dev.h   21 Jan 2003 17:48:32 -0000      1.4
+++ unixlib/source/clib/unixlib/dev.h   5 Feb 2003 01:37:57 -0000
@@ -38,8 +38,9 @@
 #define DEV_SOCKET     4       /* Freenet socket */
 #define DEV_ZERO       5       /* /dev/zero */
 #define DEV_RANDOM     6       /* /dev/random */
+#define DEV_USER       7       /* Free device for own use */
 
-#define NDEV           7
+#define NDEV           8
 
 
 struct dev
Index: unixlib/source/unix/dev.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/unix/dev.c,v
retrieving revision 1.10
diff -u -r1.10 dev.c
--- unixlib/source/unix/dev.c   29 Jan 2003 18:49:00 -0000      1.10
+++ unixlib/source/unix/dev.c   5 Feb 2003 01:37:57 -0000
@@ -76,6 +76,8 @@
   {__nullopen, __nullclose, __zeroread, __nullwrite,
     __nulllseek, __nullioctl, __nullselect, __nullstat, __nullfstat },
   {__randomopen, __nullclose, __randomread, __nullwrite,
+    __nulllseek, __nullioctl, __nullselect, __nullstat, __nullfstat },
+  {__nullopen, __nullclose, __nullread, __nullwrite,
     __nulllseek, __nullioctl, __nullselect, __nullstat, __nullfstat }
 };

-- 
Maarten Bezemer

http://home.student.utwente.nl/m.m.bezemer/



More information about the gcc mailing list