Browse Source

do not redefine _GNU_SOURCE if it's already defined

Cédric Augonnet 16 years ago
parent
commit
513d4a4a5c

+ 3 - 0
src/common/fxt.h

@@ -18,7 +18,10 @@
 #define __FXT_H__
 
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE  /* ou _BSD_SOURCE ou _SVID_SOURCE */
+#endif
+
 #include <unistd.h>
 #include <sys/syscall.h> /* pour les définitions de SYS_xxx */
 

+ 1 - 0
src/datawizard/interfaces/blas_interface.c

@@ -14,6 +14,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <common/config.h>
 #include <datawizard/data_parameters.h>
 #include <datawizard/coherency.h>
 #include <datawizard/copy-driver.h>

+ 1 - 0
src/datawizard/interfaces/data_interface.h

@@ -19,6 +19,7 @@
 
 #include <stdio.h>
 
+#include <common/config.h>
 #include <datawizard/data_parameters.h>
 #include "blas_interface.h"
 #include "vector_interface.h"

+ 1 - 0
src/datawizard/interfaces/vector_interface.c

@@ -14,6 +14,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <common/config.h>
 #include <datawizard/data_parameters.h>
 #include <datawizard/coherency.h>
 #include <datawizard/copy-driver.h>

+ 2 - 0
src/drivers/core/driver_core.h

@@ -18,7 +18,9 @@
 #define __DRIVER_CORE_H__
 
 /* to bind threads onto a given cpu */
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <sched.h>
 
 #include <common/config.h>

+ 2 - 0
src/drivers/cuda/driver_cuda.h

@@ -17,7 +17,9 @@
 #ifndef __DRIVER_CUDA_H__
 #define __DRIVER_CUDA_H__
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <sched.h>
 
 #include <assert.h>

+ 2 - 0
src/drivers/gordon/driver_gordon.c

@@ -14,7 +14,9 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <sched.h>
 #include <pthread.h>
 #include <semaphore.h>

+ 2 - 0
tests/experiments/bandwith-cuda/cuda-bandwith.c

@@ -15,7 +15,9 @@
  */
 
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <sched.h>
 #include <cuda.h>
 #include <cublas.h>