//	Zinc Application Framework - Z_STDLIB.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#if !defined(Z_STDLIB_HPP)
#define Z_STDLIB_HPP
#include <z_env.hpp>

#include <stdlib.h>
#if defined(__DECCXX) || (defined(__GNUC__) && defined(__alpha__)) || defined(_SUNOS4)
#	include <z_unistd.hpp>
#endif

#if defined(ZAF_ISO8859_1)
	ZAF_EXPORT ZafIChar *ZafGetEnv(const ZafIChar *envname);
#	define OSgetenv getenv
#	define getenv ZafGetEnv
#	if defined(_SUNOS4) && !defined(__GNUC__)
	extern "C++" ZAF_EXPORT unsigned long strtoul(const ZafIChar *s, ZafIChar **endptr, int radix);
#	endif
#elif defined(ZAF_UNICODE)
	extern "C++" ZAF_EXPORT ZafIChar *getenv(const ZafIChar *envname);

	extern "C++" ZAF_EXPORT double atof(const ZafIChar *nptr);
	extern "C++" ZAF_EXPORT int atoi(const ZafIChar *nptr);
	extern "C++" ZAF_EXPORT long atol(const ZafIChar *nptr);
	extern "C++" ZAF_EXPORT double strtod(const ZafIChar *s, ZafIChar **endptr);
	extern "C++" ZAF_EXPORT long strtol(const ZafIChar *s, ZafIChar **endptr, int radix);
	extern "C++" ZAF_EXPORT unsigned long strtoul(const ZafIChar *s, ZafIChar **endptr, int radix);
#endif

ZAF_EXPORT void itoa(ZafInt32 value, ZafIChar *string, int radix, int pad);

#endif
