/*******************************************************************************
*        : ExDefs.h
* ес :
*          :
*        :
*        : 2018.07.13
*      :
*******************************************************************************/

#ifndef	__EX_DEFS_H__
#define	__EX_DEFS_H__

/******************************************************************************/
/* include files */

#include	<stdio.h>
#include	<stdlib.h>
#include	<stdarg.h>
#include	<string.h>
#include	<errno.h>
#include	<limits.h>
#include	<signal.h>
#include	<time.h>
#include	<sys/time.h>
#include	<sys/types.h>
#include	<sys/shm.h>
#include	<sys/ipc.h>
#include	<sys/socket.h>
#include	<netinet/in.h>
#include	<fcntl.h>
#ifdef _LINUX
#include	<wait.h>
#endif

#ifdef	__cplusplus
extern "C" {
#endif	/*__cplusplus*/

	/**************************************************************************/
	/* literal constants */

	#ifdef	BUFSIZ
		#undef	BUFSIZ
		#define	BUFSIZ					(1024)
	#endif

	#ifndef	TRUE
		#define	TRUE					(0==0)
	#endif	/*TRUE*/

	#ifndef	FALSE
		#define	FALSE					(0==1)
	#endif	/*FALSE*/

	#define	SUCCESS						(0)
	#define	ERROR						(-1)

	#define	OK							(0)
	#define	NOK							(-1)

	#define	BEGIN_FOREVER				for(;;)

	/**************************************************************************/
	/* type definitions */

	typedef char			CHAR, *PCHAR;		/* cVariable */
    typedef char			INT8, *PINT8;		/* i8Variable */
    typedef char			S8, *PS8;			/* cVariable or i8Variable */
    typedef unsigned char	UINT8, *PUINT8;		/* ui8Variable */
    typedef unsigned char	U8, *PU8;			/* ui8Variable */
    typedef unsigned char	BOOL, *PBOOL;		/* bVariable */
    typedef short			INT16, *PINT16;		/* i16Variable */
    typedef short			S16, *PS16;			/* i16Variable */
    typedef unsigned short	UINT16, *PUINT16;	/* ui16Variable */
    typedef unsigned short	U16, *PU16;			/* uiVariable */
    typedef int				INT32, *PINT32;		/* i32Variable */
    typedef int				S32, *PS32;			/* i32Variable */
    typedef unsigned int	UINT32, *PUINT32;	/* ui32Variable */
    typedef unsigned int	U32, *PU32;			/* ui32Variable */
    typedef float			FLOAT, *PFLOAT;		/* fVariable */
    typedef double			DOUBLE, *PDOUBLE;	/* dVariable */
    typedef long			LONG, *PLONG;		/* lVariable */
    typedef unsigned long	ULONG, *PULONG;		/* ulVariable */
    typedef void			VOID, *PVOID;		/* pvVariable */
		
	/**************************************************************************/
	/* function proto-types */

	/**************************************************************************/
	/* variables */

#ifdef	__cplusplus
}
#endif	/*__cplusplus*/

#endif	/*__EX_DEFS_H__*/
