From 1f3899d5ad8d8ee8815d4d7c18bdefbfc45a84ec Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 9 Jul 2021 18:11:30 +0200 Subject: [PATCH] Removed old unadf, cleaned up version 0.7.12. --- app-arch/unadf/Manifest | 11 +- app-arch/unadf/files/64-bit-fixes | 2367 ----------------- .../add-hardening-flags-in-compiler-options | 44 - app-arch/unadf/files/source-code-fixes | 100 - ...f-0.7.12-CVE-2016-1243_CVE-2016-1244.patch | 146 + ...ch => unadf-0.7.12_separate_comment.patch} | 58 +- .../unadf/files/unadf_separate_comment.patch | 122 - app-arch/unadf/unadf-0.7.11a.ebuild | 41 - app-arch/unadf/unadf-0.7.12-r10.ebuild | 27 +- 9 files changed, 178 insertions(+), 2738 deletions(-) delete mode 100644 app-arch/unadf/files/64-bit-fixes delete mode 100644 app-arch/unadf/files/add-hardening-flags-in-compiler-options delete mode 100644 app-arch/unadf/files/source-code-fixes create mode 100644 app-arch/unadf/files/unadf-0.7.12-CVE-2016-1243_CVE-2016-1244.patch rename app-arch/unadf/files/{adflib-0.7.12_separate_comment.patch => unadf-0.7.12_separate_comment.patch} (80%) delete mode 100644 app-arch/unadf/files/unadf_separate_comment.patch delete mode 100644 app-arch/unadf/unadf-0.7.11a.ebuild diff --git a/app-arch/unadf/Manifest b/app-arch/unadf/Manifest index 79fd08b..7048767 100644 --- a/app-arch/unadf/Manifest +++ b/app-arch/unadf/Manifest @@ -1,11 +1,6 @@ -AUX 64-bit-fixes 75874 BLAKE2B f0f232525d9c45c04f85847c521c58028e5ea95faf302d4b970e6a788c78caf62876ab1a61a133a032ca9085a4155047f91b4bd921082a2c907ba3c2fadbc682 SHA512 3fb6aa0818bf08ab7d4a775ba1028d214e1476f130dca94f205749a6c3dca99908fedda94e59c84ff29926c5aaebfa54e84d4e2d4d2d1b5be3543c215b504648 -AUX add-hardening-flags-in-compiler-options 1219 BLAKE2B 258c90f237a6cdeed67a0578e0fde2ebcade00f63ebce1c3d9a6f8ad126a56c2c81a71cce7b2e169498240e28435f228516176767c3864480489eb44b1095607 SHA512 e664f526a4cc66109f718dabda4236260b5fd0adbdce0ef9766a0893df6922eb725eb733fb44a594387b7589671d2a5977c1f5ff65889e9ea95e57246ebcda48 -AUX adflib-0.7.12_separate_comment.patch 5444 BLAKE2B 2c864eab3ca72695a99e4916bd5d0564a1b01b51bce6cf760c95c06602bc93dadaa32f78a1ac1b5692df005478a75cd3b3a06151d04eb30ba704048a78f4f58a SHA512 5a149664736821997831ce22522b77bab7792beae98cdf42952a34217be16e2aa8ca1f378bf39c11137d36db99570efdde59142a4a64524b1116a1701a2d39c1 -AUX source-code-fixes 2260 BLAKE2B 1a019c8ed75bff6cd398ae1e4a6e44bdea8316b1d9ed2aad003908a2f0c9264d92d2e6c0d8f38a672a16c64d27c6851a3785705f5f7eafac5dbb442c37713729 SHA512 3f044ff72499765f5dc54dd617084514df69bdbccda120da94192fe922fdb1716b4e72858d30edbea2b304d26512c03d18bf735ddea0f3e0f243057aa82311d3 -AUX unadf_separate_comment.patch 4473 BLAKE2B f3814c6d7a4e2492e404863ad22205ab6311cec817a26af7779a7703f31795763f224648c28be6b3eef48a43a2efb2af0cde492889380ca599f27d067570a873 SHA512 46a0e159ef2e03de731ecb652c55c690a858261afd453da2fdd1f8f4cdaf9869bff83966a4b1ccd608b402d4649713eeceabaaee689ccbd97d4980ed59fc30be +AUX unadf-0.7.12-CVE-2016-1243_CVE-2016-1244.patch 5191 BLAKE2B f888e30e1a4d7caefbb407e1cb0fc76345deb960fce974f5ad80e3cad41d3dfde78e34370bdedc11f5dc2729c6695a339db1eab3d37ed5f0bfae9e104c0d2949 SHA512 d1c9a8efcf026d58eaee61e92ee99304c52672836a63dd69f5e1e0472c9b2278521b5a2597f55449ffd23dd307e2c045324bed9b5bf89d160ab517542706aca3 +AUX unadf-0.7.12_separate_comment.patch 4846 BLAKE2B a58dfab3190e02ddb41c2632c62ebf40eaf8240430e8c2e146c34a30bda5956706c1927d3236d73fa8d0b2731a574b3402f25a8ebab6ba0fc11d2f92982449ef SHA512 9d1e608eae1e8cbd20051c18dff8f53aee7c3d7ef57c1c5527006c6f3af3d72dd92f8b0aee62f3ea06872d00a6a42f89105800f6fbff385830bd10486ceedbf0 DIST adflib-0.7.12.tar.bz2 135412 BLAKE2B 964ef195c0539779c33acb2f3c103f97f7fd7f78bb32a83af9d586157700664f5e531908121aea8234592bb00fb8bff2e8f754e620f989d6d4e52537675c030e SHA512 d63846f0780bd57cae5ff667eb70f98a0ba3659cfd0b12b3ae2f29ac96631e522088f911b1ba6e5ee3b00620a28a802f14d93cdf8462e18a7e3f749915ab5af3 -DIST unadf_0.7.11a.orig.tar.gz 209458 BLAKE2B 9384d6c200ced0ddf4faa1e60e19089a48c90de2200ff9a1c78006e559c3d165a194052e27af80e8c904e865a84a42bcd111419a73349f3cb31b7512bc7d939c SHA512 f4b45438eaa875d96b42958a74a59b1a7605d3cbb91a7301fa58bf3a6cb617530c972d4496497e3e9395ca7916600bd60a56e4941512250018d3524e5af5bfe9 -EBUILD unadf-0.7.11a.ebuild 1022 BLAKE2B 5662bf5e7236b46b8522a9a6b364f290ea1e0dd6f126c23b0b3bc7e0b3ecf8072df1581591b9b87fa8dc9c7067b402a39833da1a4931681cb569159fda6ad8cf SHA512 3ffc114484dd4c50c0369fa3a34c81b7a922fed306bcf37ac151570310945a34232b9a22e3ff53403142771b049882893a84785f589a33a2a84264ffe6efc46e -EBUILD unadf-0.7.12-r10.ebuild 864 BLAKE2B 3e032f9f01a9c740e18b430e4b5c063adcfb525b28118428556aff95df31129834215b524a4f10e301c162433406d280fc6d178de338e979caddf4fc475ff7cf SHA512 55fe1b106761fad8b822433c36522798007d0f86f217cae1fe49f706135e9ebd57fb37c428e1a9fd4c6d4635bc2e7f4608b929031ade4362b33072d8555074ee +EBUILD unadf-0.7.12-r10.ebuild 768 BLAKE2B 8d7e3bb62b8915090a3a3eeb7397c80d79d06108dd9954600df3fdb1980080e5e4133c586468ec6cc81ae09b9a5e58a94da71cb0d2758950f61dd9bbe2c284fa SHA512 95898d438bb8359016ab92fed48594108ca2dffbc15406a2bf77ded77c2fd6842238674dc38bcb8d0dae75d91f911cca28e73955b9e57da2d5ab96885c010fbf MISC ChangeLog 1480 BLAKE2B ca87a21e58b00f17ca11f50a66aca46e596cd7c4cd43a357bca0ce134efa7fe6a26800a942d50fbe02443dba62e0f9f987d26b2e19be1c64492649c92774f1d9 SHA512 9a6816cefb775f881fc0108b598264896119122dff24709a756935f4cc8df30f8757525b8a50a8bbb6e3f528de7d251375d4154db1a13f6c5a7e4b297f040416 MISC metadata.xml 202 BLAKE2B 3fc88d79c4843991cb0f6685a4ffb8b174b6c21e55470c9e4c7d3c4e52f98d6b871fba53162c7bc811bb2043e52139a38ef201e3ee3690be2de409ce28dd93e7 SHA512 bd1c14da72bdd52e3bea3056f5b9f908c31d6915b651d15d80a0a7d26778c97cde493ae9ca4352bd313eb16ddbed9b169c6b620c7f4a9b77973f7077fa8d997c diff --git a/app-arch/unadf/files/64-bit-fixes b/app-arch/unadf/files/64-bit-fixes deleted file mode 100644 index 88fc880..0000000 --- a/app-arch/unadf/files/64-bit-fixes +++ /dev/null @@ -1,2367 +0,0 @@ -Patch to make it work on 64 bit. See news from 11 April 2011 on -http://lclevy.free.fr/adflib/. - -Source: - -http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=adflib_stdint_diff.txt;att=1;bug=458129 -http://grimnorth.se/~noname/tmp/adflib_stdint_diff.txt - -Slightly modified (and removed the .depend files from the patches) - -Index: unadf-0.7.11a/Demo/Makefile -=================================================================== ---- unadf-0.7.11a.orig/Demo/Makefile 2006-12-03 19:29:00.000000000 +0100 -+++ unadf-0.7.11a/Demo/Makefile 2012-05-31 17:10:09.000000000 +0200 -@@ -5,7 +5,7 @@ - - DEPEND=makedepend - --CFLAGS=-I$(LIBDIR) -O2 -Wall -Wno-uninitialized -pedantic -+CFLAGS=-I$(LIBDIR) -Wall -Wno-uninitialized -pedantic -std=gnu99 -ggdb - LDFLAGS=-L$(LIBDIR) -ladf - - EXES= unadf -Index: unadf-0.7.11a/Demo/unadf.c -=================================================================== ---- unadf-0.7.11a.orig/Demo/unadf.c 2006-12-03 17:22:00.000000000 +0100 -+++ unadf-0.7.11a/Demo/unadf.c 2012-05-31 17:10:09.000000000 +0200 -@@ -74,12 +74,12 @@ - if (entry->type==ST_DIR) - printf(" "); - else -- printf("%7ld ",entry->size); -+ printf("%7d ",entry->size); - - printf("%4d/%02d/%02d %2d:%02d:%02d ",entry->year, entry->month, entry->days, - entry->hour, entry->mins, entry->secs); - if (sect) -- printf(" %06ld ",entry->sector); -+ printf(" %06d ",entry->sector); - - if (strlen(path)>0) - printf(" %s/",path); -@@ -101,7 +101,7 @@ - { - struct File *file; - FILE* out; -- long n; -+ int32_t n; - char *filename; - - filename = NULL; -@@ -243,7 +243,7 @@ - printf("???"); break; - } - -- printf(". Cylinders = %ld, Heads = %ld, Sectors = %ld",dev->cylinders,dev->heads,dev->sectors); -+ printf(". Cylinders = %d, Heads = %d, Sectors = %d",dev->cylinders,dev->heads,dev->sectors); - - printf(". Volumes = %d\n",dev->nVol); - } -@@ -273,7 +273,7 @@ - if (vol->volName!=NULL) - printf(" \"%s\"", vol->volName); - -- printf(" between sectors [%ld-%ld].",vol->firstBlock, vol->lastBlock); -+ printf(" between sectors [%d-%d].",vol->firstBlock, vol->lastBlock); - - printf(" %s ",isFFS(vol->dosType) ? "FFS" : "OFS"); - if (isINTL(vol->dosType)) -Index: unadf-0.7.11a/Lib/Makefile -=================================================================== ---- unadf-0.7.11a.orig/Lib/Makefile 2006-12-03 19:37:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/Makefile 2012-05-31 17:10:09.000000000 +0200 -@@ -15,7 +15,7 @@ - - DEFINES= - --CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -O2 -pedantic -+CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -ggdb -std=gnu99 - - CC=gcc - DEPEND=makedepend -Index: unadf-0.7.11a/Lib/adf_bitm.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_bitm.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_bitm.c 2012-05-31 17:10:09.000000000 +0200 -@@ -35,7 +35,7 @@ - #include"adf_util.h" - #include"Win32/defendian.h" - --extern unsigned long bitMask[32]; -+extern uint32_t bitMask[32]; - - extern struct Env adfEnv; - -@@ -77,9 +77,9 @@ - * adfCountFreeBlocks - * - */ --long adfCountFreeBlocks(struct Volume* vol) -+int32_t adfCountFreeBlocks(struct Volume* vol) - { -- long freeBlocks; -+ int32_t freeBlocks; - int j; - - freeBlocks = 0L; -@@ -95,10 +95,10 @@ - * adfReadBitmap - * - */ --RETCODE adfReadBitmap(struct Volume* vol, long nBlock, struct bRootBlock* root) -+RETCODE adfReadBitmap(struct Volume* vol, int32_t nBlock, struct bRootBlock* root) - { -- long mapSize, nSect; -- long j, i; -+ int32_t mapSize, nSect; -+ int32_t j, i; - struct bBitmapExtBlock bmExt; - - mapSize = nBlock / (127*32); -@@ -205,7 +205,7 @@ - */ - void adfSetBlockFree(struct Volume* vol, SECTNUM nSect) - { -- unsigned long oldValue; -+ uint32_t oldValue; - int sectOfMap = nSect-2; - int block = sectOfMap/(127*32); - int indexInMap = (sectOfMap/32)%127; -@@ -230,7 +230,7 @@ - */ - void adfSetBlockUsed(struct Volume* vol, SECTNUM nSect) - { -- unsigned long oldValue; -+ uint32_t oldValue; - int sectOfMap = nSect-2; - int block = sectOfMap/(127*32); - int indexInMap = (sectOfMap/32)%127; -@@ -263,11 +263,11 @@ - { - int i, j; - BOOL diskFull; -- long block = vol->rootBlock; -+ int32_t block = vol->rootBlock; - - i = 0; - diskFull = FALSE; --/*printf("lastblock=%ld\n",vol->lastBlock);*/ -+/*printf("lastblock=%d\n",vol->lastBlock);*/ - while( ilastBlock - vol->firstBlock +1 - 2; -@@ -445,7 +445,7 @@ - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; - --/*printf("bitmap %ld\n",nSect);*/ -+/*printf("bitmap %d\n",nSect);*/ - if (adfReadBlock(vol, nSect, buf)!=RC_OK) - return RC_ERROR; - -@@ -471,7 +471,7 @@ - adfWriteBitmapBlock(struct Volume* vol, SECTNUM nSect, struct bBitmapBlock* bitm) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - - memcpy(buf,bitm,LOGICAL_BLOCK_SIZE); - #ifdef LITT_ENDIAN -Index: unadf-0.7.11a/Lib/adf_bitm.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_bitm.h 2006-12-03 17:23:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_bitm.h 2012-05-31 17:10:09.000000000 +0200 -@@ -37,7 +37,7 @@ - - SECTNUM adfGet1FreeBlock(struct Volume *vol); - RETCODE adfUpdateBitmap(struct Volume *vol); --PREFIX long adfCountFreeBlocks(struct Volume* vol); -+PREFIX int32_t adfCountFreeBlocks(struct Volume* vol); - RETCODE adfReadBitmap(struct Volume* , SECTNUM nBlock, struct bRootBlock* root); - BOOL adfIsBlockFree(struct Volume* vol, SECTNUM nSect); - void adfSetBlockFree(struct Volume* vol, SECTNUM nSect); -Index: unadf-0.7.11a/Lib/adf_blk.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_blk.h 2006-12-03 18:44:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_blk.h 2012-05-31 17:10:09.000000000 +0200 -@@ -25,12 +25,13 @@ - * - */ - -+#include - - #ifndef ADF_BLK_H - #define ADF_BLK_H 1 - --#define ULONG unsigned long --#define USHORT unsigned short -+#define ULONG uint32_t -+#define USHORT uint16_t - #define UCHAR unsigned char - - #define LOGICAL_BLOCK_SIZE 512 -@@ -105,129 +106,129 @@ - struct bBootBlock { - /*000*/ char dosType[4]; - /*004*/ ULONG checkSum; --/*008*/ long rootBlock; -+/*008*/ int32_t rootBlock; - /*00c*/ UCHAR data[500+512]; - }; - - - struct bRootBlock { --/*000*/ long type; -- long headerKey; -- long highSeq; --/*00c*/ long hashTableSize; -- long firstData; -+/*000*/ int32_t type; -+ int32_t headerKey; -+ int32_t highSeq; -+/*00c*/ int32_t hashTableSize; -+ int32_t firstData; - /*014*/ ULONG checkSum; --/*018*/ long hashTable[HT_SIZE]; /* hash table */ --/*138*/ long bmFlag; /* bitmap flag, -1 means VALID */ --/*13c*/ long bmPages[BM_SIZE]; --/*1a0*/ long bmExt; --/*1a4*/ long cDays; /* creation date FFS and OFS */ --/*1a8*/ long cMins; --/*1ac*/ long cTicks; -+/*018*/ int32_t hashTable[HT_SIZE]; /* hash table */ -+/*138*/ int32_t bmFlag; /* bitmap flag, -1 means VALID */ -+/*13c*/ int32_t bmPages[BM_SIZE]; -+/*1a0*/ int32_t bmExt; -+/*1a4*/ int32_t cDays; /* creation date FFS and OFS */ -+/*1a8*/ int32_t cMins; -+/*1ac*/ int32_t cTicks; - /*1b0*/ char nameLen; - /*1b1*/ char diskName[MAXNAMELEN+1]; - char r2[8]; --/*1d8*/ long days; /* last access : days after 1 jan 1978 */ --/*1dc*/ long mins; /* hours and minutes in minutes */ --/*1e0*/ long ticks; /* 1/50 seconds */ --/*1e4*/ long coDays; /* creation date OFS */ --/*1e8*/ long coMins; --/*1ec*/ long coTicks; -- long nextSameHash; /* == 0 */ -- long parent; /* == 0 */ --/*1f8*/ long extension; /* FFS: first directory cache block */ --/*1fc*/ long secType; /* == 1 */ -+/*1d8*/ int32_t days; /* last access : days after 1 jan 1978 */ -+/*1dc*/ int32_t mins; /* hours and minutes in minutes */ -+/*1e0*/ int32_t ticks; /* 1/50 seconds */ -+/*1e4*/ int32_t coDays; /* creation date OFS */ -+/*1e8*/ int32_t coMins; -+/*1ec*/ int32_t coTicks; -+ int32_t nextSameHash; /* == 0 */ -+ int32_t parent; /* == 0 */ -+/*1f8*/ int32_t extension; /* FFS: first directory cache block */ -+/*1fc*/ int32_t secType; /* == 1 */ - }; - - - struct bFileHeaderBlock { --/*000*/ long type; /* == 2 */ --/*004*/ long headerKey; /* current block number */ --/*008*/ long highSeq; /* number of data block in this hdr block */ --/*00c*/ long dataSize; /* == 0 */ --/*010*/ long firstData; -+/*000*/ int32_t type; /* == 2 */ -+/*004*/ int32_t headerKey; /* current block number */ -+/*008*/ int32_t highSeq; /* number of data block in this hdr block */ -+/*00c*/ int32_t dataSize; /* == 0 */ -+/*010*/ int32_t firstData; - /*014*/ ULONG checkSum; --/*018*/ long dataBlocks[MAX_DATABLK]; --/*138*/ long r1; --/*13c*/ long r2; --/*140*/ long access; /* bit0=del, 1=modif, 2=write, 3=read */ --/*144*/ unsigned long byteSize; -+/*018*/ int32_t dataBlocks[MAX_DATABLK]; -+/*138*/ int32_t r1; -+/*13c*/ int32_t r2; -+/*140*/ int32_t access; /* bit0=del, 1=modif, 2=write, 3=read */ -+/*144*/ uint32_t byteSize; - /*148*/ char commLen; - /*149*/ char comment[MAXCMMTLEN+1]; - char r3[91-(MAXCMMTLEN+1)]; --/*1a4*/ long days; --/*1a8*/ long mins; --/*1ac*/ long ticks; -+/*1a4*/ int32_t days; -+/*1a8*/ int32_t mins; -+/*1ac*/ int32_t ticks; - /*1b0*/ char nameLen; - /*1b1*/ char fileName[MAXNAMELEN+1]; -- long r4; --/*1d4*/ long real; /* unused == 0 */ --/*1d8*/ long nextLink; /* link chain */ -- long r5[5]; --/*1f0*/ long nextSameHash; /* next entry with sane hash */ --/*1f4*/ long parent; /* parent directory */ --/*1f8*/ long extension; /* pointer to extension block */ --/*1fc*/ long secType; /* == -3 */ -+ int32_t r4; -+/*1d4*/ int32_t real; /* unused == 0 */ -+/*1d8*/ int32_t nextLink; /* link chain */ -+ int32_t r5[5]; -+/*1f0*/ int32_t nextSameHash; /* next entry with sane hash */ -+/*1f4*/ int32_t parent; /* parent directory */ -+/*1f8*/ int32_t extension; /* pointer to extension block */ -+/*1fc*/ int32_t secType; /* == -3 */ - }; - - - /*--- file header extension block structure ---*/ - - struct bFileExtBlock { --/*000*/ long type; /* == 0x10 */ --/*004*/ long headerKey; --/*008*/ long highSeq; --/*00c*/ long dataSize; /* == 0 */ --/*010*/ long firstData; /* == 0 */ -+/*000*/ int32_t type; /* == 0x10 */ -+/*004*/ int32_t headerKey; -+/*008*/ int32_t highSeq; -+/*00c*/ int32_t dataSize; /* == 0 */ -+/*010*/ int32_t firstData; /* == 0 */ - /*014*/ ULONG checkSum; --/*018*/ long dataBlocks[MAX_DATABLK]; -- long r[45]; -- long info; /* == 0 */ -- long nextSameHash; /* == 0 */ --/*1f4*/ long parent; /* header block */ --/*1f8*/ long extension; /* next header extension block */ --/*1fc*/ long secType; /* -3 */ -+/*018*/ int32_t dataBlocks[MAX_DATABLK]; -+ int32_t r[45]; -+ int32_t info; /* == 0 */ -+ int32_t nextSameHash; /* == 0 */ -+/*1f4*/ int32_t parent; /* header block */ -+/*1f8*/ int32_t extension; /* next header extension block */ -+/*1fc*/ int32_t secType; /* -3 */ - }; - - - - struct bDirBlock { --/*000*/ long type; /* == 2 */ --/*004*/ long headerKey; --/*008*/ long highSeq; /* == 0 */ --/*00c*/ long hashTableSize; /* == 0 */ -- long r1; /* == 0 */ -+/*000*/ int32_t type; /* == 2 */ -+/*004*/ int32_t headerKey; -+/*008*/ int32_t highSeq; /* == 0 */ -+/*00c*/ int32_t hashTableSize; /* == 0 */ -+ int32_t r1; /* == 0 */ - /*014*/ ULONG checkSum; --/*018*/ long hashTable[HT_SIZE]; /* hash table */ -- long r2[2]; --/*140*/ long access; -- long r4; /* == 0 */ -+/*018*/ int32_t hashTable[HT_SIZE]; /* hash table */ -+ int32_t r2[2]; -+/*140*/ int32_t access; -+ int32_t r4; /* == 0 */ - /*148*/ char commLen; - /*149*/ char comment[MAXCMMTLEN+1]; - char r5[91-(MAXCMMTLEN+1)]; --/*1a4*/ long days; /* last access */ --/*1a8*/ long mins; --/*1ac*/ long ticks; -+/*1a4*/ int32_t days; /* last access */ -+/*1a8*/ int32_t mins; -+/*1ac*/ int32_t ticks; - /*1b0*/ char nameLen; - /*1b1*/ char dirName[MAXNAMELEN+1]; -- long r6; --/*1d4*/ long real; /* ==0 */ --/*1d8*/ long nextLink; /* link list */ -- long r7[5]; --/*1f0*/ long nextSameHash; --/*1f4*/ long parent; --/*1f8*/ long extension; /* FFS : first directory cache */ --/*1fc*/ long secType; /* == 2 */ -+ int32_t r6; -+/*1d4*/ int32_t real; /* ==0 */ -+/*1d8*/ int32_t nextLink; /* link list */ -+ int32_t r7[5]; -+/*1f0*/ int32_t nextSameHash; -+/*1f4*/ int32_t parent; -+/*1f8*/ int32_t extension; /* FFS : first directory cache */ -+/*1fc*/ int32_t secType; /* == 2 */ - }; - - - - struct bOFSDataBlock{ --/*000*/ long type; /* == 8 */ --/*004*/ long headerKey; /* pointer to file_hdr block */ --/*008*/ long seqNum; /* file data block number */ --/*00c*/ long dataSize; /* <= 0x1e8 */ --/*010*/ long nextData; /* next data block */ -+/*000*/ int32_t type; /* == 8 */ -+/*004*/ int32_t headerKey; /* pointer to file_hdr block */ -+/*008*/ int32_t seqNum; /* file data block number */ -+/*00c*/ int32_t dataSize; /* <= 0x1e8 */ -+/*010*/ int32_t nextData; /* next data block */ - /*014*/ ULONG checkSum; - /*018*/ UCHAR data[488]; - /*200*/ }; -@@ -242,31 +243,31 @@ - - - struct bBitmapExtBlock { --/*000*/ long bmPages[127]; --/*1fc*/ long nextBlock; -+/*000*/ int32_t bmPages[127]; -+/*1fc*/ int32_t nextBlock; - }; - - - struct bLinkBlock { --/*000*/ long type; /* == 2 */ --/*004*/ long headerKey; /* self pointer */ -- long r1[3]; -+/*000*/ int32_t type; /* == 2 */ -+/*004*/ int32_t headerKey; /* self pointer */ -+ int32_t r1[3]; - /*014*/ ULONG checkSum; - /*018*/ char realName[64]; -- long r2[83]; --/*1a4*/ long days; /* last access */ --/*1a8*/ long mins; --/*1ac*/ long ticks; -+ int32_t r2[83]; -+/*1a4*/ int32_t days; /* last access */ -+/*1a8*/ int32_t mins; -+/*1ac*/ int32_t ticks; - /*1b0*/ char nameLen; - /*1b1*/ char name[MAXNAMELEN+1]; -- long r3; --/*1d4*/ long realEntry; --/*1d8*/ long nextLink; -- long r4[5]; --/*1f0*/ long nextSameHash; --/*1f4*/ long parent; -- long r5; --/*1fc*/ long secType; /* == -4, 4, 3 */ -+ int32_t r3; -+/*1d4*/ int32_t realEntry; -+/*1d8*/ int32_t nextLink; -+ int32_t r4[5]; -+/*1f0*/ int32_t nextSameHash; -+/*1f4*/ int32_t parent; -+ int32_t r5; -+/*1fc*/ int32_t secType; /* == -4, 4, 3 */ - }; - - -@@ -274,11 +275,11 @@ - /*--- directory cache block structure ---*/ - - struct bDirCacheBlock { --/*000*/ long type; /* == 33 */ --/*004*/ long headerKey; --/*008*/ long parent; --/*00c*/ long recordsNb; --/*010*/ long nextDirC; -+/*000*/ int32_t type; /* == 33 */ -+/*004*/ int32_t headerKey; -+/*008*/ int32_t parent; -+/*00c*/ int32_t recordsNb; -+/*010*/ int32_t nextDirC; - /*014*/ ULONG checkSum; - /*018*/ unsigned char records[488]; - }; -Index: unadf-0.7.11a/Lib/adf_cache.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_cache.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_cache.c 2012-05-31 17:10:09.000000000 +0200 -@@ -27,6 +27,7 @@ - - #include - #include -+#include - - #include"adf_defs.h" - #include"adf_str.h" -@@ -253,9 +254,9 @@ - else - newEntry->size = 0L; - newEntry->protect = entry->access; -- newEntry->days = (short)entry->days; -- newEntry->mins = (short)entry->mins; -- newEntry->ticks = (short)entry->ticks; -+ newEntry->days = (int16_t)entry->days; -+ newEntry->mins = (int16_t)entry->mins; -+ newEntry->ticks = (int16_t)entry->ticks; - newEntry->type = (signed char)entry->secType; - newEntry->nLen = entry->nameLen; - memcpy(newEntry->name, entry->name, newEntry->nLen); -@@ -361,7 +362,7 @@ - int entryLen; - - entryLen = adfEntry2CacheEntry(entry, &newEntry); --/*printf("adfAddInCache--%4ld %2d %6ld %8lx %4d %2d:%02d:%02d %30s %22s\n", -+/*printf("adfAddInCache--%4ld %2d %6d %8lx %4d %2d:%02d:%02d %30s %22s\n", - newEntry.header, newEntry.type, newEntry.size, newEntry.protect, - newEntry.days, newEntry.mins/60, newEntry.mins%60, - newEntry.ticks/50, -@@ -375,7 +376,7 @@ - /*printf("parent=%4ld\n",dirc.parent);*/ - while(n < dirc.recordsNb) { - adfGetCacheEntry(&dirc, &offset, &caEntry); --/*printf("*%4ld %2d %6ld %8lx %4d %2d:%02d:%02d %30s %22s\n", -+/*printf("*%4ld %2d %6d %8lx %4d %2d:%02d:%02d %30s %22s\n", - caEntry.header, caEntry.type, caEntry.size, caEntry.protect, - caEntry.days, caEntry.mins/60, caEntry.mins%60, - caEntry.ticks/50, -@@ -424,7 +425,7 @@ - return RC_ERROR; - dirc.nextDirC = nCache; - } --/*printf("dirc.headerKey=%ld\n",dirc.headerKey);*/ -+/*printf("dirc.headerKey=%d\n",dirc.headerKey);*/ - if (adfWriteDirCBlock(vol, dirc.headerKey, &dirc)!=RC_OK) - return RC_ERROR; - /*if (strcmp(entry->name,"file_5u")==0) -@@ -454,7 +455,7 @@ - nSect = parent->extension; - found = FALSE; - do { --/*printf("dirc=%ld\n",nSect);*/ -+/*printf("dirc=%d\n",nSect);*/ - if (adfReadDirCBlock(vol, nSect, &dirc)!=RC_OK) - return RC_ERROR; - offset = 0; n = 0; -@@ -545,7 +546,7 @@ - dirc.parent = parent->headerKey; - else { - (*adfEnv.wFct)("adfCreateEmptyCache : unknown secType"); --/*printf("secType=%ld\n",parent->secType);*/ -+/*printf("secType=%d\n",parent->secType);*/ - } - - dirc.recordsNb = 0; -@@ -588,10 +589,10 @@ - * adfWriteDirCblock - * - */ --RETCODE adfWriteDirCBlock(struct Volume* vol, long nSect, struct bDirCacheBlock* dirc) -+RETCODE adfWriteDirCBlock(struct Volume* vol, int32_t nSect, struct bDirCacheBlock* dirc) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - - dirc->type = T_DIRC; - dirc->headerKey = nSect; -Index: unadf-0.7.11a/Lib/adf_cache.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_cache.h 2006-12-03 17:24:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_cache.h 2012-05-31 17:10:09.000000000 +0200 -@@ -41,7 +41,7 @@ - RETCODE adfDelFromCache(struct Volume *vol, struct bEntryBlock *parent, SECTNUM); - - RETCODE adfReadDirCBlock(struct Volume *vol, SECTNUM nSect, struct bDirCacheBlock *dirc); --RETCODE adfWriteDirCBlock(struct Volume*, long, struct bDirCacheBlock* dirc); -+RETCODE adfWriteDirCBlock(struct Volume*, int32_t, struct bDirCacheBlock* dirc); - - #endif /* _ADF_CACHE_H */ - -Index: unadf-0.7.11a/Lib/adf_defs.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_defs.h 2006-12-03 19:41:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_defs.h 2012-05-31 17:10:09.000000000 +0200 -@@ -25,20 +25,22 @@ - */ - - -+#include -+ - #ifndef _ADF_DEFS_H - #define _ADF_DEFS_H 1 - - #define ADFLIB_VERSION "0.7.11a" - #define ADFLIB_DATE "January 20th, 2007" - --#define SECTNUM long --#define RETCODE long -+#define SECTNUM int32_t -+#define RETCODE int32_t - - #define TRUE 1 - #define FALSE 0 - --#define ULONG unsigned long --#define USHORT unsigned short -+#define ULONG uint32_t -+#define USHORT uint16_t - #define UCHAR unsigned char - #define BOOL int - -Index: unadf-0.7.11a/Lib/adf_dir.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_dir.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_dir.c 2012-05-31 17:10:09.000000000 +0200 -@@ -140,7 +140,7 @@ - } - } - nSect2 = previous.nextSameHash; --/*printf("sect=%ld\n",nSect2);*/ -+/*printf("sect=%d\n",nSect2);*/ - }while(nSect2!=0); - - previous.nextSameHash = nSect; -@@ -202,7 +202,7 @@ - (*adfEnv.wFct)(buf); - return RC_ERROR; - } --/* printf("name=%s nSect2=%ld\n",name, nSect2);*/ -+/* printf("name=%s nSect2=%d\n",name, nSect2);*/ - - /* in parent hashTable */ - if (nSect2==0) { -@@ -237,7 +237,7 @@ - (*adfEnv.notifyFct)(pSect,ST_DIR); - } - else { -- sprintf(buf, "adfRemoveEntry : secType %ld not supported", entry.secType); -+ sprintf(buf, "adfRemoveEntry : secType %d not supported", entry.secType); - (*adfEnv.wFct)(buf); - return RC_ERROR; - } -@@ -291,7 +291,7 @@ - * - */ - RETCODE adfSetEntryAccess(struct Volume* vol, SECTNUM parSect, char* name, -- long newAcc) -+ int32_t newAcc) - { - struct bEntryBlock parent, entry; - SECTNUM nSect; -@@ -365,7 +365,7 @@ - int i; - struct Entry *entry; - SECTNUM nextSector; -- long *hashTable; -+ int32_t *hashTable; - struct bEntryBlock parent; - - -@@ -542,7 +542,7 @@ - entry->name = strdup(buf); - if (entry->name==NULL) - return RC_MALLOC; --/*printf("len=%d name=%s parent=%ld\n",entryBlk->nameLen, entry->name,entry->parent );*/ -+/*printf("len=%d name=%s parent=%d\n",entryBlk->nameLen, entry->name,entry->parent );*/ - adfDays2Date( entryBlk->days, &(entry->year), &(entry->month), &(entry->days)); - entry->hour = entryBlk->mins/60; - entry->mins = entryBlk->mins%60; -@@ -595,7 +595,7 @@ - * adfNameToEntryBlk - * - */ --SECTNUM adfNameToEntryBlk(struct Volume *vol, long ht[], char* name, -+SECTNUM adfNameToEntryBlk(struct Volume *vol, int32_t ht[], char* name, - struct bEntryBlock *entry, SECTNUM *nUpdSect) - { - int hashVal; -@@ -653,7 +653,7 @@ - * - */ - char* --adfAccess2String(long acc) -+adfAccess2String(int32_t acc) - { - static char ret[8+1]; - -@@ -815,7 +815,7 @@ - int - adfGetHashValue(unsigned char *name, BOOL intl) - { -- unsigned long hash, len; -+ uint32_t hash, len; - unsigned int i; - unsigned char upper; - -@@ -839,11 +839,11 @@ - */ - void printEntry(struct Entry* entry) - { -- printf("%-30s %2d %6ld ", entry->name, entry->type, entry->sector); -+ printf("%-30s %2d %6d ", entry->name, entry->type, entry->sector); - printf("%2d/%02d/%04d %2d:%02d:%02d",entry->days, entry->month, entry->year, - entry->hour, entry->mins, entry->secs); - if (entry->type==ST_FILE) -- printf("%8ld ",entry->size); -+ printf("%8d ",entry->size); - else - printf(" "); - if (entry->type==ST_FILE || entry->type==ST_DIR) -@@ -975,7 +975,7 @@ - } - if (ent->nameLen<0 || ent->nameLen>MAXNAMELEN || ent->commLen>MAXCMMTLEN) { - (*adfEnv.wFct)("adfReadEntryBlock : nameLen or commLen incorrect"); -- printf("nameLen=%d, commLen=%d, name=%s sector%ld\n", -+ printf("nameLen=%d, commLen=%d, name=%s sector%d\n", - ent->nameLen,ent->commLen,ent->name, ent->headerKey); - } - -@@ -990,7 +990,7 @@ - RETCODE adfWriteEntryBlock(struct Volume* vol, SECTNUM nSect, struct bEntryBlock *ent) - { - unsigned char buf[512]; -- unsigned long newSum; -+ uint32_t newSum; - - - memcpy(buf, ent, sizeof(struct bEntryBlock)); -@@ -1015,7 +1015,7 @@ - RETCODE adfWriteDirBlock(struct Volume* vol, SECTNUM nSect, struct bDirBlock *dir) - { - unsigned char buf[512]; -- unsigned long newSum; -+ uint32_t newSum; - - - /*printf("wdirblk=%d\n",nSect);*/ -Index: unadf-0.7.11a/Lib/adf_dir.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_dir.h 2006-12-03 17:25:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_dir.h 2012-05-31 17:10:09.000000000 +0200 -@@ -52,15 +52,15 @@ - RETCODE adfWriteDirBlock(struct Volume* vol, SECTNUM nSect, struct bDirBlock *dir); - RETCODE adfWriteEntryBlock(struct Volume* vol, SECTNUM nSect, struct bEntryBlock *ent); - --char* adfAccess2String(long acc); -+char* adfAccess2String(int32_t acc); - unsigned char adfIntlToUpper(unsigned char c); - int adfGetHashValue(unsigned char *name, BOOL intl); - void myToUpper( unsigned char *ostr, unsigned char *nstr, int,BOOL intl ); - PREFIX RETCODE adfChangeDir(struct Volume* vol, char *name); - PREFIX RETCODE adfParentDir(struct Volume* vol); --PREFIX RETCODE adfSetEntryAccess(struct Volume*, SECTNUM, char*, long); -+PREFIX RETCODE adfSetEntryAccess(struct Volume*, SECTNUM, char*, int32_t); - PREFIX RETCODE adfSetEntryComment(struct Volume*, SECTNUM, char*, char*); --SECTNUM adfNameToEntryBlk(struct Volume *vol, long ht[], char* name, -+SECTNUM adfNameToEntryBlk(struct Volume *vol, int32_t ht[], char* name, - struct bEntryBlock *entry, SECTNUM *); - - PREFIX void printEntry(struct Entry* entry); -Index: unadf-0.7.11a/Lib/adf_disk.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_disk.c 2006-12-03 17:26:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_disk.c 2012-05-31 17:10:09.000000000 +0200 -@@ -42,7 +42,7 @@ - - extern struct Env adfEnv; - --unsigned long bitMask[32] = { -+uint32_t bitMask[32] = { - 0x1, 0x2, 0x4, 0x8, - 0x10, 0x20, 0x40, 0x80, - 0x100, 0x200, 0x400, 0x800, -@@ -132,7 +132,7 @@ - printf ("DIRCACHE "); - putchar('\n'); - -- printf("Free blocks = %ld\n", adfCountFreeBlocks(vol)); -+ printf("Free blocks = %d\n", adfCountFreeBlocks(vol)); - if (vol->readOnly) - printf("Read only\n"); - else -@@ -140,13 +140,13 @@ - - /* created */ - adfDays2Date(root.coDays, &year, &month, &days); -- printf ("created %d/%02d/%02d %ld:%02ld:%02ld\n",days,month,year, -+ printf ("created %d/%02d/%02d %d:%02d:%02d\n",days,month,year, - root.coMins/60,root.coMins%60,root.coTicks/50); - adfDays2Date(root.days, &year, &month, &days); -- printf ("last access %d/%02d/%02d %ld:%02ld:%02ld, ",days,month,year, -+ printf ("last access %d/%02d/%02d %d:%02d:%02d, ",days,month,year, - root.mins/60,root.mins%60,root.ticks/50); - adfDays2Date(root.cDays, &year, &month, &days); -- printf ("%d/%02d/%02d %ld:%02ld:%02ld\n",days,month,year, -+ printf ("%d/%02d/%02d %d:%02d:%02d\n",days,month,year, - root.cMins/60,root.cMins%60,root.cTicks/50); - } - -@@ -159,7 +159,7 @@ - */ - struct Volume* adfMount( struct Device *dev, int nPart, BOOL readOnly ) - { -- long nBlock; -+ int32_t nBlock; - struct bRootBlock root; - struct bBootBlock boot; - struct Volume* vol; -@@ -173,7 +173,7 @@ - vol->dev = dev; - vol->mounted = TRUE; - --/*printf("first=%ld last=%ld root=%ld\n",vol->firstBlock, -+/*printf("first=%d last=%d root=%d\n",vol->firstBlock, - vol->lastBlock, vol->rootBlock); - */ - if (adfReadBootBlock(vol, &boot)!=RC_OK) { -@@ -235,7 +235,7 @@ - * - * - */ --struct Volume* adfCreateVol( struct Device* dev, long start, long len, -+struct Volume* adfCreateVol( struct Device* dev, int32_t start, int32_t len, - char* volName, int volType ) - { - struct bBootBlock boot; -@@ -258,7 +258,7 @@ - vol->firstBlock = (dev->heads * dev->sectors)*start; - vol->lastBlock = (vol->firstBlock + (dev->heads * dev->sectors)*len)-1; - vol->rootBlock = (vol->lastBlock - vol->firstBlock+1)/2; --/*printf("first=%ld last=%ld root=%ld\n",vol->firstBlock, -+/*printf("first=%d last=%d root=%d\n",vol->firstBlock, - vol->lastBlock, vol->rootBlock); - */ - vol->curDirPtr = vol->rootBlock; -@@ -347,7 +347,7 @@ - - if (adfEnv.useProgressBar) - (*adfEnv.progressBar)(100); --/*printf("free blocks %ld\n",adfCountFreeBlocks(vol));*/ -+/*printf("free blocks %d\n",adfCountFreeBlocks(vol));*/ - - /* will be managed by adfMount() later */ - adfFreeBitmap(vol); -@@ -366,10 +366,10 @@ - * read logical block - */ - RETCODE --adfReadBlock(struct Volume* vol, long nSect, unsigned char* buf) -+adfReadBlock(struct Volume* vol, int32_t nSect, unsigned char* buf) - { - /* char strBuf[80];*/ -- long pSect; -+ int32_t pSect; - struct nativeFunctions *nFct; - RETCODE rc; - -@@ -384,21 +384,21 @@ - if (adfEnv.useRWAccess) - (*adfEnv.rwhAccess)(pSect,nSect,FALSE); - --/*printf("psect=%ld nsect=%ld\n",pSect,nSect);*/ --/* sprintf(strBuf,"ReadBlock : accessing logical block #%ld", nSect); -+/*printf("psect=%d nsect=%d\n",pSect,nSect);*/ -+/* sprintf(strBuf,"ReadBlock : accessing logical block #%d", nSect); - (*adfEnv.vFct)(strBuf); - */ - if (pSectfirstBlock || pSect>vol->lastBlock) { - (*adfEnv.wFct)("adfReadBlock : nSect out of range"); - - } --/*printf("pSect R =%ld\n",pSect);*/ -+/*printf("pSect R =%d\n",pSect);*/ - nFct = adfEnv.nativeFct; - if (vol->dev->isNativeDev) - rc = (*nFct->adfNativeReadSector)(vol->dev, pSect, 512, buf); - else - rc = adfReadDumpSector(vol->dev, pSect, 512, buf); --/*printf("rc=%ld\n",rc);*/ -+/*printf("rc=%d\n",rc);*/ - if (rc!=RC_OK) - return RC_ERROR; - else -@@ -410,9 +410,9 @@ - * adfWriteBlock - * - */ --RETCODE adfWriteBlock(struct Volume* vol, long nSect, unsigned char *buf) -+RETCODE adfWriteBlock(struct Volume* vol, int32_t nSect, unsigned char *buf) - { -- long pSect; -+ int32_t pSect; - struct nativeFunctions *nFct; - RETCODE rc; - -@@ -427,7 +427,7 @@ - } - - pSect = nSect+vol->firstBlock; --/*printf("write nsect=%ld psect=%ld\n",nSect,pSect);*/ -+/*printf("write nsect=%d psect=%d\n",nSect,pSect);*/ - - if (adfEnv.useRWAccess) - (*adfEnv.rwhAccess)(pSect,nSect,TRUE); -Index: unadf-0.7.11a/Lib/adf_disk.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_disk.h 2006-12-03 17:26:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_disk.h 2012-05-31 17:10:09.000000000 +0200 -@@ -38,14 +38,14 @@ - PREFIX struct Volume* adfMount( struct Device *dev, int nPart, BOOL readOnly ); - PREFIX void adfUnMount(struct Volume *vol); - PREFIX void adfVolumeInfo(struct Volume *vol); --struct Volume* adfCreateVol( struct Device* dev, long start, long len, -+struct Volume* adfCreateVol( struct Device* dev, int32_t start, int32_t len, - char* volName, int volType ); - --/*void adfReadBitmap(struct Volume* , long nBlock, struct bRootBlock* root); -+/*void adfReadBitmap(struct Volume* , int32_t nBlock, struct bRootBlock* root); - void adfUpdateBitmap(struct Volume*); - */ --PREFIX RETCODE adfReadBlock(struct Volume* , long nSect, unsigned char* buf); --PREFIX RETCODE adfWriteBlock(struct Volume* , long nSect, unsigned char* buf); -+PREFIX RETCODE adfReadBlock(struct Volume* , int32_t nSect, unsigned char* buf); -+PREFIX RETCODE adfWriteBlock(struct Volume* , int32_t nSect, unsigned char* buf); - - #endif /* _ADF_DISK_H */ - -Index: unadf-0.7.11a/Lib/adf_dump.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_dump.c 2006-12-03 17:27:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_dump.c 2012-05-31 17:10:09.000000000 +0200 -@@ -44,7 +44,7 @@ - RETCODE adfInitDumpDevice(struct Device* dev, char* name, BOOL ro) - { - struct nativeDevice* nDev; -- long size; -+ int32_t size; - - nDev = (struct nativeDevice*)dev->nativeDev; - -@@ -92,14 +92,14 @@ - * adfReadDumpSector - * - */ --RETCODE adfReadDumpSector(struct Device *dev, long n, int size, unsigned char* buf) -+RETCODE adfReadDumpSector(struct Device *dev, int32_t n, int size, unsigned char* buf) - { - struct nativeDevice* nDev; - int r; - /*puts("adfReadDumpSector");*/ - nDev = (struct nativeDevice*)dev->nativeDev; - r = fseek(nDev->fd, 512*n, SEEK_SET); --/*printf("nnn=%ld size=%d\n",n,size);*/ -+/*printf("nnn=%d size=%d\n",n,size);*/ - if (r==-1) - return RC_ERROR; - /*puts("123");*/ -@@ -117,7 +117,7 @@ - * adfWriteDumpSector - * - */ --RETCODE adfWriteDumpSector(struct Device *dev, long n, int size, unsigned char* buf) -+RETCODE adfWriteDumpSector(struct Device *dev, int32_t n, int size, unsigned char* buf) - { - struct nativeDevice* nDev; - int r; -@@ -172,7 +172,7 @@ - return RC_ERROR; - } - -- dev->volList[0] = adfCreateVol( dev, 0L, (long)dev->cylinders, volName, volType ); -+ dev->volList[0] = adfCreateVol( dev, 0L, (int32_t)dev->cylinders, volName, volType ); - if (dev->volList[0]==NULL) { - free(dev->volList); - return RC_ERROR; -@@ -191,12 +191,12 @@ - * returns NULL if failed - */ - struct Device* --adfCreateDumpDevice(char* filename, long cylinders, long heads, long sectors) -+adfCreateDumpDevice(char* filename, int32_t cylinders, int32_t heads, int32_t sectors) - { - struct Device* dev; - unsigned char buf[LOGICAL_BLOCK_SIZE]; - struct nativeDevice* nDev; --/* long i;*/ -+/* int32_t i;*/ - int r; - - dev=(struct Device*)malloc(sizeof(struct Device)); -Index: unadf-0.7.11a/Lib/adf_dump.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_dump.h 2006-12-03 17:28:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_dump.h 2012-05-31 17:10:09.000000000 +0200 -@@ -26,12 +26,14 @@ - * - */ - -+#include -+ - PREFIX struct Device* --adfCreateDumpDevice(char* filename, long cyl, long heads, long sec); -+adfCreateDumpDevice(char* filename, int32_t cyl, int32_t heads, int32_t sec); - PREFIX RETCODE adfCreateHdFile(struct Device* dev, char* volName, int volType); - BOOL adfInitDumpDevice(struct Device* dev, char* name,BOOL); --BOOL adfReadDumpSector(struct Device *dev, long n, int size, unsigned char* buf); --BOOL adfWriteDumpSector(struct Device *dev, long n, int size, unsigned char* buf); -+BOOL adfReadDumpSector(struct Device *dev, int32_t n, int size, unsigned char* buf); -+BOOL adfWriteDumpSector(struct Device *dev, int32_t n, int size, unsigned char* buf); - void adfReleaseDumpDevice(struct Device *dev); - - -Index: unadf-0.7.11a/Lib/adf_env.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_env.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_env.c 2012-05-31 17:10:09.000000000 +0200 -@@ -36,7 +36,7 @@ - #include"Win32/defendian.h" - - union u{ -- long l; -+ int32_t l; - char c[4]; - }; - -@@ -46,7 +46,7 @@ - { - /* display the physical sector, the logical block, and if the access is read or write */ - -- fprintf(stderr, "phy %ld / log %ld : %c\n", physical, logical, write ? 'W' : 'R'); -+ fprintf(stderr, "phy %d / log %d : %c\n", physical, logical, write ? 'W' : 'R'); - } - - void progressBar(int perCentDone) -@@ -71,16 +71,16 @@ - { - /* switch(changedType) { - case ST_FILE: -- fprintf(stderr,"Notification : sector %ld (FILE)\n",nSect); -+ fprintf(stderr,"Notification : sector %d (FILE)\n",nSect); - break; - case ST_DIR: -- fprintf(stderr,"Notification : sector %ld (DIR)\n",nSect); -+ fprintf(stderr,"Notification : sector %d (DIR)\n",nSect); - break; - case ST_ROOT: -- fprintf(stderr,"Notification : sector %ld (ROOT)\n",nSect); -+ fprintf(stderr,"Notification : sector %d (ROOT)\n",nSect); - break; - default: -- fprintf(stderr,"Notification : sector %ld (???)\n",nSect); -+ fprintf(stderr,"Notification : sector %d (???)\n",nSect); - } - */} - -@@ -95,10 +95,10 @@ - - /* internal checking */ - -- if (sizeof(short)!=2) -- { fprintf(stderr,"Compilation error : sizeof(short)!=2\n"); exit(1); } -- if (sizeof(long)!=4) -- { fprintf(stderr,"Compilation error : sizeof(short)!=2\n"); exit(1); } -+ if (sizeof(int16_t)!=2) -+ { fprintf(stderr,"Compilation error : sizeof(int16_t)!=2\n"); exit(1); } -+ if (sizeof(int32_t)!=4) -+ { fprintf(stderr,"Compilation error : sizeof(int16_t)!=2\n"); exit(1); } - if (sizeof(struct bEntryBlock)!=512) - { fprintf(stderr,"Internal error : sizeof(struct bEntryBlock)!=512\n"); exit(1); } - if (sizeof(struct bRootBlock)!=512) -Index: unadf-0.7.11a/Lib/adf_file.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_file.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_file.c 2012-05-31 17:10:09.000000000 +0200 -@@ -74,13 +74,13 @@ - } - if (file->writeMode) { - file->fileHdr->byteSize = file->pos; --/*printf("pos=%ld\n",file->pos);*/ -+/*printf("pos=%d\n",file->pos);*/ - adfTime2AmigaTime(adfGiveCurrentTime(), - &(file->fileHdr->days),&(file->fileHdr->mins),&(file->fileHdr->ticks) ); - adfWriteFileHdrBlock(file->volume, file->fileHdr->headerKey, file->fileHdr); - - if (isDIRCACHE(file->volume->dosType)) { --/*printf("parent=%ld\n",file->fileHdr->parent);*/ -+/*printf("parent=%d\n",file->fileHdr->parent);*/ - adfReadEntryBlock(file->volume, file->fileHdr->parent, &parent); - adfUpdateCache(file->volume, &parent, (struct bEntryBlock*)file->fileHdr,FALSE); - } -@@ -96,10 +96,10 @@ - RETCODE adfGetFileBlocks(struct Volume* vol, struct bFileHeaderBlock* entry, - struct FileBlocks* fileBlocks) - { -- long n, m; -+ int32_t n, m; - SECTNUM nSect; - struct bFileExtBlock extBlock; -- long i; -+ int32_t i; - - fileBlocks->header = entry->headerKey; - adfFileRealSize( entry->byteSize, vol->datablockSize, -@@ -170,9 +170,9 @@ - * Compute number of datablocks and file extension blocks - * - */ --long adfFileRealSize(unsigned long size, int blockSize, long *dataN, long *extN) -+int32_t adfFileRealSize(uint32_t size, int blockSize, int32_t *dataN, int32_t *extN) - { -- long data, ext; -+ int32_t data, ext; - - /*--- number of data blocks ---*/ - data = size / blockSize; -@@ -203,9 +203,9 @@ - RETCODE adfWriteFileHdrBlock(struct Volume *vol, SECTNUM nSect, struct bFileHeaderBlock* fhdr) - { - unsigned char buf[512]; -- unsigned long newSum; -+ uint32_t newSum; - RETCODE rc = RC_OK; --/*printf("adfWriteFileHdrBlock %ld\n",nSect);*/ -+/*printf("adfWriteFileHdrBlock %d\n",nSect);*/ - fhdr->type = T_HEADER; - fhdr->dataSize = 0; - fhdr->secType = ST_FILE; -@@ -216,7 +216,7 @@ - #endif - newSum = adfNormalSum(buf,20,sizeof(struct bFileHeaderBlock)); - swLong(buf+20, newSum); --/* *(unsigned long*)(buf+20) = swapLong((unsigned char*)&newSum);*/ -+/* *(uint32_t*)(buf+20) = swapLong((unsigned char*)&newSum);*/ - - adfWriteBlock(vol, nSect, buf); - -@@ -228,10 +228,10 @@ - * adfFileSeek - * - */ --void adfFileSeek(struct File *file, unsigned long pos) -+void adfFileSeek(struct File *file, uint32_t pos) - { - SECTNUM extBlock, nSect; -- unsigned long nPos; -+ uint32_t nPos; - int i; - - nPos = min(pos, file->fileHdr->byteSize); -@@ -366,9 +366,9 @@ - * adfReadFile - * - */ --long adfReadFile(struct File* file, long n, unsigned char *buffer) -+int32_t adfReadFile(struct File* file, int32_t n, unsigned char *buffer) - { -- long bytesRead; -+ int32_t bytesRead; - unsigned char *dataPtr, *bufPtr; - int blockSize, size; - -@@ -470,9 +470,9 @@ - * adfWriteFile - * - */ --long adfWriteFile(struct File *file, long n, unsigned char *buffer) -+int32_t adfWriteFile(struct File *file, int32_t n, unsigned char *buffer) - { -- long bytesWritten; -+ int32_t bytesWritten; - unsigned char *dataPtr, *bufPtr; - int size, blockSize; - struct bOFSDataBlock *dataB; -@@ -536,7 +536,7 @@ - if (file->nDataBlockvolume); - if (nSect==-1) return -1; --/*printf("adfCreateNextFileBlock fhdr %ld\n",nSect);*/ -+/*printf("adfCreateNextFileBlock fhdr %d\n",nSect);*/ - if (file->nDataBlock==0) - file->fileHdr->firstData = nSect; - file->fileHdr->dataBlocks[MAX_DATABLK-1-file->nDataBlock] = nSect; -@@ -546,7 +546,7 @@ - /* one more sector is needed for one file extension block */ - if ((file->nDataBlock%MAX_DATABLK)==0) { - extSect = adfGet1FreeBlock(file->volume); --/*printf("extSect=%ld\n",extSect);*/ -+/*printf("extSect=%d\n",extSect);*/ - if (extSect==-1) return -1; - - /* the future block is the first file extension block */ -@@ -576,13 +576,13 @@ - file->currentExt->highSeq = 0L; - file->currentExt->extension = 0L; - file->posInExtBlk = 0L; --/*printf("extSect=%ld\n",extSect);*/ -+/*printf("extSect=%d\n",extSect);*/ - } - nSect = adfGet1FreeBlock(file->volume); - if (nSect==-1) - return -1; - --/*printf("adfCreateNextFileBlock ext %ld\n",nSect);*/ -+/*printf("adfCreateNextFileBlock ext %d\n",nSect);*/ - - file->currentExt->dataBlocks[MAX_DATABLK-1-file->posInExtBlk] = nSect; - file->currentExt->highSeq++; -@@ -624,10 +624,10 @@ - * adfPos2DataBlock - * - */ --long adfPos2DataBlock(long pos, int blockSize, -- int *posInExtBlk, int *posInDataBlk, long *curDataN ) -+int32_t adfPos2DataBlock(int32_t pos, int blockSize, -+ int *posInExtBlk, int *posInDataBlk, int32_t *curDataN ) - { -- long extBlock; -+ int32_t extBlock; - - *posInDataBlk = pos%blockSize; - *curDataN = pos/blockSize; -@@ -666,7 +666,7 @@ - swapEndian(data, SWBL_DATA); - #endif - dBlock = (struct bOFSDataBlock*)data; --/*printf("adfReadDataBlock %ld\n",nSect);*/ -+/*printf("adfReadDataBlock %d\n",nSect);*/ - - if (dBlock->checkSum!=adfNormalSum(buf,20,sizeof(struct bOFSDataBlock))) - (*adfEnv.wFct)("adfReadDataBlock : invalid checksum"); -@@ -691,7 +691,7 @@ - RETCODE adfWriteDataBlock(struct Volume *vol, SECTNUM nSect, void *data) - { - unsigned char buf[512]; -- unsigned long newSum; -+ uint32_t newSum; - struct bOFSDataBlock *dataB; - RETCODE rc = RC_OK; - -@@ -705,13 +705,13 @@ - #endif - newSum = adfNormalSum(buf,20,512); - swLong(buf+20,newSum); --/* *(long*)(buf+20) = swapLong((unsigned char*)&newSum);*/ -+/* *(int32_t*)(buf+20) = swapLong((unsigned char*)&newSum);*/ - adfWriteBlock(vol,nSect,buf); - } - else { - adfWriteBlock(vol,nSect,data); - } --/*printf("adfWriteDataBlock %ld\n",nSect);*/ -+/*printf("adfWriteDataBlock %d\n",nSect);*/ - - return rc; - } -@@ -758,7 +758,7 @@ - RETCODE adfWriteFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext) - { - unsigned char buf[512]; -- unsigned long newSum; -+ uint32_t newSum; - RETCODE rc = RC_OK; - - fext->type = T_LIST; -@@ -772,7 +772,7 @@ - #endif - newSum = adfNormalSum(buf,20,512); - swLong(buf+20,newSum); --/* *(long*)(buf+20) = swapLong((unsigned char*)&newSum);*/ -+/* *(int32_t*)(buf+20) = swapLong((unsigned char*)&newSum);*/ - - adfWriteBlock(vol,nSect,buf); - -Index: unadf-0.7.11a/Lib/adf_file.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_file.h 2006-12-03 17:31:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_file.h 2012-05-31 17:10:09.000000000 +0200 -@@ -33,9 +33,9 @@ - RETCODE adfGetFileBlocks(struct Volume* vol, struct bFileHeaderBlock* entry, - struct FileBlocks* ); - RETCODE adfFreeFileBlocks(struct Volume* vol, struct bFileHeaderBlock *entry); --PREFIX long adfFileRealSize(unsigned long size, int blockSize, long *dataN, long *extN); -+PREFIX int32_t adfFileRealSize(uint32_t size, int blockSize, int32_t *dataN, int32_t *extN); - --long adfPos2DataBlock(long pos, int blockSize, int *posInExtBlk, int *posInDataBlk, long *curDataN ); -+int32_t adfPos2DataBlock(int32_t pos, int blockSize, int *posInExtBlk, int *posInDataBlk, int32_t *curDataN ); - - RETCODE adfWriteFileHdrBlock(struct Volume *vol, SECTNUM nSect, struct bFileHeaderBlock* fhdr); - -@@ -46,11 +46,11 @@ - - PREFIX struct File* adfOpenFile(struct Volume *vol, char* name, char *mode); - PREFIX void adfCloseFile(struct File *file); --PREFIX long adfReadFile(struct File* file, long n, unsigned char *buffer); -+PREFIX int32_t adfReadFile(struct File* file, int32_t n, unsigned char *buffer); - PREFIX BOOL adfEndOfFile(struct File* file); --PREFIX void adfFileSeek(struct File *file, unsigned long pos); /* BV */ -+PREFIX void adfFileSeek(struct File *file, uint32_t pos); /* BV */ - RETCODE adfReadNextFileBlock(struct File* file); --PREFIX long adfWriteFile(struct File *file, long n, unsigned char *buffer); -+PREFIX int32_t adfWriteFile(struct File *file, int32_t n, unsigned char *buffer); - SECTNUM adfCreateNextFileBlock(struct File* file); - PREFIX void adfFlushFile(struct File *file); - -Index: unadf-0.7.11a/Lib/adf_hd.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_hd.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_hd.c 2012-05-31 17:10:09.000000000 +0200 -@@ -81,9 +81,9 @@ - { - int i; - -- printf("Cylinders = %ld\n",dev->cylinders); -- printf("Heads = %ld\n",dev->heads); -- printf("Sectors/Cyl = %ld\n\n",dev->sectors); -+ printf("Cylinders = %d\n",dev->cylinders); -+ printf("Heads = %d\n",dev->heads); -+ printf("Sectors/Cyl = %d\n\n",dev->sectors); - if (!dev->isNativeDev) - printf("Dump device\n\n"); - else -@@ -106,12 +106,12 @@ - - for(i=0; inVol; i++) { - if (dev->volList[i]->volName) -- printf("%2d : %7ld ->%7ld, \"%s\"", i, -+ printf("%2d : %7d ->%7d, \"%s\"", i, - dev->volList[i]->firstBlock, - dev->volList[i]->lastBlock, - dev->volList[i]->volName); - else -- printf("%2d : %7ld ->%7ld\n", i, -+ printf("%2d : %7d ->%7d\n", i, - dev->volList[i]->firstBlock, - dev->volList[i]->lastBlock); - if (dev->volList[i]->mounted) -@@ -150,7 +150,7 @@ - { - struct Volume* vol; - unsigned char buf[512]; -- long size; -+ int32_t size; - BOOL found; - - dev->devType = DEVTYPE_HARDFILE; -@@ -178,9 +178,9 @@ - vol->firstBlock = 0; - - size = dev->size + 512-(dev->size%512); --/*printf("size=%ld\n",size);*/ -+/*printf("size=%d\n",size);*/ - vol->rootBlock = (size/512)/2; --/*printf("root=%ld\n",vol->rootBlock);*/ -+/*printf("root=%d\n",vol->rootBlock);*/ - do { - adfReadDumpSector(dev, vol->rootBlock, 512, buf); - found = swapLong(buf)==T_HEADER && swapLong(buf+508)==ST_ROOT; -@@ -211,7 +211,7 @@ - struct bPARTblock part; - struct bFSHDblock fshd; - struct bLSEGblock lseg; -- long next; -+ int32_t next; - struct List *vList, *listRoot; - int i; - struct Volume* vol; -@@ -631,7 +631,7 @@ - dev->nVol = n; - /* - vol=dev->volList[0]; --printf("0first=%ld last=%ld root=%ld\n",vol->firstBlock, -+printf("0first=%d last=%d root=%d\n",vol->firstBlock, - vol->lastBlock, vol->rootBlock); - */ - -@@ -732,7 +732,7 @@ - adfWriteRDSKblock(struct Device *dev, struct bRDSKblock* rdsk) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - struct nativeFunctions *nFct; - RETCODE rc2, rc = RC_OK; - -@@ -744,7 +744,7 @@ - memset(buf,0,LOGICAL_BLOCK_SIZE); - - strncpy(rdsk->id,"RDSK",4); -- rdsk->size = sizeof(struct bRDSKblock)/sizeof(long); -+ rdsk->size = sizeof(struct bRDSKblock)/sizeof(int32_t); - rdsk->blockSize = LOGICAL_BLOCK_SIZE; - rdsk->badBlockList = -1; - -@@ -778,7 +778,7 @@ - * - */ - RETCODE --adfReadPARTblock( struct Device* dev, long nSect, struct bPARTblock* blk ) -+adfReadPARTblock( struct Device* dev, int32_t nSect, struct bPARTblock* blk ) - { - UCHAR buf[ sizeof(struct bPARTblock) ]; - struct nativeFunctions *nFct; -@@ -824,10 +824,10 @@ - * - */ - RETCODE --adfWritePARTblock(struct Device *dev, long nSect, struct bPARTblock* part) -+adfWritePARTblock(struct Device *dev, int32_t nSect, struct bPARTblock* part) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - struct nativeFunctions *nFct; - RETCODE rc2, rc = RC_OK; - -@@ -839,7 +839,7 @@ - memset(buf,0,LOGICAL_BLOCK_SIZE); - - strncpy(part->id,"PART",4); -- part->size = sizeof(struct bPARTblock)/sizeof(long); -+ part->size = sizeof(struct bPARTblock)/sizeof(int32_t); - part->blockSize = LOGICAL_BLOCK_SIZE; - part->vectorSize = 16; - part->blockSize = 128; -@@ -871,7 +871,7 @@ - * - */ - RETCODE --adfReadFSHDblock( struct Device* dev, long nSect, struct bFSHDblock* blk) -+adfReadFSHDblock( struct Device* dev, int32_t nSect, struct bFSHDblock* blk) - { - UCHAR buf[sizeof(struct bFSHDblock)]; - struct nativeFunctions *nFct; -@@ -911,10 +911,10 @@ - * - */ - RETCODE --adfWriteFSHDblock(struct Device *dev, long nSect, struct bFSHDblock* fshd) -+adfWriteFSHDblock(struct Device *dev, int32_t nSect, struct bFSHDblock* fshd) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - struct nativeFunctions *nFct; - RETCODE rc = RC_OK; - -@@ -926,7 +926,7 @@ - memset(buf,0,LOGICAL_BLOCK_SIZE); - - strncpy(fshd->id,"FSHD",4); -- fshd->size = sizeof(struct bFSHDblock)/sizeof(long); -+ fshd->size = sizeof(struct bFSHDblock)/sizeof(int32_t); - - memcpy(buf, fshd, sizeof(struct bFSHDblock)); - #ifdef LITT_ENDIAN -@@ -954,7 +954,7 @@ - * - */ - RETCODE --adfReadLSEGblock(struct Device* dev, long nSect, struct bLSEGblock* blk) -+adfReadLSEGblock(struct Device* dev, int32_t nSect, struct bLSEGblock* blk) - { - UCHAR buf[sizeof(struct bLSEGblock)]; - struct nativeFunctions *nFct; -@@ -994,10 +994,10 @@ - * - */ - RETCODE --adfWriteLSEGblock(struct Device *dev, long nSect, struct bLSEGblock* lseg) -+adfWriteLSEGblock(struct Device *dev, int32_t nSect, struct bLSEGblock* lseg) - { - unsigned char buf[LOGICAL_BLOCK_SIZE]; -- unsigned long newSum; -+ uint32_t newSum; - struct nativeFunctions *nFct; - RETCODE rc; - -@@ -1009,7 +1009,7 @@ - memset(buf,0,LOGICAL_BLOCK_SIZE); - - strncpy(lseg->id,"LSEG",4); -- lseg->size = sizeof(struct bLSEGblock)/sizeof(long); -+ lseg->size = sizeof(struct bLSEGblock)/sizeof(int32_t); - - memcpy(buf, lseg, sizeof(struct bLSEGblock)); - #ifdef LITT_ENDIAN -Index: unadf-0.7.11a/Lib/adf_hd.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_hd.h 2006-12-03 17:33:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_hd.h 2012-05-31 17:10:09.000000000 +0200 -@@ -47,18 +47,18 @@ - PREFIX RETCODE adfCreateHd(struct Device* dev, int n, struct Partition** partList ); - PREFIX RETCODE adfCreateHdFile(struct Device* dev, char* volName, int volType); - --struct Device* adfCreateDev(char* filename, long cylinders, long heads, long sectors); -+struct Device* adfCreateDev(char* filename, int32_t cylinders, int32_t heads, int32_t sectors); - --RETCODE adfReadBlockDev( struct Device* dev, long nSect, long size, unsigned char* buf ); --RETCODE adfWriteBlockDev(struct Device* dev, long nSect, long size, unsigned char* buf ); -+RETCODE adfReadBlockDev( struct Device* dev, int32_t nSect, int32_t size, unsigned char* buf ); -+RETCODE adfWriteBlockDev(struct Device* dev, int32_t nSect, int32_t size, unsigned char* buf ); - RETCODE adfReadRDSKblock( struct Device* dev, struct bRDSKblock* blk ); - RETCODE adfWriteRDSKblock(struct Device *dev, struct bRDSKblock* rdsk); --RETCODE adfReadPARTblock( struct Device* dev, long nSect, struct bPARTblock* blk ); --RETCODE adfWritePARTblock(struct Device *dev, long nSect, struct bPARTblock* part); --RETCODE adfReadFSHDblock( struct Device* dev, long nSect, struct bFSHDblock* blk); --RETCODE adfWriteFSHDblock(struct Device *dev, long nSect, struct bFSHDblock* fshd); --RETCODE adfReadLSEGblock(struct Device* dev, long nSect, struct bLSEGblock* blk); --RETCODE adfWriteLSEGblock(struct Device *dev, long nSect, struct bLSEGblock* lseg); -+RETCODE adfReadPARTblock( struct Device* dev, int32_t nSect, struct bPARTblock* blk ); -+RETCODE adfWritePARTblock(struct Device *dev, int32_t nSect, struct bPARTblock* part); -+RETCODE adfReadFSHDblock( struct Device* dev, int32_t nSect, struct bFSHDblock* blk); -+RETCODE adfWriteFSHDblock(struct Device *dev, int32_t nSect, struct bFSHDblock* fshd); -+RETCODE adfReadLSEGblock(struct Device* dev, int32_t nSect, struct bLSEGblock* blk); -+RETCODE adfWriteLSEGblock(struct Device *dev, int32_t nSect, struct bLSEGblock* lseg); - - - #endif /* _ADF_HD_H */ -Index: unadf-0.7.11a/Lib/adf_link.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_link.c 2006-12-03 17:33:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_link.c 2012-05-31 17:10:09.000000000 +0200 -@@ -60,7 +60,7 @@ - * - */ - RETCODE adfBlockPtr2EntryName(struct Volume *vol, SECTNUM nSect, SECTNUM lPar, -- char **name, long *size) -+ char **name, int32_t *size) - { - struct bEntryBlock entryBlk; - struct Entry entry; -Index: unadf-0.7.11a/Lib/adf_link.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_link.h 2006-12-03 17:33:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_link.h 2012-05-31 17:10:09.000000000 +0200 -@@ -27,9 +27,10 @@ - */ - - #include"prefix.h" -+#include - - PREFIX RETCODE adfBlockPtr2EntryName(struct Volume *vol, SECTNUM nSect, SECTNUM lPar, -- char **name, long *size); -+ char **name, int32_t *size); - - - #endif /* ADF_LINK_H */ -Index: unadf-0.7.11a/Lib/adf_raw.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_raw.c 2012-05-31 16:30:51.000000000 +0200 -+++ unadf-0.7.11a/Lib/adf_raw.c 2012-05-31 17:10:09.000000000 +0200 -@@ -80,11 +80,11 @@ - for(j=0; jtype = T_HEADER; -@@ -167,12 +167,12 @@ - - newSum = adfNormalSum(buf,20,LOGICAL_BLOCK_SIZE); - swLong(buf+20, newSum); --/* *(unsigned long*)(buf+20) = swapLong((unsigned char*)&newSum);*/ -+/* *(uint32_t*)(buf+20) = swapLong((unsigned char*)&newSum);*/ - - /* dumpBlock(buf);*/ - if (adfWriteBlock(vol, nSect, buf)!=RC_OK) - return RC_ERROR; --/*printf("adfWriteRootBlock %ld\n",nSect);*/ -+/*printf("adfWriteRootBlock %d\n",nSect);*/ - return RC_OK; - } - -@@ -221,7 +221,7 @@ - adfWriteBootBlock(struct Volume* vol, struct bBootBlock* boot) - { - unsigned char buf[LOGICAL_BLOCK_SIZE*2]; -- unsigned long newSum; -+ uint32_t newSum; - - boot->dosType[0] = 'D'; - boot->dosType[1] = 'O'; -@@ -235,7 +235,7 @@ - newSum = adfBootSum(buf); - /*fprintf(stderr,"sum %x %x\n",newSum,adfBootSum2(buf));*/ - swLong(buf+4,newSum); --/* *(unsigned long*)(buf+4) = swapLong((unsigned char*)&newSum);*/ -+/* *(uint32_t*)(buf+4) = swapLong((unsigned char*)&newSum);*/ - } - - /* dumpBlock(buf); -@@ -257,10 +257,10 @@ - * offset = checksum place (in bytes) - * bufLen = buffer length (in bytes) - */ -- unsigned long -+ uint32_t - adfNormalSum( UCHAR* buf, int offset, int bufLen ) - { -- long newsum; -+ int32_t newsum; - int i; - - newsum=0L; -@@ -276,10 +276,10 @@ - * adfBitmapSum - * - */ -- unsigned long -+ uint32_t - adfBitmapSum(unsigned char *buf) - { -- unsigned long newSum; -+ uint32_t newSum; - int i; - - newSum = 0L; -@@ -293,10 +293,10 @@ - * adfBootSum - * - */ -- unsigned long -+ uint32_t - adfBootSum(unsigned char *buf) - { -- unsigned long d, newSum; -+ uint32_t d, newSum; - int i; - - newSum=0L; -@@ -313,14 +313,14 @@ - return(newSum); - } - -- unsigned long -+ uint32_t - adfBootSum2(unsigned char *buf) - { -- unsigned long prevsum, newSum; -+ uint32_t prevsum, newSum; - int i; - - prevsum = newSum=0L; -- for(i=0; i<1024/sizeof(unsigned long); i++) { -+ for(i=0; i<1024/sizeof(uint32_t); i++) { - if (i!=1) { - prevsum = newSum; - newSum += Long(buf+i*4); -Index: unadf-0.7.11a/Lib/adf_raw.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_raw.h 2006-12-03 17:34:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_raw.h 2012-05-31 17:10:09.000000000 +0200 -@@ -53,13 +53,13 @@ - #define SWBL_FSHD 10 - #define SWBL_LSEG 11 - --RETCODE adfReadRootBlock(struct Volume*, long nSect, struct bRootBlock* root); --RETCODE adfWriteRootBlock(struct Volume* vol, long nSect, struct bRootBlock* root); -+RETCODE adfReadRootBlock(struct Volume*, int32_t nSect, struct bRootBlock* root); -+RETCODE adfWriteRootBlock(struct Volume* vol, int32_t nSect, struct bRootBlock* root); - RETCODE adfReadBootBlock(struct Volume*, struct bBootBlock* boot); - RETCODE adfWriteBootBlock(struct Volume* vol, struct bBootBlock* boot); - --unsigned long adfBootSum(unsigned char *buf); --unsigned long adfNormalSum( unsigned char *buf, int offset, int bufLen ); -+uint32_t adfBootSum(unsigned char *buf); -+uint32_t adfNormalSum( unsigned char *buf, int offset, int bufLen ); - - void swapEndian( unsigned char *buf, int type ); - -Index: unadf-0.7.11a/Lib/adf_salv.c -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_salv.c 2006-12-03 17:35:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_salv.c 2012-05-31 17:10:09.000000000 +0200 -@@ -73,7 +73,7 @@ - struct List* adfGetDelEnt(struct Volume *vol) - { - struct GenBlock *block; -- long i; -+ int32_t i; - struct List *list, *head; - BOOL delEnt; - -@@ -226,7 +226,7 @@ - */ - RETCODE adfUndelFile(struct Volume* vol, SECTNUM pSect, SECTNUM nSect, struct bFileHeaderBlock* entry) - { -- long i; -+ int32_t i; - char name[MAXNAMELEN+1]; - struct bEntryBlock parent; - RETCODE rc; -@@ -312,11 +312,11 @@ - int n; - - adfGetFileBlocks(vol,file,&fileBlocks); --/*printf("data %ld ext %ld\n",fileBlocks.nbData,fileBlocks.nbExtens);*/ -+/*printf("data %d ext %d\n",fileBlocks.nbData,fileBlocks.nbExtens);*/ - if (isOFS(vol->dosType)) { - /* checks OFS datablocks */ - for(n=0; n>24UL); - buf[1]= (unsigned char)((val & 0x00ff0000) >>16UL); -@@ -49,7 +49,7 @@ - buf[3]= (unsigned char)(val & 0x000000ff); - } - --void swShort(unsigned char* buf, unsigned short val) -+void swShort(unsigned char* buf, uint16_t val) - { - buf[0]= (val & 0xff00) >>8UL; - buf[1]= (val & 0x00ff) ; -@@ -102,7 +102,7 @@ - */ - - void --adfDays2Date(long days, int *yy, int *mm, int *dd) -+adfDays2Date(int32_t days, int *yy, int *mm, int *dd) - { - int y,m; - int nd; -@@ -186,7 +186,7 @@ - * converts date and time (dt) into Amiga format : day, min, ticks - */ - void --adfTime2AmigaTime(struct DateTime dt, long *day, long *min, long *ticks ) -+adfTime2AmigaTime(struct DateTime dt, int32_t *day, int32_t *min, int32_t *ticks ) - { - int jm[12]={ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - -Index: unadf-0.7.11a/Lib/adf_util.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adf_util.h 2006-12-03 17:36:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adf_util.h 2012-05-31 17:10:09.000000000 +0200 -@@ -31,15 +31,15 @@ - #include "adf_str.h" - - --void swLong(unsigned char* buf, unsigned long val); --void swShort(unsigned char* buf, unsigned short val); -+void swLong(unsigned char* buf, uint32_t val); -+void swShort(unsigned char* buf, uint16_t val); - - PREFIX struct List* newCell(struct List* list, void* content); - PREFIX void freeList(struct List* list); --void adfDays2Date(long days, int *yy, int *mm, int *dd); -+void adfDays2Date(int32_t days, int *yy, int *mm, int *dd); - BOOL adfIsLeap(int y); - void --adfTime2AmigaTime(struct DateTime dt, long *day, long *min, long *ticks ); -+adfTime2AmigaTime(struct DateTime dt, int32_t *day, int32_t *min, int32_t *ticks ); - struct DateTime - adfGiveCurrentTime( void ); - -Index: unadf-0.7.11a/Lib/adflib.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/adflib.h 2006-12-03 17:35:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/adflib.h 2012-05-31 17:10:09.000000000 +0200 -@@ -60,18 +60,18 @@ - PREFIX void adfFreeDirList(struct List* list); - PREFIX void adfFreeEntry(struct Entry *); - PREFIX RETCODE adfRenameEntry(struct Volume *vol, SECTNUM, char *old,SECTNUM,char *pNew); /* BV */ --PREFIX RETCODE adfSetEntryAccess(struct Volume*, SECTNUM, char*, long); -+PREFIX RETCODE adfSetEntryAccess(struct Volume*, SECTNUM, char*, int32_t); - PREFIX RETCODE adfSetEntryComment(struct Volume*, SECTNUM, char*, char*); - - /* file */ --PREFIX long adfFileRealSize(unsigned long size, int blockSize, long *dataN, long *extN); -+PREFIX int32_t adfFileRealSize(uint32_t size, int blockSize, int32_t *dataN, int32_t *extN); - PREFIX struct File* adfOpenFile(struct Volume *vol, char* name, char *mode); - PREFIX void adfCloseFile(struct File *file); --PREFIX long adfReadFile(struct File* file, long n, unsigned char *buffer); -+PREFIX int32_t adfReadFile(struct File* file, int32_t n, unsigned char *buffer); - PREFIX BOOL adfEndOfFile(struct File* file); --PREFIX long adfWriteFile(struct File *file, long n, unsigned char *buffer); -+PREFIX int32_t adfWriteFile(struct File *file, int32_t n, unsigned char *buffer); - PREFIX void adfFlushFile(struct File *file); --PREFIX void adfFileSeek(struct File *file, unsigned long pos); -+PREFIX void adfFileSeek(struct File *file, uint32_t pos); - - /* volume */ - PREFIX RETCODE adfInstallBootBlock(struct Volume *vol,unsigned char*); -@@ -88,7 +88,7 @@ - PREFIX RETCODE adfCreateHdFile(struct Device* dev, char* volName, int volType); - - /* dump device */ --PREFIX struct Device* adfCreateDumpDevice(char* filename, long cyl, long heads, long sec); -+PREFIX struct Device* adfCreateDumpDevice(char* filename, int32_t cyl, int32_t heads, int32_t sec); - - /* env */ - PREFIX void adfEnvInitDefault(); -@@ -100,7 +100,7 @@ - PREFIX void adfSetEnvFct( void(*e)(char*), void(*w)(char*), void(*v)(char*) ); - - /* link */ --PREFIX RETCODE adfBlockPtr2EntryName(struct Volume *, SECTNUM, SECTNUM,char **, long *); -+PREFIX RETCODE adfBlockPtr2EntryName(struct Volume *, SECTNUM, SECTNUM,char **, int32_t *); - - /* salv */ - PREFIX struct List* adfGetDelEnt(struct Volume *vol); -@@ -114,9 +114,9 @@ - - /* low level API */ - --PREFIX RETCODE adfReadBlock(struct Volume* , long nSect, unsigned char* buf); --PREFIX RETCODE adfWriteBlock(struct Volume* , long nSect, unsigned char* buf); --PREFIX long adfCountFreeBlocks(struct Volume* vol); -+PREFIX RETCODE adfReadBlock(struct Volume* , int32_t nSect, unsigned char* buf); -+PREFIX RETCODE adfWriteBlock(struct Volume* , int32_t nSect, unsigned char* buf); -+PREFIX int32_t adfCountFreeBlocks(struct Volume* vol); - - - #ifdef __cplusplus -Index: unadf-0.7.11a/Lib/hd_blk.h -=================================================================== ---- unadf-0.7.11a.orig/Lib/hd_blk.h 2006-12-03 18:45:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/hd_blk.h 2012-05-31 17:10:09.000000000 +0200 -@@ -35,58 +35,58 @@ - - struct bRDSKblock { - /*000*/ char id[4]; /* RDSK */ --/*004*/ long size; /* 64 longs */ -+/*004*/ int32_t size; /* 64 int32_ts */ - /*008*/ ULONG checksum; --/*00c*/ long hostID; /* 7 */ --/*010*/ long blockSize; /* 512 bytes */ --/*014*/ long flags; /* 0x17 */ --/*018*/ long badBlockList; --/*01c*/ long partitionList; --/*020*/ long fileSysHdrList; --/*024*/ long driveInit; --/*028*/ long r1[6]; /* -1 */ --/*040*/ long cylinders; --/*044*/ long sectors; --/*048*/ long heads; --/*04c*/ long interleave; --/*050*/ long parkingZone; --/*054*/ long r2[3]; /* 0 */ --/*060*/ long writePreComp; --/*064*/ long reducedWrite; --/*068*/ long stepRate; --/*06c*/ long r3[5]; /* 0 */ --/*080*/ long rdbBlockLo; --/*084*/ long rdbBlockHi; --/*088*/ long loCylinder; --/*08c*/ long hiCylinder; --/*090*/ long cylBlocks; --/*094*/ long autoParkSeconds; --/*098*/ long highRDSKBlock; --/*09c*/ long r4; /* 0 */ -+/*00c*/ int32_t hostID; /* 7 */ -+/*010*/ int32_t blockSize; /* 512 bytes */ -+/*014*/ int32_t flags; /* 0x17 */ -+/*018*/ int32_t badBlockList; -+/*01c*/ int32_t partitionList; -+/*020*/ int32_t fileSysHdrList; -+/*024*/ int32_t driveInit; -+/*028*/ int32_t r1[6]; /* -1 */ -+/*040*/ int32_t cylinders; -+/*044*/ int32_t sectors; -+/*048*/ int32_t heads; -+/*04c*/ int32_t interleave; -+/*050*/ int32_t parkingZone; -+/*054*/ int32_t r2[3]; /* 0 */ -+/*060*/ int32_t writePreComp; -+/*064*/ int32_t reducedWrite; -+/*068*/ int32_t stepRate; -+/*06c*/ int32_t r3[5]; /* 0 */ -+/*080*/ int32_t rdbBlockLo; -+/*084*/ int32_t rdbBlockHi; -+/*088*/ int32_t loCylinder; -+/*08c*/ int32_t hiCylinder; -+/*090*/ int32_t cylBlocks; -+/*094*/ int32_t autoParkSeconds; -+/*098*/ int32_t highRDSKBlock; -+/*09c*/ int32_t r4; /* 0 */ - /*0a0*/ char diskVendor[8]; - /*0a8*/ char diskProduct[16]; - /*0b8*/ char diskRevision[4]; - /*0bc*/ char controllerVendor[8]; - /*0c4*/ char controllerProduct[16]; - /*0d4*/ char controllerRevision[4]; --/*0d8*/ long r5[10]; /* 0 */ -+/*0d8*/ int32_t r5[10]; /* 0 */ - /*100*/ - }; - - - struct bBADBentry { --/*000*/ long badBlock; --/*004*/ long goodBlock; -+/*000*/ int32_t badBlock; -+/*004*/ int32_t goodBlock; - }; - - - struct bBADBblock { - /*000*/ char id[4]; /* BADB */ --/*004*/ long size; /* 128 longs */ -+/*004*/ int32_t size; /* 128 int32_ts */ - /*008*/ ULONG checksum; --/*00c*/ long hostID; /* 7 */ --/*010*/ long next; --/*014*/ long r1; -+/*00c*/ int32_t hostID; /* 7 */ -+/*010*/ int32_t next; -+/*014*/ int32_t r1; - /*018*/ struct bBADBentry blockPairs[61]; - }; - -@@ -94,72 +94,72 @@ - - struct bPARTblock { - /*000*/ char id[4]; /* PART */ --/*004*/ long size; /* 64 longs */ -+/*004*/ int32_t size; /* 64 int32_ts */ - /*008*/ ULONG checksum; --/*00c*/ long hostID; /* 7 */ --/*010*/ long next; --/*014*/ long flags; --/*018*/ long r1[2]; --/*020*/ long devFlags; -+/*00c*/ int32_t hostID; /* 7 */ -+/*010*/ int32_t next; -+/*014*/ int32_t flags; -+/*018*/ int32_t r1[2]; -+/*020*/ int32_t devFlags; - /*024*/ char nameLen; - /*025*/ char name[31]; --/*044*/ long r2[15]; -+/*044*/ int32_t r2[15]; - --/*080*/ long vectorSize; /* often 16 longs */ --/*084*/ long blockSize; /* 128 longs */ --/*088*/ long secOrg; --/*08c*/ long surfaces; --/*090*/ long sectorsPerBlock; /* == 1 */ --/*094*/ long blocksPerTrack; --/*098*/ long dosReserved; --/*09c*/ long dosPreAlloc; --/*0a0*/ long interleave; --/*0a4*/ long lowCyl; --/*0a8*/ long highCyl; --/*0ac*/ long numBuffer; --/*0b0*/ long bufMemType; --/*0b4*/ long maxTransfer; --/*0b8*/ long mask; --/*0bc*/ long bootPri; -+/*080*/ int32_t vectorSize; /* often 16 int32_ts */ -+/*084*/ int32_t blockSize; /* 128 int32_ts */ -+/*088*/ int32_t secOrg; -+/*08c*/ int32_t surfaces; -+/*090*/ int32_t sectorsPerBlock; /* == 1 */ -+/*094*/ int32_t blocksPerTrack; -+/*098*/ int32_t dosReserved; -+/*09c*/ int32_t dosPreAlloc; -+/*0a0*/ int32_t interleave; -+/*0a4*/ int32_t lowCyl; -+/*0a8*/ int32_t highCyl; -+/*0ac*/ int32_t numBuffer; -+/*0b0*/ int32_t bufMemType; -+/*0b4*/ int32_t maxTransfer; -+/*0b8*/ int32_t mask; -+/*0bc*/ int32_t bootPri; - /*0c0*/ char dosType[4]; --/*0c4*/ long r3[15]; -+/*0c4*/ int32_t r3[15]; - }; - - - struct bLSEGblock { - /*000*/ char id[4]; /* LSEG */ --/*004*/ long size; /* 128 longs */ -+/*004*/ int32_t size; /* 128 int32_ts */ - /*008*/ ULONG checksum; --/*00c*/ long hostID; /* 7 */ --/*010*/ long next; -+/*00c*/ int32_t hostID; /* 7 */ -+/*010*/ int32_t next; - /*014*/ char loadData[123*4]; - }; - - - struct bFSHDblock { - /*000*/ char id[4]; /* FSHD */ --/*004*/ long size; /* 64 */ -+/*004*/ int32_t size; /* 64 */ - /*008*/ ULONG checksum; --/*00c*/ long hostID; /* 7 */ --/*010*/ long next; --/*014*/ long flags; --/*018*/ long r1[2]; -+/*00c*/ int32_t hostID; /* 7 */ -+/*010*/ int32_t next; -+/*014*/ int32_t flags; -+/*018*/ int32_t r1[2]; - /*020*/ char dosType[4]; --/*024*/ short majVersion; --/*026*/ short minVersion; --/*028*/ long patchFlags; -- --/*02c*/ long type; --/*030*/ long task; --/*034*/ long lock; --/*038*/ long handler; --/*03c*/ long stackSize; --/*040*/ long priority; --/*044*/ long startup; --/*048*/ long segListBlock; --/*04c*/ long globalVec; --/*050*/ long r2[23]; --/*0ac*/ long r3[21]; -+/*024*/ int16_t majVersion; -+/*026*/ int16_t minVersion; -+/*028*/ int32_t patchFlags; -+ -+/*02c*/ int32_t type; -+/*030*/ int32_t task; -+/*034*/ int32_t lock; -+/*038*/ int32_t handler; -+/*03c*/ int32_t stackSize; -+/*040*/ int32_t priority; -+/*044*/ int32_t startup; -+/*048*/ int32_t segListBlock; -+/*04c*/ int32_t globalVec; -+/*050*/ int32_t r2[23]; -+/*0ac*/ int32_t r3[21]; - }; - - -Index: unadf-0.7.11a/Lib/myconf -=================================================================== ---- unadf-0.7.11a.orig/Lib/myconf 2006-12-03 17:19:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/myconf 2012-05-31 17:10:09.000000000 +0200 -@@ -3,9 +3,10 @@ - cat >myctest.c < -+#include - - union u{ -- long l; -+ int32_t l; - char c[4]; - }; - -@@ -13,9 +14,9 @@ - { - union u val; - -- printf("%d ",sizeof(long)); -- printf("%d ",sizeof(short)); -- printf("%d ",sizeof(int)); -+ printf("%ld ",sizeof(int32_t)); -+ printf("%ld ",sizeof(int16_t)); -+ printf("%ld ",sizeof(int)); - - val.l=1L; - if (val.c[3]==1) -@@ -26,7 +27,7 @@ - - END - --gcc myctest.c -o myctest -+gcc -std=gnu99 myctest.c -o myctest - rm myctest.c - - if [ `./myctest |cut -d' ' -f 1` != 4 ] -@@ -51,4 +52,10 @@ - echo Big Endian machine detected - fi - --rm myctest.exe myctest -+if [ -f myctest.exe ]; then -+ rm myctest.exe -+fi -+ -+if [ -f myctest ]; then -+ rm myctest -+fi -Index: unadf-0.7.11a/Lib/myconf.sh -=================================================================== ---- unadf-0.7.11a.orig/Lib/myconf.sh 2006-12-03 17:18:00.000000000 +0100 -+++ unadf-0.7.11a/Lib/myconf.sh 2012-05-31 17:10:09.000000000 +0200 -@@ -3,9 +3,10 @@ - cat >myctest.c < -+#include - - union u{ -- long l; -+ int32_t l; - char c[4]; - }; - -@@ -13,9 +14,9 @@ - { - union u val; - -- printf("%d ",sizeof(long)); -- printf("%d ",sizeof(short)); -- printf("%d ",sizeof(int)); -+ printf("%ld ",sizeof(int32_t)); -+ printf("%ld ",sizeof(int16_t)); -+ printf("%ld ",sizeof(int)); - - val.l=1L; - if (val.c[3]==1) -@@ -26,7 +27,7 @@ - - END - --gcc myctest.c -o myctest -+gcc -std=gnu99 myctest.c -o myctest - rm myctest.c - - if [ `./myctest |cut -d' ' -f 1` != 4 ] -@@ -51,4 +52,10 @@ - echo Big Endian machine detected - fi - --rm myctest.exe myctest -+if [ -f myctest.exe ]; then -+ rm myctest.exe -+fi -+ -+if [ -f myctest ]; then -+ rm myctest -+fi -Index: unadf-0.7.11a/Makefile -=================================================================== ---- unadf-0.7.11a.orig/Makefile 2006-12-31 20:48:00.000000000 +0100 -+++ unadf-0.7.11a/Makefile 2012-05-31 17:10:09.000000000 +0200 -@@ -13,7 +13,7 @@ - RELEASE=1 - INSTDIR=/usr/local/unadf - --all: demo tests lib -+all: demo lib #tests - - lib: $(LIBDIR)/$(LIBNAME) - cp $(LIBDIR)/$(LIBNAME) ./Bin/Linux/ -@@ -23,14 +23,14 @@ - - clean: - cd $(LIBDIR) && ($(MAKE) clean || true) -- cd $(TESTDIR) && ($(MAKE) clean || true) -+ #cd $(TESTDIR) && ($(MAKE) clean || true) - cd $(DEMODIR) && ($(MAKE) clean || true) - rm -rf PKG *~ unadf*.rpm - rm -f unadf-${VERSION}.spec - - dep Lib/defendian.h: - cd $(LIBDIR) && ($(MAKE) dep || true) -- cd $(TESTDIR) && ($(MAKE) dep || true) -+ #cd $(TESTDIR) && ($(MAKE) dep || true) - cd $(DEMODIR) && ($(MAKE) dep || true) - - zip: -@@ -54,9 +54,9 @@ - unadf-${VERSION}.spec: gen_spec.sh - ./gen_spec.sh ${VERSION} ${RELEASE} unadf FilesToInstall >unadf-${VERSION}.spec - --zipdump: -- (rm adfdump.zip) || true -- zip -9r dumps.zip Dumps Test -+#zipdump: -+# (rm adfdump.zip) || true -+# zip -9r dumps.zip Dumps Test - - binw32: - (rm binw32.zip) || true -@@ -80,3 +80,4 @@ - cd $(TESTDIR) && ./bigdev.sh - - -+# DO NOT DELETE diff --git a/app-arch/unadf/files/add-hardening-flags-in-compiler-options b/app-arch/unadf/files/add-hardening-flags-in-compiler-options deleted file mode 100644 index 7bef8e5..0000000 --- a/app-arch/unadf/files/add-hardening-flags-in-compiler-options +++ /dev/null @@ -1,44 +0,0 @@ -Description: Add hardening flags in compiler options -Author: Boris Pek -Last-Update: 2012-06-19 - ---- a/Demo/Makefile -+++ b/Demo/Makefile -@@ -8,6 +8,9 @@ - CFLAGS=-I$(LIBDIR) -Wall -Wno-uninitialized -pedantic -std=gnu99 -ggdb - LDFLAGS=-L$(LIBDIR) -ladf - -+CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -+LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed -+ - EXES= unadf - - ---- a/Lib/Makefile -+++ b/Lib/Makefile -@@ -16,11 +16,13 @@ - DEFINES= - - CFLAGS=$(DEFINES) -I${NATIV_DIR} -I.. -I. -Wall -ggdb -std=gnu99 -+CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) - - CC=gcc - DEPEND=makedepend - - LDFLAGS=-L. -ladf -+LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed - LDSHARED=$(CC) - - OBJS= adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o\ ---- a/Demo/unadf.c -+++ b/Demo/unadf.c -@@ -489,8 +489,7 @@ - - dev = adfMountDev( devname,TRUE ); - if (!dev) { -- sprintf(strbuf,"Can't mount the dump device '%s'.\n", devname); -- fprintf(stderr, strbuf); -+ fprintf(stderr,"Can't mount the dump device '%s'.\n", devname); - adfEnvCleanUp(); exit(1); - } - if (!qflag) diff --git a/app-arch/unadf/files/source-code-fixes b/app-arch/unadf/files/source-code-fixes deleted file mode 100644 index 98fc21b..0000000 --- a/app-arch/unadf/files/source-code-fixes +++ /dev/null @@ -1,100 +0,0 @@ -Description: fix header files -Last-Update: 2012-05-31 - ---- unadf-0.7.11a.orig/Lib/adf_env.c -+++ unadf-0.7.11a/Lib/adf_env.c -@@ -33,7 +33,7 @@ - #include"adf_nativ.h" - #include"adf_env.h" - --#include"defendian.h" -+#include"Win32/defendian.h" - - union u{ - long l; ---- unadf-0.7.11a.orig/Lib/adf_file.c -+++ unadf-0.7.11a/Lib/adf_file.c -@@ -31,7 +31,7 @@ - #include"adf_util.h" - #include"adf_file.h" - #include"adf_str.h" --#include"defendian.h" -+#include"Win32/defendian.h" - #include"adf_raw.h" - #include"adf_disk.h" - #include"adf_dir.h" ---- unadf-0.7.11a.orig/Lib/adf_dir.c -+++ unadf-0.7.11a/Lib/adf_dir.c -@@ -32,7 +32,7 @@ - #include"adf_dir.h" - #include"adf_str.h" - #include"adf_util.h" --#include"defendian.h" -+#include"Win32/defendian.h" - #include"adf_blk.h" - #include"adf_raw.h" - #include"adf_disk.h" ---- unadf-0.7.11a.orig/Lib/adf_raw.c -+++ unadf-0.7.11a/Lib/adf_raw.c -@@ -35,7 +35,7 @@ - #include "adf_disk.h" - #include "adf_util.h" - #include "adf_err.h" --#include "defendian.h" -+#include "Win32/defendian.h" - - extern struct Env adfEnv; - ---- unadf-0.7.11a.orig/Lib/adf_bitm.c -+++ unadf-0.7.11a/Lib/adf_bitm.c -@@ -33,7 +33,7 @@ - #include"adf_err.h" - #include"adf_disk.h" - #include"adf_util.h" --#include"defendian.h" -+#include"Win32/defendian.h" - - extern unsigned long bitMask[32]; - ---- unadf-0.7.11a.orig/Lib/adf_cache.c -+++ unadf-0.7.11a/Lib/adf_cache.c -@@ -31,7 +31,7 @@ - #include"adf_defs.h" - #include"adf_str.h" - #include"adf_err.h" --#include"defendian.h" -+#include"Win32/defendian.h" - #include"adf_cache.h" - #include"adf_raw.h" - #include"adf_disk.h" ---- unadf-0.7.11a.orig/Lib/adf_hd.c -+++ unadf-0.7.11a/Lib/adf_hd.c -@@ -41,7 +41,7 @@ - #include"adf_dump.h" - #include"adf_err.h" - --#include"defendian.h" -+#include"Win32/defendian.h" - - extern struct Env adfEnv; - ---- unadf-0.7.11a.orig/Lib/Generic/adf_nativ.c -+++ unadf-0.7.11a/Lib/Generic/adf_nativ.c -@@ -20,7 +20,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ -- */ - - #include - #include ---- unadf-0.7.11a.orig/Lib/Generic/adf_nativ.h -+++ unadf-0.7.11a/Lib/Generic/adf_nativ.h -@@ -20,7 +20,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ -- */ - - #ifndef ADF_NATIV_H - #define ADF_NATIV_H diff --git a/app-arch/unadf/files/unadf-0.7.12-CVE-2016-1243_CVE-2016-1244.patch b/app-arch/unadf/files/unadf-0.7.12-CVE-2016-1243_CVE-2016-1244.patch new file mode 100644 index 0000000..5547e00 --- /dev/null +++ b/app-arch/unadf/files/unadf-0.7.12-CVE-2016-1243_CVE-2016-1244.patch @@ -0,0 +1,146 @@ +Description: Fix unsafe extraction by using mkdir() instead of shell command + This commit fixes following vulnerabilities: + + - CVE-2016-1243: stack buffer overflow caused by blindly trusting on + pathname lengths of archived files + + Stack allocated buffer sysbuf was filled with sprintf() without any + bounds checking in extracTree() function. + + - CVE-2016-1244: execution of unsanitized input + + Shell command used for creating directory paths was constructed by + concatenating names of archived files to the end of the command + string. + + So, if the user was tricked to extract a specially crafted .adf file, + the attacker was able to execute arbitrary code with privileges of the + user. + + This commit fixes both issues by + + 1) replacing mkdir shell commands with mkdir() function calls + 2) removing redundant sysbuf buffer + +Author: Tuomas Räsänen +Last-Update: 2016-09-20 +-- +--- a/examples/unadf.c ++++ b/examples/unadf.c +@@ -24,6 +24,8 @@ + + #define UNADF_VERSION "1.0" + ++#include ++#include + + #include + #include +@@ -31,17 +33,15 @@ + + #include "adflib.h" + +-/* The portable way used to create a directory is to call the MKDIR command via the +- * system() function. +- * It is used to create the 'dir1' directory, like the 'dir1/dir11' directory ++/* The portable way used to create a directory is to call mkdir() ++ * which is defined by following standards: SVr4, BSD, POSIX.1-2001 ++ * and POSIX.1-2008 + */ + + /* the portable way to check if a directory 'dir1' already exists i'm using is to + * do fopen('dir1','rb'). NULL is returned if 'dir1' doesn't exists yet, an handle instead + */ + +-#define MKDIR "mkdir" +- + #ifdef WIN32 + #define DIRSEP '\\' + #else +@@ -51,6 +51,13 @@ + #define EXTBUFL 1024*8 + + ++static void mkdirOrLogErr(const char *const path) ++{ ++ if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO)) ++ fprintf(stderr, "mkdir: cannot create directory '%s': %s\n", ++ path, strerror(errno)); ++} ++ + void help() + { + puts("unadf [-lrcsp -v n] dumpname.adf [files-with-path] [-d extractdir]"); +@@ -152,7 +159,6 @@ void extractTree(struct Volume *vol, str + { + struct Entry* entry; + char *buf; +- char sysbuf[200]; + + while(tree) { + entry = (struct Entry*)tree->content; +@@ -162,16 +168,14 @@ void extractTree(struct Volume *vol, str + buf=(char*)malloc(strlen(path)+1+strlen(entry->name)+1); + if (!buf) return; + sprintf(buf,"%s%c%s",path,DIRSEP,entry->name); +- sprintf(sysbuf,"%s %s",MKDIR,buf); + if (!qflag) printf("x - %s%c\n",buf,DIRSEP); ++ if (!pflag) mkdirOrLogErr(buf); + } + else { +- sprintf(sysbuf,"%s %s",MKDIR,entry->name); + if (!qflag) printf("x - %s%c\n",entry->name,DIRSEP); ++ if (!pflag) mkdirOrLogErr(entry->name); + } + +- if (!pflag) system(sysbuf); +- + if (tree->subdir!=NULL) { + if (adfChangeDir(vol,entry->name)==RC_OK) { + if (buf!=NULL) +@@ -301,21 +305,20 @@ void processFile(struct Volume *vol, cha + extractFile(vol, name, path, extbuf, pflag, qflag); + } + else { +- /* the all-in-one string : to call system(), to find the filename, the convert dir sep char ... */ +- bigstr=(char*)malloc(strlen(MKDIR)+1+strlen(path)+1+strlen(name)+1); ++ bigstr=(char*)malloc(strlen(path)+1+strlen(name)+1); + if (!bigstr) { fprintf(stderr,"processFile : malloc"); return; } + + /* to build to extract path */ + if (strlen(path)>0) { +- sprintf(bigstr,"%s %s%c%s",MKDIR,path,DIRSEP,name); +- cdstr = bigstr+strlen(MKDIR)+1+strlen(path)+1; ++ sprintf(bigstr,"%s%c%s",path,DIRSEP,name); ++ cdstr = bigstr+strlen(path)+1; + } + else { +- sprintf(bigstr,"%s %s",MKDIR,name); +- cdstr = bigstr+strlen(MKDIR)+1; ++ sprintf(bigstr,"%s",name); ++ cdstr = bigstr; + } + /* the directory in which the file will be extracted */ +- fullname = bigstr+strlen(MKDIR)+1; ++ fullname = bigstr; + + /* finds the filename, and separates it from the path */ + filename = strrchr(bigstr,'/')+1; +@@ -333,7 +336,7 @@ void processFile(struct Volume *vol, cha + return; + tfile = fopen(fullname,"r"); /* the only portable way to test if the dir exists */ + if (tfile==NULL) { /* does't exist : create it */ +- if (!pflag) system(bigstr); ++ if (!pflag) mkdirOrLogErr(bigstr); + if (!qflag) printf("x - %s%c\n",fullname,DIRSEP); + } + else +@@ -350,7 +353,7 @@ void processFile(struct Volume *vol, cha + return; + tfile = fopen(fullname,"r"); + if (tfile==NULL) { +- if (!pflag) system(bigstr); ++ if (!pflag) mkdirOrLogErr(bigstr); + if (!qflag) printf("x - %s%c\n",fullname,DIRSEP); + } + else diff --git a/app-arch/unadf/files/adflib-0.7.12_separate_comment.patch b/app-arch/unadf/files/unadf-0.7.12_separate_comment.patch similarity index 80% rename from app-arch/unadf/files/adflib-0.7.12_separate_comment.patch rename to app-arch/unadf/files/unadf-0.7.12_separate_comment.patch index ea3a28e..276392f 100644 --- a/app-arch/unadf/files/adflib-0.7.12_separate_comment.patch +++ b/app-arch/unadf/files/unadf-0.7.12_separate_comment.patch @@ -1,14 +1,6 @@ ---- adflib-0.7.12/examples/unadf.c 2006-12-03 17:22:38.000000000 +0100 -+++ adflib-0.7.12-patched/examples/unadf.c 2014-02-23 09:45:29.315626096 +0100 -@@ -50,7 +50,6 @@ - - #define EXTBUFL 1024*8 - -- - void help() - { - puts("unadf [-lrcsp -v n] dumpname.adf [files-with-path] [-d extractdir]"); -@@ -58,6 +57,7 @@ +--- adflib-0.7.12_a/examples/unadf.c 2021-07-09 17:38:47.980770205 +0200 ++++ adflib-0.7.12_b/examples/unadf.c 2021-07-09 17:54:32.548793259 +0200 +@@ -65,6 +65,7 @@ puts(" -r : lists directory tree contents"); puts(" -c : use dircache data (must be used with -l)"); puts(" -s : display entries logical block pointer (must be used with -l)"); @@ -16,7 +8,7 @@ putchar('\n'); puts(" -v n : mount volume #n instead of default #0 volume"); putchar('\n'); -@@ -65,7 +65,8 @@ +@@ -72,7 +73,8 @@ puts(" -d dir : extract to 'dir' directory"); } @@ -26,7 +18,7 @@ { /* do not print the links entries, ADFlib do not support them yet properly */ if (entry->type==ST_LFILE || entry->type==ST_LDIR || entry->type==ST_LSOFT) -@@ -74,12 +75,12 @@ +@@ -81,12 +83,12 @@ if (entry->type==ST_DIR) printf(" "); else @@ -41,7 +33,7 @@ if (strlen(path)>0) printf(" %s/",path); -@@ -89,7 +90,7 @@ +@@ -96,7 +98,7 @@ printf("%s/",entry->name); else printf("%s",entry->name); @@ -50,7 +42,7 @@ printf(", %s",entry->comment); putchar('\n'); -@@ -199,13 +200,14 @@ +@@ -203,13 +205,14 @@ } @@ -67,7 +59,7 @@ if (tree->subdir!=NULL) { entry = (struct Entry*)tree->content; if (strlen(path)>0) { -@@ -215,11 +217,11 @@ +@@ -219,11 +222,11 @@ return; } sprintf(buf,"%s/%s", path, entry->name); @@ -81,7 +73,7 @@ } tree = tree->next; } -@@ -243,7 +245,7 @@ +@@ -247,7 +250,7 @@ printf("???"); break; } @@ -90,7 +82,7 @@ printf(". Volumes = %d\n",dev->nVol); } -@@ -273,7 +275,7 @@ +@@ -277,7 +280,7 @@ if (vol->volName!=NULL) printf(" \"%s\"", vol->volName); @@ -99,7 +91,7 @@ printf(" %s ",isFFS(vol->dosType) ? "FFS" : "OFS"); if (isINTL(vol->dosType)) -@@ -370,12 +372,10 @@ +@@ -373,7 +376,7 @@ int main(int argc, char* argv[]) { int i, j; @@ -107,43 +99,27 @@ + BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag, mflag; struct List* files, *rtfiles; char *devname, *dirname; -- char strbuf[80]; - unsigned char *extbuf; -- int vInd, dInd, fInd, aInd; - BOOL nextArg; - - struct Device *dev; -@@ -389,8 +389,7 @@ + char strbuf[80]; +@@ -392,7 +395,7 @@ exit(0); } - rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = FALSE; -- vInd = dInd = fInd = aInd = -1; + rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = mflag = FALSE; + vInd = dInd = fInd = aInd = -1; xflag = TRUE; dirname = NULL; - devname = NULL; -@@ -430,6 +429,9 @@ +@@ -433,6 +436,9 @@ case 's': sflag = TRUE; break; -+ case 'm': ++ case 'm': + mflag = TRUE; + break; case 'c': cflag = TRUE; break; -@@ -489,8 +491,7 @@ - - dev = adfMountDev( devname,TRUE ); - if (!dev) { -- sprintf(strbuf,"Can't mount the dump device '%s'.\n", devname); -- fprintf(stderr, strbuf); -+ fprintf(stderr,"Can't mount the dump device '%s'.\n", devname); - adfEnvCleanUp(); exit(1); - } - if (!qflag) -@@ -523,13 +524,13 @@ +@@ -526,13 +532,13 @@ if (!rflag) { cell = list = adfGetDirEnt(vol,vol->curDirPtr); while(cell) { diff --git a/app-arch/unadf/files/unadf_separate_comment.patch b/app-arch/unadf/files/unadf_separate_comment.patch deleted file mode 100644 index 83a64b7..0000000 --- a/app-arch/unadf/files/unadf_separate_comment.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -ur unadf-0.7.11a.orig/Demo/unadf.c unadf-0.7.11a/Demo/unadf.c ---- unadf-0.7.11a.orig/Demo/unadf.c 2013-05-12 17:59:51.214905177 +0200 -+++ unadf-0.7.11a/Demo/unadf.c 2013-05-12 17:50:06.843420519 +0200 -@@ -58,6 +58,7 @@ - puts(" -r : lists directory tree contents"); - puts(" -c : use dircache data (must be used with -l)"); - puts(" -s : display entries logical block pointer (must be used with -l)"); -+ puts(" -m : display file comments, if exists (must be used with -l)"); - putchar('\n'); - puts(" -v n : mount volume #n instead of default #0 volume"); - putchar('\n'); -@@ -65,7 +66,8 @@ - puts(" -d dir : extract to 'dir' directory"); - } - --void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect) -+void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect, -+ BOOL comment) - { - /* do not print the links entries, ADFlib do not support them yet properly */ - if (entry->type==ST_LFILE || entry->type==ST_LDIR || entry->type==ST_LSOFT) -@@ -89,7 +91,7 @@ - printf("%s/",entry->name); - else - printf("%s",entry->name); -- if (entry->comment!=NULL && strlen(entry->comment)>0) -+ if (comment && entry->comment!=NULL && strlen(entry->comment)>0) - printf(", %s",entry->comment); - putchar('\n'); - -@@ -199,13 +201,14 @@ - } - - --void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect) -+void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect, -+ BOOL comment) - { - char *buf; - struct Entry* entry; - - while(tree) { -- printEnt(vol, tree->content, path, sect); -+ printEnt(vol, tree->content, path, sect, comment); - if (tree->subdir!=NULL) { - entry = (struct Entry*)tree->content; - if (strlen(path)>0) { -@@ -215,11 +218,11 @@ - return; - } - sprintf(buf,"%s/%s", path, entry->name); -- printTree(vol, tree->subdir, buf, sect); -+ printTree(vol, tree->subdir, buf, sect, comment); - free(buf); - } - else -- printTree(vol, tree->subdir, entry->name, sect); -+ printTree(vol, tree->subdir, entry->name, sect, comment); - } - tree = tree->next; - } -@@ -370,12 +373,10 @@ - int main(int argc, char* argv[]) - { - int i, j; -- BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag; -+ BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag, mflag; - struct List* files, *rtfiles; - char *devname, *dirname; -- char strbuf[80]; - unsigned char *extbuf; -- int vInd, dInd, fInd, aInd; - BOOL nextArg; - - struct Device *dev; -@@ -389,8 +390,7 @@ - exit(0); - } - -- rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = FALSE; -- vInd = dInd = fInd = aInd = -1; -+ rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = mflag = FALSE; - xflag = TRUE; - dirname = NULL; - devname = NULL; -@@ -430,6 +430,9 @@ - case 's': - sflag = TRUE; - break; -+ case 'm': -+ mflag = TRUE; -+ break; - case 'c': - cflag = TRUE; - break; -@@ -522,13 +525,13 @@ - if (!rflag) { - cell = list = adfGetDirEnt(vol,vol->curDirPtr); - while(cell) { -- printEnt(vol,cell->content,"", sflag); -+ printEnt(vol,cell->content,"", sflag, mflag); - cell = cell->next; - } - adfFreeDirList(list); - } else { - cell = list = adfGetRDirEnt(vol,vol->curDirPtr,TRUE); -- printTree(vol,cell,"", sflag); -+ printTree(vol,cell,"", sflag, mflag); - adfFreeDirList(list); - } - }else if (xflag) { -diff -ur unadf-0.7.11a.orig/Demo/unadf.usage unadf-0.7.11a/Demo/unadf.usage ---- unadf-0.7.11a.orig/Demo/unadf.usage 2006-12-03 15:27:00.000000000 +0100 -+++ unadf-0.7.11a/Demo/unadf.usage 2013-05-12 17:40:23.116966854 +0200 -@@ -3,6 +3,7 @@ - -r : lists directory tree contents - -c : use dircache data (must be used with -l) - -s : display entries logical block pointer (must be used with -l) -+ -m : display file comments, if exists (must be used with -l) - - -v n : mount volume #n instead of default #0 volume - diff --git a/app-arch/unadf/unadf-0.7.11a.ebuild b/app-arch/unadf/unadf-0.7.11a.ebuild deleted file mode 100644 index 0d65194..0000000 --- a/app-arch/unadf/unadf-0.7.11a.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unadf/unadf-0.7.9b.ebuild,v 1.11 2010/01/01 19:41:00 fauli Exp $ - -inherit eutils - -DESCRIPTION="Extract files from Amiga adf disk images" -SRC_URI="http://ftp.de.debian.org/debian/pool/main/u/unadf/unadf_0.7.11a.orig.tar.gz" -HOMEPAGE="http://packages.debian.org/unstable/utils/unadf" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="" -DEPEND="app-arch/unzip - x11-misc/makedepend" -RDEPEND="" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/source-code-fixes - epatch "${FILESDIR}"/64-bit-fixes - epatch "${FILESDIR}"/add-hardening-flags-in-compiler-options - epatch "${FILESDIR}"/unadf_separate_comment.patch -} - -src_compile() { - echo "** ${S} **" - cd "${S}" && make || die "make failed" -} - -src_install() { - dobin Demo/unadf - dodoc README CHANGES Faq/adf_info.txt - docinto Docs - dodoc Docs/* - docinto Faq - dodoc Faq/* - docinto Faq/image - dodoc Faq/image/* -} diff --git a/app-arch/unadf/unadf-0.7.12-r10.ebuild b/app-arch/unadf/unadf-0.7.12-r10.ebuild index 6764cda..a8f3957 100644 --- a/app-arch/unadf/unadf-0.7.12-r10.ebuild +++ b/app-arch/unadf/unadf-0.7.12-r10.ebuild @@ -1,32 +1,29 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unadf/unadf-0.7.12.ebuild,v 1.1 2013/12/29 00:26:30 robbat2 Exp $ -EAPI=5 +EAPI=6 -inherit autotools eutils +inherit autotools MY_PN="adflib" DESCRIPTION="Extract files from Amiga adf disk images" -SRC_URI="http://lclevy.free.fr/${MY_PN}/${MY_PN}-${PV}.tar.bz2" HOMEPAGE="http://lclevy.free.fr/adflib/" +SRC_URI="http://lclevy.free.fr/${MY_PN}/${MY_PN}-${PV}.tar.bz2" + LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~hppa ~ppc ~ppc-macos ~sparc-solaris ~x86 ~x86-interix ~x86-linux ~x86-solaris" +KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" IUSE="static-libs" -DEPEND="" -RDEPEND="" S="${WORKDIR}/${MY_PN}-${PV}" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/adflib-0.7.12_separate_comment.patch -} +PATCHES=( + "${FILESDIR}/${PN}-0.7.12-CVE-2016-1243_CVE-2016-1244.patch" + "${FILESDIR}/${PN}-0.7.12_separate_comment.patch" +) src_prepare() { + default eautoreconf } @@ -36,5 +33,5 @@ src_configure() { src_install() { default - prune_libtool_files + find "${D}" -name '*.la' -delete || die }