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