pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libsafec Initial import of libsafec, providing b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/297bca0d838c
branches:  trunk
changeset: 641461:297bca0d838c
user:      agc <agc%pkgsrc.org@localhost>
date:      Sun Nov 09 01:52:24 2014 +0000

description:
Initial import of libsafec, providing bounds checking memory and string
functions per ISO/IEC TR24731, into the packages collection.

        The Safe C Library provides bound checking memory and string functions
        per ISO/IEC TR24731.  These functions are alternative functions to the
        existing standard C library that promote safer, more secure
        programming.

        The ISO/IEC Programming languages -- C spec, C11, now includes the
        bounded APIs in Appendix K, "Bounds-checking interfaces".

diffstat:

 devel/libsafec/DESCR                                       |   7 ++
 devel/libsafec/Makefile                                    |  19 ++++++++
 devel/libsafec/PLIST                                       |   8 +++
 devel/libsafec/distinfo                                    |   8 +++
 devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c |  15 ++++++
 devel/libsafec/patches/patch-tests__perf_memcpy32_s.c      |  33 ++++++++++++++
 devel/libsafec/patches/patch-tests__perf_memcpy_s.c        |  24 ++++++++++
 7 files changed, 114 insertions(+), 0 deletions(-)

diffs (142 lines):

diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/DESCR      Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,7 @@
+The Safe C Library provides bound checking memory and string functions
+per ISO/IEC TR24731.  These functions are alternative functions to the
+existing standard C library that promote safer, more secure
+programming.
+
+The ISO/IEC Programming languages -- C spec, C11, now includes the
+bounded APIs in Appendix K, "Bounds-checking interfaces".
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/Makefile   Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+#
+
+DISTNAME=      libsafec-10052013
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=safeclib/}
+
+MAINTAINER=    agc%NetBSD.org@localhost
+HOMEPAGE=      http://sourceforge.net/projects/safeclib
+COMMENT=       C bounds checking memory and string functions library
+LICENSE=       mit
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL=   yes
+USE_TOOLS+=    pkg-config
+
+AUTO_MKDIRS=   yes
+
+.include "../../mk/bsd.pkg.mk"
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/PLIST      Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+include/libsafec/safe_lib.h
+include/libsafec/safe_lib_errno.h
+include/libsafec/safe_mem_lib.h
+include/libsafec/safe_str_lib.h
+include/libsafec/safe_types.h
+lib/libsafec-1.0.la
+lib/pkgconfig/safec-1.0.pc
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/distinfo   Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+
+SHA1 (libsafec-10052013.tar.gz) = daf86aa303259a713ffdb3854fff497c59cc9466
+RMD160 (libsafec-10052013.tar.gz) = 93bdb27a8748fee3d32a7fd613ed1927a7b5c3af
+Size (libsafec-10052013.tar.gz) = 1957012 bytes
+SHA1 (patch-src__safeclib__strcasestr_s.c) = 5a37c2f5ac6d4fc6426399811af97ee88355869b
+SHA1 (patch-tests__perf_memcpy32_s.c) = a72a3168cf5b71228785d9433ef41babfc1838ea
+SHA1 (patch-tests__perf_memcpy_s.c) = a67f195d5b09539746b3899c1b5363e28ea2efab
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c        Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src__safeclib__strcasestr_s.c,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+
+patch for ctype macro args - how was this "safe" in the first place?
+
+--- src/safeclib/strcasestr_s.c        2014/11/09 01:39:40     1.1
++++ src/safeclib/strcasestr_s.c        2014/11/09 01:40:08
+@@ -153,7 +153,7 @@
+         while (dest[i] && dlen) {
+ 
+             /* not a match, not a substring */
+-            if (toupper(dest[i]) != toupper(src[i])) {
++            if (toupper((unsigned char)dest[i]) != toupper((unsigned char)src[i])) {
+                 break;
+             }
+ 
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/patches/patch-tests__perf_memcpy32_s.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/patches/patch-tests__perf_memcpy32_s.c     Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-tests__perf_memcpy32_s.c,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+
+set but unused rc
+
+--- tests/perf_memcpy32_s.c    2014/11/09 01:43:33     1.1
++++ tests/perf_memcpy32_s.c    2014/11/09 01:44:41
+@@ -31,7 +31,7 @@
+ 
+ static void timing_loop (uint32_t len, uint32_t loops)
+ {
+-    errno_t rc;
++    /* errno_t rc; */
+     uint32_t i;
+ 
+     clock_t clock_start;
+@@ -56,7 +56,7 @@
+      */
+     clock_start = clock();
+     for (i=0;i<loops; i++) {
+-       rc = memcpy32_s(mem1, len, mem2, len);
++       /* rc = */ memcpy32_s(mem1, len, mem2, len);
+     }
+     clock_end = clock();
+ 
+@@ -73,7 +73,7 @@
+      */
+     clock_start = clock();
+     for (i=0;i<loops; i++) {
+-       rc = memcpy16_s(mem3, len, mem4, len);
++       /* rc = */ memcpy16_s(mem3, len, mem4, len);
+        //memcpy(mem1, mem2, len);
+     }
+     clock_end = clock();
diff -r 5b66b2b6cec6 -r 297bca0d838c devel/libsafec/patches/patch-tests__perf_memcpy_s.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libsafec/patches/patch-tests__perf_memcpy_s.c       Sun Nov 09 01:52:24 2014 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-tests__perf_memcpy_s.c,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+
+set but unused rc
+
+--- tests/perf_memcpy_s.c      2014/11/09 01:43:33     1.1
++++ tests/perf_memcpy_s.c      2014/11/09 01:45:02
+@@ -28,7 +28,7 @@
+ 
+ static void timing_loop (uint32_t len, uint32_t loops)
+ {
+-    errno_t rc;
++    /* errno_t rc; */
+     uint32_t i;
+ 
+     clock_t clock_start;
+@@ -51,7 +51,7 @@
+      */
+     clock_start = clock();
+     for (i=0;i<loops; i++) {
+-       rc = memcpy_s(mem1, len, mem2, len);
++       /* rc = */memcpy_s(mem1, len, mem2, len);
+     }
+     clock_end = clock();
+ 



Home | Main Index | Thread Index | Old Index