Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/mknod Remove old workaround for Cygwin.
details: https://anonhg.NetBSD.org/src/rev/b98db75c17b4
branches: trunk
changeset: 787381:b98db75c17b4
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jun 14 16:28:20 2013 +0000
description:
Remove old workaround for Cygwin.
http://mail-index.netbsd.org/source-changes/2003/05/08/0042.html
16bit dev_t for !__CYGWIN_USE_BIG_TYPES__ was removed in Cygwin 1.7.2
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/cygwin/types.h?cvsroot=src#rev1.32
and __dev32_t has been removed since 1.7.19.
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/cygwin/types.h?cvsroot=src#rev1.36
diffstat:
sbin/mknod/mknod.c | 12 ++++++------
sbin/mknod/pack_dev.c | 48 ++++++++++++++++++++++++------------------------
sbin/mknod/pack_dev.h | 9 ++-------
3 files changed, 32 insertions(+), 37 deletions(-)
diffs (219 lines):
diff -r df96733d9ea5 -r b98db75c17b4 sbin/mknod/mknod.c
--- a/sbin/mknod/mknod.c Fri Jun 14 16:10:02 2013 +0000
+++ b/sbin/mknod/mknod.c Fri Jun 14 16:28:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mknod.c,v 1.40 2011/08/27 18:37:41 joerg Exp $ */
+/* $NetBSD: mknod.c,v 1.41 2013/06/14 16:28:20 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1998\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: mknod.c,v 1.40 2011/08/27 18:37:41 joerg Exp $");
+__RCSID("$NetBSD: mknod.c,v 1.41 2013/06/14 16:28:20 tsutsui Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -61,7 +61,7 @@
#include "pack_dev.h"
static int gid_name(const char *, gid_t *);
-static portdev_t callPack(pack_t *, int, u_long *);
+static dev_t callPack(pack_t *, int, u_long *);
__dead static void usage(void);
@@ -81,7 +81,7 @@
{
char *name, *p;
mode_t mode;
- portdev_t dev;
+ dev_t dev;
pack_t *pack;
u_long numbers[MAXARGS];
int n, ch, fifo, hasformat;
@@ -317,10 +317,10 @@
return 0;
}
-static portdev_t
+static dev_t
callPack(pack_t *f, int n, u_long *numbers)
{
- portdev_t d;
+ dev_t d;
const char *error = NULL;
d = (*f)(n, numbers, &error);
diff -r df96733d9ea5 -r b98db75c17b4 sbin/mknod/pack_dev.c
--- a/sbin/mknod/pack_dev.c Fri Jun 14 16:10:02 2013 +0000
+++ b/sbin/mknod/pack_dev.c Fri Jun 14 16:28:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $ */
+/* $NetBSD: pack_dev.c,v 1.12 2013/06/14 16:28:20 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $");
+__RCSID("$NetBSD: pack_dev.c,v 1.12 2013/06/14 16:28:20 tsutsui Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -63,10 +63,10 @@
static const char tooManyFields[] = "too many fields for format";
/* exported */
-portdev_t
+dev_t
pack_native(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev(numbers[0], numbers[1]);
@@ -80,10 +80,10 @@
}
-static portdev_t
+static dev_t
pack_netbsd(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_netbsd(numbers[0], numbers[1]);
@@ -99,13 +99,13 @@
#define major_freebsd(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
#define minor_freebsd(x) ((int32_t)(((x) & 0xffff00ff) >> 0))
-#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
+#define makedev_freebsd(x,y) ((dev_t)((((x) << 8) & 0x0000ff00) | \
(((y) << 0) & 0xffff00ff)))
-static portdev_t
+static dev_t
pack_freebsd(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_freebsd(numbers[0], numbers[1]);
@@ -121,13 +121,13 @@
#define major_8_8(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
#define minor_8_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
-#define makedev_8_8(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
+#define makedev_8_8(x,y) ((dev_t)((((x) << 8) & 0x0000ff00) | \
(((y) << 0) & 0x000000ff)))
-static portdev_t
+static dev_t
pack_8_8(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_8_8(numbers[0], numbers[1]);
@@ -143,13 +143,13 @@
#define major_12_20(x) ((int32_t)(((x) & 0xfff00000) >> 20))
#define minor_12_20(x) ((int32_t)(((x) & 0x000fffff) >> 0))
-#define makedev_12_20(x,y) ((portdev_t)((((x) << 20) & 0xfff00000) | \
+#define makedev_12_20(x,y) ((dev_t)((((x) << 20) & 0xfff00000) | \
(((y) << 0) & 0x000fffff)))
-static portdev_t
+static dev_t
pack_12_20(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_12_20(numbers[0], numbers[1]);
@@ -165,13 +165,13 @@
#define major_14_18(x) ((int32_t)(((x) & 0xfffc0000) >> 18))
#define minor_14_18(x) ((int32_t)(((x) & 0x0003ffff) >> 0))
-#define makedev_14_18(x,y) ((portdev_t)((((x) << 18) & 0xfffc0000) | \
+#define makedev_14_18(x,y) ((dev_t)((((x) << 18) & 0xfffc0000) | \
(((y) << 0) & 0x0003ffff)))
-static portdev_t
+static dev_t
pack_14_18(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_14_18(numbers[0], numbers[1]);
@@ -187,13 +187,13 @@
#define major_8_24(x) ((int32_t)(((x) & 0xff000000) >> 24))
#define minor_8_24(x) ((int32_t)(((x) & 0x00ffffff) >> 0))
-#define makedev_8_24(x,y) ((portdev_t)((((x) << 24) & 0xff000000) | \
+#define makedev_8_24(x,y) ((dev_t)((((x) << 24) & 0xff000000) | \
(((y) << 0) & 0x00ffffff)))
-static portdev_t
+static dev_t
pack_8_24(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_8_24(numbers[0], numbers[1]);
@@ -210,14 +210,14 @@
#define major_12_12_8(x) ((int32_t)(((x) & 0xfff00000) >> 20))
#define unit_12_12_8(x) ((int32_t)(((x) & 0x000fff00) >> 8))
#define subunit_12_12_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
-#define makedev_12_12_8(x,y,z) ((portdev_t)((((x) << 20) & 0xfff00000) | \
+#define makedev_12_12_8(x,y,z) ((dev_t)((((x) << 20) & 0xfff00000) | \
(((y) << 8) & 0x000fff00) | \
(((z) << 0) & 0x000000ff)))
-static portdev_t
+static dev_t
pack_bsdos(int n, u_long numbers[], const char **error)
{
- portdev_t dev = 0;
+ dev_t dev = 0;
if (n == 2) {
dev = makedev_12_20(numbers[0], numbers[1]);
diff -r df96733d9ea5 -r b98db75c17b4 sbin/mknod/pack_dev.h
--- a/sbin/mknod/pack_dev.h Fri Jun 14 16:10:02 2013 +0000
+++ b/sbin/mknod/pack_dev.h Fri Jun 14 16:28:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pack_dev.h,v 1.7 2008/04/28 20:23:09 martin Exp $ */
+/* $NetBSD: pack_dev.h,v 1.8 2013/06/14 16:28:20 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -32,12 +32,7 @@
#ifndef _PACK_DEV_H
#define _PACK_DEV_H
-#ifdef __CYGWIN__
-typedef __dev32_t portdev_t;
-#else
-typedef dev_t portdev_t;
-#endif
-typedef portdev_t pack_t(int, u_long [], const char **);
+typedef dev_t pack_t(int, u_long [], const char **);
pack_t *pack_find(const char *);
pack_t pack_native;
Home |
Main Index |
Thread Index |
Old Index