diff options
author | Eric Biggers <ebiggers@google.com> | 2023-09-22 20:49:06 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-09-23 10:49:42 -0700 |
commit | 789347a91b55d99b4a3a01ccc0edea48a71588a2 (patch) | |
tree | e5eb8109458f4582a55f97f8e848f62f7bc60f78 | |
parent | dd1590360afe6074b12d9df4a7ea59bc3ff72918 (diff) | |
download | xfstests-bld-789347a91b55d99b4a3a01ccc0edea48a71588a2.tar.gz |
fstests-bld: use upstream libaio instead of outdated fork
fstests-bld is using a 12-year old in-tree fork of libaio that is
missing features such as support for RISC-V. The only local changes are
arm64 support, which upstream has too, and autotools support which is
unnecessary (even for supporting CROSS_COMPILE). Just use the upstream
git repo instead, at libaio-0.3.113 which is the latest version.
Note that libaio continues to be used as a static library, not shared.
Signed-off-by: Eric Biggers <ebiggers@google.com>
100 files changed, 17 insertions, 10659 deletions
diff --git a/fstests-bld/.gitignore b/fstests-bld/.gitignore index 30258fb9..391b536e 100644 --- a/fstests-bld/.gitignore +++ b/fstests-bld/.gitignore @@ -45,8 +45,6 @@ /dbench/dbench /dbench/tbench /dbench/tbench_srv -/libaio/src/libaio.a -/libaio/src/libaio.so.1.0.1 /e2fsprogs-libs/intl/libgnuintl.h /e2fsprogs-libs/lib/blkid/blkid.h /e2fsprogs-libs/lib/uuid/uuid.h @@ -54,6 +52,7 @@ /fsverity/ /ima-evm-utils/ /keyutils/ +/libaio/ /libinih/libinih.a /nvme-cli /popt/.deps/ diff --git a/fstests-bld/Makefile b/fstests-bld/Makefile index 435f03a3..973bd661 100644 --- a/fstests-bld/Makefile +++ b/fstests-bld/Makefile @@ -7,6 +7,7 @@ REPOS = blktests \ keyutils \ fsverity \ ima-evm-utils \ + libaio \ nvme-cli \ quota \ stress-ng \ @@ -20,7 +21,6 @@ SUBDIRS = acl \ attr \ dbench \ e2fsprogs-libs \ - libaio \ libinih \ misc \ popt \ diff --git a/fstests-bld/build-all b/fstests-bld/build-all index d371c8ec..2a453fdc 100755 --- a/fstests-bld/build-all +++ b/fstests-bld/build-all @@ -274,9 +274,15 @@ fi if test -z "$SKIP_AIO" ; then build_start "AIO library" - (cd libaio; ./configure $cross --disable-nls; $MAKE_CLEAN ; - make $J prefix=$DESTDIR install) - rm $DESTDIR/lib/libaio.so* + (cd libaio + ver=$(git describe --always --dirty); echo "libaio $ver ($(git log -1 --pretty=%cD))" > ../libaio.ver + if [ -n "$CROSS_COMPILE" ]; then + export CC="$CROSS_COMPILE-gcc" + export AR="$CROSS_COMPILE-ar" + export RANLIB="$CROSS_COMPILE-ranlib" + fi + $MAKE_CLEAN + make $J prefix=$DESTDIR ENABLE_SHARED=0 install) fi if test -z "$SKIP_KEYUTILS" ; then diff --git a/fstests-bld/config b/fstests-bld/config index 6fe916ab..7093d2ae 100644 --- a/fstests-bld/config +++ b/fstests-bld/config @@ -5,6 +5,7 @@ XFSTESTS_GIT=https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git XFSPROGS_GIT=https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git FIO_GIT=http://git.kernel.dk/fio.git +LIBAIO_GIT=https://pagure.io/libaio.git QUOTA_GIT=https://git.kernel.org/pub/scm/utils/quota/quota-tools.git FSVERITY_GIT=https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git BLKTESTS_GIT=https://github.com/osandov/blktests.git @@ -19,6 +20,7 @@ BLKTESTS_GIT=https://github.com/osandov/blktests.git # NVME_CLI_GIT=https://github.com/linux-nvme/nvme-cli FIO_COMMIT=fio-3.28 +LIBAIO_COMMIT=libaio-0.3.113 QUOTA_COMMIT=d2256ac2d44b0a5be9c0b49ce4ce8e5f6821ce2a XFSPROGS_COMMIT=v5.13.0 diff --git a/fstests-bld/config.docker b/fstests-bld/config.docker index 678cbeed..19f11350 100644 --- a/fstests-bld/config.docker +++ b/fstests-bld/config.docker @@ -6,6 +6,9 @@ XFSPROGS_COMMIT=b42033308360655616fc9bd77678c46bf518b7c8 # v5.13.0 FIO_GIT=https://git.kernel.dk/fio.git FIO_COMMIT=9b46661c289d01dbfe5182189a7abea9ce2f9e04 # fio-3.29 +LIBAIO_GIT=https://pagure.io/libaio.git +LIBAIO_COMMIT=1b18bfafc6a2f7b9fa2c6be77a95afed8b7be448 # libaio-0.3.113 + QUOTA_GIT=https://git.kernel.org/pub/scm/utils/quota/quota-tools.git QUOTA_COMMIT=d2256ac2d44b0a5be9c0b49ce4ce8e5f6821ce2a diff --git a/fstests-bld/get-all b/fstests-bld/get-all index 82fa2e22..c94bd398 100755 --- a/fstests-bld/get-all +++ b/fstests-bld/get-all @@ -139,6 +139,7 @@ done # required repositories setup_repo fio FIO_GIT FIO_COMMIT true +setup_repo libaio LIBAIO_GIT LIBAIO_COMMIT true setup_repo quota QUOTA_GIT QUOTA_COMMIT true setup_repo xfsprogs-dev XFSPROGS_GIT XFSPROGS_COMMIT true setup_repo xfstests-dev XFSTESTS_GIT XFSTESTS_COMMIT true diff --git a/fstests-bld/libaio/.version b/fstests-bld/libaio/.version deleted file mode 100644 index 7b32a6e2..00000000 --- a/fstests-bld/libaio/.version +++ /dev/null @@ -1 +0,0 @@ -0.3.109 diff --git a/fstests-bld/libaio/COPYING b/fstests-bld/libaio/COPYING deleted file mode 100644 index c4792dd2..00000000 --- a/fstests-bld/libaio/COPYING +++ /dev/null @@ -1,515 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - <one line to give the library's name and a brief idea of what it -does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/fstests-bld/libaio/ChangeLog b/fstests-bld/libaio/ChangeLog deleted file mode 100644 index b1536b4a..00000000 --- a/fstests-bld/libaio/ChangeLog +++ /dev/null @@ -1,54 +0,0 @@ -0.3.107 - - Make tests compile again on modern systems (warnings + -Werror) - - Add 'make partcheck' and don't require manual setup for testing. - - Change test harness to compile against this dir, not global install - - Fix 5.t for archs where PROT_WRITE mappings are readable. - - Allow sending of SIGXFSZ on aio over limits - - Explicitly specify bash for runtests.sh - - Put deprecating comments on never-merged io_prep_poll - - Add io_prep_preadv and io_prep_pwritev - - Add eventfd support (io_set_eventfd). - -0.4.0 - - remove libredhat-kernel - - add rough outline for man pages - - make the compiled io_getevents() add the extra parameter and - pass the timeout for updating as per 2.5 - - fixes for ia64, now works - - fixes for x86-64 - - powerpc support from Gianni Tedesco <gianni@ecsc.co.uk> - - disable the NULL check in harness/cases/4.t on ia64: ia64 - maps the 0 page and causes this check to fail. - -0.3.15 - - use real syscall interface, but don't break source compatibility - yet (that will happen with 0.4.0) - -0.3.13 - - add test cases - -0.3.11 - - use library versioning of libredhat-kernel to always provide a - fallback - -0.3.9 - - add io_queue_release function - -0.3.8 - - make clean deletes libredhat-kernel.so.1 - - const struct timespec * - - add make srpm target - -0.3.7 - - fix assembly function .types - - export io_getevents - - fix io_submit function prototype to match the kernel - - provide /usr/lib/libredhat-kernel.so link for compilation - (do NOT link against libredhat-kernel.so directly) - - fix soname to libaio.so.1 - - fix dummy libredhat-kernel's soname - - work around nfs bug - - provide and install libredhat-kernel.so.1 stub - - Makefile improvements - - make sure dummy libredhat-kernel.so only returns -ENOSYS - diff --git a/fstests-bld/libaio/INSTALL b/fstests-bld/libaio/INSTALL deleted file mode 100644 index 29b90779..00000000 --- a/fstests-bld/libaio/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -To install the library, execute the command: - - make prefix=`pwd`/usr install - -which will install the binaries and header files into the directory -usr. Set prefix=/usr to get them installed into the main system. - -Please note: Do not attempt to install on the system the -"libredhat-kernel.so" file. It is a dummy shared library -provided only for the purpose of being able to bootstrap -this facility while running on systems without the correct -libredhat-kernel.so built. The contents of the included -libredhat-kernel.so are only stubs; this library is NOT -functional for anything except the internal purpose of -linking libaio.so against the provided stubs. At runtime, -libaio.so requires a real libredhat-kernel.so library; this -is provided by the Red Hat kernel RPM packages with async -I/O functionality. diff --git a/fstests-bld/libaio/Makefile b/fstests-bld/libaio/Makefile deleted file mode 100644 index 0a197638..00000000 --- a/fstests-bld/libaio/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -NAME=libaio -SPECFILE=$(NAME).spec -VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) -RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE)) -CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) -RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") - -prefix=/usr -includedir=$(prefix)/include -libdir=$(prefix)/lib - -pkgname := libaio -ver := $(shell cat .version) - -version_dirty := $(strip $(shell git diff | lsdiff | grep ".version")) -dirty := $(strip $(shell git whatchanged ${pkgname}-${ver}... 2>/dev/null)) -new_changes := $(strip $(shell git diff 2>/dev/null)) -tag_valid := $(strip $(shell git tag -l ${pkgname}-${ver})) - -default: all - -all: - @$(MAKE) -C src - -install: - @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) - -check: - @$(MAKE) -C harness check - -partcheck: all - @$(MAKE) -C harness partcheck - -clean: - @if test -f src/Makefile; then $(MAKE) -C src clean ; fi - @$(MAKE) -C harness clean - -tag: tag-checks - git tag ${pkgname}-${ver} - -archive: uptodate - @echo "Creating archive from version ${pkgname}-${ver}:" - git archive --format=tar --prefix=${pkgname}-${ver}/ \ - ${pkgname}-${ver} | gzip > ${pkgname}-${ver}.tar.gz -tag-checks: -ifneq (${version_dirty},) - @echo "Error: .version is not committed to the repository." - @exit 1 -endif -ifneq (${new_changes},) - @echo "Error: there are changes in this checkout that have not been" - @echo "committed to the repository." - @exit 1 -endif - -uptodate: tag-checks -ifneq (${dirty},) - @echo -n "Error: this branch contains changes that are not part of tag " - @echo "${pkgname}-${ver}." - @echo -n "Try running git-whatchanged ${pkgname}-${ver}... to see " - @echo "the changes." - @exit 1 -endif -ifeq (${tag_valid},) - @echo "Error: tag ${pkgname}-${ver} does not exist. Run 'make tag'" - @echo "and try again." - @exit 1 -endif - -srpm: archive - $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE) diff --git a/fstests-bld/libaio/TODO b/fstests-bld/libaio/TODO deleted file mode 100644 index 0a9ac15b..00000000 --- a/fstests-bld/libaio/TODO +++ /dev/null @@ -1,4 +0,0 @@ -- Write man pages. -- Make -static links against libaio work. -- Fallback on userspace if the kernel calls return -ENOSYS. - diff --git a/fstests-bld/libaio/configure b/fstests-bld/libaio/configure deleted file mode 100755 index e56d25f0..00000000 --- a/fstests-bld/libaio/configure +++ /dev/null @@ -1,3796 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="libaio.spec" -ac_subst_vars='LTLIBOBJS -LIBOBJS -RANLIB -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_aux_dir= -for ac_dir in ../e2fsprogs-libs/config "$srcdir"/../e2fsprogs-libs/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../e2fsprogs-libs/config \"$srcdir\"/../e2fsprogs-libs/config" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -ac_config_files="$ac_config_files src/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/fstests-bld/libaio/configure.ac b/fstests-bld/libaio/configure.ac deleted file mode 100644 index dc45a8ef..00000000 --- a/fstests-bld/libaio/configure.ac +++ /dev/null @@ -1,9 +0,0 @@ -AC_INIT(libaio.spec) -AC_PREREQ(2.59) - -AC_CONFIG_AUX_DIR(../e2fsprogs-libs/config) - -AC_PROG_CC -AC_PROG_RANLIB - -AC_OUTPUT(src/Makefile) diff --git a/fstests-bld/libaio/harness/Makefile b/fstests-bld/libaio/harness/Makefile deleted file mode 100644 index 0bb8e3d7..00000000 --- a/fstests-bld/libaio/harness/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# foo. -TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2) -EXTRAPROGS:=cases/8.p cases/10.p -PARTPROGS:=$(filter-out $(EXTRAPROGS), $(patsubst %.t,%.p,$(TEST_SRCS))) -PROGS:=$(PARTPROGS) $(EXTRAPROGS) -HARNESS_SRCS:=main.c -# io_queue.c - -CFLAGS=-Wall -Werror -I../src -g -O -#-lpthread -lrt - -all: $(PROGS) - -$(PROGS): %.p: %.t $(HARNESS_SRCS) - $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a - -clean: - rm -f $(PROGS) *.o runtests.out rofile wofile rwfile - -.PHONY: - -testdir/rofile: testdir .PHONY - rm -f $@ - echo "test" >$@ - chmod 400 $@ - -testdir/wofile: testdir .PHONY - rm -f $@ - echo "test" >$@ - chmod 200 $@ - -testdir/rwfile: testdir .PHONY - rm -f $@ - echo "test" >$@ - chmod 600 $@ - -testdir testdir.enospc testdir.ext2: - mkdir $@ - -root: .PHONY - @if [ `id -u` -ne 0 ]; then echo Need root for check, try partcheck >&2; exit 1; fi - -partcheck: $(PARTPROGS) testdir/rofile testdir/rwfile testdir/wofile - ./runtests.sh $(PARTPROGS) - -ext2.img: - dd if=/dev/zero bs=1M count=10 of=$@ - mke2fs -F -b 4096 $@ - -extracheck: $(EXTRAPROGS) root testdir.ext2 testdir.enospc ext2.img - mount -o loop -t ext2 ext2-enospc.img testdir.enospc - ./runtests.sh cases/10.p; ret=$$?; umount testdir.enospc; exit $$ret - mount -o loop -t ext2 ext2.img testdir.ext2 - ./runtests.sh cases/8.p; ret=$$?; umount testdir.ext2; exit $$ret - -check: partcheck extracheck diff --git a/fstests-bld/libaio/harness/README b/fstests-bld/libaio/harness/README deleted file mode 100644 index 55573705..00000000 --- a/fstests-bld/libaio/harness/README +++ /dev/null @@ -1,19 +0,0 @@ -Notes on running this test suite: - -To run the test suite, run "make check". All test cases should pass -and there should be 0 fails. - -Several of the test cases require a directory on the filesystem under -test for the creation of test files, as well as the generation of -error conditions. The test cases assume the directories (or symlinks -to directories) are as follows: - - testdir/ - - used for general read/write test cases. Must have at - least as much free space as the machine has RAM (up - to 768MB). - testdir.enospc/ - - a filesystem that has space for writing 8KB out, but - fails with -ENOSPC beyond 8KB. - testdir.ext2/ - - must be an ext2 filesystem. diff --git a/fstests-bld/libaio/harness/attic/0.t b/fstests-bld/libaio/harness/attic/0.t deleted file mode 100644 index 033e62c1..00000000 --- a/fstests-bld/libaio/harness/attic/0.t +++ /dev/null @@ -1,9 +0,0 @@ -/* 0.t - Test harness check: okay. -*/ -int test_main(void) -{ - printf("test_main: okay\n"); - return 0; -} - diff --git a/fstests-bld/libaio/harness/attic/1.t b/fstests-bld/libaio/harness/attic/1.t deleted file mode 100644 index 799ffd17..00000000 --- a/fstests-bld/libaio/harness/attic/1.t +++ /dev/null @@ -1,9 +0,0 @@ -/* 1.t - Test harness check: fail. -*/ -int test_main(void) -{ - printf("test_main: fail\n"); - return 1; -} - diff --git a/fstests-bld/libaio/harness/cases/10.t b/fstests-bld/libaio/harness/cases/10.t deleted file mode 100644 index 9d3beb2f..00000000 --- a/fstests-bld/libaio/harness/cases/10.t +++ /dev/null @@ -1,53 +0,0 @@ -/* 10.t - uses testdir.enospc/rwfile -- Check results on out-of-space and out-of-quota. (10.t) - - write that fills filesystem but does not go over should succeed - - write that fills filesystem and goes over should be partial - - write to full filesystem should return -ENOSPC - - read beyond end of file after ENOSPC should return 0 -*/ -#include "aio_setup.h" - -#include <sys/time.h> -#include <sys/resource.h> -#include <unistd.h> - -int test_main(void) -{ -/* Note: changing either of these requires updating the ext2-enospc.img - * filesystem image. Also, if SIZE is less than PAGE_SIZE, problems - * crop up due to ext2's preallocation. - */ -#define LIMIT 65536 -#define SIZE 65536 - char *buf; - int rwfd; - int status = 0, res; - - rwfd = open("testdir.enospc/rwfile", O_RDWR|O_CREAT|O_TRUNC, 0600); - assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - buf = malloc(SIZE); assert(buf != NULL); - memset(buf, 0, SIZE); - - - status |= attempt_rw(rwfd, buf, SIZE, LIMIT-SIZE, WRITE, SIZE); - status |= attempt_rw(rwfd, buf, SIZE, LIMIT-SIZE, READ, SIZE); - - status |= attempt_rw(rwfd, buf, SIZE, LIMIT, WRITE, -ENOSPC); - status |= attempt_rw(rwfd, buf, SIZE, LIMIT, READ, 0); - - res = ftruncate(rwfd, 0); assert(res == 0); - - status |= attempt_rw(rwfd, buf, SIZE, 1+LIMIT-SIZE, WRITE, SIZE-1); - status |= attempt_rw(rwfd, buf, SIZE, 1+LIMIT-SIZE, READ, SIZE-1); - status |= attempt_rw(rwfd, buf, SIZE, LIMIT, READ, 0); - - status |= attempt_rw(rwfd, buf, SIZE, LIMIT, WRITE, -ENOSPC); - status |= attempt_rw(rwfd, buf, SIZE, LIMIT, READ, 0); - status |= attempt_rw(rwfd, buf, 0, LIMIT, WRITE, 0); - - res = close(rwfd); assert(res == 0); - res = unlink("testdir.enospc/rwfile"); assert(res == 0); - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/11.t b/fstests-bld/libaio/harness/cases/11.t deleted file mode 100644 index efcf6d45..00000000 --- a/fstests-bld/libaio/harness/cases/11.t +++ /dev/null @@ -1,39 +0,0 @@ -/* 11.t - uses testdir/rwfile -- repeated read / write of same page (to check accounting) (11.t) -*/ -#include "aio_setup.h" - -#include <sys/time.h> -#include <sys/resource.h> -#include <unistd.h> - -int test_main(void) -{ -#define COUNT 1000000 -#define SIZE 256 - char *buf; - int rwfd; - int status = 0; - int i; - - rwfd = open("testdir/rwfile", O_RDWR|O_CREAT|O_TRUNC, 0600); - assert(rwfd != -1); - buf = malloc(SIZE); assert(buf != NULL); - memset(buf, 0, SIZE); - - for (i=0; i<COUNT; i++) { - status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE_SILENT, SIZE); - if (status) - break; - } - printf("completed %d out of %d writes\n", i, COUNT); - for (i=0; i<COUNT; i++) { - status |= attempt_rw(rwfd, buf, SIZE, 0, READ_SILENT, SIZE); - if (status) - break; - } - printf("completed %d out of %d reads\n", i, COUNT); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/12.t b/fstests-bld/libaio/harness/cases/12.t deleted file mode 100644 index e87d1dc1..00000000 --- a/fstests-bld/libaio/harness/cases/12.t +++ /dev/null @@ -1,53 +0,0 @@ -/* 12.t -- ioctx access across fork() (12.t) - */ -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> -#include <signal.h> - -#include "aio_setup.h" - -void test_child(void) -{ - int res; - res = attempt_io_submit(io_ctx, 0, NULL, -EINVAL); - fflush(stdout); - _exit(res); -} - -int test_main(void) -{ - int res, status; - pid_t pid; - sigset_t set; - - if (attempt_io_submit(io_ctx, 0, NULL, 0)) - return 1; - - sigemptyset(&set); - sigaddset(&set, SIGCHLD); - sigprocmask(SIG_BLOCK, &set, NULL); - - fflush(NULL); - pid = fork(); assert(pid != -1); - - if (pid == 0) - test_child(); - - res = waitpid(pid, &status, 0); - - if (WIFEXITED(status)) { - int failed = (WEXITSTATUS(status) != 0); - printf("child exited with status %d%s\n", WEXITSTATUS(status), - failed ? " -- FAILED" : ""); - return failed; - } - - /* anything else: failed */ - if (WIFSIGNALED(status)) - printf("child killed by signal %d -- FAILED.\n", - WTERMSIG(status)); - - return 1; -} diff --git a/fstests-bld/libaio/harness/cases/13.t b/fstests-bld/libaio/harness/cases/13.t deleted file mode 100644 index 5f18005b..00000000 --- a/fstests-bld/libaio/harness/cases/13.t +++ /dev/null @@ -1,66 +0,0 @@ -/* 13.t - uses testdir/rwfile -- Submit multiple writes larger than aio-max-size (deadlocks on older - aio code) -*/ -#include "aio_setup.h" - -#include <sys/time.h> -#include <sys/resource.h> -#include <unistd.h> - -int test_main(void) -{ -#define SIZE (1024 * 1024) -#define IOS 8 - struct iocb iocbs[IOS]; - struct iocb *iocb_list[IOS]; - char *bufs[IOS]; - int rwfd; - int status = 0, res; - int i; - - rwfd = open("testdir/rwfile", O_RDWR|O_CREAT|O_TRUNC, 0600); - assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - - for (i=0; i<IOS; i++) { - bufs[i] = malloc(SIZE); - assert(bufs[i] != NULL); - memset(bufs[i], 0, SIZE); - - io_prep_pwrite(&iocbs[i], rwfd, bufs[i], SIZE, i * SIZE); - iocb_list[i] = &iocbs[i]; - } - - status |= attempt_io_submit(io_ctx, IOS, iocb_list, IOS); - - for (i=0; i<IOS; i++) { - struct timespec ts = { tv_sec: 30, tv_nsec: 0 }; - struct io_event event; - struct iocb *iocb; - - res = io_getevents(io_ctx, 0, 1, &event, &ts); - if (res != 1) { - status |= 1; - printf("io_getevents failed [%d] with res=%d [%s]\n", - i, res, (res < 0) ? strerror(-res) : "okay"); - break; - } - - if (event.res != SIZE) - status |= 1; - - iocb = (void *)event.obj; - printf("event[%d]: write[%d] %s, returned: %ld [%s]\n", - i, (int)(iocb - &iocbs[0]), - (event.res != SIZE) ? "failed" : "okay", - (long)event.res, - (event.res < 0) ? strerror(-event.res) : "okay" - ); - } - - res = ftruncate(rwfd, 0); assert(res == 0); - res = close(rwfd); assert(res == 0); - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/14.t b/fstests-bld/libaio/harness/cases/14.t deleted file mode 100644 index 87773e39..00000000 --- a/fstests-bld/libaio/harness/cases/14.t +++ /dev/null @@ -1,93 +0,0 @@ -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> -#include <signal.h> - -#include "aio_setup.h" -#include <sys/mman.h> - -#define SIZE 768*1024*1024 - -//just submit an I/O - -int test_child(void) -{ - char *buf; - int rwfd; - int res; - long size; - struct iocb iocb; - struct iocb *iocbs[] = { &iocb }; - int loop = 10; - int i; - - aio_setup(1024); - - size = SIZE; - - printf("size = %ld\n", size); - - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != --1); - res = ftruncate(rwfd, 0); assert(res == 0); - buf = malloc(size); assert(buf != -NULL); - - for(i=0;i<loop;i++) { - - switch(i%2) { - case 0: - io_prep_pwrite(&iocb, rwfd, buf, size, 0); - break; - case 1: - io_prep_pread(&iocb, rwfd, buf, size, 0); - } - - res = io_submit(io_ctx, 1, iocbs); - if (res != 1) { - printf("child: submit: io_submit res=%d [%s]\n", res, -strerror(-res)); - _exit(1); - } - } - - res = ftruncate(rwfd, 0); assert(res == 0); - - _exit(0); -} - -/* from 12.t */ -int test_main(void) -{ - int res, status; - pid_t pid; - sigset_t set; - - if (attempt_io_submit(io_ctx, 0, NULL, 0)) - return 1; - - sigemptyset(&set); - sigaddset(&set, SIGCHLD); - sigprocmask(SIG_BLOCK, &set, NULL); - fflush(NULL); - pid = fork(); assert(pid != -1); - - if (pid == 0) - test_child(); - - res = waitpid(pid, &status, 0); - - if (WIFEXITED(status)) { - int failed = (WEXITSTATUS(status) != 0); - printf("child exited with status %d%s\n", WEXITSTATUS(status), - failed ? " -- FAILED" : ""); - return failed; - } - - /* anything else: failed */ - if (WIFSIGNALED(status)) - printf("child killed by signal %d -- FAILED.\n", - WTERMSIG(status)); - - return 1; -} diff --git a/fstests-bld/libaio/harness/cases/15.t b/fstests-bld/libaio/harness/cases/15.t deleted file mode 100644 index 933d008b..00000000 --- a/fstests-bld/libaio/harness/cases/15.t +++ /dev/null @@ -1,94 +0,0 @@ -/* 15.t -- pwritev and preadv tests. -*/ -#include "aio_setup.h" -#include <sys/mman.h> -#include <sys/uio.h> -#include <errno.h> - -int test_main(void) -{ -#define SIZE 512 -#define NUM_IOV 10 - char buf[SIZE*NUM_IOV]; - struct iovec iov[NUM_IOV]; - int rwfd; - int status = 0, res, i; - - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != -1); - res = ftruncate(rwfd, sizeof(buf)); assert(res == 0); - - for (i = 0; i < NUM_IOV; i++) { - iov[i].iov_base = buf + i*SIZE; - iov[i].iov_len = SIZE; - memset(iov[i].iov_base, i, SIZE); - } - status |= attempt_rw(rwfd, iov, NUM_IOV, 0, WRITEV, SIZE*NUM_IOV); - res = pread(rwfd, buf, sizeof(buf), 0); assert(res == sizeof(buf)); - for (i = 0; i < NUM_IOV; i++) { - unsigned int j; - for (j = 0; j < SIZE; j++) { - if (buf[i*SIZE + j] != i) { - printf("Unexpected value after writev at %i\n", - i*SIZE + j); - status |= 1; - break; - } - } - } - if (!status) - printf("Checking memory: [Success]\n"); - - memset(buf, 0, sizeof(buf)); - status |= attempt_rw(rwfd, iov, NUM_IOV, 0, READV, SIZE*NUM_IOV); - for (i = 0; i < NUM_IOV; i++) { - unsigned int j; - for (j = 0; j < SIZE; j++) { - if (buf[i*SIZE + j] != i) { - printf("Unexpected value after readv at %i\n", - i*SIZE + j); - status |= 1; - break; - } - } - } - - /* Check that offset works. */ - status |= attempt_rw(rwfd, iov+1, NUM_IOV-1, SIZE, WRITEV, - SIZE*(NUM_IOV-1)); - memset(buf, 0, sizeof(buf)); - res = pread(rwfd, buf, sizeof(buf), 0); assert(res == sizeof(buf)); - for (i = 1; i < NUM_IOV; i++) { - unsigned int j; - for (j = 0; j < SIZE; j++) { - if (buf[i*SIZE + j] != i) { - printf("Unexpected value after offset writev at %i\n", - i*SIZE + j); - status |= 1; - break; - } - } - } - if (!status) - printf("Checking memory: [Success]\n"); - - memset(buf, 0, sizeof(buf)); - status |= attempt_rw(rwfd, iov+1, NUM_IOV-1, SIZE, READV, - SIZE*(NUM_IOV-1)); - for (i = 1; i < NUM_IOV; i++) { - unsigned int j; - for (j = 0; j < SIZE; j++) { - if (buf[i*SIZE + j] != i) { - printf("Unexpected value after offset readv at %i\n", - i*SIZE + j); - status |= 1; - break; - } - } - } - if (!status) - printf("Checking memory: [Success]\n"); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/16.t b/fstests-bld/libaio/harness/cases/16.t deleted file mode 100644 index c3157cc3..00000000 --- a/fstests-bld/libaio/harness/cases/16.t +++ /dev/null @@ -1,94 +0,0 @@ -/* 16.t -- eventfd tests. -*/ -#include <stdint.h> -#include <err.h> -#include <sys/syscall.h> /* For SYS_xxx definitions */ - -#ifndef SYS_eventfd -#if defined(__i386__) -#define SYS_eventfd 323 -#elif defined(__x86_64__) -#define SYS_eventfd 284 -#elif defined(__ia64__) -#define SYS_eventfd 1309 -#elif defined(__PPC__) -#define SYS_eventfd 307 -#elif defined(__s390__) -#define SYS_eventfd 318 -#elif defined(__alpha__) -#define SYS_eventfd 478 -#else -#error define SYS_eventfd for your arch! -#endif -#endif - -int test_main(void) -{ - /* 10 MB takes long enough that we would fail if eventfd - * returned immediately. */ -#define SIZE 10000000 - char *buf; - struct io_event io_event; - struct iocb iocb; - struct iocb *iocbs[] = { &iocb }; - int rwfd, efd; - int res; - io_context_t io_ctx; - uint64_t event; - struct timespec notime = { .tv_sec = 0, .tv_nsec = 0 }; - - buf = malloc(SIZE); assert(buf); - efd = syscall(SYS_eventfd, 0); - if (efd < 0) { - if (errno == ENOSYS) { - printf("No eventfd support. [SKIPPING]\n"); - exit(0); - } - err(1, "Failed to get eventfd"); - } - - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - memset(buf, 0x42, SIZE); - - /* Write test. */ - res = io_queue_init(1024, &io_ctx); assert(res == 0); - io_prep_pwrite(&iocb, rwfd, buf, SIZE, 0); - io_set_eventfd(&iocb, efd); - res = io_submit(io_ctx, 1, iocbs); assert(res == 1); - - alarm(30); - res = read(efd, &event, sizeof(event)); assert(res == sizeof(event)); - assert(event == 1); - - /* This should now be ready. */ - res = io_getevents(io_ctx, 0, 1, &io_event, ¬ime); - if (res != 1) - err(1, "io_getevents did not return 1 event after eventfd"); - assert(io_event.res == SIZE); - printf("eventfd write test [SUCCESS]\n"); - - /* Read test. */ - memset(buf, 0, SIZE); - io_prep_pread(&iocb, rwfd, buf, SIZE, 0); - io_set_eventfd(&iocb, efd); - res = io_submit(io_ctx, 1, iocbs); assert(res == 1); - - alarm(30); - res = read(efd, &event, sizeof(event)); assert(res == sizeof(event)); - assert(event == 1); - - /* This should now be ready. */ - res = io_getevents(io_ctx, 0, 1, &io_event, ¬ime); - if (res != 1) - err(1, "io_getevents did not return 1 event after eventfd"); - assert(io_event.res == SIZE); - - for (res = 0; res < SIZE; res++) - assert(buf[res] == 0x42); - printf("eventfd read test [SUCCESS]\n"); - - return 0; -} - diff --git a/fstests-bld/libaio/harness/cases/2.t b/fstests-bld/libaio/harness/cases/2.t deleted file mode 100644 index 3a0212d6..00000000 --- a/fstests-bld/libaio/harness/cases/2.t +++ /dev/null @@ -1,41 +0,0 @@ -/* 2.t -- io_setup (#2) - - with invalid context pointer - - with maxevents <= 0 - - with an already initialized ctxp -*/ - -int attempt(int n, io_context_t *ctxp, int expect) -{ - int res; - - printf("expect %3d: io_setup(%5d, %p) = ", expect, n, ctxp); - fflush(stdout); - res = io_setup(n, ctxp); - printf("%3d [%s]%s\n", res, strerror(-res), - (res != expect) ? " -- FAILED" : ""); - if (res != expect) - return 1; - - return 0; -} - -int test_main(void) -{ - io_context_t ctx; - int status = 0; - - ctx = NULL; - status |= attempt(-1000, KERNEL_RW_POINTER, -EFAULT); - status |= attempt( 1000, KERNEL_RW_POINTER, -EFAULT); - status |= attempt( 0, KERNEL_RW_POINTER, -EFAULT); - status |= attempt(-1000, &ctx, -EINVAL); - status |= attempt( -1, &ctx, -EINVAL); - status |= attempt( 0, &ctx, -EINVAL); - assert(ctx == NULL); - status |= attempt( 1, &ctx, 0); - status |= attempt( 1, &ctx, -EINVAL); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/3.t b/fstests-bld/libaio/harness/cases/3.t deleted file mode 100644 index 7773d80f..00000000 --- a/fstests-bld/libaio/harness/cases/3.t +++ /dev/null @@ -1,25 +0,0 @@ -/* 3.t -- io_submit/io_getevents with invalid addresses (3.t) - -*/ -#include "aio_setup.h" - -int test_main(void) -{ - struct iocb a, b; - struct iocb *good_ios[] = { &a, &b }; - struct iocb *bad1_ios[] = { NULL, &b }; - struct iocb *bad2_ios[] = { KERNEL_RW_POINTER, &a }; - int status = 0; - - status |= attempt_io_submit(BAD_CTX, 1, good_ios, -EINVAL); - status |= attempt_io_submit( io_ctx, 0, good_ios, 0); - status |= attempt_io_submit( io_ctx, 1, NULL, -EFAULT); - status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT); - status |= attempt_io_submit( io_ctx, 2, bad1_ios, -EFAULT); - status |= attempt_io_submit( io_ctx, 2, bad2_ios, -EFAULT); - status |= attempt_io_submit( io_ctx, -1, good_ios, -EINVAL); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/4.t b/fstests-bld/libaio/harness/cases/4.t deleted file mode 100644 index 972b4f24..00000000 --- a/fstests-bld/libaio/harness/cases/4.t +++ /dev/null @@ -1,72 +0,0 @@ -/* 4.t -- read of descriptor without read permission (4.t) -- write to descriptor without write permission (4.t) -- check that O_APPEND writes actually append - -*/ -#include "aio_setup.h" - -#define SIZE 512 -#define READ 'r' -#define WRITE 'w' -int attempt(int fd, void *buf, int count, long long pos, int rw, int expect) -{ - struct iocb iocb; - int res; - - switch(rw) { - case READ: io_prep_pread (&iocb, fd, buf, count, pos); break; - case WRITE: io_prep_pwrite(&iocb, fd, buf, count, pos); break; - } - - printf("expect %3d: (%c), res = ", expect, rw); - fflush(stdout); - res = sync_submit(&iocb); - printf("%3d [%s]%s\n", res, (res <= 0) ? strerror(-res) : "Success", - (res != expect) ? " -- FAILED" : ""); - if (res != expect) - return 1; - - return 0; -} - -int test_main(void) -{ - char buf[SIZE]; - int rofd, wofd, rwfd; - int status = 0, res; - - memset(buf, 0, SIZE); - - rofd = open("testdir/rofile", O_RDONLY); assert(rofd != -1); - wofd = open("testdir/wofile", O_WRONLY); assert(wofd != -1); - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != -1); - - status |= attempt(rofd, buf, SIZE, 0, WRITE, -EBADF); - status |= attempt(wofd, buf, SIZE, 0, READ, -EBADF); - status |= attempt(rwfd, buf, SIZE, 0, WRITE, SIZE); - status |= attempt(rwfd, buf, SIZE, 0, READ, SIZE); - status |= attempt(rwfd, buf, SIZE, -1, READ, -EINVAL); - status |= attempt(rwfd, buf, SIZE, -1, WRITE, -EINVAL); - - rwfd = open("testdir/rwfile", O_RDWR|O_APPEND); assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - status |= attempt(rwfd, buf, SIZE, 0, READ, 0); - status |= attempt(rwfd, "1234", 4, 0, WRITE, 4); - status |= attempt(rwfd, "5678", 4, 0, WRITE, 4); - memset(buf, 0, SIZE); - status |= attempt(rwfd, buf, SIZE, 0, READ, 8); - printf("read after append: [%s]\n", buf); - assert(memcmp(buf, "12345678", 8) == 0); - - status |= attempt(rwfd, KERNEL_RW_POINTER, SIZE, 0, READ, -EFAULT); - status |= attempt(rwfd, KERNEL_RW_POINTER, SIZE, 0, WRITE, -EFAULT); - - /* Some architectures map the 0 page. Ugh. */ -#if !defined(__ia64__) - status |= attempt(rwfd, NULL, SIZE, 0, WRITE, -EFAULT); -#endif - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/5.t b/fstests-bld/libaio/harness/cases/5.t deleted file mode 100644 index 2b4b4bb4..00000000 --- a/fstests-bld/libaio/harness/cases/5.t +++ /dev/null @@ -1,54 +0,0 @@ -/* 5.t -- Write from a mmap() of the same file. (5.t) -*/ -#include "aio_setup.h" -#include <sys/mman.h> -#include <errno.h> - -int test_main(void) -{ - int page_size = getpagesize(); -#define SIZE 512 - char *buf; - int rwfd; - int status = 0, res; - - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != -1); - res = ftruncate(rwfd, 512); assert(res == 0); - - buf = mmap(0, page_size, PROT_READ|PROT_WRITE, MAP_SHARED, rwfd, 0); - assert(buf != (char *)-1); - - status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); - status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); - - res = munmap(buf, page_size); assert(res == 0); - buf = mmap(0, page_size, PROT_READ|PROT_WRITE, MAP_SHARED, rwfd, 0); - assert(buf != (char *)-1); - - status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); - status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); - - res = munmap(buf, page_size); assert(res == 0); - buf = mmap(0, page_size, PROT_READ, MAP_SHARED, rwfd, 0); - assert(buf != (char *)-1); - - status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); - status |= attempt_rw(rwfd, buf, SIZE, 0, READ, -EFAULT); - - res = munmap(buf, page_size); assert(res == 0); - buf = mmap(0, page_size, PROT_WRITE, MAP_SHARED, rwfd, 0); - assert(buf != (char *)-1); - - status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); - - /* Whether PROT_WRITE is readable is arch-dependent. So compare - * against read result. */ - res = read(rwfd, buf, SIZE); - if (res < 0) - res = -errno; - status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/6.t b/fstests-bld/libaio/harness/cases/6.t deleted file mode 100644 index cea4b01c..00000000 --- a/fstests-bld/libaio/harness/cases/6.t +++ /dev/null @@ -1,57 +0,0 @@ -/* 6.t -- huge reads (pinned pages) (6.t) -- huge writes (6.t) -*/ -#include "aio_setup.h" -#include <sys/mman.h> - -long getmemsize(void) -{ - FILE *f = fopen("/proc/meminfo", "r"); - long size; - int gotit = 0; - char str[256]; - - assert(f != NULL); - while (NULL != fgets(str, 255, f)) { - str[255] = 0; - if (0 == memcmp(str, "MemTotal:", 9)) { - if (1 == sscanf(str + 9, "%ld", &size)) { - gotit = 1; - break; - } - } - } - fclose(f); - - assert(gotit != 0); - return size; -} - -int test_main(void) -{ - char *buf; - int rwfd; - int status = 0, res; - long size; - - size = getmemsize(); - printf("size = %ld\n", size); - assert(size >= (16 * 1024)); - if (size > (768 * 1024)) - size = 768 * 1024; - size *= 1024; - - rwfd = open("testdir/rwfile", O_RDWR); assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - buf = malloc(size); assert(buf != NULL); - - //memset(buf, 0, size); - status |= attempt_rw(rwfd, buf, size, 0, WRITE, size); - status |= attempt_rw(rwfd, buf, size, 0, READ, size); - - //res = ftruncate(rwfd, 0); assert(res == 0); - - return status; -} - diff --git a/fstests-bld/libaio/harness/cases/7.t b/fstests-bld/libaio/harness/cases/7.t deleted file mode 100644 index f877d8a0..00000000 --- a/fstests-bld/libaio/harness/cases/7.t +++ /dev/null @@ -1,30 +0,0 @@ -/* 7.t -- Write overlapping the file size rlimit boundary: should be a short - write. (7.t) -- Write at the file size rlimit boundary: should give EFBIG. (I think - the spec requires that you do NOT deliver SIGXFSZ in this case, where - you would do so for sync IO.) (7.t) -- Special case: a write of zero bytes at or beyond the file size rlimit - boundary must return success. (7.t) -*/ - -#include <sys/resource.h> -#include <signal.h> - -void SET_RLIMIT(long long limit) -{ - struct rlimit rlim; - int res; - - /* Seems that we do send SIGXFSZ, but hard to fix... */ - signal(SIGXFSZ, SIG_IGN); - rlim.rlim_cur = limit; assert(rlim.rlim_cur == limit); - rlim.rlim_max = limit; assert(rlim.rlim_max == limit); - - res = setrlimit(RLIMIT_FSIZE, &rlim); assert(res == 0); -} - -#define LIMIT 8192 -#define FILENAME "testdir/rwfile" - -#include "common-7-8.h" diff --git a/fstests-bld/libaio/harness/cases/8.t b/fstests-bld/libaio/harness/cases/8.t deleted file mode 100644 index e59199f3..00000000 --- a/fstests-bld/libaio/harness/cases/8.t +++ /dev/null @@ -1,28 +0,0 @@ -/* 8.t -- Ditto for the above three tests at the offset maximum (largest - possible ext2/3 file size.) (8.t) - */ -#include <sys/types.h> -#include <unistd.h> - -long long get_fs_limit(int fd) -{ - long long min = 0, max = 9223372036854775807LL; - char c = 0; - - while (max - min > 1) { - if (pwrite64(fd, &c, 1, (min + max) / 2) == -1) - max = (min + max) / 2; - else { - ftruncate(fd, 0); - min = (min + max) / 2; - } - } - return max; -} - -#define SET_RLIMIT(x) do ; while (0) -#define LIMIT get_fs_limit(rwfd) -#define FILENAME "testdir.ext2/rwfile" - -#include "common-7-8.h" diff --git a/fstests-bld/libaio/harness/cases/aio_setup.h b/fstests-bld/libaio/harness/cases/aio_setup.h deleted file mode 100644 index 19149154..00000000 --- a/fstests-bld/libaio/harness/cases/aio_setup.h +++ /dev/null @@ -1,108 +0,0 @@ -#include <time.h> -io_context_t io_ctx; -#define BAD_CTX ((io_context_t)-1) - -void aio_setup(int n) -{ - int res = io_queue_init(n, &io_ctx); - if (res != 0) { - printf("io_queue_setup(%d) returned %d (%s)\n", - n, res, strerror(-res)); - exit(3); - } -} - -int attempt_io_submit(io_context_t ctx, long nr, struct iocb *ios[], int expect) -{ - int res; - - printf("expect %3d: io_submit(%10p, %3ld, %10p) = ", expect, ctx, nr, ios); - fflush(stdout); - res = io_submit(ctx, nr, ios); - printf("%3d [%s]%s\n", res, (res <= 0) ? strerror(-res) : "", - (res != expect) ? " -- FAILED" : ""); - if (res != expect) - return 1; - - return 0; -} - -int sync_submit(struct iocb *iocb) -{ - struct io_event event; - struct iocb *iocbs[] = { iocb }; - int res; - - /* 30 second timeout should be enough */ - struct timespec ts; - ts.tv_sec = 30; - ts.tv_nsec = 0; - - res = io_submit(io_ctx, 1, iocbs); - if (res != 1) { - printf("sync_submit: io_submit res=%d [%s]\n", res, strerror(-res)); - return res; - } - - res = io_getevents(io_ctx, 0, 1, &event, &ts); - if (res != 1) { - printf("sync_submit: io_getevents res=%d [%s]\n", res, strerror(-res)); - return res; - } - return event.res; -} - -#define SETUP aio_setup(1024) - - -#define READ 'r' -#define WRITE 'w' -#define READ_SILENT 'R' -#define WRITE_SILENT 'W' -#define READV '<' -#define WRITEV '>' - -int attempt_rw(int fd, void *buf, int count, long long pos, int rw, int expect) -{ - struct iocb iocb; - int res; - int silent = 0; - - switch(rw) { - case READ_SILENT: - silent = 1; - case READ: - io_prep_pread (&iocb, fd, buf, count, pos); - break; - case WRITE_SILENT: - silent = 1; - case WRITE: - io_prep_pwrite(&iocb, fd, buf, count, pos); - break; - case WRITEV: - io_prep_pwritev(&iocb, fd, buf, count, pos); - break; - case READV: - io_prep_preadv(&iocb, fd, buf, count, pos); - break; - } - - if (!silent) { - printf("expect %5d: (%c), res = ", expect, rw); - fflush(stdout); - } - res = sync_submit(&iocb); - if (!silent || res != expect) { - if (silent) - printf("expect %5d: (%c), res = ", expect, rw); - printf("%5d [%s]%s\n", res, - (res <= 0) ? strerror(-res) : "Success", - (res != expect) ? " -- FAILED" : ""); - } - - if (res != expect) - return 1; - - return 0; -} - diff --git a/fstests-bld/libaio/harness/cases/common-7-8.h b/fstests-bld/libaio/harness/cases/common-7-8.h deleted file mode 100644 index fc54bbfe..00000000 --- a/fstests-bld/libaio/harness/cases/common-7-8.h +++ /dev/null @@ -1,38 +0,0 @@ -/* common-7-8.h -*/ -#include "aio_setup.h" - -#include <errno.h> -#include <unistd.h> - -#define SIZE 512 - -int test_main(void) -{ - char *buf; - int rwfd; - int status = 0, res; - long long limit; - - rwfd = open(FILENAME, O_RDWR|O_CREAT, 0600); assert(rwfd != -1); - res = ftruncate(rwfd, 0); assert(res == 0); - buf = malloc(SIZE); assert(buf != NULL); - memset(buf, 0, SIZE); - - limit = LIMIT; - - SET_RLIMIT(limit); - - status |= attempt_rw(rwfd, buf, SIZE, limit-SIZE, WRITE, SIZE); - status |= attempt_rw(rwfd, buf, SIZE, limit-SIZE, READ, SIZE); - - status |= attempt_rw(rwfd, buf, SIZE, 1+limit-SIZE, WRITE, SIZE-1); - status |= attempt_rw(rwfd, buf, SIZE, 1+limit-SIZE, READ, SIZE-1); - - status |= attempt_rw(rwfd, buf, SIZE, limit, WRITE, -EFBIG); - status |= attempt_rw(rwfd, buf, SIZE, limit, READ, 0); - status |= attempt_rw(rwfd, buf, 0, limit, WRITE, 0); - - return status; -} - diff --git a/fstests-bld/libaio/harness/ext2-enospc.img b/fstests-bld/libaio/harness/ext2-enospc.img Binary files differdeleted file mode 100644 index fa567450..00000000 --- a/fstests-bld/libaio/harness/ext2-enospc.img +++ /dev/null diff --git a/fstests-bld/libaio/harness/main.c b/fstests-bld/libaio/harness/main.c deleted file mode 100644 index 9ecd5da8..00000000 --- a/fstests-bld/libaio/harness/main.c +++ /dev/null @@ -1,40 +0,0 @@ -#define _GNU_SOURCE -#include <stdio.h> -#include <errno.h> -#include <assert.h> -#include <stdlib.h> - -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> - -#include <libaio.h> - -#if __LP64__ == 0 -#define KERNEL_RW_POINTER ((void *)0xc0010000) -#else -//#warning Not really sure where kernel memory is. Guessing. -#define KERNEL_RW_POINTER ((void *)0xffffffff81000000) -#endif - - -char test_name[] = TEST_NAME; - -#include TEST_NAME - -int main(void) -{ - int res; - -#if defined(SETUP) - SETUP; -#endif - - res = test_main(); - printf("test %s completed %s.\n", test_name, - res ? "FAILED" : "PASSED" - ); - fflush(stdout); - return res ? 1 : 0; -} diff --git a/fstests-bld/libaio/harness/runtests.sh b/fstests-bld/libaio/harness/runtests.sh deleted file mode 100755 index 717c72a6..00000000 --- a/fstests-bld/libaio/harness/runtests.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -passes=0 -fails=0 - -echo "Test run starting at" `date` - -while [ $# -ge 1 ] ; do - this_test=$1 - shift - echo "Starting $this_test" - $this_test 2>&1 - res=$? - if [ $res -eq 0 ] ; then str="" ; passes=$[passes + 1] ; else str=" -- FAILED" ; fails=$[fails + 1] ; fi - echo "Completed $this_test with $res$str". -done - -echo "Pass: $passes Fail: $fails" -echo "Test run complete at" `date` diff --git a/fstests-bld/libaio/libaio.spec b/fstests-bld/libaio/libaio.spec deleted file mode 100644 index 32b0d42a..00000000 --- a/fstests-bld/libaio/libaio.spec +++ /dev/null @@ -1,196 +0,0 @@ -Name: libaio -Version: 0.3.109 -Release: 1 -Summary: Linux-native asynchronous I/O access library -License: LGPL -Group: System Environment/Libraries -Source: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-root -# Fix ExclusiveArch as we implement this functionality on more architectures -ExclusiveArch: i386 x86_64 ia64 s390 s390x ppc ppc64 ppc64pseries ppc64iseries alpha alphaev6 %{arm} - -%description -The Linux-native asynchronous I/O facility ("async I/O", or "aio") has a -richer API and capability set than the simple POSIX async I/O facility. -This library, libaio, provides the Linux-native API for async I/O. -The POSIX async I/O facility requires this library in order to provide -kernel-accelerated async I/O capabilities, as do applications which -require the Linux-native async I/O API. - -%package devel -Summary: Development files for Linux-native asynchronous I/O access -Group: Development/System -Requires: libaio -Provides: libaio.so.1 - -%description devel -This package provides header files to include and libraries to link with -for the Linux-native asynchronous I/O facility ("async I/O", or "aio"). - -%prep -%setup - -%build -make - -%install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -make install prefix=$RPM_BUILD_ROOT/usr \ - libdir=$RPM_BUILD_ROOT/%{_libdir} \ - root=$RPM_BUILD_ROOT - -%clean -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(-,root,root) -%attr(0755,root,root) %{_libdir}/libaio.so.* -%doc COPYING TODO - -%files devel -%defattr(-,root,root) -%attr(0644,root,root) %{_includedir}/* -%attr(0755,root,root) %{_libdir}/libaio.so -%attr(0644,root,root) %{_libdir}/libaio.a - -%changelog -* Tue Jun 9 2009 Jeff Moyer <jmoyer@redhat.com> - 0.3.108-1 -- add ARM architecture support (grabbed from Debian arches tree) -- replace check of __i386__ with __LP64__ in test harness (Jeff Moyer) -- change the .spec's copyright tag to license - -* Wed Jan 9 2008 Jeff Moyer <jmoyer@redhat.com> - 0.3.107-1 -- Fix the test harness (Rusty Russell) -- Add eventfd support (Rusty Russell) - -* Tue Jan 3 2006 Jeff Moyer <jmoyer@redhat.com> - 0.3.106-1 -- Add a .proc directive for the ia64_aio_raw_syscall macro. This sounds a lot - like the previous entry, but that one fixed the __ia64_raw_syscall macro, - located in syscall-ia64.h. This macro is in raw_syscall.c, which pretty much - only exists for ia64. This bug prevented the package from building with - newer version of gcc. - -* Mon Aug 1 2005 Jeff Moyer <jmoyer@redhat.com> - 0.3.105-1 -- Add a .proc directive for the ia64 raw syscall macro. - -* Fri Apr 1 2005 Jeff Moyer <jmoyer@redhat.com> - 0.3.104-1 -- Add Alpha architecture support. (Sergey Tikhonov <tsv@solvo.ru>) - -* Tue Jan 25 2005 Jeff Moyer <jmoyer@redhat.com> - 0.3.103-1 -- Fix SONAME breakage. In changing file names around, I also changed the - SONAME, which is a no no. - -* Thu Oct 14 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.102-1 -- S390 asm had a bug; I forgot to update the clobber list. Lucky for me, - newer compilers complain about such things. -- Also update the s390 asm to look more like the new kernel variants. - -* Wed Oct 13 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.101-1 -- Revert syscall return values to be -ERRNO. This was an inadvertant bug - introduced when clobber lists changed. -- add ppc64pseries and ppc64iseries to exclusivearch - -* Tue Sep 14 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.100-1 -- Switch around the tests for _PPC_ and _powerpc64_ so that the ppc64 - platforms get the right padding. - -* Wed Jul 14 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.99-4 -- Ok, there was a race in moving the cvs module. Someone rebuild from - the old cvs into fc3. *sigh* bumping rev. - -* Wed Jul 14 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.99-3 -- Actually provide libaio.so.1. - -* Tue Mar 30 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.99-2 -- Apparently the 0.3.93 patch was not meant for 0.3.96. Backed it out. - -* Tue Mar 30 2004 Jeff Moyer <jmoyer@redhat.com> - 0.3.99-1 -- Fix compat calls. -- make library .so.1.0.0 and make symlinks properly. -- Fix header file for inclusion in c++ code. - -* Thu Feb 26 2004 Jeff Moyer <jmoyer@redhat.com> 0.3.98-2 -- bah. fix version nr in changelog. - -* Thu Feb 26 2004 Jeff Moyer <jmoyer@redhat.com> 0.3.98-1 -- fix compiler warnings. - -* Thu Feb 26 2004 Jeff Moyer <jmoyer@redhat.com> 0.3.97-2 -- make srpm was using rpm to do a build. changed that to use rpmbuild if - it exists, and fallback to rpm if it doesn't. - -* Tue Feb 24 2004 Jeff Moyer <jmoyer@redhat.com> 0.3.97-1 -- Use libc syscall(2) instead of rolling our own calling mechanism. This - change is inspired due to a failure to build with newer gcc, since clobber - lists were wrong. -- Add -fpic to the CFLAGS for all architectures. Should address bz #109457. -- change a #include from <linux/types.h> to <sys/types.h>. Fixes a build - issue on s390. - -* Wed Jul 7 2003 Bill Nottingham <notting@redhat.com> 0.3.96-3 -- fix paths on lib64 arches - -* Wed Jun 18 2003 Michael K. Johnson <johnsonm@redhat.com> 0.3.96-2 -- optimization in io_getevents from Arjan van de Ven in 0.3.96-1 -- deal with ia64 in 0.3.96-2 - -* Wed May 28 2003 Michael K. Johnson <johnsonm@redhat.com> 0.3.95-1 -- ppc bugfix from Julie DeWandel - -* Tue May 20 2003 Michael K. Johnson <johnsonm@redhat.com> 0.3.94-1 -- symbol versioning fix from Ulrich Drepper - -* Mon Jan 27 2003 Benjamin LaHaise <bcrl@redhat.com> -- bump to 0.3.93-3 for rebuild. - -* Mon Dec 16 2002 Benjamin LaHaise <bcrl@redhat.com> -- libaio 0.3.93 test release -- add powerpc support from Gianni Tedesco <gianni@ecsc.co.uk> -- add s/390 support from Arnd Bergmann <arnd@bergmann-dalldorf.de> - -* Fri Sep 12 2002 Benjamin LaHaise <bcrl@redhat.com> -- libaio 0.3.92 test release -- build on x86-64 - -* Thu Sep 12 2002 Benjamin LaHaise <bcrl@redhat.com> -- libaio 0.3.91 test release -- build on ia64 -- remove libredhat-kernel from the .spec file - -* Thu Sep 5 2002 Benjamin LaHaise <bcrl@redhat.com> -- libaio 0.3.90 test release - -* Mon Apr 29 2002 Benjamin LaHaise <bcrl@redhat.com> -- add requires initscripts >= 6.47-1 to get boot time libredhat-kernel - linkage correct. -- typo fix - -* Thu Apr 25 2002 Benjamin LaHaise <bcrl@redhat.com> -- make /usr/lib/libredhat-kernel.so point to /lib/libredhat-kernel.so.1.0.0 - -* Mon Apr 15 2002 Tim Powers <timp@redhat.com> -- make the post scriptlet not use /bin/sh - -* Sat Apr 12 2002 Benjamin LaHaise <bcrl@redhat.com> -- add /lib/libredhat-kernel* to %files. - -* Fri Apr 12 2002 Benjamin LaHaise <bcrl@redhat.com> -- make the dummy install as /lib/libredhat-kernel.so.1.0.0 so - that ldconfig will link against it if no other is installed. - -* Tue Jan 22 2002 Benjamin LaHaise <bcrl@redhat.com> -- add io_getevents - -* Tue Jan 22 2002 Michael K. Johnson <johnsonm@redhat.com> -- Make linker happy with /usr/lib symlink for libredhat-kernel.so - -* Mon Jan 21 2002 Michael K. Johnson <johnsonm@redhat.com> -- Added stub library - -* Sun Jan 20 2002 Michael K. Johnson <johnsonm@redhat.com> -- Initial packaging diff --git a/fstests-bld/libaio/man/aio.3 b/fstests-bld/libaio/man/aio.3 deleted file mode 100644 index 6dc3c63a..00000000 --- a/fstests-bld/libaio/man/aio.3 +++ /dev/null @@ -1,315 +0,0 @@ -.TH aio 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio \- Asynchronous IO -.SH SYNOPSIS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.fi -.SH DESCRIPTION -The POSIX.1b standard defines a new set of I/O operations which can -significantly reduce the time an application spends waiting at I/O. The -new functions allow a program to initiate one or more I/O operations and -then immediately resume normal work while the I/O operations are -executed in parallel. This functionality is available if the -.IR "unistd.h" -file defines the symbol -.B "_POSIX_ASYNCHRONOUS_IO" -. - -These functions are part of the library with realtime functions named -.IR "librt" -. They are not actually part of the -.IR "libc" -binary. -The implementation of these functions can be done using support in the -kernel (if available) or using an implementation based on threads at -userlevel. In the latter case it might be necessary to link applications -with the thread library -.IR "libpthread" -in addition to -.IR "librt" -and -.IR "libaio" -. - -All AIO operations operate on files which were opened previously. There -might be arbitrarily many operations running for one file. The -asynchronous I/O operations are controlled using a data structure named -.IR "struct aiocb" -It is defined in -.IR "aio.h" - as follows. - -.nf -struct aiocb -{ - int aio_fildes; /* File desriptor. */ - int aio_lio_opcode; /* Operation to be performed. */ - int aio_reqprio; /* Request priority offset. */ - volatile void *aio_buf; /* Location of buffer. */ - size_t aio_nbytes; /* Length of transfer. */ - struct sigevent aio_sigevent; /* Signal number and value. */ - - /* Internal members. */ - struct aiocb *__next_prio; - int __abs_prio; - int __policy; - int __error_code; - __ssize_t __return_value; - -#ifndef __USE_FILE_OFFSET64 - __off_t aio_offset; /* File offset. */ - char __pad[sizeof (__off64_t) - sizeof (__off_t)]; -#else - __off64_t aio_offset; /* File offset. */ -#endif - char __unused[32]; -}; - -.fi -The POSIX.1b standard mandates that the -.IR "struct aiocb" -structure -contains at least the members described in the following table. There -might be more elements which are used by the implementation, but -depending upon these elements is not portable and is highly deprecated. - -.TP -.IR "int aio_fildes" -This element specifies the file descriptor to be used for the -operation. It must be a legal descriptor, otherwise the operation will -fail. - -The device on which the file is opened must allow the seek operation. -I.e., it is not possible to use any of the AIO operations on devices -like terminals where an -.IR "lseek" - call would lead to an error. -.TP -.IR "off_t aio_offset" -This element specifies the offset in the file at which the operation (input -or output) is performed. Since the operations are carried out in arbitrary -order and more than one operation for one file descriptor can be -started, one cannot expect a current read/write position of the file -descriptor. -.TP -.IR "volatile void *aio_buf" -This is a pointer to the buffer with the data to be written or the place -where the read data is stored. -.TP -.IR "size_t aio_nbytes" -This element specifies the length of the buffer pointed to by -.IR "aio_buf" -. -.TP -.IR "int aio_reqprio" -If the platform has defined -.B "_POSIX_PRIORITIZED_IO" -and -.B "_POSIX_PRIORITY_SCHEDULING" -, the AIO requests are -processed based on the current scheduling priority. The -.IR "aio_reqprio" -element can then be used to lower the priority of the -AIO operation. -.TP -.IR "struct sigevent aio_sigevent" -This element specifies how the calling process is notified once the -operation terminates. If the -.IR "sigev_notify" -element is -.B "SIGEV_NONE" -, no notification is sent. If it is -.B "SIGEV_SIGNAL" -, -the signal determined by -.IR "sigev_signo" -is sent. Otherwise, -.IR "sigev_notify" -must be -.B "SIGEV_THREAD" -. In this case, a thread -is created which starts executing the function pointed to by -.IR "sigev_notify_function" -. -.TP -.IR "int aio_lio_opcode" -This element is only used by the -.IR "lio_listio" - and -.IR "lio_listio64" - functions. Since these functions allow an -arbitrary number of operations to start at once, and each operation can be -input or output (or nothing), the information must be stored in the -control block. The possible values are: -.TP -.B "LIO_READ" -Start a read operation. Read from the file at position -.IR "aio_offset" - and store the next -.IR "aio_nbytes" - bytes in the -buffer pointed to by -.IR "aio_buf" -. -.TP -.B "LIO_WRITE" -Start a write operation. Write -.IR "aio_nbytes" -bytes starting at -.IR "aio_buf" -into the file starting at position -.IR "aio_offset" -. -.TP -.B "LIO_NOP" -Do nothing for this control block. This value is useful sometimes when -an array of -.IR "struct aiocb" -values contains holes, i.e., some of the -values must not be handled although the whole array is presented to the -.IR "lio_listio" -function. - -When the sources are compiled using -.B "_FILE_OFFSET_BITS == 64" -on a -32 bit machine, this type is in fact -.IR "struct aiocb64" -, since the LFS -interface transparently replaces the -.IR "struct aiocb" -definition. -.PP -For use with the AIO functions defined in the LFS, there is a similar type -defined which replaces the types of the appropriate members with larger -types but otherwise is equivalent to -.IR "struct aiocb" -. Particularly, -all member names are the same. - -.nf -/* The same for the 64bit offsets. Please note that the members aio_fildes - to __return_value have to be the same in aiocb and aiocb64. */ -#ifdef __USE_LARGEFILE64 -struct aiocb64 -{ - int aio_fildes; /* File desriptor. */ - int aio_lio_opcode; /* Operation to be performed. */ - int aio_reqprio; /* Request priority offset. */ - volatile void *aio_buf; /* Location of buffer. */ - size_t aio_nbytes; /* Length of transfer. */ - struct sigevent aio_sigevent; /* Signal number and value. */ - - /* Internal members. */ - struct aiocb *__next_prio; - int __abs_prio; - int __policy; - int __error_code; - __ssize_t __return_value; - - __off64_t aio_offset; /* File offset. */ - char __unused[32]; -}; - -.fi -.TP -.IR "int aio_fildes" -This element specifies the file descriptor which is used for the -operation. It must be a legal descriptor since otherwise the operation -fails for obvious reasons. -The device on which the file is opened must allow the seek operation. -I.e., it is not possible to use any of the AIO operations on devices -like terminals where an -.IR "lseek" - call would lead to an error. -.TP -.IR "off64_t aio_offset" -This element specifies at which offset in the file the operation (input -or output) is performed. Since the operation are carried in arbitrary -order and more than one operation for one file descriptor can be -started, one cannot expect a current read/write position of the file -descriptor. -.TP -.IR "volatile void *aio_buf" -This is a pointer to the buffer with the data to be written or the place -where the read data is stored. -.TP -.IR "size_t aio_nbytes" -This element specifies the length of the buffer pointed to by -.IR "aio_buf" -. -.TP -.IR "int aio_reqprio" -If for the platform -.B "_POSIX_PRIORITIZED_IO" -and -.B "_POSIX_PRIORITY_SCHEDULING" -are defined the AIO requests are -processed based on the current scheduling priority. The -.IR "aio_reqprio" -element can then be used to lower the priority of the -AIO operation. -.TP -.IR "struct sigevent aio_sigevent" -This element specifies how the calling process is notified once the -operation terminates. If the -.IR "sigev_notify" -, element is -.B "SIGEV_NONE" -no notification is sent. If it is -.B "SIGEV_SIGNAL" -, -the signal determined by -.IR "sigev_signo" -is sent. Otherwise, -.IR "sigev_notify" - must be -.B "SIGEV_THREAD" -in which case a thread -which starts executing the function pointed to by -.IR "sigev_notify_function" -. -.TP -.IR "int aio_lio_opcode" -This element is only used by the -.IR "lio_listio" -and -.IR "lio_listio64" -functions. Since these functions allow an -arbitrary number of operations to start at once, and since each operation can be -input or output (or nothing), the information must be stored in the -control block. See the description of -.IR "struct aiocb" -for a description -of the possible values. -.PP -When the sources are compiled using -.B "_FILE_OFFSET_BITS == 64" -on a -32 bit machine, this type is available under the name -.IR "struct aiocb64" -, since the LFS transparently replaces the old interface. -.SH "RETURN VALUES" -.SH ERRORS -.SH "SEE ALSO" -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_cancel.3 b/fstests-bld/libaio/man/aio_cancel.3 deleted file mode 100644 index 502c83c3..00000000 --- a/fstests-bld/libaio/man/aio_cancel.3 +++ /dev/null @@ -1,137 +0,0 @@ -.TH aio_cancel 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_cancel - Cancel asynchronous I/O requests -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_cancel (int fildes " , struct aiocb *aiocbp " )" -.fi -.SH DESCRIPTION -When one or more requests are asynchronously processed, it might be -useful in some situations to cancel a selected operation, e.g., if it -becomes obvious that the written data is no longer accurate and would -have to be overwritten soon. As an example, assume an application, which -writes data in files in a situation where new incoming data would have -to be written in a file which will be updated by an enqueued request. -The POSIX AIO implementation provides such a function, but this function -is not capable of forcing the cancellation of the request. It is up to the -implementation to decide whether it is possible to cancel the operation -or not. Therefore using this function is merely a hint. -.B "The libaio implementation does not implement the cancel operation in the" -.B "POSIX libraries". -.PP -The -.IR aio_cancel -function can be used to cancel one or more -outstanding requests. If the -.IR aiocbp -parameter is -.IR NULL -, the -function tries to cancel all of the outstanding requests which would process -the file descriptor -.IR fildes -(i.e., whose -.IR aio_fildes -member -is -.IR fildes -). If -.IR aiocbp is not -.IR NULL -, -.IR aio_cancel -attempts to cancel the specific request pointed to by -.IR aiocbp. - -For requests which were successfully canceled, the normal notification -about the termination of the request should take place. I.e., depending -on the -.IR "struct sigevent" -object which controls this, nothing -happens, a signal is sent or a thread is started. If the request cannot -be canceled, it terminates the usual way after performing the operation. -After a request is successfully canceled, a call to -.IR aio_error -with -a reference to this request as the parameter will return -.B ECANCELED -and a call to -.IR aio_return -will return -.IR -1. -If the request wasn't canceled and is still running the error status is -still -.B EINPROGRESS. -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -, this -function is in fact -.IR aio_cancel64 -since the LFS interface -transparently replaces the normal implementation. - -.SH "RETURN VALUES" -.TP -.B AIO_CANCELED -If there were -requests which haven't terminated and which were successfully canceled. -.TP -.B AIO_NOTCANCELED -If there is one or more requests left which couldn't be canceled, -. In this case -.IR aio_error -must be used to find out which of the, perhaps multiple, requests (in -.IR aiocbp -is -.IR NULL -) weren't successfully canceled. -.TP -.B AIO_ALLDONE -If all -requests already terminated at the time -.IR aio_cancel -is called the -return value is -. -.SH ERRORS -If an error occurred during the execution of -.IR aio_cancel -the -function returns -.IR -1 -and sets -.IR errno -to one of the following -values. -.TP -.B EBADF -The file descriptor -.IR fildes -is not valid. -.TP -.B ENOSYS -.IR aio_cancel -is not implemented. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_cancel64.3 b/fstests-bld/libaio/man/aio_cancel64.3 deleted file mode 100644 index ede775be..00000000 --- a/fstests-bld/libaio/man/aio_cancel64.3 +++ /dev/null @@ -1,50 +0,0 @@ -.TH aio_cancel64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_cancel64 \- Cancel asynchronous I/O requests -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_cancel64 (int fildes, struct aiocb64 *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to -.IR aio_cancel -with the only difference -that the argument is a reference to a variable of type -.IR struct aiocb64 -. - -When the sources are compiled with -.IR _FILE_OFFSET_BITS == 64 -, this -function is available under the name -.IR aio_cancel -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -See aio_cancel(3). -.SH ERRORS -See aio_cancel(3). -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_error.3 b/fstests-bld/libaio/man/aio_error.3 deleted file mode 100644 index 12b82cf8..00000000 --- a/fstests-bld/libaio/man/aio_error.3 +++ /dev/null @@ -1,81 +0,0 @@ -.TH aio_error 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_error \- Getting the Status of AIO Operations -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_error (const struct aiocb *aiocbp)" -.fi -.SH DESCRIPTION -The function -.IR aio_error -determines the error state of the request described by the -.IR "struct aiocb" -variable pointed to by -.I aiocbp -. - -When the operation is performed truly asynchronously (as with -.IR "aio_read" -and -.IR "aio_write" -and with -.IR "lio_listio" -when the mode is -.IR "LIO_NOWAIT" -), one sometimes needs to know whether a -specific request already terminated and if so, what the result was. -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this function is in fact -.IR "aio_error64" -since the LFS interface transparently replaces the normal implementation. -.SH "RETURN VALUES" -If the request has not yet terminated the value returned is always -.IR "EINPROGRESS" -. Once the request has terminated the value -.IR "aio_error" -returns is either -.I 0 -if the request completed successfully or it returns the value which would be stored in the -.IR "errno" -variable if the request would have been done using -.IR "read" -, -.IR "write" -, or -.IR "fsync" -. -.SH ERRORS -.TP -.IR "ENOSYS" -if it is not implemented. It -could also return -.TP -.IR "EINVAL" -if the -.I aiocbp -parameter does not -refer to an asynchronous operation whose return status is not yet known. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_error64.3 b/fstests-bld/libaio/man/aio_error64.3 deleted file mode 100644 index 3333161d..00000000 --- a/fstests-bld/libaio/man/aio_error64.3 +++ /dev/null @@ -1,64 +0,0 @@ -.TH aio_error64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_error64 \- Return errors -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_error64 (const struct aiocb64 *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to -.IR aio_error -with the only difference -that the argument is a reference to a variable of type -.IR "struct aiocb64". -.PP -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is available under the name -.IR aio_error -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -If the request has not yet terminated the value returned is always -.IR "EINPROGRESS" -. Once the request has terminated the value -.IR "aio_error" -returns is either -.I 0 -if the request completed successfully or it returns the value which would be stored in the -.IR "errno" -variable if the request would have been done using -.IR "read" -, -.IR "write" -, or -.IR "fsync" -. -.SH ERRORS -See -.IR aio_error(3). -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_fsync.3 b/fstests-bld/libaio/man/aio_fsync.3 deleted file mode 100644 index 637f0f63..00000000 --- a/fstests-bld/libaio/man/aio_fsync.3 +++ /dev/null @@ -1,139 +0,0 @@ -.TH aio_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_fsync \- Synchronize a file's complete in-core state with that on disk -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_fsync (int op, struct aiocb aiocbp)" -.fi -.SH DESCRIPTION -.PP -When dealing with asynchronous operations it is sometimes necessary to -get into a consistent state. This would mean for AIO that one wants to -know whether a certain request or a group of request were processed. -This could be done by waiting for the notification sent by the system -after the operation terminated, but this sometimes would mean wasting -resources (mainly computation time). Instead POSIX.1b defines two -functions which will help with most kinds of consistency. -.PP -The -.IR aio_fsync -and -.IR "aio_fsync64" -functions are only available -if the symbol -.IR "_POSIX_SYNCHRONIZED_IO" -is defined in -.I unistd.h -. - -Calling this function forces all I/O operations operating queued at the -time of the function call operating on the file descriptor -.IR "aiocbp->aio_fildes" -into the synchronized I/O completion state . The -.IR "aio_fsync" -function returns -immediately but the notification through the method described in -.IR "aiocbp->aio_sigevent" -will happen only after all requests for this -file descriptor have terminated and the file is synchronized. This also -means that requests for this very same file descriptor which are queued -after the synchronization request are not affected. - -If -.IR "op" -is -.IR "O_DSYNC" -the synchronization happens as with a call -to -.IR "fdatasync" -. Otherwise -.IR "op" -should be -.IR "O_SYNC" -and -the synchronization happens as with -.IR "fsync" -. - -As long as the synchronization has not happened, a call to -.IR "aio_error" -with the reference to the object pointed to by -.IR "aiocbp" -returns -.IR "EINPROGRESS" -. Once the synchronization is -done -.IR "aio_error" -return -.IR 0 -if the synchronization was not -successful. Otherwise the value returned is the value to which the -.IR "fsync" -or -.IR "fdatasync" -function would have set the -.IR "errno" -variable. In this case nothing can be assumed about the -consistency for the data written to this file descriptor. - -.SH "RETURN VALUES" -The return value of this function is -.IR 0 -if the request was -successfully enqueued. Otherwise the return value is -.IR -1 -and -.IR "errno". -.SH ERRORS -.TP -.B EAGAIN -The request could not be enqueued due to temporary lack of resources. -.TP -.B EBADF -The file descriptor -.IR "aiocbp->aio_fildes" -is not valid or not open -for writing. -.TP -.B EINVAL -The implementation does not support I/O synchronization or the -.IR "op" -parameter is other than -.IR "O_DSYNC" -and -.IR "O_SYNC" -. -.TP -.B ENOSYS -This function is not implemented. -.PP -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" - this -function is in fact -.IR "aio_return64" -since the LFS interface -transparently replaces the normal implementation. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_fsync64.3 b/fstests-bld/libaio/man/aio_fsync64.3 deleted file mode 100644 index 5dce22dd..00000000 --- a/fstests-bld/libaio/man/aio_fsync64.3 +++ /dev/null @@ -1,51 +0,0 @@ -.TH aio_fsync64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_fsync64 \- Synchronize a file's complete in-core state with that on disk -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_fsync64 (int op, struct aiocb64 *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to -.IR aio_fsync -with the only difference -that the argument is a reference to a variable of type -.IR "struct aiocb64". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is available under the name -.IR aio_fsync -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -See -.IR aio_fsync. -.SH ERRORS -See -.IR aio_fsync. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_init.3 b/fstests-bld/libaio/man/aio_init.3 deleted file mode 100644 index 3b0ec95a..00000000 --- a/fstests-bld/libaio/man/aio_init.3 +++ /dev/null @@ -1,96 +0,0 @@ -.TH aio_init 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_init \- How to optimize the AIO implementation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "void aio_init (const struct aioinit *init)" -.fi -.SH DESCRIPTION - -The POSIX standard does not specify how the AIO functions are -implemented. They could be system calls, but it is also possible to -emulate them at userlevel. - -At the point of this writing, the available implementation is a userlevel -implementation which uses threads for handling the enqueued requests. -While this implementation requires making some decisions about -limitations, hard limitations are something which is best avoided -in the GNU C library. Therefore, the GNU C library provides a means -for tuning the AIO implementation according to the individual use. - -.BI "struct aioinit" -.PP -This data type is used to pass the configuration or tunable parameters -to the implementation. The program has to initialize the members of -this struct and pass it to the implementation using the -.IR aio_init -function. -.TP -.B "int aio_threads" -This member specifies the maximal number of threads which may be used -at any one time. -.TP -.B "int aio_num" -This number provides an estimate on the maximal number of simultaneously -enqueued requests. -.TP -.B "int aio_locks" -Unused. -.TP -.B "int aio_usedba" -Unused. -.TP -.B "int aio_debug" -Unused. -.TP -.B "int aio_numusers" -Unused. -.TP -.B "int aio_reserved[2]" -Unused. -.PP -This function must be called before any other AIO function. Calling it -is completely voluntary, as it is only meant to help the AIO -implementation perform better. - -Before calling the -.IR aio_init -, function the members of a variable of -type -.IR "struct aioinit" -must be initialized. Then a reference to -this variable is passed as the parameter to -.IR aio_init -which itself -may or may not pay attention to the hints. - -It is a extension which follows a proposal from the SGI implementation in -.IR Irix 6 -. It is not covered by POSIX.1b or Unix98. -.SH "RETURN VALUES" -The function has no return value. -.SH ERRORS -The function has no error cases defined. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_read.3 b/fstests-bld/libaio/man/aio_read.3 deleted file mode 100644 index 5bcb6c8a..00000000 --- a/fstests-bld/libaio/man/aio_read.3 +++ /dev/null @@ -1,146 +0,0 @@ -.TH aio_read 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_read \- Initiate an asynchronous read operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_read (struct aiocb *aiocbp)" -.fi -.SH DESCRIPTION -This function initiates an asynchronous read operation. It -immediately returns after the operation was enqueued or when an -error was encountered. - -The first -.IR "aiocbp->aio_nbytes" -bytes of the file for which -.IR "aiocbp->aio_fildes" -is a descriptor are written to the buffer -starting at -.IR "aiocbp->aio_buf" -. Reading starts at the absolute -position -.IR "aiocbp->aio_offset" -in the file. - -If prioritized I/O is supported by the platform the -.IR "aiocbp->aio_reqprio" -value is used to adjust the priority before -the request is actually enqueued. - -The calling process is notified about the termination of the read -request according to the -.IR "aiocbp->aio_sigevent" -value. - -.SH "RETURN VALUES" -When -.IR "aio_read" -returns, the return value is zero if no error -occurred that can be found before the process is enqueued. If such an -early error is found, the function returns -.IR -1 -and sets -.IR "errno". - -.PP -If -.IR "aio_read" -returns zero, the current status of the request -can be queried using -.IR "aio_error" -and -.IR "aio_return" -functions. -As long as the value returned by -.IR "aio_error" -is -.IR "EINPROGRESS" -the operation has not yet completed. If -.IR "aio_error" -returns zero, -the operation successfully terminated, otherwise the value is to be -interpreted as an error code. If the function terminated, the result of -the operation can be obtained using a call to -.IR "aio_return" -. The -returned value is the same as an equivalent call to -.IR "read" -would -have returned. -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is in fact -.IR "aio_read64" -since the LFS interface transparently -replaces the normal implementation. - -.SH ERRORS -In the case of an early error: -.TP -.B EAGAIN -The request was not enqueued due to (temporarily) exceeded resource -limitations. -.TP -.B ENOSYS -The -.IR "aio_read" -function is not implemented. -.TP -.B EBADF -The -.IR "aiocbp->aio_fildes" -descriptor is not valid. This condition -need not be recognized before enqueueing the request and so this error -might also be signaled asynchronously. -.TP -.B EINVAL -The -.IR "aiocbp->aio_offset" -or -.IR "aiocbp->aio_reqpiro" -value is -invalid. This condition need not be recognized before enqueueing the -request and so this error might also be signaled asynchronously. - -.PP -In the case of a normal return, possible error codes returned by -.IR "aio_error" -are: -.TP -.B EBADF -The -.IR "aiocbp->aio_fildes" -descriptor is not valid. -.TP -.B ECANCELED -The operation was canceled before the operation was finished -.TP -.B EINVAL -The -.IR "aiocbp->aio_offset" -value is invalid. -.PP -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_read64.3 b/fstests-bld/libaio/man/aio_read64.3 deleted file mode 100644 index 8e407a55..00000000 --- a/fstests-bld/libaio/man/aio_read64.3 +++ /dev/null @@ -1,60 +0,0 @@ -.TH aio_read64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_read64 \- Initiate an asynchronous read operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_read64 (struct aiocb *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to the -.IR "aio_read" -function. The only -difference is that on -.IR "32 bit" -machines, the file descriptor should -be opened in the large file mode. Internally, -.IR "aio_read64" -uses -functionality equivalent to -.IR "lseek64" -to position the file descriptor correctly for the reading, -as opposed to -.IR "lseek" -functionality used in -.IR "aio_read". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -, this -function is available under the name -.IR "aio_read" -and so transparently -replaces the interface for small files on 32 bit machines. -.SH "RETURN VALUES" -See -.IR aio_read. -.SH ERRORS -See -.IR aio_read. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_return.3 b/fstests-bld/libaio/man/aio_return.3 deleted file mode 100644 index 1e3335fd..00000000 --- a/fstests-bld/libaio/man/aio_return.3 +++ /dev/null @@ -1,71 +0,0 @@ -.TH aio_return 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_return \- Retrieve status of asynchronous I/O operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "ssize_t aio_return (const struct aiocb *aiocbp)" -.fi -.SH DESCRIPTION -This function can be used to retrieve the return status of the operation -carried out by the request described in the variable pointed to by -.IR aiocbp -. As long as the error status of this request as returned -by -.IR aio_error -is -.IR EINPROGRESS -the return of this function is -undefined. - -Once the request is finished this function can be used exactly once to -retrieve the return value. Following calls might lead to undefined -behavior. -When the sources are compiled with -.B "_FILE_OFFSET_BITS == 64" -this function is in fact -.IR aio_return64 -since the LFS interface -transparently replaces the normal implementation. -.SH "RETURN VALUES" -The return value itself is the value which would have been -returned by the -.IR read -, -.IR write -, or -.IR fsync -call. -.SH ERRORS -The function can return -.TP -.B ENOSYS -if it is not implemented. -.TP -.B EINVAL -if the -.IR aiocbp -parameter does not -refer to an asynchronous operation whose return status is not yet known. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_return64.3 b/fstests-bld/libaio/man/aio_return64.3 deleted file mode 100644 index 7e78362b..00000000 --- a/fstests-bld/libaio/man/aio_return64.3 +++ /dev/null @@ -1,51 +0,0 @@ -.TH aio_read64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_read64 \- Retrieve status of asynchronous I/O operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_return64 (const struct aiocb64 *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to -.IR "aio_return" -with the only difference -that the argument is a reference to a variable of type -.IR "struct aiocb64". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is available under the name -.IR "aio_return" -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -See -.IR aio_return. -.SH ERRORS -See -.IR aio_return. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_suspend.3 b/fstests-bld/libaio/man/aio_suspend.3 deleted file mode 100644 index cae1b656..00000000 --- a/fstests-bld/libaio/man/aio_suspend.3 +++ /dev/null @@ -1,123 +0,0 @@ -.TH aio_suspend 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_suspend \- Wait until one or more requests of a specific set terminates. -.SH SYNOPSYS -.nf -.B "#include <errno.h>" -.sp -.br -.B "#include <aio.h>" -.sp -.br -.BI "int aio_suspend (const struct aiocb *const list[], int nent, const struct timespec *timeout)" -.fi -.SH DESCRIPTION -Another method of synchronization is to wait until one or more requests of a -specific set terminated. This could be achieved by the -.IR "aio_*" -functions to notify the initiating process about the termination but in -some situations this is not the ideal solution. In a program which -constantly updates clients somehow connected to the server it is not -always the best solution to go round robin since some connections might -be slow. On the other hand letting the -.IR "aio_*" -function notify the -caller might also be not the best solution since whenever the process -works on preparing data for on client it makes no sense to be -interrupted by a notification since the new client will not be handled -before the current client is served. For situations like this -.IR "aio_suspend" -should be used. -.PP -When calling this function, the calling thread is suspended until at -least one of the requests pointed to by the -.IR "nent" -elements of the -array -.IR "list" -has completed. If any of the requests has already -completed at the time -.IR "aio_suspend" -is called, the function returns -immediately. Whether a request has terminated or not is determined by -comparing the error status of the request with -.IR "EINPROGRESS" -. If -an element of -.IR "list" -is -.IR "NULL" -, the entry is simply ignored. - -If no request has finished, the calling process is suspended. If -.IR "timeout" -is -.IR "NULL" -, the process is not woken until a request -has finished. If -.IR "timeout" -is not -.IR "NULL" -, the process remains -suspended at least as long as specified in -.IR "timeout" -. In this case, -.IR "aio_suspend" -returns with an error. -.PP -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is in fact -.IR "aio_suspend64" -since the LFS interface -transparently replaces the normal implementation. -.SH "RETURN VALUES" -The return value of the function is -.IR 0 -if one or more requests -from the -.IR "list" -have terminated. Otherwise the function returns -.IR -1 -and -.IR "errno" -is set. -.SH ERRORS -.TP -.B EAGAIN -None of the requests from the -.IR "list" -completed in the time specified -by -.IR "timeout" -. -.TP -.B EINTR -A signal interrupted the -.IR "aio_suspend" -function. This signal might -also be sent by the AIO implementation while signalling the termination -of one of the requests. -.TP -.B ENOSYS -The -.IR "aio_suspend" -function is not implemented. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_suspend64.3 b/fstests-bld/libaio/man/aio_suspend64.3 deleted file mode 100644 index 2f289ecc..00000000 --- a/fstests-bld/libaio/man/aio_suspend64.3 +++ /dev/null @@ -1,51 +0,0 @@ -.TH aio_suspend64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_suspend64 \- Wait until one or more requests of a specific set terminates -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_suspend64 (const struct aiocb64 *const list[], int nent, const struct timespec *timeout)" -.fi -.SH DESCRIPTION -This function is similar to -.IR "aio_suspend" -with the only difference -that the argument is a reference to a variable of type -.IR "struct aiocb64". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -this -function is available under the name -.IR "aio_suspend" -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -See -.IR aio_suspend. -.SH ERRORS -See -.IR aio_suspend. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_write(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_write.3 b/fstests-bld/libaio/man/aio_write.3 deleted file mode 100644 index 7c0cfd0b..00000000 --- a/fstests-bld/libaio/man/aio_write.3 +++ /dev/null @@ -1,176 +0,0 @@ -.TH aio_write 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_write \- Initiate an asynchronous write operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_write (struct aiocb * aiocbp);" -.fi -.SH DESCRIPTION -This function initiates an asynchronous write operation. The function -call immediately returns after the operation was enqueued or if before -this happens an error was encountered. - -The first -.IR "aiocbp->aio_nbytes" -bytes from the buffer starting at -.IR "aiocbp->aio_buf" -are written to the file for which -.IR "aiocbp->aio_fildes" -is an descriptor, starting at the absolute -position -.IR "aiocbp->aio_offset" -in the file. - -If prioritized I/O is supported by the platform, the -.IR "aiocbp->aio_reqprio " -value is used to adjust the priority before -the request is actually enqueued. - -The calling process is notified about the termination of the read -request according to the -.IR "aiocbp->aio_sigevent" -value. - -When -.IR "aio_write" -returns, the return value is zero if no error -occurred that can be found before the process is enqueued. If such an -early error is found the function returns -.IR -1 -and sets -.IR "errno" -to one of the following values. - -.TP -.B EAGAIN -The request was not enqueued due to (temporarily) exceeded resource -limitations. -.TP -.B ENOSYS -The -.IR "aio_write" -function is not implemented. -.TP -.B EBADF -The -.IR "aiocbp->aio_fildes" -descriptor is not valid. This condition -may not be recognized before enqueueing the request, and so this error -might also be signaled asynchronously. -.TP -.B EINVAL -The -.IR "aiocbp->aio_offset" -or -.IR "aiocbp->aio_reqprio" -value is -invalid. This condition may not be recognized before enqueueing the -request and so this error might also be signaled asynchronously. -.PP - -In the case -.IR "aio_write" -returns zero, the current status of the -request can be queried using -.IR "aio_error" -and -.IR "aio_return" -functions. As long as the value returned by -.IR "aio_error" -is -.IR "EINPROGRESS" -the operation has not yet completed. If -.IR "aio_error" -returns zero, the operation successfully terminated, -otherwise the value is to be interpreted as an error code. If the -function terminated, the result of the operation can be get using a call -to -.IR "aio_return" -. The returned value is the same as an equivalent -call to -.IR "read" -would have returned. Possible error codes returned -by -.IR "aio_error" -are: - -.TP -.B EBADF -The -.IR "aiocbp->aio_fildes" -descriptor is not valid. -.TP -.B ECANCELED -The operation was canceled before the operation was finished. -.TP -.B EINVAL -The -.IR "aiocbp->aio_offset" -value is invalid. -.PP -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -, this -function is in fact -.IR "aio_write64" -since the LFS interface transparently -replaces the normal implementation. -.SH "RETURN VALUES" -When -.IR "aio_write" -returns, the return value is zero if no error -occurred that can be found before the process is enqueued. If such an -early error is found the function returns -.IR -1 -and sets -.IR "errno" -to one of the following values. -.SH ERRORS -.TP -.B EAGAIN -The request was not enqueued due to (temporarily) exceeded resource -limitations. -.TP -.B ENOSYS -The -.IR "aio_write" -function is not implemented. -.TP -.B EBADF -The -.IR "aiocbp->aio_fildes" -descriptor is not valid. This condition -may not be recognized before enqueueing the request, and so this error -might also be signaled asynchronously. -.TP -.B EINVAL -The -.IR "aiocbp->aio_offset" -or -.IR "aiocbp->aio_reqprio" -value is -invalid. This condition may not be recognized before enqueueing the -request and so this error might also be signaled asynchronously. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write64(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/aio_write64.3 b/fstests-bld/libaio/man/aio_write64.3 deleted file mode 100644 index 1080903a..00000000 --- a/fstests-bld/libaio/man/aio_write64.3 +++ /dev/null @@ -1,61 +0,0 @@ -.TH aio_write64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -aio_write64 \- Initiate an asynchronous write operation -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <aio.h> -.sp -.br -.BI "int aio_write64 (struct aiocb *aiocbp)" -.fi -.SH DESCRIPTION -This function is similar to the -.IR "aio_write" -function. The only -difference is that on -.IR "32 bit" -machines the file descriptor should -be opened in the large file mode. Internally -.IR "aio_write64" -uses -functionality equivalent to -.IR "lseek64" -to position the file descriptor correctly for the writing, -as opposed to -.IR "lseek" -functionality used in -.IR "aio_write". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -, this -function is available under the name -.IR "aio_write" -and so transparently -replaces the interface for small files on 32 bit machines. -.SH "RETURN VALUES" -See -.IR aio_write. -.SH ERRORS -See -.IR aio_write. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR errno(3), diff --git a/fstests-bld/libaio/man/io.3 b/fstests-bld/libaio/man/io.3 deleted file mode 100644 index d910a689..00000000 --- a/fstests-bld/libaio/man/io.3 +++ /dev/null @@ -1,351 +0,0 @@ -.TH io 3 2002-09-12 "Linux 2.4" Linux IO" -.SH NAME -io \- Asynchronous IO -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <libio.h> -.sp -.fi -.SH DESCRIPTION -The libaio library defines a new set of I/O operations which can -significantly reduce the time an application spends waiting at I/O. The -new functions allow a program to initiate one or more I/O operations and -then immediately resume normal work while the I/O operations are -executed in parallel. - -These functions are part of the library with realtime functions named -.IR "libaio" -. They are not actually part of the -.IR "libc" -binary. -The implementation of these functions can be done using support in the -kernel. - -All IO operations operate on files which were opened previously. There -might be arbitrarily many operations running for one file. The -asynchronous I/O operations are controlled using a data structure named -.IR "struct iocb" -It is defined in -.IR "libio.h" -as follows. - -.nf - -typedef struct io_context *io_context_t; - -typedef enum io_iocb_cmd { - IO_CMD_PREAD = 0, - IO_CMD_PWRITE = 1, - - IO_CMD_FSYNC = 2, - IO_CMD_FDSYNC = 3, - - IO_CMD_POLL = 5, - IO_CMD_NOOP = 6, -} io_iocb_cmd_t; - -struct io_iocb_common { - void *buf; - unsigned __pad1; - long nbytes; - unsigned __pad2; - long long offset; - long long __pad3, __pad4; -}; /* result code is the amount read or -'ve errno */ - - -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; - union { - struct io_iocb_common c; - struct io_iocb_vector v; - struct io_iocb_poll poll; - struct io_iocb_sockaddr saddr; - } u; -}; - - -.fi -.TP -.IR "int aio_fildes" -This element specifies the file descriptor to be used for the -operation. It must be a legal descriptor, otherwise the operation will -fail. - -The device on which the file is opened must allow the seek operation. -I.e., it is not possible to use any of the IO operations on devices -like terminals where an -.IR "lseek" -call would lead to an error. -.TP -.IR "long u.c.offset" -This element specifies the offset in the file at which the operation (input -or output) is performed. Since the operations are carried out in arbitrary -order and more than one operation for one file descriptor can be -started, one cannot expect a current read/write position of the file -descriptor. -.TP -.IR "void *buf" -This is a pointer to the buffer with the data to be written or the place -where the read data is stored. -.TP -.IR "long u.c.nbytes" -This element specifies the length of the buffer pointed to by -.IR "io_buf" -. -.TP -.IR "int aio_reqprio" -Is not currently used. -.TP -.B "IO_CMD_PREAD" -Start a read operation. Read from the file at position -.IR "u.c.offset" -and store the next -.IR "u.c.nbytes" -bytes in the -buffer pointed to by -.IR "buf" -. -.TP -.B "IO_CMD_PWRITE" -Start a write operation. Write -.IR "u.c.nbytes" -bytes starting at -.IR "buf" -into the file starting at position -.IR "u.c.offset" -. -.TP -.B "IO_CMD_NOP" -Do nothing for this control block. This value is useful sometimes when -an array of -.IR "struct iocb" -values contains holes, i.e., some of the -values must not be handled although the whole array is presented to the -.IR "io_submit" -function. -.TP -.B "IO_CMD_FSYNC" -.TP -.B "IO_CMD_POLL" -This is experimental. -.SH EXAMPLE -.nf -/* - * Simplistic version of copy command using async i/o - * - * From: Stephen Hemminger <shemminger@osdl.org> - * Copy file by using a async I/O state machine. - * 1. Start read request - * 2. When read completes turn it into a write request - * 3. When write completes decrement counter and free resources - * - * - * Usage: aiocp file(s) desination - */ - -#include <unistd.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/param.h> -#include <fcntl.h> -#include <errno.h> - -#include <libaio.h> - -#define AIO_BLKSIZE (64*1024) -#define AIO_MAXIO 32 - -static int busy = 0; // # of I/O's in flight -static int tocopy = 0; // # of blocks left to copy -static int dstfd = -1; // destination file descriptor -static const char *dstname = NULL; -static const char *srcname = NULL; - - -/* Fatal error handler */ -static void io_error(const char *func, int rc) -{ - if (rc == -ENOSYS) - fprintf(stderr, "AIO not in this kernel\n"); - else if (rc < 0 && -rc < sys_nerr) - fprintf(stderr, "%s: %s\n", func, sys_errlist[-rc]); - else - fprintf(stderr, "%s: error %d\n", func, rc); - - if (dstfd > 0) - close(dstfd); - if (dstname) - unlink(dstname); - exit(1); -} - -/* - * Write complete callback. - * Adjust counts and free resources - */ -static void wr_done(io_context_t ctx, struct iocb *iocb, long res, long res2) -{ - if (res2 != 0) { - io_error("aio write", res2); - } - if (res != iocb->u.c.nbytes) { - fprintf(stderr, "write missed bytes expect %d got %d\n", iocb->u.c.nbytes, res2); - exit(1); - } - --tocopy; - --busy; - free(iocb->u.c.buf); - - memset(iocb, 0xff, sizeof(iocb)); // paranoia - free(iocb); - write(2, "w", 1); -} - -/* - * Read complete callback. - * Change read iocb into a write iocb and start it. - */ -static void rd_done(io_context_t ctx, struct iocb *iocb, long res, long res2) -{ - /* library needs accessors to look at iocb? */ - int iosize = iocb->u.c.nbytes; - char *buf = iocb->u.c.buf; - off_t offset = iocb->u.c.offset; - - if (res2 != 0) - io_error("aio read", res2); - if (res != iosize) { - fprintf(stderr, "read missing bytes expect %d got %d\n", iocb->u.c.nbytes, res); - exit(1); - } - - - /* turn read into write */ - io_prep_pwrite(iocb, dstfd, buf, iosize, offset); - io_set_callback(iocb, wr_done); - if (1 != (res = io_submit(ctx, 1, &iocb))) - io_error("io_submit write", res); - write(2, "r", 1); -} - - -int main(int argc, char *const *argv) -{ - int srcfd; - struct stat st; - off_t length = 0, offset = 0; - io_context_t myctx; - - if (argc != 3 || argv[1][0] == '-') { - fprintf(stderr, "Usage: aiocp SOURCE DEST"); - exit(1); - } - if ((srcfd = open(srcname = argv[1], O_RDONLY)) < 0) { - perror(srcname); - exit(1); - } - if (fstat(srcfd, &st) < 0) { - perror("fstat"); - exit(1); - } - length = st.st_size; - - if ((dstfd = open(dstname = argv[2], O_WRONLY | O_CREAT, 0666)) < 0) { - close(srcfd); - perror(dstname); - exit(1); - } - - /* initialize state machine */ - memset(&myctx, 0, sizeof(myctx)); - io_queue_init(AIO_MAXIO, &myctx); - tocopy = howmany(length, AIO_BLKSIZE); - - while (tocopy > 0) { - int i, rc; - /* Submit as many reads as once as possible upto AIO_MAXIO */ - int n = MIN(MIN(AIO_MAXIO - busy, AIO_MAXIO / 2), - howmany(length - offset, AIO_BLKSIZE)); - if (n > 0) { - struct iocb *ioq[n]; - - for (i = 0; i < n; i++) { - struct iocb *io = (struct iocb *) malloc(sizeof(struct iocb)); - int iosize = MIN(length - offset, AIO_BLKSIZE); - char *buf = (char *) malloc(iosize); - - if (NULL == buf || NULL == io) { - fprintf(stderr, "out of memory\n"); - exit(1); - } - - io_prep_pread(io, srcfd, buf, iosize, offset); - io_set_callback(io, rd_done); - ioq[i] = io; - offset += iosize; - } - - rc = io_submit(myctx, n, ioq); - if (rc < 0) - io_error("io_submit", rc); - - busy += n; - } - - // Handle IO's that have completed - rc = io_queue_run(myctx); - if (rc < 0) - io_error("io_queue_run", rc); - - // if we have maximum number of i/o's in flight - // then wait for one to complete - if (busy == AIO_MAXIO) { - rc = io_queue_wait(myctx, NULL); - if (rc < 0) - io_error("io_queue_wait", rc); - } - - } - - close(srcfd); - close(dstfd); - exit(0); -} - -/* - * Results look like: - * [alanm@toolbox ~/MOT3]$ ../taio kernel-source-2.4.8-0.4g.ppc.rpm abc - * rrrrrrrrrrrrrrrwwwrwrrwwrrwrwwrrwrwrwwrrwrwrrrrwwrwwwrrwrrrwwwwwwwwwwwwwwwww - * rrrrrrrrrrrrrrwwwrrwrwrwrwrrwwwwwwwwwwwwwwrrrrrrrrrrrrrrrrrrwwwwrwrwwrwrwrwr - * wrrrrrrrwwwwwwwwwwwwwrrrwrrrwrrwrwwwwwwwwwwrrrrwwrwrrrrrrrrrrrwwwwwwwwwwwrww - * wwwrrrrrrrrwwrrrwwrwrwrwwwrrrrrrrwwwrrwwwrrwrwwwwwwwwrrrrrrrwwwrrrrrrrwwwwww - * wwwwwwwrwrrrrrrrrwrrwrrwrrwrwrrrwrrrwrrrwrwwwwwwwwwwwwwwwwwwrrrwwwrrrrrrrrrr - * rrwrrrrrrwrrwwwwwwwwwwwwwwwwrwwwrrwrwwrrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwww - * rrrrrwrrwrwrwrrwrrrwwwwwwwwrrrrwrrrwrwwrwrrrwrrwrrrrwwwwwwwrwrwwwwrwwrrrwrrr - * rrrwwwwwwwrrrrwwrrrrrrrrrrrrwrwrrrrwwwwwwwwwwwwwwrwrrrrwwwwrwrrrrwrwwwrrrwww - * rwwrrrrrrrwrrrrrrrrrrrrwwwwrrrwwwrwrrwwwwwwwwwwwwwwwwwwwwwrrrrrrrwwwwwwwrw - */ -.fi -.SH "SEE ALSO" -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_cancel.1 b/fstests-bld/libaio/man/io_cancel.1 deleted file mode 100644 index 16e898a7..00000000 --- a/fstests-bld/libaio/man/io_cancel.1 +++ /dev/null @@ -1,21 +0,0 @@ -.\"/* sys_io_cancel: -.\" * Attempts to cancel an iocb previously passed to io_submit. If -.\" * the operation is successfully cancelled, the resulting event is -.\" * copied into the memory pointed to by result without being placed -.\" * into the completion queue and 0 is returned. May fail with -.\" * -EFAULT if any of the data structures pointed to are invalid. -.\" * May fail with -EINVAL if aio_context specified by ctx_id is -.\" * invalid. May fail with -EAGAIN if the iocb specified was not -.\" * cancelled. Will fail with -ENOSYS if not implemented. -.\" */ -.\" -.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_cancel \- cancel io requests -.SH SYNOPSIS -.B #include <errno.h> -.br -.B #include <libaio.h> -.LP -.BI "int io_submit(io_context_t " ctx ", struct iocb *" iocb ", struct io_event *" result ");" - diff --git a/fstests-bld/libaio/man/io_cancel.3 b/fstests-bld/libaio/man/io_cancel.3 deleted file mode 100644 index 9a16084a..00000000 --- a/fstests-bld/libaio/man/io_cancel.3 +++ /dev/null @@ -1,65 +0,0 @@ -.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_cancel \- Cancel io requests -.SH SYNOPSIS -.nf -.B #include <errno.h> -.sp -.br -.B #include <libaio.h> -.sp -.br -.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)" -.br -.sp -struct iocb { - void *data; /* Return in the io completion event */ - unsigned key; /* For use in identifying io requests */ - short aio_lio_opcode; - short aio_reqprio; /* Not used */ - int aio_fildes; -}; -.fi -.SH DESCRIPTION -Attempts to cancel an iocb previously passed to io_submit. If -the operation is successfully cancelled, the resulting event is -copied into the memory pointed to by result without being placed -into the completion queue. -.PP -When one or more requests are asynchronously processed, it might be -useful in some situations to cancel a selected operation, e.g., if it -becomes obvious that the written data is no longer accurate and would -have to be overwritten soon. As an example, assume an application, which -writes data in files in a situation where new incoming data would have -to be written in a file which will be updated by an enqueued request. -.SH "RETURN VALUES" -0 is returned on success , otherwise returns Errno. -.SH ERRORS -.TP -.B EFAULT -If any of the data structures pointed to are invalid. -.TP -.B EINVAL -If aio_context specified by ctx_id is -invalid. -.TP -.B EAGAIN -If the iocb specified was not -cancelled. -.TP -.B ENOSYS -if not implemented. -.SH "SEE ALSO" -.BR io(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_destroy.1 b/fstests-bld/libaio/man/io_destroy.1 deleted file mode 100644 index 177683b8..00000000 --- a/fstests-bld/libaio/man/io_destroy.1 +++ /dev/null @@ -1,17 +0,0 @@ -.\"/* sys_io_destroy: -.\" * Destroy the aio_context specified. May cancel any outstanding -.\" * AIOs and block on completion. Will fail with -ENOSYS if not -.\" * implemented. May fail with -EFAULT if the context pointed to -.\" * is invalid. -.\" */ -.\" libaio provides this as io_queue_release. -.TH io_destroy 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_destroy \- destroy an io context -.SH SYNOPSIS -.B #include <errno.h> -.br -.B #include <libaio.h> -.LP -.BI "int io_destroy(io_context_t " ctx ");" - diff --git a/fstests-bld/libaio/man/io_fsync.3 b/fstests-bld/libaio/man/io_fsync.3 deleted file mode 100644 index 53eb63d2..00000000 --- a/fstests-bld/libaio/man/io_fsync.3 +++ /dev/null @@ -1,82 +0,0 @@ -./" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) -./" { -./" io_prep_fsync(iocb, fd); -./" io_set_callback(iocb, cb); -./" return io_submit(ctx, 1, &iocb); -./" } -.TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -io_fsync \- Synchronize a file's complete in-core state with that on disk -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <libaio.h> -.sp -.br -.BI "int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.sp -typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, long res2); -.sp -.fi -.SH DESCRIPTION -When dealing with asynchronous operations it is sometimes necessary to -get into a consistent state. This would mean for AIO that one wants to -know whether a certain request or a group of request were processed. -This could be done by waiting for the notification sent by the system -after the operation terminated, but this sometimes would mean wasting -resources (mainly computation time). -.PP -Calling this function forces all I/O operations operating queued at the -time of the function call operating on the file descriptor -.IR "iocb->io_fildes" -into the synchronized I/O completion state . The -.IR "io_fsync" -function returns -immediately but the notification through the method described in -.IR "io_callback" -will happen only after all requests for this -file descriptor have terminated and the file is synchronized. This also -means that requests for this very same file descriptor which are queued -after the synchronization request are not affected. -.SH "RETURN VALUES" -Returns 0, otherwise returns errno. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I ctx -refers to an unitialized aio context, the iocb pointed to by -.I iocbs -contains an improperly initialized iocb, -.TP -.B EBADF -The iocb contains a file descriptor that does not exist. -.TP -.B EINVAL -The file specified in the iocb does not support the given io operation. -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_getevents(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_getevents.1 b/fstests-bld/libaio/man/io_getevents.1 deleted file mode 100644 index 27730b99..00000000 --- a/fstests-bld/libaio/man/io_getevents.1 +++ /dev/null @@ -1,29 +0,0 @@ -./"/* io_getevents: -./" * Attempts to read at least min_nr events and up to nr events from -./" * the completion queue for the aio_context specified by ctx_id. May -./" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, -./" * if nr is out of range, if when is out of range. May fail with -./" * -EFAULT if any of the memory specified to is invalid. May return -./" * 0 or < min_nr if no events are available and the timeout specified -./" * by when has elapsed, where when == NULL specifies an infinite -./" * timeout. Note that the timeout pointed to by when is relative and -./" * will be updated if not NULL and the operation blocks. Will fail -./" * with -ENOSYS if not implemented. -./" */ -./"asmlinkage long sys_io_getevents(io_context_t ctx_id, -./" long min_nr, -./" long nr, -./" struct io_event *events, -./" struct timespec *timeout) -./" -.TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_getevents \- read resulting events from io requests -.SH SYNOPSIS -.B #include <errno.h> -.br -.B #include <libaio.h> -.sp -.BI "int io_getevents(io_context_t " ctx ", long " min_nr ", long " nr ", struct io_events *" events "[], struct timespec *" timeout ");" - - diff --git a/fstests-bld/libaio/man/io_getevents.3 b/fstests-bld/libaio/man/io_getevents.3 deleted file mode 100644 index 8e9ddc86..00000000 --- a/fstests-bld/libaio/man/io_getevents.3 +++ /dev/null @@ -1,79 +0,0 @@ -./"/* io_getevents: -./" * Attempts to read at least min_nr events and up to nr events from -./" * the completion queue for the aio_context specified by ctx_id. May -./" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, -./" * if nr is out of range, if when is out of range. May fail with -./" * -EFAULT if any of the memory specified to is invalid. May return -./" * 0 or < min_nr if no events are available and the timeout specified -./" * by when has elapsed, where when == NULL specifies an infinite -./" * timeout. Note that the timeout pointed to by when is relative and -./" * will be updated if not NULL and the operation blocks. Will fail -./" * with -ENOSYS if not implemented. -./" */ -./"asmlinkage long sys_io_getevents(io_context_t ctx_id, -./" long min_nr, -./" long nr, -./" struct io_event *events, -./" struct timespec *timeout) -./" -.TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_getevents \- Read resulting events from io requests -.SH SYNOPSIS -.nf -.B #include <errno.h> -.sp -.br -.B #include <libaio.h> -.br -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.sp -struct io_event { - unsigned PADDED(data, __pad1); - unsigned PADDED(obj, __pad2); - unsigned PADDED(res, __pad3); - unsigned PADDED(res2, __pad4); -}; -.sp -.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");" - -.fi -.SH DESCRIPTION -Attempts to read up to nr events from -the completion queue for the aio_context specified by ctx. -.SH "RETURN VALUES" -May return -0 if no events are available and the timeout specified -by when has elapsed, where when == NULL specifies an infinite -timeout. Note that the timeout pointed to by when is relative and -will be updated if not NULL and the operation blocks. Will fail -with ENOSYS if not implemented. -.SH ERRORS -.TP -.B EINVAL -if ctx_id is invalid, if min_nr is out of range, -if nr is out of range, if when is out of range. -.TP -.B EFAULT -if any of the memory specified to is invalid. -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_prep_fsync.3 b/fstests-bld/libaio/man/io_prep_fsync.3 deleted file mode 100644 index 4cf935ac..00000000 --- a/fstests-bld/libaio/man/io_prep_fsync.3 +++ /dev/null @@ -1,89 +0,0 @@ -./" static inline void io_prep_fsync(struct iocb *iocb, int fd) -./" { -./" memset(iocb, 0, sizeof(*iocb)); -./" iocb->aio_fildes = fd; -./" iocb->aio_lio_opcode = IO_CMD_FSYNC; -./" iocb->aio_reqprio = 0; -./" } -.TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -io_prep_fsync \- Synchronize a file's complete in-core state with that on disk -.SH SYNOPSYS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.sp -.fi -.SH DESCRIPTION -This is an inline convenience function for setting up an iocbv for a FSYNC request. -.br -The file for which -.TP -.IR "iocb->aio_fildes = fd" -is a descriptor is set up with -the command -.TP -.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC: -. -.PP -The io_prep_fsync() function shall set up an IO_CMD_FSYNC operation -to asynchronously force all I/O -operations associated with the file indicated by the file -descriptor aio_fildes member of the iocb structure referenced by -the iocb argument and queued at the time of the call to -io_submit() to the synchronized I/O completion state. The function -call shall return when the synchronization request has been -initiated or queued to the file or device (even when the data -cannot be synchronized immediately). - -All currently queued I/O operations shall be completed as if by a call -to fsync(); that is, as defined for synchronized I/O file -integrity completion. If the -operation queued by io_prep_fsync() fails, then, as for fsync(), -outstanding I/O operations are not guaranteed to have -been completed. - -If io_prep_fsync() succeeds, then it is only the I/O that was queued -at the time of the call to io_submit() that is guaranteed to be -forced to the relevant completion state. The completion of -subsequent I/O on the file descriptor is not guaranteed to be -completed in a synchronized fashion. -.PP -This function returns immediately . To schedule the operation, the -function -.IR io_submit -must be called. -.PP -Simultaneous asynchronous operations using the same iocb produce -undefined results. -.SH "RETURN VALUES" -None -.SH ERRORS -None -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_prep_pread.3 b/fstests-bld/libaio/man/io_prep_pread.3 deleted file mode 100644 index 5938aecc..00000000 --- a/fstests-bld/libaio/man/io_prep_pread.3 +++ /dev/null @@ -1,79 +0,0 @@ -./" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -./" { -./" memset(iocb, 0, sizeof(*iocb)); -./" iocb->aio_fildes = fd; -./" iocb->aio_lio_opcode = IO_CMD_PREAD; -./" iocb->aio_reqprio = 0; -./" iocb->u.c.buf = buf; -./" iocb->u.c.nbytes = count; -./" iocb->u.c.offset = offset; -./" } -.TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -io_prep_pread \- Set up asynchronous read -.SH SYNOPSYS -.nf -.B #include <errno.h> -.sp -.br -.B #include <libaio.h> -.br -.sp -.BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.fi -.SH DESCRIPTION -.IR io_prep_pread -is an inline convenience function designed to facilitate the initialization of -the iocb for an asynchronous read operation. - -The first -.TP -.IR "iocb->u.c.nbytes = count" -bytes of the file for which -.TP -.IR "iocb->aio_fildes = fd" -is a descriptor are written to the buffer -starting at -.TP -.IR "iocb->u.c.buf = buf" -. -.br -Reading starts at the absolute position -.TP -.IR "ioc->u.c.offset = offset" -in the file. -.PP -This function returns immediately . To schedule the operation, the -function -.IR io_submit -must be called. -.PP -Simultaneous asynchronous operations using the same iocb produce -undefined results. -.SH "RETURN VALUES" -None -.SH ERRORS -None -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_prep_pwrite.3 b/fstests-bld/libaio/man/io_prep_pwrite.3 deleted file mode 100644 index 68b35005..00000000 --- a/fstests-bld/libaio/man/io_prep_pwrite.3 +++ /dev/null @@ -1,77 +0,0 @@ -./" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -./" { -./" memset(iocb, 0, sizeof(*iocb)); -./" iocb->aio_fildes = fd; -./" iocb->aio_lio_opcode = IO_CMD_PWRITE; -./" iocb->aio_reqprio = 0; -./" iocb->u.c.buf = buf; -./" iocb->u.c.nbytes = count; -./" iocb->u.c.offset = offset; -./" } -.TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -io_prep_pwrite \- Set up iocb for asynchronous writes -.SH SYNOPSYS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.fi -.SH DESCRIPTION -io_prep_write is a convenicence function for setting up parallel writes. - -The first -.TP -.IR "iocb->u.c.nbytes = count" -bytes of the file for which -.TP -.IR "iocb->aio_fildes = fd" -is a descriptor are written from the buffer -starting at -.TP -.IR "iocb->u.c.buf = buf" -. -.br -Writing starts at the absolute position -.TP -.IR "ioc->u.c.offset = offset" -in the file. -.PP -This function returns immediately . To schedule the operation, the -function -.IR io_submit -must be called. -.PP -Simultaneous asynchronous operations using the same iocb produce -undefined results. -.SH "RETURN VALUES" -None -.SH ERRORS -None -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_queue_init.3 b/fstests-bld/libaio/man/io_queue_init.3 deleted file mode 100644 index 317f631c..00000000 --- a/fstests-bld/libaio/man/io_queue_init.3 +++ /dev/null @@ -1,63 +0,0 @@ -.TH io_queue_init 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_queue_init \- Initialize asynchronous io state machine - -.SH SYNOPSIS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "int io_queue_init(int maxevents, io_context_t *ctx );" -.sp -.fi -.SH DESCRIPTION -.B io_queue_init -Attempts to create an aio context capable of receiving at least -.IR maxevents -events. -.IR ctx -must point to an aio context that already exists and must be initialized -to -.IR 0 -before the call. -If the operation is successful, *cxtp is filled with the resulting handle. -.SH "RETURN VALUES" -On success, -.B io_queue_init -returns 0. Otherwise, -error is return, where -error is one of the Exxx values defined in the Errors section. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I maxevents -is <= 0 or -.IR ctx -is an invalid memory locattion. -.TP -.B ENOSYS -Not implemented -.TP -.B EAGAIN -.IR "maxevents > max_aio_reqs" -where max_aio_reqs is a tunable value. -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_queue_release.3 b/fstests-bld/libaio/man/io_queue_release.3 deleted file mode 100644 index 06b9ec03..00000000 --- a/fstests-bld/libaio/man/io_queue_release.3 +++ /dev/null @@ -1,48 +0,0 @@ -.TH io_queue_release 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_queue_release \- Release the context associated with the userspace handle -.SH SYNOPSIS -.nf -.B #include <errno.h> -.br -.B #include <libaio.h> -.br -.sp -.BI "int io_queue_release(io_context_t ctx)" -.sp -.SH DESCRIPTION -.B io_queue_release -destroys the context associated with the userspace handle. May cancel any outstanding -AIOs and block on completion. - -.B cts. -.SH "RETURN VALUES" -On success, -.B io_queue_release -returns 0. Otherwise, -error is return, where -error is one of the Exxx values defined in the Errors section. -.SH ERRORS -.TP -.B EINVAL -.I ctx -refers to an unitialized aio context, the iocb pointed to by -.I iocbs -contains an improperly initialized iocb, -.TP -.B ENOSYS -Not implemented -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) - diff --git a/fstests-bld/libaio/man/io_queue_run.3 b/fstests-bld/libaio/man/io_queue_run.3 deleted file mode 100644 index 57dd4178..00000000 --- a/fstests-bld/libaio/man/io_queue_run.3 +++ /dev/null @@ -1,50 +0,0 @@ -.TH io_queue_run 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_queue_run \- Handle completed io requests -.SH SYNOPSIS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "int io_queue_run(io_context_t ctx );" -.sp -.fi -.SH DESCRIPTION -.B io_queue_run -Attempts to read all the events events from -the completion queue for the aio_context specified by ctx_id. -.SH "RETURN VALUES" -May return -0 if no events are available. -Will fail with -ENOSYS if not implemented. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I ctx -refers to an unitialized aio context, the iocb pointed to by -.I iocbs -contains an improperly initialized iocb, -.TP -.B ENOSYS -Not implemented -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_queue_wait.3 b/fstests-bld/libaio/man/io_queue_wait.3 deleted file mode 100644 index 2306663e..00000000 --- a/fstests-bld/libaio/man/io_queue_wait.3 +++ /dev/null @@ -1,56 +0,0 @@ -.TH io_queue_wait 2 2002-09-03 "Linux 2.4" "Linux AIO" -.SH NAME -io_queue_wait \- Wait for io requests to complete -.SH SYNOPSIS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);" -.fi -.SH DESCRIPTION -Attempts to read an event from -the completion queue for the aio_context specified by ctx_id. -.SH "RETURN VALUES" -May return -0 if no events are available and the timeout specified -by when has elapsed, where when == NULL specifies an infinite -timeout. Note that the timeout pointed to by when is relative and -will be updated if not NULL and the operation blocks. Will fail -with -ENOSYS if not implemented. -.SH "RETURN VALUES" -On success, -.B io_queue_wait -returns 0. Otherwise, -error is return, where -error is one of the Exxx values defined in the Errors section. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I ctx -refers to an unitialized aio context, the iocb pointed to by -.I iocbs -contains an improperly initialized iocb, -.TP -.B ENOSYS -Not implemented -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_set_callback(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_set_callback.3 b/fstests-bld/libaio/man/io_set_callback.3 deleted file mode 100644 index a8ca789e..00000000 --- a/fstests-bld/libaio/man/io_set_callback.3 +++ /dev/null @@ -1,44 +0,0 @@ -./"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) -.TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -io_set_callback \- Set up io completion callback function -.SH SYNOPSYS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.sp -typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, long res2); -.sp -.fi -.SH DESCRIPTION -The callback is not done if the caller uses raw events from -io_getevents, only with the library helpers -.SH "RETURN VALUES" -.SH ERRORS -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_submit(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/io_setup.1 b/fstests-bld/libaio/man/io_setup.1 deleted file mode 100644 index 68690e1e..00000000 --- a/fstests-bld/libaio/man/io_setup.1 +++ /dev/null @@ -1,15 +0,0 @@ -./"/* sys_io_setup: -./" * Create an aio_context capable of receiving at least nr_events. -./" * ctxp must not point to an aio_context that already exists, and -./" * must be initialized to 0 prior to the call. On successful -./" * creation of the aio_context, *ctxp is filled in with the resulting -./" * handle. May fail with -EINVAL if *ctxp is not initialized, -./" * if the specified nr_events exceeds internal limits. May fail -./" * with -EAGAIN if the specified nr_events exceeds the user's limit -./" * of available events. May fail with -ENOMEM if insufficient kernel -./" * resources are available. May fail with -EFAULT if an invalid -./" * pointer is passed for ctxp. Will fail with -ENOSYS if not -./" * implemented. -./" */ -./" -- note: libaio is actually providing io_queue_init and io_queue_grow -./" as separate functions. For now io_setup is the same as io_queue_grow. diff --git a/fstests-bld/libaio/man/io_submit.1 b/fstests-bld/libaio/man/io_submit.1 deleted file mode 100644 index f66e80f1..00000000 --- a/fstests-bld/libaio/man/io_submit.1 +++ /dev/null @@ -1,109 +0,0 @@ -.TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" -.SH NAME -io_submit \- submit io requests -.SH SYNOPSIS -.B #include <errno.h> -.br -.B #include <libaio.h> -.LP -.BI "int io_submit(io_context_t " ctx ", long " nr ", struct iocb *" iocbs "[]);" -.SH DESCRIPTION -.B io_submit -submits to the io_context -.I ctx -up to -.I nr -I/O requests pointed to by the vector -.IR iocbs . - -The -.B iocb -structure is defined as something like -.sp -.RS -.nf -struct iocb { - void *data; -.\" unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.fi -.RE -.sp -.I data -is a an opaque pointer which will upon completion be returned in the -.B io_event -structure by -.BR io_getevents (2). -.\" and io_wait(2) -Callers will typically use this to point directly or indirectly to a -callback function. -.sp -.I aio_lio_opcode -is the I/O operation requested. Callers will typically set this and the -arguments to the I/O operation calling the -.BR io_prep_ (3) -function corresponding to the operation. -.sp -.I aio_reqprio -is the priority of the request. Higher values have more priority; the -normal priority is 0. -.sp -.I aio_fildes -is the file descriptor for the I/O operation. -Callers will typically set this and the -arguments to the I/O operation calling the -.BR io_prep_ *(3) -function corresponding to the operation. -.sp -The caller may not modify the contents or resubmit a submitted -.B iocb -structure until after the operation completes or is canceled. -The implementation of -.BR io_submit (2) -is permitted to modify reserved fields of the -.B iocb -structure. -.SH "RETURN VALUES" -If able to submit at least one iocb, -.B io_submit -returns the number of iocbs submitted successfully. Otherwise, -.RI - error -is returned, where -.I error -is one of the Exxx values defined in the Errors section. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I nr -is negative, -.I ctx -refers to an uninitialized aio context, the iocb pointed to by -.IR iocbs [0] -is improperly initialized or specifies an unsupported operation. -.TP -.B EBADF -The iocb pointed to by -.IR iocbs [0] -contains a file descriptor that does not exist. -.TP -.B EAGAIN -Insufficient resources were available to queue any operations. -.SH "SEE ALSO" -.BR io_setup (2), -.BR io_destroy (2), -.BR io_getevents (2), -.\".BR io_wait (2), -.BR io_prep_pread (3), -.BR io_prep_pwrite (3), -.BR io_prep_fsync (3), -.BR io_prep_fdsync (3), -.BR io_prep_noop (3), -.BR io_cancel (2), -.BR errno (3) diff --git a/fstests-bld/libaio/man/io_submit.3 b/fstests-bld/libaio/man/io_submit.3 deleted file mode 100644 index b6966efd..00000000 --- a/fstests-bld/libaio/man/io_submit.3 +++ /dev/null @@ -1,135 +0,0 @@ -./"/* sys_io_submit: -./" * Queue the nr iocbs pointed to by iocbpp for processing. Returns -./" * the number of iocbs queued. May return -EINVAL if the aio_context -./" * specified by ctx_id is invalid, if nr is < 0, if the iocb at -./" * *iocbpp[0] is not properly initialized, if the operation specified -./" * is invalid for the file descriptor in the iocb. May fail with -./" * -EFAULT if any of the data structures point to invalid data. May -./" * fail with -EBADF if the file descriptor specified in the first -./" * iocb is invalid. May fail with -EAGAIN if insufficient resources -./" * are available to queue any iocbs. Will return 0 if nr is 0. Will -./" * fail with -ENOSYS if not implemented. -./" */ -.TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" -.SH NAME -io_submit \- Submit io requests -.SH SYNOPSIS -.nf -.B #include <errno.h> -.br -.sp -.B #include <libaio.h> -.br -.sp -.BI "int io_submit(io_context_t " ctx ", long " nr ", struct iocb *" iocbs "[]);" -.sp -struct iocb { - void *data; - unsigned key; - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; -}; -.fi -.SH DESCRIPTION -.B io_submit -submits -.I nr -iocbs for processing for a given io context ctx. - -The -.IR "io_submit" -function can be used to enqueue an arbitrary -number of read and write requests at one time. The requests can all be -meant for the same file, all for different files or every solution in -between. - -.IR "io_submit" -gets the -.IR "nr" -requests from the array pointed to -by -.IR "iocbs" -. The operation to be performed is determined by the -.IR "aio_lio_opcode" -member in each element of -.IR "iocbs" -. If this -field is -.B "IO_CMD_PREAD" -a read operation is enqueued, similar to a call -of -.IR "io_prep_pread" -for this element of the array (except that the way -the termination is signalled is different, as we will see below). If -the -.IR "aio_lio_opcode" -member is -.B "IO_CMD_PWRITE" -a write operation -is enqueued. Otherwise the -.IR "aio_lio_opcode" -must be -.B "IO_CMD_NOP" -in which case this element of -.IR "iocbs" -is simply ignored. This -``operation'' is useful in situations where one has a fixed array of -.IR "struct iocb" -elements from which only a few need to be handled at -a time. Another situation is where the -.IR "io_submit" -call was -canceled before all requests are processed and the remaining requests have to be reissued. - -The other members of each element of the array pointed to by -.IR "iocbs" -must have values suitable for the operation as described in -the documentation for -.IR "io_prep_pread" -and -.IR "io_prep_pwrite" -above. - -The function returns immediately after -having enqueued all the requests. -On success, -.B io_submit -returns the number of iocbs submitted successfully. Otherwise, -error is return, where -error is one of the Exxx values defined in the Errors section. -.PP -If an error is detected, then the behavior is undefined. -.PP -Simultaneous asynchronous operations using the same iocb produce -undefined results. -.SH ERRORS -.TP -.B EFAULT -.I iocbs -referenced data outside of the program's accessible address space. -.TP -.B EINVAL -.I ctx -refers to an unitialized aio context, the iocb pointed to by -.I iocbs -contains an improperly initialized iocb, -.TP -.B EBADF -The iocb contains a file descriptor that does not exist. -.TP -.B EINVAL -The file specified in the iocb does not support the given io operation. -.SH "SEE ALSO" -.BR io(3), -.BR io_cancel(3), -.BR io_fsync(3), -.BR io_getevents(3), -.BR io_prep_fsync(3), -.BR io_prep_pread(3), -.BR io_prep_pwrite(3), -.BR io_queue_init(3), -.BR io_queue_release(3), -.BR io_queue_run(3), -.BR io_queue_wait(3), -.BR io_set_callback(3), -.BR errno(3) diff --git a/fstests-bld/libaio/man/lio_listio.3 b/fstests-bld/libaio/man/lio_listio.3 deleted file mode 100644 index 9b5b5e4e..00000000 --- a/fstests-bld/libaio/man/lio_listio.3 +++ /dev/null @@ -1,229 +0,0 @@ -.TH lio_listio 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -lio_listio - List directed I/O -.SH SYNOPSYS -.B #include <errno.h> -.br -.B #include <libaio.h> -.LP -.BI "int lio_listio (int mode, struct aiocb *const list[], int nent, struct sigevent *sig)" -.nf -.SH DESCRIPTION - -Besides these functions with the more or less traditional interface, -POSIX.1b also defines a function which can initiate more than one -operation at a time, and which can handle freely mixed read and write -operations. It is therefore similar to a combination of -.IR readv -and -.IR "writev" -. - -The -.IR "lio_listio" -function can be used to enqueue an arbitrary -number of read and write requests at one time. The requests can all be -meant for the same file, all for different files or every solution in -between. - -.IR "lio_listio" -gets the -.IR "nent" -requests from the array pointed to -by -.IR "list" -. The operation to be performed is determined by the -.IR "aio_lio_opcode" -member in each element of -.IR "list" -. If this -field is -.B "LIO_READ" -a read operation is enqueued, similar to a call -of -.IR "aio_read" -for this element of the array (except that the way -the termination is signalled is different, as we will see below). If -the -.IR "aio_lio_opcode" -member is -.B "LIO_WRITE" -a write operation -is enqueued. Otherwise the -.IR "aio_lio_opcode" -must be -.B "LIO_NOP" -in which case this element of -.IR "list" -is simply ignored. This -``operation'' is useful in situations where one has a fixed array of -.IR "struct aiocb" -elements from which only a few need to be handled at -a time. Another situation is where the -.IR "lio_listio" -call was -canceled before all requests are processed and the remaining requests have to be reissued. - -The other members of each element of the array pointed to by -.IR "list" -must have values suitable for the operation as described in -the documentation for -.IR "aio_read" -and -.IR "aio_write" -above. - -The -.IR "mode" -argument determines how -.IR "lio_listio" -behaves after -having enqueued all the requests. If -.IR "mode" -is -.B "LIO_WAIT" -it -waits until all requests terminated. Otherwise -.IR "mode" -must be -.B "LIO_NOWAIT" -and in this case the function returns immediately after -having enqueued all the requests. In this case the caller gets a -notification of the termination of all requests according to the -.IR "sig" -parameter. If -.IR "sig" -is -.B "NULL" -no notification is -send. Otherwise a signal is sent or a thread is started, just as -described in the description for -.IR "aio_read" -or -.IR "aio_write" -. - -When the sources are compiled with -.B "_FILE_OFFSET_BITS == 64" -, this -function is in fact -.IR "lio_listio64" -since the LFS interface -transparently replaces the normal implementation. -.SH "RETURN VALUES" -If -.IR "mode" -is -.B "LIO_WAIT" -, the return value of -.IR "lio_listio" -is -.IR 0 -when all requests completed successfully. Otherwise the -function return -.IR 1 -and -.IR "errno" -is set accordingly. To find -out which request or requests failed one has to use the -.IR "aio_error" -function on all the elements of the array -.IR "list" -. - -In case -.IR "mode" -is -.B "LIO_NOWAIT" -, the function returns -.IR 0 -if -all requests were enqueued correctly. The current state of the requests -can be found using -.IR "aio_error" -and -.IR "aio_return" -as described -above. If -.IR "lio_listio" -returns -.IR -1 -in this mode, the -global variable -.IR "errno" -is set accordingly. If a request did not -yet terminate, a call to -.IR "aio_error" -returns -.B "EINPROGRESS" -. If -the value is different, the request is finished and the error value (or - -.IR 0 -) is returned and the result of the operation can be retrieved -using -.IR "aio_return" -. -.SH ERRORS -Possible values for -.IR "errno" -are: - -.TP -.B EAGAIN -The resources necessary to queue all the requests are not available at -the moment. The error status for each element of -.IR "list" -must be -checked to determine which request failed. - -Another reason could be that the system wide limit of AIO requests is -exceeded. This cannot be the case for the implementation on GNU systems -since no arbitrary limits exist. -.TP -.B EINVAL -The -.IR "mode" -parameter is invalid or -.IR "nent" -is larger than -.B "AIO_LISTIO_MAX" -. -.TP -.B EIO -One or more of the request's I/O operations failed. The error status of -each request should be checked to determine which one failed. -.TP -.B ENOSYS -The -.IR "lio_listio" -function is not supported. -.PP - -If the -.IR "mode" -parameter is -.B "LIO_NOWAIT" -and the caller cancels -a request, the error status for this request returned by -.IR "aio_error" -is -.B "ECANCELED" -. -.SH "SEE ALSO" -.BR aio(3), -.BR aio_cancel(3), -.BR aio_cancel64(3), -.BR aio_error(3), -.BR aio_error64(3), -.BR aio_fsync(3), -.BR aio_fsync64(3), -.BR aio_init(3), -.BR aio_read(3), -.BR aio_read64(3), -.BR aio_return(3), -.BR aio_return64(3), -.BR aio_suspend(3), -.BR aio_suspend64(3), -.BR aio_write(3), -.BR aio_write64(3) diff --git a/fstests-bld/libaio/man/lio_listio64.3 b/fstests-bld/libaio/man/lio_listio64.3 deleted file mode 100644 index 97f69556..00000000 --- a/fstests-bld/libaio/man/lio_listio64.3 +++ /dev/null @@ -1,39 +0,0 @@ -.TH lio_listio64 3 2002-09-12 "Linux 2.4" Linux AIO" -.SH NAME -lio_listio64 \- List directed I/O -.SH SYNOPSYS -.B #include <errno.h> -.br -.B #include <libaio.h> -.LP -.BI "int lio_listio64 (int mode, struct aiocb *const list[], int nent, struct sigevent *sig)" -.nf -.SH DESCRIPTION -This function is similar to the -.IR "code{lio_listio" -function. The only -difference is that on -.IR "32 bit" -machines, the file descriptor should -be opened in the large file mode. Internally, -.IR "lio_listio64" -uses -functionality equivalent to -.IR lseek64" -to position the file descriptor correctly for the reading or -writing, as opposed to -.IR "lseek" -functionality used in -.IR "lio_listio". - -When the sources are compiled with -.IR "_FILE_OFFSET_BITS == 64" -, this -function is available under the name -.IR "lio_listio" -and so -transparently replaces the interface for small files on 32 bit -machines. -.SH "RETURN VALUES" -.SH ERRORS -.SH "SEE ALSO" diff --git a/fstests-bld/libaio/src/.gitignore b/fstests-bld/libaio/src/.gitignore deleted file mode 100644 index f3c7a7c5..00000000 --- a/fstests-bld/libaio/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/fstests-bld/libaio/src/Makefile.in b/fstests-bld/libaio/src/Makefile.in deleted file mode 100644 index 643de86f..00000000 --- a/fstests-bld/libaio/src/Makefile.in +++ /dev/null @@ -1,74 +0,0 @@ -srcdir = @srcdir@ -VPATH = @srcdir@ -top_builddir = .. -my_dir = src - -prefix=/usr -includedir=$(prefix)/include -libdir=$(prefix)/lib - -ARCH := $(shell uname -m | sed -e s/i.86/i386/) -CC := @CC@ -RANLIB := @RANLIB@ -CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC @CFLAGS@ -SO_CFLAGS=-shared $(CFLAGS) -L_CFLAGS=$(CFLAGS) -LINK_FLAGS= - -soname=libaio.so.1 -minor=0 -micro=1 -libname=$(soname).$(minor).$(micro) -all_targets += libaio.a $(libname) - -all: $(all_targets) - -# libaio provided functions -libaio_srcs := io_queue_init.c io_queue_release.c -libaio_srcs += io_queue_wait.c io_queue_run.c - -# real syscalls -libaio_srcs += io_getevents.c io_submit.c io_cancel.c -libaio_srcs += io_setup.c io_destroy.c - -# internal functions -libaio_srcs += raw_syscall.c - -# old symbols -libaio_srcs += compat-0_1.c - -libaio_objs := $(patsubst %.c,%.ol,$(libaio_srcs)) -libaio_sobjs := $(patsubst %.c,%.os,$(libaio_srcs)) - -$(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h - -%.os: %.c - $(CC) $(SO_CFLAGS) -c -o $@ $< - -%.ol: %.c - $(CC) $(L_CFLAGS) -c -o $@ $< - - -libaio.a: $(libaio_objs) - rm -f libaio.a - ar r libaio.a $^ - $(RANLIB) libaio.a - -$(libname): $(libaio_sobjs) libaio.map - $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) - -install: $(all_targets) - install -D -m 644 libaio.h $(includedir)/libaio.h - install -D -m 644 libaio.a $(libdir)/libaio.a - install -D -m 755 $(libname) $(libdir)/$(libname) - ln -sf $(libname) $(libdir)/$(soname) - ln -sf $(libname) $(libdir)/libaio.so - -$(libaio_objs): libaio.h - -clean: - rm -f $(all_targets) $(libaio_objs) $(libaio_sobjs) $(soname).new - rm -f *.so* *.a *.o - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status diff --git a/fstests-bld/libaio/src/compat-0_1.c b/fstests-bld/libaio/src/compat-0_1.c deleted file mode 100644 index 136396f9..00000000 --- a/fstests-bld/libaio/src/compat-0_1.c +++ /dev/null @@ -1,62 +0,0 @@ -/* libaio Linux async I/O interface - - compat-0_1.c : compatibility symbols for libaio 0.1.x-0.3.x - - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <stdlib.h> -#include <asm/errno.h> - -#include "libaio.h" -#include "vsys_def.h" - -#include "syscall.h" - - -/* ABI change. Provide partial compatibility on this one for now. */ -SYMVER(compat0_1_io_cancel, io_cancel, 0.1); -int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb) -{ - struct io_event event; - - /* FIXME: the old ABI would return the event on the completion queue */ - return io_cancel(ctx, iocb, &event); -} - -SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1); -int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when) -{ - struct timespec timeout; - if (when) - timeout = *when; - return io_getevents(ctx, 0, 0, NULL, when ? &timeout : NULL); -} - - -/* ABI change. Provide backwards compatibility for this one. */ -SYMVER(compat0_1_io_getevents, io_getevents, 0.1); -int compat0_1_io_getevents(io_context_t ctx_id, long nr, - struct io_event *events, - const struct timespec *const_timeout) -{ - struct timespec timeout; - if (const_timeout) - timeout = *const_timeout; - return io_getevents(ctx_id, 1, nr, events, - const_timeout ? &timeout : NULL); -} - diff --git a/fstests-bld/libaio/src/io_cancel.c b/fstests-bld/libaio/src/io_cancel.c deleted file mode 100644 index 2f0f5f4a..00000000 --- a/fstests-bld/libaio/src/io_cancel.c +++ /dev/null @@ -1,23 +0,0 @@ -/* io_cancel.c - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <libaio.h> -#include "syscall.h" - -io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event) -DEFSYMVER(io_cancel_0_4, io_cancel, 0.4) diff --git a/fstests-bld/libaio/src/io_destroy.c b/fstests-bld/libaio/src/io_destroy.c deleted file mode 100644 index 0ab6bd17..00000000 --- a/fstests-bld/libaio/src/io_destroy.c +++ /dev/null @@ -1,23 +0,0 @@ -/* io_destroy - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <errno.h> -#include <libaio.h> -#include "syscall.h" - -io_syscall1(int, io_destroy, io_destroy, io_context_t, ctx) diff --git a/fstests-bld/libaio/src/io_getevents.c b/fstests-bld/libaio/src/io_getevents.c deleted file mode 100644 index 5a051740..00000000 --- a/fstests-bld/libaio/src/io_getevents.c +++ /dev/null @@ -1,57 +0,0 @@ -/* io_getevents.c - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <libaio.h> -#include <errno.h> -#include <stdlib.h> -#include <time.h> -#include "syscall.h" - -io_syscall5(int, __io_getevents_0_4, io_getevents, io_context_t, ctx, long, min_nr, long, nr, struct io_event *, events, struct timespec *, timeout) - -#define AIO_RING_MAGIC 0xa10a10a1 - -/* Ben will hate me for this */ -struct aio_ring { - unsigned id; /* kernel internal index number */ - unsigned nr; /* number of io_events */ - unsigned head; - unsigned tail; - - unsigned magic; - unsigned compat_features; - unsigned incompat_features; - unsigned header_length; /* size of aio_ring */ -}; - -int io_getevents_0_4(io_context_t ctx, long min_nr, long nr, struct io_event * events, struct timespec * timeout) -{ - struct aio_ring *ring; - ring = (struct aio_ring*)ctx; - if (ring==NULL || ring->magic != AIO_RING_MAGIC) - goto do_syscall; - if (timeout!=NULL && timeout->tv_sec == 0 && timeout->tv_nsec == 0) { - if (ring->head == ring->tail) - return 0; - } - -do_syscall: - return __io_getevents_0_4(ctx, min_nr, nr, events, timeout); -} - -DEFSYMVER(io_getevents_0_4, io_getevents, 0.4) diff --git a/fstests-bld/libaio/src/io_queue_init.c b/fstests-bld/libaio/src/io_queue_init.c deleted file mode 100644 index 563d1375..00000000 --- a/fstests-bld/libaio/src/io_queue_init.c +++ /dev/null @@ -1,33 +0,0 @@ -/* io_queue_init.c - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <libaio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <errno.h> - -#include "syscall.h" - -int io_queue_init(int maxevents, io_context_t *ctxp) -{ - if (maxevents > 0) { - *ctxp = NULL; - return io_setup(maxevents, ctxp); - } - return -EINVAL; -} diff --git a/fstests-bld/libaio/src/io_queue_release.c b/fstests-bld/libaio/src/io_queue_release.c deleted file mode 100644 index 94bbb867..00000000 --- a/fstests-bld/libaio/src/io_queue_release.c +++ /dev/null @@ -1,27 +0,0 @@ -/* io_queue_release.c - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <libaio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <errno.h> - -int io_queue_release(io_context_t ctx) -{ - return io_destroy(ctx); -} diff --git a/fstests-bld/libaio/src/io_queue_run.c b/fstests-bld/libaio/src/io_queue_run.c deleted file mode 100644 index e0132f40..00000000 --- a/fstests-bld/libaio/src/io_queue_run.c +++ /dev/null @@ -1,39 +0,0 @@ -/* io_submit - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <libaio.h> -#include <errno.h> -#include <stdlib.h> -#include <time.h> - -int io_queue_run(io_context_t ctx) -{ - static struct timespec timeout = { 0, 0 }; - struct io_event event; - int ret; - - /* FIXME: batch requests? */ - while (1 == (ret = io_getevents(ctx, 0, 1, &event, &timeout))) { - io_callback_t cb = (io_callback_t)event.data; - struct iocb *iocb = event.obj; - - cb(ctx, iocb, event.res, event.res2); - } - - return ret; -} diff --git a/fstests-bld/libaio/src/io_queue_wait.c b/fstests-bld/libaio/src/io_queue_wait.c deleted file mode 100644 index 538d2f3b..00000000 --- a/fstests-bld/libaio/src/io_queue_wait.c +++ /dev/null @@ -1,31 +0,0 @@ -/* io_submit - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#define NO_SYSCALL_ERRNO -#include <sys/types.h> -#include <libaio.h> -#include <errno.h> -#include "syscall.h" - -struct timespec; - -int io_queue_wait_0_4(io_context_t ctx, struct timespec *timeout) -{ - return io_getevents(ctx, 0, 0, NULL, timeout); -} -DEFSYMVER(io_queue_wait_0_4, io_queue_wait, 0.4) diff --git a/fstests-bld/libaio/src/io_setup.c b/fstests-bld/libaio/src/io_setup.c deleted file mode 100644 index 4ba1afc9..00000000 --- a/fstests-bld/libaio/src/io_setup.c +++ /dev/null @@ -1,23 +0,0 @@ -/* io_setup - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <errno.h> -#include <libaio.h> -#include "syscall.h" - -io_syscall2(int, io_setup, io_setup, int, maxevents, io_context_t *, ctxp) diff --git a/fstests-bld/libaio/src/io_submit.c b/fstests-bld/libaio/src/io_submit.c deleted file mode 100644 index e22ba549..00000000 --- a/fstests-bld/libaio/src/io_submit.c +++ /dev/null @@ -1,23 +0,0 @@ -/* io_submit - libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include <errno.h> -#include <libaio.h> -#include "syscall.h" - -io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb **, iocbs) diff --git a/fstests-bld/libaio/src/libaio.h b/fstests-bld/libaio/src/libaio.h deleted file mode 100644 index ec85af88..00000000 --- a/fstests-bld/libaio/src/libaio.h +++ /dev/null @@ -1,265 +0,0 @@ -/* /usr/include/libaio.h - * - * Copyright 2000,2001,2002 Red Hat, Inc. - * - * Written by Benjamin LaHaise <bcrl@redhat.com> - * - * libaio Linux async I/O interface - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __LIBAIO_H -#define __LIBAIO_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/types.h> -#include <string.h> - -struct timespec; -struct sockaddr; -struct iovec; - -typedef struct io_context *io_context_t; - -typedef enum io_iocb_cmd { - IO_CMD_PREAD = 0, - IO_CMD_PWRITE = 1, - - IO_CMD_FSYNC = 2, - IO_CMD_FDSYNC = 3, - - IO_CMD_POLL = 5, /* Never implemented in mainline, see io_prep_poll */ - IO_CMD_NOOP = 6, - IO_CMD_PREADV = 7, - IO_CMD_PWRITEV = 8, -} io_iocb_cmd_t; - -#if defined(__i386__) /* little endian, 32 bits */ -#define PADDED(x, y) x; unsigned y -#define PADDEDptr(x, y) x; unsigned y -#define PADDEDul(x, y) unsigned long x; unsigned y -#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__aarch64__) -#define PADDED(x, y) x, y -#define PADDEDptr(x, y) x -#define PADDEDul(x, y) unsigned long x -#elif defined(__powerpc64__) /* big endian, 64 bits */ -#define PADDED(x, y) unsigned y; x -#define PADDEDptr(x,y) x -#define PADDEDul(x, y) unsigned long x -#elif defined(__PPC__) /* big endian, 32 bits */ -#define PADDED(x, y) unsigned y; x -#define PADDEDptr(x, y) unsigned y; x -#define PADDEDul(x, y) unsigned y; unsigned long x -#elif defined(__s390x__) /* big endian, 64 bits */ -#define PADDED(x, y) unsigned y; x -#define PADDEDptr(x,y) x -#define PADDEDul(x, y) unsigned long x -#elif defined(__s390__) /* big endian, 32 bits */ -#define PADDED(x, y) unsigned y; x -#define PADDEDptr(x, y) unsigned y; x -#define PADDEDul(x, y) unsigned y; unsigned long x -#elif defined(__arm__) -# if defined (__ARMEB__) /* big endian, 32 bits */ -#define PADDED(x, y) unsigned y; x -#define PADDEDptr(x, y) unsigned y; x -#define PADDEDul(x, y) unsigned y; unsigned long x -# else /* little endian, 32 bits */ -#define PADDED(x, y) x; unsigned y -#define PADDEDptr(x, y) x; unsigned y -#define PADDEDul(x, y) unsigned long x; unsigned y -# endif -#else -#error endian? -#endif - -struct io_iocb_poll { - PADDED(int events, __pad1); -}; /* result code is the set of result flags or -'ve errno */ - -struct io_iocb_sockaddr { - struct sockaddr *addr; - int len; -}; /* result code is the length of the sockaddr, or -'ve errno */ - -struct io_iocb_common { - PADDEDptr(void *buf, __pad1); - PADDEDul(nbytes, __pad2); - long long offset; - long long __pad3; - unsigned flags; - unsigned resfd; -}; /* result code is the amount read or -'ve errno */ - -struct io_iocb_vector { - const struct iovec *vec; - int nr; - long long offset; -}; /* result code is the amount read or -'ve errno */ - -struct iocb { - PADDEDptr(void *data, __pad1); /* Return in the io completion event */ - PADDED(unsigned key, __pad2); /* For use in identifying io requests */ - - short aio_lio_opcode; - short aio_reqprio; - int aio_fildes; - - union { - struct io_iocb_common c; - struct io_iocb_vector v; - struct io_iocb_poll poll; - struct io_iocb_sockaddr saddr; - } u; -}; - -struct io_event { - PADDEDptr(void *data, __pad1); - PADDEDptr(struct iocb *obj, __pad2); - PADDEDul(res, __pad3); - PADDEDul(res2, __pad4); -}; - -#undef PADDED -#undef PADDEDptr -#undef PADDEDul - -typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, long res2); - -/* library wrappers */ -extern int io_queue_init(int maxevents, io_context_t *ctxp); -/*extern int io_queue_grow(io_context_t ctx, int new_maxevents);*/ -extern int io_queue_release(io_context_t ctx); -/*extern int io_queue_wait(io_context_t ctx, struct timespec *timeout);*/ -extern int io_queue_run(io_context_t ctx); - -/* Actual syscalls */ -extern int io_setup(int maxevents, io_context_t *ctxp); -extern int io_destroy(io_context_t ctx); -extern int io_submit(io_context_t ctx, long nr, struct iocb *ios[]); -extern int io_cancel(io_context_t ctx, struct iocb *iocb, struct io_event *evt); -extern int io_getevents(io_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct timespec *timeout); - - -static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) -{ - iocb->data = (void *)cb; -} - -static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_PREAD; - iocb->aio_reqprio = 0; - iocb->u.c.buf = buf; - iocb->u.c.nbytes = count; - iocb->u.c.offset = offset; -} - -static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_PWRITE; - iocb->aio_reqprio = 0; - iocb->u.c.buf = buf; - iocb->u.c.nbytes = count; - iocb->u.c.offset = offset; -} - -static inline void io_prep_preadv(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_PREADV; - iocb->aio_reqprio = 0; - iocb->u.c.buf = (void *)iov; - iocb->u.c.nbytes = iovcnt; - iocb->u.c.offset = offset; -} - -static inline void io_prep_pwritev(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_PWRITEV; - iocb->aio_reqprio = 0; - iocb->u.c.buf = (void *)iov; - iocb->u.c.nbytes = iovcnt; - iocb->u.c.offset = offset; -} - -/* Jeff Moyer says this was implemented in Red Hat AS2.1 and RHEL3. - * AFAICT, it was never in mainline, and should not be used. --RR */ -static inline void io_prep_poll(struct iocb *iocb, int fd, int events) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_POLL; - iocb->aio_reqprio = 0; - iocb->u.poll.events = events; -} - -static inline int io_poll(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd, int events) -{ - io_prep_poll(iocb, fd, events); - io_set_callback(iocb, cb); - return io_submit(ctx, 1, &iocb); -} - -static inline void io_prep_fsync(struct iocb *iocb, int fd) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_FSYNC; - iocb->aio_reqprio = 0; -} - -static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) -{ - io_prep_fsync(iocb, fd); - io_set_callback(iocb, cb); - return io_submit(ctx, 1, &iocb); -} - -static inline void io_prep_fdsync(struct iocb *iocb, int fd) -{ - memset(iocb, 0, sizeof(*iocb)); - iocb->aio_fildes = fd; - iocb->aio_lio_opcode = IO_CMD_FDSYNC; - iocb->aio_reqprio = 0; -} - -static inline int io_fdsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) -{ - io_prep_fdsync(iocb, fd); - io_set_callback(iocb, cb); - return io_submit(ctx, 1, &iocb); -} - -static inline void io_set_eventfd(struct iocb *iocb, int eventfd) -{ - iocb->u.c.flags |= (1 << 0) /* IOCB_FLAG_RESFD */; - iocb->u.c.resfd = eventfd; -} - -#ifdef __cplusplus -} -#endif - -#endif /* __LIBAIO_H */ diff --git a/fstests-bld/libaio/src/libaio.map b/fstests-bld/libaio/src/libaio.map deleted file mode 100644 index dc377259..00000000 --- a/fstests-bld/libaio/src/libaio.map +++ /dev/null @@ -1,22 +0,0 @@ -LIBAIO_0.1 { - global: - io_queue_init; - io_queue_run; - io_queue_wait; - io_queue_release; - io_cancel; - io_submit; - io_getevents; - local: - *; - -}; - -LIBAIO_0.4 { - global: - io_setup; - io_destroy; - io_cancel; - io_getevents; - io_queue_wait; -} LIBAIO_0.1; diff --git a/fstests-bld/libaio/src/raw_syscall.c b/fstests-bld/libaio/src/raw_syscall.c deleted file mode 100644 index c3fe4b8d..00000000 --- a/fstests-bld/libaio/src/raw_syscall.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "syscall.h" - -#if defined(__ia64__) -/* based on code from glibc by Jes Sorensen */ -__asm__(".text\n" - ".globl __ia64_aio_raw_syscall\n" - ".proc __ia64_aio_raw_syscall\n" - "__ia64_aio_raw_syscall:\n" - "alloc r2=ar.pfs,1,0,8,0\n" - "mov r15=r32\n" - "break 0x100000\n" - ";;" - "br.ret.sptk.few b0\n" - ".size __ia64_aio_raw_syscall, . - __ia64_aio_raw_syscall\n" - ".endp __ia64_aio_raw_syscall" -); -#endif - -; diff --git a/fstests-bld/libaio/src/syscall-alpha.h b/fstests-bld/libaio/src/syscall-alpha.h deleted file mode 100644 index 467b74f0..00000000 --- a/fstests-bld/libaio/src/syscall-alpha.h +++ /dev/null @@ -1,209 +0,0 @@ -#define __NR_io_setup 398 -#define __NR_io_destroy 399 -#define __NR_io_getevents 400 -#define __NR_io_submit 401 -#define __NR_io_cancel 402 - -#define inline_syscall_r0_asm -#define inline_syscall_r0_out_constraint "=v" - -#define inline_syscall_clobbers \ - "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$22", "$23", "$24", "$25", "$27", "$28", "memory" - -#define inline_syscall0(name, args...) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ - "$16", "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ - "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall2(name,arg1,arg2) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ - : inline_syscall_clobbers, \ - "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall3(name,arg1,arg2,arg3) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ - : inline_syscall_clobbers, "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _sc_21 __asm__("$21"); \ - \ - _sc_0 = name; \ - _sc_16 = (long) (arg1); \ - _sc_17 = (long) (arg2); \ - _sc_18 = (long) (arg3); \ - _sc_19 = (long) (arg4); \ - _sc_20 = (long) (arg5); \ - _sc_21 = (long) (arg6); \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ - "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define INLINE_SYSCALL1(name, nr, args...) \ -({ \ - long _sc_ret, _sc_err; \ - inline_syscall##nr(__NR_##name, args); \ - if (_sc_err != 0) \ - { \ - _sc_ret = -(_sc_ret); \ - } \ - _sc_ret; \ -}) - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) \ -{ \ - return (type)INLINE_SYSCALL1(sname, 1, arg1); \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1,type2 arg2) \ -{ \ - return (type)INLINE_SYSCALL1(sname, 2, arg1, arg2); \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1,type2 arg2,type3 arg3) \ -{ \ - return (type)INLINE_SYSCALL1(sname, 3, arg1, arg2, arg3); \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - return (type)INLINE_SYSCALL1(sname, 4, arg1, arg2, arg3, arg4); \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ - return (type)INLINE_SYSCALL1(sname, 5, arg1, arg2, arg3, arg4, arg5);\ -} diff --git a/fstests-bld/libaio/src/syscall-arm.h b/fstests-bld/libaio/src/syscall-arm.h deleted file mode 100644 index 4a9b6659..00000000 --- a/fstests-bld/libaio/src/syscall-arm.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * linux/include/asm-arm/unistd.h - * - * Copyright (C) 2001-2005 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, - * no matter what the change is. Thanks! - */ - -#define __NR_OABI_SYSCALL_BASE 0x900000 - -#if defined(__thumb__) || defined(__ARM_EABI__) -#define __NR_SYSCALL_BASE 0 -#else -#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -#endif - -#define __NR_io_setup (__NR_SYSCALL_BASE+243) -#define __NR_io_destroy (__NR_SYSCALL_BASE+244) -#define __NR_io_getevents (__NR_SYSCALL_BASE+245) -#define __NR_io_submit (__NR_SYSCALL_BASE+246) -#define __NR_io_cancel (__NR_SYSCALL_BASE+247) - -#define __sys2(x) #x -#define __sys1(x) __sys2(x) - -#if defined(__thumb__) || defined(__ARM_EABI__) -#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -#define __syscall(name) "swi\t0" -#else -#define __SYS_REG(name) -#define __SYS_REG_LIST(regs...) regs -#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -#endif - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) { \ - __SYS_REG(sname) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __res_r0 __asm__("r0"); \ - __asm__ __volatile__ ( \ - __syscall(sname) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0) ) \ - : "memory" ); \ - return (type) __res_r0; \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1,type2 arg2) { \ - __SYS_REG(sname) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __res_r0 __asm__("r0"); \ - __asm__ __volatile__ ( \ - __syscall(sname) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ - : "memory" ); \ - return (type) __res_r0; \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1,type2 arg2,type3 arg3) { \ - __SYS_REG(sname) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __res_r0 __asm__("r0"); \ - __asm__ __volatile__ ( \ - __syscall(sname) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ - : "memory" ); \ - return (type) __res_r0; \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - __SYS_REG(sname) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __res_r0 __asm__("r0"); \ - __asm__ __volatile__ ( \ - __syscall(sname) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ - : "memory" ); \ - return (type) __res_r0; \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ - __SYS_REG(sname) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __r4 __asm__("r4") = (long)arg5; \ - register long __res_r0 __asm__("r0"); \ - __asm__ __volatile__ ( \ - __syscall(sname) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ - "r" (__r3), "r" (__r4) ) \ - : "memory" ); \ - return (type) __res_r0; \ -} - diff --git a/fstests-bld/libaio/src/syscall-generic.h b/fstests-bld/libaio/src/syscall-generic.h deleted file mode 100644 index ff67deb7..00000000 --- a/fstests-bld/libaio/src/syscall-generic.h +++ /dev/null @@ -1,34 +0,0 @@ -#define _GNU_SOURCE -#include <unistd.h> -#include <sys/syscall.h> - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) \ -{ \ - return (type) syscall(__NR_##sname, arg1); \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1, type2 arg2) \ -{ \ - return (type) syscall(__NR_##sname, arg1, arg2); \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1, type2 arg2, type3 arg3) \ -{ \ - return (type) syscall(__NR_##sname, arg1, arg2, arg3); \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - return (type) syscall(__NR_##sname, arg1, arg2, arg3, arg4); \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ - return (type) syscall(__NR_##sname, arg1, arg2, arg3, arg4, arg5); \ -} diff --git a/fstests-bld/libaio/src/syscall-i386.h b/fstests-bld/libaio/src/syscall-i386.h deleted file mode 100644 index 9576975a..00000000 --- a/fstests-bld/libaio/src/syscall-i386.h +++ /dev/null @@ -1,72 +0,0 @@ -#define __NR_io_setup 245 -#define __NR_io_destroy 246 -#define __NR_io_getevents 247 -#define __NR_io_submit 248 -#define __NR_io_cancel 249 - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) \ -{ \ -long __res; \ -__asm__ volatile ("xchgl %%edi,%%ebx\n" \ - "int $0x80\n" \ - "xchgl %%edi,%%ebx" \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1))); \ -return __res; \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1,type2 arg2) \ -{ \ -long __res; \ -__asm__ volatile ("xchgl %%edi,%%ebx\n" \ - "int $0x80\n" \ - "xchgl %%edi,%%ebx" \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2))); \ -return __res; \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1,type2 arg2,type3 arg3) \ -{ \ -long __res; \ -__asm__ volatile ("xchgl %%edi,%%ebx\n" \ - "int $0x80\n" \ - "xchgl %%edi,%%ebx" \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3))); \ -return __res; \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ -long __res; \ -__asm__ volatile ("xchgl %%edi,%%ebx\n" \ - "int $0x80\n" \ - "xchgl %%edi,%%ebx" \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4))); \ -return __res; \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ -long __res; \ -long tmp; \ -__asm__ volatile ("movl %%ebx,%7\n" \ - "movl %2,%%ebx\n" \ - "int $0x80\n" \ - "movl %7,%%ebx" \ - : "=a" (__res) \ - : "0" (__NR_##sname),"rm" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ - "m" (tmp)); \ -return __res; \ -} diff --git a/fstests-bld/libaio/src/syscall-ia64.h b/fstests-bld/libaio/src/syscall-ia64.h deleted file mode 100644 index 52ce9dd7..00000000 --- a/fstests-bld/libaio/src/syscall-ia64.h +++ /dev/null @@ -1,45 +0,0 @@ -#define __NR_io_setup 1238 -#define __NR_io_destroy 1239 -#define __NR_io_getevents 1240 -#define __NR_io_submit 1241 -#define __NR_io_cancel 1242 - -#define __ia64_raw_syscall(fname, sname) \ - __asm__ (".text\n" \ - ".globl " SYMSTR(fname) "\n" \ - ".proc " SYMSTR(fname) "\n" \ - SYMSTR(fname) ":\n" \ - " mov r15=" SYMSTR( __NR_ ## sname ) "\n" \ - " break 0x100000\n" \ - " ;;\n" \ - " cmp.eq p6,p0=-1,r10\n" \ - " ;;\n" \ - " (p6) sub r8=0,r8\n" \ - " br.ret.sptk.few b0\n" \ - ".size " SYMSTR(fname) ", . - " SYMSTR(fname) "\n" \ - ".endp " SYMSTR(fname) "\n" \ - ); - -#define io_syscall0(type, name) \ - extern type name(void); \ - __ia64_raw_syscall(name); - -#define io_syscall1(type, fname, sname, type1, arg1) \ - extern type fname(type1 arg1); \ - __ia64_raw_syscall(fname, sname); - -#define io_syscall2(type, fname, sname, type1, arg1, type2, arg2) \ - extern type fname(type1 arg1, type2 arg2); \ - __ia64_raw_syscall(fname, sname); - -#define io_syscall3(type, fname, sname, type1, arg1, type2, arg2, type3, arg3) \ - extern type fname(type1 arg1, type2 arg2, type3 arg3); \ - __ia64_raw_syscall(fname, sname); - -#define io_syscall4(type, fname, sname, type1, arg1, type2, arg2, type3, arg3, type4, arg4) \ - extern type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4); \ - __ia64_raw_syscall(fname, sname); - -#define io_syscall5(type, fname, sname, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5) \ - extern type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5); \ - __ia64_raw_syscall(fname, sname); diff --git a/fstests-bld/libaio/src/syscall-ppc.h b/fstests-bld/libaio/src/syscall-ppc.h deleted file mode 100644 index ca70dd20..00000000 --- a/fstests-bld/libaio/src/syscall-ppc.h +++ /dev/null @@ -1,94 +0,0 @@ -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 - -/* On powerpc a system call basically clobbers the same registers like a - * function call, with the exception of LR (which is needed for the - * "sc; bnslr" sequence) and CR (where only CR0.SO is clobbered to signal - * an error return status). - */ - -#define __syscall_nr(nr, type, name, args...) \ - unsigned long __sc_ret, __sc_err; \ - { \ - register unsigned long __sc_0 __asm__ ("r0"); \ - register unsigned long __sc_3 __asm__ ("r3"); \ - register unsigned long __sc_4 __asm__ ("r4"); \ - register unsigned long __sc_5 __asm__ ("r5"); \ - register unsigned long __sc_6 __asm__ ("r6"); \ - register unsigned long __sc_7 __asm__ ("r7"); \ - register unsigned long __sc_8 __asm__ ("r8"); \ - \ - __sc_loadargs_##nr(name, args); \ - __asm__ __volatile__ \ - ("sc \n\t" \ - "mfcr %0 " \ - : "=&r" (__sc_0), \ - "=&r" (__sc_3), "=&r" (__sc_4), \ - "=&r" (__sc_5), "=&r" (__sc_6), \ - "=&r" (__sc_7), "=&r" (__sc_8) \ - : __sc_asm_input_##nr \ - : "cr0", "ctr", "memory", \ - "r9", "r10","r11", "r12"); \ - __sc_ret = __sc_3; \ - __sc_err = __sc_0; \ - } \ - if (__sc_err & 0x10000000) return -((int)__sc_ret); \ - return (type) __sc_ret - -#define __sc_loadargs_0(name, dummy...) \ - __sc_0 = __NR_##name -#define __sc_loadargs_1(name, arg1) \ - __sc_loadargs_0(name); \ - __sc_3 = (unsigned long) (arg1) -#define __sc_loadargs_2(name, arg1, arg2) \ - __sc_loadargs_1(name, arg1); \ - __sc_4 = (unsigned long) (arg2) -#define __sc_loadargs_3(name, arg1, arg2, arg3) \ - __sc_loadargs_2(name, arg1, arg2); \ - __sc_5 = (unsigned long) (arg3) -#define __sc_loadargs_4(name, arg1, arg2, arg3, arg4) \ - __sc_loadargs_3(name, arg1, arg2, arg3); \ - __sc_6 = (unsigned long) (arg4) -#define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5) \ - __sc_loadargs_4(name, arg1, arg2, arg3, arg4); \ - __sc_7 = (unsigned long) (arg5) - -#define __sc_asm_input_0 "0" (__sc_0) -#define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3) -#define __sc_asm_input_2 __sc_asm_input_1, "2" (__sc_4) -#define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5) -#define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6) -#define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7) - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) \ -{ \ - __syscall_nr(1, type, sname, arg1); \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1, type2 arg2) \ -{ \ - __syscall_nr(2, type, sname, arg1, arg2); \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1, type2 arg2, type3 arg3) \ -{ \ - __syscall_nr(3, type, sname, arg1, arg2, arg3); \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - __syscall_nr(4, type, sname, arg1, arg2, arg3, arg4); \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ -{ \ - __syscall_nr(5, type, sname, arg1, arg2, arg3, arg4, arg5); \ -} diff --git a/fstests-bld/libaio/src/syscall-s390.h b/fstests-bld/libaio/src/syscall-s390.h deleted file mode 100644 index 3ec5ee34..00000000 --- a/fstests-bld/libaio/src/syscall-s390.h +++ /dev/null @@ -1,131 +0,0 @@ -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 - -#define io_svc_clobber "1", "cc", "memory" - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) { \ - register type1 __arg1 asm("2") = arg1; \ - register long __svcres asm("2"); \ - long __res; \ - __asm__ __volatile__ ( \ - " .if %1 < 256\n" \ - " svc %b1\n" \ - " .else\n" \ - " la %%r1,%1\n" \ - " .svc 0\n" \ - " .endif" \ - : "=d" (__svcres) \ - : "i" (__NR_##sname), \ - "0" (__arg1) \ - : io_svc_clobber ); \ - __res = __svcres; \ - return (type) __res; \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1, type2 arg2) { \ - register type1 __arg1 asm("2") = arg1; \ - register type2 __arg2 asm("3") = arg2; \ - register long __svcres asm("2"); \ - long __res; \ - __asm__ __volatile__ ( \ - " .if %1 < 256\n" \ - " svc %b1\n" \ - " .else\n" \ - " la %%r1,%1\n" \ - " svc 0\n" \ - " .endif" \ - : "=d" (__svcres) \ - : "i" (__NR_##sname), \ - "0" (__arg1), \ - "d" (__arg2) \ - : io_svc_clobber ); \ - __res = __svcres; \ - return (type) __res; \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2, \ - type3,arg3) \ -type fname(type1 arg1, type2 arg2, type3 arg3) { \ - register type1 __arg1 asm("2") = arg1; \ - register type2 __arg2 asm("3") = arg2; \ - register type3 __arg3 asm("4") = arg3; \ - register long __svcres asm("2"); \ - long __res; \ - __asm__ __volatile__ ( \ - " .if %1 < 256\n" \ - " svc %b1\n" \ - " .else\n" \ - " la %%r1,%1\n" \ - " svc 0\n" \ - " .endif" \ - : "=d" (__svcres) \ - : "i" (__NR_##sname), \ - "0" (__arg1), \ - "d" (__arg2), \ - "d" (__arg3) \ - : io_svc_clobber ); \ - __res = __svcres; \ - return (type) __res; \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2, \ - type3,arg3,type4,arg4) \ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - register type1 __arg1 asm("2") = arg1; \ - register type2 __arg2 asm("3") = arg2; \ - register type3 __arg3 asm("4") = arg3; \ - register type4 __arg4 asm("5") = arg4; \ - register long __svcres asm("2"); \ - long __res; \ - __asm__ __volatile__ ( \ - " .if %1 < 256\n" \ - " svc %b1\n" \ - " .else\n" \ - " la %%r1,%1\n" \ - " svc 0\n" \ - " .endif" \ - : "=d" (__svcres) \ - : "i" (__NR_##sname), \ - "0" (__arg1), \ - "d" (__arg2), \ - "d" (__arg3), \ - "d" (__arg4) \ - : io_svc_clobber ); \ - __res = __svcres; \ - return (type) __res; \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2, \ - type3,arg3,type4,arg4,type5,arg5) \ -type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - register type1 __arg1 asm("2") = arg1; \ - register type2 __arg2 asm("3") = arg2; \ - register type3 __arg3 asm("4") = arg3; \ - register type4 __arg4 asm("5") = arg4; \ - register type5 __arg5 asm("6") = arg5; \ - register long __svcres asm("2"); \ - long __res; \ - __asm__ __volatile__ ( \ - " .if %1 < 256\n" \ - " svc %b1\n" \ - " .else\n" \ - " la %%r1,%1\n" \ - " svc 0\n" \ - " .endif" \ - : "=d" (__svcres) \ - : "i" (__NR_##sname), \ - "0" (__arg1), \ - "d" (__arg2), \ - "d" (__arg3), \ - "d" (__arg4), \ - "d" (__arg5) \ - : io_svc_clobber ); \ - __res = __svcres; \ - return (type) __res; \ -} diff --git a/fstests-bld/libaio/src/syscall-x86_64.h b/fstests-bld/libaio/src/syscall-x86_64.h deleted file mode 100644 index 93618567..00000000 --- a/fstests-bld/libaio/src/syscall-x86_64.h +++ /dev/null @@ -1,63 +0,0 @@ -#define __NR_io_setup 206 -#define __NR_io_destroy 207 -#define __NR_io_getevents 208 -#define __NR_io_submit 209 -#define __NR_io_cancel 210 - -#define __syscall_clobber "r11","rcx","memory" -#define __syscall "syscall" - -#define io_syscall1(type,fname,sname,type1,arg1) \ -type fname(type1 arg1) \ -{ \ -long __res; \ -__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)) : __syscall_clobber ); \ -return __res; \ -} - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1,type2 arg2) \ -{ \ -long __res; \ -__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \ -return __res; \ -} - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1,type2 arg2,type3 arg3) \ -{ \ -long __res; \ -__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ - "d" ((long)(arg3)) : __syscall_clobber); \ -return __res; \ -} - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ -long __res; \ -__asm__ volatile ("movq %5,%%r10 ;" __syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ - "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ -return __res; \ -} - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ -long __res; \ -__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ - "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ - __syscall_clobber,"r8","r10" ); \ -return __res; \ -} diff --git a/fstests-bld/libaio/src/syscall.h b/fstests-bld/libaio/src/syscall.h deleted file mode 100644 index 735d2394..00000000 --- a/fstests-bld/libaio/src/syscall.h +++ /dev/null @@ -1,31 +0,0 @@ -#include <sys/syscall.h> -#include <unistd.h> - -#define _SYMSTR(str) #str -#define SYMSTR(str) _SYMSTR(str) - -#define SYMVER(compat_sym, orig_sym, ver_sym) \ - __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym)); - -#define DEFSYMVER(compat_sym, orig_sym, ver_sym) \ - __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym)); - -#if defined(__i386__) -#include "syscall-i386.h" -#elif defined(__x86_64__) -#include "syscall-x86_64.h" -#elif defined(__ia64__) -#include "syscall-ia64.h" -#elif defined(__PPC__) -#include "syscall-ppc.h" -#elif defined(__s390__) -#include "syscall-s390.h" -#elif defined(__alpha__) -#include "syscall-alpha.h" -#elif defined(__arm__) -#include "syscall-arm.h" -#elif defined(__aarch64__) -#include "syscall-generic.h" -#else -#error "add syscall-arch.h" -#endif diff --git a/fstests-bld/libaio/src/vsys_def.h b/fstests-bld/libaio/src/vsys_def.h deleted file mode 100644 index 13d032e3..00000000 --- a/fstests-bld/libaio/src/vsys_def.h +++ /dev/null @@ -1,24 +0,0 @@ -/* libaio Linux async I/O interface - Copyright 2002 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -extern int vsys_io_setup(unsigned nr_reqs, io_context_t *ctxp); -extern int vsys_io_destroy(io_context_t ctx); -extern int vsys_io_submit(io_context_t ctx, long nr, struct iocb *iocbs[]); -extern int vsys_io_cancel(io_context_t ctx, struct iocb *iocb); -extern int vsys_io_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when); -extern int vsys_io_getevents(io_context_t ctx_id, long nr, struct io_event *events, const struct timespec *timeout); - diff --git a/fstests-bld/update-all b/fstests-bld/update-all index c6e6e0d6..abb07063 100755 --- a/fstests-bld/update-all +++ b/fstests-bld/update-all @@ -27,8 +27,6 @@ mkdir -p $DESTDIR (cd libaio; make $J prefix=$DESTDIR install) -rm $DESTDIR/lib/libaio.so* - (cd xfsprogs-dev; \ make $J LLDFLAGS=-all-static BUILD_VERBOSE=1; \ DIST_ROOT=$DESTDIR make $J install; \ |