X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.h;h=234035755f99682ea5c6347aa7f6171b2aaeba2e;hb=6fbbcdd64c1983efeadb846958865373df962078;hp=b941c49364794a4b64447aa9140b208f6e3ad0e5;hpb=d75a2bff1264828f02b68a9c8bc7eb2521bd6684;p=libguestfs.git diff --git a/fish/fish.h b/fish/fish.h index b941c49..2340357 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -47,6 +47,11 @@ #define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0) #define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0) +#define TMP_TEMPLATE_ON_STACK(var) \ + const char *ttos_tmpdir = guestfs_tmpdir (); \ + char var[strlen (ttos_tmpdir) + 32]; \ + sprintf (var, "%s/guestfishXXXXXX", ttos_tmpdir) \ + /* in fish.c */ extern guestfs_h *g; extern int read_only;