Module Name: src
Committed By: christos
Date: Wed Aug 17 09:53:54 UTC 2011
Modified Files:
src/lib/libc: Makefile
src/lib/libc/resolv: res_comp.c
src/lib/libc/stdio: vfwprintf.c vswprintf.c
Log Message:
fix the rest of libc mi gcc-4.5 hacks. portmasters should fix the md ones.
To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/lib/libc/Makefile
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/resolv/res_comp.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/stdio/vfwprintf.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdio/vswprintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/Makefile
diff -u src/lib/libc/Makefile:1.147 src/lib/libc/Makefile:1.148
--- src/lib/libc/Makefile:1.147 Mon Jun 20 22:32:55 2011
+++ src/lib/libc/Makefile Wed Aug 17 05:53:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.147 2011/06/21 02:32:55 mrg Exp $
+# $NetBSD: Makefile,v 1.148 2011/08/17 09:53:53 christos Exp $
# @(#)Makefile 8.2 (Berkeley) 2/3/94
#
# All library objects contain sccsid strings by default; they may be
@@ -146,11 +146,3 @@
# force the dynamic linker to initialize libc first
SHLIB_SHFLAGS+= -Wl,-z,initfirst
-
-# XXX
-.if ${HAVE_GCC} >= 45
-COPTS.res_comp.c+= -Wno-cast-qual
-COPTS.vfwprintf.c+= -Wno-cast-qual
-COPTS.vfprintf.c+= -Wno-cast-qual
-COPTS.vswprintf.c+= -Wno-cast-qual
-.endif
Index: src/lib/libc/resolv/res_comp.c
diff -u src/lib/libc/resolv/res_comp.c:1.10 src/lib/libc/resolv/res_comp.c:1.11
--- src/lib/libc/resolv/res_comp.c:1.10 Sun Apr 12 13:07:17 2009
+++ src/lib/libc/resolv/res_comp.c Wed Aug 17 05:53:53 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: res_comp.c,v 1.10 2009/04/12 17:07:17 christos Exp $ */
+/* $NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -75,7 +75,7 @@
static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "Id: res_comp.c,v 1.5 2005/07/28 06:51:50 marka Exp";
#else
-__RCSID("$NetBSD: res_comp.c,v 1.10 2009/04/12 17:07:17 christos Exp $");
+__RCSID("$NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -135,8 +135,8 @@
u_char **dnptrs, u_char **lastdnptr)
{
return (ns_name_compress(src, dst, (size_t)dstsiz,
- (const u_char **)dnptrs,
- (const u_char **)lastdnptr));
+ (void *)dnptrs,
+ (void *)lastdnptr));
}
/*%
Index: src/lib/libc/stdio/vfwprintf.c
diff -u src/lib/libc/stdio/vfwprintf.c:1.23 src/lib/libc/stdio/vfwprintf.c:1.24
--- src/lib/libc/stdio/vfwprintf.c:1.23 Thu Dec 16 12:42:27 2010
+++ src/lib/libc/stdio/vfwprintf.c Wed Aug 17 05:53:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vfwprintf.c,v 1.23 2010/12/16 17:42:27 wiz Exp $ */
+/* $NetBSD: vfwprintf.c,v 1.24 2011/08/17 09:53:54 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.27 2007/01/09 00:28:08 imp Exp $");
#else
-__RCSID("$NetBSD: vfwprintf.c,v 1.23 2010/12/16 17:42:27 wiz Exp $");
+__RCSID("$NetBSD: vfwprintf.c,v 1.24 2011/08/17 09:53:54 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -494,7 +494,7 @@
if (prec < 0) {
p = wcsarg;
mbs = initial;
- nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs);
+ nbytes = wcsrtombs(NULL, (void *)&p, 0, &mbs);
if (nbytes == (size_t)-1)
return (NULL);
} else {
@@ -524,7 +524,7 @@
/* Fill the output buffer. */
p = wcsarg;
mbs = initial;
- if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p,
+ if ((nbytes = wcsrtombs(convbuf, (void *)&p,
nbytes, &mbs)) == (size_t)-1) {
free(convbuf);
return (NULL);
Index: src/lib/libc/stdio/vswprintf.c
diff -u src/lib/libc/stdio/vswprintf.c:1.1 src/lib/libc/stdio/vswprintf.c:1.2
--- src/lib/libc/stdio/vswprintf.c:1.1 Sat May 14 19:51:02 2005
+++ src/lib/libc/stdio/vswprintf.c Wed Aug 17 05:53:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vswprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $ */
+/* $NetBSD: vswprintf.c,v 1.2 2011/08/17 09:53:54 christos Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <[email protected]>
@@ -32,7 +32,7 @@
#if 0
__FBSDID("$FreeBSD: src/lib/libc/stdio/vswprintf.c,v 1.6 2005/02/21 19:41:44 fjoe Exp $");
#else
-__RCSID("$NetBSD: vswprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $");
+__RCSID("$NetBSD: vswprintf.c,v 1.2 2011/08/17 09:53:54 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -84,7 +84,7 @@
* fputwc() did in __vfwprintf().
*/
mbs = initial;
- nwc = mbsrtowcs(s, (const char **)&mbp, n, &mbs);
+ nwc = mbsrtowcs(s, (void *)&mbp, n, &mbs);
free(f._bf._base);
if (nwc == (size_t)-1) {
errno = EILSEQ;