Opened 11 years ago
Closed 11 years ago
#910 closed defect/bug (fixed)
Wrong Byte alignment for Win32 GCC
Reported by: | arpysystems | Owned by: | KaZeR |
---|---|---|---|
Priority: | major | Milestone: | version 0.5.0 |
Component: | core | Version: | git master |
Severity: | Keywords: | ||
Cc: |
Description
Although solved for _MSC_VER and partly WIN32_CE compilers, the byte alignment in structs is not correct when using WIN32's gcc compiler (CMake build with MinGW in Win32). Therefore, the Map cannot be loaded, as analyzed by martin-s in r4672: Add:map_binfile:Warning if zip structures are not correctly aligned
Modified : /trunk/navit/navit/map/binfile/binfile.c
#pragma pack has to be used for Win32 gcc compile, as it is used for Win32-CE compile at the moment.
Files: navit/zipfile.h, navit/file.c
I already corrected this issue and can provide a patch, please have a look at it (correct my mistakes, hopefully none) and please integrate its corrected version.
For the CMake build in Win32 MinGW, this works. I haven't tried with WinCE, but I assume this will work as well.
Attachments (2)
Change History (3)
Changed 11 years ago by arpysystems
Changed 11 years ago by arpysystems
SVN Patch file for correcting the byte alignment problem for WIN32 gcc compilers
comment:1 Changed 11 years ago by woglinde
- Resolution set to fixed
- Status changed from new to closed
Algiment stuff is fixed with ifdefs and cpp-marcos.
Please see revision 4673
SVN Patch file for correcting the byte alignment problem for WIN32 gcc compilers