Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use keyword "extern" on windows too, and hope to fix build warnings.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 30 Sep 2013 09:58:22 +0000 (11:58 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 30 Sep 2013 20:14:58 +0000 (22:14 +0200)
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

index 0b80fd7..a6f65de 100644 (file)
  *     DLL space.
  */
 
  *     DLL space.
  */
 
-
 /* Build the DLL */
 #if defined(DLL_EXPORT)
 /* 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_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)
 
 /* 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_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
 
 /* UNIX build */
 #else