From owner-freebsd-hackers Sun Mar 3 7:19:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from ip68-14-62-49.no.no.cox.net (ip68-14-62-49.no.no.cox.net [68.14.62.49]) by hub.freebsd.org (Postfix) with ESMTP id 8468B37B402 for ; Sun, 3 Mar 2002 07:19:39 -0800 (PST) Received: (from conrads@localhost) by ip68-14-62-49.no.no.cox.net (8.11.6/8.11.6) id g23FJd926309 for freebsd-hackers@freebsd.org; Sun, 3 Mar 2002 09:19:39 -0600 (CST) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Sun, 03 Mar 2002 09:19:38 -0600 (CST) Reply-To: conrads@cox.net Organization: A Rag-Tag Band of Drug-crazed Hippies From: Conrad Sabatier To: freebsd-hackers@freebsd.org Subject: A few questions about a few includes Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Am I just completely stupid, or do we have a few things that could use a little cleaning up in /usr/include as well as in the man page for kvm_*? System: FreeBSD 4.5-STABLE 1) The man page for the kvm_* functions lists the following #include dependencies: #include #include #include However, kvm.h contains some declarations that also require and (namely, struct kinfo_proc and struct proc). Otherwise, one might encounter warnings/errors re: incomplete types. 2) If compiling with the -pedantic switch, one might see something like this: In file included from main.c:151: /usr/include/sys/proc.h:108: warning: ANSI C forbids zero-size array `ar_args' In : /* * pargs, used to hold a copy of the command line, if it had a sane * length */ struct pargs { u_int ar_ref; /* Reference count */ u_int ar_length; /* Length */ u_char ar_args[0]; /* Arguments */ }; This does indeed seem to make little or no sense. Could someone explain this? Is ar_args supposed to be a pointer or what? 3) Furthermore, on including , one then sees this: In file included from /usr/include/sys/user.h:40, from main.c:153: /usr/include/machine/pcb.h:90: warning: struct has no members In : /* * The pcb is augmented with machine-dependent additional data for * core dumps. For the i386: ??? */ struct md_coredump { }; Nowhere under /usr/include is a more complete definition of md_coredump to be found. This looks awfully "kludgy" to me. I do hope someone can shed some light here. Thanks. -- Conrad Sabatier First Rule of History: History doesn't repeat itself -- historians merely repeat each other. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message