Changeset f48b637 in mainline
- Timestamp:
- 2011-06-14T16:05:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffbed9
- Parents:
- 60e3e85
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/pcc/cc/cpp/cpp.c
r60e3e85 rf48b637 1708 1708 } 1709 1709 1710 ssize_t 1711 write_all(int fd, const void* buffer, size_t count) 1712 { 1713 size_t remaining = count; 1714 while (remaining > 0) { 1715 ssize_t retval = write(ofd, buffer, remaining); 1716 if (retval < 0) { 1717 return retval; 1718 } 1719 remaining -= retval; 1720 buffer += retval; 1721 } 1722 return count; 1723 } 1724 1710 1725 void 1711 1726 flbuf() … … 1713 1728 if (obufp == 0) 1714 1729 return; 1715 if (Mflag == 0 && write (ofd, outbuf, obufp) < 0)1730 if (Mflag == 0 && write_all(ofd, outbuf, obufp) < 0) 1716 1731 error("obuf write error"); 1717 1732 lastoch = outbuf[obufp-1];
Note:
See TracChangeset
for help on using the changeset viewer.