2 * $Id: defines.h,v 0.0.0.1 2003/08/21
4 * AUTHOR: Petr Smolik petr.smolik@wo.cz
6 * ORTE - OCERA Real-Time Ethernet http://www.ocera.org/
7 * --------------------------------------------------------------------
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.
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.
28 #define RTPS_DEFAULT_PORT 7400
30 #define MAX_PARAMETER_LOCAL_LENGTH 8 //min 8 bytes !!!
33 //#define ENABLE_MEM_CHECK
35 //////////////////////////////////////////////////////////////////////////////
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
45 #define REALLOC realloc
47 #define MALLOC mem_check_malloc
48 #define FREE mem_check_free
49 #define REALLOC mem_check_realloc
52 //////////////////////////////////////////////////////////////////////////////
54 // We #undef these before defining them because some losing systems
55 // (HP-UX A.08.07 for example) define these in <unistd.h>.
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. */
69 //////////////////////////////////////////////////////////////////////////////
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
77 #define GUID_PRINTF(g) (g).hid,(g).aid,(g).oid
84 #endif /* _DEFINES_H */