From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 4 05:00:13 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A81E1065686 for ; Sat, 4 Oct 2008 05:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 35F968FC14 for ; Sat, 4 Oct 2008 05:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9450DwP054652 for ; Sat, 4 Oct 2008 05:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9450DbQ054651; Sat, 4 Oct 2008 05:00:13 GMT (envelope-from gnats) Resent-Date: Sat, 4 Oct 2008 05:00:13 GMT Resent-Message-Id: <200810040500.m9450DbQ054651@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rowan Crowe Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C962E1065697 for ; Sat, 4 Oct 2008 04:59:22 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B71078FC12 for ; Sat, 4 Oct 2008 04:59:22 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m944xMAS061970 for ; Sat, 4 Oct 2008 04:59:22 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id m944xMRv061969; Sat, 4 Oct 2008 04:59:22 GMT (envelope-from nobody) Message-Id: <200810040459.m944xMRv061969@www.freebsd.org> Date: Sat, 4 Oct 2008 04:59:22 GMT From: Rowan Crowe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/127844: Example code skeleton_capture_n.c in meteor(4) manpage does not compile. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 05:00:13 -0000 >Number: 127844 >Category: misc >Synopsis: Example code skeleton_capture_n.c in meteor(4) manpage does not compile. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 04 05:00:12 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Rowan Crowe >Release: 7.0-R >Organization: Individual >Environment: N/A >Description: The meteor(4) man page includes 3 code examples for the 3 different modes of capture. The first two are complete and compile without any problems, but the third throws errors about undeclared variables. I presume there is a line or two that was not correctly copied and pasted from the original source when preparing the man page. Here's the output of 'gcc skeleton_capture_n.c' In file included from skeleton_capture_n.c:5: /usr/include/machine/ioctl_meteor.h:35:2: warning: #warning Include dev/bktr/ioctl_meteor.h instead of this header. skeleton_capture_n.c: In function 'usr2_catcher': skeleton_capture_n.c:23: error: 'sig_cnt' undeclared (first use in this function) skeleton_capture_n.c:23: error: (Each undeclared identifier is reported only once skeleton_capture_n.c:23: error: for each function it appears in.) skeleton_capture_n.c:31: error: expected expression before ')' token skeleton_capture_n.c: In function 'main': skeleton_capture_n.c:51: error: 'i' undeclared (first use in this function) skeleton_capture_n.c:52: warning: incompatible implicit declaration of built-in function 'printf' skeleton_capture_n.c:53: warning: incompatible implicit declaration of built-in function 'exit' skeleton_capture_n.c:55: warning: incompatible implicit declaration of built-in function 'printf' skeleton_capture_n.c:59: error: expected expression before ';' token skeleton_capture_n.c:66: warning: incompatible implicit declaration of built-in function 'exit' skeleton_capture_n.c:69: error: 'c' undeclared (first use in this function) skeleton_capture_n.c:73: warning: incompatible implicit declaration of built-in function 'exit' skeleton_capture_n.c:80: warning: incompatible implicit declaration of built-in function 'exit' skeleton_capture_n.c:91: error: 'y' undeclared (first use in this function) skeleton_capture_n.c:96: error: 'struct meteor_capframe' has no member named 'signal' skeleton_capture_n.c:103: warning: incompatible implicit declaration of built-in function 'exit' skeleton_capture_n.c:113: warning: incompatible implicit declaration of built-in function 'exit' >How-To-Repeat: Copy and paste the source from the section " 3. Memory mapped, multi-frame ring buffer synchronize capture." on the meteor(4) man page to a file; attempt to compile it. >Fix: Find the missing source lines. :) >Release-Note: >Audit-Trail: >Unformatted: