pcrecpp_internal.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*************************************************
  2. * Perl-Compatible Regular Expressions *
  3. *************************************************/
  4. /*
  5. -----------------------------------------------------------------------------
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions are met:
  8. * Redistributions of source code must retain the above copyright notice,
  9. this list of conditions and the following disclaimer.
  10. * Redistributions in binary form must reproduce the above copyright
  11. notice, this list of conditions and the following disclaimer in the
  12. documentation and/or other materials provided with the distribution.
  13. * Neither the name of the University of Cambridge nor the names of its
  14. contributors may be used to endorse or promote products derived from
  15. this software without specific prior written permission.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  17. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  19. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  20. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  23. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  24. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  25. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  26. POSSIBILITY OF SUCH DAMAGE.
  27. -----------------------------------------------------------------------------
  28. */
  29. #ifndef PCRECPP_INTERNAL_H
  30. #define PCRECPP_INTERNAL_H
  31. /* When compiling a DLL for Windows, the exported symbols have to be declared
  32. using some MS magic. I found some useful information on this web page:
  33. http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
  34. information there, using __declspec(dllexport) without "extern" we have a
  35. definition; with "extern" we have a declaration. The settings here override the
  36. setting in pcre.h. We use:
  37. PCRECPP_EXP_DECL for declarations
  38. PCRECPP_EXP_DEFN for definitions of exported functions
  39. */
  40. #ifndef PCRECPP_EXP_DECL
  41. # ifdef _WIN32
  42. # ifndef PCRE_STATIC
  43. # define PCRECPP_EXP_DECL extern __declspec(dllexport)
  44. # define PCRECPP_EXP_DEFN __declspec(dllexport)
  45. # else
  46. # define PCRECPP_EXP_DECL extern
  47. # define PCRECPP_EXP_DEFN
  48. # endif
  49. # else
  50. # define PCRECPP_EXP_DECL extern
  51. # define PCRECPP_EXP_DEFN
  52. # endif
  53. #endif
  54. #endif /* PCRECPP_INTERNAL_H */
  55. /* End of pcrecpp_internal.h */