diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/Makefile | 18 | ||||
-rw-r--r-- | lib/libc/Makefile.depend | 168 | ||||
-rw-r--r-- | lib/libc/arm/aeabi/Makefile.inc | 8 | ||||
-rw-r--r-- | lib/libc/arm/aeabi/Symbol.map | 17 | ||||
-rw-r--r-- | lib/libc/net/sctp_bindx.3 | 4 | ||||
-rw-r--r-- | lib/libc/resolv/res_comp.c | 6 | ||||
-rw-r--r-- | lib/libc/sys/stack_protector.c | 13 |
7 files changed, 213 insertions, 21 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 93ab138..b6d3f9f 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -163,6 +163,24 @@ SUBDIR+= tests .include <bsd.lib.mk> +.if !defined(_SKIP_BUILD) +# We need libutil.h, get it directly to avoid +# recording a build dependency +CFLAGS+= -I${.CURDIR:H}/libutil +# Same issue with libm +MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${.CURDIR:H}/msun -V ARCH_SUBDIR +# unfortunately msun/src contains both private and public headers +CFLAGS+= -I${.CURDIR:H}/msun/${MSUN_ARCH_SUBDIR} +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -I${.CURDIR:H}/msun/x86 +.endif +CFLAGS+= -I${.CURDIR:H}/msun/src +# and we do not want to record a dependency on msun +.if ${.MAKE.LEVEL} > 0 +GENDIRDEPS_FILTER+= N${RELDIR:H}/msun +.endif +.endif + # Disable warnings in contributed sources. CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} # XXX For now, we don't allow libc to be compiled with diff --git a/lib/libc/Makefile.depend b/lib/libc/Makefile.depend new file mode 100644 index 0000000..05b44c8 --- /dev/null +++ b/lib/libc/Makefile.depend @@ -0,0 +1,168 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/rpc \ + include/rpcsvc \ + lib/${CSU_DIR} \ + lib/libcompiler_rt \ + usr.bin/yacc.host \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +cancelpoints_sem.So: cancelpoints_sem.c +cancelpoints_sem.o: cancelpoints_sem.c +cancelpoints_sem.po: cancelpoints_sem.c +cancelpoints_sem_new.So: cancelpoints_sem_new.c +cancelpoints_sem_new.o: cancelpoints_sem_new.c +cancelpoints_sem_new.po: cancelpoints_sem_new.c +crypt_clnt.So: crypt.h +crypt_clnt.So: crypt_clnt.c +crypt_clnt.o: crypt.h +crypt_clnt.o: crypt_clnt.c +crypt_clnt.po: crypt.h +crypt_clnt.po: crypt_clnt.c +crypt_xdr.So: crypt.h +crypt_xdr.So: crypt_xdr.c +crypt_xdr.o: crypt.h +crypt_xdr.o: crypt_xdr.c +crypt_xdr.po: crypt.h +crypt_xdr.po: crypt_xdr.c +gdtoa_dmisc.So: gdtoa_dmisc.c +gdtoa_dmisc.o: gdtoa_dmisc.c +gdtoa_dmisc.po: gdtoa_dmisc.c +gdtoa_dtoa.So: gdtoa_dtoa.c +gdtoa_dtoa.o: gdtoa_dtoa.c +gdtoa_dtoa.po: gdtoa_dtoa.c +gdtoa_gdtoa.So: gdtoa_gdtoa.c +gdtoa_gdtoa.o: gdtoa_gdtoa.c +gdtoa_gdtoa.po: gdtoa_gdtoa.c +gdtoa_gethex.So: gdtoa_gethex.c +gdtoa_gethex.o: gdtoa_gethex.c +gdtoa_gethex.po: gdtoa_gethex.c +gdtoa_gmisc.So: gdtoa_gmisc.c +gdtoa_gmisc.o: gdtoa_gmisc.c +gdtoa_gmisc.po: gdtoa_gmisc.c +gdtoa_hd_init.So: gdtoa_hd_init.c +gdtoa_hd_init.o: gdtoa_hd_init.c +gdtoa_hd_init.po: gdtoa_hd_init.c +gdtoa_hexnan.So: gdtoa_hexnan.c +gdtoa_hexnan.o: gdtoa_hexnan.c +gdtoa_hexnan.po: gdtoa_hexnan.c +gdtoa_misc.So: gdtoa_misc.c +gdtoa_misc.o: gdtoa_misc.c +gdtoa_misc.po: gdtoa_misc.c +gdtoa_smisc.So: gdtoa_smisc.c +gdtoa_smisc.o: gdtoa_smisc.c +gdtoa_smisc.po: gdtoa_smisc.c +gdtoa_strtod.So: gdtoa_strtod.c +gdtoa_strtod.o: gdtoa_strtod.c +gdtoa_strtod.po: gdtoa_strtod.c +gdtoa_strtodg.So: gdtoa_strtodg.c +gdtoa_strtodg.o: gdtoa_strtodg.c +gdtoa_strtodg.po: gdtoa_strtodg.c +gdtoa_strtof.So: gdtoa_strtof.c +gdtoa_strtof.o: gdtoa_strtof.c +gdtoa_strtof.po: gdtoa_strtof.c +gdtoa_strtord.So: gdtoa_strtord.c +gdtoa_strtord.o: gdtoa_strtord.c +gdtoa_strtord.po: gdtoa_strtord.c +gdtoa_strtorx.So: gdtoa_strtorx.c +gdtoa_strtorx.o: gdtoa_strtorx.c +gdtoa_strtorx.po: gdtoa_strtorx.c +gdtoa_sum.So: gdtoa_sum.c +gdtoa_sum.o: gdtoa_sum.c +gdtoa_sum.po: gdtoa_sum.c +gdtoa_ulp.So: gdtoa_ulp.c +gdtoa_ulp.o: gdtoa_ulp.c +gdtoa_ulp.po: gdtoa_ulp.c +jemalloc_arena.So: jemalloc_arena.c +jemalloc_arena.o: jemalloc_arena.c +jemalloc_arena.po: jemalloc_arena.c +jemalloc_atomic.So: jemalloc_atomic.c +jemalloc_atomic.o: jemalloc_atomic.c +jemalloc_atomic.po: jemalloc_atomic.c +jemalloc_base.So: jemalloc_base.c +jemalloc_base.o: jemalloc_base.c +jemalloc_base.po: jemalloc_base.c +jemalloc_bitmap.So: jemalloc_bitmap.c +jemalloc_bitmap.o: jemalloc_bitmap.c +jemalloc_bitmap.po: jemalloc_bitmap.c +jemalloc_chunk.So: jemalloc_chunk.c +jemalloc_chunk.o: jemalloc_chunk.c +jemalloc_chunk.po: jemalloc_chunk.c +jemalloc_chunk_dss.So: jemalloc_chunk_dss.c +jemalloc_chunk_dss.o: jemalloc_chunk_dss.c +jemalloc_chunk_dss.po: jemalloc_chunk_dss.c +jemalloc_chunk_mmap.So: jemalloc_chunk_mmap.c +jemalloc_chunk_mmap.o: jemalloc_chunk_mmap.c +jemalloc_chunk_mmap.po: jemalloc_chunk_mmap.c +jemalloc_ckh.So: jemalloc_ckh.c +jemalloc_ckh.o: jemalloc_ckh.c +jemalloc_ckh.po: jemalloc_ckh.c +jemalloc_ctl.So: jemalloc_ctl.c +jemalloc_ctl.o: jemalloc_ctl.c +jemalloc_ctl.po: jemalloc_ctl.c +jemalloc_extent.So: jemalloc_extent.c +jemalloc_extent.o: jemalloc_extent.c +jemalloc_extent.po: jemalloc_extent.c +jemalloc_hash.So: jemalloc_hash.c +jemalloc_hash.o: jemalloc_hash.c +jemalloc_hash.po: jemalloc_hash.c +jemalloc_huge.So: jemalloc_huge.c +jemalloc_huge.o: jemalloc_huge.c +jemalloc_huge.po: jemalloc_huge.c +jemalloc_jemalloc.So: jemalloc_jemalloc.c +jemalloc_jemalloc.o: jemalloc_jemalloc.c +jemalloc_jemalloc.po: jemalloc_jemalloc.c +jemalloc_mb.So: jemalloc_mb.c +jemalloc_mb.o: jemalloc_mb.c +jemalloc_mb.po: jemalloc_mb.c +jemalloc_mutex.So: jemalloc_mutex.c +jemalloc_mutex.o: jemalloc_mutex.c +jemalloc_mutex.po: jemalloc_mutex.c +jemalloc_prof.So: jemalloc_prof.c +jemalloc_prof.o: jemalloc_prof.c +jemalloc_prof.po: jemalloc_prof.c +jemalloc_quarantine.So: jemalloc_quarantine.c +jemalloc_quarantine.o: jemalloc_quarantine.c +jemalloc_quarantine.po: jemalloc_quarantine.c +jemalloc_rtree.So: jemalloc_rtree.c +jemalloc_rtree.o: jemalloc_rtree.c +jemalloc_rtree.po: jemalloc_rtree.c +jemalloc_stats.So: jemalloc_stats.c +jemalloc_stats.o: jemalloc_stats.c +jemalloc_stats.po: jemalloc_stats.c +jemalloc_tcache.So: jemalloc_tcache.c +jemalloc_tcache.o: jemalloc_tcache.c +jemalloc_tcache.po: jemalloc_tcache.c +jemalloc_tsd.So: jemalloc_tsd.c +jemalloc_tsd.o: jemalloc_tsd.c +jemalloc_tsd.po: jemalloc_tsd.c +jemalloc_util.So: jemalloc_util.c +jemalloc_util.o: jemalloc_util.c +jemalloc_util.po: jemalloc_util.c +nslexer.So: nslexer.c +nslexer.So: nsparser.h +nslexer.o: nslexer.c +nslexer.o: nsparser.h +nslexer.po: nslexer.c +nslexer.po: nsparser.h +nsparser.So: nsparser.c +nsparser.o: nsparser.c +nsparser.po: nsparser.c +subr_acl_nfs4.So: subr_acl_nfs4.c +subr_acl_nfs4.o: subr_acl_nfs4.c +subr_acl_nfs4.po: subr_acl_nfs4.c +yp_xdr.So: yp.h +yp_xdr.So: yp_xdr.c +yp_xdr.o: yp.h +yp_xdr.o: yp_xdr.c +yp_xdr.po: yp.h +yp_xdr.po: yp_xdr.c +.endif diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc index fa0ec8e..612e47f 100644 --- a/lib/libc/arm/aeabi/Makefile.inc +++ b/lib/libc/arm/aeabi/Makefile.inc @@ -27,13 +27,5 @@ SRCS+= aeabi_memcmp.S \ aeabi_memmove.S \ aeabi_memset.S -# Mark the functions as hidden so they are not available outside of libc. -CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN -CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN -CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN -CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN -CFLAGS+= ${CFLAGS.${.IMPSRC:T}} - - SYM_MAPS+=${LIBC_SRCTOP}/arm/aeabi/Symbol.map diff --git a/lib/libc/arm/aeabi/Symbol.map b/lib/libc/arm/aeabi/Symbol.map index 164d3e7..1aff929 100644 --- a/lib/libc/arm/aeabi/Symbol.map +++ b/lib/libc/arm/aeabi/Symbol.map @@ -52,4 +52,21 @@ FBSDprivate_1.0 { __aeabi_i2d; __aeabi_i2f; + + + __aeabi_memclr; + __aeabi_memclr4; + __aeabi_memclr8; + __aeabi_memcmp; + __aeabi_memcmp4; + __aeabi_memcmp8; + __aeabi_memcpy; + __aeabi_memcpy4; + __aeabi_memcpy8; + __aeabi_memmove; + __aeabi_memmove4; + __aeabi_memmove8; + __aeabi_memset; + __aeabi_memset4; + __aeabi_memset8; }; diff --git a/lib/libc/net/sctp_bindx.3 b/lib/libc/net/sctp_bindx.3 index 263cb63..96d63cd 100644 --- a/lib/libc/net/sctp_bindx.3 +++ b/lib/libc/net/sctp_bindx.3 @@ -28,7 +28,7 @@ .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd December 15, 2006 +.Dd June 14, 2015 .Dt SCTP_BINDX 3 .Os .Sh NAME @@ -71,7 +71,7 @@ must be one of the following values. This value indicates that the listed address(es) need to be added to the endpoint. .Pp -.Dv SCTP_BINDX_DEL_ADDR +.Dv SCTP_BINDX_REM_ADDR This value indicates that the listed address(es) need to be removed from the endpoint. .Pp diff --git a/lib/libc/resolv/res_comp.c b/lib/libc/resolv/res_comp.c index 539d974..279ea23 100644 --- a/lib/libc/resolv/res_comp.c +++ b/lib/libc/resolv/res_comp.c @@ -147,12 +147,12 @@ dn_skipname(const u_char *ptr, const u_char *eom) { || ((c) >= 0x61 && (c) <= 0x7a)) #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) -#define borderchar(c) (alphachar(c) || digitchar(c)) #ifdef RES_ENFORCE_RFC1034 -#define middlechar(c) (borderchar(c) || hyphenchar(c)) +#define borderchar(c) (alphachar(c) || digitchar(c)) #else -#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) +#define borderchar(c) (alphachar(c) || digitchar(c) || underscorechar(c)) #endif +#define middlechar(c) (borderchar(c) || hyphenchar(c)) #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) int diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c index ed7d635..cd5f166 100644 --- a/lib/libc/sys/stack_protector.c +++ b/lib/libc/sys/stack_protector.c @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include "libc_private.h" -extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, - void *newp, size_t newlen); +extern int __sysctl(const int *name, u_int namelen, void *oldp, + size_t *oldlenp, void *newp, size_t newlen); long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0}; static void __guard_setup(void) __attribute__((__constructor__, __used__)); @@ -54,7 +54,7 @@ void __chk_fail(void); static void __guard_setup(void) { - int mib[2]; + static const int mib[2] = { CTL_KERN, KERN_ARND }; size_t len; int error; @@ -65,12 +65,9 @@ __guard_setup(void) if (error == 0 && __stack_chk_guard[0] != 0) return; - mib[0] = CTL_KERN; - mib[1] = KERN_ARND; - len = sizeof(__stack_chk_guard); - if (__sysctl(mib, 2, __stack_chk_guard, &len, NULL, 0) == -1 || - len != sizeof(__stack_chk_guard)) { + if (__sysctl(mib, nitems(mib), __stack_chk_guard, &len, NULL, 0) == + -1 || len != sizeof(__stack_chk_guard)) { /* If sysctl was unsuccessful, use the "terminator canary". */ ((unsigned char *)(void *)__stack_chk_guard)[0] = 0; ((unsigned char *)(void *)__stack_chk_guard)[1] = 0; |