This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4 12/14] libgomp: fixup error.c on nvptx


NVPTX provides vprintf, but there's no stream separation: everything is
printed as if into stdout.  This is the minimal change to get error.c working.

	* error.c [__nvptx__]: Replace vfprintf, fputs, fputc with [v]printf.
---
 libgomp/error.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libgomp/error.c b/libgomp/error.c
index 094c24a..009efdc 100644
--- a/libgomp/error.c
+++ b/libgomp/error.c
@@ -35,6 +35,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#ifdef __nvptx__
+#define vfprintf(stream, fmt, list) vprintf(fmt, list)
+#define fputs(s, stream) printf("%s", s)
+#define fputc(c, stream) printf("%c", c)
+#endif
 
 #undef gomp_vdebug
 void


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