1 2/* 3 * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 4 unchanged lines hidden (view full) --- 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18#include "includes.h" 19#include "xmalloc.h" 20 |
21RCSID("$Id: bsd-misc.c,v 1.26 2005/02/25 23:07:38 dtucker Exp $"); |
22 23#ifndef HAVE___PROGNAME 24char *__progname; 25#endif 26 27/* 28 * NB. duplicate __progname in case it is an alias for argv[0] 29 * Otherwise it may get clobbered by setproctitle() --- 87 unchanged lines hidden (view full) --- 117 close(fd); 118 if (ret == -1) 119 errno = saverrno; 120 121 return(ret); 122} 123#endif /* HAVE_TRUNCATE */ 124 |
125#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) 126int nanosleep(const struct timespec *req, struct timespec *rem) 127{ 128 int rc, saverrno; 129 extern int errno; 130 struct timeval tstart, tstop, tremain, time2wait; 131 132 TIMESPEC_TO_TIMEVAL(&time2wait, req) --- 82 unchanged lines hidden --- |