diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-08 10:51:53 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-08 10:51:53 +0200 |
commit | d7c4f546ab3d9db8be1c52e8b66b024ac20361df (patch) | |
tree | bb263044439e82dcf33ea33386328e179af5d537 /src | |
parent | 697225a5e5dda3149190e6796ad86f37ac6f6064 (diff) |
rearrange #ifdef
Diffstat (limited to 'src')
-rw-r--r-- | src/ImageMetaData.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ImageMetaData.cxx b/src/ImageMetaData.cxx index cb41167..793903a 100644 --- a/src/ImageMetaData.cxx +++ b/src/ImageMetaData.cxx @@ -197,14 +197,14 @@ ImageMetaData::save_image_jpgcom(char *in_img, char *out_img) { int n, in_fd, tmp_fd, err = 0; char* dirbuf = strdup(out_img); -#if ! HAVE_MKSTEMP - tmpname = tempnam(dirname(dirbuf), ".gipfel"); - tmp_fd = open(tmpname, O_WRONLY|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR); -#else +#if HAVE_MKSTEMP char tmpbuf[MAXPATHLEN]; snprintf(tmpbuf, sizeof(tmpbuf), "%s/.gipfelXXXXXX", dirname(dirbuf)); tmp_fd = mkstemp(tmpbuf); tmpname = tmpbuf; +#else + tmpname = tempnam(dirname(dirbuf), ".gipfel"); + tmp_fd = open(tmpname, O_WRONLY|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR); #endif free(dirbuf); |