Skip to content

Commit

Permalink
[docopt_c.py] Fix macOS support; [test/docopt.h] Regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMarks committed Aug 18, 2021
1 parent 4b4fa48 commit 3682fc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docopt_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
#include <sys/param.h>
#if defined(__APPLE__) || defined(__APPLE_CC__)
/* ARG_MAX gives a segfault on macOS when used for array size below */
#undef ARG_MAX
#undef NCARGS
#endif
#else
#include <limits.h>
Expand Down
6 changes: 6 additions & 0 deletions test/docopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ typedef size_t bool;

#include <sys/param.h>

#if defined(__APPLE__) || defined(__APPLE_CC__)
/* ARG_MAX gives a segfault on macOS when used for array size below */
#undef ARG_MAX
#undef NCARGS
#endif

#else

#include <limits.h>
Expand Down

0 comments on commit 3682fc8

Please sign in to comment.