xref: /illumos-gate/usr/src/cmd/sendmail/include/sm/path.h (revision 2a8bcb4e)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3*7c478bd9Sstevel@tonic-gate  *	All rights reserved.
4*7c478bd9Sstevel@tonic-gate  *
5*7c478bd9Sstevel@tonic-gate  * By using this file, you agree to the terms and conditions set
6*7c478bd9Sstevel@tonic-gate  * forth in the LICENSE file which can be found at the top level of
7*7c478bd9Sstevel@tonic-gate  * the sendmail distribution.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  *	$Id: path.h,v 1.6 2001/04/03 01:53:00 gshapiro Exp $
10*7c478bd9Sstevel@tonic-gate  */
11*7c478bd9Sstevel@tonic-gate 
12*7c478bd9Sstevel@tonic-gate /*
13*7c478bd9Sstevel@tonic-gate **  Portable names for standard filesystem paths
14*7c478bd9Sstevel@tonic-gate **  and macros for directories.
15*7c478bd9Sstevel@tonic-gate */
16*7c478bd9Sstevel@tonic-gate 
17*7c478bd9Sstevel@tonic-gate #ifndef SM_PATH_H
18*7c478bd9Sstevel@tonic-gate # define SM_PATH_H
19*7c478bd9Sstevel@tonic-gate 
20*7c478bd9Sstevel@tonic-gate # include <sm/gen.h>
21*7c478bd9Sstevel@tonic-gate 
22*7c478bd9Sstevel@tonic-gate #  define SM_PATH_DEVNULL	"/dev/null"
23*7c478bd9Sstevel@tonic-gate #  define SM_IS_DIR_DELIM(c)	((c) == '/')
24*7c478bd9Sstevel@tonic-gate #  define SM_FIRST_DIR_DELIM(s)	strchr(s, '/')
25*7c478bd9Sstevel@tonic-gate #  define SM_LAST_DIR_DELIM(s)	strrchr(s, '/')
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /* Warning: this must be accessible as array */
28*7c478bd9Sstevel@tonic-gate #  define SM_IS_DIR_START(s)	((s)[0] == '/')
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #  define sm_path_isdevnull(path)	(strcmp(path, "/dev/null") == 0)
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate #endif /* ! SM_PATH_H */
33