1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

The useless wctype.h in FreeBSD 4 confuses streamripper's configure

script.  Patch around the problem.
This commit is contained in:
Trevor Johnson 2005-01-19 07:36:45 +00:00
parent 1197ed7168
commit a4a46d195f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=126777
2 changed files with 34 additions and 7 deletions

View File

@ -24,10 +24,4 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
PLIST_FILES= bin/streamripper
MAN1= streamripper.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= "Does not compile on FreeBSD < 5.x"
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -0,0 +1,33 @@
Argh, FreeBSD 4.X has a wctype.h header that does nothing.
--- lib/util.c.orig Sat Nov 13 17:41:09 2004
+++ lib/util.c Wed Jan 19 07:01:41 2005
@@ -28,9 +28,7 @@
#if defined HAVE_WCHAR_H
#include <wchar.h>
#endif
-#if defined HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
+#include <ctype.h>
#endif
#include <locale.h>
#include <time.h>
@@ -464,7 +462,7 @@ strip_invalid_chars_testing(char *str)
/* Replace illegals to legal */
for (wstrp = w_in; *wstrp; wstrp++) {
- if ((wcschr(w_invalid, *wstrp) == NULL) && (!iswcntrl(*wstrp)))
+ if ((wcschr(w_invalid, *wstrp) == NULL) && (!iscntrl(*wstrp)))
continue;
*wstrp = replacement;
}
@@ -543,7 +541,7 @@ strip_invalid_chars_stable(char *str)
/* Replace illegals to legal */
for (wstrp = w_in; *wstrp; wstrp++) {
- if ((wcschr(w_invalid, *wstrp) == NULL) && (!iswcntrl(*wstrp)))
+ if ((wcschr(w_invalid, *wstrp) == NULL) && (!iscntrl(*wstrp)))
continue;
*wstrp = replacement;
}