xref: /minix3/lib/libc/include/extern.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: extern.h,v 1.23 2013/08/19 13:03:12 joerg Exp $	*/
22fe8fb19SBen Gras 
32fe8fb19SBen Gras /*
42fe8fb19SBen Gras  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
52fe8fb19SBen Gras  *
62fe8fb19SBen Gras  * Redistribution and use in source and binary forms, with or without
72fe8fb19SBen Gras  * modification, are permitted provided that the following conditions
82fe8fb19SBen Gras  * are met:
92fe8fb19SBen Gras  * 1. Redistributions of source code must retain the above copyright
102fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer.
112fe8fb19SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
122fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer in the
132fe8fb19SBen Gras  *    documentation and/or other materials provided with the distribution.
142fe8fb19SBen Gras  *
152fe8fb19SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
162fe8fb19SBen Gras  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
172fe8fb19SBen Gras  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
182fe8fb19SBen Gras  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
192fe8fb19SBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
202fe8fb19SBen Gras  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
212fe8fb19SBen Gras  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
222fe8fb19SBen Gras  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
232fe8fb19SBen Gras  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
242fe8fb19SBen Gras  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252fe8fb19SBen Gras  */
262fe8fb19SBen Gras 
27f14fb602SLionel Sambuc #include <stdarg.h>
28f14fb602SLionel Sambuc #include <ucontext.h>
29f14fb602SLionel Sambuc 
30*84d9c625SLionel Sambuc #ifndef __LOCALE_T_DECLARED
31*84d9c625SLionel Sambuc typedef struct _locale		*locale_t;
32*84d9c625SLionel Sambuc #define __LOCALE_T_DECLARED
33*84d9c625SLionel Sambuc #endif /* __LOCALE_T_DECLARED */
34*84d9c625SLionel Sambuc 
352fe8fb19SBen Gras __BEGIN_DECLS
362fe8fb19SBen Gras extern char *__minbrk;
372fe8fb19SBen Gras int __getcwd(char *, size_t);
382fe8fb19SBen Gras int __getlogin(char *, size_t);
392fe8fb19SBen Gras int __setlogin(const char *);
40f14fb602SLionel Sambuc void _resumecontext(void) __dead;
41*84d9c625SLionel Sambuc __dso_hidden int	_strerror_lr(int, char *, size_t, locale_t);
422fe8fb19SBen Gras const char *__strerror(int , char *, size_t);
432fe8fb19SBen Gras const char *__strsignal(int , char *, size_t);
442fe8fb19SBen Gras char *__dtoa(double, int, int, int *, int *, char **);
452fe8fb19SBen Gras void __freedtoa(char *);
462fe8fb19SBen Gras int __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);
472fe8fb19SBen Gras 
482fe8fb19SBen Gras struct sigaction;
492fe8fb19SBen Gras int __sigaction_sigtramp(int, const struct sigaction *,
502fe8fb19SBen Gras     struct sigaction *, const void *, int);
512fe8fb19SBen Gras 
522fe8fb19SBen Gras #ifdef WIDE_DOUBLE
532fe8fb19SBen Gras char *__hdtoa(double, const char *, int, int *, int *, char **);
542fe8fb19SBen Gras char *__hldtoa(long double, const char *, int, int *, int *,  char **);
552fe8fb19SBen Gras char *__ldtoa(long double *, int, int, int *, int *, char **);
562fe8fb19SBen Gras #endif
572fe8fb19SBen Gras 
58f14fb602SLionel Sambuc #ifndef __LIBC12_SOURCE__
592fe8fb19SBen Gras struct syslog_data;
602fe8fb19SBen Gras void	syslog_ss(int, struct syslog_data *, const char *, ...)
61f14fb602SLionel Sambuc     __RENAME(__syslog_ss60) __printflike(3, 4);
62f14fb602SLionel Sambuc void    vsyslog_ss(int, struct syslog_data *, const char *, va_list)
63f14fb602SLionel Sambuc     __RENAME(__vsyslog_ss60) __printflike(3, 0);
642fe8fb19SBen Gras void	syslogp_ss(int, struct syslog_data *, const char *, const char *,
65f14fb602SLionel Sambuc     const char *, ...) __RENAME(__syslogp_ss60) __printflike(5, 0);
662fe8fb19SBen Gras void	vsyslogp_ss(int, struct syslog_data *, const char *, const char *,
67f14fb602SLionel Sambuc     const char *, va_list) __RENAME(__vsyslogp_ss60) __printflike(5, 0);
68f14fb602SLionel Sambuc #endif
692fe8fb19SBen Gras 
702fe8fb19SBen Gras void	_malloc_prefork(void);
712fe8fb19SBen Gras void	_malloc_postfork(void);
722fe8fb19SBen Gras 
73f14fb602SLionel Sambuc int	_sys_setcontext(const ucontext_t *);
74f14fb602SLionel Sambuc 
752fe8fb19SBen Gras __END_DECLS
76