From 0874b8bac6ca89f1d91d30d66d54f425e4e7c81e Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 12 Mar 2018 14:35:43 -0700 Subject: [PATCH] Remove popcount in favor of ws_count_ones. Remove our popcount implementation in favor of ws_count_ones, which is our other popcount implementation. This required updating and running process-x11-xcb.pl. Change-Id: I8634c55242113b338c5b0173837c35f98b148b4f Reviewed-on: https://code.wireshark.org/review/26454 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ConfigureChecks.cmake | 1 - cmakeconfig.h.in | 3 -- configure.ac | 1 - debian/libwsutil0.symbols | 1 - epan/dissectors/packet-x11.c | 4 +- .../dissectors/x11-extension-implementation.h | 54 +++++++++---------- epan/dissectors/x11-glx-render-enum.h | 3 +- tools/process-x11-fields.pl | 14 +---- tools/process-x11-xcb.pl | 16 +----- wsutil/CMakeLists.txt | 4 -- wsutil/Makefile.am | 2 - wsutil/popcount.c | 30 ----------- wsutil/popcount.h | 18 ------- 13 files changed, 33 insertions(+), 118 deletions(-) delete mode 100644 wsutil/popcount.c delete mode 100644 wsutil/popcount.h diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 0a6c1fc065..bd6e977348 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -98,7 +98,6 @@ endif() check_function_exists("getifaddrs" HAVE_GETIFADDRS) check_function_exists("issetugid" HAVE_ISSETUGID) check_function_exists("mkstemps" HAVE_MKSTEMPS) -check_function_exists("popcount" HAVE_POPCOUNT) check_function_exists("setresgid" HAVE_SETRESGID) check_function_exists("setresuid" HAVE_SETRESUID) check_function_exists("strptime" HAVE_STRPTIME) diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 25f67b731b..92402901ae 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -243,9 +243,6 @@ /* Define to 1 if you have the `pcap_set_tstamp_type' function. */ #cmakedefine HAVE_PCAP_SET_TSTAMP_TYPE 1 -/* Define to 1 if you have the popcount function. */ -#cmakedefine HAVE_POPCOUNT 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_PWD_H 1 diff --git a/configure.ac b/configure.ac index 3351615a52..f28a728217 100644 --- a/configure.ac +++ b/configure.ac @@ -2313,7 +2313,6 @@ if test "x$ac_cv_func_getopt_long" = xyes; then fi AC_REPLACE_FUNCS(strptime) -AC_REPLACE_FUNCS(popcount) AC_CHECK_FUNCS(mkstemps) AC_CHECK_FUNCS(issetugid) diff --git a/debian/libwsutil0.symbols b/debian/libwsutil0.symbols index aec27ee53f..449904947f 100644 --- a/debian/libwsutil0.symbols +++ b/debian/libwsutil0.symbols @@ -121,7 +121,6 @@ libwsutil.so.0 libwsutil0 #MINVER# plugins_dump_all@Base 1.12.0~rc1 plugins_get_count@Base 2.5.0 plugins_get_descriptions@Base 1.12.0~rc1 - popcount@Base 1.99.2 printable_char_or_period@Base 1.99.0 profile_exists@Base 1.12.0~rc1 profile_store_persconffiles@Base 1.12.0~rc1 diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index f39de25bef..e75d1c5f3f 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -47,9 +47,7 @@ #include "packet-x11-keysymdef.h" #include "packet-x11.h" -#ifndef HAVE_POPCOUNT -# include "wsutil/popcount.h" -#endif +#include void proto_register_x11(void); void proto_reg_handoff_x11(void); diff --git a/epan/dissectors/x11-extension-implementation.h b/epan/dissectors/x11-extension-implementation.h index dbc3f8704d..f773024b7b 100644 --- a/epan/dissectors/x11-extension-implementation.h +++ b/epan/dissectors/x11-extension-implementation.h @@ -21703,8 +21703,8 @@ static int struct_size_xkb_DeviceLedInfo(tvbuff_t *tvb _U_, int *offsetp _U_, gu int f_namesPresent; f_namesPresent = tvb_get_guint32(tvb, *offsetp + size + 4, byte_order); f_mapsPresent = tvb_get_guint32(tvb, *offsetp + size + 8, byte_order); - size += popcount(f_namesPresent) * 4; - size += popcount(f_mapsPresent) * 12; + size += ws_count_ones(f_namesPresent) * 4; + size += ws_count_ones(f_mapsPresent) * 12; return size + 20; } @@ -21731,8 +21731,8 @@ static void struct_xkb_DeviceLedInfo(tvbuff_t *tvb, int *offsetp, proto_tree *ro *offsetp += 4; proto_tree_add_item(t, hf_x11_struct_xkb_DeviceLedInfo_state, tvb, *offsetp, 4, byte_order); *offsetp += 4; - listOfCard32(tvb, offsetp, t, hf_x11_struct_xkb_DeviceLedInfo_names, hf_x11_struct_xkb_DeviceLedInfo_names_item, popcount(f_namesPresent), byte_order); - struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, popcount(f_mapsPresent)); + listOfCard32(tvb, offsetp, t, hf_x11_struct_xkb_DeviceLedInfo_names, hf_x11_struct_xkb_DeviceLedInfo_names_item, ws_count_ones(f_namesPresent), byte_order); + struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_mapsPresent)); } } @@ -23989,7 +23989,7 @@ static void xkbGetMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, pro struct_xkb_SetBehavior(tvb, offsetp, t, byte_order, f_totalKeyBehaviors); } if (f_present & (1U << 6)) { - listOfByte(tvb, offsetp, t, hf_x11_xkb_GetMap_reply_VirtualMods_vmods_rtrn, popcount(f_virtualMods), byte_order); + listOfByte(tvb, offsetp, t, hf_x11_xkb_GetMap_reply_VirtualMods_vmods_rtrn, ws_count_ones(f_virtualMods), byte_order); if (*offsetp % 4) { proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA); *offsetp += (4 - *offsetp % 4); @@ -24153,8 +24153,8 @@ static void xkbSetMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto length -= f_totalKeyBehaviors * 4; } if (f_present & (1U << 6)) { - listOfByte(tvb, offsetp, t, hf_x11_xkb_SetMap_VirtualMods_vmods, popcount(f_virtualMods), byte_order); - length -= popcount(f_virtualMods) * 1; + listOfByte(tvb, offsetp, t, hf_x11_xkb_SetMap_VirtualMods_vmods, ws_count_ones(f_virtualMods), byte_order); + length -= ws_count_ones(f_virtualMods) * 1; if (*offsetp % 4) { proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA); *offsetp += (4 - *offsetp % 4); @@ -24238,7 +24238,7 @@ static void xkbGetCompatMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA); *offsetp += 16; struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSIRtrn); - struct_xkb_ModDef(tvb, offsetp, t, byte_order, popcount(f_groupsRtrn)); + struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groupsRtrn)); } static void xkbSetCompatMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, guint byte_order, int length _U_) @@ -24274,8 +24274,8 @@ static void xkbSetCompatMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, *offsetp += 2; struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSI); length -= f_nSI * 16; - struct_xkb_ModDef(tvb, offsetp, t, byte_order, popcount(f_groups)); - length -= popcount(f_groups) * 4; + struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groups)); + length -= ws_count_ones(f_groups) * 4; } static void xkbGetIndicatorState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, guint byte_order, int length _U_) @@ -24340,7 +24340,7 @@ static void xkbGetIndicatorMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off *offsetp += 1; proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA); *offsetp += 15; - struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, popcount(f_which)); + struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_which)); } static void xkbSetIndicatorMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, guint byte_order, int length _U_) @@ -24353,8 +24353,8 @@ static void xkbSetIndicatorMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offse f_which = tvb_get_guint32(tvb, *offsetp, byte_order); proto_tree_add_item(t, hf_x11_xkb_SetIndicatorMap_which, tvb, *offsetp, 4, byte_order); *offsetp += 4; - struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, popcount(f_which)); - length -= popcount(f_which) * 12; + struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_which)); + length -= ws_count_ones(f_which) * 12; } static void xkbGetNamedIndicator(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, guint byte_order, int length _U_) @@ -24816,13 +24816,13 @@ static void xkbGetNames_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, p listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames_item, sumof_nLevelsPerType, byte_order); } if (f_which & (1U << 8)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames_item, popcount(f_indicators), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order); } if (f_which & (1U << 11)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order); } if (f_which & (1U << 12)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_GroupNames_groups, hf_x11_xkb_GetNames_reply_GroupNames_groups_item, popcount(f_groupNames), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_GroupNames_groups, hf_x11_xkb_GetNames_reply_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order); } if (f_which & (1U << 9)) { struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys); @@ -24979,16 +24979,16 @@ static void xkbSetNames(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pro length -= sumof_nLevelsPerType * 4; } if (f_which & (1U << 8)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames_item, popcount(f_indicators), byte_order); - length -= popcount(f_indicators) * 4; + listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order); + length -= ws_count_ones(f_indicators) * 4; } if (f_which & (1U << 11)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), byte_order); - length -= popcount(f_virtualMods) * 4; + listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order); + length -= ws_count_ones(f_virtualMods) * 4; } if (f_which & (1U << 12)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_GroupNames_groups, hf_x11_xkb_SetNames_GroupNames_groups_item, popcount(f_groupNames), byte_order); - length -= popcount(f_groupNames) * 4; + listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_GroupNames_groups, hf_x11_xkb_SetNames_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order); + length -= ws_count_ones(f_groupNames) * 4; } if (f_which & (1U << 9)) { struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys); @@ -25467,7 +25467,7 @@ static void xkbGetKbdByName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset struct_xkb_SetBehavior(tvb, offsetp, t, byte_order, f_totalKeyBehaviors); } if (f_present & (1U << 6)) { - listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_Types_VirtualMods_vmods_rtrn, popcount(f_virtualMods), byte_order); + listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_Types_VirtualMods_vmods_rtrn, ws_count_ones(f_virtualMods), byte_order); if (*offsetp % 4) { proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA); *offsetp += (4 - *offsetp % 4); @@ -25526,7 +25526,7 @@ static void xkbGetKbdByName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA); *offsetp += 16; struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSIRtrn); - struct_xkb_ModDef(tvb, offsetp, t, byte_order, popcount(f_groupsRtrn)); + struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groupsRtrn)); } if (f_reported & (1U << 4)) { int f_nIndicators; @@ -25692,13 +25692,13 @@ static void xkbGetKbdByName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames_item, sumof_nLevelsPerType, byte_order); } if (f_which & (1U << 8)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames_item, popcount(f_indicators), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order); } if (f_which & (1U << 11)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order); } if (f_which & (1U << 12)) { - listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups_item, popcount(f_groupNames), byte_order); + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order); } if (f_which & (1U << 9)) { struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys); diff --git a/epan/dissectors/x11-glx-render-enum.h b/epan/dissectors/x11-glx-render-enum.h index 8a72e78ac2..d2c4bc0713 100644 --- a/epan/dissectors/x11-glx-render-enum.h +++ b/epan/dissectors/x11-glx-render-enum.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It was automatically generated by ../../tools/process-x11-xcb.pl - using mesa version 17.1-branchpoint-393-geeff7e1154 */ + using mesa version 17.3-branchpoint-3917-g370e356eba */ /* * Copyright 2008, 2009, 2013, 2014 Open Text Corporation * @@ -1277,6 +1277,7 @@ static const value_string mesa_enum[] = { { 0x8a48, "TEXTURE_SRGB_DECODE_EXT" }, { 0x8a49, "DECODE_EXT" }, { 0x8a4a, "SKIP_DECODE_EXT" }, + { 0x8a52, "FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT" }, { 0x8b30, "FRAGMENT_SHADER" }, { 0x8b31, "VERTEX_SHADER" }, { 0x8b40, "PROGRAM_OBJECT_ARB" }, diff --git a/tools/process-x11-fields.pl b/tools/process-x11-fields.pl index 71c5ead638..9b66a8d5a7 100755 --- a/tools/process-x11-fields.pl +++ b/tools/process-x11-fields.pl @@ -43,19 +43,7 @@ eot * By Gerald Combs * Copyright 1998 Gerald Combs * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: GPL-2.0-or-later */ eot diff --git a/tools/process-x11-xcb.pl b/tools/process-x11-xcb.pl index 73b6ae11e2..4808d94554 100755 --- a/tools/process-x11-xcb.pl +++ b/tools/process-x11-xcb.pl @@ -538,7 +538,7 @@ sub get_unop($;$) { return '(' . $op->att('op') . "$left)"; } when ('popcount') { - return "popcount($left)"; + return "ws_count_ones($left)"; } default { die "Invalid unop element $op->name()\n"; } } @@ -1774,19 +1774,7 @@ eot * By Gerald Combs * Copyright 1998 Gerald Combs * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: GPL-2.0-or-later */ eot diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index aefc0273f6..cd5c826000 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -207,10 +207,6 @@ if(NOT HAVE_GETOPT_LONG) list(APPEND WSUTIL_FILES getopt_long.c) endif() -if(NOT HAVE_POPCOUNT) - list(APPEND WSUTIL_FILES popcount.c) -endif() - if(NOT HAVE_STRPTIME) list(APPEND WSUTIL_FILES strptime.c) endif() diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am index b60aded329..2e29e2b143 100644 --- a/wsutil/Makefile.am +++ b/wsutil/Makefile.am @@ -198,8 +198,6 @@ EXTRA_DIST = \ file_util.h \ getopt_long.c \ getopt_long.h \ - popcount.c \ - popcount.h \ strptime.c \ strptime.h \ win32-utils.c \ diff --git a/wsutil/popcount.c b/wsutil/popcount.c deleted file mode 100644 index 7c0105e41e..0000000000 --- a/wsutil/popcount.c +++ /dev/null @@ -1,30 +0,0 @@ -/* popcount.c - * - * popcount() replacement function for systems that don't provide their own. - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#include "config.h" - -#include "wsutil/popcount.h" - -int -popcount(unsigned int mask) -{ -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) - /* GCC 3.4 or newer */ - return __builtin_popcount(mask); -#else - /* HACKMEM 169 */ - unsigned long y; - - y = (mask >> 1) &033333333333; - y = mask - y - ((y >>1) & 033333333333); - return (((y + (y >> 3)) & 030707070707) % 077); -#endif -} diff --git a/wsutil/popcount.h b/wsutil/popcount.h deleted file mode 100644 index 561dd25338..0000000000 --- a/wsutil/popcount.h +++ /dev/null @@ -1,18 +0,0 @@ -/* popcount.h - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef __POPCOUNT_H__ -#define __POPCOUNT_H__ - -#include "ws_symbol_export.h" - -WS_DLL_PUBLIC int popcount(unsigned int mask); - -#endif /* __POPCOUNT_H__ */ -