/*
 * $Id: pthread-cdecl.h,v 1.3 2000/09/22 22:05:18 k-abe Exp $
 *
 * This file is part of PTL, Portable Thread Library.
 *
 * Copyright (C) 1997-2000 Kota Abe
 *
 */

#ifndef	__PTL_SYS_PTHREAD_CDECL_H__
#define	__PTL_SYS_PTHREAD_CDECL_H__

#ifdef __cplusplus
# define __PTL_P(arg)		arg
# define __PTL_NOARGS		()
# define __PTL_BEGIN_DECLS	extern "C" {
# define __PTL_END_DECLS	};
typedef void			*_pthread_any_t;
typedef const void		*_pthread_const_any_t;
#else /* !__cplusplus */

#ifdef __STDC__
# define __PTL_P(arg)		arg
# define __PTL_NOARGS		(void)
# define __PTL_BEGIN_DECLS	/* empty */
# define __PTL_END_DECLS	/* empty */
typedef	void			*_pthread_any_t;
typedef const void		*_pthread_const_any_t;

#else /* !__cplusplus && !__STDC__ */
# define __PTL_P(arg)		()
# define __PTL_NOARGS		()
# define __PTL_BEGIN_DECLS	/* empty */
# define __PTL_END_DECLS	/* empty */
# undef volatile
# define volatile		/* empty */
# undef const
# define const			/* empty */
typedef char			*_pthread_any_t;
typedef char			*_pthread_const_any_t;

#endif /* !__STDC__ */
#endif /* !__cplusplus */

#ifdef __GNUC__
#define	__PTL_NORET		__attribute__((noreturn))
#else
#define	__PTL_NORET		/* empty */
#define	inline			/* empty */
#endif

#if !defined(__GNUC__) || (__GNUC__ < 2)
# define __FUNCTION__		0
#endif

#endif /* __PTL_SYS_PTHREAD_CDECL_H__ */
