[pcre-dev] [Bug 1038] memcmp not available in pcrecpp_string…

Góra strony
Delete this message
Autor: Thorsten Schöning
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1038] memcmp not available in pcrecpp_stringpiece.h compiling with BCB 6
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1038




--- Comment #21 from Thorsten Schöning <tschoening@???> 2010-11-23 08:43:16 ---
(In reply to comment #20)
> Let's try a few things first. What happens if you just change
> pcre_stringpiece.h so the #include of <string.h> comes last of all the
> #includes?


Doesn't work, what does work is using std::memcmp;, therefore it seems the
following xould be part of the problem:

#if defined(__cplusplus) && !defined(__USING_CNAME__) &&
!defined(__MEM_H_USING_LIST)
#define __MEM_H_USING_LIST
[...]

I tested using

#ifndef _PCRE_STRINGPIECE_H
#define _PCRE_STRINGPIECE_H

#ifdef __USING_CNAME__
#error 1
#endif

#ifdef __MEM_H_USING_LIST
#error 1
#endif

before including string.h and the compiler throw the error of
__MEM_H_USING_LIST. The interesting thing is that the same error is thrown with
BCB 5, which does work without my patch. The diff of mem.h for Borland 5 and 6:

--- D:/Temp/mem.h       Mo  7. Aug 05:01:00 2000
+++ D:/Temp/mem.h.bcb6  Mi 13. Feb 07:00:00 2002
@@ -5,21 +5,19 @@
 */


 /*
- *      C/C++ Run Time Library - Version 10.0
+ *      C/C++ Run Time Library - Version 11.0
  *
- *      Copyright (c) 1987, 2000 by Inprise Corporation
+ *      Copyright (c) 1987, 2002 by Borland Software Corporation
  *      All Rights Reserved.
  *
  */


-/* $Revision: 9.4.1.0 $ */
+/* $Revision: 9.8.2.1 $ */

#if !defined(__MEM_H)
#define __MEM_H

-#ifndef ___STDDEF_H
#include <_stddef.h>
-#endif

#if !defined(RC_INVOKED)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email