xref: /dragonfly/bin/cpdup/PORTING (revision 8a7bdfea)
1$DragonFly: src/bin/cpdup/PORTING,v 1.2 2008/04/11 17:33:11 dillon Exp $
2
3				PORTING CPDUP
4
5    The manual page for cpdup is "cpdup.1".  This file describes how to
6    to port the program to other OS's.
7
8				PORTING TO BSD
9
10    cpdup was developed on BSD.  Most BSDs should just be able to compile
11    cpdup using the Makefile.
12
13				PORTING TO LINUX
14
15    This script should suffice when compiling under linux.  For some reason
16    that I cannot fathom, linux defaults to using a 32 bit off_t.  It makes
17    no sense at all to me why they would want to do this, BSDs went to
18    a 64 bit default off_t over 15 years ago.  In anycase, fixing it
19    requires a few -D options.
20
21    #!/bin/csh
22    #
23    cd cpdup
24    rm -f md5.c
25    rm -f *.o
26    cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5 \
27	-DUSE_PTHREADS -pthread *.c -c
28    cc -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5 \
29	-DUSE_PTHREADS -pthread *.o -o ~/bin/cpdup
30
31    BACKUP SCRIPT MODIFICATIONS - you will almost certainly have to adjust
32    the do_cleanup script to extract the proper field(s) from the df output.
33    You will probably have to use 'df' instead of 'df -i', and you may have
34    to adjust the script to not check the inode fields.
35
36