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: limits.h,v 1.6 2001/03/08 03:23:08 ca Exp $ 10*7c478bd9Sstevel@tonic-gate */ 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 13*7c478bd9Sstevel@tonic-gate 14*7c478bd9Sstevel@tonic-gate /* 15*7c478bd9Sstevel@tonic-gate ** <sm/limits.h> 16*7c478bd9Sstevel@tonic-gate ** This header file is a portability wrapper for <limits.h>. 17*7c478bd9Sstevel@tonic-gate ** It includes <limits.h>, then it ensures that the following macros 18*7c478bd9Sstevel@tonic-gate ** from the C 1999 standard for <limits.h> are defined: 19*7c478bd9Sstevel@tonic-gate ** LLONG_MIN, LLONG_MAX 20*7c478bd9Sstevel@tonic-gate ** ULLONG_MAX 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate 23*7c478bd9Sstevel@tonic-gate #ifndef SM_LIMITS_H 24*7c478bd9Sstevel@tonic-gate # define SM_LIMITS_H 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate # include <limits.h> 27*7c478bd9Sstevel@tonic-gate # include <sm/types.h> 28*7c478bd9Sstevel@tonic-gate # include <sys/param.h> 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate /* 31*7c478bd9Sstevel@tonic-gate ** The following assumes two's complement binary arithmetic. 32*7c478bd9Sstevel@tonic-gate */ 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate # ifndef LLONG_MIN 35*7c478bd9Sstevel@tonic-gate # define LLONG_MIN ((LONGLONG_T)(~(ULLONG_MAX >> 1))) 36*7c478bd9Sstevel@tonic-gate # endif /* ! LLONG_MIN */ 37*7c478bd9Sstevel@tonic-gate # ifndef LLONG_MAX 38*7c478bd9Sstevel@tonic-gate # define LLONG_MAX ((LONGLONG_T)(ULLONG_MAX >> 1)) 39*7c478bd9Sstevel@tonic-gate # endif /* ! LLONG_MAX */ 40*7c478bd9Sstevel@tonic-gate # ifndef ULLONG_MAX 41*7c478bd9Sstevel@tonic-gate # define ULLONG_MAX ((ULONGLONG_T)(-1)) 42*7c478bd9Sstevel@tonic-gate # endif /* ! ULLONG_MAX */ 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate /* 45*7c478bd9Sstevel@tonic-gate ** PATH_MAX is defined by the POSIX standard. All modern systems 46*7c478bd9Sstevel@tonic-gate ** provide it. Older systems define MAXPATHLEN in <sys/param.h> instead. 47*7c478bd9Sstevel@tonic-gate */ 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate # ifndef PATH_MAX 50*7c478bd9Sstevel@tonic-gate # ifdef MAXPATHLEN 51*7c478bd9Sstevel@tonic-gate # define PATH_MAX MAXPATHLEN 52*7c478bd9Sstevel@tonic-gate # else /* MAXPATHLEN */ 53*7c478bd9Sstevel@tonic-gate # define PATH_MAX 2048 54*7c478bd9Sstevel@tonic-gate # endif /* MAXPATHLEN */ 55*7c478bd9Sstevel@tonic-gate # endif /* ! PATH_MAX */ 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate #endif /* ! SM_LIMITS_H */ 58