本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

449 lines
24KB

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