diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2003-11-22 03:26:19 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2003-11-22 03:26:19 +0000 |
commit | 4af439aaf984c71ebcb176706551323a3c71985a (patch) | |
tree | 524004b02cc409fee8f3f292190197a983964b86 | |
parent | misc/brs stopped compiling on -CURRENT due to an obsolete header. Here's a fi... (diff) |
- Fix build on 5.x
Approved by: adamw (mentor)
Notes
Notes:
svn path=/head/; revision=94695
-rw-r--r-- | astro/luna/Makefile | 9 | ||||
-rw-r--r-- | astro/luna/files/patch-iprintf-iprintf.c | 56 | ||||
-rw-r--r-- | astro/luna/files/patch-iprintf-isprintf.c | 64 |
3 files changed, 124 insertions, 5 deletions
diff --git a/astro/luna/Makefile b/astro/luna/Makefile index 6d7aac25770e..cfae96352434 100644 --- a/astro/luna/Makefile +++ b/astro/luna/Makefile @@ -24,10 +24,9 @@ EXTRACT_AFTER_ARGS= # empty NO_WRKSUBDIR= yes MAKEFILE= makefile -.include <bsd.port.pre.mk> +USE_REINPLACE= yes -.if ${OSVERSION} >= 501000 -BROKEN= "Does not compile" -.endif +post-patch: + @${REINPLACE_CMD} -e 's|varargs.h|stdarg.h|' ${WRKSRC}/iprintf/idoprnt.c -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/astro/luna/files/patch-iprintf-iprintf.c b/astro/luna/files/patch-iprintf-iprintf.c new file mode 100644 index 000000000000..fa449c78759d --- /dev/null +++ b/astro/luna/files/patch-iprintf-iprintf.c @@ -0,0 +1,56 @@ +--- iprintf/iprintf.c.orig Thu Apr 23 16:23:14 1992 ++++ iprintf/iprintf.c Sat Nov 22 04:11:33 2003 +@@ -13,7 +13,7 @@ + #if defined(ANSI) + # include <stdarg.h> + #elif defined(UNIX) +-# include <varargs.h> ++# include <stdarg.h> + #else + Error : varargs.h or stdarg.h is required to compile this. + #endif /* ANSI or UNIX */ +@@ -52,44 +52,21 @@ + } + + +-#if defined(ANSI) + int + iprintf(char *format, ...) +-#elif defined(UNIX) +-int +-iprintf(format, va_alist) +- char *format; +- va_dcl +-#endif /* ANSI or UNIX */ + { + va_list args; + +-#if defined(ANSI) + va_start (args, format); +-#elif defined(UNIX) +- va_start(args); +-#endif /* ANSI or UNIX */ + return (ivprintf(format, args)); + } + + +-#if defined(ANSI) + int + ifprintf(FILE *stream, char *format, ...) +-#elif defined(UNIX) +-int +-ifprintf(stream, format, va_alist) +- FILE *stream; +- char *format; +- va_dcl +-#endif /* UNIX */ + { + va_list args; + +-#if defined(ANSI) + va_start (args, format); +-#elif defined(UNIX) +- va_start(args); +-#endif /* ANSI or UNIX */ + return (ivfprintf(stream, format, args)); + } diff --git a/astro/luna/files/patch-iprintf-isprintf.c b/astro/luna/files/patch-iprintf-isprintf.c new file mode 100644 index 000000000000..e1b3835574fb --- /dev/null +++ b/astro/luna/files/patch-iprintf-isprintf.c @@ -0,0 +1,64 @@ +--- iprintf/isprintf.c.orig Thu Apr 23 16:23:16 1992 ++++ iprintf/isprintf.c Sat Nov 22 04:13:54 2003 +@@ -8,13 +8,7 @@ + + + #include <stdio.h> +-#if defined(ANSI) + # include <stdarg.h> +-#elif defined(UNIX) +-# include <varargs.h> +-#else +- Error : varargs.h or stdarg.h is required to compile this. +-#endif /* ANSI or UNIX */ + + + #if defined(ANSI) +@@ -49,47 +43,22 @@ + } + + +-#if defined(ANSI) + int + isprintf(char *buf, char *format, ...) +-#elif defined(UNIX) +-int +-isprintf(buf, format, va_alist) +- char *buf; +- char *format; +- va_dcl +-#endif /* ANSI or UNIX */ + { + int n; + va_list args; + +-#if defined(ANSI) + va_start (args, format); +-#elif defined(UNIX) +- va_start(args); +-#endif /* ANSI or UNIX */ + buf[n = idoprnt(i_sputn, buf, format, args)] = '\0'; + return (n); + } + + +-#if defined(ANSI) + int + ivsprintf(char *buf, char *format, va_list args) +-#elif defined(UNIX) +-int +-ivsprintf(buf, format, va_alist) +- char *buf; +- char *format; +- va_dcl +-#endif /* ANSI or UNIX */ + { + int n; +-#if defined(UNIX) +- va_list args; +- +- va_start(args); +-#endif /* UNIX */ + buf[n = idoprnt(i_sputn, buf, format, args)] = '\0'; + return (n); + } |