duncanca / mosaik-aligner

Automatically exported from code.google.com/p/mosaik-aligner
0 stars 0 forks source link

Patch for compiling on FreeBSD #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This is a patch for Mosaik to compile on FreeBSD.

What version of the product are you using? On what operating system?

The patch is against release 1.0 and tested on FreeBSD 7.1.

Please provide any additional information below.

The fix is with FreeBSD specific ifdefs on time and filesystem commands on
3 files. It includes a BLD_PLATFORM=freebsd file which defines FREEBSD for
the fixes.

Original issue reported on code.google.com by brad.a.c...@gmail.com on 6 Nov 2009 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Brad,

I had forgotten about this patch before the 1370 release. I'll integrate this 
into
the subversion tree sometime this weekend.

Cheers,

// Michael

Original comment by snowneb...@gmail.com on 16 Jan 2010 at 2:22

GoogleCodeExporter commented 9 years ago
Hi Brad,

I downloaded FreeBSD 8.0 and tweaked the MOSAIK source so that it would compile
warning and error free. 

The patch that you provided helped me identify the problematic function calls. 
As a
result, I made all of the non-Windows compilers use gettimeofday in ProgressBar 
and
ProgressCounter. 

I should point out that gettimeofday gives microseconds instead of the 
milliseconds
that are received in the ftime function. The patch didn't really reflect this 
tidbit
of information.

Additionally I simply added a new #ifdef for FreeBSD in the
src/CommonSource/Utilities/LargeFileSupport.h file. Basically it redefines 
fstat64
and stat64 to use the native fstat and stat.

Finally, there was an extra library specified in MosaikDupSnoop (-ldl) that 
isn't
required for any platform, so I removed it.

The changes above allow MOSAIK to work error free on the 64-bit FreeBSD 8.0 
version.
I have not tested whether or not the 32-bit FreeBSD version works as 
advertised. Of
particular interest is the large file support for creating files larger than 4 
GB.

The latest build in subversion should now be FreeBSD friendly.

Thanks again for all of the help!

// Michael

Original comment by snowneb...@gmail.com on 19 Jan 2010 at 9:39