Skip to content

Commit eb00574

Browse files
committed
Remove conditional definition of off_t
As pointed out by Stefan Weil, conditionally defining off_t using a macro isn't a valid approach. off_t does not have a fixed size and is used in ABI definitions (e.g. syscalls), so silently guessing its size risks breaking the build. Additionally, all sane and modern platforms will have off_t.
1 parent 60176fc commit eb00574

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

ccutil/scanutils.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
#include "scanutils.h"
3838
#include "tprintf.h"
3939

40-
// workaround for "'off_t' was not declared in this scope" with -std=c++11
41-
#if !defined(HAVE_OFF_T)
42-
typedef long off_t;
43-
#endif // off_t
44-
4540
enum Flags {
4641
FL_SPLAT = 0x01, // Drop the value, do not assign
4742
FL_INV = 0x02, // Character-set with inverse

0 commit comments

Comments
 (0)