History log of /freebsd-current/include/wchar.h
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# eebd9d53 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: Simplify BSD-2-Clause AND BSD-2-Clause

After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# ee37f64c 14-Jul-2021 Konstantin Belousov <kib@FreeBSD.org>

libc: add mempcpy(3) and wmempcpy(3)

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31180


# 11478453 20-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Vendor import of stripped libc++ trunk r366426 (just before the release_90 branch
point):

https://llvm.org/svn/llvm-project/libcxx/trunk@366426


# 0564cdb9 18-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Vendor import of libc++ trunk r321017:
https://llvm.org/svn/llvm-project/libcxx/trunk@321017


# 6e778a7e 08-Dec-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

SPDX: license IDs for some ISC-related files.


# e58eb3c4 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

include: General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# edb11085 01-Jun-2017 Dimitry Andric <dim@FreeBSD.org>

Vendor import of libc++ trunk r304460:
https://llvm.org/svn/llvm-project/libcxx/trunk@304460


# 7582e393 16-May-2017 Dimitry Andric <dim@FreeBSD.org>

Vendor import of libc++ trunk r303197:
https://llvm.org/svn/llvm-project/libcxx/trunk@303197


# 51072bd6 23-Jul-2016 Dimitry Andric <dim@FreeBSD.org>

Vendor import of libc++ release_39 branch r276489:
https://llvm.org/svn/llvm-project/libcxx/branches/release_39@276489


# 7e3327be 30-May-2016 Ed Schouten <ed@FreeBSD.org>

Add missing va_list to <wchar.h>.

It looks like va_list should always be defined when XSI is enabled. It
moved over to the POSIX base in the 2008 edition.


# b4c64ad9 30-Dec-2015 Dimitry Andric <dim@FreeBSD.org>

Vendor import of libc++ trunk r256633:
https://llvm.org/svn/llvm-project/libcxx/trunk@256633


# 448f5f73 11-May-2014 Jilles Tjoelker <jilles@FreeBSD.org>

include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.


# 0a4c54d6 01-Apr-2014 Tijl Coosemans <tijl@FreeBSD.org>

Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4
-fms-extensions.

MFC after: 2 weeks


# 9240031a 27-Feb-2013 John Baldwin <jhb@FreeBSD.org>

Add an implementation of open_memstream() and open_wmemstream(). These
routines provide write-only stdio FILE objects that store their data in a
dynamically allocated buffer. They are a string builder interface somewhat
akin to a completely dynamic sbuf.

Reviewed by: bde, jilles (earlier versions)
MFC after: 1 month


# 74dc547e 23-Jun-2012 Andrew Turner <andrew@FreeBSD.org>

Make the wchar_t type machine dependent.

This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the
ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an
unsigned short with the former preferred.

Because of this requirement we need to move the definition of __wchar_t to
a machine dependent header. It also cleans up the macros defining the limits
of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine
dependent header then using them to define WCHAR_MIN and WCHAR_MAX
respectively.

Discussed with: bde


# 3ac9d659 27-Mar-2012 David Chisnall <theraven@FreeBSD.org>

Correctly expose xlocale functions if people include the headers in the wrong
order (as some ports apparently do).

Approved by: dim (mentor)


# a8ed63bb 04-Mar-2012 David Chisnall <theraven@FreeBSD.org>

Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
universe with gcc.

Approved by: dim (mentor)


# b74cf6dc 14-Feb-2012 Dimitry Andric <dim@FreeBSD.org>

Revert r231673 and r231682 for now, until we can run a full make
universe with them. Sorry for the breakage.

Pointy hat to: me and brooks


# 82dd5016 13-Feb-2012 David Chisnall <theraven@FreeBSD.org>

Cleanup of xlocale:

- Address performance regressions encountered by das@ by caching per-thread
data in TLS where available.
- Add a __NO_TLS flag to cdefs.h to indicate where not available.
- Reorganise the xlocale.h definitions into xlocale/*.h so that they can be
included from multiple places.
- Export the POSIX2008 subset of xlocale when POSIX2008 says it should be
exported, independently of whether xlocale.h is included.
- Fix the bug where programs using ctype functions always assumed ASCII unless
recompiled.
- Fix some style(9) violations.

Reviewed by: brooks (mentor)
Approved by: dim (mentor)


# c9e7ce2f 13-Nov-2011 David Chisnall <theraven@FreeBSD.org>

The spec says that FILE must be defined in wchar.h, but it wasn't. It
is now. Also hide some macros in C++ mode that will break C++
namespaced calls.

Approved by: dim (mentor)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 69235413 16-Feb-2010 Warner Losh <imp@FreeBSD.org>

Remove NetBSD Foundation clauses 3 & 4. They eliminated those clauses
last year.


# 5eb167d3 04-Mar-2009 David Schultz <das@FreeBSD.org>

Put the restrict qualifiers in the right place in the wcp[n]cpy prototypes.

Submitted by: Pawel Worach <pawel.worach@gmail.com>


# 09efd0ec 03-Mar-2009 David Schultz <das@FreeBSD.org>

Add wcpcpy(3) and wcpncpy(3).


# 69099ba2 27-Feb-2009 David Schultz <das@FreeBSD.org>

- Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),
wcscasecmp(), and wcsncasecmp().
- Make some previously non-standard extensions visible
if POSIX_VISIBLE >= 200809.
- Use restrict qualifiers in stpcpy().
- Declare off_t and size_t in stdio.h.
- Bump __FreeBSD_version in case the new symbols (particularly
getline()) cause issues with ports.

Reviewed by: standards@


# 544048ec 31-Jan-2009 David Schultz <das@FreeBSD.org>

Add a function attribute called `__malloc_like', which informs gcc
that the annotated function returns a pointer that doesn't alias any
extant pointer. This results in a 50%+ speedup in microbenchmarks such
as the following:

char *cp = malloc(1), *buf = malloc(BUF);
for (i = 0; i < BUF; i++) buf[i] = *cp;

In real programs, your mileage will vary. Note that gcc already
performs this optimization automatically for any function called
`malloc', `calloc', `strdup', or `strndup' unless -fno-builtins is
used.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# d62e8d4c 12-Aug-2005 Tim J. Robbins <tjr@FreeBSD.org>

Add an implementation of the semi-standard wcsdup() function, as found
on Microsoft and GNU systems.


# de6c9c9d 11-Aug-2004 Tim J. Robbins <tjr@FreeBSD.org>

Implement wcwidth() as an inline function.


# affcb871 22-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Mark functions pure where applicable.


# 1949a347 21-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
convenient when the source string isn't null-terminated.

Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(),
wcsrtombs()) in terms of these new functions.


# 9531ef0f 16-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Add fgetwln(), a wide character version of fgetln().


# f05d1a46 07-Jun-2004 Tim J. Robbins <tjr@FreeBSD.org>

Fix typo in putwc().

Noticed by: stefanf


# 84bb9aaa 27-May-2004 Tim J. Robbins <tjr@FreeBSD.org>

Bring back the macro versions of getwc(), getwchar(), putwc() and
putwchar(), but this time avoid redundantly declaring __stdinp and
__stdoutp when source files include both <stdio.h> and <wchar.h>.


# 30af8f30 24-May-2004 Tim J. Robbins <tjr@FreeBSD.org>

Revert to rev. 1.36 until issues with -Wredundant-decls are sorted out.


# 15f1cbdd 24-May-2004 Tim J. Robbins <tjr@FreeBSD.org>

Fix typo in previous: getwc() should call fgetwc(), not the function
version of itself.

Noticed by: stefanf


# e7e4715d 25-May-2004 Tim J. Robbins <tjr@FreeBSD.org>

Provide trivial macro implementations of getwc(), getwchar(), putwc() and
putwchar() to reduce function call overhead.


# 12eb46c8 07-Dec-2003 Marcel Moolenaar <marcel@FreeBSD.org>

Change the definition of NULL on ia64 (for LP64 compilations) from
an int constant to a long constant. This change improves consistency
in the following two ways:
1. The first 8 arguments are always passed in registers on ia64, which
by virtue of the generated code implicitly widens ints to longs and
allows the use of an 32-bit integral type for 64-bit arguments.
Subsequent arguments are passed onto the memory stack, which does
not exhibit the same behaviour and consequently do not allow this.
In practice this means that variadic functions taking pointers
and given NULL (without cast) work as long as the NULL is passed
in one of the first 8 arguments. A SIGSEGV is more likely the
result if such would be done for stack-based arguments. This is
due to the fact that the upper 4 bytes remain undefined.
2. All 64-bit platforms that FreeBSD supports, with the obvious
exception of ia64, allow 32-bit integral types (specifically NULL)
when 64-bit pointers are expected in variadic functions by way of
how the compiler generates code. As such, code that works correctly
(whether rightfully so or not) on any platform other than ia64, may
fail on ia64.

To more easily allow tweaking of the definition of NULL, this commit
removes the 12 definitions in the various headers and puts it in a
new header that can be included whenever NULL is to be made visible.

This commit fixes GNOME, emacs, xemacs and a whole bunch of ports
that I don't particularly care about at this time...


# 287365ff 28-Apr-2003 Alexander Kabaev <kan@FreeBSD.org>

Add definitions for WCHAR_MIN and WCHAR_MAX.


# 542bd65f 12-Mar-2003 Tim J. Robbins <tjr@FreeBSD.org>

MFp4: Implementations of the wcstof() and wcstold() functions.


# 11de8366 27-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Correct visibility for v*wscanf(), wcstoll() and wcstoull(). These functions
did not exist in ISO C Amd. 1. Add #ifdef __LONG_LONG_SUPPORTED and lint
comments around wcstoll() and wcstoull().


# fd4f1dd9 03-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add a placeholder implementation of wcscoll() and wcsxfrm() which gives
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.


# 3619568a 28-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Remove masking macros for getwc(), putwc(), putwchar() and getwchar().
Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.


# 1f4ff850 22-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add implementations of wscanf() and related functions: fwscanf(), swscanf(),
vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide-
character versions of the scanf() family of functions.


# 1302dabd 22-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.


# c5604d0a 21-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.


# 7ca9f09d 21-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Restrict visibility of wcslcat() and wcslcpy() to the __BSD_VISIBLE case.


# 03b716c4 15-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add wcstod() as a wrapper around strtod(). It does not handle any characters
that strtod() does not (alternate digit characters, etc. are not handled).


# 18db09bb 12-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Style: tab between #define and macro name.


# 6b3015b6 12-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Protect arguments to the putwc and putwchar macros with parens.


# 47794211 11-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add an implementation of wcsftime() (wide character version of strftime()).


# 5207d0c8 10-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Replace FILE with struct __sFILE in the prototypes for the wide character
I/O functions to avoid having to bring in pollution from <stdio.h>.

Suggested by: bde


# 6478b242 09-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Remove the typedef of wctype_t from this header; we don't support the
XSI mistake of making everything from <wctype.h> visible here.
If we did choose to support it, we could just #include <wctype.h>.


# 5fd17624 08-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add wcstol() and wcstoul(), based on strtol() and strtoul().


# 9ad39134 07-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add an implementation of wcstok(), based on strtok_r().


# c58bfeb5 06-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add restrict qualifiers to wcsstr()'s arguments.


# 58d38e25 06-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Style: One space between "restrict" qualifier and "*".


# abbd8902 21-Aug-2002 Mike Barcroft <mike@FreeBSD.org>

o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif

Concept by: bde
Reviewed by: jake, obrien


# 71f9b420 20-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Restrict visibility of wcwidth() and wcswidth(); they are XSI extensions.


# 57788f25 19-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Sort unsorted prototypes


# 38eb24cc 19-Aug-2002 Andrey A. Chernov <ache@FreeBSD.org>

Activate (uncomment) wcwidth() and wcswidth() now implemented


# e92a3d83 18-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Implement the ISO C90 Amd.1 restartable wide and multibyte character
manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(),
wcrtomb(), wcsrtombs().


# e74101e4 13-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),
putwc(), fputwc(), putwchar(), ungetwc(), fwide().


# babfb08b 06-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Sort prototypes by function name.


# 9a1a7924 05-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Whitespace formatting changes: line up macro bodies, function names,
place tabs after #define and typedef. Sort typedefs by name.

Requested by: mike


# 4bd5585f 03-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Change wctype_t to an unsigned type to avoid warnings.


# e9fb7011 03-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions.


# 5b32667c 02-Aug-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.


# 6087d244 08-Jul-2002 David E. O'Brien <obrien@FreeBSD.org>

Don't define wchar_t if we are a C++ compiler.

PR: 31864, 40084


# bb28f3c2 23-Mar-2002 Warner Losh <imp@FreeBSD.org>

Breath deep and take __P out of the system include files.

# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.


# 115fef56 10-Jul-2001 David E. O'Brien <obrien@FreeBSD.org>

VCS ID fixup


# f3de575b 15-May-2001 Takuya SHIOZAKI <tshiozak@FreeBSD.org>

adapt to FreeBSD.
- add #define NULL 0 instead of sys/null.h.
- enable locale-insensitive functions:
wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c
wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c
wcsstr.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c
- disable some locale-sensitive functions defined in wchar.h temporarily:
mbrlen mbrtowc mbsinit mbsrtowcs wcrtomb wcsrtombs wcwidth wcswidth
- disable all functions defined in wctype.h temporarily:
is* tow*


# 95a4049a 15-May-2001 Takuya SHIOZAKI <tshiozak@FreeBSD.org>

initial import of wchar.h and wctype.h

Obtained from: NetBSD and Citrus XPG4DL