Skip to content

Commit

Permalink
Fix compilation on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
johnboiles committed Aug 25, 2014
1 parent 197fe51 commit 86bbeb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pred_src/util/gopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ read http://www.purposeful.co.uk/tfl/
#define GOPT_NOARG 0
#define GOPT_ARG 2

#define gopt_start(...) (const void*)( const struct { int k; int f; const char *s; const char*const*l; }[]){ __VA_ARGS__, {0}}
typedef struct { int k; int f; const char *s; const char*const*l; } kfsl;
#define gopt_start(...) (const void*)( const kfsl[]){ __VA_ARGS__, {0}}
#define gopt_option(k,f,s,l) { k, f, s, l }
#define gopt_shorts( ... ) (const char*)(const char[]){ __VA_ARGS__, 0 }
#define gopt_longs( ... ) (const char**)(const char*[]){ __VA_ARGS__, NULL }
Expand Down

0 comments on commit 86bbeb8

Please sign in to comment.