sysconf.c (256281) | sysconf.c (268741) |
---|---|
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: stable/10/lib/libc/gen/sysconf.c 239347 2012-08-17 02:26:31Z davidxu $"); | 37__FBSDID("$FreeBSD: stable/10/lib/libc/gen/sysconf.c 268741 2014-07-16 08:52:44Z kib $"); |
38 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> --- 316 unchanged lines hidden (view full) --- 362 return (_POSIX_CPUTIME); 363#ifdef notdef 364 case _SC_FILE_LOCKING: 365 /* 366 * XXX - The standard doesn't tell us how to define 367 * _POSIX_FILE_LOCKING, so we can't answer this one. 368 */ 369#endif | 38 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> --- 316 unchanged lines hidden (view full) --- 362 return (_POSIX_CPUTIME); 363#ifdef notdef 364 case _SC_FILE_LOCKING: 365 /* 366 * XXX - The standard doesn't tell us how to define 367 * _POSIX_FILE_LOCKING, so we can't answer this one. 368 */ 369#endif |
370#if _POSIX_THREAD_SAFE_FUNCTIONS > -1 | 370 371 /* 372 * SUSv4tc1 says the following about _SC_GETGR_R_SIZE_MAX and 373 * _SC_GETPW_R_SIZE_MAX: 374 * Note that sysconf(_SC_GETGR_R_SIZE_MAX) may return -1 if 375 * there is no hard limit on the size of the buffer needed to 376 * store all the groups returned. 377 */ |
371 case _SC_GETGR_R_SIZE_MAX: 372 case _SC_GETPW_R_SIZE_MAX: | 378 case _SC_GETGR_R_SIZE_MAX: 379 case _SC_GETPW_R_SIZE_MAX: |
373#error "somebody needs to implement this" 374#endif | 380 return (-1); |
375 case _SC_HOST_NAME_MAX: 376 return (MAXHOSTNAMELEN - 1); /* does not include \0 */ 377 case _SC_LOGIN_NAME_MAX: 378 return (MAXLOGNAME); 379 case _SC_MONOTONIC_CLOCK: 380#if _POSIX_MONOTONIC_CLOCK == 0 381#error "_POSIX_MONOTONIC_CLOCK" 382#else --- 235 unchanged lines hidden --- | 381 case _SC_HOST_NAME_MAX: 382 return (MAXHOSTNAMELEN - 1); /* does not include \0 */ 383 case _SC_LOGIN_NAME_MAX: 384 return (MAXLOGNAME); 385 case _SC_MONOTONIC_CLOCK: 386#if _POSIX_MONOTONIC_CLOCK == 0 387#error "_POSIX_MONOTONIC_CLOCK" 388#else --- 235 unchanged lines hidden --- |