From 42e81fcde1272c962e17edace14560aa3d9a839d Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 30 Sep 2013 11:58:22 +0200 Subject: [PATCH] Use keyword "extern" on windows too, and hope to fix build warnings. Concerned warnings are, for example: ./src/include/smpi/smpi_interface.h:29:43: warning: array mpi_coll_gather_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:37:43: warning: array mpi_coll_allgather_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:45:43: warning: array mpi_coll_allgatherv_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:54:43: warning: array mpi_coll_allreduce_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:63:43: warning: array mpi_coll_alltoall_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:71:43: warning: array mpi_coll_alltoallv_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:80:43: warning: array mpi_coll_bcast_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:89:43: warning: array mpi_coll_reduce_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:97:43: warning: array mpi_coll_reduce_scatter_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:105:43: warning: array mpi_coll_scatter_description assumed to have one element [enabled by default] ./src/include/smpi/smpi_interface.h:114:43: warning: array mpi_coll_barrier_description assumed to have one element [enabled by default] --- include/xbt/misc.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 0b80fd7ba5..a6f65de479 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -165,27 +165,26 @@ * DLL space. */ - /* Build the DLL */ #if defined(DLL_EXPORT) -# define XBT_PUBLIC(type) __declspec(dllexport) type +# define XBT_PUBLIC(type) extern __declspec(dllexport) type # define XBT_EXPORT_NO_IMPORT(type) __declspec(dllexport) type # define XBT_IMPORT_NO_EXPORT(type) type -# define XBT_PUBLIC_DATA(type) __declspec(dllexport) type +# define XBT_PUBLIC_DATA(type) extern __declspec(dllexport) type /* Pack everything up statically */ #elif defined(DLL_STATIC) -# define XBT_PUBLIC(type) extern type +# define XBT_PUBLIC(type) extern type # define XBT_EXPORT_NO_IMPORT(type) type # define XBT_IMPORT_NO_EXPORT(type) type # define XBT_PUBLIC_DATA(type) extern type /* Link against the DLL */ #elif (defined(_XBT_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC)) -# define XBT_PUBLIC(type) __declspec(dllimport) type -# define XBT_EXPORT_NO_IMPORT(type) type -# define XBT_IMPORT_NO_EXPORT(type) __declspec(dllimport) type -# define XBT_PUBLIC_DATA(type) __declspec(dllimport) type +# define XBT_PUBLIC(type) extern __declspec(dllimport) type +# define XBT_EXPORT_NO_IMPORT(type) type +# define XBT_IMPORT_NO_EXPORT(type) __declspec(dllimport) type +# define XBT_PUBLIC_DATA(type) extern __declspec(dllimport) type /* UNIX build */ #else -- 2.20.1