[Midnightbsd-cvs] src [10578] trunk/lib/libc/include: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Jun 7 22:33:23 EDT 2018
Revision: 10578
http://svnweb.midnightbsd.org/src/?rev=10578
Author: laffer1
Date: 2018-06-07 22:33:23 -0400 (Thu, 07 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/lib/libc/include/compat.h
trunk/lib/libc/include/fpmath.h
trunk/lib/libc/include/isc/eventlib.h
trunk/lib/libc/include/isc/list.h
trunk/lib/libc/include/libc_private.h
trunk/lib/libc/include/port_before.h
Modified: trunk/lib/libc/include/compat.h
===================================================================
--- trunk/lib/libc/include/compat.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/compat.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,5 +1,6 @@
+/* $MidnightBSD$ */
/*-
- * Copyright (c) 2009 Advanced Computing Technologies LLC
+ * Copyright (c) 2009 Hudson River Trading LLC
* Written by: John H. Baldwin <jhb at FreeBSD.org>
* All rights reserved.
*
@@ -24,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/libc/include/compat.h 283927 2015-06-02 19:20:39Z jhb $
*/
/*
@@ -44,5 +45,14 @@
#undef __sym_compat
+#define __weak_reference(sym,alias) \
+ .weak alias;.equ alias,sym
+
+#ifndef SYSCALL_COMPAT
+__weak_reference(__sys_fcntl,__fcntl_compat)
+#endif
+
+#undef __weak_reference
+
#endif /* __LIBC_COMPAT_H__ */
Modified: trunk/lib/libc/include/fpmath.h
===================================================================
--- trunk/lib/libc/include/fpmath.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/fpmath.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2003 Mike Barcroft <mike at FreeBSD.org>
* Copyright (c) 2002 David Schultz <das at FreeBSD.ORG>
@@ -24,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/libc/include/fpmath.h 186461 2008-12-23 22:20:59Z marcel $
*/
#include <sys/endian.h>
Modified: trunk/lib/libc/include/isc/eventlib.h
===================================================================
--- trunk/lib/libc/include/isc/eventlib.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/isc/eventlib.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,24 +1,25 @@
+/* $MidnightBSD$ */
/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1995-1999 by Internet Software Consortium
+ * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
*/
/* eventlib.h - exported interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib.h,v 1.1.1.1 2008-10-30 20:39:06 laffer1 Exp $
+ * $Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp $
*/
#ifndef _EVENTLIB_H
@@ -29,6 +30,8 @@
#include <sys/time.h>
#include <stdio.h>
+#include <isc/platform.h>
+
#ifndef __P
# define __EVENTLIB_P_DEFINED
# ifdef __STDC__
Modified: trunk/lib/libc/include/isc/list.h
===================================================================
--- trunk/lib/libc/include/isc/list.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/isc/list.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1997,1999 by Internet Software Consortium.
@@ -15,7 +16,7 @@
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $FreeBSD: src/lib/libc/include/isc/list.h,v 1.3 2007/06/03 18:13:59 ume Exp $ */
+/* $FreeBSD: stable/10/lib/libc/include/isc/list.h 270838 2014-08-30 10:16:25Z ume $ */
#ifndef LIST_H
#define LIST_H 1
@@ -38,7 +39,8 @@
} while (0)
#define INIT_LINK(elt, link) \
INIT_LINK_TYPE(elt, link, void)
-#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1))
+#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1) && \
+ (void *)((elt)->link.next) != (void *)(-1))
#define HEAD(list) ((list).head)
#define TAIL(list) ((list).tail)
Modified: trunk/lib/libc/include/libc_private.h
===================================================================
--- trunk/lib/libc/include/libc_private.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/libc_private.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1998 John Birrell <jb at cimlogic.com.au>.
* All rights reserved.
@@ -26,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/libc/include/libc_private.h 321074 2017-07-17 14:09:34Z kib $
*
* Private definitions for libc, libc_r and libpthread.
*
@@ -83,7 +84,7 @@
#define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp)
struct _spinlock;
-extern struct _spinlock __stdio_thread_lock;
+extern struct _spinlock __stdio_thread_lock __hidden;
#define STDIO_THREAD_LOCK() \
do { \
if (__isthreaded) \
@@ -95,6 +96,9 @@
_SPINUNLOCK(&__stdio_thread_lock); \
} while (0)
+void __libc_spinlock_stub(struct _spinlock *);
+void __libc_spinunlock_stub(struct _spinlock *);
+
/*
* Indexes into the pthread jump table.
*
@@ -173,6 +177,58 @@
extern pthread_func_entry_t __thr_jtable[];
+void __set_error_selector(int *(*arg)(void));
+int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex,
+ void *(calloc_cb)(__size_t, __size_t));
+
+typedef int (*interpos_func_t)(void);
+interpos_func_t *__libc_interposing_slot(int interposno);
+extern interpos_func_t __libc_interposing[] __hidden;
+
+enum {
+ INTERPOS_accept,
+ INTERPOS_accept4,
+ INTERPOS_aio_suspend,
+ INTERPOS_close,
+ INTERPOS_connect,
+ INTERPOS_fcntl,
+ INTERPOS_fsync,
+ INTERPOS_fork,
+ INTERPOS_msync,
+ INTERPOS_nanosleep,
+ INTERPOS_openat,
+ INTERPOS_poll,
+ INTERPOS_pselect,
+ INTERPOS_recvfrom,
+ INTERPOS_recvmsg,
+ INTERPOS_select,
+ INTERPOS_sendmsg,
+ INTERPOS_sendto,
+ INTERPOS_setcontext,
+ INTERPOS_sigaction,
+ INTERPOS_sigprocmask,
+ INTERPOS_sigsuspend,
+ INTERPOS_sigwait,
+ INTERPOS_sigtimedwait,
+ INTERPOS_sigwaitinfo,
+ INTERPOS_swapcontext,
+ INTERPOS_system,
+ INTERPOS_tcdrain,
+ INTERPOS_read,
+ INTERPOS_readv,
+ INTERPOS_wait4,
+ INTERPOS_write,
+ INTERPOS_writev,
+ INTERPOS__pthread_mutex_init_calloc_cb,
+ INTERPOS_spinlock,
+ INTERPOS_spinunlock,
+ INTERPOS_kevent,
+ INTERPOS_wait6,
+ INTERPOS_ppoll,
+ INTERPOS_map_stacks_exec,
+ INTERPOS_MAX
+};
+
/*
* yplib internal interfaces
*/
@@ -209,6 +265,14 @@
void _malloc_thread_cleanup(void);
/*
+ * This function is used by the threading libraries to notify libc that a
+ * thread is exiting, so its thread-local dtors should be called.
+ */
+void __cxa_thread_call_dtors(void);
+int __cxa_thread_atexit_hidden(void (*dtor_func)(void *), void *obj,
+ void *dso_symbol) __hidden;
+
+/*
* These functions are used by the threading libraries in order to protect
* malloc across fork().
*/
@@ -215,10 +279,12 @@
void _malloc_prefork(void);
void _malloc_postfork(void);
+void _malloc_first_thread(void);
+
/*
* Function to clean up streams, called from abort() and exit().
*/
-extern void (*__cleanup)(void);
+extern void (*__cleanup)(void) __hidden;
/*
* Get kern.osreldate to detect ABI revisions. Explicitly
@@ -225,33 +291,109 @@
* ignores value of $OSVERSION and caches result. Prototypes
* for the wrapped "new" pad-less syscalls are here for now.
*/
-extern int __getosreldate(void);
+int __getosreldate(void);
#include <sys/_types.h>
-/* Without pad */
-extern __off_t __sys_lseek(int, __off_t, int);
-extern int __sys_ftruncate(int, __off_t);
-extern int __sys_truncate(const char *, __off_t);
-extern __ssize_t __sys_pread(int, void *, __size_t, __off_t);
-extern __ssize_t __sys_pwrite(int, const void *, __size_t, __off_t);
-extern void * __sys_mmap(void *, __size_t, int, int, int, __off_t);
+#include <sys/_sigset.h>
/* With pad */
-extern __off_t __sys_freebsd6_lseek(int, int, __off_t, int);
-extern int __sys_freebsd6_ftruncate(int, int, __off_t);
-extern int __sys_freebsd6_truncate(const char *, int, __off_t);
-extern __ssize_t __sys_freebsd6_pread(int, void *, __size_t, int, __off_t);
-extern __ssize_t __sys_freebsd6_pwrite(int, const void *, __size_t, int, __off_t);
-extern void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t);
+__off_t __sys_freebsd6_lseek(int, int, __off_t, int);
+int __sys_freebsd6_ftruncate(int, int, __off_t);
+int __sys_freebsd6_truncate(const char *, int, __off_t);
+__ssize_t __sys_freebsd6_pread(int, void *, __size_t, int, __off_t);
+__ssize_t __sys_freebsd6_pwrite(int, const void *, __size_t, int, __off_t);
+void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t);
-/* Without back-compat translation */
-extern int __sys_fcntl(int, int, ...);
-
+struct aiocb;
+struct fd_set;
+struct iovec;
+struct kevent;
+struct msghdr;
+struct pollfd;
+struct rusage;
+struct sigaction;
+struct sockaddr;
struct timespec;
struct timeval;
struct timezone;
-int __sys_gettimeofday(struct timeval *, struct timezone *);
-int __sys_clock_gettime(__clockid_t, struct timespec *ts);
+struct __siginfo;
+struct __ucontext;
+struct __wrusage;
+enum idtype;
+int __sys_aio_suspend(const struct aiocb * const[], int,
+ const struct timespec *);
+int __sys_accept(int, struct sockaddr *, __socklen_t *);
+int __sys_accept4(int, struct sockaddr *, __socklen_t *, int);
+int __sys_clock_gettime(__clockid_t, struct timespec *ts);
+int __sys_close(int);
+int __sys_connect(int, const struct sockaddr *, __socklen_t);
+int __sys_fcntl(int, int, ...);
+int __sys_fsync(int);
+__pid_t __sys_fork(void);
+int __sys_ftruncate(int, __off_t);
+int __sys_gettimeofday(struct timeval *, struct timezone *);
+int __sys_kevent(int, const struct kevent *, int, struct kevent *,
+ int, const struct timespec *);
+__off_t __sys_lseek(int, __off_t, int);
+void *__sys_mmap(void *, __size_t, int, int, int, __off_t);
+int __sys_msync(void *, __size_t, int);
+int __sys_nanosleep(const struct timespec *, struct timespec *);
+int __sys_open(const char *, int, ...);
+int __sys_openat(int, const char *, int, ...);
+int __sys_pselect(int, struct fd_set *, struct fd_set *,
+ struct fd_set *, const struct timespec *,
+ const __sigset_t *);
+int __sys_ptrace(int, __pid_t, char *, int);
+int __sys_poll(struct pollfd *, unsigned, int);
+int __sys_ppoll(struct pollfd *, unsigned, const struct timespec *,
+ const __sigset_t *);
+__ssize_t __sys_pread(int, void *, __size_t, __off_t);
+__ssize_t __sys_pwrite(int, const void *, __size_t, __off_t);
+__ssize_t __sys_read(int, void *, __size_t);
+__ssize_t __sys_readv(int, const struct iovec *, int);
+__ssize_t __sys_recv(int, void *, __size_t, int);
+__ssize_t __sys_recvfrom(int, void *, __size_t, int, struct sockaddr *,
+ __socklen_t *);
+__ssize_t __sys_recvmsg(int, struct msghdr *, int);
+int __sys_select(int, struct fd_set *, struct fd_set *,
+ struct fd_set *, struct timeval *);
+__ssize_t __sys_sendmsg(int, const struct msghdr *, int);
+__ssize_t __sys_sendto(int, const void *, __size_t, int,
+ const struct sockaddr *, __socklen_t);
+int __sys_setcontext(const struct __ucontext *);
+int __sys_sigaction(int, const struct sigaction *,
+ struct sigaction *);
+int __sys_sigprocmask(int, const __sigset_t *, __sigset_t *);
+int __sys_sigsuspend(const __sigset_t *);
+int __sys_sigtimedwait(const __sigset_t *, struct __siginfo *,
+ const struct timespec *);
+int __sys_sigwait(const __sigset_t *, int *);
+int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *);
+int __sys_swapcontext(struct __ucontext *,
+ const struct __ucontext *);
+int __sys_thr_kill(long, int);
+int __sys_thr_self(long *);
+int __sys_truncate(const char *, __off_t);
+__pid_t __sys_wait4(__pid_t, int *, int, struct rusage *);
+__pid_t __sys_wait6(enum idtype, __id_t, int *, int,
+ struct __wrusage *, struct __siginfo *);
+__ssize_t __sys_write(int, const void *, __size_t);
+__ssize_t __sys_writev(int, const struct iovec *, int);
+int __libc_sigaction(int, const struct sigaction *,
+ struct sigaction *) __hidden;
+int __libc_sigprocmask(int, const __sigset_t *, __sigset_t *)
+ __hidden;
+int __libc_sigsuspend(const __sigset_t *) __hidden;
+int __libc_sigwait(const __sigset_t * __restrict,
+ int * restrict sig);
+int __libc_system(const char *);
+int __libc_tcdrain(int);
+int __fcntl_compat(int fd, int cmd, ...);
+
+int __sys_futimens(int fd, const struct timespec *times) __hidden;
+int __sys_utimensat(int fd, const char *path,
+ const struct timespec *times, int flag) __hidden;
+
/* execve() with PATH processing to implement posix_spawnp() */
int _execvpe(const char *, char * const *, char * const *);
@@ -259,8 +401,14 @@
struct dl_phdr_info;
int __elf_phdr_match_addr(struct dl_phdr_info *, void *);
void __init_elf_aux_vector(void);
+void __libc_map_stacks_exec(void);
void _pthread_cancel_enter(int);
void _pthread_cancel_leave(int);
+struct _pthread_cleanup_info;
+void ___pthread_cleanup_push_imp(void (*)(void *), void *,
+ struct _pthread_cleanup_info *);
+void ___pthread_cleanup_pop_imp(int);
+
#endif /* _LIBC_PRIVATE_H_ */
Modified: trunk/lib/libc/include/port_before.h
===================================================================
--- trunk/lib/libc/include/port_before.h 2018-06-08 02:30:57 UTC (rev 10577)
+++ trunk/lib/libc/include/port_before.h 2018-06-08 02:33:23 UTC (rev 10578)
@@ -1,4 +1,5 @@
/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/lib/libc/include/port_before.h 270838 2014-08-30 10:16:25Z ume $ */
#ifndef _PORT_BEFORE_H_
#define _PORT_BEFORE_H_
@@ -6,6 +7,7 @@
#define _LIBC 1
#define DO_PTHREADS 1
#define USE_KQUEUE 1
+#define HAVE_MD5 1
#define ISC_SOCKLEN_T socklen_t
#define ISC_FORMAT_PRINTF(fmt, args) \
More information about the Midnightbsd-cvs
mailing list