Euphoria
Ticket #531:
filesys.e has TODO markers on OSX/BSD ifdefs
-
Reported by
jeremy
Dec 10, 2010
Lines 1994 -> 2004, method move_file
Details
1. Comment by jimcbrown
Dec 16, 2010
This has been fixed for OSX and OpenBSD.
However, FreeBSD and NetBSD still need checking.
The following C program will do the job.
#include <sys/types.h>
#include <stdio.h>
#include <sys/stat.h>
int main()
{
struct stat s;
char *p = &s;
char *v = &(s.st_blksize);
char *z = &(s.st_dev);
printf("dev_t_offset = %d\n", sizeof(dev_t));
printf("stat_buf_size = %d\n", sizeof(struct stat));
printf("stat_t_offset (disk_metrics) = %d\n", v - p);
printf("stat_t_offset (move_file) = %d\n", z - p);
return 0;
}
2. Comment by jimcbrown
Dec 16, 2010
Also tested and fixed on freebsd and netbsd.