diff --git a/shells/44bsd-csh/Makefile b/shells/44bsd-csh/Makefile index 51dbcc217d66..b7de07bd02f3 100644 --- a/shells/44bsd-csh/Makefile +++ b/shells/44bsd-csh/Makefile @@ -1,36 +1,36 @@ PORTNAME= 44bsd-csh PORTVERSION= 20001106 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= shells MASTER_SITES= LOCAL/cy MAINTAINER= cy@FreeBSD.org COMMENT= The traditional 4.4BSD /bin/csh C-shell EXTRACT_DEPENDS= rcs:devel/rcs57 USES= sbrk tar:bzip2 LDFLAGS= -Wl,--allow-multiple-definition NO_WRKSUBDIR= yes PORTDOCS= paper.ascii.gz OPTIONS_DEFINE= DOCS post-extract: cd ${WRKSRC} ; co RCS/*,v; chmod u+w * cd ${WRKSRC}/USD.doc ; co RCS/*,v post-build: cd ${WRKSRC}/USD.doc ; ${MAKE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/csh ${STAGEDIR}${PREFIX}/bin/44bsd-csh ${INSTALL_MAN} ${WRKSRC}/csh.1 ${STAGEDIR}${PREFIX}/share/man/man1/44bsd-csh.1 @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/USD.doc/paper.ascii.gz ${STAGEDIR}${DOCSDIR} tarup: cd ${WRKSRC} ; rm * USD.doc/* cd ${WRKSRC} ; ${TAR} cvyf /tmp/${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} .include diff --git a/shells/44bsd-csh/files/patch-alloc.c b/shells/44bsd-csh/files/patch-alloc.c new file mode 100644 index 000000000000..67a61d3183b1 --- /dev/null +++ b/shells/44bsd-csh/files/patch-alloc.c @@ -0,0 +1,64 @@ +--- alloc.c.orig 2025-02-18 15:59:35.263097000 -0800 ++++ alloc.c 2025-02-18 16:02:58.402654000 -0800 +@@ -55,61 +55,6 @@ + char *memtop = NULL; /* PWP: top of current memory */ + char *membot = NULL; /* PWP: bottom of allocatable memory */ + +-ptr_t +-Malloc(n) +- size_t n; +-{ +- ptr_t ptr; +- +- if (membot == NULL) +- memtop = membot = sbrk(0); +- if ((ptr = malloc(n)) == (ptr_t) 0) { +- child++; +- stderror(ERR_NOMEM); +- } +- return (ptr); +-} +- +-ptr_t +-Realloc(p, n) +- ptr_t p; +- size_t n; +-{ +- ptr_t ptr; +- +- if (membot == NULL) +- memtop = membot = sbrk(0); +- if ((ptr = realloc(p, n)) == (ptr_t) 0) { +- child++; +- stderror(ERR_NOMEM); +- } +- return (ptr); +-} +- +-ptr_t +-Calloc(s, n) +- size_t s, n; +-{ +- ptr_t ptr; +- +- if (membot == NULL) +- memtop = membot = sbrk(0); +- if ((ptr = calloc(s, n)) == (ptr_t) 0) { +- child++; +- stderror(ERR_NOMEM); +- } +- +- return (ptr); +-} +- +-void +-Free(p) +- ptr_t p; +-{ +- if (p) +- free(p); +-} +- + /* + * mstats - print out statistics about malloc + * diff --git a/shells/44bsd-csh/files/patch-csh.h b/shells/44bsd-csh/files/patch-csh.h new file mode 100644 index 000000000000..e69698ed338a --- /dev/null +++ b/shells/44bsd-csh/files/patch-csh.h @@ -0,0 +1,17 @@ +--- csh.h.orig 2025-02-18 15:59:35.265140000 -0800 ++++ csh.h 2025-02-18 16:04:08.969313000 -0800 +@@ -86,10 +86,10 @@ + #include "char.h" + #include "errnum.h" + +-#define xmalloc(i) Malloc(i) +-#define xrealloc(p, i) Realloc(p, i) +-#define xcalloc(n, s) Calloc(n, s) +-#define xfree(p) Free(p) ++#define xmalloc(i) malloc(i) ++#define xrealloc(p, i) realloc(p, i) ++#define xcalloc(n, s) calloc(n, s) ++#define xfree(p) free(p) + + #include + FILE *cshin, *cshout, *csherr;