Permalink
Browse files

Fixed dNOOP bug, closes bug #7

Perl has had a couple of different definitions for dNOOP, and some
of them made nvcc mad. The current solution in the Perl core can be
applied to fix the problem, and that is done with this commit.
  • Loading branch information...
1 parent 2ae4c33 commit ff3b9900cf20b4b02edbc3fa2b16931e38f0d57a @run4flat committed Dec 19, 2013
Showing with 13 additions and 1 deletion.
  1. +7 −1 lib/CUDA/Minimal.xs
  2. +6 −0 lib/CUDA/Minimal/Tests.xs
View
8 lib/CUDA/Minimal.xs
@@ -1,9 +1,15 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-
#include "ppport.h"
+#undef dNOOP
+#ifdef __cplusplus
+#define dNOOP (void)0
+#else
+#define dNOOP extern int Perl___notused(void)
+#endif
+
MODULE = CUDA::Minimal PACKAGE = CUDA::Minimal
void
View
6 lib/CUDA/Minimal/Tests.xs
@@ -16,6 +16,12 @@
/* Reset alignment for CUDA's taste's */
#pragma pack (8)
+#undef dNOOP
+#ifdef __cplusplus
+#define dNOOP (void)0
+#else
+#define dNOOP extern int Perl___notused(void)
+#endif
//////////////////////////////////
// Preprocessor macro constants //
//////////////////////////////////

0 comments on commit ff3b990

Please sign in to comment.