~ubuntu-branches/ubuntu/precise/sup/precise

« back to all changes in this revision

Viewing changes to filecopy.c

  • Committer: Bazaar Package Importer
  • Author(s): Jochen Friedrich
  • Date: 2009-10-20 17:18:49 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091020171849-76d7gzmhnvns6jof
Tags: 20091019-1
* Update to new upstream snapshot.
* Convert to debhelper 7 and quilt.
* Fix compile on GNU/kFreeBSD. (Closes: #403816)
* Add patch to fix man pages.
* Bumped standards version to 3.8.3.
* Update Makefile patch to not strip any binaries. (Closes: #438074)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: filecopy.c,v 1.4 2002/07/10 20:19:39 wiz Exp $ */
 
1
/*      $NetBSD: filecopy.c,v 1.5 2009/10/17 22:26:13 christos Exp $    */
2
2
 
3
3
/*
4
4
 * Copyright (c) 1991 Carnegie Mellon University
57
57
#include "supcdefs.h"
58
58
#include "supextern.h"
59
59
 
60
 
int 
 
60
ssize_t 
61
61
filecopy(int here, int there)
62
62
{
63
 
        int kount;
 
63
        ssize_t kount;
64
64
        char buffer[BUFFERSIZE];
65
65
        kount = 0;
66
66
        while (kount == 0 && (kount = read(here, buffer, BUFFERSIZE)) > 0)
67
 
                kount -= write(there, buffer, kount);
 
67
                kount -= write(there, buffer, (size_t)kount);
68
68
        return (kount ? -1 : 0);
69
69
}