NetBSD<5.99.16 does not have popcount(3). fixes PR 46230.diff -r1.2 -r1.3 pkgsrc/multimedia/vlc2/distinfo
(obache)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: distinfo,v 1.2 2012/02/24 17:24:18 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.3 2012/03/20 12:06:16 obache Exp $ | |
2 | 2 | |||
3 | SHA1 (vlc-2.0.0.tar.xz) = c28c4c8128110fd02a7bdf55c9dad5cc20eb91b8 | 3 | SHA1 (vlc-2.0.0.tar.xz) = c28c4c8128110fd02a7bdf55c9dad5cc20eb91b8 | |
4 | RMD160 (vlc-2.0.0.tar.xz) = 6c4d1401a7cc5b1c66dde7eb896347a728961d2b | 4 | RMD160 (vlc-2.0.0.tar.xz) = 6c4d1401a7cc5b1c66dde7eb896347a728961d2b | |
5 | Size (vlc-2.0.0.tar.xz) = 17144876 bytes | 5 | Size (vlc-2.0.0.tar.xz) = 17144876 bytes | |
6 | SHA1 (patch-aa) = 46003ac47b0b0ab97f481cbd755d48f624b0fa87 | 6 | SHA1 (patch-aa) = 46003ac47b0b0ab97f481cbd755d48f624b0fa87 | |
7 | SHA1 (patch-ar) = 153164870e9dc50ad32106d9f8ebd25b35ed3dd3 | 7 | SHA1 (patch-ar) = 153164870e9dc50ad32106d9f8ebd25b35ed3dd3 | |
8 | SHA1 (patch-as) = b53b074b2791d7bf69d5f09c7c32d873608f3086 | 8 | SHA1 (patch-as) = b53b074b2791d7bf69d5f09c7c32d873608f3086 | |
9 | SHA1 (patch-at) = bf48ded3571358d6b718af47b28804c3155d84ef | 9 | SHA1 (patch-at) = bf48ded3571358d6b718af47b28804c3155d84ef | |
10 | SHA1 (patch-au) = 5ea53969efefe3d9a6e3121b5453b573c633124b | 10 | SHA1 (patch-au) = 5ea53969efefe3d9a6e3121b5453b573c633124b | |
11 | SHA1 (patch-av) = af36b4658a650136eb9bdb2f541c9dd5315073d5 | 11 | SHA1 (patch-av) = c82b711947ea4bdca9b011e36af6c87d9b6f62a6 | |
12 | SHA1 (patch-aw) = 334648f9ba421184e41e4ead0da1eacc61c95b19 | 12 | SHA1 (patch-aw) = 334648f9ba421184e41e4ead0da1eacc61c95b19 | |
13 | SHA1 (patch-modules_access_rtp_Modules.am) = 14aea82ffab2fcfa5b0916ac2e86363d1efdcbf3 | 13 | SHA1 (patch-modules_access_rtp_Modules.am) = 14aea82ffab2fcfa5b0916ac2e86363d1efdcbf3 | |
14 | SHA1 (patch-modules_audio__output_pulse.c) = 941ee669e62c9d757fc096c74a2aec58cf265b15 | 14 | SHA1 (patch-modules_audio__output_pulse.c) = 941ee669e62c9d757fc096c74a2aec58cf265b15 | |
15 | SHA1 (patch-skins-aa) = 9477b095b3e0a1120397c6c9f7102a50c1a63d2b | 15 | SHA1 (patch-skins-aa) = 9477b095b3e0a1120397c6c9f7102a50c1a63d2b | |
16 | SHA1 (patch-skins-ab) = bf8b3e33db5389dbf04dfedf1d2f1d120afed66a | 16 | SHA1 (patch-skins-ab) = bf8b3e33db5389dbf04dfedf1d2f1d120afed66a |
@@ -1,21 +1,48 @@ | @@ -1,21 +1,48 @@ | |||
1 | $NetBSD: patch-av,v 1.1.1.1 2012/02/21 12:49:43 drochner Exp $ | 1 | $NetBSD: patch-av,v 1.2 2012/03/20 12:06:17 obache Exp $ | |
2 | 2 | |||
3 | --- include/vlc_common.h.orig 2011-12-11 22:34:47.000000000 +0000 | 3 | --- include/vlc_common.h.orig 2011-12-11 22:34:47.000000000 +0000 | |
4 | +++ include/vlc_common.h | 4 | +++ include/vlc_common.h | |
5 | @@ -625,6 +625,8 @@ static inline unsigned clz (unsigned x) | 5 | @@ -51,6 +51,9 @@ | |
6 | #include <stdio.h> | |||
7 | #include <inttypes.h> | |||
8 | #include <stddef.h> | |||
9 | +#ifdef __NetBSD__ | |||
10 | +#include <sys/param.h> | |||
11 | +#endif | |||
12 | ||||
13 | #ifndef __cplusplus | |||
14 | # include <stdbool.h> | |||
15 | @@ -625,6 +628,8 @@ static inline unsigned clz (unsigned x) | |||
6 | /* XXX: this assumes that int is 32-bits or more */ | 16 | /* XXX: this assumes that int is 32-bits or more */ | |
7 | #define clz32( x ) (clz(x) - ((sizeof(unsigned) - sizeof (uint32_t)) * 8)) | 17 | #define clz32( x ) (clz(x) - ((sizeof(unsigned) - sizeof (uint32_t)) * 8)) | |
8 | 18 | |||
9 | +#ifndef __NetBSD__ | 19 | +#if !defined(__NetBSD_Version__) || (__NetBSD_Version__ < 599001600) | |
10 | + | 20 | + | |
11 | /** Bit weight */ | 21 | /** Bit weight */ | |
12 | VLC_USED | 22 | VLC_USED | |
13 | static inline unsigned popcount (unsigned x) | 23 | static inline unsigned popcount (unsigned x) | |
14 | @@ -696,6 +698,7 @@ static inline uint64_t bswap64 (uint64_t | 24 | @@ -641,6 +646,7 @@ static inline unsigned popcount (unsigne | |
25 | return count; | |||
26 | #endif | |||
27 | } | |||
28 | +#endif /* NetBSD < 5.99.16 */ | |||
29 | ||||
30 | #ifdef __OS2__ | |||
31 | # undef bswap16 | |||
32 | @@ -648,6 +654,8 @@ static inline unsigned popcount (unsigne | |||
33 | # undef bswap64 | |||
34 | #endif | |||
35 | ||||
36 | +#ifndef __NetBSD__ | |||
37 | + | |||
38 | /** Byte swap (16 bits) */ | |||
39 | VLC_USED | |||
40 | static inline uint16_t bswap16 (uint16_t x) | |||
41 | @@ -696,6 +704,7 @@ static inline uint64_t bswap64 (uint64_t | |||
15 | #endif | 42 | #endif | |
16 | } | 43 | } | |
17 | 44 | |||
18 | +#endif /* NetBSD */ | 45 | +#endif /* NetBSD */ | |
19 | 46 | |||
20 | /* Free and set set the variable to NULL */ | 47 | /* Free and set set the variable to NULL */ | |
21 | #define FREENULL(a) do { free( a ); a = NULL; } while(0) | 48 | #define FREENULL(a) do { free( a ); a = NULL; } while(0) |