From 95ef1a1758f112e08cc14b2755d711813e2f6df9 Mon Sep 17 00:00:00 2001 From: pav Date: Sun, 9 May 2004 16:49:34 +0000 Subject: - Add patch that fixes compilation on non-i386 archs and fixes a little bug in extended partition creation. Submitted by: Florent Thoumie (maintainer) Obtained from: author --- sysutils/testdisk/Makefile | 1 + sysutils/testdisk/files/patch-config.h.in | 23 +++++++++++++++++++++++ sysutils/testdisk/files/patch-configure | 14 ++++++++++++++ sysutils/testdisk/files/patch-src::common.h | 13 +++++++++++++ sysutils/testdisk/files/patch-src::godmode.c | 17 +++++++++++++++++ sysutils/testdisk/files/patch-src::intrface.c | 23 +++++++++++++++++++++++ sysutils/testdisk/files/patch-src::rfs_dir.c | 14 ++++++++++++++ 7 files changed, 105 insertions(+) create mode 100644 sysutils/testdisk/files/patch-config.h.in create mode 100644 sysutils/testdisk/files/patch-configure create mode 100644 sysutils/testdisk/files/patch-src::common.h create mode 100644 sysutils/testdisk/files/patch-src::godmode.c create mode 100644 sysutils/testdisk/files/patch-src::intrface.c create mode 100644 sysutils/testdisk/files/patch-src::rfs_dir.c (limited to 'sysutils/testdisk') diff --git a/sysutils/testdisk/Makefile b/sysutils/testdisk/Makefile index 47a3b5687cbf..0b80311103ae 100644 --- a/sysutils/testdisk/Makefile +++ b/sysutils/testdisk/Makefile @@ -7,6 +7,7 @@ PORTNAME= testdisk PORTVERSION= 5.2 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.cgsecurity.org/ diff --git a/sysutils/testdisk/files/patch-config.h.in b/sysutils/testdisk/files/patch-config.h.in new file mode 100644 index 000000000000..b75d8c677dd5 --- /dev/null +++ b/sysutils/testdisk/files/patch-config.h.in @@ -0,0 +1,23 @@ +diff -ruw config.h.in config.h.in +--- config.h.in 2004-03-06 19:39:46.000000000 +0100 ++++ config.h.in 2004-03-21 11:33:19.000000000 +0100 +@@ -3,6 +3,9 @@ + /* Define to 1 if you have the `atexit' function. */ + #undef HAVE_ATEXIT + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_BYTESWAP_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_CURSES_H + +@@ -128,6 +131,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_DISK_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_ENDIAN_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_IOCTL_H + diff --git a/sysutils/testdisk/files/patch-configure b/sysutils/testdisk/files/patch-configure new file mode 100644 index 000000000000..5c98e68dccfb --- /dev/null +++ b/sysutils/testdisk/files/patch-configure @@ -0,0 +1,14 @@ +diff -ruw configure configure +--- configure 2004-03-06 19:39:27.000000000 +0100 ++++ configure 2004-03-21 11:32:59.000000000 +0100 +@@ -4286,7 +4286,9 @@ + + + +-for ac_header in curses.h dal/file_dal.h dal/file.h fcntl.h features.h linux/hdreg.h locale.h machine/endian.h ncurses.h stdint.h stdlib.h string.h sys/disk.h sys/disklabel.h sys/ioctl.h sys/mount.h sys/param.h sys/time.h unistd.h ++ ++ ++for ac_header in byteswap.h curses.h dal/file_dal.h dal/file.h fcntl.h features.h linux/hdreg.h locale.h machine/endian.h ncurses.h stdint.h stdlib.h string.h sys/disk.h sys/disklabel.h sys/endian.h sys/ioctl.h sys/mount.h sys/param.h sys/time.h unistd.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then diff --git a/sysutils/testdisk/files/patch-src::common.h b/sysutils/testdisk/files/patch-src::common.h new file mode 100644 index 000000000000..1ff2ced4b9c8 --- /dev/null +++ b/sysutils/testdisk/files/patch-src::common.h @@ -0,0 +1,13 @@ +diff -ruw src/common.h src/common.h +--- src/common.h 2004-03-11 08:30:54.000000000 +0100 ++++ src/common.h 2004-03-18 13:47:21.000000000 +0100 +@@ -212,6 +212,9 @@ + (((x)&0x00ff)<<8)) + #define be16(x) (x) + #define be24(x) (x) ++#define le24(x) ((((x) & 0x000000ffUL) << 16) | \ ++ ((x) & 0x0000ff00UL) | \ ++ (((x) & 0x00ff0000UL) >> 16)) + #define le32(x) ((((x)&0xff000000L)>>24) | \ + (((x)&0x00ff0000L)>>8) | \ + (((x)&0x0000ff00L)<<8) | \ diff --git a/sysutils/testdisk/files/patch-src::godmode.c b/sysutils/testdisk/files/patch-src::godmode.c new file mode 100644 index 000000000000..d00ff8ee3b10 --- /dev/null +++ b/sysutils/testdisk/files/patch-src::godmode.c @@ -0,0 +1,17 @@ +diff -ruw src/godmode.c src/godmode.c +--- src/godmode.c 2004-03-12 22:36:04.000000000 +0100 ++++ src/godmode.c 2004-04-05 14:20:58.000000000 +0200 +@@ -656,13 +656,6 @@ + } + LBA2CHS(disk_car,deb->part->lba-1,&start); + start.sector=1; +- if(start.head>0) +- start.head--; +- else +- { +- start.head=disk_car->CHS.head; +- start.cylinder--; +- } + if(deb->prev && CHS2LBA(disk_car,&start)<=deb->prev->part->lba+deb->prev->part->part_size-1) + { + LBA2CHS(disk_car,deb->part->lba-1,&start); diff --git a/sysutils/testdisk/files/patch-src::intrface.c b/sysutils/testdisk/files/patch-src::intrface.c new file mode 100644 index 000000000000..a142ab77a0d8 --- /dev/null +++ b/sysutils/testdisk/files/patch-src::intrface.c @@ -0,0 +1,23 @@ +diff -ruw src/intrface.c src/intrface.c +--- src/intrface.c 2004-03-16 11:13:01.000000000 +0100 ++++ src/intrface.c 2004-03-30 17:19:00.000000000 +0200 +@@ -788,9 +788,6 @@ + int done=0; + va_list ap; + WINDOW *window; +- va_start(ap,_format); +- window=*(WINDOW**)ap; +- va_end(ap); + struct MenuItem menuBuffer[]= + { + { 'P', "Previous",""}, +@@ -806,6 +803,9 @@ + { 0, NULL, NULL } + }; + char options[20]; ++ va_start(ap,_format); ++ window=va_arg(ap,WINDOW*); ++ va_end(ap); + if(nbr_lines<=DUMP_MAX_LINES) + { + strncpy(options,"Q",sizeof(options)); diff --git a/sysutils/testdisk/files/patch-src::rfs_dir.c b/sysutils/testdisk/files/patch-src::rfs_dir.c new file mode 100644 index 000000000000..a0745ffa7ace --- /dev/null +++ b/sysutils/testdisk/files/patch-src::rfs_dir.c @@ -0,0 +1,14 @@ +diff -ruw src/rfs_dir.c src/rfs_dir.c +--- src/rfs_dir.c 2004-03-03 19:40:05.000000000 +0100 ++++ src/rfs_dir.c 2004-03-18 11:51:37.000000000 +0100 +@@ -275,7 +275,8 @@ + } + + #ifdef HAVE_STRUCT_DAL_OPS_DEV +-int dal_set_block_size(dal_t *dal, unsigned blocksize) { ++/*int dal_set_block_size(dal_t *dal, unsigned blocksize) { */ ++int dal_set_block_size(dal_t *dal, size_t blocksize) { + + if (!dal) return 0; + + -- cgit