~ubuntu-branches/ubuntu/vivid/mariadb-5.5/vivid-proposed

« back to all changes in this revision

Viewing changes to extra/jemalloc/include/msvc_compat/strings.h

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-11-14 21:04:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20141114210424-xlyna0ozl11647o5
Tags: 5.5.40-0ubuntu0.14.10.1
* SECURITY UPDATE: Update to 5.5.40 to fix security issues (LP: #1391676)
  - CVE-2014-6507
  - CVE-2014-6491
  - CVE-2014-6500
  - CVE-2014-6469
  - CVE-2014-6555
  - CVE-2014-6559
  - CVE-2014-6494
  - CVE-2014-6496
  - CVE-2014-6464
* Add bsdutils as mariadb-server dependency like upstream does in 5.5.40.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef strings_h
2
 
#define strings_h
3
 
 
4
 
/* MSVC doesn't define ffs/ffsl. This dummy strings.h header is provided
5
 
 * for both */
6
 
#include <intrin.h>
7
 
#pragma intrinsic(_BitScanForward)
8
 
static __forceinline int ffsl(long x)
9
 
{
10
 
        unsigned long i;
11
 
 
12
 
        if (_BitScanForward(&i, x))
13
 
                return (i + 1);
14
 
        return (0);
15
 
}
16
 
 
17
 
static __forceinline int ffs(int x)
18
 
{
19
 
 
20
 
        return (ffsl(x));
21
 
}
22
 
 
23
 
#endif