Pretend the <fts.h> functions didn't appear until 21.

Because there was an accidental ABI breakage in 21, and we can't fix
the past. It seems more useful to refuse to build code that won't work
on any current or future device.

Bug: https://issuetracker.google.com/37051826
Test: builds
Change-Id: I4b5c30f899e2c7307642e2fb20e43a3ca14ae7fe
This commit is contained in:
Elliott Hughes 2017-08-25 15:18:33 -07:00
parent d615a06068
commit f11aa95ee7
8 changed files with 45 additions and 40 deletions

View file

@ -116,11 +116,16 @@ typedef struct _ftsent {
__BEGIN_DECLS
FTSENT* fts_children(FTS* __fts, int __options);
int fts_close(FTS* __fts);
FTS* fts_open(char* const* __path, int __options, int (*__comparator)(const FTSENT** __lhs, const FTSENT** __rhs));
FTSENT* fts_read(FTS* __fts);
int fts_set(FTS* __fts, FTSENT* __entry, int __options);
/*
* Strictly these functions were available before Lollipop/21, but there was an accidental ABI
* breakage in 21 that means you can't write code that runs on current devices and pre-21 devices,
* so we break the tie in favor of current and future devices.
*/
FTSENT* fts_children(FTS* __fts, int __options) __INTRODUCED_IN(21);
int fts_close(FTS* __fts) __INTRODUCED_IN(21);
FTS* fts_open(char* const* __path, int __options, int (*__comparator)(const FTSENT** __lhs, const FTSENT** __rhs)) __INTRODUCED_IN(21);
FTSENT* fts_read(FTS* __fts) __INTRODUCED_IN(21);
int fts_set(FTS* __fts, FTSENT* __entry, int __options) __INTRODUCED_IN(21);
__END_DECLS

View file

@ -399,11 +399,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -328,11 +328,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -401,11 +401,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -397,11 +397,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -328,11 +328,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -395,11 +395,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;

View file

@ -328,11 +328,11 @@ LIBC {
ftruncate;
ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-mips=12 introduced-mips64=21 introduced-x86=12 introduced-x86_64=21
ftrylockfile;
fts_children;
fts_close;
fts_open;
fts_read;
fts_set;
fts_children; # introduced=21
fts_close; # introduced=21
fts_open; # introduced=21
fts_read; # introduced=21
fts_set; # introduced=21
ftw; # introduced-arm=17 introduced-arm64=21 introduced-mips=17 introduced-mips64=21 introduced-x86=17 introduced-x86_64=21
ftw64; # introduced=21
funlockfile;