]> rtime.felk.cvut.cz Git - orte.git/blob - orte/include/defines.h
New ORTE version 0.3.0 committed
[orte.git] / orte / include / defines.h
1 /*
2  *  $Id: defines.h,v 0.0.0.1            2003/08/21 
3  *
4  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
5  *
6  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
7  *  --------------------------------------------------------------------
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *  
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *  
19  */
20
21 #ifndef _DEFINES_H
22 #define _DEFINES_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #define RTPS_DEFAULT_PORT           7400
29
30 #define MAX_PARAMETER_LOCAL_LENGTH  8     //min 8 bytes !!!
31
32
33 //#define ENABLE_MEM_CHECK
34
35 //////////////////////////////////////////////////////////////////////////////
36 // Debug
37 #define MAX_DEBUG_SECTIONS          100
38 #define MAX_DEBUG_LEVEL             10
39 #define debug(SECTION, LEVEL) \
40         ((LEVEL) > MAX_DEBUG_LEVEL) ? (void) 0 : \
41         ((db_level = (LEVEL)) > debugLevels[SECTION]) ? (void) 0 : db_print
42 #ifndef ENABLE_MEM_CHECK
43   #define MALLOC malloc
44   #define FREE   free
45   #define REALLOC realloc
46 #else
47   #define MALLOC mem_check_malloc
48   #define FREE   mem_check_free
49   #define REALLOC mem_check_realloc
50 #endif        
51         
52 //////////////////////////////////////////////////////////////////////////////
53 // fnmatch
54 // We #undef these before defining them because some losing systems
55 // (HP-UX A.08.07 for example) define these in <unistd.h>.
56 #undef  FNM_PATHNAME
57 #undef  FNM_NOESCAPE
58 #undef  FNM_PERIOD
59 /* Bits set in the FLAGS argument to `fnmatch'.  */
60 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
61 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
62 #define FNM_PERIOD  (1 << 2) /* Leading `.' is matched only explicitly.  */
63 #define FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
64 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match.  */
65 #define FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
66 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
67 #define FNM_NOMATCH 1
68
69 //////////////////////////////////////////////////////////////////////////////
70 // Hash
71 #define HASH_LOADFACTOR  0.8
72 // Deleted entry indicator
73 #define HASH_EMPTY       0x00000000
74 #define HASH_INUSE       0x11111111
75 #define HASH_DELETED     0xffffffff
76
77 #define GUID_PRINTF(g) (g).hid,(g).aid,(g).oid
78
79
80 #ifdef __cplusplus
81 } /* extern "C"*/
82 #endif
83
84 #endif /* _DEFINES_H */