Fixed some issues with calling conventions for Borland/Microsoft compilers

[SVN r10114]
This commit is contained in:
John Maddock
2001-05-15 11:00:01 +00:00
parent a58bf0705d
commit f913683002
19 changed files with 33 additions and 114 deletions

View File

@ -1200,8 +1200,9 @@ It is provided "as is" without express or implied warranty.</PRE></I></TD>
<P><HR></P> <P><HR></P>
<H3><A NAME="furtherInfo"></A>Further Information (Contacts and Acknowledgements)</H3> <H3><A NAME="furtherInfo"></A>Further Information (Contacts and Acknowledgements)</H3>
<P>The author can be contacted at <A HREF="mailto:John_Maddock@compuserve.com">John_Maddock@compuserve.com</A>, the home page for this library is at <A HREF="http://ourworld.compuserve.com/homepages/John_Maddock/regexpp.htm">http://ourworld.compuserve.com/homepages/John_Maddock/regexpp.htm</A>, and the official boost version can be obtained from <A HREF="http://www.boost.org/libraries.htm">www.boost.org/libraries.htm</A>. </P> <P>The author can be contacted at <A HREF="mailto:John_Maddock@compuserve.com">John_Maddock@compuserve.com</A>, the home page for this library is at <A HREF="http://ourworld.compuserve.com/homepages/John_Maddock/regexpp.htm">http://ourworld.compuserve.com/homepages/John_Maddock/regexpp.htm</A>, and the official boost version can be obtained from <A HREF="http://www.boost.org/libraries.htm">www.boost.org/libraries.htm</A>. </P>
<P>I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think about algorithms and their performance, and to the folks at boost for forcing me to <I>think</I>, period. The following people have all contributed useful comments or fixes: Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, Beman Dawes, Paul Baxter, David Dennerline, Edward Diener, Robert Dunn, , Fabio Forno, Rob Gillen, Chris Hecker, Nick Hodapp, Jesse Jones, Jan Hermelink, Max Leung, Wei-hao Lin, Jens Maurer, Heiko Schmidt, Scobie Smith, Herv&eacute; Poirier, Marc Recht, Alexey Voinov, Jerry Waldorf, Rob Ward, Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to the manuals supplied with the Henry Spencer, Perl and GNU regular expression libraries - wherever possible I have tried to maintain compatibility with these libraries and with the POSIX standard - the code however is entirely my own, including any bugs! I can absolutely guarantee that I will not fix any bugs I don't know about, so if you have any comments or spot any bugs, please get in touch. </P> <P>I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think about algorithms and their performance, and to the folks at boost for forcing me to <I>think</I>, period. The following people have all contributed useful comments or fixes: Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, Beman Dawes, Paul Baxter, David Dennerline, Edward Diener, Robert Dunn, , Fabio Forno, Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink, Max Leung, Wei-hao Lin, Jens Maurer, Heiko Schmidt, Scobie Smith, Alexander Sokolovsky, Herv&eacute; Poirier, Marc Recht, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to the manuals supplied with the Henry Spencer, Perl and GNU regular expression libraries - wherever possible I have tried to maintain compatibility with these libraries and with the POSIX standard - the code however is entirely my own, including any bugs! I can absolutely guarantee that I will not fix any bugs I don't know about, so if you have any comments or spot any bugs, please get in touch. </P>
<P>Useful further information can be found at: </P> <P>Useful further information can be found at: </P>
<P>A short tutorial on regular expressions <A HREF="http://www.devshed.com/Server_Side/Administration/RegExp/">can be found here</A>.</P>
<P>The <A HREF="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix Specification</A> contains a wealth of useful material, including the regular expression syntax, and specifications for <A HREF="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">&lt;regex.h&gt;</A> and <A HREF="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">&lt;nl_types.h&gt;</A>. </P> <P>The <A HREF="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix Specification</A> contains a wealth of useful material, including the regular expression syntax, and specifications for <A HREF="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">&lt;regex.h&gt;</A> and <A HREF="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">&lt;nl_types.h&gt;</A>. </P>
<P>The <A HREF="http://www.cs.purdue.edu/homes/stelo/pattern.html">Pattern Matching Pointers</A> site is a "must visit" resource for anyone interested in pattern matching. </P> <P>The <A HREF="http://www.cs.purdue.edu/homes/stelo/pattern.html">Pattern Matching Pointers</A> site is a "must visit" resource for anyone interested in pattern matching. </P>
<P><A HREF="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</A>, use a simplified regular expression syntax to achieve faster search times. </P> <P><A HREF="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</A>, use a simplified regular expression syntax to achieve faster search times. </P>

View File

@ -1,6 +1,7 @@
Version 311: Version 311:
FIXED: Support for STLPort 4.1b6. FIXED: Support for STLPort 4.1b6.
FIXED: Library calling convention for VC6 debug builds. FIXED: Library calling convention for VC6 debug builds.
FIXED: Borland compiler support when using non-default calling convention.
CHANGED: Reorganised and simplified config setup. CHANGED: Reorganised and simplified config setup.
Version 310: Version 310:
@ -257,5 +258,6 @@ BUG: character sets don't function correctly when regbase::char_classes

View File

@ -27,11 +27,7 @@
#include <boost/regex/detail/regex_config.hpp> #include <boost/regex/detail/regex_config.hpp>
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
/* include these defs only for POSIX compatablity */ /* include these defs only for POSIX compatablity */
@ -287,10 +283,8 @@ public:
}; };
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -55,11 +55,7 @@
namespace boost{ namespace boost{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
namespace re_detail{ namespace re_detail{
@ -1464,10 +1460,8 @@ iterator BOOST_RE_CALL re_is_set_member(iterator next,
} // namepsace re_detail } // namepsace re_detail
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -79,11 +79,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
struct _fi_find_data struct _fi_find_data
@ -422,10 +418,8 @@ inline bool operator < (const directory_iterator&, const directory_iterator&)
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace re_detail } // namespace re_detail

View File

@ -25,15 +25,11 @@
#define BOOST_REGEX_COMPILE_HPP #define BOOST_REGEX_COMPILE_HPP
namespace boost{ namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#endif
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
template <class traits> template <class traits>
struct kmp_translator struct kmp_translator
@ -2035,10 +2031,8 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int e
#endif #endif
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -249,7 +249,7 @@ full list of macros and their usage.
// for now we'll always define these // for now we'll always define these
// unless we know that the platform can cope // unless we know that the platform can cope
// with wide character strings: // with wide character strings:
#if !defined(linux) #if !defined(linux) || (defined(__GLIBCPP__) && !defined(_GLIBCPP_USE_WCHAR_T))
#define BOOST_RE_NO_WCTYPE_H #define BOOST_RE_NO_WCTYPE_H
#define BOOST_RE_NO_WCSTRING #define BOOST_RE_NO_WCSTRING
#endif #endif
@ -580,11 +580,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b
#endif
#endif #endif
// add our destroy functions: // add our destroy functions:
@ -735,11 +731,6 @@ inline bool BOOST_RE_CALL boolify(I val)
#define BOOST_RE_MAKE_BOOL(x) x #define BOOST_RE_MAKE_BOOL(x) x
#endif #endif
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
template <class T, class A> template <class T, class A>
struct rebind_allocator struct rebind_allocator
@ -760,6 +751,9 @@ std::ptrdiff_t distance(const T& x, const T& y)
using std::distance; using std::distance;
#endif #endif
#ifdef __BORLANDC__
#pragma option pop
#endif
} // namespace re_detail } // namespace re_detail
} // namespace boost } // namespace boost
@ -1101,5 +1095,6 @@ namespace std{

View File

@ -35,11 +35,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
// //
@ -124,10 +120,8 @@ inline void BOOST_RE_CALL re_strfree(charT* p)
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace re_detail } // namespace re_detail
} // namespace boost } // namespace boost

View File

@ -39,11 +39,7 @@ enum format_flags_t{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve -w-8037
#endif
#endif #endif
template <class O, class I> template <class O, class I>
@ -569,10 +565,8 @@ std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -34,11 +34,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
template <class charT> template <class charT>
@ -102,9 +98,7 @@ kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans transla
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif
#endif #endif
} // namepsace re_detail } // namepsace re_detail

View File

@ -31,11 +31,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
template <class iterator, class charT, class traits_type, class Allocator> template <class iterator, class charT, class traits_type, class Allocator>
@ -1811,10 +1807,8 @@ inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -33,11 +33,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
struct empty_padding{}; struct empty_padding{};
@ -236,10 +232,8 @@ void* BOOST_RE_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace re_detail } // namespace re_detail
} // namespace boost } // namespace boost

View File

@ -28,11 +28,7 @@
namespace boost{ namespace boost{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
namespace re_detail{ namespace re_detail{
@ -145,10 +141,8 @@ inline std::size_t regex_split(OutputIterator out,
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -36,11 +36,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
// //
@ -211,10 +207,8 @@ jstack<T, Allocator>::~jstack()
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace re_detail } // namespace re_detail
} // namespace boost } // namespace boost

View File

@ -42,11 +42,7 @@ namespace boost{
namespace re_detail{ namespace re_detail{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
void BOOST_RE_CALL re_init_threads(); void BOOST_RE_CALL re_init_threads();
@ -167,10 +163,8 @@ BOOST_RE_IX_DECL extern unsigned int re_lock_count;
#endif // BOOST_RE_THREADS #endif // BOOST_RE_THREADS
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace re_detail } // namespace re_detail
} // namespace boost } // namespace boost

View File

@ -28,11 +28,7 @@
namespace boost{ namespace boost{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
class BOOST_RE_IX_DECL bad_pattern : public std::runtime_error class BOOST_RE_IX_DECL bad_pattern : public std::runtime_error
@ -51,10 +47,8 @@ public:
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -29,11 +29,7 @@
namespace boost{ namespace boost{
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ == 0x530 #pragma option push -a4 -b -Ve -pc
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif #endif
template <class charT> template <class charT>
@ -786,10 +782,8 @@ class regex_traits : public cpp_regex_traits<charT>
#endif #endif
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop #pragma option pop
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -14,7 +14,7 @@ TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5 CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5 $(CXXFLAGS)
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe
echo testing static single threaded version.... echo testing static single threaded version....
@ -185,3 +185,4 @@ r6lv.exe : tests.cpp parse.cpp regress.cpp

View File

@ -438,7 +438,11 @@ void cpp_tests(const reg_expression<C, T, A>& e, bool recurse = true)
unsigned int hl_match_id; unsigned int hl_match_id;
bool hl_grep_test_proc(const RegEx& e) bool
#if defined(__BORLANDC__) || defined(BOOST_MSVC)
__cdecl
#endif
hl_grep_test_proc(const RegEx& e)
{ {
int start, end; int start, end;
start = e.Position(0); start = e.Position(0);