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

StdLib/Include/Ipf/machine/ansi.h

Go to the documentation of this file.
00001 /*  $NetBSD: ansi.h,v 1.3 2006/10/04 13:52:00 tnozaki Exp $ */
00002 
00003 /*-
00004  * Copyright (c) 1990, 1993
00005  *  The Regents of the University of California.  All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer.
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  * 3. Neither the name of the University nor the names of its contributors
00016  *    may be used to endorse or promote products derived from this software
00017  *    without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00020  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00022  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00023  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00024  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00025  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00026  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00027  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00028  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00029  * SUCH DAMAGE.
00030  *
00031  *  @(#)ansi.h  8.2 (Berkeley) 1/4/94
00032  */
00033 
00034 #ifndef _ANSI_H_
00035 #define _ANSI_H_
00036 
00037 #include <sys/EfiCdefs.h>
00038 #include <machine/int_types.h>
00039 
00040 /*
00041  * Types which are fundamental to the implementation and may appear in
00042  * more than one standard header are defined here.  Standard headers
00043  * then use:
00044  *      #ifdef  _SIZE_T_
00045  *      typedef _SIZE_T_ size_t;
00046  *      #undef  _SIZE_T_
00047  *      #endif
00048  *
00049  * Thanks, ANSI!
00050  */
00051 #define _BSD_CLOCK_T_     _EFI_CLOCK_T      /* clock() */
00052 #define _BSD_PTRDIFF_T_   _EFI_PTRDIFF_T_   /* ptr1 - ptr2 */
00053 #define _BSD_SIZE_T_      _EFI_SIZE_T_      /* sizeof() */
00054 #define _BSD_SSIZE_T_     INTN              /* byte count or error */
00055 #define _BSD_TIME_T_      _EFI_TIME_T       /* time() */
00056 
00057 #define _BSD_VA_LIST_     VA_LIST
00058 #define _BSD_CLOCKID_T_   INT64             /* clockid_t */
00059 #define _BSD_TIMER_T_     INT64             /* timer_t */
00060 #define _BSD_SUSECONDS_T_ INT64             /* suseconds_t */
00061 #define _BSD_USECONDS_T_  UINT64            /* useconds_t */
00062 
00063 /*
00064  * NOTE: rune_t is not covered by ANSI nor other standards, and should not
00065  * be instantiated outside of lib/libc/locale.  use wchar_t.
00066  *
00067  * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
00068  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
00069  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
00070  * it looks like 10646 will be a 31 bit standard.  This means that if your
00071  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
00072  * chosen over a long is that the is*() and to*() routines take ints (says
00073  * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
00074  * lose a bit of ANSI conformance, but your programs will still work.
00075  *
00076  * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
00077  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
00078  * defined for ctype.h.
00079  */
00080 #define _BSD_WCHAR_T_     _EFI_WCHAR_T    /* wchar_t */
00081 #define _BSD_WINT_T_      _EFI_WINT_T     /* wint_t */
00082 #define _BSD_RUNE_T_      _EFI_WCHAR_T    /* rune_t */
00083 #define _BSD_WCTRANS_T_   void *          /* wctrans_t */
00084 #define _BSD_WCTYPE_T_    unsigned int    /* wctype_t */
00085 /*
00086  * mbstate_t is an opaque object to keep conversion state, during multibyte
00087  * stream conversions.  The content must not be referenced by user programs.
00088  */
00089 typedef union {
00090   __int64_t __mbstateL; /* for alignment */
00091   char __mbstate8[128];
00092 } __mbstate_t;
00093 #define _BSD_MBSTATE_T_   __mbstate_t /* mbstate_t */
00094 
00095 #endif  /* _ANSI_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines