On Dec 14, 2005, at 1:27 PM, Alexander Dupuy wrote:

Is there a compelling reason why this returns a long, rather than an off_t (ftello style)?

Googling for

        off_t site:microsoft.com

found

        http://msdn2.microsoft.com/en-us/library/323b6b3k.aspx

which appears to claim that "SYS\TYPES.H" (which you presumably get if you include <sys/types.h> defines off_t, but I don't know if that's the case in all versions of MSVC used to compile WinPcap. It says it's a "long integer"; if, by that, they mean "long int", that means you don't get file offsets > 32 bits (I don't think you even get it in Win64 - I think Win64 is LLP64, not LP64).

For fpos_t, it says "(long integer, __int64, or structure, depending on the target platform)". Searching for

        fpos_t site:microsoft.com

found

        http://msdn2.microsoft.com/en-us/library/ms235429.aspx

which says

        This topic contains a list of new CRT features in Visual C++ 2005.

                ...

        New features

                ...

o fpos_t is now __int64 under /Za (for C code) and when __STDC__ is set manually (for C++ code). It used to be a struct.

so, for applications where it'd matter that a file offset is an integral data type, you'd need the latest shiniest MSVC++ to get that if we used fpos_t.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.

Reply via email to