You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
3.4 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/internal/safestr.h
  3. *
  4. * Purpose: Handles detection of safe string library.
  5. *
  6. * Created: 24th March 2008
  7. * Updated: 10th August 2009
  8. *
  9. * Author: Matthew Wilson
  10. *
  11. * Home: http://www.stlsoft.org/
  12. *
  13. * Copyright (c) 2008-2009, Matthew Wilson and Synesis Software
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted provided that the following conditions are
  18. * met:
  19. *
  20. * - Redistributions of source code must retain the above copyright notice,
  21. * this list of conditions and the following disclaimer.
  22. * - Redistributions in binary form must reproduce the above copyright
  23. * notice, this list of conditions and the following disclaimer in the
  24. * documentation and/or other materials provided with the distribution.
  25. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  26. * names of any contributors may be used to endorse or promote products
  27. * derived from this software without specific prior written permission.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  30. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  31. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  32. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  33. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  34. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  35. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  36. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  37. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  38. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  39. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. * ////////////////////////////////////////////////////////////////////// */
  42. /** \file stlsoft/internal/safestr.h
  43. *
  44. * \brief [C, C++] Handles detection of safe string library.
  45. */
  46. #ifndef STLSOFT_INCL_STLSOFT_INTERNAL_H_SAFESTR
  47. #define STLSOFT_INCL_STLSOFT_INTERNAL_H_SAFESTR
  48. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  49. # define STLSOFT_VER_H_STLSOFT_INTERNAL_H_SAFESTR_MAJOR 1
  50. # define STLSOFT_VER_H_STLSOFT_INTERNAL_H_SAFESTR_MINOR 1
  51. # define STLSOFT_VER_H_STLSOFT_INTERNAL_H_SAFESTR_REVISION 1
  52. # define STLSOFT_VER_H_STLSOFT_INTERNAL_H_SAFESTR_EDIT 4
  53. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  54. /* /////////////////////////////////////////////////////////////////////////
  55. * Includes
  56. */
  57. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  58. # include <stlsoft/stlsoft.h>
  59. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  60. #if ( defined(STLSOFT_COMPILER_IS_MSVC) || \
  61. ( defined(STLSOFT_COMPILER_IS_INTEL) && \
  62. defined(_MSC_VER))) && \
  63. _MSC_VER >= 1400
  64. # include <crtdefs.h>
  65. #endif /* compiler */
  66. /* /////////////////////////////////////////////////////////////////////////
  67. * Symbols
  68. */
  69. #ifdef __STDC_SECURE_LIB__
  70. # if defined(__STDC_WANT_SECURE_LIB__) && \
  71. __STDC_WANT_SECURE_LIB__ == 1
  72. # define STLSOFT_USING_SAFE_STR_FUNCTIONS
  73. # endif /* __STDC_WANT_SECURE_LIB__ */
  74. #endif /* __STDC_SECURE_LIB__ */
  75. /* ////////////////////////////////////////////////////////////////////// */
  76. #endif /* STLSOFT_INCL_STLSOFT_INTERNAL_H_SAFESTR */
  77. /* ///////////////////////////// end of file //////////////////////////// */