2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
9 * $Id: limits.h,v 1.6 2001/03/08 03:23:08 ca Exp $
12 #pragma ident "%Z%%M% %I% %E% SMI"
16 ** This header file is a portability wrapper for <limits.h>.
17 ** It includes <limits.h>, then it ensures that the following macros
18 ** from the C 1999 standard for <limits.h> are defined:
19 ** LLONG_MIN, LLONG_MAX
27 # include <sm/types.h>
28 # include <sys/param.h>
31 ** The following assumes two's complement binary arithmetic.
35 # define LLONG_MIN ((LONGLONG_T)(~(ULLONG_MAX >> 1)))
36 # endif /* ! LLONG_MIN */
38 # define LLONG_MAX ((LONGLONG_T)(ULLONG_MAX >> 1))
39 # endif /* ! LLONG_MAX */
41 # define ULLONG_MAX ((ULONGLONG_T)(-1))
42 # endif /* ! ULLONG_MAX */
45 ** PATH_MAX is defined by the POSIX standard. All modern systems
46 ** provide it. Older systems define MAXPATHLEN in <sys/param.h> instead.
51 # define PATH_MAX MAXPATHLEN
52 # else /* MAXPATHLEN */
53 # define PATH_MAX 2048
54 # endif /* MAXPATHLEN */
55 # endif /* ! PATH_MAX */
57 #endif /* ! SM_LIMITS_H */