Deleted Added
full compact
sysconf.c (288029) sysconf.c (292521)
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Sean Eric Fagan of Cygnus Support.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)sysconf.c 8.2 (Berkeley) 3/20/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Sean Eric Fagan of Cygnus Support.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)sysconf.c 8.2 (Berkeley) 3/20/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/lib/libc/gen/sysconf.c 288029 2015-09-20 20:23:16Z rodrigc $");
37__FBSDID("$FreeBSD: head/lib/libc/gen/sysconf.c 292521 2015-12-20 23:05:20Z jilles $");
38
38
39#include "namespace.h"
39#include <sys/param.h>
40#include <sys/time.h>
41#include <sys/sysctl.h>
42#include <sys/resource.h>
43#include <sys/socket.h>
44
45#include <elf.h>
46#include <errno.h>
47#include <limits.h>
48#include <paths.h>
49#include <pthread.h> /* we just need the limits */
50#include <time.h>
51#include <unistd.h>
40#include <sys/param.h>
41#include <sys/time.h>
42#include <sys/sysctl.h>
43#include <sys/resource.h>
44#include <sys/socket.h>
45
46#include <elf.h>
47#include <errno.h>
48#include <limits.h>
49#include <paths.h>
50#include <pthread.h> /* we just need the limits */
51#include <time.h>
52#include <unistd.h>
53#include "un-namespace.h"
52
53#include "../stdlib/atexit.h"
54#include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */
55#include "libc_private.h"
56
57#define _PATH_ZONEINFO TZDIR /* from tzfile.h */
58
59/*

--- 510 unchanged lines hidden (view full) ---

570#endif
571 case _SC_SYMLOOP_MAX:
572 return (MAXSYMLINKS);
573 case _SC_RAW_SOCKETS:
574 return (_POSIX_RAW_SOCKETS);
575 case _SC_IPV6:
576#if _POSIX_IPV6 == 0
577 sverrno = errno;
54
55#include "../stdlib/atexit.h"
56#include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */
57#include "libc_private.h"
58
59#define _PATH_ZONEINFO TZDIR /* from tzfile.h */
60
61/*

--- 510 unchanged lines hidden (view full) ---

572#endif
573 case _SC_SYMLOOP_MAX:
574 return (MAXSYMLINKS);
575 case _SC_RAW_SOCKETS:
576 return (_POSIX_RAW_SOCKETS);
577 case _SC_IPV6:
578#if _POSIX_IPV6 == 0
579 sverrno = errno;
578 value = socket(PF_INET6, SOCK_DGRAM, 0);
580 value = _socket(PF_INET6, SOCK_DGRAM, 0);
579 errno = sverrno;
580 if (value >= 0) {
581 errno = sverrno;
582 if (value >= 0) {
581 close(value);
583 _close(value);
582 return (200112L);
583 } else
584 return (0);
585#else
586 return (_POSIX_IPV6);
587#endif
588
589 case _SC_NPROCESSORS_CONF:

--- 33 unchanged lines hidden ---
584 return (200112L);
585 } else
586 return (0);
587#else
588 return (_POSIX_IPV6);
589#endif
590
591 case _SC_NPROCESSORS_CONF:

--- 33 unchanged lines hidden ---