Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/compat/gen PR/42201: NAKAJIMA Yoshihiro: fts(3): br...
details: https://anonhg.NetBSD.org/src/rev/cc7794b47d3b
branches: trunk
changeset: 748288:cc7794b47d3b
user: christos <christos%NetBSD.org@localhost>
date: Mon Oct 19 17:52:01 2009 +0000
description:
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
diffstat:
lib/libc/compat/gen/compat___fts13.c | 36 +++++++++++++++++++-----------------
lib/libc/compat/gen/compat___fts30.c | 35 +++++++++++++++++++++++------------
lib/libc/compat/gen/compat___fts31.c | 36 +++++++++++++++++++++++-------------
lib/libc/compat/gen/compat___fts32.c | 34 ++++++++++++++++++----------------
lib/libc/compat/gen/compat___fts50.c | 22 +++++++++++-----------
lib/libc/compat/gen/compat_fts.c | 16 +++++++++++-----
6 files changed, 105 insertions(+), 74 deletions(-)
diffs (truncated from 324 to 300 lines):
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat___fts13.c
--- a/lib/libc/compat/gen/compat___fts13.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat___fts13.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: compat___fts13.c,v 1.5 2009/01/11 02:46:24 christos Exp $ */
+/* $NetBSD: compat___fts13.c,v 1.6 2009/10/19 17:52:01 christos Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
#include <dirent.h>
-#define __LIBC12_SOURCE__
+#define __LIBC12_SOURCE__
__warn_references(__fts_children13,
"warning: reference to compatibility __fts_children13();"
@@ -26,31 +26,33 @@
#include <compat/sys/time.h>
#include <compat/sys/stat.h>
-#define __fts_stat_t struct stat13
-#define __fts_nlink_t nlink_t
+#define __fts_stat_t struct stat13
#define __fts_ino_t u_int32_t
#define __fts_length_t u_short
#define __fts_number_t long
+#define __fts_dev_t uint32_t
+#define __fts_level_t short
-#define stat __stat13
-#define lstat __lstat13
-#define fstat __fstat13
+#define stat __stat13
+#define lstat __lstat13
+#define fstat __fstat13
-#undef fts_children
-#define fts_children __fts_children13
-#undef fts_close
-#define fts_close __fts_close13
-#undef fts_open
-#define fts_open __fts_open13
-#undef fts_read
-#define fts_read __fts_read13
-#undef fts_set
-#define fts_set __fts_set13
+#undef fts_children
+#define fts_children __fts_children13
+#undef fts_close
+#define fts_close __fts_close13
+#undef fts_open
+#define fts_open __fts_open13
+#undef fts_read
+#define fts_read __fts_read13
+#undef fts_set
+#define fts_set __fts_set13
#include <fts.h>
#include <compat/include/fts.h>
#define __FTS_COMPAT_TAILINGSLASH
#define __FTS_COMPAT_LENGTH
+#define __FTS_COMPAT_LEVEL
#include "gen/fts.c"
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat___fts30.c
--- a/lib/libc/compat/gen/compat___fts30.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat___fts30.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,9 +1,11 @@
-/* $NetBSD: compat___fts30.c,v 1.2 2006/07/27 15:46:30 christos Exp $ */
+/* $NetBSD: compat___fts30.c,v 1.3 2009/10/19 17:52:04 christos Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
#include <dirent.h>
+#define __LIBC12_SOURCE__
+
__warn_references(__fts_children30,
"warning: reference to compatibility __fts_children30();"
" include <fts.h> for correct reference")
@@ -21,25 +23,34 @@
" include <fts.h> for correct reference")
#include <sys/stat.h>
+#include <compat/sys/time.h>
+#include <compat/sys/stat.h>
+#define __fts_stat_t struct stat30
#define __fts_length_t u_short
#define __fts_number_t long
+#define __fts_dev_t uint32_t
+#define __fts_level_t short
-#undef fts_children
-#define fts_children __fts_children30
-#undef fts_close
-#define fts_close __fts_close30
-#undef fts_open
-#define fts_open __fts_open30
-#undef fts_read
-#define fts_read __fts_read30
-#undef fts_set
-#define fts_set __fts_set30
+#define stat __stat30
+#define lstat __lstat30
+#define fstat __fstat30
-#define __LIBC12_SOURCE__
+#undef fts_children
+#define fts_children __fts_children30
+#undef fts_close
+#define fts_close __fts_close30
+#undef fts_open
+#define fts_open __fts_open30
+#undef fts_read
+#define fts_read __fts_read30
+#undef fts_set
+#define fts_set __fts_set30
+
#include <fts.h>
#include <compat/include/fts.h>
#define __FTS_COMPAT_LENGTH
+#define __FTS_COMPAT_LEVEL
#include "gen/fts.c"
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat___fts31.c
--- a/lib/libc/compat/gen/compat___fts31.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat___fts31.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,9 +1,11 @@
-/* $NetBSD: compat___fts31.c,v 1.1 2006/07/27 15:46:30 christos Exp $ */
+/* $NetBSD: compat___fts31.c,v 1.2 2009/10/19 17:52:05 christos Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
#include <dirent.h>
+#define __LIBC12_SOURCE__
+
__warn_references(__fts_children31,
"warning: reference to compatibility __fts_children31();"
" include <fts.h> for correct reference")
@@ -21,24 +23,32 @@
" include <fts.h> for correct reference")
#include <sys/stat.h>
+#include <compat/sys/time.h>
+#include <compat/sys/stat.h>
+#define __fts_stat_t struct stat30
#define __fts_number_t long
+#define __fts_dev_t uint32_t
+#define __fts_level_t short
+
+#define stat __stat30
+#define lstat __lstat30
+#define fstat __fstat30
-#undef fts_children
-#define fts_children __fts_children31
-#undef fts_close
-#define fts_close __fts_close31
-#undef fts_open
-#define fts_open __fts_open31
-#undef fts_read
-#define fts_read __fts_read31
-#undef fts_set
-#define fts_set __fts_set31
+#undef fts_children
+#define fts_children __fts_children31
+#undef fts_close
+#define fts_close __fts_close31
+#undef fts_open
+#define fts_open __fts_open31
+#undef fts_read
+#define fts_read __fts_read31
+#undef fts_set
+#define fts_set __fts_set31
-#define __LIBC12_SOURCE__
#include <fts.h>
#include <compat/include/fts.h>
-#define __FTS_COMPAT_LENGTH
+#define __FTS_COMPAT_LEVEL
#include "gen/fts.c"
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat___fts32.c
--- a/lib/libc/compat/gen/compat___fts32.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat___fts32.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: compat___fts32.c,v 1.2 2009/01/11 02:46:25 christos Exp $ */
+/* $NetBSD: compat___fts32.c,v 1.3 2009/10/19 17:52:05 christos Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
#include <dirent.h>
-#define __LIBC12_SOURCE__
+#define __LIBC12_SOURCE__
__warn_references(__fts_children32,
"warning: reference to compatibility __fts_children32();"
" include <fts.h> for correct reference")
@@ -23,16 +23,18 @@
#define __fts_stat_t struct stat30
#define __fts_dev_t uint32_t
-#undef fts_children
-#define fts_children __fts_children32
-#undef fts_close
-#define fts_close __fts_close32
-#undef fts_open
-#define fts_open __fts_open32
-#undef fts_read
-#define fts_read __fts_read32
-#undef fts_set
-#define fts_set __fts_set32
+#define __fts_level_t short
+
+#undef fts_children
+#define fts_children __fts_children32
+#undef fts_close
+#define fts_close __fts_close32
+#undef fts_open
+#define fts_open __fts_open32
+#undef fts_read
+#define fts_read __fts_read32
+#undef fts_set
+#define fts_set __fts_set32
#include <sys/time.h>
#include <compat/sys/time.h>
@@ -42,10 +44,10 @@
#include <fts.h>
#include <compat/include/fts.h>
-#define __FTS_COMPAT_LENGTH
+#define __FTS_COMPAT_LEVEL
-#define stat __stat30
-#define lstat __lstat30
-#define fstat __fstat30
+#define stat __stat30
+#define lstat __lstat30
+#define fstat __fstat30
#include "gen/fts.c"
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat___fts50.c
--- a/lib/libc/compat/gen/compat___fts50.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat___fts50.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat___fts50.c,v 1.1 2009/08/16 19:33:39 christos Exp $ */
+/* $NetBSD: compat___fts50.c,v 1.2 2009/10/19 17:52:05 christos Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
@@ -24,16 +24,16 @@
" include <fts.h> for correct reference")
#define __fts_level_t short
-#undef fts_children
-#define fts_children __fts_children50
-#undef fts_close
-#define fts_close __fts_close50
-#undef fts_open
-#define fts_open __fts_open50
-#undef fts_read
-#define fts_read __fts_read50
-#undef fts_set
-#define fts_set __fts_set50
+#undef fts_children
+#define fts_children __fts_children50
+#undef fts_close
+#define fts_close __fts_close50
+#undef fts_open
+#define fts_open __fts_open50
+#undef fts_read
+#define fts_read __fts_read50
+#undef fts_set
+#define fts_set __fts_set50
#include <fts.h>
#include <compat/include/fts.h>
diff -r 3d5b5c6bfa66 -r cc7794b47d3b lib/libc/compat/gen/compat_fts.c
--- a/lib/libc/compat/gen/compat_fts.c Mon Oct 19 17:34:07 2009 +0000
+++ b/lib/libc/compat/gen/compat_fts.c Mon Oct 19 17:52:01 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_fts.c,v 1.3 2009/01/11 02:46:25 christos Exp $ */
+/* $NetBSD: compat_fts.c,v 1.4 2009/10/19 17:52:05 christos Exp $ */
/*
* Written by Jason R. Thorpe <thorpej%NetBSD.org@localhost>, October 21, 1997.
@@ -9,14 +9,18 @@
#include <sys/cdefs.h>
#include <dirent.h>
-#define __LIBC12_SOURCE__
+#define __LIBC12_SOURCE__
#include <sys/stat.h>
Home |
Main Index |
Thread Index |
Old Index