Commit Graph

75 Commits

Author SHA1 Message Date
dsl 0d34d14bb9 If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
2009-07-30 20:57:15 +00:00
joerg 0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
joerg 974b291a6c Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.
2009-07-21 13:18:43 +00:00
dsl 32b43c9199 Remove index() and rindex() from the list (in comment) 2009-07-18 09:41:23 +00:00
perry be11851995 Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.
2009-05-01 17:27:01 +00:00
christos 3cf907e2b2 add memrchr 2009-04-10 23:13:38 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
tnozaki 52ed7b035f Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
  new locale-db implementation using citrus_db backend,
  see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
  internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
  LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
    en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
    zh_CN.eucCN -> zh_CN.GB18030
    and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
  for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
  i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
2009-01-02 00:20:18 +00:00
wiz c7567a33c8 Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it
2007-02-17 09:32:57 +00:00
tnozaki 65b88fc7e0 PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).
2006-10-13 17:28:09 +00:00
dsl 7fd4677bc0 fix xtos's pasto 2006-08-27 07:09:04 +00:00
christos d37c189a03 PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions
2006-08-26 22:48:50 +00:00
christos bfce146aaa include one more new file. 2006-08-23 01:51:51 +00:00
christos 54097ce7af PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions 2006-08-22 20:50:46 +00:00
christos cbfb283c65 - Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.
2006-08-12 23:49:53 +00:00
tnozaki a55e9cdf1a fix lib/33476:
added following manpages (derived from FreeBSD),
    wcwidth(3) wcswidth(3)
    wcstol(3) wcstoll(3) wcstoimax(3)
    wcstoul(3) wcstoull(3) wcstoumax(3)
  and update doc/TODO.i18n.
2006-06-03 04:36:43 +00:00
christos e5548b402a Use reach-over sources from common/lib/libc 2005-12-20 19:31:47 +00:00
christos 86741d79ab - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
2005-07-30 15:21:20 +00:00
christos 1cf13731b1 PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
  for all the error printing functions. This makes the perror(3) page
  obsolete.
- Implement all error functions in terms of strerror_r(), including
  __strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r
2005-07-28 16:26:29 +00:00
perry 1968911436 Fix stupid typo. I added memmem, not memmove. 2005-03-14 03:13:53 +00:00
perry ff41832f1c add memmem 2005-03-13 15:15:13 +00:00
junyoung 74d67c3551 Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.
2004-07-03 08:27:25 +00:00
tshiozak 326ed36874 changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
  - add wcstok(3),
  - move btowc() and wctob() into each ctype modules,
  - bump ctype interface ABI version,
  - bump i18n modules' minor and
  - update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.
2003-03-05 20:18:14 +00:00
kleink 937479fc3b Need internal names for strlcat() and strlcpy(). 2002-04-17 16:23:08 +00:00
itojun e04ee8e939 split wide char section, just for readability/future possibility for .if 2000-12-24 03:45:04 +00:00
itojun 383f218a51 move wcs* and wmem* from lib/libc/locale to lib/libc/string. 2000-12-23 23:14:33 +00:00
lukem e447fb4bb4 add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy
1999-09-08 22:56:55 +00:00
drochner a34eb7c1b7 use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
1999-02-24 15:05:20 +00:00
kleink 25d16c74e0 Install a link for strtok_r(3). 1998-09-14 21:34:43 +00:00
perry 2ea077b77c switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.
1998-08-04 06:25:10 +00:00
perry 8079ec33a6 Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).
1998-08-04 04:48:16 +00:00
perry f11bd84939 note that bzero isn't yet being built from memset.c 1998-01-30 23:45:23 +00:00
perry 5f8a6c06f3 update to lite-2 1998-01-30 23:37:40 +00:00
cgd 5815a7b9b9 Update various aspects of the special target builds which should
have been done (by others) a long time ago:
	* fix PIC compilation to use new PIC flags,
	* make them 'make -j N' safe.
1998-01-23 18:58:05 +00:00
lukem d0e23d974a - use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...
1997-10-22 23:14:04 +00:00
lukem 2a55b0f192 rcsid police 1997-10-09 10:07:40 +00:00
mrg cbf5ef7c50 move str[fp]time into libc/time. 1997-04-23 01:17:59 +00:00
cgd 2a7f3ba91e add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.
1996-12-22 11:34:21 +00:00
jtc c4c70a1c64 Add strtok_r() for reentrant (thread-aware) programs 1996-11-12 02:03:13 +00:00
matthias 6a01b1234b Make it possible to have a md version of memccpy. 1996-09-24 09:14:18 +00:00
mycroft 79b7b78087 Clarify a comment slightly. 1995-03-20 14:47:39 +00:00
mycroft ce36f636ab Separate machine dependencies. 1995-03-20 14:45:27 +00:00
cgd b42e80ba75 list the files needed on the alpha. 1995-02-10 17:46:48 +00:00
cgd ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
dean 6ffb5ee299 Include files for pmax 1994-11-14 23:48:22 +00:00
jtc 6d3bf399eb __strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.
1994-09-03 05:07:49 +00:00
jtc 18ba4287c5 Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.
1994-08-02 05:01:20 +00:00
mycroft 1454a5a41f We're supposed to include ${CPPFLAGS} when compiling .c files. 1994-07-06 04:07:53 +00:00
cgd 7f79e48c1a add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.
1994-06-22 00:15:22 +00:00
phil d5e9c48073 Changing the ns32k stuff. 1994-02-25 07:42:01 +00:00