/*=Top=of=Header================================================================
*
*  Module-Name: RNAV
*
*  File:	    macros.h
*
*  Project:     TIGER
*
*+-----------------------------------------------------------------------------+
*|                                                                             |
*|     S T N    A t l a s    E l e k t r o n i k    G m b H     B r e m e n    |
*|                                                                             |
*|     For  this software  product we  reserve all  rights, including those    |
*|     relating to patents or registered designs. It must not be reproduced    |
*|     or used  otherwise or made available  to any third party without our    |
*|     prior permission in writing.                                            |
*|                                                                             |
*+-----------------------------------------------------------------------------+
*
*  Brief Description:
*	global macro definitions
*
*
*
*  Parameters: 
*
*  Output parameter :
*
*
*  Input parameter :
*
*  Language:
*
*           ANSI-C
*
*  Peripherals used:
*
*           none
*
*  Functions used:
*
*           none
*
*-------------------------------------------------------------------------------
*
*  Project:         TIGER
*
*  Item Number:     SG 5133 G 004
*
*  Release Date:    07.08.02
*
*  Validity Grade:  GS2
*
*  Revision:        1.1
*
*  Revision Date:
*
*  Author:          M.Braun
*
*  Department:	    SFT
*
*-------------------------------------------------------------------------------
*
*  Long Description:
*	global macro definitions
*
*
*  Rule for use:
*
*
*-------------------------------------------------------------------------------
*
*  Modifications:
*
*   Date: 07.08.2002    Name: M.Braun
*   Comment: 
*
*
*=Bottom=of=Header============================================================*/




#ifndef _macros_h_
#define _macros_h_

/* ----------------------------------------------------------------------------------- */

/* some general enums */

#if (!ACT_OPSYS == OPSYS_WIN32) && (0)

typedef enum
{
	false,
	true
} bool;

/* #define BOOL(a) ((a) ? true : false) */
#define BOOL 

#define BOOL_1_BYTE  0

#else

#define BOOL_1_BYTE  1

#endif



/* some general defines */

#define IDMODULE_ACTIVE  0	/* 0: to avoid compiler warnings */
							/* 1: for final version */

#ifndef lengthof
#define lengthof(A) (sizeof(A)/sizeof(A[0]))	/* number of array elements */
#endif

#ifndef min
#define min(a,b)    (((a) < (b)) ? (a) : (b))
#endif

#ifndef max
#define max(a,b)    (((a) > (b)) ? (a) : (b))
#endif



/* some general typedefs */

#if (ACT_OPSYS == OPSYS_LINUX)

#ifndef timespec_t
typedef struct timespec timespec_t;
#endif

#else

#ifndef key_t
typedef int key_t;
#endif

#ifndef socklen_t
typedef int socklen_t;
#endif

#endif


/* ----------------------------------------------------------------------------------- */


#endif /* _macros_h_ */

