Переглянути джерело

MSVC does not support __func__, but __FUNCTION__

Samuel Thibault 14 роки тому
батько
коміт
08949c3a6b
2 змінених файлів з 9 додано та 1 видалено
  1. 5 1
      include/starpu_cuda.h
  2. 4 0
      include/starpu_opencl.h

+ 5 - 1
include/starpu_cuda.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux 1
+ * Copyright (C) 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -29,6 +29,10 @@
 extern "C" {
 #endif
 
+#ifdef _MSC_VER
+#define __func__ __FUNCTION__
+#endif
+
 #if defined(__CUDACC__) && defined(STARPU_HAVE_WINDOWS)
 #define STARPU_CUBLAS_OOPS() do { \
 		printf("oops  %s \n", errormsg); \

+ 4 - 0
include/starpu_opencl.h

@@ -29,6 +29,10 @@
 extern "C" {
 #endif
 
+#ifdef _MSC_VER
+#define __func__ __FUNCTION__
+#endif
+
 #define STARPU_OPENCL_DISPLAY_ERROR(status)                                     \
 	do {                                                            \
                 const char *errormsg;                                   \