Euphoria Ticket #531: filesys.e has TODO markers on OSX/BSD ifdefs

Lines 1994 -> 2004, method move_file

Details

Type: Bug Report Severity: Normal Category: Library Routine
Assigned To: jimcbrown Status: Fixed Reported Release: 4646
Fixed in SVN #: 4708, 4709 View VCS: 4708, 4709 Milestone: 4.0.0

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.

Search



Quick Links

User menu

Not signed in.

Misc Menu