use #pragma pack if vc++ is used
use nothing otherwise (should we exit with an error in that case ?)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/embryo@42533
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
void *data;
};
+#ifdef _MSC_VER
+# pragma pack(1)
+# define EMBRYO_STRUCT_PACKED
+#elif defined (__GNUC__)
+# define EMBRYO_STRUCT_PACKED __attribute__((packed))
+#else
+# define EMBRYO_STRUCT_PACKED
+#endif
+
struct _Embryo_Func_Stub
{
int address;
char name[sEXPMAX+1];
-} __attribute__((packed));
+} EMBRYO_STRUCT_PACKED;
struct _Embryo_Header
{
int pubvars; /* the "public variables" table */
int tags; /* the "public tagnames" table */
int nametable; /* name table, file version 7 only */
-} __attribute__((packed));
+} EMBRYO_STRUCT_PACKED;
+
+#ifdef _MSC_VER
+# pragma pack()
+#endif
void _embryo_args_init(Embryo_Program *ep);
void _embryo_fp_init(Embryo_Program *ep);