/*
 * $Id: stdlib64.h,v 1.1 2003/02/07 18:15:44 wheeler Exp $
 *
 * $Log: stdlib64.h,v $
 * Revision 1.1  2003/02/07 18:15:44  wheeler
 * Fox's version of libultra and friends.
 *
 * Revision 1.6  1996/12/18  02:04:58  hayakawa
 * malloc,free,reallocの宣言を#include "malloc.h"に置き換え
 *
 * Revision 1.5  1996/12/02  02:25:30  hayakawa
 * 副作用を考えて、Absー＞ABSに変更
 *
 * Revision 1.4  1996/10/20  09:16:59  hayakawa
 * _LANGUAGE_C_PLUS_PLUS を __cplusplus に変更
 *
 */

#ifndef __STDLIB64_H_
#define __STDLIB64_H_

#ifdef __cplusplus
extern "C" {
#endif

/*
 * 以下の定義は /usr/include/stdlib.h から拾ってきました
 * size_t, ssize_t
 */
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
#define _SIZE_T
#if (_MIPS_SZLONG == 32)
typedef unsigned int	size_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef unsigned long	size_t;
#endif
#endif

#ifndef _SSIZE_T
#define _SSIZE_T
#if (_MIPS_SZLONG == 32)
typedef int	ssize_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef long	ssize_t;
#endif
#endif

#include "malloc.h"		/* malloc,free,realloc */

#define ABS(x) ((x) < 0 ? -(x) : (x))
int abs(int i);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __STDLIB64_H_ */
