Project

General

Profile

Actions

Feature #12205

closed

update missing/strl{cat,cpy}.c

Added by cremno (cremno phobia) about 8 years ago. Updated over 7 years ago.

Status:
Closed
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

Updated by shyouhei (Shyouhei Urabe) about 8 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) about 8 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 7 years ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0