aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-02-19 01:39:07 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-02-19 02:41:09 +0100
commit136e5bc4f7095aef80e55c5e329de5e04bd85886 (patch)
tree300c0ae8c10540bcae4b02f7ba9c590e275b3d8b /src/utils.c
parent8892bb3625a1f91f121fd98763a82c2cb0c0f67a (diff)
downloadcalcurse-136e5bc4f7095aef80e55c5e329de5e04bd85886.tar.gz
calcurse-136e5bc4f7095aef80e55c5e329de5e04bd85886.zip
Fix POSIX compliance
* "WAIT_MYPGRP" isn't POSIX'ish. Relying on this caused compilation issues in certain environments (e.g. under Cygwin). As a workaround, define "WAIT_MYPGRP" explicitly if it's undefined. * "P_tmpdir" is an XSI extension. Don't try use it if it isn't available. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 8e76547..0ba3a87 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -523,8 +523,10 @@ get_tempdir (void)
{
if (getenv ("TMPDIR"))
return getenv ("TMPDIR");
+#ifdef P_tmpdir
else if (P_tmpdir)
return P_tmpdir;
+#endif
else
return "/tmp";
}