diff options
author | ryoon <ryoon@pkgsrc.org> | 2013-07-26 12:37:41 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2013-07-26 12:37:41 +0000 |
commit | 215be0b3a6cbedf79f842adf5e4887ad0733ab0e (patch) | |
tree | ca41b4a9e0157fb5ec86847ad6e0385da4a960c6 /archivers | |
parent | b895faaf7d30411870a9fe3dfd9dda05f3ff75ae (diff) | |
download | pkgsrc-215be0b3a6cbedf79f842adf5e4887ad0733ab0e.tar.gz |
Fix build on Cygwin.
__dev32_t is removed since 1.7.19 of cygwin.
Like http://mail-index.netbsd.org/source-changes/2013/06/14/msg044776.html .
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/pax/files/pack_dev.c | 48 | ||||
-rw-r--r-- | archivers/pax/files/pack_dev.h | 9 |
2 files changed, 26 insertions, 31 deletions
diff --git a/archivers/pax/files/pack_dev.c b/archivers/pax/files/pack_dev.c index 80a19177c8d..f65b512eb18 100644 --- a/archivers/pax/files/pack_dev.c +++ b/archivers/pax/files/pack_dev.c @@ -1,4 +1,4 @@ -/* $NetBSD: pack_dev.c,v 1.4 2008/04/29 05:46:09 martin Exp $ */ +/* $NetBSD: pack_dev.c,v 1.5 2013/07/26 12:37:41 ryoon Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include <sys/cdefs.h> #endif #if !defined(lint) -__RCSID("$NetBSD: pack_dev.c,v 1.4 2008/04/29 05:46:09 martin Exp $"); +__RCSID("$NetBSD: pack_dev.c,v 1.5 2013/07/26 12:37:41 ryoon Exp $"); #endif /* not lint */ #if HAVE_SYS_TYPES_H @@ -84,10 +84,10 @@ static const char iMinorError[] = "invalid minor number"; 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 = TODEV(numbers[0], numbers[1]); @@ -101,10 +101,10 @@ pack_native(int n, u_long numbers[], const char **error) } -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]); @@ -120,13 +120,13 @@ pack_netbsd(int n, u_long numbers[], const char **error) #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]); @@ -142,13 +142,13 @@ pack_freebsd(int n, u_long numbers[], const char **error) #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]); @@ -164,13 +164,13 @@ pack_8_8(int n, u_long numbers[], const char **error) #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]); @@ -186,13 +186,13 @@ pack_12_20(int n, u_long numbers[], const char **error) #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]); @@ -208,13 +208,13 @@ pack_14_18(int n, u_long numbers[], const char **error) #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]); @@ -231,14 +231,14 @@ pack_8_24(int n, u_long numbers[], const char **error) #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 --git a/archivers/pax/files/pack_dev.h b/archivers/pax/files/pack_dev.h index b7566e50863..f0352e58334 100644 --- a/archivers/pax/files/pack_dev.h +++ b/archivers/pax/files/pack_dev.h @@ -1,4 +1,4 @@ -/* $NetBSD: pack_dev.h,v 1.3 2008/04/29 05:46:09 martin Exp $ */ +/* $NetBSD: pack_dev.h,v 1.4 2013/07/26 12:37:41 ryoon 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; |