Changeset cf7cce6b4a6915f84afd4c8a3729e93b71fc0afe
- Timestamp:
- 11/26/08 12:24:27 (6 weeks ago)
- Author:
- David Balmain <dbalmain@…>
- git-author:
- Eduardo Habkost <ehabkost@raisama.net> / 2008-11-15T14:18:33Z-0200
- Parents:
- 8fe5fa557a9b1dee97f6a4e2e8fa0cdeb3c37291
- git-committer:
- David Balmain <dbalmain@gmail.com> / 2008-11-26T12:24:27Z+1100
- Message:
-
Compile fixes for inline-only functions on header files
gcc 4.3.0-8 from Fedora 9 complains about duplicated definitions here,
if using 'extern line'. Changing to use 'static inline' instead.
Signed-off-by: Eduardo Habkost <ehabkost@…>
- Location:
- c/include
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
ref412e
|
rcf7cce
|
|
| 79 | 79 | * on the fact that size is accurate. |
| 80 | 80 | */ |
| 81 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 81 | static FRT_ATTR_ALWAYS_INLINE |
| 82 | 82 | void frt_bv_set_value(FrtBitVector *bv, int bit, bool value) |
| 83 | 83 | { |
| … |
… |
|
| 125 | 125 | * @param index the index of the bit to set |
| 126 | 126 | */ |
| 127 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 127 | static FRT_ATTR_ALWAYS_INLINE |
| 128 | 128 | void frt_bv_set(FrtBitVector *bv, int bit) |
| 129 | 129 | { |
| … |
… |
|
| 158 | 158 | * @param index the index of the bit to set |
| 159 | 159 | */ |
| 160 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 160 | static FRT_ATTR_ALWAYS_INLINE |
| 161 | 161 | void frt_bv_set_fast(FrtBitVector *bv, int bit) |
| 162 | 162 | { |
| … |
… |
|
| 175 | 175 | * @return 1 if the bit was set, 0 otherwise |
| 176 | 176 | */ |
| 177 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 177 | static FRT_ATTR_ALWAYS_INLINE |
| 178 | 178 | int frt_bv_get(FrtBitVector *bv, int bit) |
| 179 | 179 | { |
| … |
… |
|
| 193 | 193 | * @param index the index of the bit to unset |
| 194 | 194 | */ |
| 195 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 195 | static FRT_ATTR_ALWAYS_INLINE |
| 196 | 196 | void frt_bv_unset(FrtBitVector *bv, int bit) |
| 197 | 197 | { |
| … |
… |
|
| 218 | 218 | * set |
| 219 | 219 | */ |
| 220 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 220 | static FRT_ATTR_ALWAYS_INLINE |
| 221 | 221 | int frt_bv_recount(FrtBitVector *bv) |
| 222 | 222 | { |
| … |
… |
|
| 268 | 268 | * @return the next set bit's index or -1 if no more bits are set |
| 269 | 269 | */ |
| 270 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 270 | static FRT_ATTR_ALWAYS_INLINE |
| 271 | 271 | int frt_bv_scan_next_from(FrtBitVector *bv, const int bit) |
| 272 | 272 | { |
| … |
… |
|
| 304 | 304 | * @return the next set bits index or -1 if no more bits are set |
| 305 | 305 | */ |
| 306 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 306 | static FRT_ATTR_ALWAYS_INLINE |
| 307 | 307 | int frt_bv_scan_next(FrtBitVector *bv) |
| 308 | 308 | { |
| … |
… |
|
| 318 | 318 | * @return the next unset bit's index or -1 if no more bits are unset |
| 319 | 319 | */ |
| 320 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 320 | static FRT_ATTR_ALWAYS_INLINE |
| 321 | 321 | int frt_bv_scan_next_unset_from(FrtBitVector *bv, const int bit) |
| 322 | 322 | { |
| … |
… |
|
| 354 | 354 | * @return the next unset bits index or -1 if no more bits are unset |
| 355 | 355 | */ |
| 356 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 356 | static FRT_ATTR_ALWAYS_INLINE |
| 357 | 357 | int frt_bv_scan_next_unset(FrtBitVector *bv) |
| 358 | 358 | { |
| … |
… |
|
| 377 | 377 | extern unsigned long frt_bv_hash(FrtBitVector *bv); |
| 378 | 378 | |
| 379 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 379 | static FRT_ATTR_ALWAYS_INLINE |
| 380 | 380 | void frt_bv_capa(FrtBitVector *bv, int capa, int size) |
| 381 | 381 | { |
| … |
… |
|
| 437 | 437 | } while(0) |
| 438 | 438 | |
| 439 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 439 | static FRT_ATTR_ALWAYS_INLINE |
| 440 | 440 | FrtBitVector *frt_bv_and_i(FrtBitVector *bv, |
| 441 | 441 | FrtBitVector *a, FrtBitVector *b) |
| … |
… |
|
| 445 | 445 | } |
| 446 | 446 | |
| 447 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 447 | static FRT_ATTR_ALWAYS_INLINE |
| 448 | 448 | FrtBitVector *frt_bv_or_i(FrtBitVector *bv, |
| 449 | 449 | FrtBitVector *a, FrtBitVector *b) |
| … |
… |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 455 | static FRT_ATTR_ALWAYS_INLINE |
| 456 | 456 | FrtBitVector *frt_bv_xor_i(FrtBitVector *bv, |
| 457 | 457 | FrtBitVector *a, FrtBitVector *b) |
| … |
… |
|
| 461 | 461 | } |
| 462 | 462 | |
| 463 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 463 | static FRT_ATTR_ALWAYS_INLINE |
| 464 | 464 | FrtBitVector *frt_bv_not_i(FrtBitVector *bv, FrtBitVector *bv1) |
| 465 | 465 | { |
| … |
… |
|
| 489 | 489 | * @return A FrtBitVector with all bits set that are set in both bv1 and bv2 |
| 490 | 490 | */ |
| 491 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 491 | static FRT_ATTR_ALWAYS_INLINE |
| 492 | 492 | FrtBitVector *frt_bv_and(FrtBitVector *bv1, FrtBitVector *bv2) |
| 493 | 493 | { |
| … |
… |
|
| 503 | 503 | * @return A FrtBitVector with all bits set that are set in both bv1 and bv2 |
| 504 | 504 | */ |
| 505 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 505 | static FRT_ATTR_ALWAYS_INLINE |
| 506 | 506 | FrtBitVector *frt_bv_or(FrtBitVector *bv1, FrtBitVector *bv2) |
| 507 | 507 | { |
| … |
… |
|
| 518 | 518 | * @return A FrtBitVector with all bits set that are equal in bv1 and bv2 |
| 519 | 519 | */ |
| 520 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 520 | static FRT_ATTR_ALWAYS_INLINE |
| 521 | 521 | FrtBitVector *frt_bv_xor(FrtBitVector *bv1, FrtBitVector *bv2) |
| 522 | 522 | { |
| … |
… |
|
| 530 | 530 | * @return A FrtBitVector with all bits set that are set in both bv1 and bv2 |
| 531 | 531 | */ |
| 532 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 532 | static FRT_ATTR_ALWAYS_INLINE |
| 533 | 533 | FrtBitVector *frt_bv_not(FrtBitVector *bv) |
| 534 | 534 | { |
| … |
… |
|
| 544 | 544 | * @return bv1 with all bits set that where set in both bv1 and bv2 |
| 545 | 545 | */ |
| 546 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 546 | static FRT_ATTR_ALWAYS_INLINE |
| 547 | 547 | FrtBitVector *frt_bv_and_x(FrtBitVector *bv1, FrtBitVector *bv2) |
| 548 | 548 | { |
| … |
… |
|
| 557 | 557 | * @return bv1 |
| 558 | 558 | */ |
| 559 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 559 | static FRT_ATTR_ALWAYS_INLINE |
| 560 | 560 | FrtBitVector *frt_bv_or_x(FrtBitVector *bv1, FrtBitVector *bv2) |
| 561 | 561 | { |
| … |
… |
|
| 570 | 570 | * @return bv1 |
| 571 | 571 | */ |
| 572 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 572 | static FRT_ATTR_ALWAYS_INLINE |
| 573 | 573 | FrtBitVector *frt_bv_xor_x(FrtBitVector *bv1, FrtBitVector *bv2) |
| 574 | 574 | { |
| … |
… |
|
| 582 | 582 | * @return A +bv+ with all it's bits flipped |
| 583 | 583 | */ |
| 584 | | extern FRT_ATTR_ALWAYS_INLINE |
| | 584 | static FRT_ATTR_ALWAYS_INLINE |
| 585 | 585 | FrtBitVector *frt_bv_not_x(FrtBitVector *bv) |
| 586 | 586 | { |
-
|
ref412e
|
rcf7cce
|
|
| 137 | 137 | * Returns the count of leading [MSB] 0 bits in +word+. |
| 138 | 138 | */ |
| 139 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 139 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 140 | 140 | int frt_count_leading_zeros(frt_u32 word) |
| 141 | 141 | { |
| … |
… |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 172 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 173 | 173 | int frt_count_leading_ones(frt_u32 word) |
| 174 | 174 | { |
| … |
… |
|
| 180 | 180 | */ |
| 181 | 181 | |
| 182 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 182 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 183 | 183 | int frt_count_trailing_zeros(frt_u32 word) |
| 184 | 184 | { |
| … |
… |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 215 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 216 | 216 | int frt_count_trailing_ones(frt_u32 word) |
| 217 | 217 | { |
| … |
… |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 221 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 222 | 222 | int frt_count_ones(frt_u32 word) |
| 223 | 223 | { |
| … |
… |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 252 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 253 | 253 | int frt_count_zeros(frt_u32 word) |
| 254 | 254 | { |
| … |
… |
|
| 259 | 259 | * Round up to the next power of 2 |
| 260 | 260 | */ |
| 261 | | extern FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| | 261 | static FRT_ATTR_ALWAYS_INLINE FRT_ATTR_CONST |
| 262 | 262 | int frt_round2(frt_u32 word) |
| 263 | 263 | { |