/*
 * Copyright (c) 1996-2004 MIPS Technologies, Inc.
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 
 *      * Redistributions of source code must retain the above copyright
 *        notice, this list of conditions and the following disclaimer.
 *      * Redistributions in binary form must reproduce the above
 *      copyright
 *        notice, this list of conditions and the following disclaimer
 *        in the documentation and/or other materials provided with
 *        the distribution.
 *      * Neither the name of MIPS Technologies Inc. nor the names of its
 *        contributors may be used to endorse or promote products derived
 *        from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * ansi.h : machine dependent ANSI type definitions
 */


#ifndef __MIPS_ANSI_H_
#define __MIPS_ANSI_H_
#define _ANSI_H_

/*
 * Types which are fundamental to the implementation and may appear in
 * more than one standard header are defined here.  Standard headers
 * then use:
 *	#ifdef	_SIZE_T_
 *	typedef	_SIZE_T_ size_t;
 *	#undef	_SIZE_T_
 *	#endif
 */

/* Types which may be defined by compiler. */

#ifdef __SIZE_TYPE__
#define _SIZE_T_	__SIZE_TYPE__
/* gcc >= 3.x */
#else
/* gcc < 3.x */
#define _SIZE_T_	__typeof(sizeof(int))
#endif

#ifdef __PTRDIFF_TYPE__
/* gcc >= 3.x */
#define _PTRDIFF_T_	__PTRDIFF_TYPE__
#else
/* gcc < 3.x */
#define _PTRDIFF_T_	long
#endif

#ifdef __WCHAR_TYPE__
#define _WCHAR_T_	__WCHAR_TYPE__
#else
#define _WCHAR_T_	int
#endif

#ifdef __WINT_TYPE__
#define _WINT_T_	__WINT_TYPE__
#else
#define _WINT_T_	unsigned int
#endif

/* system types - not defined by compiler */
#define _SSIZE_T_	long
#define _OFF_T_		int64_t
#define _CLOCK_T_	unsigned long
#define _TIME_T_	long
#define _VA_LIST_	void *
#define _TIMER_T_	void *
#define _CLOCKID_T_	int

#endif /* !__MIPS_ANSI_H */
