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