pcrecpp_internal.h 2.8 KB

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