Deleted Added
full compact
getpagesize.c (211416) getpagesize.c (288029)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)getpagesize.c 8.1 (Berkeley) 6/4/93";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)getpagesize.c 8.1 (Berkeley) 6/4/93";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/lib/libc/gen/getpagesize.c 211416 2010-08-17 09:13:26Z kib $");
34__FBSDID("$FreeBSD: head/lib/libc/gen/getpagesize.c 288029 2015-09-20 20:23:16Z rodrigc $");
35
36#include <sys/param.h>
37#include <sys/sysctl.h>
38
39#include <errno.h>
40#include <link.h>
41#include <unistd.h>
42
43#include "libc_private.h"
44
45/*
46 * This is unlikely to change over the running time of any
47 * program, so we cache the result to save some syscalls.
48 *
49 * NB: This function may be called from malloc(3) at initialization
50 * NB: so must not result in a malloc(3) related call!
51 */
52
53int
35
36#include <sys/param.h>
37#include <sys/sysctl.h>
38
39#include <errno.h>
40#include <link.h>
41#include <unistd.h>
42
43#include "libc_private.h"
44
45/*
46 * This is unlikely to change over the running time of any
47 * program, so we cache the result to save some syscalls.
48 *
49 * NB: This function may be called from malloc(3) at initialization
50 * NB: so must not result in a malloc(3) related call!
51 */
52
53int
54getpagesize()
54getpagesize(void)
55{
56 int mib[2];
57 static int value;
58 size_t size;
59 int error;
60
61 if (value != 0)
62 return (value);

--- 13 unchanged lines hidden ---
55{
56 int mib[2];
57 static int value;
58 size_t size;
59 int error;
60
61 if (value != 0)
62 return (value);

--- 13 unchanged lines hidden ---