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>
This commit is contained in:
parent
8892bb3625
commit
136e5bc4f7
@ -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).
|
||||
|
@ -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";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user