cleanup after devmajor_t:
-since getdevmajor(3) is now binary compatible again with <=5.0 there is no need to rename, I've just left a __getdevmajor50 symbol temporarily for those who track -current -update manpage
This commit is contained in:
parent
4442e07493
commit
ad965be01b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stdlib.h,v 1.87 2009/01/20 18:20:47 drochner Exp $ */
|
||||
/* $NetBSD: stdlib.h,v 1.88 2009/01/20 20:08:12 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -280,9 +280,7 @@ __aconst char *devname(dev_t, mode_t) __RENAME(__devname50);
|
||||
int humanize_number(char *, size_t, int64_t, const char *, int, int);
|
||||
int dehumanize_number(const char *, int64_t *);
|
||||
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
devmajor_t getdevmajor(const char *, mode_t) __RENAME(__getdevmajor50);
|
||||
#endif
|
||||
devmajor_t getdevmajor(const char *, mode_t);
|
||||
int getloadavg(double [], int);
|
||||
|
||||
int getenv_r(const char *, char *, size_t);
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.9 2009/01/11 02:46:24 christos Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.10 2009/01/20 20:08:12 drochner Exp $
|
||||
|
||||
.PATH: ${COMPATDIR}/gen
|
||||
SRCS+=compat_errlist.c compat_fts.c compat___fts13.c compat___fts30.c \
|
||||
@ -7,7 +7,7 @@ SRCS+=compat_errlist.c compat_fts.c compat___fts13.c compat___fts30.c \
|
||||
compat_scandir.c compat_siglist.c compat_signame.c compat_sigsetops.c \
|
||||
compat_times.c compat_timezone.c compat_unvis.c compat_utmpx.c \
|
||||
compat__sys_errlist.c compat__sys_nerr.c compat__sys_siglist.c \
|
||||
compat_time.c compat_utime.c compat_devname.c compat_getdevmajor.c \
|
||||
compat_time.c compat_utime.c compat_devname.c \
|
||||
compat_getpwent.c compat___fts32.c compat_utmp.c
|
||||
|
||||
LIBMINC=-I${LIBCDIR}/../libm/src -DUSE_LIBM
|
||||
|
@ -1,62 +0,0 @@
|
||||
/* $NetBSD: compat_getdevmajor.c,v 1.2 2009/01/11 02:46:25 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``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 FOUNDATION OR CONTRIBUTORS
|
||||
* 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.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: compat_getdevmajor.c,v 1.2 2009/01/11 02:46:25 christos Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
||||
#define __LIBC12_SOURCE__
|
||||
|
||||
#include "namespace.h"
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <compat/include/stdlib.h>
|
||||
|
||||
__warn_references(getdevmajor,
|
||||
"warning: reference to compatibility getdevmajor(); include <stdlib.h> to generate correct reference")
|
||||
|
||||
#ifdef __weak_alias
|
||||
__weak_alias(getdevmajor, _getdevmajor)
|
||||
#endif
|
||||
|
||||
int32_t
|
||||
getdevmajor(const char *path, mode_t mode)
|
||||
{
|
||||
return (int32_t)__getdevmajor50(path, mode);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getdevmajor.3,v 1.3 2004/12/16 17:29:55 wiz Exp $
|
||||
.\" $NetBSD: getdevmajor.3,v 1.4 2009/01/20 20:08:12 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -30,7 +30,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd December 15, 2004
|
||||
.Dd January 20, 2009
|
||||
.Dt GETDEVMAJOR 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -41,7 +41,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.In stdlib.h
|
||||
.In sys/stat.h
|
||||
.Ft dev_t
|
||||
.Ft devmajor_t
|
||||
.Fn getdevmajor "const char *name" "mode_t type"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
@ -58,7 +58,7 @@ or
|
||||
.Sh RETURN VALUES
|
||||
If no device matches the specified values, no information is
|
||||
available, or an error occurs,
|
||||
.Dv (dev_t)~0
|
||||
.Dv NODEVMAJOR
|
||||
is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
@ -70,7 +70,7 @@ slave devices (aka pts devices):
|
||||
#include \*[Lt]stdlib.h\*[Gt]
|
||||
#include \*[Lt]sys/stat.h\*[Gt]
|
||||
.sp
|
||||
dev_t pts;
|
||||
devmajor_t pts;
|
||||
pts = getdevmajor("pts", S_IFCHR);
|
||||
.Ed
|
||||
.Pp
|
||||
@ -81,7 +81,7 @@ devices:
|
||||
#include \*[Lt]stdlib.h\*[Gt]
|
||||
#include \*[Lt]sys/stat.h\*[Gt]
|
||||
.sp
|
||||
dev_t c, b;
|
||||
devmajor_t c, b;
|
||||
c = getdevmajor("wd", S_IFCHR);
|
||||
b = getdevmajor("wd", S_IFBLK);
|
||||
.Ed
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getdevmajor.c,v 1.4 2009/01/20 18:20:48 drochner Exp $ */
|
||||
/* $NetBSD: getdevmajor.c,v 1.5 2009/01/20 20:08:12 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: getdevmajor.c,v 1.4 2009/01/20 18:20:48 drochner Exp $");
|
||||
__RCSID("$NetBSD: getdevmajor.c,v 1.5 2009/01/20 20:08:12 drochner Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -51,6 +51,18 @@ __RCSID("$NetBSD: getdevmajor.c,v 1.4 2009/01/20 18:20:48 drochner Exp $");
|
||||
__weak_alias(getdevmajor,_getdevmajor)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX temporary alias because getdevmajor() was renamed
|
||||
* in -current for some time
|
||||
*/
|
||||
dev_t __getdevmajor50(const char *, mode_t);
|
||||
dev_t
|
||||
__getdevmajor50(const char *name, mode_t type)
|
||||
{
|
||||
|
||||
return (dev_t)getdevmajor(name, type);
|
||||
}
|
||||
|
||||
devmajor_t
|
||||
getdevmajor(const char *name, mode_t type)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user