summaryrefslogtreecommitdiff
path: root/src/lib/libc/string (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* no more string(3);jmc2014-12-091-3/+2
|
* In ingo's new world order, we do not want multiple manual pages describingderaadt2014-12-093-247/+3
| | | | | | | the same thingies. Therefore these "lists of functions" man pages can go away. Hurray! I've wanted these pages to die for around 10 years! ok ingo (and i think jmc)
* Replace all 14 instances of .St -ansiC-99 in our tree with .St -isoC-99.schwarze2014-11-301-3/+3
| | | | | | The former is not used anywhere in NetBSD, FreeBSD, or DragonFly and not supported by groff, so i'm going to delete it from mandoc(1). We don't need two macros for the same thing.
* restructure libc/string + libc/arch/*/string coperation regardingderaadt2014-11-308-155/+309
| | | | | | | | | | | | | | | | (potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod
* Since deraadt@ remembers seeing strdup() on one particular 4.2BSD machine,schwarze2014-10-111-4/+11
| | | | | | | | | | | i looked a bit closer and found instances before Reno, so correct HISTORY. References: http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/ucb/dbx/defs.h http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD/usr/src/etc/inetd.c http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/src/lib/libc/string/strdup.c ok deraadt@
* obvious malloc -> reallocarray, for mult int oflowderaadt2014-10-081-2/+2
|
* rephrase the stpcpy() warningnaddy2014-07-091-2/+2
| | | | new wording agreed by at least kettenis@ millert@ otto@
* loosen the spec for timingsafe functions slightly, so as to nottedu2014-06-211-10/+5
| | | | artificially constrain alternative implementations. ok deraadt
* Protect explicit_bzero() from link-time optimizationmatthew2014-06-211-7/+10
| | | | | | | | | | | | | | | | | | | | Modern compiler toolchains are capable of optimizing even across translation unit boundaries, so simply moving the memory clearing into a separate function is not guaranteed to clear memory. To avoid this, we take advantage of ELF weak symbol semantics, and insert a call to an empty, weakly named function. The semantics of calling this function aren't determinable until load time, so the compiler and linker need to keep the memset() call. There are still ways a toolchain might defeat this trick (e.g., optimistically expecting the weak symbol to not be overloaded, and only calling memset() if it is; promoting weak symbols to strong symbols at link-time when emitting a static binary because they won't be interposed; implementing load-time optimizations). But at least for the foreseeable future, these seem unlikely. ok deraadt
* Add timingsafe_memcmp().matthew2014-06-135-33/+152
| | | | ok deraadt, jmc, tedu
* mop up ifndef KERNEL goo; ok miodderaadt2014-06-1012-60/+12
|
* tweak previous;jmc2014-04-191-3/+2
|
* Use somewhat harsher language and better examples; demonstrate thatderaadt2014-04-194-109/+88
| | | | | non-dangerous use functions is difficult. ok guenther
* Add some missing names to the NAME sections.schwarze2014-04-072-6/+8
| | | | | | For inet(3), go the other way, remove some bogus symlinks. Found while testing the new makewhatis(8). ok jmc@
* remove the never used bm string functionstedu2014-03-233-329/+3
|
* in HISTORY, say where this actually came from;schwarze2014-02-231-5/+7
| | | | ok deraadt@ bentley@
* Remove unnecessary stdio.h include.stsp2014-02-051-2/+1
| | | | Patch by Jean-Philippe Ouellet ; ok krw@
* add explicit_bzero to NAME;jmc2014-01-221-2/+3
|
* add explicit_bzero to libc. implementation subject to change, but starttedu2014-01-223-4/+37
| | | | the ball rolling. ok deraadt.
* fix double word error;jmc2013-12-191-2/+2
|
* Split out strncpy and strncat from strcpy and strcat manuals.millert2013-12-195-168/+308
| | | | Requested by deraadt@
* no more regexp(3), so point to regex(3);jmc2013-12-051-3/+3
| | | | as advised by deraadt
* Missed the file renames for the string functions when committing theguenther2013-10-141-1/+25
| | | | DIST_LIB/DIST_OBJ/*.do changes
* Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN,millert2013-09-301-4/+4
| | | | MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
* Add examples to show why this is a terrible API. OK jmc@ henning@millert2013-09-251-1/+60
|
* According to POSIX, if the src and dst strings overlap, the behaviormillert2013-09-256-12/+48
| | | | is undefined. Add a warning to that effect. OK deraadt@ jmc@
* more library historyschwarze2013-07-174-15/+22
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze2013-07-164-12/+12
|
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-0552-157/+157
|
* remove some incredible lies about overlapping buffersderaadt2013-06-042-22/+10
| | | | ok guenther
* Fix catopen(3) for UTF-8 locales and update the implementation to POSIX-2008.stsp2013-06-011-2/+2
| | | | | | | | | Catalogs had an arbitrary character set which was used regardless of locale. Add UTF-8-encoded catalogs for libc error messages, and rename existing ones to indicate their character sets. catopen(3) now chooses a catalog which matches the locale's encoding, if available. help & ok matthew, man page bits ok jmc, input from naddy and bluhm
* Remove useless include.ajacoutot2013-05-301-2/+1
| | | | ok millert@
* typo: compare len against null needle, not haystackajacoutot2013-05-151-2/+2
| | | | | | from Alf Schlichting ok millert@
* Add an implementation of memmem() -- from FreeBSD with some tweaks.ajacoutot2013-05-133-4/+145
| | | | | | | | | Requires a libc minor bump, committing now so that we have up-to-date snapshots for the upcoming hackathon. joint work with millert@ man page bits ok jmc@ input and ok millert@, guenther@, deraadt@
* remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.okan2012-08-021-21/+1
| | | | ok guenther@
* fix an off-by-one error where the return value would point to thenaddy2012-07-111-2/+2
| | | | character after the '\0'; ok guenther@
* Add strnlen() to libkern.matthew2012-04-261-1/+5
| | | | ok deraadt
* tweak previous;jmc2012-04-031-3/+3
|
* simplify the strlcpy/strlcat manual page substantially. do lessderaadt2012-04-021-70/+58
| | | | | | | | | | | | explaining of "what a C string is", and make it more clear that these functiosn BEHAVE EXACTLY LIKE snprintf with "%s"! (anyone who wants to write a 'strlcpy considered harmful' paper should probably write a 'strlcpy and snprintf considered harmful' paper instead). note to those from other projects reading this commit message: It would be very good if this new manual was picked up in your project. ok jmc millert krw
* Bump standards years, as we conform to the new versions tooguenther2012-03-261-4/+4
| | | | ok jmc@
* strsignal() was standardized in POSIX-2008guenther2012-03-261-2/+7
| | | | ok millert@
* fix SEE ALSO;jmc2012-01-171-2/+2
|
* Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.guenther2012-01-174-3/+222
| | | | | | Includes friendly linker warning to wake up those dumb enough to use it. Committing for kettenis@, who ran away to the hills after writing it
* grammar;jmc2012-01-141-2/+2
|
* this is sparta^WPOSIX 2008espie2012-01-141-2/+7
| | | | okay millert@
* strdup and strndup both use malloc. Make this fact explicit.lum2011-12-081-3/+5
| | | | ok jmc@
* tweak previous;jmc2011-07-253-6/+6
|
* update HISTORY and SEE ALSO for all of string(3), together with variousschwarze2011-07-2553-237/+642
| | | | | smaller improvements; jmc@ and nicm@ both ask me to get this in because further tweaking will be easier in-tree
* Sync wcslcpy and wcslcat with strlcpy and strlcat. OK deraadt@millert2011-07-242-50/+26
|
* Minor function name tweaks.nicm2011-07-093-8/+8
|