Menu

#19 C-compliance / MSVC-compatibility

open
nobody
None
5
2013-01-24
2011-07-25
Sjoerd
No

In several places, variable declarations are not done at the beginning of a block (see attached diff file), causing incompatibility with MSVC.

The following headers seem to be unused, but cause trouble for MSVC.
- dirent.h
- sys/mman.h
- sys/time.h
- sys/uio.h

Discussion

  • Sjoerd

    Sjoerd - 2011-07-25
     
  • Sjoerd

    Sjoerd - 2011-07-25

    Oops - should've built in Linux before posting. In read_binary.c, line 44 should be
    *ptr = (void*)((uintptr_t)*ptr + (intptr_t)tables_buf);
    and line 50 should be
    *(uintptr_t*)(tables_buf+offset) += (intptr_t)strings_buf;

    Alternatively, ptr could be changed to be of type *uintptr_t, rather than **void, but that would require more lines to be changed.

     

Log in to post a comment.