![]() |
![]() |
|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: xtests/internal/safestr.h 00003 * 00004 * Purpose: Handles detection of safe string library. 00005 * 00006 * Created: 9th February 2008 00007 * Updated: 8th March 2008 00008 * 00009 * Author: Matthew Wilson 00010 * 00011 * Home: http://www.xtests.org/ 00012 * 00013 * Copyright: Matthew Wilson and Synesis Software Pty Ltd, 2008. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are 00017 * met: 00018 * 00019 * - Redistributions of source code must retain the above copyright notice, 00020 * this list of conditions and the following disclaimer. 00021 * - Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in the 00023 * documentation and/or other materials provided with the distribution. 00024 * - Neither the names of Matthew Wilson and Synesis Software nor the names 00025 * of any contributors may be used to endorse or promote products derived 00026 * from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00029 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00035 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00036 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00037 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00038 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * 00040 * ////////////////////////////////////////////////////////////////////// */ 00041 00042 00048 #ifndef XTESTS_INCL_XTESTS_INTERNAL_H_SAFESTR 00049 #define XTESTS_INCL_XTESTS_INTERNAL_H_SAFESTR 00050 00051 /* ///////////////////////////////////////////////////////////////////////// 00052 * Includes 00053 */ 00054 00055 #ifndef XTESTS_INCL_XTESTS_H_XTESTS 00056 # include <xtests/xtests.h> 00057 #endif /* !XTESTS_INCL_XTESTS_H_XTESTS */ 00058 00059 #ifdef XTESTS_SAFE_STR_USE_crtdefs_h_ 00060 # undef XTESTS_SAFE_STR_USE_crtdefs_h_ 00061 #endif /* XTESTS_SAFE_STR_USE_crtdefs_h_ */ 00062 00063 #if defined(__BORLANDC__) 00064 #elif defined(__DMC__) 00065 #elif defined(__GNUC__) 00066 #elif defined(__INTEL_COMPILER) 00067 # if defined(_MSC_VER) && \ 00068 _MSC_VER >= 1400 00069 # define XTESTS_SAFE_STR_USE_crtdefs_h_ 00070 # endif /* _MSC_VER >= 1400 */ 00071 #elif defined(__MWERKS__) 00072 #elif defined(__WATCOMC__) 00073 #elif defined(_MSC_VER) 00074 # if _MSC_VER >= 1400 00075 # define XTESTS_SAFE_STR_USE_crtdefs_h_ 00076 # endif /* _MSC_VER >= 1400 */ 00077 #elif defined(__COMO__) 00078 #else 00079 #endif /* compiler */ 00080 00081 #ifdef XTESTS_SAFE_STR_USE_crtdefs_h_ 00082 # include <crtdefs.h> 00083 #endif /* XTESTS_SAFE_STR_USE_crtdefs_h_ */ 00084 00085 /* ///////////////////////////////////////////////////////////////////////// 00086 * Includes 00087 */ 00088 00089 #ifdef __STDC_SECURE_LIB__ 00090 # if defined(__STDC_WANT_SECURE_LIB__) && \ 00091 __STDC_WANT_SECURE_LIB__ == 1 00092 # define XTESTS_USING_SAFE_STR_FUNCTIONS 00093 # endif /* __STDC_WANT_SECURE_LIB__ */ 00094 #endif /* __STDC_SECURE_LIB__ */ 00095 00096 /* ////////////////////////////////////////////////////////////////////// */ 00097 00098 #endif /* XTESTS_INCL_XTESTS_INTERNAL_H_SAFESTR */ 00099 00100 /* ////////////////////////////////////////////////////////////////////// */
|
|
xTests Library documentation © Matthew Wilson and Synesis Software Pty Ltd, 1999-2009 |
|