Skip to content

Commit

Permalink
Merge pull request #965 from mintsuki/limits-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke authored Jan 22, 2024
2 parents b562768 + ba3d664 commit f79fa8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion options/ansi/include/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
# error "Unsupported configuration, please define either LONG_MAX or __LONG_MAX__"
#endif

#undef INT_MIN
#undef INT_MAX
#undef UINT_MAX
#undef LLONG_MIN
#undef LLONG_MAX
#undef ULLONG_MAX
#define INT_MIN (-INT_MAX - 1)

#define INT_MIN (-__INT_MAX__ - 1)
#define INT_MAX __INT_MAX__
#define UINT_MAX (__INT_MAX__ * 2 + 1)

#define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL)
#define LLONG_MAX __LONG_LONG_MAX__
#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
Expand Down

0 comments on commit f79fa8e

Please sign in to comment.