|
| 1 | +diff -ruN rlog-1.4/rlog/RLogPublisher.cpp rlog-1.4.my/rlog/RLogPublisher.cpp |
| 2 | +--- rlog-1.4/rlog/RLogPublisher.cpp 2008-06-15 04:10:13.000000000 +0100 |
| 3 | ++++ rlog-1.4.my/rlog/RLogPublisher.cpp 2013-02-17 16:35:24.476582710 +0000 |
| 4 | +@@ -161,7 +161,7 @@ |
| 5 | + va_end( args ); |
| 6 | + |
| 7 | + // if it worked, then return the buffer |
| 8 | +- if( ncpy > -1 && ncpy < bufSize ) |
| 9 | ++ if( ncpy >= 0 && (unsigned) ncpy < bufSize ) |
| 10 | + { |
| 11 | + data.msg = buf; |
| 12 | + break; |
| 13 | +diff -ruN rlog-1.4/win32/common.h.msvc80 rlog-1.4.my/win32/common.h.msvc80 |
| 14 | +--- rlog-1.4/win32/common.h.msvc80 1970-01-01 01:00:00.000000000 +0100 |
| 15 | ++++ rlog-1.4.my/win32/common.h.msvc80 2013-02-17 21:48:12.933731544 +0000 |
| 16 | +@@ -0,0 +1,83 @@ |
| 17 | ++/***************************************************************************** |
| 18 | ++ * Author: Valient Gough <vgough@pobox.com> |
| 19 | ++ * |
| 20 | ++ ***************************************************************************** |
| 21 | ++ * Copyright (c) 2002-2004, Valient Gough |
| 22 | ++ * Copyright (c) 2004, Vadim Zeitlin |
| 23 | ++ * |
| 24 | ++ * This library is free software; you can distribute it and/or modify it under |
| 25 | ++ * the terms of the GNU Lesser General Public License (LGPL), as published by |
| 26 | ++ * the Free Software Foundation; either version 2.1 of the License, or (at your |
| 27 | ++ * option) any later version. |
| 28 | ++ * |
| 29 | ++ * This library is distributed in the hope that it will be useful, but WITHOUT |
| 30 | ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 31 | ++ * FITNESS FOR A PARTICULAR PURPOSE. See the LGPL in the file COPYING for more |
| 32 | ++ * details. |
| 33 | ++ * |
| 34 | ++ */ |
| 35 | ++ |
| 36 | ++#ifndef _rlogconfig_incl_ |
| 37 | ++#define _rlogconfig_incl_ |
| 38 | ++ |
| 39 | ++// we don't have GNU printf style attributes |
| 40 | ++#define HAVE_PRINTF_ATTR 0 |
| 41 | ++#define HAVE_PRINTF_FP 0 |
| 42 | ++# define RLOG_SECTION |
| 43 | ++ |
| 44 | ++/* Defined by configure if our compiler understands VARIADAC macros. */ |
| 45 | ++#define C99_VARIADAC_MACROS 1 |
| 46 | ++#define PREC99_VARIADAC_MACROS 0 |
| 47 | ++ |
| 48 | ++#define RLOG_TIME_TSC 0 |
| 49 | ++ |
| 50 | ++# define PRINTF(FMT,X) |
| 51 | ++# define PRINTF_FP(FMT,X) |
| 52 | ++# define likely(x) (x) |
| 53 | ++# define unlikely(x) (x) |
| 54 | ++ |
| 55 | ++/*! @def RLOG_COMPONENT |
| 56 | ++ @brief Specifies build-time component, eg -DRLOG_COMPONENT="component-name" |
| 57 | ++ |
| 58 | ++ Define RLOG_COMPONENT as the name of the component being built. |
| 59 | ++ For example, as a compile flag, -DRLOG_COMPONENT="component-name" |
| 60 | ++ |
| 61 | ++ If RLOG_COMPONENT is not specified, then it will be defined as "[unknown]" |
| 62 | ++*/ |
| 63 | ++#ifndef RLOG_COMPONENT |
| 64 | ++# pragma message("rlog/common.h: RLOG_COMPONENT not defined - setting to UNKNOWN") |
| 65 | ++#define RLOG_COMPONENT "[unknown]" |
| 66 | ++#endif // RLOG_COMPONENT not defined |
| 67 | ++ |
| 68 | ++// Use somewhat unique names (doesn't matter if they aren't as they are used in |
| 69 | ++// a private context, so the compiler will make them unique if it must) |
| 70 | ++# define LOGID CONCAT(_rL_, __LINE__) |
| 71 | ++ |
| 72 | ++/*! @def RLOG_DECL |
| 73 | ++ @brief Macro used for declaring C++ clsas and functions to export from a |
| 74 | ++ shared library on Windows. |
| 75 | ++*/ |
| 76 | ++#ifdef _WIN32 |
| 77 | ++# ifdef RLOG_EXPORTS |
| 78 | ++# define RLOG_DECL __declspec(dllexport) |
| 79 | ++# else |
| 80 | ++# define RLOG_DECL __declspec(dllimport) |
| 81 | ++# endif // building/using DLL |
| 82 | ++#else // !_WIN32 |
| 83 | ++# define RLOG_DECL |
| 84 | ++#endif |
| 85 | ++ |
| 86 | ++#ifdef _MSC_VER |
| 87 | ++/* Visual Studio 2008 have it's own definition */ |
| 88 | ++# if _MSC_VER < 1500 |
| 89 | ++# define vsnprintf _vsnprintf |
| 90 | ++# endif /* _MSC_VER */ |
| 91 | ++ |
| 92 | ++ // suppress annoying warnings about using STL templates in DLL-exported |
| 93 | ++ // classes |
| 94 | ++# pragma warning(disable:4251) |
| 95 | ++# pragma warning(disable:4275) |
| 96 | ++#endif /* _MSC_VER */ |
| 97 | ++ |
| 98 | ++#endif // _rlogconfig_incl_ |
| 99 | ++ |
0 commit comments