Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:28:30

0001 // © 2016 and later: Unicode, Inc. and others.
0002 // License & terms of use: http://www.unicode.org/copyright.html
0003 /*
0004 ******************************************************************************
0005 *
0006 *   Copyright (C) 1997-2012, International Business Machines
0007 *   Corporation and others.  All Rights Reserved.
0008 *
0009 ******************************************************************************
0010 *
0011 *  FILE NAME : ptypes.h
0012 *
0013 *   Date        Name        Description
0014 *   05/13/98    nos         Creation (content moved here from ptypes.h).
0015 *   03/02/99    stephen     Added AS400 support.
0016 *   03/30/99    stephen     Added Linux support.
0017 *   04/13/99    stephen     Reworked for autoconf.
0018 *   09/18/08    srl         Moved basic types back to ptypes.h from platform.h
0019 ******************************************************************************
0020 */
0021 
0022 /**
0023  * \file
0024  * \brief C API: Definitions of integer types of various widths
0025  */
0026 
0027 #ifndef _PTYPES_H
0028 #define _PTYPES_H
0029 
0030 /**
0031  * \def __STDC_LIMIT_MACROS
0032  * According to the Linux stdint.h, the ISO C99 standard specifies that in C++ implementations
0033  * macros like INT32_MIN and UINTPTR_MAX should only be defined if explicitly requested.
0034  * We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ code
0035  * that uses such limit macros.
0036  * @internal
0037  */
0038 #ifndef __STDC_LIMIT_MACROS
0039 #define __STDC_LIMIT_MACROS
0040 #endif
0041 
0042 /* NULL, size_t, wchar_t */
0043 #include <stddef.h>
0044 
0045 /* More platform-specific definitions. */
0046 #include "unicode/platform.h"
0047 
0048 /*===========================================================================*/
0049 /* Generic data types                                                        */
0050 /*===========================================================================*/
0051 
0052 #include <stdint.h>
0053 
0054 // C++11 and C11 both specify that the data type char16_t should exist, C++11
0055 // as a keyword and C11 as a typedef in the uchar.h header file, but not all
0056 // implementations (looking at you, Apple, spring 2024) actually do this, so
0057 // ICU4C must detect and deal with that.
0058 #if !defined(__cplusplus) && !defined(U_IN_DOXYGEN)
0059 #   if U_HAVE_CHAR16_T
0060 #       include <uchar.h>
0061 #   else
0062         typedef uint16_t char16_t;
0063 #   endif
0064 #endif
0065 
0066 #endif /* _PTYPES_H */