EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

StdLib/Include/X64/machine/ansi.h

Go to the documentation of this file.
00001 
00043 #ifndef _ANSI_H_
00044 #define _ANSI_H_
00045 
00046 #include  <sys/EfiCdefs.h>
00047 
00048 #include  <machine/int_types.h>
00049 
00050 /*
00051  * Types which are fundamental to the implementation and may appear in
00052  * more than one standard header are defined here.  Standard headers
00053  * then use:
00054  *  #ifdef  _BSD_SIZE_T_
00055  *  typedef _BSD_SIZE_T_ size_t;
00056  *  #undef  _BSD_SIZE_T_
00057  *  #endif
00058  */
00059 #define _BSD_CLOCK_T_     _EFI_CLOCK_T      /* clock() */
00060 #define _BSD_PTRDIFF_T_   _EFI_PTRDIFF_T_   /* ptr1 - ptr2 */
00061 #define _BSD_SIZE_T_      _EFI_SIZE_T_      /* sizeof() */
00062 #define _BSD_SSIZE_T_     INTN              /* byte count or error */
00063 #define _BSD_TIME_T_      _EFI_TIME_T       /* time() */
00064 #define _BSD_VA_LIST_     VA_LIST
00065 #define _BSD_CLOCKID_T_   INT64             /* clockid_t */
00066 #define _BSD_TIMER_T_     INT64             /* timer_t */
00067 #define _BSD_SUSECONDS_T_ INT64             /* suseconds_t */
00068 #define _BSD_USECONDS_T_  UINT64            /* useconds_t */
00069 
00070 /*
00071  * NOTE: rune_t is not covered by ANSI nor other standards, and should not
00072  * be instantiated outside of lib/libc/locale.  use wchar_t.
00073  *
00074  * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
00075  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
00076  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
00077  * it looks like 10646 will be a 31 bit standard.  This means that if your
00078  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
00079  * chosen over a long is that the is*() and to*() routines take ints (says
00080  * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
00081  * lose a bit of ANSI conformance, but your programs will still work.
00082  *
00083  * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
00084  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
00085  * defined for ctype.h.
00086  */
00087 #define _BSD_WCHAR_T_     _EFI_WCHAR_T    /* wchar_t */
00088 #define _BSD_WINT_T_      _EFI_WINT_T     /* wint_t */
00089 #define _BSD_RUNE_T_      _EFI_WCHAR_T    /* rune_t */
00090 #define _BSD_WCTRANS_T_   void *          /* wctrans_t */
00091 #define _BSD_WCTYPE_T_    unsigned int    /* wctype_t */
00092 
00093 /*
00094  * mbstate_t is an opaque object to keep conversion state, during multibyte
00095  * stream conversions.  The content must not be referenced by user programs.
00096  */
00097 typedef union {
00098   __int64_t __mbstateL; /* for alignment */
00099   char __mbstate8[128];
00100 } __mbstate_t;
00101 #define _BSD_MBSTATE_T_   __mbstate_t /* mbstate_t */
00102 
00103 #endif  /* _ANSI_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines