diff options
author | meta <s@w23.at> | 2011-01-19 18:37:42 (GMT) |
---|---|---|
committer | meta <s@w23.at> | 2011-01-19 18:37:42 (GMT) |
commit | 929e4340e2307620d56980a45d480a12eb60876d (patch) | |
tree | dab4265b0e3a6a539ac925cc7b510249964e0405 /src | |
parent | ae6517492ed9e54190bde3daefe13c794fea9325 (diff) |
__attribute__ ((packed)) equivalent for MSVC
Diffstat (limited to 'src')
-rw-r--r-- | src/import.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/import.cc b/src/import.cc index bab13ae..7581228 100644 --- a/src/import.cc +++ b/src/import.cc @@ -173,13 +173,24 @@ PolySet *ImportNode::render_polyset(render_mode_e) const { f.read(80-5+4); while (1) { +#ifdef _MSC_VER +#pragma pack(push,1) +#endif struct { float i, j, k; float x1, y1, z1; float x2, y2, z2; float x3, y3, z3; unsigned short acount; - } __attribute__ ((packed)) data; + } +#ifdef __GNUC__ + __attribute__ ((packed)) +#endif + data; +#ifdef _MSC_VER +#pragma pack(pop) +#endif + if (f.read((char*)&data, sizeof(data)) != sizeof(data)) break; p->append_poly(); |