This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4 12/14] libgomp: fixup error.c on nvptx
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>, Dmitry Melnik <dm at ispras dot ru>
- Date: Tue, 20 Oct 2015 21:34:34 +0300
- Subject: [gomp4 12/14] libgomp: fixup error.c on nvptx
- Authentication-results: sourceware.org; auth=none
- References: <1445366076-16082-1-git-send-email-amonakov at ispras dot ru>
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