1Valid-License-Identifier: LGPL-2.0 2Valid-License-Identifier: LGPL-2.0+ 3SPDX-URL: https://spdx.org/licenses/LGPL-2.0.html 4Usage-Guide: 5 To use this license in source code, put one of the following SPDX 6 tag/value pairs into a comment according to the placement 7 guidelines in the licensing rules documentation. 8 For 'GNU Library General Public License (LGPL) version 2.0 only' use: 9 SPDX-License-Identifier: LGPL-2.0 10 For 'GNU Library General Public License (LGPL) version 2.0 or any later 11 version' use: 12 SPDX-License-Identifier: LGPL-2.0+ 13License-Text: 14 15GNU LIBRARY GENERAL PUBLIC LICENSE 16Version 2, June 1991 17 18Copyright (C) 1991 Free Software Foundation, Inc. 1951 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 20 21Everyone is permitted to copy and distribute verbatim copies of this 22license document, but changing it is not allowed. 23 24[This is the first released version of the library GPL. It is numbered 2 25because it goes with version 2 of the ordinary GPL.] 26 27Preamble 28 29The licenses for most software are designed to take away your freedom to 30share and change it. By contrast, the GNU General Public Licenses are 31intended to guarantee your freedom to share and change free software--to 32make sure the software is free for all its users. 33 34This license, the Library General Public License, applies to some specially 35designated Free Software Foundation software, and to any other libraries 36whose authors decide to use it. You can use it for your libraries, too. 37 38When we speak of free software, we are referring to freedom, not price. Our 39General Public Licenses are designed to make sure that you have the freedom 40to distribute copies of free software (and charge for this service if you 41wish), that you receive source code or can get it if you want it, that you 42can change the software or use pieces of it in new free programs; and that 43you know you can do these things. 44 45To protect your rights, we need to make restrictions that forbid anyone to 46deny you these rights or to ask you to surrender the rights. These 47restrictions translate to certain responsibilities for you if you 48distribute copies of the library, or if you modify it. 49 50For example, if you distribute copies of the library, whether gratis or for 51a fee, you must give the recipients all the rights that we gave you. You 52must make sure that they, too, receive or can get the source code. If you 53link a program with the library, you must provide complete object files to 54the recipients so that they can relink them with the library, after making 55changes to the library and recompiling it. And you must show them these 56terms so they know their rights. 57 58Our method of protecting your rights has two steps: (1) copyright the 59library, and (2) offer you this license which gives you legal permission to 60copy, distribute and/or modify the library. 61 62Also, for each distributor's protection, we want to make certain that 63everyone understands that there is no warranty for this free library. If 64the library is modified by someone else and passed on, we want its 65recipients to know that what they have is not the original version, so that 66any problems introduced by others will not reflect on the original authors' 67reputations. 68 69Finally, any free program is threatened constantly by software patents. We 70wish to avoid the danger that companies distributing free software will 71individually obtain patent licenses, thus in effect transforming the 72program into proprietary software. To prevent this, we have made it clear 73that any patent must be licensed for everyone's free use or not licensed at 74all. 75 76Most GNU software, including some libraries, is covered by the ordinary GNU 77General Public License, which was designed for utility programs. This 78license, the GNU Library General Public License, applies to certain 79designated libraries. This license is quite different from the ordinary 80one; be sure to read it in full, and don't assume that anything in it is 81the same as in the ordinary license. 82 83The reason we have a separate public license for some libraries is that 84they blur the distinction we usually make between modifying or adding to a 85program and simply using it. Linking a program with a library, without 86changing the library, is in some sense simply using the library, and is 87analogous to running a utility program or application program. However, in 88a textual and legal sense, the linked executable is a combined work, a 89derivative of the original library, and the ordinary General Public License 90treats it as such. 91 92Because of this blurred distinction, using the ordinary General Public 93License for libraries did not effectively promote software sharing, because 94most developers did not use the libraries. We concluded that weaker 95conditions might promote sharing better. 96 97However, unrestricted linking of non-free programs would deprive the users 98of those programs of all benefit from the free status of the libraries 99themselves. This Library General Public License is intended to permit 100developers of non-free programs to use free libraries, while preserving 101your freedom as a user of such programs to change the free libraries that 102are incorporated in them. (We have not seen how to achieve this as regards 103changes in header files, but we have achieved it as regards changes in the 104actual functions of the Library.) The hope is that this will lead to faster 105development of free libraries. 106 107The precise terms and conditions for copying, distribution and modification 108follow. Pay close attention to the difference between a "work based on the 109library" and a "work that uses the library". The former contains code 110derived from the library, while the latter only works together with the 111library. 112 113Note that it is possible for a library to be covered by the ordinary 114General Public License rather than by this special one. 115 116TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 1180. This License Agreement applies to any software library which contains a 119 notice placed by the copyright holder or other authorized party saying 120 it may be distributed under the terms of this Library General Public 121 License (also called "this License"). Each licensee is addressed as 122 "you". 123 124 A "library" means a collection of software functions and/or data 125 prepared so as to be conveniently linked with application programs 126 (which use some of those functions and data) to form executables. 127 128 The "Library", below, refers to any such software library or work which 129 has been distributed under these terms. A "work based on the Library" 130 means either the Library or any derivative work under copyright law: 131 that is to say, a work containing the Library or a portion of it, either 132 verbatim or with modifications and/or translated straightforwardly into 133 another language. (Hereinafter, translation is included without 134 limitation in the term "modification".) 135 136 "Source code" for a work means the preferred form of the work for making 137 modifications to it. For a library, complete source code means all the 138 source code for all modules it contains, plus any associated interface 139 definition files, plus the scripts used to control compilation and 140 installation of the library. 141 142 Activities other than copying, distribution and modification are not 143 covered by this License; they are outside its scope. The act of running 144 a program using the Library is not restricted, and output from such a 145 program is covered only if its contents constitute a work based on the 146 Library (independent of the use of the Library in a tool for writing 147 it). Whether that is true depends on what the Library does and what the 148 program that uses the Library does. 149 1501. You may copy and distribute verbatim copies of the Library's complete 151 source code as you receive it, in any medium, provided that you 152 conspicuously and appropriately publish on each copy an appropriate 153 copyright notice and disclaimer of warranty; keep intact all the notices 154 that refer to this License and to the absence of any warranty; and 155 distribute a copy of this License along with the Library. 156 157 You may charge a fee for the physical act of transferring a copy, and 158 you may at your option offer warranty protection in exchange for a fee. 159 1602. You may modify your copy or copies of the Library or any portion of it, 161 thus forming a work based on the Library, and copy and distribute such 162 modifications or work under the terms of Section 1 above, provided that 163 you also meet all of these conditions: 164 165 a) The modified work must itself be a software library. 166 167 b) You must cause the files modified to carry prominent notices stating 168 that you changed the files and the date of any change. 169 170 c) You must cause the whole of the work to be licensed at no charge to 171 all third parties under the terms of this License. 172 173 d) If a facility in the modified Library refers to a function or a table 174 of data to be supplied by an application program that uses the 175 facility, other than as an argument passed when the facility is 176 invoked, then you must make a good faith effort to ensure that, in 177 the event an application does not supply such function or table, the 178 facility still operates, and performs whatever part of its purpose 179 remains meaningful. 180 181 (For example, a function in a library to compute square roots has a 182 purpose that is entirely well-defined independent of the 183 application. Therefore, Subsection 2d requires that any 184 application-supplied function or table used by this function must be 185 optional: if the application does not supply it, the square root 186 function must still compute square roots.) 187 188 These requirements apply to the modified work as a whole. If 189 identifiable sections of that work are not derived from the Library, and 190 can be reasonably considered independent and separate works in 191 themselves, then this License, and its terms, do not apply to those 192 sections when you distribute them as separate works. But when you 193 distribute the same sections as part of a whole which is a work based on 194 the Library, the distribution of the whole must be on the terms of this 195 License, whose permissions for other licensees extend to the entire 196 whole, and thus to each and every part regardless of who wrote it. 197 198 Thus, it is not the intent of this section to claim rights or contest 199 your rights to work written entirely by you; rather, the intent is to 200 exercise the right to control the distribution of derivative or 201 collective works based on the Library. 202 203 In addition, mere aggregation of another work not based on the Library 204 with the Library (or with a work based on the Library) on a volume of a 205 storage or distribution medium does not bring the other work under the 206 scope of this License. 207 2083. You may opt to apply the terms of the ordinary GNU General Public 209 License instead of this License to a given copy of the Library. To do 210 this, you must alter all the notices that refer to this License, so that 211 they refer to the ordinary GNU General Public License, version 2, 212 instead of to this License. (If a newer version than version 2 of the 213 ordinary GNU General Public License has appeared, then you can specify 214 that version instead if you wish.) Do not make any other change in these 215 notices. 216 217 Once this change is made in a given copy, it is irreversible for that 218 copy, so the ordinary GNU General Public License applies to all 219 subsequent copies and derivative works made from that copy. 220 221 This option is useful when you wish to copy part of the code of the 222 Library into a program that is not a library. 223 2244. You may copy and distribute the Library (or a portion or derivative of 225 it, under Section 2) in object code or executable form under the terms 226 of Sections 1 and 2 above provided that you accompany it with the 227 complete corresponding machine-readable source code, which must be 228 distributed under the terms of Sections 1 and 2 above on a medium 229 customarily used for software interchange. 230 231 If distribution of object code is made by offering access to copy from a 232 designated place, then offering equivalent access to copy the source 233 code from the same place satisfies the requirement to distribute the 234 source code, even though third parties are not compelled to copy the 235 source along with the object code. 236 2375. A program that contains no derivative of any portion of the Library, but 238 is designed to work with the Library by being compiled or linked with 239 it, is called a "work that uses the Library". Such a work, in isolation, 240 is not a derivative work of the Library, and therefore falls outside the 241 scope of this License. 242 243 However, linking a "work that uses the Library" with the Library creates 244 an executable that is a derivative of the Library (because it contains 245 portions of the Library), rather than a "work that uses the 246 library". The executable is therefore covered by this License. Section 6 247 states terms for distribution of such executables. 248 249 When a "work that uses the Library" uses material from a header file 250 that is part of the Library, the object code for the work may be a 251 derivative work of the Library even though the source code is 252 not. Whether this is true is especially significant if the work can be 253 linked without the Library, or if the work is itself a library. The 254 threshold for this to be true is not precisely defined by law. 255 256 If such an object file uses only numerical parameters, data structure 257 layouts and accessors, and small macros and small inline functions (ten 258 lines or less in length), then the use of the object file is 259 unrestricted, regardless of whether it is legally a derivative 260 work. (Executables containing this object code plus portions of the 261 Library will still fall under Section 6.) 262 263 Otherwise, if the work is a derivative of the Library, you may 264 distribute the object code for the work under the terms of Section 265 6. Any executables containing that work also fall under Section 6, 266 whether or not they are linked directly with the Library itself. 267 2686. As an exception to the Sections above, you may also compile or link a 269 "work that uses the Library" with the Library to produce a work 270 containing portions of the Library, and distribute that work under terms 271 of your choice, provided that the terms permit modification of the work 272 for the customer's own use and reverse engineering for debugging such 273 modifications. 274 275 You must give prominent notice with each copy of the work that the 276 Library is used in it and that the Library and its use are covered by 277 this License. You must supply a copy of this License. If the work during 278 execution displays copyright notices, you must include the copyright 279 notice for the Library among them, as well as a reference directing the 280 user to the copy of this License. Also, you must do one of these things: 281 282 a) Accompany the work with the complete corresponding machine-readable 283 source code for the Library including whatever changes were used in 284 the work (which must be distributed under Sections 1 and 2 above); 285 and, if the work is an executable linked with the Library, with the 286 complete machine-readable "work that uses the Library", as object 287 code and/or source code, so that the user can modify the Library and 288 then relink to produce a modified executable containing the modified 289 Library. (It is understood that the user who changes the contents of 290 definitions files in the Library will not necessarily be able to 291 recompile the application to use the modified definitions.) 292 293 b) Accompany the work with a written offer, valid for at least three 294 years, to give the same user the materials specified in Subsection 295 6a, above, for a charge no more than the cost of performing this 296 distribution. 297 298 c) If distribution of the work is made by offering access to copy from a 299 designated place, offer equivalent access to copy the above specified 300 materials from the same place. 301 302 d) Verify that the user has already received a copy of these materials 303 or that you have already sent this user a copy. 304 305 For an executable, the required form of the "work that uses the Library" 306 must include any data and utility programs needed for reproducing the 307 executable from it. However, as a special exception, the source code 308 distributed need not include anything that is normally distributed (in 309 either source or binary form) with the major components (compiler, 310 kernel, and so on) of the operating system on which the executable runs, 311 unless that component itself accompanies the executable. 312 313 It may happen that this requirement contradicts the license restrictions 314 of other proprietary libraries that do not normally accompany the 315 operating system. Such a contradiction means you cannot use both them 316 and the Library together in an executable that you distribute. 317 3187. You may place library facilities that are a work based on the Library 319 side-by-side in a single library together with other library facilities 320 not covered by this License, and distribute such a combined library, 321 provided that the separate distribution of the work based on the Library 322 and of the other library facilities is otherwise permitted, and provided 323 that you do these two things: 324 325 a) Accompany the combined library with a copy of the same work based on 326 the Library, uncombined with any other library facilities. This must 327 be distributed under the terms of the Sections above. 328 329 b) Give prominent notice with the combined library of the fact that part 330 of it is a work based on the Library, and explaining where to find 331 the accompanying uncombined form of the same work. 332 3338. You may not copy, modify, sublicense, link with, or distribute the 334 Library except as expressly provided under this License. Any attempt 335 otherwise to copy, modify, sublicense, link with, or distribute the 336 Library is void, and will automatically terminate your rights under this 337 License. However, parties who have received copies, or rights, from you 338 under this License will not have their licenses terminated so long as 339 such parties remain in full compliance. 340 3419. You are not required to accept this License, since you have not signed 342 it. However, nothing else grants you permission to modify or distribute 343 the Library or its derivative works. These actions are prohibited by law 344 if you do not accept this License. Therefore, by modifying or 345 distributing the Library (or any work based on the Library), you 346 indicate your acceptance of this License to do so, and all its terms and 347 conditions for copying, distributing or modifying the Library or works 348 based on it. 349 35010. Each time you redistribute the Library (or any work based on the 351 Library), the recipient automatically receives a license from the 352 original licensor to copy, distribute, link with or modify the Library 353 subject to these terms and conditions. You may not impose any further 354 restrictions on the recipients' exercise of the rights granted 355 herein. You are not responsible for enforcing compliance by third 356 parties to this License. 357 35811. If, as a consequence of a court judgment or allegation of patent 359 infringement or for any other reason (not limited to patent issues), 360 conditions are imposed on you (whether by court order, agreement or 361 otherwise) that contradict the conditions of this License, they do not 362 excuse you from the conditions of this License. If you cannot 363 distribute so as to satisfy simultaneously your obligations under this 364 License and any other pertinent obligations, then as a consequence you 365 may not distribute the Library at all. For example, if a patent license 366 would not permit royalty-free redistribution of the Library by all 367 those who receive copies directly or indirectly through you, then the 368 only way you could satisfy both it and this License would be to refrain 369 entirely from distribution of the Library. 370 371 If any portion of this section is held invalid or unenforceable under 372 any particular circumstance, the balance of the section is intended to 373 apply, and the section as a whole is intended to apply in other 374 circumstances. 375 376 It is not the purpose of this section to induce you to infringe any 377 patents or other property right claims or to contest validity of any 378 such claims; this section has the sole purpose of protecting the 379 integrity of the free software distribution system which is implemented 380 by public license practices. Many people have made generous 381 contributions to the wide range of software distributed through that 382 system in reliance on consistent application of that system; it is up 383 to the author/donor to decide if he or she is willing to distribute 384 software through any other system and a licensee cannot impose that 385 choice. 386 387 This section is intended to make thoroughly clear what is believed to 388 be a consequence of the rest of this License. 389 39012. If the distribution and/or use of the Library is restricted in certain 391 countries either by patents or by copyrighted interfaces, the original 392 copyright holder who places the Library under this License may add an 393 explicit geographical distribution limitation excluding those 394 countries, so that distribution is permitted only in or among countries 395 not thus excluded. In such case, this License incorporates the 396 limitation as if written in the body of this License. 397 39813. The Free Software Foundation may publish revised and/or new versions of 399 the Library General Public License from time to time. Such new versions 400 will be similar in spirit to the present version, but may differ in 401 detail to address new problems or concerns. 402 403 Each version is given a distinguishing version number. If the Library 404 specifies a version number of this License which applies to it and "any 405 later version", you have the option of following the terms and 406 conditions either of that version or of any later version published by 407 the Free Software Foundation. If the Library does not specify a license 408 version number, you may choose any version ever published by the Free 409 Software Foundation. 410 41114. If you wish to incorporate parts of the Library into other free 412 programs whose distribution conditions are incompatible with these, 413 write to the author to ask for permission. For software which is 414 copyrighted by the Free Software Foundation, write to the Free Software 415 Foundation; we sometimes make exceptions for this. Our decision will be 416 guided by the two goals of preserving the free status of all 417 derivatives of our free software and of promoting the sharing and reuse 418 of software generally. 419 420NO WARRANTY 421 42215. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 423 FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 424 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 425 PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 426 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 427 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE 428 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH 429 YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 430 NECESSARY SERVICING, REPAIR OR CORRECTION. 431 43216. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 433 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 434 REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR 435 DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 436 DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY 437 (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED 438 INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF 439 THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR 440 OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 441 442END OF TERMS AND CONDITIONS 443 444How to Apply These Terms to Your New Libraries 445 446If you develop a new library, and you want it to be of the greatest 447possible use to the public, we recommend making it free software that 448everyone can redistribute and change. You can do so by permitting 449redistribution under these terms (or, alternatively, under the terms of the 450ordinary General Public License). 451 452To apply these terms, attach the following notices to the library. It is 453safest to attach them to the start of each source file to most effectively 454convey the exclusion of warranty; and each file should have at least the 455"copyright" line and a pointer to where the full notice is found. 456 457one line to give the library's name and an idea of what it does. 458Copyright (C) year name of author 459 460This library is free software; you can redistribute it and/or modify it 461under the terms of the GNU Library General Public License as published by 462the Free Software Foundation; either version 2 of the License, or (at your 463option) any later version. 464 465This library is distributed in the hope that it will be useful, but WITHOUT 466ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 467FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 468License for more details. 469 470You should have received a copy of the GNU Library General Public License 471along with this library; if not, write to the Free Software Foundation, 472Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 473 474Also add information on how to contact you by electronic and paper mail. 475 476You should also get your employer (if you work as a programmer) or your 477school, if any, to sign a "copyright disclaimer" for the library, if 478necessary. Here is a sample; alter the names: 479 480Yoyodyne, Inc., hereby disclaims all copyright interest in 481the library `Frob' (a library for tweaking knobs) written 482by James Random Hacker. 483 484signature of Ty Coon, 1 April 1990 485Ty Coon, President of Vice 486 487That's all there is to it! 488