]>
Commit | Line | Data |
---|---|---|
23d13405 BYTK |
1 | |
2 | This Notice.txt file contains certain notices of software components included | |
3 | with the software that Qualcomm Atheros, Inc. ("Qualcomm Atheros") is required | |
4 | to provide you. Notwithstanding anything in the notices in this file, your use | |
5 | of these software components together with the Qualcomm Atheros software | |
6 | (Qualcomm Atheros software hereinafter referred to as "Software") is subject to | |
7 | the terms of your license from Qualcomm Atheros. Compliance with all copyright | |
8 | laws and software license agreements included in the notice section of this | |
9 | file are the responsibility of the user. Except as may be granted by separate | |
10 | express written agreement, this file provides no license to any Qualcomm | |
11 | Atheros patents, trademarks, copyrights, or other intellectual property. | |
12 | ||
13 | Copyright (c) 2014 Qualcomm Atheros, Inc. All rights reserved. | |
14 | ||
15 | Qualcomm is a trademark of Qualcomm Incorporated, registered in the United | |
16 | States and other countries. All Qualcomm Incorporated trademarks are used with | |
17 | permission. Atheros is a trademark of Qualcomm Atheros, Inc., registered in the | |
18 | United States and other countries. Other products and brand names may be | |
19 | trademarks or registered trademarks of their respective owners. | |
20 | ||
21 | NOTICES: | |
22 | ||
23 | =============================================================================== | |
24 | ||
25 | 1. | |
26 | ||
27 | /* | |
28 | * FILE: sha2.c | |
29 | * AUTHOR: Aaron D. Gifford <me@aarongifford.com> | |
30 | * | |
31 | * Copyright (c) 2000-2001, Aaron D. Gifford | |
32 | * All rights reserved. | |
33 | * | |
34 | * Redistribution and use in source and binary forms, with or without | |
35 | * modification, are permitted provided that the following conditions | |
36 | * are met: | |
37 | * 1. Redistributions of source code must retain the above copyright | |
38 | * notice, this list of conditions and the following disclaimer. | |
39 | * 2. Redistributions in binary form must reproduce the above copyright | |
40 | * notice, this list of conditions and the following disclaimer in the | |
41 | * documentation and/or other materials provided with the distribution. | |
42 | * 3. Neither the name of the copyright holder nor the names of contributors | |
43 | * may be used to endorse or promote products derived from this software | |
44 | * without specific prior written permission. | |
45 | * | |
46 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND | |
47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE | |
50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
56 | * SUCH DAMAGE. | |
57 | * | |
58 | * $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $ | |
59 | */ | |
60 | File: LLM_sp_sha2.c | |
61 | ||
62 | ||
63 | /* | |
64 | * FILE: sha2.h | |
65 | * AUTHOR: Aaron D. Gifford <me@aarongifford.com> | |
66 | * | |
67 | * Copyright (c) 2000-2001, Aaron D. Gifford | |
68 | * All rights reserved. | |
69 | * | |
70 | * Redistribution and use in source and binary forms, with or without | |
71 | * modification, are permitted provided that the following conditions | |
72 | * are met: | |
73 | * 1. Redistributions of source code must retain the above copyright | |
74 | * notice, this list of conditions and the following disclaimer. | |
75 | * 2. Redistributions in binary form must reproduce the above copyright | |
76 | * notice, this list of conditions and the following disclaimer in the | |
77 | * documentation and/or other materials provided with the distribution. | |
78 | * 3. Neither the name of the copyright holder nor the names of contributors | |
79 | * may be used to endorse or promote products derived from this software | |
80 | * without specific prior written permission. | |
81 | * | |
82 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND | |
83 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
84 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
85 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE | |
86 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
87 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
88 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
89 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
90 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
91 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
92 | * SUCH DAMAGE. | |
93 | * | |
94 | * $Id: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $ | |
95 | */ | |
96 | File: LLM_sp_sha2.h | |
97 | ||
98 | =============================================================================== | |
99 | ||
100 | 2. | |
101 | ||
102 | /* utility to create the register check tables | |
103 | * this includes inlined list.h safe for userspace. | |
104 | * | |
105 | * Copyright 2009 Jerome Glisse | |
106 | * Copyright 2009 Red Hat Inc. | |
107 | * | |
108 | * Authors: | |
109 | * Jerome Glisse | |
110 | * Dave Airlie | |
111 | */ | |
112 | /*All rights reserved. | |
113 | Redistribution and use in source and binary forms, with or without modification | |
114 | are permitted provided that the following conditions are met: | |
115 | 1. Redistributions of source code must retain the above copyright notice, | |
116 | this list of conditions and the following disclaimer. | |
117 | 2. Redistributions in binary form must reproduce the above copyright notice, | |
118 | this list of conditions and the following disclaimer in the documentation | |
119 | and/or other materials provided with the distribution. | |
120 | 3. Neither the name of the <ORGANIZATION> nor the names of its contributors | |
121 | may be used to endorse or promote products derived from this software | |
122 | without specific prior written permission. | |
123 | ||
124 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |
125 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
126 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
127 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
128 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
129 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
130 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
131 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
132 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
133 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
134 | */ | |
135 | File: comm_lib.h | |
136 | ||
137 | =============================================================================== | |
138 | ||
139 | 3. | |
140 | ||
141 | /* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ | |
142 | /* ==================================================================== | |
143 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | |
144 | * | |
145 | * Redistribution and use in source and binary forms, with or without | |
146 | * modification, are permitted provided that the following conditions | |
147 | * are met: | |
148 | * | |
149 | * 1. Redistributions of source code must retain the above copyright | |
150 | * notice, this list of conditions and the following disclaimer. | |
151 | * | |
152 | * 2. Redistributions in binary form must reproduce the above copyright | |
153 | * notice, this list of conditions and the following disclaimer in | |
154 | * the documentation and/or other materials provided with the | |
155 | * distribution. | |
156 | * | |
157 | * 3. All advertising materials mentioning features or use of this | |
158 | * software must display the following acknowledgment: | |
159 | * "This product includes software developed by the OpenSSL Project | |
160 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | |
161 | * | |
162 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | |
163 | * endorse or promote products derived from this software without | |
164 | * prior written permission. For written permission, please contact | |
165 | * openssl-core@openssl.org. | |
166 | * | |
167 | * 5. Products derived from this software may not be called "OpenSSL" | |
168 | * nor may "OpenSSL" appear in their names without prior written | |
169 | * permission of the OpenSSL Project. | |
170 | * | |
171 | * 6. Redistributions of any form whatsoever must retain the following | |
172 | * acknowledgment: | |
173 | * "This product includes software developed by the OpenSSL Project | |
174 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | |
175 | * | |
176 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | |
177 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
178 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
179 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | |
180 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
181 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
182 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
183 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
184 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
185 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
186 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
187 | * OF THE POSSIBILITY OF SUCH DAMAGE. | |
188 | * ==================================================================== | |
189 | * | |
190 | */ | |
191 | File Name list: aes.h, aes_locl.h | |
192 | ||
193 | =============================================================================== | |
194 | ||
195 | 4. | |
196 | ||
197 | /* crypto/aes/aes_core.c -*- mode:C; c-file-style: "eay" -*- */ | |
198 | /** | |
199 | * rijndael-alg-fst.c | |
200 | * | |
201 | * @version 3.0 (December 2000) | |
202 | * | |
203 | * Optimised ANSI C code for the Rijndael cipher (now AES) | |
204 | * | |
205 | * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be> | |
206 | * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be> | |
207 | * @author Paulo Barreto <paulo.barreto@terra.com.br> | |
208 | * | |
209 | * This code is hereby placed in the public domain. | |
210 | * | |
211 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS | |
212 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
213 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
214 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE | |
215 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
216 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
217 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
218 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
219 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
220 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |
221 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
222 | */ | |
223 | File: aes_core.c | |
224 | ||
225 | =============================================================================== | |
226 | ||
227 | 5. | |
228 | ||
229 | /*=========================================================================== | |
230 | ||
231 | EDIT HISTORY FOR FILE | |
232 | ||
233 | $Header: //depot/asic/msmshared/sec/sec/MSM_SEC.03.03.08.xx/aes.h#1 $ | |
234 | $DateTime: 2006/12/11 00:43:21 $ $Author: davidf $ | |
235 | ||
236 | when who what, where, why | |
237 | -------- --- ---------------------------------------------------------- | |
238 | 11/12/04 rv changes to correct LINT errors | |
239 | 02/02/04 rwh Small mods to open source. | |
240 | ||
241 | ===========================================================================*/ | |
242 | ||
243 | /* | |
244 | I retain copyright in this code but I encourage its free use provided | |
245 | that I don't carry any responsibility for the results. I am especially | |
246 | happy to see it used in free and open source software. If you do use | |
247 | it I would appreciate an acknowledgement of its origin in the code or | |
248 | the product that results and I would also appreciate knowing a liitle | |
249 | about the use to which it is being put. | |
250 | ||
251 | Dr B. R. Gladman <brg@gladman.uk.net> 1st June 2001. | |
252 | ||
253 | This is an implementation of the AES encryption algorithm (Rijndael) | |
254 | designed by Joan Daemen and Vincent Rijmen. This version is designed | |
255 | to provide both fixed and dynamic block and key lengths and can also | |
256 | run with either big or little endian internal byte order. | |
257 | ||
258 | NOTE: Input block and key lengths are given in terms of the lengths of | |
259 | the byte arrays involved, the legal values being 16, 24 and 32. | |
260 | ||
261 | A. THE CIPHER INTERFACE | |
262 | ||
263 | byte (an unsigned 8-bit type) | |
264 | word (an unsigned 32-bit type) | |
265 | aes_ret: (a signed 16 bit type for function return values) | |
266 | aes_good (value != 0, a good return) | |
267 | aes_bad (value == 0, an error return) | |
268 | enum aes_key: (encryption direction) | |
269 | enc (set key for encryption) | |
270 | dec (set key for decryption) | |
271 | both (set key for both) | |
272 | class or struct aes (structure for context) | |
273 | ||
274 | C subroutine calls: | |
275 | ||
276 | aes_ret set_blk(const word block_length, aes *cx) (variable block size) | |
277 | aes_ret set_key(const byte key[], const word key_length, | |
278 | const enum aes_key direction, aes *cx) | |
279 | aes_ret encrypt(const byte input_blk[], byte output_blk[], const aes *cx) | |
280 | aes_ret decrypt(const byte input_blk[], byte output_blk[], const aes *cx) | |
281 | ||
282 | IMPORTANT NOTE: If you are using this C interface and your compiler does | |
283 | not set the memory used for objects to zero before use, you will need to | |
284 | ensure that cx.mode is set to zero before using the C subroutine calls. | |
285 | ||
286 | C++ aes class subroutines: | |
287 | ||
288 | aes_ret set_blk(const word block_length) (variable block size) | |
289 | aes_ret set_key(const byte key[], const word key_length, | |
290 | const aes_key direction) | |
291 | aes_ret encrypt(const byte input_blk[], byte output_blk[]) const | |
292 | aes_ret decrypt(const byte input_blk[], byte output_blk[]) const | |
293 | ||
294 | The block length inputs to set_block and set_key are in numbers of | |
295 | BYTES, not bits. The calls to subroutines must be made in the above | |
296 | order but multiple calls can be made without repeating earlier calls | |
297 | if their parameters have not changed. If the cipher block length is | |
298 | variable but set_blk has not been called before cipher operations a | |
299 | value of 16 is assumed (that is, the AES block size). In contrast to | |
300 | earlier versions the block and key length parameters are now checked | |
301 | for correctness and the encryption and decryption routines check to | |
302 | ensure that an appropriate key has been set before they are called. | |
303 | ||
304 | B. BYTE ORDER WITHIN 32 BIT WORDS | |
305 | ||
306 | The fundamental data processing units in Rijndael are 8-bit bytes. The | |
307 | input, the output and the key input are all enumerated arrays of bytes | |
308 | in which bytes are numbered starting at zero and increasing to one less | |
309 | than the number of bytes in the array in question. When these inputs | |
310 | and outputs are considered as bit sequences, the n'th byte contains | |
311 | bits 8n to 8n+7 of the sequence with the lower numbered bit mapped to | |
312 | the most significant bit within the byte (i.e. that having a numeric | |
313 | value of 128). However, Rijndael can be implemented more efficiently | |
314 | using 32-bit words to process 4 bytes at a time provided that the order | |
315 | of bytes within words is known. This order is called big-endian if the | |
316 | lowest numbered bytes in words have the highest numeric significance | |
317 | and little-endian if the opposite applies. This code can work in either | |
318 | order irrespective of the native order of the machine on which it runs. | |
319 | The byte order used internally is set by defining INTERNAL_BYTE_ORDER | |
320 | whereas the order for all inputs and outputs is specified by defining | |
321 | EXTERNAL_BYTE_ORDER, the only purpose of the latter being to determine | |
322 | if a byte order change is needed immediately after input and immediately | |
323 | before output to account for the use of a different internal byte order. | |
324 | In almost all situations both of these defines will be set to the native | |
325 | order of the processor on which the code is to run but other settings | |
326 | may somtimes be useful in special circumstances. | |
327 | ||
328 | #define INTERNAL_BYTE_ORDER LITTLE_ENDIAN | |
329 | #define EXTERNAL_BYTE_ORDER LITTLE_ENDIAN | |
330 | ||
331 | C. COMPILATION | |
332 | ||
333 | To compile AES (Rijndael) for use in C code | |
334 | a. Exclude the AES_DLL define in aes.h | |
335 | b. Exclude the AES_IN_CPP define in aes.h | |
336 | ||
337 | To compile AES (Rijndael) for use in in C++ code | |
338 | a. Exclude the AES_DLL define in aes.h | |
339 | b. Include the AES_IN_CPP define in aes.h | |
340 | ||
341 | To compile AES (Rijndael) in C as a Dynamic Link Library | |
342 | a. Include the AES_DLL define in aes.h | |
343 | b. Compile the DLL. If using the test files, exclude aes.c from | |
344 | the test build project and compile it with the same defines | |
345 | as used for the DLL (ensure that the DLL path is correct) | |
346 | ||
347 | D. CONFIGURATION OPTIONS (see also aes.c) | |
348 | ||
349 | 1. define BLOCK_SIZE to set the cipher block size (16, 24 or 32) or | |
350 | leave this undefined for dynamically variable block size (this will | |
351 | result in much slower code). | |
352 | 2. set AES_IN_CPP to use the code from C++ rather than C | |
353 | 3. set AES_DLL if AES (Rijndael) is to be compiled to a DLL | |
354 | 4. set INTERNAL_BYTE_ORDER to one of the above constants to set the | |
355 | internal byte order (the order used within the algorithm code) | |
356 | 5. set EXTERNAL_BYTE_ORDER to one of the above constants to set the byte | |
357 | order used at the external interfaces for the input, output and key | |
358 | byte arrays. | |
359 | ||
360 | IMPORTANT NOTE: BLOCK_SIZE is in BYTES: 16, 24, 32 or undefined for aes.c | |
361 | and 16, 20, 24, 28, 32 or undefined for aes++.c. If left undefined a | |
362 | slower version providing variable block length is compiled | |
363 | ||
364 | #define BLOCK_SIZE 16 | |
365 | ||
366 | Define AES_IN_CPP if you intend to use the AES C++ class rather than the | |
367 | C code directly. | |
368 | ||
369 | #define AES_IN_CPP | |
370 | ||
371 | Define AES_DLL if you wish to compile the code to produce a Windows DLL | |
372 | ||
373 | #define AES_DLL | |
374 | ||
375 | */ | |
376 | File: aes.h | |
377 | ||
378 | /*=========================================================================== | |
379 | ||
380 | EDIT HISTORY FOR FILE | |
381 | ||
382 | $Header: //depot/asic/msmshared/sec/sec/MSM_SEC.03.03.08.xx/aes_tab.h#1 $ | |
383 | $DateTime: 2006/12/11 00:43:21 $ $Author: davidf $ | |
384 | ||
385 | when who what, where, why | |
386 | -------- --- ---------------------------------------------------------- | |
387 | 11/12/04 rv changes to correct LINT errors | |
388 | 02/02/04 rwh Small mods to open source. | |
389 | ||
390 | ===========================================================================*/ | |
391 | /*lint -e146 -e303 */ | |
392 | /* 146: Assuming a binary constant */ | |
393 | /* 303: String too long (try +macros) */ | |
394 | ||
395 | ||
396 | /* | |
397 | I retain copyright in this code but I encourage its free use provided | |
398 | that I don't carry any responsibility for the results. I am especially | |
399 | happy to see it used in free and open source software. If you do use | |
400 | it I would appreciate an acknowledgement of its origin in the code or | |
401 | the product that results and I would also appreciate knowing a liitle | |
402 | about the use to which it is being put. | |
403 | ||
404 | Dr B. R. Gladman <brg@gladman.uk.net> 1st June 2001. | |
405 | */ | |
406 | File: aes_tab.h | |
407 | ||
408 | =============================================================================== | |
409 | 6. | |
410 | =============================================================================== | |
411 | #FILE:Conftest.py | |
412 | # Copyright (c) 2003 Stichting NLnet Labs | |
413 | # Copyright (c) 2001, 2002, 2003 Steven Knight | |
414 | # | |
415 | # Permission is hereby granted, free of charge, to any person obtaining | |
416 | # a copy of this software and associated documentation files (the | |
417 | # "Software"), to deal in the Software without restriction, including | |
418 | # without limitation the rights to use, copy, modify, merge, publish, | |
419 | # distribute, sublicense, and/or sell copies of the Software, and to | |
420 | # permit persons to whom the Software is furnished to do so, subject to | |
421 | # the following conditions: | |
422 | # | |
423 | # The above copyright notice and this permission notice shall be included | |
424 | # in all copies or substantial portions of the Software. | |
425 | # | |
426 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | |
427 | # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
428 | # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
429 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
430 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
431 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
432 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
433 | # | |
434 | ||
435 | # | |
436 | # The purpose of this module is to define how a check is to be performed. | |
437 | # Use one of the Check...() functions below. | |
438 | # | |
439 | ||
440 | # | |
441 | # A context class is used that defines functions for carrying out the tests, | |
442 | # logging and messages. The following methods and members must be present: | |
443 | # | |
444 | # context.Display(msg) Function called to print messages that are normally | |
445 | # displayed for the user. Newlines are explicitly used. | |
446 | # The text should also be written to the logfile! | |
447 | # | |
448 | # context.Log(msg) Function called to write to a log file. | |
449 | # | |
450 | # context.BuildProg(text, ext) | |
451 | # Function called to build a program, using "ext" for the | |
452 | # file extention. Must return an empty string for | |
453 | # success, an error message for failure. | |
454 | # For reliable test results building should be done just | |
455 | # like an actual program would be build, using the same | |
456 | # command and arguments (including configure results so | |
457 | # far). | |
458 | # | |
459 | # context.CompileProg(text, ext) | |
460 | # Function called to compile a program, using "ext" for | |
461 | # the file extention. Must return an empty string for | |
462 | # success, an error message for failure. | |
463 | # For reliable test results compiling should be done just | |
464 | # like an actual source file would be compiled, using the | |
465 | # same command and arguments (including configure results | |
466 | # so far). | |
467 | # | |
468 | # context.AppendLIBS(lib_name_list) | |
469 | # Append "lib_name_list" to the value of LIBS. | |
470 | # "lib_namelist" is a list of strings. | |
471 | # Return the value of LIBS before changing it (any type | |
472 | # can be used, it is passed to SetLIBS() later.) | |
473 | # | |
474 | # context.PrependLIBS(lib_name_list) | |
475 | # Prepend "lib_name_list" to the value of LIBS. | |
476 | # "lib_namelist" is a list of strings. | |
477 | # Return the value of LIBS before changing it (any type | |
478 | # can be used, it is passed to SetLIBS() later.) | |
479 | # | |
480 | # context.SetLIBS(value) | |
481 | # Set LIBS to "value". The type of "value" is what | |
482 | # AppendLIBS() returned. | |
483 | # Return the value of LIBS before changing it (any type | |
484 | # can be used, it is passed to SetLIBS() later.) | |
485 | # | |
486 | # context.headerfilename | |
487 | # Name of file to append configure results to, usually | |
488 | # "confdefs.h". | |
489 | # The file must not exist or be empty when starting. | |
490 | # Empty or None to skip this (some tests will not work!). | |
491 | # | |
492 | # context.config_h (may be missing). If present, must be a string, which | |
493 | # will be filled with the contents of a config_h file. | |
494 | # | |
495 | # context.vardict Dictionary holding variables used for the tests and | |
496 | # stores results from the tests, used for the build | |
497 | # commands. | |
498 | # Normally contains "CC", "LIBS", "CPPFLAGS", etc. | |
499 | # | |
500 | # context.havedict Dictionary holding results from the tests that are to | |
501 | # be used inside a program. | |
502 | # Names often start with "HAVE_". These are zero | |
503 | # (feature not present) or one (feature present). Other | |
504 | # variables may have any value, e.g., "PERLVERSION" can | |
505 | # | |
506 | =============================================================================== |