summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix -Wmissing-braces warnings by adding braces around all thengie2015-11-151-138/+138
| | | | | | | | testcase inputs MFC after: 1 week X-MFC with: r290572 Sponsored by: EMC / Isilon Storage Division
* Fix -Wunused warningsngie2015-11-152-4/+3
| | | | | | MFC after: 1 week X-MFC with: r290572 Sponsored by: EMC / Isilon Storage Division
* Bump WARNS to 2ngie2015-11-151-0/+2
| | | | | | MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division
* Remove unused variables; sort by alignment where neededngie2015-11-154-5/+1
| | | | | | MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division
* Polish up iswctype_testngie2015-11-151-28/+50
| | | | | | | | | | - Split up the testcases into C locale and ja_JP.eucJP testcases. - Avoid a segfault in the event that setlocale fails, similar to r290843 - Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)` MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division
* Polish up the tests a bit more after projects/collation was merged to headngie2015-11-152-37/+77
| | | | | | | | | | | | | | | Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will always segfault Split up the testcases so one failing (in this case en_US.ISO8859-15) won't cause the rest of the testcases to be skipped Remove some unused variables MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division
* Fix the Indian numbering system (hi_IN.ISCII-DEV) testsngie2015-11-151-4/+4
| | | | | | Submitted by: ache X-MFC with: r290494 (if that ever happens) Sponsored by: EMC / Isilon Storage Division
* 1) Remove my overcomplicated error fallback and just return errorache2015-11-121-11/+3
| | | | | | | | | immediatelly as old code does, now for append modes too. Real use case for such fallback is impossible (unless specially crafted). 2) Remove now unneded include I forgot to remove in prev. commits. MFC after: 1 week
* Add missing licensing boilerplate to test-fnmatch.cngie2015-11-101-0/+25
| | | | | | | | Carry over licensing author info from fnmatch_test.c (jilles@) MFC after: 1 week X-MFC with: r290572 Sponsored by: EMC / Isilon Storage Division
* return "US-ASCII" instead of "POSIX" for "C" and "POSIX" localesbapt2015-11-101-1/+1
| | | | | as it used to be in previous version of the locales. Returning "POSIX" has too many fallouts.
* nl_langinfo: Simplify case ladderbapt2015-11-091-2/+0
| | | | | | | | The NONE:US-ASCII case isn't necessary. The "NONE:" case will handle US-ASCII, so let's remove the redundant handling. Submitted by: marino Obtained from: DragonflyBSD
* Readd ascii.c forgotten in r290618bapt2015-11-091-0/+192
|
* locales: Enforce US-ASCII encoding (limited to 7-bit)bapt2015-11-094-2/+7
| | | | | | | | | | | | | | The US-ASCII format was getting treated identically to POSIX. It is supposed to throw an ILSEQ errno if a value of 0x80 or greater is encountered, so let's bring back the "ASCII" handling. While here, change nl_codeset to return US-ASCII only when the encoding really is "US-ASCII". Before "C" and "POSIX" encoding returned this string, so now they return "POSIX". Discussed with: ache Submitted by: marino Obtained from: DragonflyBSD
* Integrate tools/regression/lib/libc/gen into the FreeBSD test suitengie2015-11-0910-1/+1666
| | | | | | | | | | | | | | | | | | | as lib/libc/tests/gen The code in test-fnmatch that was used for generating: - bin/sh/tests/builtins/case2.0 - bin/sh/tests/builtins/case3.0 has been left undisturbed. The target `make sh-tests` has been moved over from tools/regression/lib/libc/gen/Makefile to lib/libc/tests/gen/Makefile and made into a PHONY target case2.0 and case3.0 test input generation isn't being done automatically. This needs additional discussion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Fix some TAP -> ATF conversion errorsngie2015-11-091-6/+3
| | | | | | | | - Remove a leftover printf from when this was a TAP based testcase - Catch mmap failures properly MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/net into the FreeBSD test suitengie2015-11-085-8/+426
| | | | | | | | | | as lib/libc/tests/net Also, fix eui64_aton_test:test_str(..). The test was comparing the result of eui64_aton to a pointer of the expected result. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Delete leftover printfs from when these were TAP testsngie2015-11-084-8/+0
| | | | | | MFC after: 1 week X-MFC with: r290532 Sponsored by: EMC / Isilon Storage Division
* Convert print_positional_test over to ATFngie2015-11-081-16/+40
| | | | | | | | Somehow missed in r290537 X-MFC with: r290537 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Reorganize code to elimitate one _sseek() call for append modes.ache2015-11-081-21/+14
| | | | MFC after: 1 week
* printfloat_test and scanfloat_test need symbols from msun; these are ↵ngie2015-11-081-0/+6
| | | | | | | | | | | | automatically provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386 tinderbox Pointyhat to: ngie MFC after: 1 week X-MFC with: r290538 Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/string into the FreeBSD test suitengie2015-11-085-1/+554
| | | | | | | as lib/libc/tests/string MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suitengie2015-11-085-2/+492
| | | | | | | | | | as lib/libc/tests/stdlib - Make the code a bit more style(9) compliant - Convert a sizeof(x)/sizeof(x[0]) to nitems MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/stdio into the FreeBSD test suitengie2015-11-0814-23/+2613
| | | | | | | | | | | as lib/libc/tests/stdio - Fix some whitespace - Convert the testcases to ATF - Convert "/dev/null" to _PATH_DEVNULL MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Integrate tools/regression/lib/libc/locale into the FreeBSD test suitengie2015-11-0818-1/+2355
| | | | | | | as lib/libc/tests/locale MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Merge from head r290483bapt2015-11-0715-92/+76
|\
| * sdl->sdl_len in sockaddr_dl can be longer thanhrs2015-11-031-3/+13
| | | | | | | | sizeof(struct sockaddr_dl).
| * Add _test suffix to multiple tests in lib/libc to conform to the design notedngie2015-11-023-38/+38
| | | | | | | | | | | | | | in the FreeBSD Test Suite wiki MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
| * Remove unused variable (SRCDIR)ngie2015-11-021-2/+0
| | | | | | | | | | MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
| * Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)ngie2015-11-0210-49/+25
| | | | | | | | | | | | | | already employs this check MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* | Fix mbtowc not setting EILSEQ on an Incomplete multibyte sequence for eucJP ↵bapt2015-11-021-0/+1
| | | | | | | | encoding
* | Merge from headbapt2015-11-0117-103/+146
|\ \ | |/
| * Microoptimize.ache2015-11-011-4/+3
| |
| * Addition to prev. commit.ache2015-11-011-4/+6
| | | | | | | | | | | | | | In some edge cases fp->_p can be changed in _sseek(), recalculate. PR: 204156 MFC after: 1 week
| * Don't seek to the end if write buffer is empty (in append modes).ache2015-11-011-11/+12
| | | | | | | | | | PR: 204156 MFC after: 1 week
OpenPOWER on IntegriCloud