svn commit: samba r12641 - in branches/SAMBA_4_0/source: lib
torture/nbench
metze at samba.org
metze at samba.org
Sat Dec 31 09:08:46 GMT 2005
Author: metze
Date: 2005-12-31 09:08:46 +0000 (Sat, 31 Dec 2005)
New Revision: 12641
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12641
Log:
- remove some unused functions
- we already call usleep() directly in some places,
so do it everywhere
metze
Modified:
branches/SAMBA_4_0/source/lib/system.c
branches/SAMBA_4_0/source/torture/nbench/nbio.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/system.c
===================================================================
--- branches/SAMBA_4_0/source/lib/system.c 2005-12-31 08:44:33 UTC (rev 12640)
+++ branches/SAMBA_4_0/source/lib/system.c 2005-12-31 09:08:46 UTC (rev 12641)
@@ -38,73 +38,6 @@
expansions/etc make sense to the OS should be acceptable to Samba.
*/
-
-
-/*******************************************************************
- A wrapper for usleep in case we don't have one.
-********************************************************************/
-
-int sys_usleep(long usecs)
-{
-#ifndef HAVE_USLEEP
- struct timeval tval;
-#endif
-
- /*
- * We need this braindamage as the glibc usleep
- * is not SPEC1170 complient... grumble... JRA.
- */
-
- if(usecs < 0 || usecs > 1000000) {
- errno = EINVAL;
- return -1;
- }
-
-#if HAVE_USLEEP
- usleep(usecs);
- return 0;
-#else /* HAVE_USLEEP */
- /*
- * Fake it with select...
- */
- tval.tv_sec = 0;
- tval.tv_usec = usecs/1000;
- select(0,NULL,NULL,NULL,&tval);
- return 0;
-#endif /* HAVE_USLEEP */
-}
-
-
-/*******************************************************************
-A read wrapper that will deal with EINTR.
-********************************************************************/
-
-ssize_t sys_read(int fd, void *buf, size_t count)
-{
- ssize_t ret;
-
- do {
- ret = read(fd, buf, count);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-/*******************************************************************
-A write wrapper that will deal with EINTR.
-********************************************************************/
-
-ssize_t sys_write(int fd, const void *buf, size_t count)
-{
- ssize_t ret;
-
- do {
- ret = write(fd, buf, count);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-
-
/**************************************************************************
A wrapper for gethostbyname() that tries avoids looking up hostnames
in the root domain, which can cause dial-on-demand links to come up for no
Modified: branches/SAMBA_4_0/source/torture/nbench/nbio.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbench/nbio.c 2005-12-31 08:44:33 UTC (rev 12640)
+++ branches/SAMBA_4_0/source/torture/nbench/nbio.c 2005-12-31 09:08:46 UTC (rev 12641)
@@ -649,8 +649,7 @@
void nb_sleep(int usec, NTSTATUS status)
{
- (void)status;
- sys_usleep(usec);
+ usleep(usec);
}
void nb_deltree(const char *dname)
More information about the samba-cvs
mailing list