Changeset 31843 in vbox for trunk/include
- Timestamp:
- Aug 21, 2010 7:02:44 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65045
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/string.h
r31419 r31843 35 35 # include <linux/string.h> 36 36 #elif defined(RT_OS_FREEBSD) && defined(_KERNEL) 37 /** 38 * XXX: Very ugly hack to get things build on recent FreeBSD 39 * builds. They have memchr now and we need to include 40 * param.h to get __FreeBSD_version and make 41 * memchr available based on the version below 42 * or we can't compile the kernel module on 43 * older versions anymore. 44 * 45 * But including param.h here opens Pandora's box 46 * because we clash with a few defines 47 * namely PVM and PAGE_SIZE. 48 * We can safely undefine PVM here but not PAGE_SIZE 49 * because this results in build errors sooner or later. 50 * Luckily this define is in a header included by param.h 51 * (machine/param.h). We define the guards here 52 * to prevent inclusion of it if PAGE_SIZE 53 * was defined already. 54 * 55 * @todo r=aeichner: Search for an elegant solution 56 * and cleanup this mess ASAP! 57 */ 58 # ifdef PAGE_SIZE 59 # define _AMD64_INCLUDE_PARAM_H_ 60 # define _I386_INCLUDE_PARAM_H_ 61 # endif 62 # include <sys/param.h> /* __FreeBSD_version */ 63 # undef PVM 37 64 # include <sys/libkern.h> 38 65 /* … … 59 86 * IPRT instead of the operating environment. 60 87 */ 61 #if (defined(RT_OS_DARWIN) && defined(KERNEL)) \ 62 || (defined(RT_OS_FREEBSD) && defined(_KERNEL)) 88 #if defined(RT_OS_DARWIN) && defined(KERNEL) 63 89 RT_C_DECLS_BEGIN 64 90 void *memchr(const void *pv, int ch, size_t cb); … … 67 93 #endif 68 94 95 #if defined(RT_OS_FREEBSD) && defined(_KERNEL) 96 RT_C_DECLS_BEGIN 97 #if __FreeBSD_version < 900000 98 void *memchr(const void *pv, int ch, size_t cb); 99 #endif 100 char *strpbrk(const char *pszStr, const char *pszChars); 101 RT_C_DECLS_END 102 #endif 69 103 70 104 /** @def RT_USE_RTC_3629
Note:
See TracChangeset
for help on using the changeset viewer.