diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-07 16:06:40 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-13 21:42:49 -0800 |
commit | dc963f6d676d1735144ff3997c0ab5bf7cc3889f (patch) | |
tree | 6de8f481f360ef6aef3b99ea092a8a038b8c38d3 /MailboxP.h | |
parent | 6cabab62873999d56a6cca6452c0cbe84dbacd9a (diff) |
Use <paths.h> and _PATH_MAILDIR to find mailboxes if present
Use autoconf to check for paths.h on all systems, instead of
only including it #ifdef CSRG_BASED
Makes _PATH_MAILDIR the preferred mail directory path on all systems
if it's defined, falls back to old per-system hardcoded paths if not.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Diffstat (limited to 'MailboxP.h')
-rw-r--r-- | MailboxP.h | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -33,24 +33,26 @@ from the X Consortium. #ifndef _XawMailboxP_h #define _XawMailboxP_h +#include "config.h" #include "Mailbox.h" #include <X11/Xaw/SimpleP.h> -#if defined(SYSV) -#define MAILBOX_DIRECTORY "/usr/mail" -#elif defined(SVR4) -#define MAILBOX_DIRECTORY "/var/mail" -#elif defined(CSRG_BASED) -#include <paths.h> -#ifdef _PATH_MAILDIR -#define MAILBOX_DIRECTORY _PATH_MAILDIR -#endif -#elif defined(__linux__) -#define MAILBOX_DIRECTORY "/var/spool/mail" +#ifdef HAVE_PATHS_H +# include <paths.h> #endif #ifndef MAILBOX_DIRECTORY -#define MAILBOX_DIRECTORY "/usr/spool/mail" +# ifdef _PATH_MAILDIR +# define MAILBOX_DIRECTORY _PATH_MAILDIR +# elif defined(SYSV) +# define MAILBOX_DIRECTORY "/usr/mail" +# elif defined(SVR4) +# define MAILBOX_DIRECTORY "/var/mail" +# elif defined(__linux__) +# define MAILBOX_DIRECTORY "/var/spool/mail" +# else +# define MAILBOX_DIRECTORY "/usr/spool/mail" +# endif #endif typedef struct { /* new fields for mailbox widget */ |