X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Ffish.h;h=234035755f99682ea5c6347aa7f6171b2aaeba2e;hp=b941c49364794a4b64447aa9140b208f6e3ad0e5;hb=c9c0ac7d362fd19214c2c5e5bb7dcd9059950887;hpb=840536ea5a0568296dfd3e483442c76b93c5a949 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;