Skip to content

Commit

Permalink
Remove conditional definition of off_t
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mmcco committed Apr 13, 2016
1 parent 60176fc commit eb00574
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ccutil/scanutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
#include "scanutils.h"
#include "tprintf.h"

// workaround for "'off_t' was not declared in this scope" with -std=c++11
#if !defined(HAVE_OFF_T)
typedef long off_t;
#endif // off_t

enum Flags {
FL_SPLAT = 0x01, // Drop the value, do not assign
FL_INV = 0x02, // Character-set with inverse
Expand Down

0 comments on commit eb00574

Please sign in to comment.