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: types.h,v 1.13 2001/04/03 01:53:01 gshapiro 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 ** This header file defines standard integral types. 16*7c478bd9Sstevel@tonic-gate ** - It includes <sys/types.h>, and fixes portability problems that 17*7c478bd9Sstevel@tonic-gate ** exist on older Unix platforms. 18*7c478bd9Sstevel@tonic-gate ** - It defines LONGLONG_T and ULONGLONG_T, which are portable locutions 19*7c478bd9Sstevel@tonic-gate ** for 'long long' and 'unsigned long long'. 20*7c478bd9Sstevel@tonic-gate */ 21*7c478bd9Sstevel@tonic-gate 22*7c478bd9Sstevel@tonic-gate #ifndef SM_TYPES_H 23*7c478bd9Sstevel@tonic-gate # define SM_TYPES_H 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate # include <sm/config.h> 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* 28*7c478bd9Sstevel@tonic-gate ** On BSD 4.2 systems, <sys/types.h> was not idempotent. 29*7c478bd9Sstevel@tonic-gate ** This problem is circumvented by replacing all occurrences 30*7c478bd9Sstevel@tonic-gate ** of <sys/types.h> with <sm/types.h>, which is idempotent. 31*7c478bd9Sstevel@tonic-gate */ 32*7c478bd9Sstevel@tonic-gate 33*7c478bd9Sstevel@tonic-gate # include <sys/types.h> 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate /* 36*7c478bd9Sstevel@tonic-gate ** On some old Unix platforms, some of the standard types are missing. 37*7c478bd9Sstevel@tonic-gate ** We fix that here. 38*7c478bd9Sstevel@tonic-gate */ 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate # if !SM_CONF_UID_GID 41*7c478bd9Sstevel@tonic-gate # define uid_t int 42*7c478bd9Sstevel@tonic-gate # define gid_t int 43*7c478bd9Sstevel@tonic-gate # endif /* !SM_CONF_UID_GID */ 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate # if !SM_CONF_SSIZE_T 46*7c478bd9Sstevel@tonic-gate # define ssize_t int 47*7c478bd9Sstevel@tonic-gate # endif /* !SM_CONF_SSIZE_T */ 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate /* 50*7c478bd9Sstevel@tonic-gate ** Define LONGLONG_T and ULONGLONG_T, which are portable locutions 51*7c478bd9Sstevel@tonic-gate ** for 'long long' and 'unsigned long long' from the C 1999 standard. 52*7c478bd9Sstevel@tonic-gate */ 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate # if SM_CONF_LONGLONG 55*7c478bd9Sstevel@tonic-gate typedef long long LONGLONG_T; 56*7c478bd9Sstevel@tonic-gate typedef unsigned long long ULONGLONG_T; 57*7c478bd9Sstevel@tonic-gate # else /* SM_CONF_LONGLONG */ 58*7c478bd9Sstevel@tonic-gate # if SM_CONF_QUAD_T 59*7c478bd9Sstevel@tonic-gate typedef quad_t LONGLONG_T; 60*7c478bd9Sstevel@tonic-gate typedef u_quad_t ULONGLONG_T; 61*7c478bd9Sstevel@tonic-gate # else /* SM_CONF_QUAD_T */ 62*7c478bd9Sstevel@tonic-gate typedef long LONGLONG_T; 63*7c478bd9Sstevel@tonic-gate typedef unsigned long ULONGLONG_T; 64*7c478bd9Sstevel@tonic-gate # endif /* SM_CONF_QUAD_T */ 65*7c478bd9Sstevel@tonic-gate # endif /* SM_CONF_LONGLONG */ 66*7c478bd9Sstevel@tonic-gate 67*7c478bd9Sstevel@tonic-gate #endif /* ! SM_TYPES_H */ 68