diff options
author | hans <hans> | 2012-03-02 12:11:01 +0000 |
---|---|---|
committer | hans <hans> | 2012-03-02 12:11:01 +0000 |
commit | e567138775e4b84e5dbd73920b0f4172595c2070 (patch) | |
tree | a4691326b7a65807ef36284ef887f2c496d2455f | |
parent | 73163827b818951d8c31fd9ae9c9c6ee9f64bc68 (diff) | |
download | pkgsrc-e567138775e4b84e5dbd73920b0f4172595c2070.tar.gz |
Fix build on SunOS.
- use dirent.h instead of sys/dir.h
- use FILENAME_MAX instead of NAME_MAX
- use uintXX_t instead of u_intXX_t
-rw-r--r-- | textproc/helpdeco/distinfo | 6 | ||||
-rw-r--r-- | textproc/helpdeco/patches/patch-compat.c | 13 | ||||
-rw-r--r-- | textproc/helpdeco/patches/patch-helpdeco.c | 42 | ||||
-rw-r--r-- | textproc/helpdeco/patches/patch-splitmrp.c | 15 | ||||
-rw-r--r-- | textproc/helpdeco/patches/patch-zapres.c | 29 |
5 files changed, 104 insertions, 1 deletions
diff --git a/textproc/helpdeco/distinfo b/textproc/helpdeco/distinfo index 96c318c95e1..f2bd405db63 100644 --- a/textproc/helpdeco/distinfo +++ b/textproc/helpdeco/distinfo @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.6 2005/12/04 15:50:13 ben Exp $ +$NetBSD: distinfo,v 1.7 2012/03/02 12:11:01 hans Exp $ SHA1 (helpdeco-2.1.3.tar.gz) = 7e046a86ac16918ac49f9cd4597f9048a36541a4 RMD160 (helpdeco-2.1.3.tar.gz) = 05fc72de7859ab6d3b787669099853b3a45a8f6c Size (helpdeco-2.1.3.tar.gz) = 80443 bytes SHA1 (patch-aa) = 0cf435603d3fb8176085f48a725824c9516b51e8 +SHA1 (patch-compat.c) = fd52d908c0ab0b8dc9f1b21fc3339918161d9587 +SHA1 (patch-helpdeco.c) = 39bb17f42d6007c69597092076a9911da9a870d2 +SHA1 (patch-splitmrp.c) = 52fd49515c65c447275bb7590561584678d20ff5 +SHA1 (patch-zapres.c) = c9200ef56a6da3bc67a1734302c7b44e0a41a667 diff --git a/textproc/helpdeco/patches/patch-compat.c b/textproc/helpdeco/patches/patch-compat.c new file mode 100644 index 00000000000..82a53e00996 --- /dev/null +++ b/textproc/helpdeco/patches/patch-compat.c @@ -0,0 +1,13 @@ +$NetBSD: patch-compat.c,v 1.1 2012/03/02 12:11:01 hans Exp $ + +--- compat.c.orig 2005-11-17 12:40:02.000000000 +0100 ++++ compat.c 2012-03-02 13:01:45.907359209 +0100 +@@ -65,7 +65,7 @@ void _splitpath( + if (t != NULL && strchr(t, '/') == NULL) { + *t = '\000'; + } +- strncpy(file, strdup(basename(p)), NAME_MAX); ++ strncpy(file, strdup(basename(p)), FILENAME_MAX); + free(p); + } + diff --git a/textproc/helpdeco/patches/patch-helpdeco.c b/textproc/helpdeco/patches/patch-helpdeco.c new file mode 100644 index 00000000000..23fdd9e1f12 --- /dev/null +++ b/textproc/helpdeco/patches/patch-helpdeco.c @@ -0,0 +1,42 @@ +$NetBSD: patch-helpdeco.c,v 1.1 2012/03/02 12:11:01 hans Exp $ + +--- helpdeco.c.orig 2005-11-18 12:08:36.000000000 +0100 ++++ helpdeco.c 2012-03-02 13:03:23.013470516 +0100 +@@ -32,8 +32,8 @@ http://www.gnu.org + */ + + FILEREF *external; +-char HelpFileName[NAME_MAX]; +-char name[NAME_MAX]; ++char HelpFileName[FILENAME_MAX]; ++char name[FILENAME_MAX]; + char ext[_MAX_EXT]; + FILE *AnnoFile; + HASHREC *hashrec; +@@ -74,7 +74,7 @@ int NextKeywordRec,KeywordRecs; + KEYWORDREC *KeywordRec; + TOPICOFFSET NextKeywordOffset; + char helpcomp[13]; +-char HelpFileTitle[NAME_MAX]; ++char HelpFileTitle[FILENAME_MAX]; + char TopicTitle[256]; + char *Phrases; + unsigned int *PhraseOffsets; +@@ -607,7 +607,7 @@ void SysLoad(FILE *HelpFile) /* gets glo + /* compares filename a[.HLP] and filename b[.HLP], returning 0 if match */ + int filenamecmp(const char *a,const char *b) + { +- char aname[NAME_MAX],bname[NAME_MAX]; ++ char aname[FILENAME_MAX],bname[FILENAME_MAX]; + char aext[_MAX_EXT],bext[_MAX_EXT]; + int i; + +@@ -5597,7 +5597,7 @@ BOOL HelpDeCompile(FILE *HelpFile,char * + + int main(int argc,char *argv[]) + { +- char AnnoFileName[NAME_MAX]; ++ char AnnoFileName[FILENAME_MAX]; + char drive[_MAX_DRIVE]; + char dir[PATH_MAX]; + FILE *f; diff --git a/textproc/helpdeco/patches/patch-splitmrp.c b/textproc/helpdeco/patches/patch-splitmrp.c new file mode 100644 index 00000000000..f36ca104385 --- /dev/null +++ b/textproc/helpdeco/patches/patch-splitmrp.c @@ -0,0 +1,15 @@ +--- splitmrb.c.orig 2005-11-17 12:19:38.000000000 +0100 ++++ splitmrb.c 2012-03-02 13:05:31.593391213 +0100 +@@ -237,9 +237,9 @@ int GetPackedByte(FILE *f) // RulLen dec + #endif + typedef struct + { +- u_int8_t c1,c2,c3; +- u_int16_t x,y,w,h; +- u_int32_t hash; ++ uint8_t c1,c2,c3; ++ uint16_t x,y,w,h; ++ uint32_t hash; + } HOTSPOT + #if defined(__GNUC__) && __GNUC__ < 3 + __attribute__((packed)) diff --git a/textproc/helpdeco/patches/patch-zapres.c b/textproc/helpdeco/patches/patch-zapres.c new file mode 100644 index 00000000000..f719aa02217 --- /dev/null +++ b/textproc/helpdeco/patches/patch-zapres.c @@ -0,0 +1,29 @@ +$NetBSD: patch-zapres.c,v 1.1 2012/03/02 12:11:01 hans Exp $ + +--- zapres.c.orig 2005-11-17 11:56:32.000000000 +0100 ++++ zapres.c 2012-03-02 13:00:45.979797155 +0100 +@@ -36,13 +36,13 @@ will not rescale the image and MRBC can + #include <stdio.h> + #include <stdlib.h> + #include <sys/types.h> +-#include <sys/dir.h> ++#include <dirent.h> + #include <string.h> + #include "compat.h" + + int backup(FILE *f,char *oldname) + { +- char drive[_MAX_DRIVE],dir[PATH_MAX],fname[NAME_MAX],ext[_MAX_EXT]; ++ char drive[_MAX_DRIVE],dir[PATH_MAX],fname[FILENAME_MAX],ext[_MAX_EXT]; + char path[PATH_MAX]; + char buffer[512]; + long pos,size; +@@ -92,7 +92,7 @@ int main(int argc,char *argv[]) + FILE *f; + int b,n,i,k,bb; + long w,h,zero,pos; +- char drive[_MAX_DRIVE],dir[PATH_MAX],fname[NAME_MAX],ext[_MAX_EXT]; ++ char drive[_MAX_DRIVE],dir[PATH_MAX],fname[FILENAME_MAX],ext[_MAX_EXT]; + char path[PATH_MAX]; + + for(b=i=1;i<argc;i++) |