Project

General

Profile

Feature #12205

update missing/strl{cat,cpy}.c

Added by cremno (cremno phobia) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:74487]

Description

The attached git diff updates missing/strlcat.c from 1.8 to 1.15,
missing/strlcpy.c from 1.5 to 1.12 and also the LEGAL file.

There is no important reason. But there was a license change:
new style-BSD to a less restrictive ISC-style license.

Other changes include improving code readability and
modernizing (function prototypes, no register)

Upstream URLs (if you're looking for more details):
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcat.c
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcpy.c


Files

update-strl.diff (11.1 KB) update-strl.diff cremno (cremno phobia), 03/22/2016 11:28 AM

Associated revisions

Revision 0b859072
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • missing/strl{cat,cpy}.c: Update latest upstream files. [Misc #12205][ruby-core:74487]
  • LEGAL: Update license for missing/strl{cat,cpy}.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 55719
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • missing/strl{cat,cpy}.c: Update latest upstream files. [Misc #12205][ruby-core:74487]
  • LEGAL: Update license for missing/strl{cat,cpy}.c.

Revision 55719
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • missing/strl{cat,cpy}.c: Update latest upstream files. [Misc #12205][ruby-core:74487]
  • LEGAL: Update license for missing/strl{cat,cpy}.c.

Revision 55719
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • missing/strl{cat,cpy}.c: Update latest upstream files. [Misc #12205][ruby-core:74487]
  • LEGAL: Update license for missing/strl{cat,cpy}.c.

Revision 55719
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • missing/strl{cat,cpy}.c: Update latest upstream files. [Misc #12205][ruby-core:74487]
  • LEGAL: Update license for missing/strl{cat,cpy}.c.

History

Updated by shyouhei (Shyouhei Urabe) over 3 years ago

The code is much cleaner so I would +1, but it seems the upstream has more recent revisions (strlcat.c 1.16 and strlcpy.c 1.13). Why to avoid them?

Updated by cremno (cremno phobia) over 3 years ago

Shyouhei Urabe wrote:

The code is much cleaner so I would +1, but it seems the upstream has more recent revisions (strlcat.c 1.16 and strlcpy.c 1.13). Why to avoid them?

The current revisions would require defining a function-like macro called DEF_WEAK (which originally defines a weak alias):
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcat.c.diff?r1=1.15&r2=1.16&f=h
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcpy.c.diff?r1=1.12&r2=1.13&f=h

But CRuby isn't a libc implementation. Possible namespace violations can be solved by e.g. renaming strl* to ruby_strl*.

Updated by hsbt (Hiroshi SHIBATA) over 3 years ago

  • Assignee set to hsbt (Hiroshi SHIBATA)
  • Status changed from Open to Closed
  • Tracker changed from Misc to Feature

Also available in: Atom PDF