Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename CPACK to Cmake.
[simgrid.git] / buildtools / CPACK / prog_test / prog_GRAS_CHECK_STRUCT_COMPACTION.c
diff --git a/buildtools/CPACK/prog_test/prog_GRAS_CHECK_STRUCT_COMPACTION.c b/buildtools/CPACK/prog_test/prog_GRAS_CHECK_STRUCT_COMPACTION.c
deleted file mode 100644 (file)
index e8ba5c7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <sys/types.h>
-#include <stddef.h> /* offsetof() */
-#include <stdio.h>
-
-int main (void)
-{
-
-struct s0 {char c0; double d0;};
-struct s1 {double d1; int i1; char c1;};
-struct s2 {double d2; int i2; char c2[6];};
-struct s3 {double d3; int a3; int b3;}; 
-
-int gras_struct_packed;
-int gras_struct_compact;
-int gras_array_straddle_struct;
-int gras_compact_struct;
-
-       if (sizeof(struct s0) == sizeof(double)+sizeof(char))
-       {
-               gras_struct_packed=1;
-       }
-       else
-       {
-               gras_struct_packed=0;
-       }
-       if (offsetof(struct s1,c1) == sizeof(double)+sizeof(int))
-       {
-               gras_struct_compact=1;
-       }
-       else
-       {
-               gras_struct_compact=0;
-       }
-       if (offsetof(struct s2,c2) == sizeof(double)+sizeof(int))
-       {
-               gras_array_straddle_struct=1;
-       }
-       else
-       {
-               gras_array_straddle_struct=0;
-       }
-       if (offsetof(struct s3,b3) == sizeof(double)+sizeof(int))
-       {
-               gras_compact_struct=1;
-       }
-       else
-       {
-               gras_compact_struct=0;
-       }
-
-
-       if(gras_struct_packed == 0 && gras_struct_compact == 1) printf("GRAS_STRUCT_COMPACT ");
-
-       if(gras_array_straddle_struct == 1) printf("GRAS_ARRAY_STRADDLE_STRUCT ");
-
-       if(gras_compact_struct == 1) printf("GRAS_COMPACT_STRUCT ");
-
-return 1;
-
-}