diff options
author | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
commit | 1754a970a76c071fff91cc7c716aa0b78b4ac6be (patch) | |
tree | 5faa0fad3b5324423cd44413d5fdd16c586c1e29 /src/import.cc | |
parent | 592ca6abadcb6443629be4407b973279a891278c (diff) | |
parent | a3cfe9e6d76f41cbd13711d1bc3843afe3d14f2d (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/import.cc')
-rw-r--r-- | src/import.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/import.cc b/src/import.cc index bab13ae..a924e24 100644 --- a/src/import.cc +++ b/src/import.cc @@ -1,6 +1,7 @@ /* - * OpenSCAD (www.openscad.at) - * Copyright (C) 2009 Clifford Wolf <clifford@clifford.at> + * OpenSCAD (www.openscad.org) + * Copyright (C) 2009-2011 Clifford Wolf <clifford@clifford.at> and + * Marius Kintel <marius@kintel.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -173,13 +174,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(); |