summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-02-27 23:14:56 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-02-27 23:14:56 (GMT)
commit5e683eb0f019fbce9cf439b8c88eeec6254375c1 (patch)
treeb914150b65f9ebe3ea49bcbca532a9d1fca8848c /addon
parent84951f8ee67a7000fe617b73f7e50b9495763ad9 (diff)
parentcee1aaf16ee2389e23d625c12aa43e8154877df9 (diff)
downloadDoxygen-5e683eb0f019fbce9cf439b8c88eeec6254375c1.zip
Doxygen-5e683eb0f019fbce9cf439b8c88eeec6254375c1.tar.gz
Doxygen-5e683eb0f019fbce9cf439b8c88eeec6254375c1.tar.bz2
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'addon')
-rw-r--r--addon/doxyparse/doxyparse.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 515d2ba..78a91d3 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -44,6 +44,7 @@
#include <qcstring.h>
#include <qregexp.h>
#include "namespacedef.h"
+#include "portable.h"
class Doxyparse : public CodeOutputInterface
{
@@ -449,12 +450,14 @@ int main(int argc,char **argv) {
// we need a place to put intermediate files
std::ostringstream tmpdir;
-#if !defined(_WIN32) || defined(__CYGWIN__)
- unsigned int pid = (uint)getpid();
-#else
- unsigned int pid = (uint)GetCurrentProcessId();
-#endif
- tmpdir << "/tmp/doxyparse-" << pid;
+ unsigned int pid = Portable::pid();
+ if (Portable::getenv("TMP"))
+ tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid;
+ else if (Portable::getenv("TEMP"))
+ tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid;
+ else
+ tmpdir << "doxyparse-" << pid;
+
Config_getString(OUTPUT_DIRECTORY)= tmpdir.str().c_str();
// enable HTML (fake) output to omit warning about missing output format
Config_getBool(GENERATE_HTML)=TRUE;