Packages for DJGPP

I am using the following DJGPP package

You can get this C compiler at http://www.delorie.com/djgpp.

Patching DJGPP

In include/signal.h, add

#ifndef SIGCONT
#define SIGCONT	18	/* CG */
#endif
In include/mntent.h, add
#ifndef MOUNTED
#define	MOUNTED	"/etc/mtab"	/* CG */
#endif
#ifndef MNTOPT_RO
#define	MNTOPT_RO "ro"	/* CG */
#endif
In include/errno.h, add
#ifndef EOPNOTSUPP
#define EOPNOTSUPP 95	/* CG */
#endif

How to compile E2FS Library

Get e2fsprogs-1.29.tgz at http://e2fsprogs.sourceforge.net or on TestDisk web page.

cd testdisk
tar xvf e2fsprogs-1.29.tgz

EXT2FS Patch

In lib/e2p/iod.c, comment len = dep->d_reclen; We don't use this library, we only need the compilation doesn't block on this file.

Compilation

Under Dos or Win9x, run

bash
./configure --with-cc=gcc && make libs
Under Linux or BSD, run ./configure && make

How to compile ReiserFS Library

Get progsreiserfs-0.3.1-rc7.tar.gz at http://reiserfs.osdn.org.ua/

bash
./configure --disable-nls && make

How to compile TestDisk

Source code is included in the TestDisk download (along with a DOS executable and DPMI server program) from the CGSecurity Website's TestDisk Home page:
http://www.cgsecurity.org/testdisk.html.

To compile TestDisk, run cd src; make dos. If you need a small binary for binary distribution, run

strip testdisk.exe
djp -s testdisk.exe

If you want to work under real (16-bit) DOS, you'll need to have a DPMI server running; to do that, get: csdpmi*b.zip and simply place the executable (cwsdpmi.exe) in your bin directory (which must be in the PATH).

FreeDOS

TestDisk works on FreeDOS Beta 8. You can get FreeDOS at http://www.freedos.org/freedos/files/beta8.html.


TestDisk home: http://www.cgsecurity.org/testdisk.html.
Christophe GRENIER grenier@cgsecurity.org