Re: [brlcad-devel] off_t size mismatch

2020-03-20 Thread Daniel Roßberg
Currently, it looks like tools like g2asc or glint don't work from a VS2019 release build. (If __STDC__ is defined or not doesn't matter.) I think, this is caused by an implementation detail of the C library in VS2019. There, sys/stat.h contains an inline function for fstat, which calls a version

Re: [brlcad-devel] off_t size mismatch

2020-03-19 Thread Clifford Yapp
The library will work with the small size, but if your offset is so large that you exceed the 32 bit size limit for offset value you can't see the whole .g file. If I remember correctly, off_t getting redefined allows for successful work with larger files. Given a sufficiently large .g file it sh

Re: [brlcad-devel] off_t size mismatch

2020-03-19 Thread Daniel Roßberg
Okay, thanks Clifford. What I don't understand is, how the redefinition of off_t helped in this issue. The C library should still work with the small size. On the other hand, _stati64 is used there, but this redefinition may lead to an infinite recursion in fstat() (depending on the type/implemen

Re: [brlcad-devel] off_t size mismatch

2020-03-19 Thread Clifford Yapp
If I remember correctly, at least some versions of Visual Studio have an off_t that is 32 bit even on a 64 bit machine: https://developercommunity.visualstudio.com/content/problem/308714/in-c-header-systypesh-off-t-is-defined-as-32-bit-s.html The acid test is to go with the default off_t and crea

[brlcad-devel] off_t size mismatch

2020-03-19 Thread Daniel Roßberg
Hi, What's the background behind the OFF_T_SIZE_MISMATCH stuff in common.h? Is this relevant for MS Visual Studio only? I came across this while investigating a strange behavior in VS2019. There I saw different sizes of off_t in BRL-CAD, because of the typedefs there, and the C library, which d