Changeset 370 in kBuild for trunk/src/gmake/kmkbuiltin/echo.c
- Timestamp:
- Dec 18, 2005 3:48:02 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/echo.c
r360 r370 38 38 static char sccsid[] = "@(#)echo.c 8.1 (Berkeley) 5/31/93"; 39 39 #endif /* not lint */ 40 #include <sys/cdefs.h> 41 //__FBSDID("$FreeBSD: src/bin/echo/echo.c,v 1.17 2004/04/06 20:06:46 markm Exp $"); 40 42 #endif 41 #ifndef _MSC_VER42 #include <sys/cdefs.h>43 #endif44 //__FBSDID("$FreeBSD: src/bin/echo/echo.c,v 1.17 2004/04/06 20:06:46 markm Exp $");45 43 46 44 #include <sys/types.h> … … 57 55 #ifndef _MSC_VER 58 56 #include <unistd.h> 57 #else 58 #include "mscfakes.h" 59 59 #endif 60 60 … … 63 63 #endif 64 64 65 #ifdef _MSC_VER66 #include <io.h>67 68 struct iovec {69 char *iov_base;70 size_t iov_len;71 };72 73 int writev(int fd, const struct iovec *vector, int count)74 {75 int size = 0;76 int i;77 for (i = 0; i < count; i++)78 {79 int cb = write(fd, vector[i].iov_base, vector[i].iov_len);80 if (cb < 0)81 return -1;82 size += cb;83 }84 return size;85 }86 87 #define STDERR_FILENO 288 #define STDOUT_FILENO 189 #endif /* _MSC_VER */90 65 91 66 /* … … 127 102 if ((iovfree = vp = iov = malloc((veclen + 1) * sizeof(struct iovec))) == NULL) { 128 103 errexit(progname, "malloc"); 129 return 1;104 exit(1); 130 105 } 131 106
Note:
See TracChangeset
for help on using the changeset viewer.