summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix lockf(3) cancellation behaviour.kib2015-12-201-3/+8
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Use _map_v4v6_address().ume2015-12-181-4/+3
| | | | | Suggested by: hrs MFC after: 1 week
* Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).ume2015-12-182-28/+174
| | | | | PR: 198092 MFC after: 1 week
* Iterate down lib/libc/tests/nss...ngie2015-12-161-0/+1
| | | | | | MFC after: 1 week X-MFC with: r292323 Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/nss into the FreeBSD test suite asngie2015-12-1610-0/+5399
| | | | | | | | | | | | | | | | | lib/libc/tests/nss - Convert the testcases to ATF - Do some style(9) cleanups: -- Sort headers -- Apply indentation fixes -- Remove superfluous parentheses - Explicitly print out debug printfs for use with `kyua {debug,report}`; for items that were overly noisy, they've been put behind #ifdef DEBUG conditionals - Fix some format strings MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Add Makefile accidentally missed in r292317ngie2015-12-161-0/+15
| | | | | | MFC after: 1 week X-MFC with: r292317 Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite asngie2015-12-163-0/+368
| | | | | | | | | lib/libc/tests/resolv Convert the testcases to ATF MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.kevlo2015-12-155-10/+5
|
* Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.kevlo2015-12-152-4/+2
| | | | Reviewed by: bde
* Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" withngie2015-12-155-5/+15
| | | | | | | | lib/libc/resolv by conditionalizing its definition MFC after: 3 days Reviewed by: ume, vangyzen Differential Revision: https://reviews.freebsd.org/D4519
* Start on a new library (libsysdecode) that provides routines for decodingjhb2015-12-151-2/+3
| | | | | | | | | | | | | | | | | system call information such as system call arguments. Initially this will consist of pulling duplicated code out of truss and kdump though it may prove useful for other utilities in the future. This commit moves the shared utrace(2) record parser out of kdump into the library and updates kdump and truss to use it. One difference from the previous version is that the library version treats unknown events that start with the "RTLD" signature as unknown events. This simplifies the interface and allows the consumer to decide how to handle all non-recognized events. Instead, this function only generates a string description for known malloc() and RTLD records. Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D4537
* resolver: preserve binary compatibility; reduce header pollutionvangyzen2015-12-143-20/+29
| | | | | | | | | | | | | | In r289315, I added new fields to res_state. This broke binary backward compatibility. It also broke some ports (and possibly other code) by requiring the definition of time_t and struct timespec. Fix these problems by moving the new fields into __res_state_ext. Suggested by: ume Reviewed by: ume MFC after: 3 days Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D4472
* Add -static to CFLAGS to unbreak the tests by using a libc.a withngie2015-12-131-1/+1
| | | | | | | | | the xlocale private symbols exposed which aren't exposed publicly via the DSO PR: 191354 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* exec(3): Fix COMPATIBILITY section: default path does not contain cwd.jilles2015-12-121-2/+2
| | | | MFC after: 1 week
* RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.ume2015-12-121-1/+1
| | | | | | | | | Since it breaks certain jail setup, we ignore just 127.0.0.1 instead of whole loopback address range. PR: 192014 Reviewed by: hrs MFC after: 1 week
* Start support for the RISC-V 64-bit architecture developed by UC Berkeley.br2015-12-111-0/+1
| | | | | | | | | | | | | | | RISC-V is a new ISA designed to support computer research and education, and is now become a standard open architecture for industry implementations. This is a minimal set of changes required to run 'make kernel-toolchain' using external (GNU) toolchain. The FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv. Reviewed by: andrew, bdrewery, emaste, imp Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4445
* The calls to RES_SET_H_ERRNO() macro on error paths wind upume2015-12-101-1/+2
| | | | | | | | dereferencing an uninitialized res. PR: 202142 Submitted by: Sean Boudreau MFC after: 1 week
* RPC: populate local address for rendezvous transporter.stas2015-12-101-2/+16
| | | | | | | | | | | When accepting a connection on underlying tcp socket rpc vc transporter fails to populate local address. This change rectifies this problem by modifying rendezvous_request() to fill out the xptr structure member with appropriate information. Submitted by: Alex Burlyga <alex.burlyga.ietf@gmail.com> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4206
* Use stdint.h instead of inttypes.h as the latter pollutes namespace morengie2015-12-092-4/+4
| | | | | | | MFC after: 3 days X-MFC with: r292004 Submitted by: bde Sponsored by: EMC / Isilon Storage Division
* Fix compilation when -DDEBUG is defined by adding inttypes.h #includengie2015-12-082-0/+6
| | | | | | | | | | for intmax_t MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D4434 Reported by: cppcheck Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division
* Delete bogus freeing of uninitialized datangie2015-12-081-1/+0
| | | | | | MFC after: 3 days Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
* Add missing va_ends for corresponding va_starts to clean up variable argumentsngie2015-12-082-0/+4
| | | | | | | | initialized in _test_fmt(..) MFC after: 3 days Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
* Unbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding angie2015-12-081-0/+1
| | | | | | | missing "}" MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Add support for usermode (vdso-like) gettimeofday(2) andkib2015-12-074-2/+155
| | | | | | | | | | | | | | | | | | clock_gettime(2) on ARMv7 and ARMv8 systems which have architectural generic timer hardware. It is similar how the RDTSC timer is used in userspace on x86. Fix a permission problem where generic timer access from EL0 (or userspace on v7) was not properly initialized on APs. For ARMv7, mark the stack non-executable. The shared page is added for all arms (including ARMv8 64bit), and the signal trampoline code is moved to the page. Reviewed by: andrew Discussed with: emaste, mmel Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D4209
* Fix regression in r291738: This really wants -lssp.bdrewery2015-12-051-1/+1
| | | | | | | The normal LIBADD is ssp_nonshared. This also had a DPADD on LIBSSP which does not actually exist, it is blank. Sponsored by: EMC / Isilon Storage Division
* Initialize errno to 0 in the nul testcase before testing itngie2015-12-051-0/+1
| | | | | | | For some odd reason stable/10 requires this, otherwise it always fails the errno == 0 check on line 196. Sponsored by: EMC / Isilon Storage Division
* Fix -Wformat issues and minor whitespace issues in surrounding areasngie2015-12-051-29/+25
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* split.ih:ngie2015-12-053-4/+6
| | | | | | | | | - Create automatically generated include header for split.c main.c: - Use function definitions from debug.ih and split.ih instead of externs Sponsored by: EMC / Isilon Storage Division
* Use `==` instead of `=` in the function comment above split(..) so mkh -pngie2015-12-051-1/+1
| | | | | | | exposes split(..). MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Use ANSI C function prototypes/definitions instead of K&R style onesngie2015-12-051-16/+11
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Add missing headers and sort #includes per style(9)ngie2015-12-051-3/+5
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* - Use ANSI C function prototypes/definitions instead of K&R style onesngie2015-12-051-28/+12
| | | | | | | - Add a missing return type for main(..) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Fix -Wformat warnings by using the correct format qualifiersngie2015-12-051-1/+1
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Fix LDADD/DPADD that should be LIBADD.bdrewery2015-12-0413-52/+27
| | | | Sponsored by: EMC / Isilon Storage Division
* Follow-up r291330: h_testbits.h is only needed by xdr_test.bdrewery2015-11-251-2/+2
| | | | | | X-MFC-With: r291330 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Link fclose(3) to fdclose(3)ngie2015-11-251-1/+1
| | | | | | X-MFC with: r285140 MFC after: 3 weeks (need to evaluate whether or not r285140 can be MFCed) Sponsored by: EMC / Isilon Storage Division
* Replace DPSRCS that work fine in SRCS.bdrewery2015-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is so that 'make depend' is not a required build step in these files. DPSRCS is overall unneeded. DPSRCS already contains SRCS, so anything which can safely be in SRCS should be. DPSRCS is mostly just a way to generate files that should not be linked into the final PROG/LIB. For headers and grammars it is safe for them to be in SRCS since they will be excluded during linking and installation. The only remaining uses of DPSRCS are for generating .c or .o files that must be built before 'make depend' can run 'mkdep' on the SRCS c files list. A semi-proper example is in tests/sys/kern/acct/Makefile where a checked-in .c file has an #include on a generated .c file. The generated .c file should not be linked into the final PROG though since it is #include'd. The more proper way here is just to build/link it in though without DPSRCS. Another example is in sys/modules/linux/Makefile where a shell script runs to parse a DPSRCS .o file that should not be linked into the module. Beyond those, the need for DPSRCS is largely unneeded, redundant, and forces 'make depend' to be ran. Generally, these Makefiles should avoid the need for DPSRCS and define proper dependencies for their files as well. An example of an improper usage and why this matters is in usr.bin/netstat. nl_defs.h was only in DPSRCS and so was not generated during 'make all', but only during 'make depend'. The files including it lacked proper depenencies on it, which forced running 'make depend' to workaround that bug. The 'make depend' target should mostly be used for incremental build help, not to produce a working build. This specific example was broken in the meta build until r287905 since it does not run 'make depend'. The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS: SRCS:M*.h' when there is no .depend file. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week
* META MODE: Don't create .meta files when symlinking sources into the obj ↵bdrewery2015-11-253-8/+8
| | | | | | | | | | | directory. Tracking these leads to situations where meta mode will consider the file to be out of date if /bin/sh or /bin/ln are newer than the source file. There's no reason for meta mode to do this as make is already handling the rebuild dependency fine. Sponsored by: EMC / Isilon Storage Division
* Link localeconv(3) to localeconv_l(3)ngie2015-11-251-0/+1
| | | | MFC after: 3 days
* markup fixesdes2015-11-231-3/+9
|
* Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.cngie2015-11-231-1/+1
| | | | | | | | | | (HOST_SHELL is used in NetBSD) This fixes permission denied issues when gen_ether_subr is not executable MFC after: 3 days Reported by: José Pérez <fbl@aoek.com> Suggested by: bdrewery, sjg
* popen() requires check for fdopen() failurerpokala2015-11-201-10/+24
| | | | | | | | | | | | | | Move fdopen() up near other resource allocation like malloc(); do proper deallocation on failure later on in the function. Submitted by: Ramachandra Topannavar <rtopannavar@panasas.com> Reviewed by: jilles Approved by: jhb (mentor) MFC after: 2 weeks Sponsored by: Panasas, Inc. Differential Revision: https://reviews.freebsd.org/D4126 M lib/libc/gen/popen.c
* If a NIS server has long entries on its database that is bigger thanaraujo2015-11-191-5/+28
| | | | | | | | | | | | | | | | | | | | | 1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry loop when is requesting the information from the NIS server. The ypmatch(1) will return an error until the command receives an kill(1). To avoid this problem, we check the MAX_RETRIES that is by default set to 20 and avoid get in infinet loop at the client side. NOTE: FreeBSD nis(8) server doesn't present this issue. Submitted by: Ravi Pokala <rpokala@panasas.com>, Lakshmi N. Sundararajan <lakshmi.n@msystechnologies.com>, Lewis, Fred <flewis@panasas.com>, Pushkar Kothavade <pushkar.kothavade@msystechnologies.com> Approved by: bapt (mentor) MFC after: 1 month Differential Revision: D4095
* Do not print out errno if the call succeeded unexpectedly; this was a mistakengie2015-11-181-2/+2
| | | | | | | | | made in r290868 MFC after: 4 days X-MFC with: r290563, r290868 Reported by: jilles Sponsored by: EMC / Isilon Storage Division
* Add some initial tests for SLIST and STAILQ macrosngie2015-11-162-0/+239
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Fix unused-but-set-variablebapt2015-11-151-1/+1
| | | | Spotted by: gcc 5.2
* Disable -Wformat with scanfloat_test when compiling with gcc to avoid angie2015-11-151-0/+8
| | | | | | | | | "use of assignment suppression and length modifier together in scanf format" warning on line 90 (it's intentional) MFC after: 1 week X-MFC with: r290537, r290856, r290860 Sponsored by: EMC / Isilon Storage Division
* Fix -Wformat issuesngie2015-11-151-3/+3
| | | | | | | X-MFC with: r290563 MFC after: 1 week Reported by: gcc Sponsored by: EMC / Isilon Storage Division
* Remove unused variables to fix building worldbapt2015-11-154-13/+2
|
* Change WARNS to 2 across the board with all the libc testcasesngie2015-11-152-2/+2
| | | | | | | This effectively "reverts" r290846 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud