/*
 * $Id$
 *
 * Base udposix(3) configuration header file.
 */

#ifndef UD_udposix_h
#define UD_udposix_h

/*
 * Support for Standard C:
 */
#undef UD_NO_CONST
#undef UD_NO_SIGNED
#undef UD_NO_PROTOTYPES
#undef UD_NO_STRINGIZATION
#undef UD_NO_TOKEN_PASTING
#undef UD_NO_VOIDSTAR
#undef UD_NO_STDARG
#undef UD_NO_OFFSETOF_MACRO

#undef UD_NO_STRERROR_DECL
#undef UD_NO_ATEXIT_DECL
#undef UD_NO_STRSTR_DECL
#undef UD_NO_DIFFTIME_DECL


/*
 * Support for non-standard but common extensions:
 */
#undef UD_NO_FD_SET
#undef UD_NO_SELECT_DECL
#undef UD_NO_FD_MACROS


/*
 * Pathnames of system-supplied header files (except for float.h and 
 * limits.h):
 */
#define UD_SYSTEM_FLOAT_H	"///usr/include/float.h"
#define UD_SYSTEM_LIMITS_H	"///usr/include/limits.h"
#define UD_SYSTEM_SIGNAL_H	"///usr/include/signal.h"
#define UD_SYSTEM_STDARG_H	"///usr/include/stdarg.h"
#define UD_SYSTEM_STDDEF_H	"///usr/include/stddef.h"
#define UD_SYSTEM_STDLIB_H	"///usr/include/stdlib.h"
#define UD_SYSTEM_STRING_H	"///usr/include/string.h"
#define UD_SYSTEM_TIME_H	"///usr/include/time.h"
#define	UD_SYSTEM_SELECT_H	"/dev/null"


/*
 * Available non-POSIX functions:
 */
#undef HAVE_SIGVEC
#undef HAVE_SIGBLOCK
#undef HAVE_SIGPAUSE
#undef HAVE_SIGSETMASK
#undef HAVE_SIGSTACK
#undef HAVE_BSDSIGP
#undef HAVE_BCOPY
#undef HAVE_ON_EXIT


/*
 * Try to obtain a POSIX environment.
 */
#if 0
#ifndef _POSIX_SOURCE
#  define _POSIX_SOURCE
#endif
#endif


/*
 * Compiler keyword support.  Define whatever your compiler doesn't support
 * to nothing (e.g. `#define const').
 */
#ifndef linux
#ifdef UD_NO_CONST
#  define const
#endif
#ifdef UD_NO_SIGNED
#  define signed
#endif
#endif


/*
 * Function prototyping.  Define the following to `()' if your compiler 
 * doesn't support function prototyping.
 */
#ifdef UD_NO_PROTOTYPES
#  define UD_PROTO(args)	()
#else
#  define UD_PROTO(args)	args
#endif

/*
 * Additional macro support for function prototyping:
 */
#define UD_EXTERN_FUNC(type_name,args)	extern type_name UD_PROTO(args)
/*
 * Macros for backwards compatibility:
 */
#undef  EXTERN_FUNC
#define EXTERN_FUNC(type_name,args)	UD_EXTERN_FUNC(type_name,args)
#undef  PROTO
#define PROTO(args)			UD_PROTO(args)


/*
 * String-generation macro.  Define the following to `"x"' if your compiler
 * doesn't support Standard C stringization.
 */
#ifdef UD_NO_STRINGIZATION
#  define MAKESTRING_UD(x)	"x"
#endif

/*
 * Macro used in programs:
 */
#define UD_MAKESTRING(x)	MAKESTRING_UD(x)
/*
 * Macro for backwards compatibility:
 */
#define MAKESTRING(x)		UD_MAKESTRING(x)


/*
 * Token-pasting macro.
 */
#ifdef UD_NO_TOKEN_PASTING
#  define GLUE_UD(a,b)	a/**/b
#endif

/*
 * Macro used in programs:
 */
#define UD_GLUE(a,b)	GLUE_UD(a,b)
/*
 * Macro for backwards compatibility:
 */
#define GLUE(a,b)	UD_GLUE(a,b)


/*
 * Pointer-to-void type.  Define as `char*' if your compiler doesn't support
 * `void*'.
 */
#ifndef UD_FORTRAN_SOURCE
#  ifdef UD_NO_VOIDSTAR
       typedef char*	voidp;
#  else
       typedef void*	voidp;
#  endif
#endif

/*
 * Macro for backwards compatibility:
 */
#define VOIDP		voidp


/*
 * Define `statement' macro.
 */
#ifdef lint
      extern int	UD_ZERO;
#else
#     define UD_ZERO	0
#endif
#define UD_STMT(stuff) do {stuff} while (UD_ZERO)


#endif /* UD_udposix_h */
