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