From owner-freebsd-bugs Wed Aug 4 6: 1: 1 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9E51D15390 for ; Wed, 4 Aug 1999 06:00:59 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA05585; Wed, 4 Aug 1999 06:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from po4.wam.umd.edu (po4.wam.umd.edu [128.8.10.166]) by hub.freebsd.org (Postfix) with ESMTP id D23561538B for ; Wed, 4 Aug 1999 05:56:38 -0700 (PDT) (envelope-from howardjp@wam.umd.edu) Received: from rac3.wam.umd.edu (root@rac3.wam.umd.edu [128.8.10.143]) by po4.wam.umd.edu (8.9.3/8.9.3) with ESMTP id IAA17077 for ; Wed, 4 Aug 1999 08:56:05 -0400 (EDT) Received: from rac3.wam.umd.edu (sendmail@localhost [127.0.0.1]) by rac3.wam.umd.edu (8.9.3/8.9.3) with SMTP id IAA09106 for ; Wed, 4 Aug 1999 08:56:04 -0400 (EDT) Received: (from howardjp@localhost) by rac3.wam.umd.edu (8.9.3/8.9.3) id IAA09102 for FreeBSD-gnats-submit@freebsd.org; Wed, 4 Aug 1999 08:56:03 -0400 (EDT) Message-Id: <199908041256.IAA09102@rac3.wam.umd.edu> Date: Wed, 4 Aug 1999 08:56:03 -0400 (EDT) From: James Howard Reply-To: howardjp@wam.umd.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12960: basename(3) and dirname(3) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12960 >Category: bin >Synopsis: basename(3) and dirname(3) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 4 06:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: James Howard >Release: FreeBSD 3.2-STABLE i386 >Organization: University of Maryland >Environment: FreeBSD byzantine.student.umd.edu 3.2-STABLE FreeBSD 3.2-STABLE #4: Thu Jun 17 18:40:41 GMT 1999 howardjp@byzantine.student.umd.edu:/usr/src/sys/compile/BYZANTINE i386 >Description: I was working to port man/apropos/whatis/etc. from OpenBSD to replace GPL'd versions currently available under FreeBSD. Even to get man(1) to compile under FreeBSD, I had to port dirname(3) and basename(3), as well as libgen.h from OpenBSD. It would be worthwhile to add these because they are mandated by Unix 98 (XPG5). This went smoothly and without errors. This is the first of two PRs on this. Under "Fix:" will be libgen.h, this should be added to /usr/src/include and the appropriate changes made to the Makefiles. The second PR will contain basename.[3c] and dirname.[3c]. Sorry this is not a diff, I could not get diff to properly handle the directory. Does it have problems dealing with large directories? Also, should I have removed the "$OpenBSD:" line? >How-To-Repeat: >Fix: /* $OpenBSD: libgen.h,v 1.4 1999/05/28 22:00:22 espie Exp $ */ /* * Copyright (c) 1997 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBGEN_H_ #define _LIBGEN_H_ #include __BEGIN_DECLS char *basename __P((const char *)); char *dirname __P((const char *)); #if 0 char *regcmp __P((const char *, ...)); char *regex __P((const char *, const char *, ...)); extern char *__loc1; #endif __END_DECLS #endif /* _LIBGEN_H_ */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message