[pcre-dev] [Bug 1038] New: memcmp not available in pcrecpp_…

Top Page
Delete this message
Author: Thorsten Schöning
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1038] New: 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
           Summary: memcmp not available in pcrecpp_stringpiece.h compiling
                    with BCB 6
           Product: PCRE
           Version: 8.10
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: tschoening@???
                CC: pcre-dev@???



Created an attachment (id=411)
--> (http://bugs.exim.org/attachment.cgi?id=411)
patch to include mem.h in BCB 6

Hello,

I didn't find why, but compiling pcrecpp using Borland Builder 6 memcmp can't
be found if mem.h is not included separatly in pcrecpp_stringpiece.h. It works
in BCB 5 and the header files seem to me that mem.h is included using string.h
and _str.h, even __MEM_H seems to be defined. But memcmp is not available until
mem.h is included on it's own.

Index: pcre_stringpiece.h
===================================================================
--- pcre_stringpiece.h  (Revision 1701)
+++ pcre_stringpiece.h  (Arbeitskopie)
@@ -42,6 +42,12 @@
 #include <string>
 #include <iosfwd>    // for ostream forward-declaration


+// mem.h should already have been included by string.h and _str.h here,
because
+// __MEM_H is defined, but somehow it isn't in at least BCB 6.
+#if defined(__MEM_H) && defined(__BORLANDC__) && (__BORLANDC__ >= 0x0560)
+#include <mem.h>
+#endif
+
#if PCRE_HAVE_TYPE_TRAITS
#define HAVE_TYPE_TRAITS
#include <type_traits.h>


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