Bugzilla – Attachment 90 Details for
Bug 208
SCO build/runtime fixes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add truncate() to bsd-misc.[ch]
truncate.patch (text/plain), 1.39 KB, created by
Tim Rice
on 2002-04-28 06:33:17 AEST
(
hide
)
Description:
add truncate() to bsd-misc.[ch]
Filename:
MIME Type:
Creator:
Tim Rice
Created:
2002-04-28 06:33:17 AEST
Size:
1.39 KB
patch
obsolete
>--- openssh/configure.ac.old Thu Apr 25 12:41:57 2002 >+++ openssh/configure.ac Sat Apr 27 10:43:11 2002 >@@ -572,7 +572,7 @@ > realpath recvmsg rresvport_af sendmsg setdtablesize setegid \ > setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \ > setsid setvbuf sigaction sigvec snprintf socketpair strerror \ >- strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \ >+ strlcat strlcpy strmode strsep sysconf tcgetpgrp truncate utimes \ > vhangup vsnprintf waitpid __b64_ntop _getpty) > > dnl IRIX and Solaris 2.5.1 have dirname() in libgen >--- openssh/openbsd-compat/bsd-misc.c.old Fri Oct 12 07:15:38 2001 >+++ openssh/openbsd-compat/bsd-misc.c Sat Apr 27 13:31:35 2002 >@@ -99,3 +99,22 @@ > return(utime(filename, &ub)); > } > #endif >+ >+#ifndef HAVE_TRUNCATE >+int truncate (const char *path, off_t length) >+{ >+ int fd, ret, saverrno; >+ >+ fd = open(path, O_WRONLY); >+ if (fd < 0) >+ return -1; >+ >+ ret = ftruncate(fd, length); >+ saverrno = errno; >+ (void) close (fd); >+ if (ret == -1) >+ errno = saverrno; >+ return(ret); >+} >+#endif /* HAVE_TRUNCATE */ >+ >--- openssh/openbsd-compat/bsd-misc.h.old Wed Apr 11 14:12:22 2001 >+++ openssh/openbsd-compat/bsd-misc.h Sat Apr 27 13:31:14 2002 >@@ -72,5 +72,8 @@ > int utimes(char *filename, struct timeval *tvp); > #endif /* HAVE_UTIMES */ > >+#ifndef HAVE_TRUNCATE >+int truncate (const char *path, off_t length); >+#endif /* HAVE_TRUNCATE */ > > #endif /* _BSD_MISC_H */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208
:
65
| 90