#ifndef _G_config_h
#define _G_config_h

// This files contains various system-dependent typedefs and defines.
// The file only defines names in the implementor's namespace.
// E.g. We define _G_size_t and not size_t.
// Thus other include files can safely use _G_size_t without clashes.
// In the long run, we should probably have a separate file
// for each configuration.

// i dunno about the orig, its rather sleezy,
//  here are the defs for atariST (ahould be this way for any machine with
//  even halfway decent header file).

#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <stdarg.h>

#ifndef _G_size_t
#define _G_size_t size_t
#endif

#ifndef _G_ssize_t
#define _G_ssize_t long
#endif

#ifndef _G_time_t
#define _G_time_t time_t
#endif

// Use _G_const for parameters that ought to be const,
// but might not be in the vendor include files.

#ifndef _G_const
#define _G_const const
#endif

#ifndef _G_va_list
#define _G_va_list va_list
#endif

#ifndef _G_fpos_t
#define _G_fpos_t fpos_t
#endif

#ifndef _G_off_t
#define _G_off_t long
#endif

#ifndef _G_FOPEN_MAX
#define _G_FOPEN_MAX FOPEN_MAX
#endif

#ifndef _G_FILENAME_MAX
#define _G_FILENAME_MAX FILENAME_MAX
#endif

#ifndef _G_ARGS
#define _G_ARGS(X) X
#endif

#ifndef _G_BROKEN_SIGNED_CHAR
#define _G_BROKEN_SIGNED_CHAR 1 /* seems to be needed */
#endif

#ifndef __MINT__
#  ifdef _G_HAVE_SYS_RESOURCE
#    undef _G_HAVE_SYS_RESOURCE
#  endif
#else
#  ifndef _G_HAVE_SYS_RESOURCE
#    define _G_HAVE_SYS_RESOURCE 1
#  endif
#endif

#ifdef _G_HAVE_ST_BLKSIZE
#undef _G_HAVE_ST_BLKSIZE
#endif

//
// NOTE: _G_BUFSIZ is used in contexts where it would make arrays dynamic.
// gcc groks that just fine. other compilers will break. (a simple solution
// would be to replace such contexts with alloca()'s)

extern "C" extern unsigned long __DEFAULT_BUFSIZ__;
#define _G_BUFSIZ __DEFAULT_BUFSIZ__

#ifndef _G_NAMES_HAVE_UNDERSCORE
#define _G_NAMES_HAVE_UNDERSCORE 1
#endif

#ifndef _G_DOLLAR_IN_LABEL
#define _G_DOLLAR_IN_LABEL 1
#endif

#ifndef _G_FRIEND_BUG
#define _G_FRIEND_BUG 1
#endif

#ifdef _G_NEED_STDARG_H
#undef _G_NEED_STDARG_H	/* already included above */
#endif

#endif /* !_G_config_h */
