* samba/lib/system.c (sys_ftruncate): Commented out.
* samba/lib/util.c (set_filelen): Likewise. (setbuffer): Likewise. * Makefile.am (SAMBA_DIST): Remove tests/ftruncate.c * samba/tests/ftruncate.c: Removed. * samba/configure.in: Don't check if ftruncate() can extend a file.
Этот коммит содержится в:
родитель
6b843b1b44
Коммит
8583c24ea4
@ -1,27 +0,0 @@
|
|||||||
/* test whether ftruncte() can extend a file */
|
|
||||||
|
|
||||||
#if defined(HAVE_UNISTD_H)
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#define DATA "conftest.trunc"
|
|
||||||
#define LEN 7663
|
|
||||||
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
int *buf;
|
|
||||||
int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666);
|
|
||||||
|
|
||||||
ftruncate(fd, LEN);
|
|
||||||
|
|
||||||
unlink(DATA);
|
|
||||||
|
|
||||||
if (lseek(fd, 0, SEEK_END) == LEN) {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
exit(1);
|
|
||||||
}
|
|
Загрузка…
x
Ссылка в новой задаче
Block a user