140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers. 340266059SGregory Neil Shapiro * All rights reserved. 440266059SGregory Neil Shapiro * 540266059SGregory Neil Shapiro * By using this file, you agree to the terms and conditions set 640266059SGregory Neil Shapiro * forth in the LICENSE file which can be found at the top level of 740266059SGregory Neil Shapiro * the sendmail distribution. 840266059SGregory Neil Shapiro * 9*4313cc83SGregory Neil Shapiro * $Id: path.h,v 1.7 2013-11-22 20:51:31 ca Exp $ 1040266059SGregory Neil Shapiro */ 1140266059SGregory Neil Shapiro 1240266059SGregory Neil Shapiro /* 1340266059SGregory Neil Shapiro ** Portable names for standard filesystem paths 1440266059SGregory Neil Shapiro ** and macros for directories. 1540266059SGregory Neil Shapiro */ 1640266059SGregory Neil Shapiro 1740266059SGregory Neil Shapiro #ifndef SM_PATH_H 1840266059SGregory Neil Shapiro # define SM_PATH_H 1940266059SGregory Neil Shapiro 2040266059SGregory Neil Shapiro # include <sm/gen.h> 2140266059SGregory Neil Shapiro 2240266059SGregory Neil Shapiro # define SM_PATH_DEVNULL "/dev/null" 2340266059SGregory Neil Shapiro # define SM_IS_DIR_DELIM(c) ((c) == '/') 2440266059SGregory Neil Shapiro # define SM_FIRST_DIR_DELIM(s) strchr(s, '/') 2540266059SGregory Neil Shapiro # define SM_LAST_DIR_DELIM(s) strrchr(s, '/') 2640266059SGregory Neil Shapiro 2740266059SGregory Neil Shapiro /* Warning: this must be accessible as array */ 2840266059SGregory Neil Shapiro # define SM_IS_DIR_START(s) ((s)[0] == '/') 2940266059SGregory Neil Shapiro 3040266059SGregory Neil Shapiro # define sm_path_isdevnull(path) (strcmp(path, "/dev/null") == 0) 3140266059SGregory Neil Shapiro 3240266059SGregory Neil Shapiro #endif /* ! SM_PATH_H */ 33