Skip to content

Commit 937a015

Browse files
committed
Revert "headers: Use _FILE_OFFSET_BITS == 64 also for 64-bit truncate definition"
This reverts commit fe79aeb. This change broke building user apps with Qt, if the unistd.h header has been included before. Qt classes have methods named "truncate", and they have a guard like this at the top of a number of headers (e.g. qstring): #ifdef truncate #error qstring.h must be included before any header file that defines truncate #endif https://github.com/qt/qtbase/blob/v6.10.0/src/corelib/text/qstring.h#L35 Signed-off-by: Martin Storsjö <[email protected]>
1 parent 996604b commit 937a015

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

mingw-w64-headers/crt/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ int truncate64(const char *, _off64_t);
6666
#define _FILE_OFFSET_BITS_SET_FTRUNCATE
6767
#if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64))
6868
#define ftruncate ftruncate64
69-
#define truncate truncate64
7069
#endif /* _FILE_OFFSET_BITS_SET_FTRUNCATE */
7170
#endif /* _FILE_OFFSET_BITS_SET_FTRUNCATE */
7271

0 commit comments

Comments
 (0)