diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-08-27 22:11:51 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-08-28 18:18:29 +0200 |
commit | a2f8af08ce37b9c0f322a1c3cb596658b0593e7c (patch) | |
tree | b15358683c48bda37d1dfbc0ec2bf9cada5c400e /plugins/gtkui/widgets.c | |
parent | 4457911ae7d38d7bef7abe11bc43d060ba4bf6a2 (diff) |
osx support WIP
Diffstat (limited to 'plugins/gtkui/widgets.c')
-rw-r--r-- | plugins/gtkui/widgets.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c index cbb9358e..7318d894 100644 --- a/plugins/gtkui/widgets.c +++ b/plugins/gtkui/widgets.c @@ -41,6 +41,16 @@ #define min(x,y) ((x)<(y)?(x):(y)) #define max(x,y) ((x)>(y)?(x):(y)) +#ifndef strdupa +# define strdupa(s) \ + ({ \ + const char *old = (s); \ + size_t len = strlen (old) + 1; \ + char *new = (char *) alloca (len); \ + (char *) memcpy (new, old, len); \ + }) +#endif + // utility code for parsing keyvalues #define get_keyvalue(s,key,val) {\ s = gettoken_ext (s, key, "={}();");\ |