aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/sigs.c4
-rw-r--r--src/utils.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/sigs.c b/src/sigs.c
index a4f8140..6e74a09 100644
--- a/src/sigs.c
+++ b/src/sigs.c
@@ -43,6 +43,10 @@
#include "calcurse.h"
+#ifndef WAIT_MYPGRP
+#define WAIT_MYPGRP 0
+#endif
+
/*
* General signal handling routine.
* Catch return values from children (user-defined notification commands).
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";
}