Commit Graph

514 Commits

Author SHA1 Message Date
Joseph Myers 60d2f8f3c7 Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
Siddhesh Poyarekar 3d04f5db20 Set EAI_SYSTEM only when h_errno is NETDB_INTERNAL
Fixes BZ #15339.

NSS_STATUS_UNAVAIL may mean that a necessary input resource is not
available.  This could occur in a number of cases including when the
network is down, system runs out of file descriptors, etc.  The
correct differentiator in such a case is the h_errno, which gives the
nature of failure.  In case of failures other than a simple 'not
found', we set h_errno as NETDB_INTERNAL and let errno be the
identifier for the exact error.
2013-05-21 21:54:41 +05:30
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Roland McGrath c74058300c Clean up POSIX.1 implementation of truncate. 2013-05-06 14:56:13 -07:00
Roland McGrath 1324e37f2e Add missing #include in sysdeps/posix/opendir.c. 2013-05-01 09:27:09 -07:00
Roland McGrath d6f9bc519d Fix name space use in last commit. 2013-04-23 15:57:25 -07:00
Roland McGrath 87f51853ce Add generic POSIX implementation of C11 timespec_get. 2013-04-23 15:28:59 -07:00
Siddhesh Poyarekar 2169712d9c Minor cleanup in getaddrinfo
Replace repeated computations of alloca size with a local variable
that stores the computed value.
2013-04-22 10:24:00 +05:30
Andreas Schwab 1cef1b1908 Fix stack overflow in getaddrinfo with many results 2013-04-03 17:39:15 +02:00
Roland McGrath 356b348023 Never call syslog in __libc_message. 2013-03-28 10:38:37 -07:00
Roland McGrath a600e5cef5 Consolidate Linux and POSIX libc_fatal code. 2013-03-19 17:07:15 -07:00
Joseph Myers e97ed6ddbe Remove bp-sym.h and BP_SYM uses from C code. 2013-02-14 13:12:02 +00:00
Pino Toscano 92a601b883 ulimit: include <limits.h> 2013-01-23 17:27:45 +01:00
Pino Toscano 9cbbc4aebe ulimit: move linux implementation as posix
The linux implementation of ulimit works correctly and has nothing specific
to Linux, so move it as general posix implementation.
2013-01-23 17:25:53 +01:00
Joseph Myers 0e2f956295 Fix copyright notice corruption from update-copyright bug. 2013-01-02 19:28:45 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Siddhesh Poyarekar cfde9b463d Return EAI_SYSTEM if we're out of file descriptors
Resolves BZ #14719.
2012-11-19 13:02:48 +05:30
Joseph Myers 531f1ae0a7 Generate /usr/libexec/getconf files when cross-compiling. 2012-11-17 01:49:19 +00:00
Chris Metcalf 017678433c Suppress incorrect link warnings for NSS symbols
When glibc is built with --enable-static-nss, the warning that
using NSS symbols requires the nss shared objects to be present
is no longer true, as those symbols are built into libc.  Suppress
the warning for those symbols by providing a new macro
(nss_interface_function) for the NSS functions that is defined as
static_link_warning in the normal case, and empty for static NSS.
2012-10-30 14:14:33 -04:00
Roland McGrath 6e6249d0b4 BZ#14743: Move clock_* symbols from librt to libc. 2012-10-24 14:50:46 -07:00
Florian Weimer 172a631a1f __alloc_dir: avoid integer overflow in malloc argument 2012-10-16 10:33:50 +02:00
Pino Toscano 5bb0c10a8f sysconf/posix: handle _SC_LEVEL4_CACHE_LINESIZE 2012-10-03 22:57:38 +02:00
Roland McGrath ea4d37b316 Implement POSIX-generic sleep via nanosleep rather than SIGARLM. 2012-09-28 16:26:33 -07:00
Jeff Law 115411772b [BZ #11438]
* sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918
        * addresses
        to global scope.
        * posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16
        addresses are in the same scope as 192.0.2/24.
        * posix/gai.conf: Document new scope table defaults.
2012-09-28 10:15:05 -06:00
Jeff Law 8479f23aa1 * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
if the family is PF_UNSPEC.
2012-08-22 11:41:40 -06:00
Roland McGrath 7c6f9d53c1 Move some things from sysdeps/unix to sysdeps/posix. 2012-08-17 13:52:32 -07:00
Roland McGrath fbc723bb37 Fix typo in last change. 2012-08-17 11:49:00 -07:00
Roland McGrath a084405777 Fix getaddrinfo for [!_STATBUF_ST_NSEC] case. 2012-08-17 11:47:06 -07:00
Roland McGrath a3f95dcc57 Add casts to suppress warnings in system.c under [!_LIBC_REENTRANT]. 2012-08-15 10:08:32 -07:00
Roland McGrath a2433aac7e Add a missing #include. 2012-08-08 10:39:28 -07:00
Roland McGrath a281decc87 Move common dirent implementation from sysdeps/unix to sysdeps/posix. 2012-08-07 14:47:34 -07:00
Roland McGrath bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Florian Weimer 84b3fd8407 Rename __secure_getenv to secure_getenv 2012-07-25 19:46:22 +02:00
Jeroen van Bemmel 7b6e99be77 Avoid duplicate DNS requests if answer is longer than a implementation
limit

        [BZ #14307]
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Increase the size of
        the temporary buffer used to invoke __gethostbyname2_r,
        __gethostbyaddr_r and gethostbyname4_r to make room for struct
        host_data / struct gaih_addrtuple.
        * resolv/nss_dns/dns-host.c (global scope): Move definition of
        implementation constants MAX_NR_ALIASES and MAX_NR_ADDRS to
        header file nss/nsswitch.h.
        * nss/nsswitch.h (global scope): Add definition of implementation
        constants MAX_NR_ALIASES and MAX_NR_ADDRS (moved from
        resolv/nss_dns/dns-host.c).
2012-07-12 11:31:48 +05:30
Roland McGrath d6c33fda03 Switch gettimeofday from INTUSE to libc_hidden_proto. 2012-05-24 13:12:34 -07:00
Thomas Schwinge be971a2b1c Hurd: libc_once_get 2012-05-10 15:57:24 -07:00
Thomas Schwinge 37233df9d1 Hurd: #include <kernel-features.h> 2012-05-10 15:57:24 -07:00
Joseph Myers 4ad451e281 Move sysdeps/unix/sysv/gethostname.c to sysdeps/posix/. 2012-04-23 18:53:47 +00:00
Andreas Schwab 12e5c3b9e5 Add missing headers 2012-02-27 20:27:41 +01:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Joseph Myers c8a89e7dd5 Remove miscellaneous __STDC__ conditionals. 2012-01-30 21:20:32 +00:00
Ulrich Drepper 312be3f9f5 Clean up internal fopen uses
No need to ever not use c and e.
2011-11-15 04:24:42 -05:00
Ulrich Drepper 3a2c02424d Cache network interface information
Whenever getaddrinfo needed network interface information it used the
netlink interface to read the information every single time.  The
problem is that this information can change at any time.

The patch implements monitoring of the network interfaces through
nscd.  If no change is detected the previously read information can
be reused (which is the norm).  This timestamp information is also
made available to other processes using the shared memory segment
between nscd and those processes.
2011-10-31 01:51:16 -04:00
Roland McGrath ecb1482ffd Clean up disabling of script_execute 2011-09-19 12:50:25 -07:00
Ulrich Drepper d96de9634a Try shell in posix_spawn* only in compat mode 2011-09-05 20:24:50 -04:00
Andreas Schwab 2e96f1c73b Fix encoding name for IDN in getaddrinfo 2011-08-04 15:42:10 -04:00
Andreas Schwab 89f654c57b Make sure RES_USE_INET6 is always restored 2011-06-30 06:33:32 -04:00
Ulrich Drepper fa3fc0fe5f Avoid __check_pf calls in getaddrinfo unless really needed 2011-06-22 15:00:54 -04:00
Andreas Schwab e12df166d3 Fix Ipv4&IPv6 lookup in getaddrinfo
Problem introduced in the last patch.
2011-06-22 14:35:49 -04:00