Merge pull request #111 from johnboiles/master

Fix compilation on clang / OSX
master
Adam Greig 2014-08-27 01:54:39 +01:00
commit 2dae4324d4
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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 }