- Mapping of PPD keywords to IPP keywords did not work if the PPD
keyword was already an IPP keyword (<rdar://problem/19121005>)
- cupsGetPPD* sent bad requests (STR #4567)
+ - ippserver used the wrong temporary directory on Windows (STR #4547)
CHANGES IN CUPS V2.0.1
*
* Sample IPP Everywhere server for CUPS.
*
- * Copyright 2010-2014 by Apple Inc.
+ * Copyright 2010-2015 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
if (!directory[0])
{
- snprintf(directory, sizeof(directory), "/tmp/ippserver.%d", (int)getpid());
+ const char *tmpdir; /* Temporary directory */
- if (mkdir(directory, 0777) && errno != EEXIST)
+#ifdef WIN32
+ if ((tmpdir = getenv("TEMP")) == NULL)
+ tmpdir = "C:/TEMP";
+#elif defined(__APPLE__)
+ if ((tmpdir = getenv("TMPDIR")) == NULL)
+ tmpdir = "/private/tmp";
+#else
+ if ((tmpdir = getenv("TMPDIR")) == NULL)
+ tmpdir = "/tmp";
+#endif /* WIN32 */
+
+ snprintf(directory, sizeof(directory), "%s/ippserver.%d", tmpdir, (int)getpid());
+
+ if (mkdir(directory, 0755) && errno != EEXIST)
{
fprintf(stderr, "Unable to create spool directory \"%s\": %s\n",
directory, strerror(errno));