Browse Source

enable starpu_profiling_status_get optimization only with gcc and alike which support macros returning a value

Samuel Thibault 11 years ago
parent
commit
6f04292eec
1 changed files with 3 additions and 1 deletions
  1. 3 1
      include/starpu_profiling.h

+ 3 - 1
include/starpu_profiling.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010-2014  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -87,6 +87,7 @@ int starpu_profiling_status_get(void);
 
 #ifdef BUILDING_STARPU
 #include <common/utils.h>
+#ifdef __GNUC__
 extern int _starpu_profiling;
 #define starpu_profiling_status_get() ({ \
 	int __ret; \
@@ -96,6 +97,7 @@ extern int _starpu_profiling;
 	__ret; \
 })
 #endif
+#endif
 
 int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info);