4 GNU LIBRARY GENERAL PUBLIC LICENSE+ Version 2, June 19912 Copyright (C) 1991 Free Software Foundation, Inc.: 675 Mass Ave, Cambridge, MA 02139, 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 library GPL. It is@ numbered 2 because it goes with version 2 of the ordinary GPL.]$ Preamble? The licenses for most software are designed to take away yourDfreedom to share and change it. By contrast, the GNU General PublicCLicenses are intended to guarantee your freedom to share and changeCfree software--to make sure the software is free for all its users.C This license, the Library General Public License, applies to someBspecially designated Free Software Foundation software, and to anyCother libraries whose authors decide to use it. You can use it foryour libraries, too.B When we speak of free software, we are referring to freedom, notFprice. Our General Public Licenses are designed to make sure that youFhave the freedom to distribute copies of free software (and charge forEthis service if you wish), that you receive source code or can get itDif you want it, that you can change the software or use pieces of it@in new free programs; and that you know you can do these things.B To protect your rights, we need to make restrictions that forbidFanyone to deny you these rights or to ask you to surrender the rights.CThese restrictions translate to certain responsibilities for you if:you distribute copies of the library, or if you modify it.F For example, if you distribute copies of the library, whether gratisFor for a fee, you must give the recipients all the rights that we gaveFyou. You must make sure that they, too, receive or can get the source?code. If you link a program with the library, you must provideDcomplete object files to the recipients so that they can relink themEwith the library, after making changes to the library and recompilingBit. And you must show them these terms so they know their rights.C Our method of protecting your rights has two steps: (1) copyrightAthe library, and (2) offer you this license which gives you legal9permission to copy, distribute and/or modify the library.B Also, for each distributor's protection, we want to make certainAthat everyone understands that there is no warranty for this freeFlibrary. If the library is modified by someone else and passed on, weCwant its recipients to know that what they have is not the originalFversion, so that any problems introduced by others will not reflect on"the original authors' reputations.@ Finally, any free program is threatened constantly by softwareFpatents. We wish to avoid the danger that companies distributing freeAsoftware will individually obtain patent licenses, thus in effectEtransforming the program into proprietary software. To prevent this,Ewe have made it clear that any patent must be licensed for everyone's free use or not licensed at all.I Most GNU software, including some libraries, is covered by the ordinaryJGNU General Public License, which was designed for utility programs. ThisClicense, the GNU Library General Public License, applies to certainHdesignated libraries. This license is quite different from the ordinaryHone; be sure to read it in full, and don't assume that anything in it is$the same as in the ordinary license.I The reason we have a separate public license for some libraries is thatJthey blur the distinction we usually make between modifying or adding to aGprogram and simply using it. Linking a program with a library, withoutGchanging the library, is in some sense simply using the library, and isKanalogous to running a utility program or application program. However, inFa textual and legal sense, the linked executable is a combined work, aKderivative of the original library, and the ordinary General Public Licensetreats it as such.A Because of this blurred distinction, using the ordinary GeneralAPublic License for libraries did not effectively promote software?sharing, because most developers did not use the libraries. We>concluded that weaker conditions might promote sharing better.F However, unrestricted linking of non-free programs would deprive theBusers of those programs of all benefit from the free status of theIlibraries themselves. This Library General Public License is intended toCpermit developers of non-free programs to use free libraries, whileEpreserving your freedom as a user of such programs to change the freeJlibraries that are incorporated in them. (We have not seen how to achieveKthis as regards changes in header files, but we have achieved it as regardsGchanges in the actual functions of the Library.) The hope is that this2will lead to faster development of free libraries.@ The precise terms and conditions for copying, distribution andEmodification follow. Pay close attention to the difference between aD"work based on the library" and a "work that uses the library". TheDformer contains code derived from the library, while the latter only works together with the library.F Note that it is possible for a library to be covered by the ordinary7General Public License rather than by this special one.4 GNU LIBRARY GENERAL PUBLIC LICENSEB TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATIONA 0. This License Agreement applies to any software library whichDcontains a notice placed by the copyright holder or other authorizedBparty saying it may be distributed under the terms of this LibraryFGeneral Public License (also called "this License"). Each licensee isaddressed as "you".B A "library" means a collection of software functions and/or dataBprepared so as to be conveniently linked with application programsA(which use some of those functions and data) to form executables.C The "Library", below, refers to any such software library or workCwhich has been distributed under these terms. A "work based on the>Library" means either the Library or any derivative work underAcopyright law: that is to say, a work containing the Library or aFportion of it, either verbatim or with modifications and/or translatedFstraightforwardly into another language. (Hereinafter, translation is8included without limitation in the term "modification".)C "Source code" for a work means the preferred form of the work forFmaking modifications to it. For a library, complete source code meansDall the source code for all modules it contains, plus any associatedHinterface definition files, plus the scripts used to control compilation and installation of the library.F Activities other than copying, distribution and modification are not@covered by this License; they are outside its scope. The act ofFrunning a program using the Library is not restricted, and output fromFsuch a program is covered only if its contents constitute a work basedCon the Library (independent of the use of the Library in a tool forCwriting it). Whether that is true depends on what the Library does0and what the program that uses the Library does. A 1. You may copy and distribute verbatim copies of the Library'sDcomplete source code as you receive it, in any medium, provided that;you conspicuously and appropriately publish on each copy anDappropriate copyright notice and disclaimer of warranty; keep intactDall the notices that refer to this License and to the absence of any>warranty; and distribute a copy of this License along with theLibrary.C You may charge a fee for the physical act of transferring a copy,Fand you may at your option offer warranty protection in exchange for afee.E 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 andBdistribute 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.C b) You must cause the files modified to carry prominent noticesB 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.F d) If a facility in the modified Library refers to a function or aD table of data to be supplied by an application program that usesD the facility, other than as an argument passed when the facilityF is invoked, then you must make a good faith effort to ensure that,@ in the event an application does not supply such function orE table, the facility still operates, and performs whatever part of# its purpose remains meaningful.E (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 anyE application-supplied function or table used by this function mustB be optional: if the application does not supply it, the square3 root function must still compute square roots.)=These requirements apply to the modified work as a whole. IfDidentifiable sections of that work are not derived from the Library,Band can be reasonably considered independent and separate works inCthemselves, then this License, and its terms, do not apply to thoseBsections when you distribute them as separate works. But when youEdistribute the same sections as part of a whole which is a work basedEon the Library, the distribution of the whole must be on the terms ofAthis License, whose permissions for other licensees extend to theEentire whole, and thus to each and every part regardless of who wroteit.EThus, it is not the intent of this section to claim rights or contestEyour 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.FIn addition, mere aggregation of another work not based on the LibraryEwith the Library (or with a work based on the Library) on a volume ofDa storage or distribution medium does not bring the other work underthe scope of this License.F 3. You may opt to apply the terms of the ordinary GNU General PublicFLicense instead of this License to a given copy of the Library. To doCthis, you must alter all the notices that refer to this License, soFthat they refer to the ordinary GNU General Public License, version 2,Finstead of to this License. (If a newer version than version 2 of theFordinary GNU General Public License has appeared, then you can specifyCthat version instead if you wish.) Do not make any other change inthese notices.B Once this change is made in a given copy, it is irreversible forDthat copy, so the ordinary GNU General Public License applies to all;subsequent copies and derivative works made from that copy.A This option is useful when you wish to copy part of the code of1the Library into a program that is not a library.= 4. You may copy and distribute the Library (or a portion orDderivative of it, under Section 2) in object code or executable formEunder the terms of Sections 1 and 2 above provided that you accompanyFit with the complete corresponding machine-readable source code, whichBmust be distributed under the terms of Sections 1 and 2 above on a1medium customarily used for software interchange.C If distribution of object code is made by offering access to copyDfrom 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 not8compelled to copy the source along with the object code.@ 5. A program that contains no derivative of any portion of theFLibrary, but is designed to work with the Library by being compiled orAlinked with it, is called a "work that uses the Library". Such a@work, in isolation, is not a derivative work of the Library, and2therefore falls outside the scope of this License.B However, linking a "work that uses the Library" with the LibraryEcreates an executable that is a derivative of the Library (because itDcontains 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.F When a "work that uses the Library" uses material from a header fileBthat is part of the Library, the object code for the work may be aBderivative work of the Library even though the source code is not.AWhether this is true is especially significant if the work can beDlinked 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, dataBstructure layouts and accessors, and small macros and small inlineCfunctions (ten lines or less in length), then the use of the objectFfile is unrestricted, regardless of whether it is legally a derivativeDwork. (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 mayEdistribute 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.C 6. As an exception to the Sections above, you may also compile orAlink a "work that uses the Library" with the Library to produce aAwork 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.D You must give prominent notice with each copy of the work that theELibrary is used in it and that the Library and its use are covered byCthis License. You must supply a copy of this License. If the workAduring execution displays copyright notices, you must include theCcopyright notice for the Library among them, as well as a referenceFdirecting the user to the copy of this License. Also, you must do oneof these things:9 a) Accompany the work with the complete correspondingC machine-readable source code for the Library including whateverB changes were used in the work (which must be distributed underE Sections 1 and 2 above); and, if the work is an executable linkedC with the Library, with the complete machine-readable "work thatE uses the Library", as object code and/or source code, so that theE user can modify the Library and then relink to produce a modifiedB executable containing the modified Library. (It is understoodF that the user who changes the contents of definitions files in theE Library will not necessarily be able to recompile the application% to use the modified definitions.)< b) 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 more2 than the cost of performing this distribution.E c) If distribution of the work is made by offering access to copyF from a designated place, offer equivalent access to copy the above, specified materials from the same place.@ d) Verify that the user has already received a copy of these= materials or that you have already sent this user a copy.A For an executable, the required form of the "work that uses the>Library" must include any data and utility programs needed forEreproducing the executable from it. However, as a special exception,Fthe source code distributed need not include anything that is normally<distributed (in either source or binary form) with the majorCcomponents (compiler, kernel, and so on) of the operating system onCwhich the executable runs, unless that component itself accompaniesthe executable.= It may happen that this requirement contradicts the license@restrictions of other proprietary libraries that do not normallyFaccompany the operating system. Such a contradiction means you cannot@use both them and the Library together in an executable that you distribute.B 7. You may place library facilities that are a work based on theDLibrary side-by-side in a single library together with other libraryFfacilities not covered by this License, and distribute such a combinedElibrary, provided that the separate distribution of the work based on<the Library and of the other library facilities is otherwise5permitted, and provided that you do these two things:B 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 b) Give prominent notice with the combined library of the factB that part of it is a work based on the Library, and explainingD where to find the accompanying uncombined form of the same work.C 8. You may not copy, modify, sublicense, link with, or distributeAthe Library except as expressly provided under this License. Any<attempt otherwise to copy, modify, sublicense, link with, orEdistribute the Library is void, and will automatically terminate yourFrights under this License. However, parties who have received copies,Cor rights, from you under this License will not have their licenses=terminated so long as such parties remain in full compliance.D 9. You are not required to accept this License, since you have notDsigned it. However, nothing else grants you permission to modify orBdistribute the Library or its derivative works. These actions areCprohibited by law if you do not accept this License. Therefore, by?modifying or distributing the Library (or any work based on theDLibrary), you indicate your acceptance of this License to do so, andCall its terms and conditions for copying, distributing or modifying!the Library or works based on it.F 10. Each time you redistribute the Library (or any work based on theALibrary), the recipient automatically receives a license from theForiginal licensor to copy, distribute, link with or modify the LibraryFsubject to these terms and conditions. You may not impose any furtherFrestrictions on the recipients' exercise of the rights granted herein.DYou are not responsible for enforcing compliance by third parties to this License.F 11. If, as a consequence of a court judgment or allegation of patentDinfringement or for any other reason (not limited to patent issues),Cconditions are imposed on you (whether by court order, agreement orFotherwise) that contradict the conditions of this License, they do not>excuse you from the conditions of this License. If you cannotFdistribute so as to satisfy simultaneously your obligations under thisFLicense and any other pertinent obligations, then as a consequence you@may not distribute the Library at all. For example, if a patentFlicense would not permit royalty-free redistribution of the Library byEall those who receive copies directly or indirectly through you, thenCthe only way you could satisfy both it and this License would be to2refrain entirely from distribution of the Library.IIf any portion of this section is held invalid or unenforceable under anyIparticular circumstance, the balance of the section is intended to apply,Gand the section as a whole is intended to apply in other circumstances.CIt is not the purpose of this section to induce you to infringe anyDpatents 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 distributedAthrough that system in reliance on consistent application of thatFsystem; it is up to the author/donor to decide if he or she is willingEto distribute software through any other system and a licensee cannotimpose that choice.EThis section is intended to make thoroughly clear what is believed to-be a consequence of the rest of this License.D 12. If the distribution and/or use of the Library is restricted inEcertain countries either by patents or by copyrighted interfaces, theKoriginal copyright holder who places the Library under this License may addKan explicit geographical distribution limitation excluding those countries,Eso that distribution is permitted only in or among countries not thusGexcluded. In such case, this License incorporates the limitation as if$written in the body of this License.A 13. The Free Software Foundation may publish revised and/or newAversions of the Library General Public License from time to time.CSuch new versions will be similar in spirit to the present version,=but may differ in detail to address new problems or concerns.FEach version is given a distinguishing version number. If the LibraryBspecifies a version number of this License which applies to it andC"any later version", you have the option of following the terms andFconditions either of that version or of any later version published by@the Free Software Foundation. If the Library does not specify aDlicense version number, you may choose any version ever published bythe Free Software Foundation.E 14. If you wish to incorporate parts of the Library into other freeCprograms whose distribution conditions are incompatible with these,Awrite 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. OurFdecision will be guided by the two goals of preserving the free statusDof all derivatives of our free software and of promoting the sharing and reuse of software generally.' NO WARRANTYA 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NODWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.DEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/ORAOTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANYEKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THEBIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARBPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THEDLIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME:THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.C 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO INDWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFYDAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU:FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL ORDCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE@LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEINGDRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR ACFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IFFSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCHDAMAGES.0 END OF TERMS AND CONDITIONS= Appendix: How to Apply These Terms to Your New LibrariesE If you develop a new library, and you want it to be of the greatestEpossible use to the public, we recommend making it free software thatBeveryone can redistribute and change. You can do so by permittingKredistribution under these terms (or, alternatively, under the terms of the!ordinary General Public License).K To apply these terms, attach the following notices to the library. It isJsafest to attach them to the start of each source file to most effectivelyHconvey the exclusion of warranty; and each file should have at least theA"copyright" line and a pointer to where the full notice is found.K * Copyright (C) A This library is free software; you can redistribute it and/or? modify it under the terms of the GNU Library General Public@ License as published by the Free Software Foundation; eitherD version 2 of the License, or (at your option) any later version.C This library is distributed in the hope that it will be useful,B but WITHOUT ANY WARRANTY; without even the implied warranty ofE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU4 Library General Public License for more details.E You should have received a copy of the GNU Library General Public> License along with this library; if not, write to the FreeF Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.HAlso add information on how to contact you by electronic and paper mail.GYou should also get your employer (if you work as a programmer) or yourDschool, 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 theO library `Frob' (a library for tweaking knobs) written by James Random Hacker.& , 1 April 1990 Ty Coon, President of ViceThat's all there is to it!