Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/librlog Fix constness of strchr. Fix format stri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/afa1337747d1
branches:  trunk
changeset: 431566:afa1337747d1
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 14 19:08:06 2020 +0000

description:
Fix constness of strchr. Fix format string. Bump revision.

diffstat:

 devel/librlog/Makefile                           |   3 ++-
 devel/librlog/distinfo                           |   5 +++--
 devel/librlog/patches/patch-rlog-RLogChannel.cpp |  15 +++++++++++++--
 devel/librlog/patches/patch-rlog_StdioNode.cpp   |  15 +++++++++++++++
 4 files changed, 33 insertions(+), 5 deletions(-)

diffs (74 lines):

diff -r 3d4284f07620 -r afa1337747d1 devel/librlog/Makefile
--- a/devel/librlog/Makefile    Thu May 14 19:07:31 2020 +0000
+++ b/devel/librlog/Makefile    Thu May 14 19:08:06 2020 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.5 2020/01/26 17:30:59 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2020/05/14 19:08:06 joerg Exp $
 #
 
 DISTNAME=      rlog-1.3.7
 PKGNAME=       lib${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  http://arg0.net/vgough/download/
 EXTRACT_SUFX=  .tgz
diff -r 3d4284f07620 -r afa1337747d1 devel/librlog/distinfo
--- a/devel/librlog/distinfo    Thu May 14 19:07:31 2020 +0000
+++ b/devel/librlog/distinfo    Thu May 14 19:08:06 2020 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 03:27:44 agc Exp $
+$NetBSD: distinfo,v 1.4 2020/05/14 19:08:06 joerg Exp $
 
 SHA1 (rlog-1.3.7.tgz) = 3a09d5d8526c7834bf58d533956cc91e135fbe1b
 RMD160 (rlog-1.3.7.tgz) = fd021b41dbac1d432aa6ec98f081d8fcfe686bce
 SHA512 (rlog-1.3.7.tgz) = d1f87b5c72c012b0ef7b20d411203b6fd994a5e96b874072529cdd0932095f42fc3f341ff4c077a55543161d60390a3ee741181be2ff79ae2e825f5bcebb7ecb
 Size (rlog-1.3.7.tgz) = 525396 bytes
-SHA1 (patch-rlog-RLogChannel.cpp) = 7fbc21f3226482f5c9ebcc161522f6af11f213ec
+SHA1 (patch-rlog-RLogChannel.cpp) = e558254d091a6223e8a03bea99e4fb6764207732
+SHA1 (patch-rlog_StdioNode.cpp) = 3a8612b78eb8efd0f2a1d88b33360d493891170a
diff -r 3d4284f07620 -r afa1337747d1 devel/librlog/patches/patch-rlog-RLogChannel.cpp
--- a/devel/librlog/patches/patch-rlog-RLogChannel.cpp  Thu May 14 19:07:31 2020 +0000
+++ b/devel/librlog/patches/patch-rlog-RLogChannel.cpp  Thu May 14 19:08:06 2020 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-rlog-RLogChannel.cpp,v 1.1 2011/11/22 18:06:16 joerg Exp $
+$NetBSD: patch-rlog-RLogChannel.cpp,v 1.2 2020/05/14 19:08:07 joerg Exp $
 
---- rlog/RLogChannel.cpp.orig  2011-11-22 17:34:38.000000000 +0000
+Fix strchr use.
+
+--- rlog/RLogChannel.cpp.orig  2005-06-02 12:25:55.000000000 +0000
 +++ rlog/RLogChannel.cpp
 @@ -17,6 +17,7 @@
   */
@@ -10,3 +12,12 @@
  #include "RLogChannel.h"
  #include "rlog.h"
  #include "Lock.h"
+@@ -183,7 +184,7 @@ RLogChannel *rlog::GetComponentChannel( 
+       if((current->logLevel() == Log_Undef) && (level != Log_Undef))
+           current->setLogLevel( level );
+ 
+-      char *next = strchr( path , '/' );
++      const char *next = strchr( path , '/' );
+       size_t len = next ? next - path : strlen( path );
+ 
+       if(len > 1)
diff -r 3d4284f07620 -r afa1337747d1 devel/librlog/patches/patch-rlog_StdioNode.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/librlog/patches/patch-rlog_StdioNode.cpp    Thu May 14 19:08:06 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-rlog_StdioNode.cpp,v 1.1 2020/05/14 19:08:07 joerg Exp $
+
+pthread_self() often returns a pointer, so use widest type.
+
+--- rlog/StdioNode.cpp.orig    2020-05-12 13:29:29.773360583 +0000
++++ rlog/StdioNode.cpp
+@@ -220,7 +220,7 @@ StdioNode::publish( const RLogData &data
+ #ifndef _WIN32
+     if (outputThreadId) {
+         char tid[16] = "";
+-        snprintf(tid,15,"%lu",pthread_self());
++        snprintf(tid,15,"%ju",(uintmax_t)pthread_self());
+         ss << "[tid:" << tid << "] ";
+     }
+ #endif



Home | Main Index | Thread Index | Old Index