>Good point; you went a step beyond what I did there.  That looks like
>  #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
>  ...
>for now.

Also see, strlcat/strlcpy:

#if defined(__EXTENSIONS__) || \
        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
extern char *strsignal(int);
extern int ffs(int);
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, size_t);
extern size_t strlcpy(char *, const char *, size_t);
extern size_t strlcat(char *, const char *, size_t);
#endif /* defined(__EXTENSIONS__)... */

(note that we still support no-proto compilation so make sure
it's added twice:

#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
extern char *strsignal();
extern int ffs();
extern int strcasecmp();
extern int strncasecmp();
extern size_t strlcpy();
extern size_t strlcat();
#endif /* defined(__EXTENSIONS__) ... */

>> users of strnlen().
>> In general, those additional implementations come at
>> a maintenance cost.
>
>Ok.

You could implement it in terms of memchr, though no
optimized version of that exists either.

>> > * completeness (3): needs a man page.  ISTR
>>  writing nroff man pages in
>> > the depths of time, but I don't know about properly
>> phrased disclaimers
>>  > in the face of evolving standards, etc.
>> I think it can simply be added to string(3C); there
>> are already plenty of
>> non-SuS interfaces listed there, such as strlcpy().
>
>Ok.

Such things need separate bugs filed, preferrably with a delta
marked manual page; because of the SX/OS development model,
we need to make sure manual pages are updated at the same time
as the code so they make the same build.

That's probaby a job for your sponsor.

>Ok, I'll ignore that for now.  I was just looking at precedents
>in terms of the behavior of private implementations.

A "proper" project which makes a function public in Solaris has
the onus on it to remove all private implementations in the same
consolidation.

E.g., when I added "mkdtemp(3C)" in build 35 I also updated
"mktemp(1)" as it carried a private implementation and also made
sure that perl and ssh started using the Solaris implementation and
no longer used their own implementation (for softare which uses
configure this happens automatically but ON does not use any
auto configuration, just make and config.h files created earlier.

The other thing is that you need to update "mapfile-vers" so the
symbol is exported. (usr/src/lib/libc/port/mapfile-vers)

We bump the version once at the beginning of a release (and
move around stuff added in backports), e.g.,:

        is_system_labeled;
        ucred_getlabel;
        _ucred_getlabel;

are in SUNW_1.22.2 bceause they're being backported for Trusted Extensions.

But mkdtemp is in SUNW_1.23 because it's only in S11.

Casper
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to