From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 21:54:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84F5B80D; Sun, 12 Oct 2014 21:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 717C0DC0; Sun, 12 Oct 2014 21:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CLsuDR001578; Sun, 12 Oct 2014 21:54:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CLsu76001577; Sun, 12 Oct 2014 21:54:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410122154.s9CLsu76001577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 12 Oct 2014 21:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273011 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 21:54:56 -0000 Author: ngie Date: Sun Oct 12 21:54:55 2014 New Revision: 273011 URL: https://svnweb.freebsd.org/changeset/base/273011 Log: Fix compilation errors with missing wide-type headers and fix compilation warnings with -Wformat In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Oct 12 21:53:13 2014 (r273010) +++ head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Oct 12 21:54:55 2014 (r273011) @@ -34,6 +34,10 @@ #include #include +#if defined(__FreeBSD__) +#include +#include +#endif /* Don't sort these! */ #include "utils.h" @@ -50,6 +54,7 @@ static char *regchar(int); void regprint(regex_t *r, FILE *d) { +#if defined(__NetBSD__) struct re_guts *g = r->re_g; int c; int last; @@ -111,6 +116,7 @@ regprint(regex_t *r, FILE *d) } fprintf(d, "\n"); } +#endif } /* @@ -171,6 +177,7 @@ s_print(struct re_guts *g, FILE *d) break; case OANYOF: fprintf(d, "[(%ld)", (long)opnd); +#if defined(__NetBSD__) cs = &g->sets[opnd]; last = -1; for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */ @@ -187,6 +194,7 @@ s_print(struct re_guts *g, FILE *d) last = -1; } } +#endif fprintf(d, "]"); break; case OBACK_: @@ -242,7 +250,11 @@ s_print(struct re_guts *g, FILE *d) fprintf(d, ">"); break; default: +#if defined(__FreeBSD__) + fprintf(d, "!%ld(%ld)!", OP(*s), opnd); +#else fprintf(d, "!%d(%d)!", OP(*s), opnd); +#endif break; } if (!done)