This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for dup() syscall on ppc simulator



I'm about to commit the attached patch to libgloss, as an obvious
patch.  Apparently, libstdc++-v3 requires the 'dup' function to exist
even to compile apparently trivial programs that don't use files in
any way :-(.

Possibly there should be a dummy version of 'dup' for the generic
code?

-- 
Geoff Keating <geoffk@redhat.com>

===File ~/patches/newlib-dup.patch==========================
Index: src/libgloss/ChangeLog
2001-03-08  Geoffrey Keating  <geoffk@redhat.com>

	* rs6000/simulator.S (dup): New syscall.

Index: src/libgloss/rs6000/simulator.S
===================================================================
RCS file: /cvs/src/src/libgloss/rs6000/simulator.S,v
retrieving revision 1.2
diff -p -u -p -r1.2 simulator.S
--- simulator.S	2000/09/05 18:25:02	1.2
+++ simulator.S	2001/03/09 07:27:02
@@ -1,7 +1,7 @@
 /*
  * simulator.S -- PowerPC simulator system calls.
  *
- * Copyright (c) 1995, 2000 Cygnus Support
+ * Copyright (c) 1995, 2000, 2001 Cygnus Support
  *
  * The authors hereby grant permission to use, copy, modify, distribute,
  * and license this software and its documentation for any purpose, provided
@@ -71,6 +71,13 @@ FUNC_START(access)
 	bnslr+
 	b	FUNC_NAME(_cerror)
 FUNC_END(access)
+
+FUNC_START(dup)
+	li	r0,41
+	sc
+	bnslr+
+	b	FUNC_NAME(_cerror)
+FUNC_END(dup)
 
 FUNC_START(lseek)
 	li	r0,199
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]