Deleted Added
full compact
sleep.c (165903) sleep.c (200150)
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[] = "@(#)sleep.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[] = "@(#)sleep.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/sleep.c 165903 2007-01-09 00:28:16Z imp $");
34__FBSDID("$FreeBSD: head/lib/libc/gen/sleep.c 200150 2009-12-05 19:31:38Z ed $");
35
36#include "namespace.h"
37#include <errno.h>
38#include <limits.h>
39#include <time.h>
40#include <unistd.h>
41#include "un-namespace.h"
42
43unsigned int
35
36#include "namespace.h"
37#include <errno.h>
38#include <limits.h>
39#include <time.h>
40#include <unistd.h>
41#include "un-namespace.h"
42
43unsigned int
44__sleep(seconds)
45 unsigned int seconds;
44__sleep(unsigned int seconds)
46{
47 struct timespec time_to_sleep;
48 struct timespec time_remaining;
49
50 /*
51 * Avoid overflow when `seconds' is huge. This assumes that
52 * the maximum value for a time_t is >= INT_MAX.
53 */

--- 15 unchanged lines hidden ---
45{
46 struct timespec time_to_sleep;
47 struct timespec time_remaining;
48
49 /*
50 * Avoid overflow when `seconds' is huge. This assumes that
51 * the maximum value for a time_t is >= INT_MAX.
52 */

--- 15 unchanged lines hidden ---