/* $NetBSD: swprintf.c,v 1.3 2013/04/19 15:22:25 joerg Exp $ */ /*- * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #if defined(LIBC_SCCS) && !defined(lint) #if 0 __FBSDID("$FreeBSD: src/lib/libc/stdio/swprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $"); #else __RCSID("$NetBSD: swprintf.c,v 1.3 2013/04/19 15:22:25 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include #include #include __weak_alias(swprintf_l, _swprintf_l) int swprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vswprintf(s, n, fmt, ap); va_end(ap); return ret; } int swprintf_l(wchar_t * __restrict s, size_t n, locale_t loc, const wchar_t * __restrict fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vswprintf_l(s, n, loc, fmt, ap); va_end(ap); return ret; } pthread/pthread_tsd.c?showmsg=1'>Expand)Author 2022-04-10pthread: Nix trailing whitespace.riastradh 2022-02-12libpthread: Move namespacing include to top of .c files.riastradh 2020-06-11Drop self->pt_lock before clearing TSD / malloc TSD.ad 2020-04-19Improve TSD behaviorjoerg 2020-04-19Reinit TSD mutex in the child to avoid issues with former waitersjoerg 2020-02-16Revert "Enhance the pthread(3) + malloc(3) init model"kamil 2020-02-15Enhance the pthread(3) + malloc(3) init modelkamil 2019-12-25Since pthread_setspecific requires locks, ensure that they are acquiredjoerg 2019-03-05Transfer all the keys that were created in the libc stub implementationchristos 2017-07-09PR/52386: Use the number of iterations we document.christos 2015-08-25Revert 1.14 now that the arduous task of fixing rumphijack to allowpooka 2015-05-30Thanks rump for not letting us use even mmap during initialization.christos 2015-05-29Fix previous: Can't use calloc/malloc before we complete initializationchristos 2015-05-29Make PTHREAD_KEYS_MAX dynamically adjustablemanu 2013-03-21- Allow libpthread to be dlopened again, by providing libc stubs to libpthread.christos 2012-11-22Don't call the destructor in pthread_key_delete() following the standard.christos 2012-11-21Replace the simple implementation of pthread_key_{create,destroy}christos 2012-03-02Fix indentation.joerg 2008-04-28Remove clause 3 and 4 from TNF licensesmartin 2008-03-08Add a cast to make lint happy.ad 2008-03-07pthread_key_create: instead of using a simple 1/0 value to record a keyad 2007-12-24- Fix pthread_rwlock_trywrlock() which was broken.ad 2007-08-16- Reinitialize the absolute minimum when recycling user thread state.ad 2003-09-29available, not avaliable. From miod@openbsd.wiz 2003-08-13Split out pthread_{set,get}specific() into a separate file and arrangenathanw