History log of /freebsd-10.0-release/include/wchar.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 247411 27-Feb-2013 jhb

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


# 237517 24-Jun-2012 andrew

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


# 233600 28-Mar-2012 theraven

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

Approved by: dim (mentor)


# 232498 04-Mar-2012 theraven

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

Approved by: dim (mentor)


# 231714 14-Feb-2012 dim

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


# 231673 14-Feb-2012 theraven

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)


# 227487 13-Nov-2011 theraven

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)


# 203963 16-Feb-2010 imp

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


# 189365 04-Mar-2009 das

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

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


# 189361 04-Mar-2009 das

Add wcpcpy(3) and wcpncpy(3).


# 189136 28-Feb-2009 das

- 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@


# 187961 31-Jan-2009 das

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.


# 149011 13-Aug-2005 tjr

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


# 133564 12-Aug-2004 tjr

Implement wcwidth() as an inline function.


# 132565 23-Jul-2004 tjr

Mark functions pure where applicable.


# 132497 21-Jul-2004 tjr

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.


# 132242 16-Jul-2004 tjr

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


# 130185 07-Jun-2004 tjr

Fix typo in putwc().

Noticed by: stefanf


# 129774 27-May-2004 tjr

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>.


# 129713 25-May-2004 tjr

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


# 129710 25-May-2004 tjr

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

Noticed by: stefanf


# 129705 25-May-2004 tjr

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


# 123257 07-Dec-2003 marcel

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...


# 114185 28-Apr-2003 kan

Add definitions for WCHAR_MIN and WCHAR_MAX.


# 112177 13-Mar-2003 tjr

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


# 106035 27-Oct-2002 tjr

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().


# 104443 04-Oct-2002 tjr

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.


# 104080 28-Sep-2002 tjr

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.


# 103856 23-Sep-2002 tjr

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.


# 103793 22-Sep-2002 tjr

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.


# 103739 21-Sep-2002 tjr

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


# 103737 21-Sep-2002 tjr

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


# 103339 15-Sep-2002 tjr

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


# 103269 12-Sep-2002 tjr

Style: tab between #define and macro name.


# 103246 12-Sep-2002 tjr

Protect arguments to the putwc and putwchar macros with parens.


# 103218 11-Sep-2002 tjr

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


# 103177 10-Sep-2002 tjr

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


# 103118 09-Sep-2002 tjr

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>.


# 103097 08-Sep-2002 tjr

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


# 103067 07-Sep-2002 tjr

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


# 103058 07-Sep-2002 tjr

Add restrict qualifiers to wcsstr()'s arguments.


# 103012 06-Sep-2002 tjr

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


# 102227 21-Aug-2002 mike

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


# 102198 20-Aug-2002 tjr

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


# 102142 19-Aug-2002 ache

Sort unsorted prototypes


# 102140 19-Aug-2002 ache

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


# 102050 18-Aug-2002 tjr

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


# 101776 13-Aug-2002 tjr

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


# 101411 06-Aug-2002 tjr

Sort prototypes by function name.


# 101409 06-Aug-2002 tjr

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

Requested by: mike


# 101314 04-Aug-2002 tjr

Change wctype_t to an unsigned type to avoid warnings.


# 101267 03-Aug-2002 tjr

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


# 101253 03-Aug-2002 tjr

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


# 99640 09-Jul-2002 obrien

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

PR: 31864, 40084


# 93032 23-Mar-2002 imp

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.


# 79555 10-Jul-2001 obrien

VCS ID fixup


# 76636 15-May-2001 tshiozak

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*


# 76633 15-May-2001 tshiozak

initial import of wchar.h and wctype.h

Obtained from: NetBSD and Citrus XPG4DL