I.e. Older compilers may not support C99, so variables must be
declared at the beginning of a block.
{
static char buffer[BUFSIZ];
char *cp;
+ int n;
if (dir_in == NULL) {
if (pfx_in == NULL) {
/* No directory component */
return m_mktemp(pfx_in, fd_ret, fp_ret);
}
- int n = (int)(cp-dir_in-1); /* Length of dir component */
+ n = (int)(cp-dir_in-1); /* Length of dir component */
snprintf(buffer, sizeof(buffer), "%.*s%s", n, dir_in, pfx_in);
return m_mktemp(buffer, fd_ret, fp_ret);
}