2 * $Id: defines.h,v 0.0.0.1 2003/08/21
4 * -------------------------------------------------------------------
6 * Open Real-Time Ethernet
8 * Copyright (C) 2001-2006
9 * Department of Control Engineering FEE CTU Prague, Czech Republic
10 * http://dce.felk.cvut.cz
11 * http://www.ocera.org
13 * Author: Petr Smolik petr.smolik@wo.cz
15 * Project Responsible: Zdenek Hanzalek
16 * --------------------------------------------------------------------
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
37 #define RTPS_DEFAULT_PORT 7400
39 #define MAX_PARAMETER_LOCAL_LENGTH 8 //min 8 bytes !!!
42 //#define ENABLE_MEM_CHECK
44 //////////////////////////////////////////////////////////////////////////////
46 #define MAX_DEBUG_SECTIONS 100
47 #define MAX_DEBUG_LEVEL 10
48 #define debug(SECTION, LEVEL) \
49 ((LEVEL) > MAX_DEBUG_LEVEL) ? (void) 0 : \
50 ((db_level = (LEVEL)) > debugLevels[SECTION]) ? (void) 0 : db_print
51 #ifndef ENABLE_MEM_CHECK
55 #define MALLOC mem_check_malloc
56 #define FREE mem_check_free
59 //////////////////////////////////////////////////////////////////////////////
61 // We #undef these before defining them because some losing systems
62 // (HP-UX A.08.07 for example) define these in <unistd.h>.
66 /* Bits set in the FLAGS argument to `fnmatch'. */
67 #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
68 #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
69 #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
70 #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
71 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
72 #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
73 /* Value returned by `fnmatch' if STRING does not match PATTERN. */
76 //////////////////////////////////////////////////////////////////////////////
78 #define HASH_LOADFACTOR 0.8
79 // Deleted entry indicator
80 #define HASH_EMPTY 0x00000000
81 #define HASH_INUSE 0x11111111
82 #define HASH_DELETED 0xffffffff
84 #define GUID_PRINTF(g) (g).hid,(g).aid,(g).oid
91 #endif /* _DEFINES_H */