mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 21:06:52 +03:00
2a8730b21c
* file.c (move_dir_dir): Give an error when an attempt is made to move an empty directory into itself. 1999-06-14 Wayne Roberts <wroberts1@cx983858-b.orng1.occa.home.com> * vfs/smbfs.c: New file. Implements the Samba-based file system. * vfs/vfs.h: Declare vfs_smbfs_ops, vfs_file_is_smb. * vfs/vfs.c (vfs_file_is_smb): implemented. (vfs_init) register smbfs. * vfs/samba: Incorporate SAMBA source code required for smbfs 1999-05-27 Miguel de Icaza <miguel@nuclecu.unam.mx> * Make.common.in (confdir): Define confdir as sysconfdir. This should fix the problem we had with FSSTND distributions.
28 lines
390 B
C
28 lines
390 B
C
/* 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);
|
|
}
|